/** * AlloyEditor v1.3.0 * * Copyright 2014-present, Liferay, Inc. * All rights reserved. * * This source code is licensed under the GNU LGPL-style license found in the * LICENSE file in the root directory of this source tree. */ (function() { function deployCKEditor() { /* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ (function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])alloy-editor-all-min\.js(?:\?.*|;.*)?$/i,d={timestamp:"GAGE",version:"4.6.0",revision:"5877d8b",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;df.getListenerIndex(d)){f=f.listeners;g||(g=this);isNaN(l)&&(l=10);var D=this;m.fn=d;m.priority=l;for(var t=f.length-1;0<=t;t--)if(f[t].priority<=l)return f.splice(t+1,0,m),{removeListener:r};f.unshift(m)}return{removeListener:r}}, once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},g=0,h=function(){g=1};return function(l,m,r){var f=d(this)[l];l=a;var D=g;a=g=0;if(f){var t=f.listeners;if(t.length)for(var t=t.slice(0),z,x=0;xdocument.documentMode),mobile:-1c||b.quirks);b.gecko&&(d=a.match(/rv:([\d\.]+)/))&&(d=d[1].split("."),c=1E4*d[0]+100*(d[1]||0)+1*(d[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&7>c)&&!(b.gecko&&4E4>c)&&!(b.webkit&&534>c);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10c;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air"); b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}()); "unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*d))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:d})}; CKEDITOR.error=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})}; CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var d=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[d]("[CKEDITOR] Error code: "+b+".",a);else console[d]("[CKEDITOR] Error code: "+b+".");console[d]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+b)}},null,null,999);CKEDITOR.dom={}; (function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,e=/|\s) /g, function(a,f){return f+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",f=0;8>f;f++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,f){var b=f(a);b.prototype=a.prototype;return b},setTimeout:function(a,f,b,c,l){l||(l=window);b||(b=l);return l.setTimeout(function(){c?a.apply(b,[].concat(c)):a.apply(b)}, f||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(f){return f.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(f){return f.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(f){return f.replace(a,"")}}(),indexOf:function(a,f){if("function"==typeof f)for(var b=0,c=a.length;bb;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2); return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,b,c,l){a=b.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+l})},parseCssText:function(a,b,c){var l={};c&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return l;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function(a,c,p){b&&(c=c.toLowerCase(),"font-family"==c&&(p=p.replace(/\s*,\s*/g,",")),p=CKEDITOR.tools.trim(p));l[c]=p});return l},writeCssText:function(a,b){var c,l=[];for(c in a)l.push(c+":"+a[c]);b&&l.sort();return l.join("; ")},objectCompare:function(a,b,c){var l;if(!a&&!b)return!0;if(!a||!b)return!1;for(l in a)if(a[l]!=b[l])return!1;if(!c)for(l in b)if(a[l]!=b[l])return!1;return!0},objectKeys:function(a){var b=[],c;for(c in a)b.push(c);return b},convertArrayToObject:function(a,b){var c={};1== arguments.length&&(b=!0);for(var l=0,d=a.length;lc;c++)a.push(Math.floor(256*Math.random()));for(c=0;cCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(e);return e},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$, a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var e=c.parentNode;e&&d.unshift(this.getIndex.call({$:c},a));c=e}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,c){var m=c?a.nextSibling:a.previousSibling;return m&&m.nodeType==CKEDITOR.NODE_TEXT?b(m)?d(m, c):m:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var c=this.$,e=-1,g;if(!this.$.parentNode||a&&c.nodeType==CKEDITOR.NODE_TEXT&&b(c)&&!d(c)&&!d(c,!0))return-1;do a&&c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(g||b(c))||(e++,g=c.nodeType==CKEDITOR.NODE_TEXT);while(c=c.previousSibling);return e},getNextSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getFirst&&this.getFirst();var e;if(!a){if(this.type== CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(e=(e||this).getParent());){if(b&&!1===b(e,!0))return null;a=e.getNext()}return!a||b&&!1===b(a)?null:d&&d!=a.type?a.getNextSourceNode(!1,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var e;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(e=(e||this).getParent());){if(b&&!1=== b(e,!0))return null;a=e.getPrevious()}return!a||b&&!1===b(a)?null:d&&a.type!=d?a.getPreviousSourceNode(!1,d,b):a},getPrevious:function(a){var d=this.$,b;do b=(d=d.previousSibling)&&10!=d.nodeType&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)? new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type== CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return 0>d.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0]; return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+ CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}});CKEDITOR.dom.nodeList=function(a){this.$=a}; CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node; CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(a,d,b,c){var e=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),g=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[e]=d;g[b]=1;return d.setCustomData(b,c)}; CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)};CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),e=d.getCustomData("list_marker_id"),g;for(g in c)d.removeCustomData(g);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[e])}; (function(){function a(a,b){return-1<(" "+a+" ").replace(g," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,f=h[a].length;cCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a); var f=c.extractContents(!1,b||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=f.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else f.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$): b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({}, this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(f){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}: function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a, 2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,f;a=CKEDITOR.tools.isArray(a)? a:[];for(f=0;f=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,c;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; for(var a=this.getChildren(),b=0,c=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var f;if(b)for(;f=c.lastChild;)a.insertBefore(c.removeChild(f),a.firstChild);else for(;f=c.firstChild;)a.appendChild(c.removeChild(f))}},mergeSiblings:function(){function a(b,c,f){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d= [];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=f?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var l=f?b.getLast():b.getFirst();d.length;)d.shift().move(b,!f);c.moveChildren(b,!f);c.remove();l&&l.type==CKEDITOR.NODE_ELEMENT&&l.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this, arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b= 0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", "none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,f=b.count();cz||0z?z:d);c&&(0>e||0e?e:f,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+ "_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}}, getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var f=0;f=n.getChildCount()?(n=n.getChild(A-1),G=!0):n=n.getChild(A):r=G=!0;q.type==CKEDITOR.NODE_TEXT?k?m=!0:q.split(y):0ga)for(;V;)V=p(V,F,!0);F=L}k||h()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(), c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(g)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&h(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function e(a){return function(){var b;return this[a? "getPreviousNode":"getNextNode"](function(a){!b&&r(a)&&(b=a);return m(a)&&!(h(a)&&a.equals(b))})}}var g={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},h=CKEDITOR.dom.walker.bogus(),l=/^[\t\r\n ]*(?: |\xa0)$/,m=CKEDITOR.dom.walker.editable(),r=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer); a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed|| d(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,e,p=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",d+(p?"C":"S")));p||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",d+"E"),e=this.clone(), e.collapse(),e.insertNode(c));e=this.clone();e.collapse(!0);e.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(p?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:p}},createBookmark2:function(){function a(b){var f=b.container,d=b.offset,e;e=f;var g=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===g||g==e.getChildCount()?0:e.getChild(g-1).type==CKEDITOR.NODE_TEXT&&e.getChild(g).type==CKEDITOR.NODE_TEXT;e&&(f=f.getChild(d- 1),d=f.getLength());if(f.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,e={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root),d||(a(g),b(g,this.root)));return{start:e.container.getAddress(c),end:d?null:g.container.getAddress(c), startOffset:e.offset,endOffset:g.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()): this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b= b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a): this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a|| e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var p=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(p,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1): d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var p=function(a,b){var c=new CKEDITOR.dom.range(h);c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),f;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f= c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;J=f!=a?f.getText():f.substring(b);if(d.test(J))return!1}return!0};if(this.collapsed)break;var g=this.getCommonAncestor(),h=this.root,l,u,k,q,n,y=!1,A,J;A=this.startContainer;var G=this.startOffset;A.type==CKEDITOR.NODE_TEXT?(G&&(A=!CKEDITOR.tools.trim(A.substring(0,G)).length&&A,y=!!A),A&&((q=A.getPrevious())||(k=A.getParent()))):(G&&(q=A.getChild(G-1)||A.getLast()),q||(k=A));for(k=c(k);k||q;){if(k&&!q){!n&&k.equals(g)&&(n=!0);if(e?k.isBlockBoundary(): !h.contains(k))break;y&&"inline"==k.getComputedStyle("display")||(y=!1,n?l=k:this.setStartBefore(k));q=k.getPrevious()}for(;q;)if(A=!1,q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT)J=q.getText(),d.test(J)&&(q=null),A=/[\s\ufeff]$/.test(J);else if((q.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&q.is("br"))&&!q.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[q.getName()]){J=q.getText();if(d.test(J))q=null;else for(var G=q.$.getElementsByTagName("*"),C=0,r;r= G[C++];)if(!CKEDITOR.dtd.$removeEmpty[r.nodeName.toLowerCase()]){q=null;break}q&&(A=!!J.length)}else q=null;A&&(y?n?l=k:k&&this.setStartBefore(k):y=!0);if(q){A=q.getPrevious();if(!k&&!A){k=q;q=null;break}q=A}else k=null}k&&(k=c(k.getParent()))}A=this.endContainer;G=this.endOffset;k=q=null;n=y=!1;A.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(A.substring(G)).length?y=!0:(y=!A.getLength(),G==A.getLength()?(q=A.getNext())||(k=A.getParent()):p(A,G)&&(k=A.getParent())):(q=A.getChild(G))||(k=A);for(;k|| q;){if(k&&!q){!n&&k.equals(g)&&(n=!0);if(e?k.isBlockBoundary():!h.contains(k))break;y&&"inline"==k.getComputedStyle("display")||(y=!1,n?u=k:k&&this.setEndAfter(k));q=k.getNext()}for(;q;){A=!1;if(q.type==CKEDITOR.NODE_TEXT)J=q.getText(),p(q,0)||(q=null),A=/^[\s\ufeff]/.test(J);else if(q.type==CKEDITOR.NODE_ELEMENT){if((0=e.getLength()?d.setStartAfter(e):(d.setStartBefore(e),l=0):d.setStartBefore(e));p&&p.type==CKEDITOR.NODE_TEXT&&(h?h>=p.getLength()?d.setEndAfter(p): (d.setEndAfter(p),u=0):d.setEndBefore(p));var d=new CKEDITOR.dom.walker(d),k=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var q;d.guard=function(b,d){if(k(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(q)||!1===c&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT|| (q=b);return!0};l&&(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);u&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!l&&!u)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&& this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset= c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(), a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b, 0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var e=d.getBogus();e&&e.remove(); d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,p=d.block,g=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),p=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),p||(p=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=p&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(p)&& (d?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(p,CKEDITOR.POSITION_AFTER_END),p=null):c?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(p=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:p,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:g}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END); var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||d.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block|| d.blockLimit,g;e&&!e.equals(d.root)&&!e.getFirst(a(e));)g=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=g;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START: CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,c)),l.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c); a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),l.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone(); d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")|| "true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&l.test(a.getText())?this.moveToPosition(a, CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a), !0;var d=a,e=c,p=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(p=d[b?"getLast":"getFirst"](r));e||p||(p=d[b?"getPrevious":"getNext"](r));a=p}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,e,p,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,g[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(p=e.type==CKEDITOR.NODE_ELEMENT)&& e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&p&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,g[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a= this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a= this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:e(),getPreviousEditableNode:e(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView(); d&&(e.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],p,g,h,l;if(c&&c.find)for(g=c.find(a),p=0;parguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,e,g){a:{null==g&&(g=d(e));for(var h;h=g.shift();)if(h.getDtd().p){g={element:h,remaining:g};break a}g=null}if(!g)return 0;if((h=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&!h.check(c))return b(a, c,e,g.remaining);c=new CKEDITOR.dom.range(g.element);c.selectNodeContents(g.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:g.element,container:e,remaining:g.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,g=CKEDITOR.dom.walker.bookmark(!1,!0),h=CKEDITOR.dom.walker.whitespaces(!0), l=function(a){return g(a)&&h(a)},m={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,h,t,z,x;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable= null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var p=this.range.clone();h=p.startPath();var w=p.endPath(),H=!p.collapsed&&c(p,h.block),v=!p.collapsed&&c(p,w.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);H&&p.setStartAt(h.block,CKEDITOR.POSITION_BEFORE_END);v&&p.setEndAt(w.block,CKEDITOR.POSITION_AFTER_START);h=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&!h||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS); p.collapsed||(h=new CKEDITOR.dom.walker(p.clone()),w=CKEDITOR.dom.walker.bookmark(!0,!0),h.evaluator=w,this._.nextNode=h.next(),h=new CKEDITOR.dom.walker(p.clone()),h.evaluator=w,h=h.previous(),this._.lastNode=h.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(w=this.range.clone(),w.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),w.checkEndOfBlock()&& (w=new CKEDITOR.dom.elementPath(w.endContainer,w.root),this._.lastNode=(w.block||w.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(h)),p=null);this._.started=1;h=p}w=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;w;){var H=0,v=w.hasAscendant("pre"),u=w.type!=CKEDITOR.NODE_ELEMENT,k=0;if(u)w.type==CKEDITOR.NODE_TEXT&&e.test(w.getText())&&(u=0);else{var q=w.getName(); if(CKEDITOR.dtd.$block[q]&&"false"==w.getAttribute("contenteditable")){d=w;b(this,a,d);break}else if(w.isBlockBoundary(this.forceBrBreak&&!v&&{br:1})){if("br"==q)u=1;else if(!h&&!w.getChildCount()&&"hr"!=q){d=w;t=w.equals(p);break}h&&(h.setEndAt(w,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=w));H=1}else{if(w.getFirst()){h||(h=this.range.clone(),h.setStartAt(w,CKEDITOR.POSITION_BEFORE_START));w=w.getFirst();continue}u=1}}u&&!h&&(h=this.range.clone(),h.setStartAt(w,CKEDITOR.POSITION_BEFORE_START)); t=(!H||u)&&w.equals(p);if(h&&!H)for(;!w.getNext(l)&&!t;){q=w.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!v&&{br:1})){H=1;u=0;t||q.equals(p);h.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}w=q;u=1;t=w.equals(p);k=1}u&&h.setEndAt(w,CKEDITOR.POSITION_AFTER_END);w=this._getNextSourceNode(w,k,p);if((t=!w)||H&&h)break}if(!d){if(!h)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(h.startContainer,h.root);w=d.blockLimit;H={div:1,th:1,td:1}; d=d.block;!d&&w&&!this.enforceRealBlocks&&H[w.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!w.equals(h.root)?d=w:!d||this.enforceRealBlocks&&d.is(m)?(d=this.range.document.createElement(a),h.extractContents().appendTo(d),d.trim(),h.insertNode(d),z=x=!0):"li"!=d.getName()?h.checkStartOfBlock()&&h.checkEndOfBlock()||(d=d.clone(!1),h.extractContents().appendTo(d),d.trim(),x=h.splitBlock(),z=!x.wasStartOfBlock,x=!x.wasEndOfBlock,h.insertNode(d)):t||(this._.nextNode=d.equals(p)?null:this._getNextSourceNode(h.getBoundaryNodes().endNode, 1,p))}z&&(z=d.getPrevious())&&z.type==CKEDITOR.NODE_ELEMENT&&("br"==z.getName()?z.remove():z.getLast()&&"br"==z.getLast().$.nodeName.toLowerCase()&&z.getLast().remove());x&&(z=d.getLast())&&z.type==CKEDITOR.NODE_ELEMENT&&"br"==z.getName()&&(!CKEDITOR.env.needsBrFiller||z.getPrevious(g)||z.getNext(g))&&z.remove();this._.nextNode||(this._.nextNode=t||d.equals(p)||!p?null:this._getNextSourceNode(d,1,p));return d},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(e))}var e= this.range.root;for(a=a.getNextSourceNode(b,null,d);!g(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==d.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh", {editor:a,path:b})?!0:d.refresh&&!1!==d.refresh.apply(this,arguments)};var b;this.checkAllowed=function(c){return c||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF? this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; (function(){function a(a,b,c,d,e){var k,q;a=[];for(k in b){q=b[k];q="boolean"==typeof q?{}:"function"==typeof q?{match:q}:C(q);"$"!=k.charAt(0)&&(q.elements=k);c&&(q.featureName=c.toLowerCase());var n=q;n.elements=h(n.elements,/\s+/)||null;n.propertiesOnly=n.propertiesOnly||!0===n.elements;var f=/\s*,\s*/,p=void 0;for(p in P){n[p]=h(n[p],f)||null;var E=n,g=O[p],u=h(n[O[p]],f),y=n[p],B=[],A=!0,K=void 0;u?A=!1:u={};for(K in y)"!"==K.charAt(0)&&(K=K.slice(1),B.push(K),u[K]=!0,A=!1);for(;K=B.pop();)y[K]= y["!"+K],delete y["!"+K];E[g]=(A?!1:u)||null}n.match=n.match||null;d.push(q);a.push(q)}b=e.elements;e=e.generic;var G;c=0;for(d=a.length;c=--l&&(g&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),f(b))},t=function(b,c){a[b]=1;var e=d[b];delete d[b];for(var f=0;f=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,t(b,!0)}:(f.$.onload=function(){setTimeout(function(){t(b,!0)},0)},f.$.onerror=function(){t(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};g&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var x=0;x]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}; (function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,e,g=0,h;c=this._.htmlPartsRegex.exec(b);){e=c.index;if(e>g)if(g=b.substring(g,e),h)h.push(g);else this.onText(g); g=this._.htmlPartsRegex.lastIndex;if(e=c[1])if(e=e.toLowerCase(),h&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(h.join("")),h=null),!h){this.onTagClose(e);continue}if(h)h.push(c[0]);else if(e=c[3]){if(e=e.toLowerCase(),!/="/.test(e)){var l={},m,r=c[4];c=!!c[5];if(r)for(;m=a.exec(r);){var f=m[1].toLowerCase();m=m[2]||m[3]||m[4]||"";l[f]=!m&&d[f]?f:CKEDITOR.tools.htmlDecodeAttr(m)}this.onTagOpen(e,l,c);!h&&CKEDITOR.dtd.$cdata[e]&&(h=[])}}else if(e=c[2])this.onComment(e)}if(b.length>g)this.onText(b.substring(g, b.length))}}})(); CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,d){d?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,d){"string"==typeof d&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a, "--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}});"use strict"; (function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,d=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(d,1);this.parent=null},replaceWith:function(a){var d=this.parent.children,b=CKEDITOR.tools.indexOf(d,this),c=a.previous=this.previous,e=a.next=this.next;c&&(c.next=a);e&&(e.previous=a);d[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var d=a.parent.children, b=CKEDITOR.tools.indexOf(d,a),c=a.next;d.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a);d.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var d="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}}; CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,d){var b=this.value;if(!(b=a.onComment(d,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,d){d&&this.filter(d);a.comment(this.value)}});"use strict"; (function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this)))return this.remove(),!1},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})})();"use strict"; (function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}}; (function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),e={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml= function(g,h,l){function m(a){var b;if(0h;h++)if(g=d[h]){g=g.exec(a,c,this);if(!1===g)return null;if(g&&g!=c)return this.onNode(a,g);if(c.parent&&!c.name)break}return c}, onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,d,g){return(d=this.attributesRules[d])?d.exec(a,g,c,this):g}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a, c,d){for(var g=[this.findIndex(c),0],h=0,l=a.length;h/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function D(a){return a.replace(P,function(a,b){return decodeURIComponent(b)})}function t(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function(a){return"\x3c!--"+H+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function z(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function x(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function p(a,b){var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore= {id:1}),k=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/|$)/gi,//gi,//gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-1)+"--\x3e"});for(var n=0;n]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"\x3c"+c+d+"\x3e"+x(z(e),b)+"\x3c/"+c+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c, e,k=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(q);c.addRules(n,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});e.addRules(y);e.addRules(A,{applyToAll:!0});e.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,e,c=p(c,b),c=f(c,Q),c=r(c),c=f(c,Z),c=c.replace(O,"$1cke:$2"),c=c.replace(I,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||b.editable().getName();var k;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",k=1);e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");k&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(B,"$1$2");c=D(c);c=z(c);e=!1===a.fixForBody?!1:
d(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,e);e&&(k=c,!k.children.length&&CKEDITOR.dtd[k.name][e]&&(e=new CKEDITOR.htmlParser.element(e),k.add(e)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(k.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=t(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(k.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, !1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=k.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=z(c);c=x(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,k,n,f,q;b&&"object"==typeof b?(k=b.context,c=b.fixForBody,d=b.dontFilter,n=b.filter,f=b.enterMode,q=b.protectedWhitespaces):k=b;k||null===k||(k=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:k,fixForBody:c,dontFilter:d, filter:n||e.filter,enterMode:f||e.enterMode,protectedWhitespaces:q}).dataValue},toDataFormat:function(a,b){var c,d,e;b&&(c=b.context,d=b.filter,e=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var w=/(?: |\xa0)$/,H="{cke_protected}",v=CKEDITOR.dtd,u="caption colgroup col thead tfoot tbody".split(" "),k=CKEDITOR.tools.extend({},v.$blockLimit, v.$block),q={elements:{input:l,textarea:l}},n={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},y={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},A={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/, ""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,e=0;ed? 1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text); b.value=a.attributes["data-cke-title"]||""},input:m,textarea:m},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(A.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var J=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/^(href|src|name)$/i,Z=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, Q=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,P=/([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,B=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict"; CKEDITOR.htmlParser.element=function(a,d){this.name=a;this.attributes=d||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,e){"font-family"==c&&(e=e.replace(/["']/g,""));d[c.toLowerCase()]=e});return{rules:d,populate:function(a){var c=this.toString();c&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c)},toString:function(){var a=[],c; for(c in d)d[c]&&a.push(c,":",d[c],";");return a.join("")}}}; (function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return ab?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,h,l;b=d.getFilterContext(b);if(b.off)return!0; if(!d.parent)a.onRoot(b,d);for(;;){h=d.name;if(!(l=a.onElementName(b,h)))return this.remove(),!1;d.name=l;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==h)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}h=d.attributes;var m,r;for(m in h){for(l=h[m];;)if(r=a.onAttributeName(b,m))if(r!=m)delete h[m],m=r;else break;else{delete h[m];break}r&&(!1===(l=a.onAttribute(b,d,r,l))?delete h[r]: h[r]=l)}d.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var g=this.name,h=[],l=this.attributes,m,r;a.openTag(g,l);for(m in l)h.push([m,l[m]]);a.sortAttributes&&h.sort(d);m=0;for(r=h.length;mCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document); a={doc:this.getDocument(),range:a.clone()};H.eol.detect(a,this);H.bogus.exclude(a);H.cell.shrink(a);a.fragment=a.range.cloneContents();H.tree.rebuild(a,this);H.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=v,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var f=this.editor.createRange(); f.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=f.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this); if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),f=0,g;if(d)for(;g=d.getItem(f++);)if(!D(g)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),t(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b= this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(x,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()}, this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO|| this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?l.$.styleSheet.cssText=h:l.setText(h)):(h=e.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),n.setCustomData("stylesheet",h),h.data("cke-temp",1))}n=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref", n+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var J={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in J){b=a.getSelection();var e,k=b.getRanges()[0],n=k.startPath(),q,h,y,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e= b.getSelectedElement())||(e=g(b))?(a.fire("saveSnapshot"),k.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),k.select(),a.fire("saveSnapshot"),d=1):k.collapsed&&((q=n.block)&&(y=q[c?"getPrevious":"getNext"](f))&&y.type==CKEDITOR.NODE_ELEMENT&&y.is("table")&&k[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),k[c?"checkEndOfBlock":"checkStartOfBlock"]()&&q.remove(),k["moveToElementEdit"+(c?"End":"Start")](y),k.select(),a.fire("saveSnapshot"),d=1):n.blockLimit&&n.blockLimit.is("td")&& (h=n.blockLimit.getAscendant("table"))&&k.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END)&&(y=h[c?"getPrevious":"getNext"](f))?(a.fire("saveSnapshot"),k["moveToElementEdit"+(c?"End":"Start")](y),k.checkStartOfBlock()&&k.checkEndOfBlock()?y.remove():k.select(),a.fire("saveSnapshot"),d=1):(h=n.contains(["td","th","caption"]))&&k.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup", function(b){b.data.getKeystroke()in J&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr","input","textarea","select")&& !c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(x,""))){var c=a.createRange();c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this, "click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in J){var c=8==b,d=a.getSelection().getRanges()[0];b=d.startPath();if(d.collapsed)a:{var e=b.block;if(e&&d[c?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(e, !c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(c?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){a.fire("saveSnapshot");f.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))b=void 0;else{a.fire("saveSnapshot");var k;(k=(c?d:e).getBogus())&&k.remove();k=a.getSelection();f=k.createBookmarks();(c?e:d).moveChildren(c?d:e,!1);b.lastElement.mergeSiblings();r(e,d,!c);k.selectBookmarks(f);b=!0}}else b=!1}else c=d, k=b.block,d=c.endPath().block,k&&d&&!k.equals(d)?(a.fire("saveSnapshot"),(e=k.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(k,!1),b.lastElement.mergeSiblings(),r(k,d,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(), 0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b= this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange", function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top": "contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");f=CKEDITOR.dom.walker.whitespaces(!0);D=CKEDITOR.dom.walker.bookmark(!1,!0);t=CKEDITOR.dom.walker.empty();z=CKEDITOR.dom.walker.bogus();x=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi; p=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,n,g,q=[],h=d.range.startContainer;e=d.range.startPath();for(var h=p[h.getName()],y=0,l=c.getChildren(),A=l.count(),J=-1,m=-1,r=0,C=e.contains(p.$list);yCKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e= d.startContainer,f=e.getAscendant("table",1),g=!1;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();f||(f=d.clone(),f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),g=!0);f||(f=e);f.is("table")?(d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),f.remove()):(f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",g)),f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",g)),(e=f.getBogus())&&e.remove(),d.moveToPosition(f,g?CKEDITOR.POSITION_AFTER_START: CKEDITOR.POSITION_BEFORE_END))}}();H={eol:{detect:function(a,b){var c=a.range,d=c.clone(),e=c.clone(),f=new CKEDITOR.dom.elementPath(c.startContainer,b),g=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);e.collapse();f.block&&d.checkBoundaryOfElement(f.block,CKEDITOR.END)&&(c.setStartAfter(f.block),a.prependEolBr=1);g.block&&e.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(c.setEndBefore(g.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c), a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!z(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer, b),g;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1,table:1})){var h=e.contains("table").getParent();g=function(a){return!a.equals(h)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(f=f.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!f.equals(c))){var l=e.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(l)}}g||(g=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,g)},rebuildFragment:function(a, b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e),a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};v=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var f;f=e.getNext();)f.insertAfter(d),d= f;t(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),f=d.endPath(),k=e.contains(CKEDITOR.dtd.$list),g=f.contains(CKEDITOR.dtd.$list);a.mergeList=k&&g&&k.getParent().equals(g.getParent())&&!k.equals(g);a.mergeListItems=e.block&&f.block&&e.block.is(CKEDITOR.dtd.$listItem)&&f.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(), d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var h=f.contains(CKEDITOR.dtd.$list),q=g.contains(CKEDITOR.dtd.$list);h.equals(q)||(q.moveChildren(h),q.remove())}a.mergeListItems&&(f=f.contains(CKEDITOR.dtd.$listItem),g=g.contains(CKEDITOR.dtd.$listItem), f.equals(g)||b(g,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(e,c),f=f.block,g=g.block; f&&g&&!f.equals(g)&&b(g,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=[],f,k=new CKEDITOR.dom.walker(c),g=c.startPath().contains(d),n=c.endPath().contains(d),h={};k.guard=function(a,k){if(a.type==CKEDITOR.NODE_ELEMENT){var q="visited_"+(k?"out":"in");if(a.getCustomData(q))return;CKEDITOR.dom.element.setMarker(h,a,q,1)}if(k&&g&&a.equals(g))f=c.clone(),f.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e.push(f);else if(!k&&n&&a.equals(n))f=c.clone(),f.setStartAt(n,CKEDITOR.POSITION_AFTER_START), e.push(f);else{if(q=!k)q=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!g||b(a,g))&&(!n||b(a,n));q&&(f=c.clone(),f.selectNodeContents(a),e.push(f))}};k.lastForward();CKEDITOR.dom.element.clearAllMarkers(h);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c), e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(1f&&e&&e.intersectsNode(c.$)){var g=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}]; d.anchorNode==c.$&&d.anchorOffset>f&&(g[0].offset-=f);d.focusNode==c.$&&d.focusOffset>f&&(g[1].offset-=f)}}c.setText(l(c.getText(),1));g&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(g[1].node,g[1].offset))}}function l(a,b){return b?a.replace(x,function(a,b){return b?" ":""}):a.replace(z,"")}function m(a,b){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+ (CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e'+(b||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),e=a.createRange(),f=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(c,CKEDITOR.POSITION_AFTER_START);e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([e]);f.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function r(a){var b= {37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];1==e.length&&f.collapsed&&(d=f[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),c.data.preventDefault(),c.cancel())}}}function f(a){for(var b=0;b=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&& d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(d),e.collapsed||a.splice(b+1,0,e));return!0}return!1};d.next()}}return a}var D="function"!=typeof window.getSelection,t=1,z=CKEDITOR.tools.repeat("​",7),x=new RegExp(z+"( )?","g"),p,w,H=CKEDITOR.dom.walker.invisible(1),v=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]); return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;(e=d.moveToClosestEditablePosition(b.selected,a))||(e=d.moveToClosestEditablePosition(b.selected,!a));e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();e||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d]));c.fire("saveSnapshot");return!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a= e.getSelection();a&&a.removeAllRanges()}var e=b.editor;e.on("contentDom",function(){function b(){B=new CKEDITOR.dom.selection(e.getSelection());B.lock()}function c(){k.removeListener("mouseup",c);l.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument==f.$&&b.select()}var f=e.document,k=CKEDITOR.document,g=e.editable(),q=f.getBody(),l=f.getDocumentElement(),m=g.isInline(),p,B;CKEDITOR.env.gecko&&g.attachListener(g,"focus", function(a){a.removeListener();0!==p&&(a=e.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=e.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){p&&CKEDITOR.env.webkit&&(p=e._.previousActive&&e._.previousActive.equals(f.getActive()))&&null!=e._.previousScrollTop&&e._.previousScrollTop!=g.$.scrollTop&&(g.$.scrollTop=e._.previousScrollTop);e.unlockSelection(p);p=0},null,null,-1);g.attachListener(g, "mousedown",function(){p=0});if(CKEDITOR.env.ie||m)D?g.attachListener(g,"beforedeactivate",b,null,null,-1):g.attachListener(e,"selectionCheck",b,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){e.lockSelection(B);p=1},null,null,-1),g.attachListener(g,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!m){var I;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=e.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(I=e.window.getScrollPosition()))}); g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&I&&(e.document.$.documentElement.scrollLeft=I.x,e.document.$.documentElement.scrollTop=I.y);I=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var E,K;l.on("mousedown",function(a){function b(a){a=a.data.$;if(E){var c=q.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}E.setEndPoint(0>K.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);E.select()}}function c(){l.removeListener("mousemove", b);k.removeListener("mouseup",c);l.removeListener("mouseup",c);E.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)l.on("mousedown",function(a){a.data.getTarget().is("html")&&(k.on("mouseup",c),l.on("mouseup",c))})}}g.attachListener(g,"selectionchange",a, e);g.attachListener(g,"keyup",d,e);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var F;g.attachListener(g,"mousedown",function(){F=1});g.attachListener(f.getDocumentElement(),"mouseup",function(){F&&d.call(e);F=0})}else g.attachListener(CKEDITOR.env.ie?g:f.getDocumentElement(),"mouseup",d,e);CKEDITOR.env.webkit&&g.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h(g)}}, null,null,-1);g.attachListener(g,"keydown",r(e),null,null,-1)});e.on("setData",function(){e.unlockSelection();CKEDITOR.env.webkit&&c()});e.on("contentDomUnload",function(){e.unlockSelection()});if(CKEDITOR.env.ie9Compat)e.on("beforeDestroy",c,null,null,9);e.on("dataReady",function(){delete e._.fakeSelection;delete e._.hiddenSelectionContainer;e.selectionChange(1)});e.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=e.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&& (b.remove(),CKEDITOR.env.gecko&&(a=e.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);e.on("key",function(a){if("wysiwyg"==e.mode){var b=e.getSelection();if(b.isFake){var c=v[a.data.keyCode];if(c)return c({editor:e,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar"); c&&(c.getCustomData("ready")?h(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){h(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=l(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=l(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:d).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"== this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath}; CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element; this.rev=b?b.rev:t++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(f){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d|| d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var u={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};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:l, _createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:z});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=D?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:D?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&& (b=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&u[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=D?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()} var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,g,k=b.duplicate(),h=0,l=e.length-1,B=-1,n,m;h<=l;)if(B=Math.floor((h+l)/2),f=e[B],k.moveToElementText(f),n=k.compareEndPoints("StartToStart",b),0n)h=B+1;else return{container:d,offset:a(f)};if(-1==B||B==e.length-1&&0>n){k.moveToElementText(d);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!k)return f= e[e.length-1],f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length};for(d=e.length;0]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g, " ");g=g.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(g);b=e}else g?b=t(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(Q))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=D(k.getHtml(),/\n$/,"")+"\n\n"+D(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e": c.setHtml(d),k.remove())}else c&&w(b)}function f(a){var b=[];D(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function D(a,b,c){var d="",e="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function t(a,b){var c; 1=c?(g=e.createText(""),g.insertAfter(this)):(a=e.createText(""),a.insertAfter(g),a.remove()));return g},substring:function(a, d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}}); (function(){function a(a,c,d){var g=a.serializable,h=c[d?"endContainer":"startContainer"],l=d?"endOffset":"startOffset",m=g?c.document.getById(a.startNode):a.startNode;a=g?c.document.getById(a.endNode):a.endNode;h.equals(m.getPrevious())?(c.startOffset=c.startOffset-h.getLength()-a.getPrevious().getLength(),h=a.getNext()):h.equals(a.getPrevious())&&(c.startOffset-=h.getLength(),h=a.getNext());h.equals(m.getParent())&&c[l]++;h.equals(a.getParent())&&c[l]++;c[d?"endContainer":"startContainer"]=h;return c} CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],g;return{getNextRange:function(h){g=void 0===g?0:g+1;var l=a[g];if(l&&1b?-1:1}),e=0,g;eCKEDITOR.env.version? a[h].$.styleSheet.cssText+=g:a[h].$.innerHTML+=g}}var g={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,e){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]), g||(g=this.icons[a]));a=c||g&&g.path||"";d=d||g&&g.offset;e=e||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,d="",g="";"function"==typeof c&&(d=c(this,"editor"),g= c(this,"panel"));a=[[m,a]];e([b],d,a);e(l,g,a)}).call(this,a)}});var h="cke_ui_color",l=[],m=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);l.push(a);var d=b.getUiColor();d&&e([a],CKEDITOR.skin.chameleon(b,"panel"),[[m,d]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); (function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var d=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!d||d!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;dc;c++){var f=c,d;d=parseInt(a[c],16);d=("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2);a[f]=d}return"#"+a.join("")}}(),c=function(){var b=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");return function(c,a){return b.output({from:c, to:a})}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; return function(g,e){var a=g.uiColor,a={id:"."+g.id,defaultBorder:b(a,-.1),defaultGradient:c(b(a,.9),a),lightGradient:c(b(a,1),b(a,.7)),mediumGradient:c(b(a,.8),b(a,.5)),ckeButtonOn:c(b(a,.6),b(a,.7)),ckeResizer:b(a,-.4),ckeToolbarSeparator:b(a,.5),ckeColorauto:b(a,.8),dialogBody:b(a,.7),dialogTabSelected:c("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-.6),elementsPathBg:a,menubuttonIcon:b(a,.5),menubuttonIconHover:b(a,.3)};return f[e].output(a).replace(/\[/g,"{").replace(/\]/g, "}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(c){var e=0,d=function(g,d,b,a){if(a){a=new CKEDITOR.style(a);var f=h[b];f.unshift(a);c.attachStyleStateChange(a,function(a){!c.readOnly&&c.getCommand(b).setState(a)});c.addCommand(b,new CKEDITOR.styleCommand(a,{contentForms:f}));c.ui.addButton&&c.ui.addButton(g,{label:d,command:b,toolbar:"basicstyles,"+(e+=10)})}},h={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"== a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},b=c.config,a=c.lang.basicstyles;d("Bold",a.bold,"bold",b.coreStyles_bold);d("Italic",a.italic,"italic",b.coreStyles_italic);d("Underline",a.underline,"underline",b.coreStyles_underline);d("Strike",a.strike,"strike",b.coreStyles_strike);d("Subscript",a.subscript, "subscript",b.coreStyles_subscript);d("Superscript",a.superscript,"superscript",b.coreStyles_superscript);c.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"}; CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){var m={exec:function(g){var a=g.getCommand("blockquote").state,k=g.getSelection(),c=k&&k.getRanges()[0];if(c){var h=k.createBookmarks();if(CKEDITOR.env.ie){var e=h[0].startNode,b=h[0].endNode,d;if(e&&"blockquote"==e.getParent().getName())for(d=e;d=d.getNext();)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){e.move(d,!0);break}if(b&&"blockquote"==b.getParent().getName())for(d=b;d=d.getPrevious();)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){b.move(d);break}}var f=c.createIterator(); f.enlargeBr=g.config.enterMode!=CKEDITOR.ENTER_BR;if(a==CKEDITOR.TRISTATE_OFF){for(e=[];a=f.getNextParagraph();)e.push(a);1>e.length&&(a=g.document.createElement(g.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=h.shift(),c.insertNode(a),a.append(new CKEDITOR.dom.text("",g.document)),c.moveToBookmark(b),c.selectNodeContents(a),c.collapse(!0),b=c.createBookmark(),e.push(a),h.unshift(b));d=e[0].getParent();c=[];for(b=0;barguments.length)){var c=h.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+ "_label";this._.children=[];var e={role:a.role||"presentation"};a.includeLabel&&(e["aria-labelledby"]=c.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null,e,function(){var e=[],g=a.required?" cke_required":"";"horizontal"!=a.labelLayout?e.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" ',' id\x3d"'+c.labelId+'"',c.inputId?' for\x3d"'+c.inputId+'"':"",(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",a.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', a.controlStyle?' style\x3d"'+a.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,b,a),"\x3c/div\x3e"):(g={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" id\x3d"'+c.labelId+'" for\x3d"'+c.inputId+'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(a.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(a.controlStyle?' style\x3d"'+a.controlStyle+ '"':"")+"\x3e"+f.call(this,b,a)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,g,e));return e.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+a.type,id:f,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var e=this,m=!1;b.on("load",function(){e.getInputElement().on("keydown", function(a){13==a.data.getKeystroke()&&(m=!0)});e.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&m&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),m=!1);e.bidi&&w.call(e,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var b=['\x3cdiv class\x3d"cke_dialog_ui_input_',a.type,'" role\x3d"presentation"'];a.width&&b.push('style\x3d"width:'+a.width+'" ');b.push("\x3e\x3cinput ");c["aria-labelledby"]=this._.labelId;this._.required&& (c["aria-required"]=this._.required);for(var e in c)b.push(e+'\x3d"'+c[e]+'" ');b.push(" /\x3e\x3c/div\x3e");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",e={};a.validate&&(this.validate=a.validate);e.rows=a.rows||5;e.cols=a.cols||20;e["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(e.style=a.inputStyle);a.dir&&(e.dir=a.dir);if(f.bidi)b.on("load", function(){f.getInputElement().on("keyup",w)},f);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e["aria-labelledby"]=this._.labelId;this._.required&&(e["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',c,'" '],b;for(b in e)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(e[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, a,d){if(!(3>arguments.length)){var f=h.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],d=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":d};t(c);a["default"]&&(g.checked="checked");"undefined"!=typeof c.inputStyle&&(c.style=c.inputStyle); f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,e,"input",null,g);e.push(' \x3clabel id\x3d"',d,'" for\x3d"',g.id,'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(a.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.validate);var f=[],c=this;a.role="radiogroup";a.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, b,a,d,function(){for(var e=[],d=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",k=0;karguments.length)){var f=h.call(this,a);a.validate&&(this.validate=a.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],d=[],g={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_', a.type,'" role\x3d"presentation"');a.width&&e.push('style\x3d"width:'+a.width+'" ');e.push("\x3e");void 0!==a.size&&(g.size=a.size);void 0!==a.multiple&&(g.multiple=a.multiple);t(c);for(var k=0,l;karguments.length)){void 0===a["default"]&&(a["default"]="");var f=CKEDITOR.tools.extend(h.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', f.frameId,'" title\x3d"',a.label,'" src\x3d"javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"\x3e\x3c/iframe\x3e');return b.join("")})}},fileButton:function(b,a,d){var f=this;if(!(3>arguments.length)){h.call(this,a);a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= a["for"];e&&!1===e.call(this,c)||(b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var m=[],g=c.html;"\x3c"!=g.charAt(0)&&(g="\x3cspan\x3e"+g+"\x3c/span\x3e");var k=c.focus;if(k){var l=this.focus;this.focus=function(){("function"== typeof k?k:l).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,c,m,"span",null,null,"");m=m.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",m[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a=[];e&&a.push("\x3clegend"+ (c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+e+"\x3c/legend\x3e");for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b= CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:r},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var a=b&&b.charAt(0);(a="‪"==a?"ltr":"‫"==a?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(a)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var a=this.getDirectionMarker();a&&(b=("ltr"==a?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var a=this.getInputElement();b?a.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&a.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},q,!0);CKEDITOR.ui.dialog.textarea.prototype= new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);return this},remove:function(b){this.getInputElement().$.remove(b); return this},clear:function(){for(var b=this.getInputElement().$;0b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function A(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;ck.width-c.width-g?k.width-c.width+("rtl"==f.lang.dir?0:h[1]):d.x,d.y+h[0]k.height-c.height-g?k.height-c.height+h[2]:d.y,1);b.data.preventDefault()} function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var e=null,d=null,f=a.getParentEditor(),g=f.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(g){e={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup", c);d=a.getPosition();if(CKEDITOR.env.ie6Compat){var f=u.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",c)}g.data.preventDefault()},a)}function Z(a){function b(b){var c="rtl"==f.lang.dir,n=k.width,q=k.height,G=n+(b.data.$.screenX-m.x)*(c?-1:1)*(a._.moved?1:2),H=q+(b.data.$.screenY-m.y)*(a._.moved?1:2),B=a._.element.getFirst(),B=c&&B.getComputedStyle("right"),C=a.getPosition();C.y+H>p.height&&(H=p.height-C.y);(c?B:C.x)+G>p.width&&(G=p.width-(c?B:C.x));if(d==CKEDITOR.DIALOG_RESIZE_WIDTH|| d==CKEDITOR.DIALOG_RESIZE_BOTH)n=Math.max(e.minWidth||0,G-g);if(d==CKEDITOR.DIALOG_RESIZE_HEIGHT||d==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(e.minHeight||0,H-h);a.resize(n,q);a._.moved||a.layout();b.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);q&&(q.remove(),q=null);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var e=a.definition,d=e.resizable; if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var f=a.getParentEditor(),g,h,p,m,k,q,n=CKEDITOR.tools.addFunction(function(d){k=a.getSize();var e=a.parts.contents;e.$.getElementsByTagName("iframe").length&&(q=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),e.append(q));h=k.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=k.width-a.parts.contents.getSize("width", 1);m={x:d.screenX,y:d.screenY};p=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(e=u.getChild(0).getFrameDocument(),e.on("mousemove",b),e.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+ b+" cke_resizer_"+f.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(f.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event )"\x3e'+("ltr"==f.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});f.on("destroy",function(){CKEDITOR.tools.removeFunction(n)})}}function I(a){a.data.preventDefault(1)}function N(a){var b=CKEDITOR.document.getWindow(),c=a.config,e=CKEDITOR.skinName||a.config.skin,d=c.dialog_backgroundCoverColor||("moono-lisa"==e?"black":"white"),e=c.dialog_backgroundCoverOpacity, f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,e,f),g=z[c];g?g.show():(f=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",f.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'), f.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),f.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),f.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(f.join("")),g.setOpacity(void 0!==e?e:.5),g.on("keydown",I),g.on("keypress",I),g.on("keyup",I),g.appendTo(CKEDITOR.document.getBody()), z[c]=g);a.focusManager.add(g);u=g;a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};J=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var p=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){p.prevScrollHandler= window.onscroll||function(){};window.onscroll=p},0);h()}}function O(a){u&&(a.focusManager.remove(u),a=CKEDITOR.document.getWindow(),u.hide(),a.removeListener("resize",J),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),J=null)}var v=CKEDITOR.tools.cssLength,W='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+ CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; CKEDITOR.dialog=function(a,b){function c(){var a=l._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;cb.length)){var c=l._.currentFocusIndex;l._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,g=1c.height|| b.width+(0c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:e,this._.moved?this._.position.y:d)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})}, commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(ba(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide(); if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else O(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",Q);a.removeListener("keyup",R);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog; this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",e=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),d=this._.contents[a.id]={},f=e.getChild(), g=0;e=f.shift();)e.notAllowed||"hbox"==e.type||"vbox"==e.type||g++,d[e.id]=e,"function"==typeof e.getChild&&f.push.apply(f,e.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");e=CKEDITOR.env;d="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0arguments.length)){var h=(e.call?e(b):e)|| "div",p=["\x3c",h," "],m=(d&&d.call?d(b):d)||{},k=(f&&f.call?f(b):f)||{},q=(g&&g.call?g.call(this,a,b):g)||"",n=this.domId=k.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);k.id=n;var r={};b.type&&(r["cke_dialog_ui_"+b.type]=1);b.className&&(r[b.className]=1);b.disabled&&(r.cke_disabled=1);for(var l=k["class"]&&k["class"].split?k["class"].split(" "):[],n=0;nCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;t.fire("focus");c&&this.addClass(c)});b.on("blur",function(){t.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex= b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=t.focusIndex}))}},hbox:function(a,b,c,e,d){if(!(4>arguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.widths||null,h=d&&d.height||null,p,m={role:"presentation"};d&&d.align&&(m.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"hbox"},e,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(p=0;parguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.width||null,h=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');d&&d.expand&&b.push("height:100%;");b.push("width:"+v(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"', CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;earguments.length)return this._.children.concat();a.splice||(a=[a]);return 2> a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,c,e){for(var d=c.children,f,g=[],h=[],p=0;p]+data-cke-bookmark[^<]*?<\/span>/ig,"");c&&r(b,d)})}function t(){if("wysiwyg"==b.mode){var a=u("paste");b.getCommand("cut").setState(u("cut")); b.getCommand("copy").setState(u("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function u(a){if(w&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var n=CKEDITOR.plugins.clipboard,p=0,v=0,w=0;(function(){b.on("key",q);b.on("contentDom",a);b.on("selectionChange",function(b){w= b.data.selection.getRanges()[0].checkReadOnly();t()});b.contextMenu&&b.contextMenu.addListener(function(b,a){w=a.getRanges()[0].checkReadOnly();return{cut:u("cut"),copy:u("copy"),paste:u("paste")}})})();(function(){function a(d,c,e,f,q){var g=b.lang.clipboard[c];b.addCommand(c,e);b.ui.addButton&&b.ui.addButton(d,{label:g,command:c,toolbar:"clipboard,"+f});b.addMenuItems&&b.addMenuItem(c,{label:g,command:c,group:"clipboard",order:q})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste", "paste",d(),30,8)})();b.getClipboardData=function(a,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();k=!0;d({type:g,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function f(){this.customTitle=a&&a.title}var q=!1,g="auto",k=!1;d||(d=a,a=null);b.on("paste",c,null,null,0);b.on("beforePaste",function(a){a.removeListener();q=!0;g=a.data.type},null,null,1E3);!1===z()&&(b.removeListener("paste",c),q&&b.fire("pasteDialog", f)?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){k||d(null)},10)})):d(null))}}function A(b){if(CKEDITOR.env.webkit){if(!b.match(/^[^<]*$/g)&&!b.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!b.match(/^([^<]|)*$/gi)&&!b.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!b.match(/^([^<]|)*$/gi))return"html"}else return"html"; return"htmlifiedtext"}function B(b,a){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}a=a.replace(/\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");a=a.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(a.match(/^[^<]$/))return a;CKEDITOR.env.webkit&&-1(
|)<\/div>)(?!$|(

(
|)<\/div>))/g,"\x3cbr\x3e").replace(/^(
(
|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"), a.match(/
(
|)<\/div>/)&&(a="\x3cp\x3e"+a.replace(/(
(
|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),a=a.replace(/<\/div>
/g,"\x3cbr\x3e"),a=a.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(a=a.replace(/^

$/,"\x3cbr\x3e")),-1){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return C(b,a)}function D(){function b(){var a= {},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var a={};return{get:function(c){return"plain-text"==c?a.plainText||(a.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=a.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),c=a.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function x(b,a,c){a=CKEDITOR.htmlParser.fragment.fromHtml(a);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(a,!0,!1, b.activeEnterMode);a.writeHtml(d);return d.getHtml()}function C(b,a){b.enterMode==CKEDITOR.ENTER_BR?a=a.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):b.enterMode==CKEDITOR.ENTER_DIV&&(a=a.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return a}function E(b){b.data.preventDefault();b.data.$.dataTransfer.dropEffect="none"}function F(b){var a=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(a,d,c){d.select();r(b,{dataTransfer:c, method:"drop"},1);c.sourceEditor.fire("saveSnapshot");c.sourceEditor.editable().extractHtmlFromRange(a);c.sourceEditor.getSelection().selectRanges([a]);c.sourceEditor.fire("saveSnapshot")}function d(d,c){d.select();r(b,{dataTransfer:c,method:"drop"},1);a.resetDragDataTransfer()}function e(a,d,c){var e={$:a.data.$,target:a.data.getTarget()};d&&(e.dragRange=d);c&&(e.dropRange=c);!1===b.fire(a.name,e)&&a.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} var f=b.editable(),h=CKEDITOR.plugins.clipboard.getDropTarget(b),l=b.ui.space("top"),p=b.ui.space("bottom");a.preventDefaultDropOnElement(l);a.preventDefaultDropOnElement(p);f.attachListener(h,"dragstart",e);f.attachListener(b,"dragstart",a.resetDragDataTransfer,a,null,1);f.attachListener(b,"dragstart",function(d){a.initDragDataTransfer(d,b)},null,null,2);f.attachListener(b,"dragstart",function(){var d=a.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(a.dragStartContainerChildCount= d?g(d.startContainer):null,a.dragEndContainerChildCount=d?g(d.endContainer):null)},null,null,100);f.attachListener(h,"dragend",e);f.attachListener(b,"dragend",a.initDragDataTransfer,a,null,1);f.attachListener(b,"dragend",a.resetDragDataTransfer,a,null,100);f.attachListener(h,"dragover",function(a){var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}); f.attachListener(h,"drop",function(d){if(!d.data.$.defaultPrevented){d.data.preventDefault();var c=d.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=a.getRangeAtDropPosition(d,b),f=a.dragRange;c&&e(d,f,c)}}},null,null,9999);f.attachListener(b,"drop",a.initDragDataTransfer,a,null,1);f.attachListener(b,"drop",function(e){if(e=e.data){var f=e.dropRange,g=e.dragRange,h=e.dataTransfer;h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){a.internalDrop(g, f,h,b)},0):h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(g,f,h):d(f,h)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(b){var a,c=D();b.config.forcePasteAsPlainText?a="plain-text":b.config.pasteFilter?a=b.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in b.config||(a="semantic-content");b.pasteFilter=c.get(a);y(b);F(b);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));b.on("paste",function(a){a.data.dataTransfer|| (a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var c=a.data.dataTransfer,g=c.getData("text/html");if(g)a.data.dataValue=g,a.data.type="html";else if(g=c.getData("text/plain"))a.data.dataValue=b.editable().transformPlainTextToHtml(g),a.data.type="text"}},null,null,1);b.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi, function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var f,h,l=new CKEDITOR.dom.element("div");for(l.setHtml(b);1==l.getChildCount()&&(f=l.getFirst())&&f.type==CKEDITOR.NODE_ELEMENT&&(f.hasClass("cke_editable")|| f.hasClass("cke_contents"));)l=h=f;h&&(b=h.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,f){return f.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+f):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,f){return f in c?(a.data.endsWithEOL=1,"\x3c/"+f+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);b.on("paste",function(a){a=a.data;var e=a.type,g=a.dataValue,f,h=b.config.clipboard_defaultContentType|| "html",l=a.dataTransfer.getTransferType(b);f="html"==e||"html"==a.preSniffing?"html":A(g);"htmlifiedtext"==f&&(g=B(b.config,g));"text"==e&&"html"==f?g=x(b,g,c.get("plain-text")):l==CKEDITOR.DATA_TRANSFER_EXTERNAL&&b.pasteFilter&&!a.dontFilter&&(g=x(b,g,b.pasteFilter));a.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);a.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==f||"html"==h?"html":"text");a.type=e;a.dataValue=g;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL}, null,null,6);b.on("paste",function(a){a=a.data;a.dataValue&&(b.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){b.fire("afterPaste")},0))},null,null,1E3);b.on("pasteDialog",function(a){setTimeout(function(){b.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||a.isInline()?a:b.document},fixSplitNodesAfterDrop:function(b,a,c,d){function e(b,c,d){var e=b;e.type==CKEDITOR.NODE_TEXT&&(e=b.getParent());if(e.equals(c)&&d!=c.getChildCount())return b= a.startContainer.getChild(a.startOffset-1),c=a.startContainer.getChild(a.startOffset),b&&b.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=b.getLength(),b.setText(b.getText()+c.getText()),c.remove(),a.setStart(b,d),a.collapse(!0)),!0}var g=a.startContainer;"number"==typeof d&&"number"==typeof c&&g.type==CKEDITOR.NODE_ELEMENT&&(e(b.startContainer,g,c)||e(b.endContainer,g,d))},isDropRangeAffectedByDragRange:function(b,a){var c=a.startContainer,d=a.endOffset;return b.endContainer.equals(c)&& b.endOffset<=d||b.startContainer.getParent().equals(c)&&b.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,a,e.dragStartContainerChildCount,e.dragEndContainerChildCount);(h=this.isDropRangeAffectedByDragRange(b,a))||(f=b.createBookmark(!1)); e=a.clone().createBookmark(!1);h&&(f=b.createBookmark(!1));b=f.startNode;a=f.endNode;h=e.startNode;a&&b.getPosition(h)&CKEDITOR.POSITION_PRECEDING&&a.getPosition(h)&CKEDITOR.POSITION_FOLLOWING&&h.insertBefore(b);b=d.createRange();b.moveToBookmark(f);g.extractHtmlFromRange(b,1);a=d.createRange();a.moveToBookmark(e);r(d,{dataTransfer:c,method:"drop",range:a},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(b,a){var c=b.data.$,d=c.clientX,e=c.clientY,g=a.getSelection(!0).getRanges()[0],f= a.createRange();if(b.data.testRange)return b.data.testRange;if(document.caretRangeFromPoint)c=a.document.$.caretRangeFromPoint(d,e),f.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),f.collapse(!0);else if(c.rangeParent)f.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8l&& !h;l++){if(!h)try{c.moveToPoint(d,e-l),h=!0}catch(p){}if(!h)try{c.moveToPoint(d,e+l),h=!0}catch(q){}}if(h){var k="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+k+'"\x3e​\x3c/span\x3e');var t=a.document.getById(k);f.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START);t.remove()}else{var u=a.document.$.elementFromPoint(d,e),n=new CKEDITOR.dom.element(u),r;if(n.equals(a.editable())||"html"==n.getName())return g&&g.startContainer&&!g.startContainer.equals(a.editable())?g:null;r=n.getClientRect(); d/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(p);this.id||(this.id="Text"==p?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=p)try{this.$.setData(p,this.id)}catch(c){}a&&(this.sourceEditor=a,this.setData("text/html",a.getSelectedHtml(1)),"Text"== p||this.getData("text/plain")||this.setData("text/plain",a.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(b){b=this._.normalizeType(b);var a=this._.data[b];if(void 0===a||null===a||""===a)try{a=this.$.getData(b)}catch(c){}if(void 0===a||null===a||""===a)a="";"text/html"==b?(a=a.replace(this._.metaRegExp,""),(b=this._.bodyRegExp.exec(a))&& b.length&&(a=b[1],a=a.replace(this._.fragmentRegExp,""))):"Text"==b&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==a.substring(0,7)&&(a="");return a},setData:function(b,a){b=this._.normalizeType(b);this._.data[b]=a;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==b||"Text"==b){"Text"==p&&"Text"==b&&(this.id=a);try{this.$.setData(b,a)}catch(c){}}},getTransferType:function(b){return this.sourceEditor?this.sourceEditor==b?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS: CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function b(b){b=a._.normalizeType(b);var c=a.getData(b);c&&(a._.data[b]=c)}if(this.$){var a=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;cCKEDITOR.env.version?f.createText("\r"):f.createElement("br"),a.deleteContents(),a.insertNode(b),CKEDITOR.env.needsBrFiller?(f.createText("").insertAfter(b),k&&(l||m.blockLimit).appendBogus(),b.getNext().$.nodeValue="",a.setStartAt(b.getNext(),CKEDITOR.POSITION_AFTER_START)): a.setStartAt(b,CKEDITOR.POSITION_AFTER_END)),a.collapse(!0),a.select(),a.scrollIntoView()):u(b,d,a,h)}}};var x=CKEDITOR.plugins.enterkey,t=x.enterBr,u=x.enterBlock,w=/^h[1-6]$/})();(function(){var b={canUndo:!1,exec:function(a){var b=a.document.createElement("hr");a.insertElement(b)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(a){a.blockless||(a.addCommand("horizontalrule",b),a.ui.addButton&&a.ui.addButton("HorizontalRule",{label:a.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})})();(function(){function m(a,b){var e,f;b.on("refresh",function(a){var b=[k],c;for(c in a.data.states)b.push(a.data.states[c]);this.setState(CKEDITOR.tools.search(b,p)?p:k)},b,null,100);b.on("exec",function(b){e=a.getSelection();f=e.createBookmarks(1);b.data||(b.data={});b.data.done=!1},b,null,0);b.on("exec",function(){a.forceNextSelectionCheck();e.selectBookmarks(f)},b,null,100)}var k=CKEDITOR.TRISTATE_DISABLED,p=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(a){var b=CKEDITOR.plugins.indent.genericDefinition; m(a,a.addCommand("indent",new b(!0)));m(a,a.addCommand("outdent",new b));a.ui.addButton&&(a.ui.addButton("Indent",{label:a.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),a.ui.addButton("Outdent",{label:a.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));a.on("dirChanged",function(b){var f=a.createRange(),l=b.data.node;f.setStartBefore(l);f.setEndAfter(l);for(var n=new CKEDITOR.dom.walker(f),c;c=n.next();)if(c.type==CKEDITOR.NODE_ELEMENT)if(!c.equals(l)&& c.getDirection())f.setStartAfter(c),n=new CKEDITOR.dom.walker(f);else{var d=a.config.indentClasses;if(d)for(var g="ltr"==b.data.dir?["_rtl",""]:["","_rtl"],h=0;h(a+=l?1:-1))return;a=Math.min(a,c.length);a=Math.max(a,0);b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.classNameRegex,""));0a)return;a=Math.max(a, 0);a=Math.ceil(a/g)*g;b.setStyle(c,a?a+(d.config.indentUnit||"px"):"");""===b.getAttribute("style")&&b.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,b,"indent_processed",1)}}function m(b,c){return"ltr"==(c||b.getComputedStyle("direction"))?"margin-left":"margin-right"}var h=CKEDITOR.dtd.$listItem,p=CKEDITOR.dtd.$list,k=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(b){function c(){a.specificDefinition.apply(this, arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:d?null:"margin-left,margin-right",classes:d||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&& (this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(d?"("+d.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var e=b.block||b.blockLimit;if(!e.is(h))var c=e.getAscendant(h),e=c&&b.contains(c)||e;e.is(h)&&(e=e.getParent());if(this.enterBr||this.getContext(b)){if(d){var c=d,e=e.$.className.match(this.classNameRegex),f=this.isIndent,c=e?f?e[1]!=c.slice(-1):!0:f;return c?n:k}return this.isIndent?n:e?CKEDITOR[0>=(parseInt(e.getStyle(m(e)),10)||0)?"TRISTATE_DISABLED": "TRISTATE_OFF"]:k}return k},exec:function(a){var b=a.getSelection(),b=b&&b.getRanges()[0],c;if(c=a.elementPath().contains(p))f.call(this,c,d);else for(b=b.createIterator(),a=a.config.enterMode,b.enforceRealBlocks=!0,b.enlargeBr=a!=CKEDITOR.ENTER_BR;c=b.getNextParagraph(a==CKEDITOR.ENTER_P?"p":"div");)c.isReadOnly()||f.call(this,c,d);return!0}}}}var a=CKEDITOR.plugins.indent,d=b.config.indentClasses;a.registerCommands(b,{indentblock:new c(b,"indentblock",!0),outdentblock:new c(b,"outdentblock")}); CKEDITOR.tools.extend(c.prototype,a.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:d?new RegExp("(?:^|\\s+)("+d.join("|")+")(?\x3d$|\\s)"):null})}})})();(function(){function w(c){function f(b){for(var e=d.startContainer,a=d.endContainer;e&&!e.getParent().equals(b);)e=e.getParent();for(;a&&!a.getParent().equals(b);)a=a.getParent();if(!e||!a)return!1;for(var g=e,e=[],k=!1;!k;)g.equals(a)&&(k=!0),e.push(g),g=g.getNext();if(1>e.length)return!1;g=b.getParents(!0);for(a=0;an;a++)k[a].indent+=g;e=CKEDITOR.plugins.list.arrayToList(k,q,null,c.config.enterMode,b.getDirection());if(!l.isIndent){var f;if((f=b.getParent())&&f.is("li"))for(var g=e.listNode.getChildren(),r=[],m,a=g.count()-1;0<=a;a--)(m=g.getItem(a))&&m.is&&m.is("li")&& r.push(m)}e&&e.listNode.replace(b);if(r&&r.length)for(a=0;af[k-1].indent+1){g=f[k-1].indent+1-f[k].indent;for(h=f[k].indent;f[k]&&f[k].indent>=h;)f[k].indent+=g,k++;k--}var d=CKEDITOR.plugins.list.arrayToList(f,e,null,b.config.enterMode,m.root.getAttribute("dir")).listNode,a,p;c(!0);c();d.replace(m.root);b.fire("contentDomInvalidated")}function B(b,m){this.name=b;this.context=this.type=m;this.allowedContent= m+" li";this.requiredContent=m}function E(b,m,e,c){for(var f,g;f=b[c?"getLast":"getFirst"](J);)(g=f.getDirection(1))!==m.getDirection(1)&&f.setAttribute("dir",g),f.remove(),e?f[c?"insertBefore":"insertAfter"](e):m.append(f,c)}function F(b){function m(e){var c=b[e?"getPrevious":"getNext"](u);c&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(b.getName())&&(E(b,c,null,!e),b.remove(),b=c)}m();m(1)}function G(b){return b.type==CKEDITOR.NODE_ELEMENT&&(b.getName()in CKEDITOR.dtd.$block||b.getName()in CKEDITOR.dtd.$listItem)&& CKEDITOR.dtd[b.getName()]["#"]}function C(b,m,e){b.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var c=e.extractContents();m.trim(!1,!0);var f=m.createBookmark(),g=new CKEDITOR.dom.elementPath(m.startContainer),k=g.block,g=g.lastElement.getAscendant("li",1)||k,h=new CKEDITOR.dom.elementPath(e.startContainer),d=h.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():h&&(k=h.getPrevious(u))&&z(k)&&k.remove();(k=c.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&& k.is("br")&&k.remove();(k=m.startContainer.getChild(m.startOffset))?c.insertBefore(k):m.startContainer.append(c);d&&(c=A(d))&&(g.contains(d)?(E(c,d.getParent(),d),c.remove()):g.append(c));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){h=e.startPath();c=h.block;if(!c)break;c.is("li")&&(g=c.getParent(),c.equals(g.getLast(u))&&c.equals(g.getFirst(u))&&(c=g));e.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c.remove()}e=e.clone();c=b.editable();e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e); e.evaluator=function(a){return u(a)&&!z(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&F(e);m.moveToBookmark(f);m.select();b.fire("saveSnapshot")}function A(b){return(b=b.getLast(u))&&b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in v?b:null}var v={ol:1,ul:1},K=CKEDITOR.dom.walker.whitespaces(),H=CKEDITOR.dom.walker.bookmark(),u=function(b){return!(K(b)||H(b))},z=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(b,m,e,c,f){if(!v[b.getName()])return[]; c||(c=0);e||(e=[]);for(var g=0,k=b.getChildCount();g=k.$.documentMode&&l.append(k.createText(" ")),l.append(a.listNode),a=a.nextIndex;else if(-1== r.indent&&!e&&g){v[g.getName()]?(l=r.element.clone(!1,!0),q!=g.getDirection(1)&&l.setAttribute("dir",q)):l=new CKEDITOR.dom.documentFragment(k);var d=g.getDirection(1)!=q,y=r.element,D=y.getAttribute("class"),z=y.getAttribute("style"),A=l.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(c!=CKEDITOR.ENTER_BR||d||z||D),w,B=r.contents.length,x;for(g=0;gh.length)){l= h[h.length-1].getNext();n=c.createElement(this.type);d.push(n);for(t=d=void 0;h.length;)d=h.shift(),t=c.createElement("li"),r=d,r.is("pre")||L.test(r.getName())||"false"==r.getAttribute("contenteditable")?d.appendTo(t):(d.copyAttributes(t),a&&d.getDirection()&&(t.removeStyle("direction"),t.removeAttribute("dir")),d.moveChildren(t),d.remove()),t.appendTo(n);a&&p&&n.setAttribute("dir",a);l?n.insertBefore(l):n.appendTo(g)}}else this.state==CKEDITOR.TRISTATE_ON&&v[a.root.getName()]&&I.call(this,b,a,k); for(n=0;n|<\/font>)/, e={dataValue:h};if(h&&(b||g.test(h))&&(!1!==a.fire("pasteFromWord",e)||b)){c.dontFilter=!0;var k=l(a,f,function(){if(k)a.fire("paste",c);else if(!a.config.pasteFromWordPromptCleanup||b||confirm(a.lang.pastefromword.confirmCleanup))e.dataValue=CKEDITOR.cleanWord(e.dataValue,a),a.fire("afterPasteFromWord",e),c.dataValue=e.dataValue;b=0});k&&d.cancel()}},null,null,3)}})})();CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}); CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var h=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),e=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),f=CKEDITOR.plugins.removeformat.filter,m=a.getSelection().getRanges(),n=m.createIterator(),p=function(a){return a.type==CKEDITOR.NODE_ELEMENT},c;c=n.getNextRange();){c.collapsed||c.enlarge(CKEDITOR.ENLARGE_ELEMENT); var l=c.createBookmark(),b=l.startNode,d=l.endNode,k=function(b){for(var c=a.elementPath(b),e=c.elements,d=1,g;(g=e[d])&&!g.equals(c.block)&&!g.equals(c.blockLimit);d++)h.test(g.getName())&&f(a,g)&&b.breakParent(g)};k(b);if(d)for(k(d),b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);b&&!b.equals(d);)if(b.isReadOnly()){if(b.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;b=b.getNext(p)}else k=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==b.getName()&&b.data("cke-realelement")||!f(a,b)||(h.test(b.getName())? b.remove(1):(b.removeAttributes(e),a.fire("removeFormatCleanup",b))),b=k;c.moveToBookmark(l)}a.forceNextSelectionCheck();a.getSelection().selectRanges(m)}}},filter:function(a,h){for(var e=a._.removeFormatFilters||[],f=0;f=g)for(b=this.getNextSourceNode(k,CKEDITOR.NODE_ELEMENT);b;){if(b.isVisible()&&0===b.getTabIndex()){d=b;break}b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(b=this.getDocument().getBody().getFirst();b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!c&&b.equals(this)){if(c=!0,k){if(!(b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else c&&!this.contains(b)&& (f=1);if(b.isVisible()&&!(0>(a=b.getTabIndex()))){if(f&&a==g){d=b;break}a>g&&(!d||!e||a(b=a.getTabIndex())))if(0>=g){if(f&&0===b){d=a;break}b>e&&(d=a,e=b)}else{if(f&&b==g){d=a;break}be)&&(d=a,e=b)}}d&&d.focus()};(function(){var g=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],n={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function b(a){d.enabled&&!1!==a.data.command.canUndo&&d.save()}function c(){d.enabled=a.readOnly?!1:"wysiwyg"==a.mode;d.onChange()}var d=a.undoManager=new e(a),l=d.editingHandler=new k(d),f=a.addCommand("undo",{exec:function(){d.undo()&&(a.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),h=a.addCommand("redo",{exec:function(){d.redo()&& (a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[g[0],"undo"],[g[1],"redo"],[g[2],"redo"]]);d.onChange=function(){f.setState(d.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h.setState(d.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",b);a.on("afterCommandExec",b);a.on("saveSnapshot",function(a){d.save(a.data&&a.data.contentOnly)});a.on("contentDom",l.attachListeners,l);a.on("instanceReady",function(){a.fire("saveSnapshot")}); a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&d.save(!0)});a.on("mode",c);a.on("readOnly",c);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){d.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){d.currentImage&&d.update()});a.on("lockSnapshot",function(a){a=a.data;d.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot", d.unlock,d)}});CKEDITOR.plugins.undo={};var e=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this.editor=a;this.reset()};e.prototype={type:function(a,b){var c=e.getKeyGroup(a),d=this.strokesRecorded[c]+1;b=b||d>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());b?(d=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]= d;this.previousKeyGroup=c},keyGroupChanged:function(a){return e.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,c){var d=this.editor;if(this.locked|| "ready"!=d.status||"wysiwyg"!=d.mode)return!1;var e=d.editable();if(!e||"ready"!=e.status)return!1;e=this.snapshots;b||(b=new f(d));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==c&&d.fire("change");e.splice(this.index+1,e.length-this.index-1);e.length==this.limit&&e.shift();this.index=e.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor, c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;if(c)if(a)for(d=this.index-1;0<=d;d--){if(a=b[d],!c.equalsContent(a))return a.index= d,a}else for(d=this.index+1;d=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var b=this.undoManager; a=a.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(e.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new f(b.editor,!0))))if(0=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);b.attachListener(a,"resize",c);b.attachListener(a,"mode",g);a.on("destroy",g);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({}, t,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},q,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},q,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function l(a){var d;if(d=a&&a.type==CKEDITOR.NODE_ELEMENT)d=!(r[a.getComputedStyle("float")]||r[a.getAttribute("align")]);return d&& !u[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;m.prototype={start:function(a){var d=this,b=this.editor,c=this.doc,e,g,f,h,k=CKEDITOR.tools.eventsBuffer(50,function(){b.readOnly||"wysiwyg"!=b.mode||(d.relations={},(g=c.$.elementFromPoint(f,h))&&g.nodeType&&(e=new CKEDITOR.dom.element(g),d.traverseSearch(e),isNaN(f+h)||d.pixelSearch(e,f,h),a&&a(d.relations,f,h)))});this.listener=this.editable.attachListener(this.target, "mousemove",function(a){f=a.data.$.clientX;h=a.data.$.clientY;k.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){k.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(d){var b=this.editor.createRange();b.moveToPosition(this.relations[d.uid].element, a[d.type]);return b}}(),store:function(){function a(a,b,c){var e=a.getUniqueId();e in c?c[e].type|=b:c[e]={element:a,type:b}}return function(d,b){var c;b&CKEDITOR.LINEUTILS_AFTER&&l(c=d.getNext())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),b^=CKEDITOR.LINEUTILS_AFTER);b&CKEDITOR.LINEUTILS_INSIDE&&l(c=d.getFirst())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),b^=CKEDITOR.LINEUTILS_INSIDE);a(d,b,this.relations)}}(),traverseSearch:function(a){var d,b,c;do if(c=a.$["data-cke-expando"], !(c&&c in this.relations)){if(a.equals(this.editable))break;if(l(a))for(d in this.lookups)(b=this.lookups[d](a))&&this.store(a,b)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(a,c,e,g,f){for(var h=0,k;f(e);){e+=g;if(25==++h)break;if(k=this.doc.$.elementFromPoint(c,e))if(k==a)h=0;else if(d(a,k)&&(h=0,l(k=new CKEDITOR.dom.element(k))))return k}}var d=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,c){return a.contains(c)}: function(a,c){return!!(a.compareDocumentPosition(c)&16)};return function(b,c,d){var g=this.win.getViewPaneSize().height,f=a.call(this,b.$,c,d,-1,function(a){return 0this.rect.bottom)return!1;this.inline? e.left=b.elementRect.left-this.rect.relativeX:(0 d});0>e&&(e=a._.upcasts.length);a._.upcasts.splice(e,0,[b,c,d])}var d=b.upcast,e=b.upcastPriority||10;if(d)if("string"==typeof d)for(d=d.split(",");d.length;)c(b.upcasts[d.pop()],b.name,e);else c(d,b.name,e)}function t(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function H(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,h;if(b){for(d in c)c[d].isReady()&& !b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var l=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=l.count();dCKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,h,g;a.editor.fire("lockSnapshot");for(f&& (h=a.focused)&&t(a,h);h=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,h),1),h.isInited()&&(g=h.editor.checkDirty(),h.setSelected(!1),!g&&h.editor.resetDirty());f&&e&&(g=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!g&&a.editor.resetDirty());for(;h=c.pop();)b.push(h),h.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function A(a,b,c){var d=0;b=B(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f], d=1);d&&a.setData("classes",e)}}function C(a){a.cancel()}function y(a,b){var c=a.editor,d=c.document;if(!d.getById("cke_copybin")){var e=c.blockless||CKEDITOR.env.ie?"span":"div",f=d.createElement(e),h=d.createElement(e),e=CKEDITOR.env.ie&&9>CKEDITOR.env.version;h.setAttributes({id:"cke_copybin","data-cke-temp":"1"});f.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});f.setStyle("ltr"==c.config.contentsLangDirection?"left":"right","-5000px");var g=c.createRange();g.setStartBefore(a.wrapper); g.setEndAfter(a.wrapper);f.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+c.editable().getHtmlFromRange(g).getHtml()+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("saveSnapshot");c.fire("lockSnapshot");h.append(f);c.editable().append(h);var k=c.on("selectionChange",C,null,null,0),m=a.repository.on("checkSelection",C,null,null,0);if(e)var n=d.getDocumentElement().$,p=n.scrollTop;g=c.createRange();g.selectNodeContents(f);g.select();e&&(n.scrollTop=p);setTimeout(function(){b|| a.focus();h.remove();k.removeListener();m.removeListener();c.fire("unlockSnapshot");b&&(a.repository.del(a),c.fire("saveSnapshot"))},100)}}function B(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function D(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function E(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(), this.editor.selectionChange(1))}function V(a){var b=null;a.on("data",function(){var a=this.data.classes,d;if(b!=a){for(d in b)a&&a[d]||this.removeClass(d);for(d in a)this.addClass(d);b=a}})}function W(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function X(a){if(a.draggable){var b=a.editor, c=a.wrapper.getLast(g.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png)"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move, height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",Y,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function Y(a){function b(){var b;for(q.reset();b= l.pop();)b.removeListener();var c=k;b=a.sender;var d=this.repository.finder,e=this.repository.liner,f=this.editor,g=this.editor.editable();CKEDITOR.tools.isEmpty(e.visible)||(c=d.getRange(c[0]),this.focus(),f.fire("drop",{dropRange:c,target:c.startContainer}));g.removeClass("cke_widget_dragging");e.hideVisible();f.fire("dragend",{target:b})}var c=this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),l=[],k=[],m,n;this.repository._.draggedWidget=this; var p=c.greedySearch(),q=CKEDITOR.tools.eventsBuffer(50,function(){m=d.locate(p);k=d.sort(n,1);k.length&&(e.prepare(p,m),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");l.push(g.on("mousemove",function(a){n=a.data.$.clientY;q.input()}));f.fire("dragstart",{target:a.sender});l.push(f.document.once("mouseup",b,this));g.isInline()||l.push(CKEDITOR.document.once("mouseup",b,this))}function Z(a){var b,c,d=a.editables;a.editables={};if(a.editables)for(b in d)c=d[b],a.initEditable(b,"string"== typeof c?{selector:c}:c)}function aa(a){if(a.mask){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}}function ba(a){if(a.parts){var b={},c,d;for(d in a.parts)c=a.wrapper.findOne(a.parts[d]),b[d]=c;a.parts=b}}function N(a,b){ca(a);ba(a);Z(a);aa(a);X(a);V(a);W(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart", function(b){var d=b.data.getTarget();g.getNestedEditable(a,d)||a.inline&&g.isDomDragHandler(d)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){y(a,b==CKEDITOR.CTRL+88);return}if(b in da||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data); if(b.edit)a.on("edit",b.edit)}function ca(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function r(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard",onLoad:function(){CKEDITOR.addCss(".cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid yellow;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid yellow}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #ace}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:none;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}")}, beforeInit:function(a){a.widgets=new p(a)},afterInit:function(a){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});S(a)}});p.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,b){b=CKEDITOR.tools.prototypedCopy(b);b.name=a;b._=b._||{};this.editor.fire("widgetDefinition",b);b.template&&(b.template=new CKEDITOR.template(b.template));O(this.editor,b);P(this,b);return this.registered[a]= b},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=z(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=g.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused=== a){var b=a.editor,c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&n(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,da={37:1,38:1,39:1,40:1,8:1,46:1};(function(){function a(){} function b(a,b,e){return e&&this.checkElement(a)?(a=e.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget},apply:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.applyStyle(this)},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},checkActive:function(a,b){return this.checkElementMatch(a.lastElement, 0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return g.isDomWidgetWrapper(a)?(a=a.getFirst(g.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];var b,e={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray(); if(!b)return null;e[a.styleableElements]={classes:b,propertiesOnly:!0};return e}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})})();CKEDITOR.plugins.widget=g;g.repository=p;g.nestedEditable=q})();CKEDITOR.config.plugins='basicstyles,blockquote,dialogui,dialog,clipboard,enterkey,horizontalrule,indent,indentblock,indentlist,justify,list,pastefromword,removeformat,tab,undo,lineutils,widget';CKEDITOR.config.skin='moono';(function() {var setIcons = function(icons, strip) {var path = CKEDITOR.getUrl( 'plugins/' + strip );icons = icons.split( ',' );for ( var i = 0; i < icons.length; i++ )CKEDITOR.skin.icons[ icons[ i ] ] = { path: path, offset: -icons[ ++i ], bgsize : icons[ ++i ] };};if (CKEDITOR.env.hidpi) setIcons('bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,blockquote,144,,copy-rtl,168,,copy,192,,cut-rtl,216,,cut,240,,paste-rtl,264,,paste,288,,horizontalrule,312,,indent-rtl,336,,indent,360,,outdent-rtl,384,,outdent,408,,justifyblock,432,,justifycenter,456,,justifyleft,480,,justifyright,504,,bulletedlist-rtl,528,,bulletedlist,552,,numberedlist-rtl,576,,numberedlist,600,,pastefromword-rtl,624,,pastefromword,648,,removeformat,672,,redo-rtl,696,,redo,720,,undo-rtl,744,,undo,768,','icons_hidpi.png');else setIcons('bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,blockquote,144,auto,copy-rtl,168,auto,copy,192,auto,cut-rtl,216,auto,cut,240,auto,paste-rtl,264,auto,paste,288,auto,horizontalrule,312,auto,indent-rtl,336,auto,indent,360,auto,outdent-rtl,384,auto,outdent,408,auto,justifyblock,432,auto,justifycenter,456,auto,justifyleft,480,auto,justifyright,504,auto,bulletedlist-rtl,528,auto,bulletedlist,552,auto,numberedlist-rtl,576,auto,numberedlist,600,auto,pastefromword-rtl,624,auto,pastefromword,648,auto,removeformat,672,auto,redo-rtl,696,auto,redo,720,auto,undo-rtl,744,auto,undo,768,auto','icons.png');})();CKEDITOR.lang.languages={"af":1,"ar":1,"bg":1,"bn":1,"bs":1,"ca":1,"cs":1,"cy":1,"da":1,"de":1,"el":1,"en":1,"en-au":1,"en-ca":1,"en-gb":1,"eo":1,"es":1,"et":1,"eu":1,"fa":1,"fi":1,"fo":1,"fr":1,"fr-ca":1,"gl":1,"gu":1,"he":1,"hi":1,"hr":1,"hu":1,"id":1,"is":1,"it":1,"ja":1,"ka":1,"km":1,"ko":1,"ku":1,"lt":1,"lv":1,"mk":1,"mn":1,"ms":1,"nb":1,"nl":1,"no":1,"pl":1,"pt":1,"pt-br":1,"ro":1,"ru":1,"si":1,"sk":1,"sl":1,"sq":1,"sr":1,"sr-latn":1,"sv":1,"th":1,"tr":1,"tt":1,"ug":1,"uk":1,"vi":1,"zh":1,"zh-cn":1};}()); if (typeof CKEDITOR !== 'undefined') { CKEDITOR.disableAutoInline = true; } } "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){var e={editable:function(t,o){return o=o||{},o.srcNode=t,e.implementEventTarget(),new e.Core(o)},getBasePath:function(){var t=window.ALLOYEDITOR_BASEPATH||"";if(!t)for(var o=document.getElementsByTagName("script"),n=0;n=0?r=r+"-"+i:o.indexOf(r)===-1&&(r="en"),CKEDITOR.scriptLoader.load(e.getUrl("lang/alloy-editor/"+r+".js"),function(t){t&&e.fire("languageResourcesLoaded")},this)}},getUrl:function(t){var o=e.getBasePath();return t.indexOf(":/")===-1&&0!==t.indexOf("/")&&(t=o+t),CKEDITOR.timestamp&&"/"!==t.charAt(t.length-1)&&!/[&?]t=/.test(t)&&(t+=(t.indexOf("?")>=0?"&":"?")+"t="+CKEDITOR.timestamp),t},implementEventTarget:function(){e.fire||e.on||CKEDITOR.event.implementOn(e)},regexBasePath:/(^|.*[\\\/])(?:alloy-editor[^\/]+|alloy-editor)\.js(?:\?.*|;.*)?$/i,Buttons:{},Toolbars:{}};"undefined"!=typeof module&&"object"===_typeof(module.exports)&&(module.exports=e),"undefined"!=typeof window?window.AlloyEditor=e:"undefined"!=typeof global?global.AlloyEditor=e:"undefined"!=typeof self?self.AlloyEditor=e:this.AlloyEditor=e}(); !function(e){var t=e();"undefined"!=typeof module&&"object"==typeof module.exports?module.exports.React=t:"object"==typeof AlloyEditor?AlloyEditor.React=t:"undefined"!=typeof window?window.React=t:"undefined"!=typeof self?self.React=t:"undefined"!=typeof global?global.React=t:this.React=t}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!u&&s)return s(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i8&&11>=x),N=32,w=String.fromCharCode(N),P=f.topLevelTypes,I={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[P.topCompositionEnd,P.topKeyPress,P.topTextInput,P.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[P.topBlur,P.topCompositionEnd,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[P.topBlur,P.topCompositionStart,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[P.topBlur,P.topCompositionUpdate,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]}},R=!1,S=null,T={eventTypes:I,extractEvents:function(e,t,n,r,o){return[l(e,t,n,r,o),d(e,t,n,r,o)]}};t.exports=T},{130:130,148:148,15:15,19:19,20:20,90:90,94:94}],4:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){a.forEach(function(t){o[r(t,e)]=o[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},u={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=u},{}],5:[function(e,t,n){"use strict";var r=e(4),o=e(130),a=e(71),i=(e(132),e(105)),u=e(143),s=e(150),l=(e(155),s(function(e){return u(e)})),c=!1,p="cssFloat";if(o.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(f){c=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=i(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=i(o,t[o]);if("float"===o&&(o=p),a)n[o]=a;else{var u=c&&r.shorthandPropertyExpansions[o];if(u)for(var s in u)n[s]="";else n[o]=""}}}};a.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),t.exports=h},{105:105,130:130,132:132,143:143,150:150,155:155,4:4,71:71}],6:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(24),a=e(23),i=e(144);a(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?i(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n8));var A=!1;_.canUseDOM&&(A=M("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return k.get.call(this)},set:function(e){T=""+e,k.set.call(this,e)}},U={eventTypes:I,extractEvents:function(e,t,n,o,a){var i,u;if(r(t)?O?i=s:u=l:N(t)?A?i=f:(i=v,u=h):m(t)&&(i=g),i){var c=i(e,t,n);if(c){var p=x.getPooled(I.change,c,o,a);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}u&&u(e,t,n)}};t.exports=U},{114:114,119:119,120:120,130:130,148:148,15:15,16:16,19:19,83:83,92:92}],8:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],9:[function(e,t,n){"use strict";function r(e,t,n){var r=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=e(12),a=e(67),i=e(71),u=e(124),s=e(125),l=e(144),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:s,processUpdates:function(e,t){for(var n,i=null,c=null,p=0;pt||e.hasOverloadedBooleanValue&&t===!1}var a=e(10),i=e(71),u=e(122),s=(e(155),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},p={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+u(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+u(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+u(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+u(t):""},setValueForProperty:function(e,t,n){var r=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(r){var i=r.mutationMethod;if(i)i(e,n);else if(o(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var u=r.attributeName,s=r.attributeNamespace;s?e.setAttributeNS(s,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(u,""):e.setAttribute(u,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else a.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var o=n.propertyName,i=a.getDefaultValueForProperty(e.nodeName,o);n.hasSideEffects&&""+e[o]===i||(e[o]=i)}}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};i.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=p},{10:10,122:122,155:155,71:71}],12:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e(130),a=e(135),i=e(136),u=e(140),s=e(144),l=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:s(!1);for(var t,n={},p=0;p-1?void 0:i(!1),!l.plugins[n]){t.extractEvents?void 0:i(!1),l.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?i(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];a(u,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){l.registrationNameModules[e]?i(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(144),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){u?i(!1):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?i(!1):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{144:144}],18:[function(e,t,n){"use strict";function r(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function o(e){return e===m.topMouseMove||e===m.topTouchMove}function a(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=v.Mount.getNode(r),t?f.invokeGuardedCallbackWithCatch(o,n,e,r):f.invokeGuardedCallback(o,n,e,r),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;oe&&n[e]===o[e];e++);var i=r-e;for(t=1;i>=t&&n[r-t]===o[a-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{117:117,23:23,24:24}],21:[function(e,t,n){"use strict";var r,o=e(10),a=e(130),i=o.injection.MUST_USE_ATTRIBUTE,u=o.injection.MUST_USE_PROPERTY,s=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(a.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,capture:i|s,cellPadding:null,cellSpacing:null,charSet:i,challenge:i,checked:u|s,classID:i,className:r?i:u,cols:i|p,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:u|s,coords:null,crossOrigin:null,data:null,dateTime:i,"default":s,defer:s,dir:null,disabled:i|s,download:d,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:s,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|s,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:u,inputMode:i,integrity:null,is:i,keyParams:i,keyType:i,kind:null,label:null,lang:null,list:i,loop:u|s,low:null,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,minLength:i,multiple:u|s,muted:u|s,name:null,noValidate:s,open:s,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:u|s,rel:null,required:s,role:i,rows:i|p,rowSpan:null,sandbox:null,scope:null,scoped:s,scrolling:null,seamless:i|s,selected:u|s,shape:null,size:i|p,sizes:i,span:p,spellCheck:null,src:null,srcDoc:u,srcLang:null,srcSet:i,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:u|l,width:i,wmode:i,wrap:null,about:i,datatype:i,inlist:i,prefix:i,property:i,resource:i,"typeof":i,vocab:i,autoCapitalize:null,autoCorrect:null,autoSave:null,color:null,itemProp:i,itemScope:i|s,itemType:i,itemID:i,itemRef:i,results:null,security:i,unselectable:i},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=h},{10:10,130:130}],22:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?l(!1):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=e(74),s=e(73),l=e(144),c=(e(155),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},d={},f={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);if(o instanceof Error&&!(o.message in d)){d[o.message]=!0;i(n)}}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=f},{144:144,155:155,73:73,74:74}],23:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o=0||null!=t.is}function m(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=e(2),y=e(5),C=e(10),b=e(11),_=e(15),E=e(26),x=e(31),D=e(36),M=e(41),N=e(42),w=e(43),P=e(47),I=e(65),R=e(66),S=e(71),T=e(82),k=e(23),O=e(104),A=e(107),L=e(144),U=(e(119),e(148)),F=e(124),B=e(125),V=(e(153),e(128),e(155),E.deleteListener),j=E.listenTo,W=E.registrationNameModules,K={string:!0,number:!0},H=U({children:null}),q=U({style:null}),Y=U({__html:null}),z=1,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},$=(k({menuitem:!0},X),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),Z={},J={}.hasOwnProperty;m.displayName="ReactDOMComponent",m.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(p,this);break;case"button":r=D.getNativeProps(this,r,n);break;case"input":M.mountWrapper(this,r,n),r=M.getNativeProps(this,r,n);break;case"option":N.mountWrapper(this,r,n),r=N.getNativeProps(this,r,n);break;case"select":w.mountWrapper(this,r,n),r=w.getNativeProps(this,r,n),n=w.processChildContext(this,r,n);break;case"textarea":P.mountWrapper(this,r,n),r=P.getNativeProps(this,r,n)}s(this,r);var o;if(t.useCreateElement){var a=n[I.ownerDocumentContextKey],i=a.createElement(this._currentElement.type);b.setAttributeForID(i,this._rootNodeID),I.getID(i),this._updateDOMProperties({},r,t,i),this._createInitialChildren(t,r,n,i),o=i}else{var u=this._createOpenTagMarkupAndPutListeners(t,r),l=this._createContentMarkup(t,r,n);o=!l&&X[this._tag]?u+"/>":u+">"+l+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return o},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&l(this._rootNodeID,r,o,e);else{r===q&&(o&&(o=this._previousStyleCopy=k({},t.style)),o=y.createMarkupForStyles(o));var a=null;null!=this._tag&&v(this._tag,t)?r!==H&&(a=b.createMarkupForCustomAttribute(r,o)):a=b.createMarkupForProperty(r,o),a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n;var i=b.createMarkupForID(this._rootNodeID);return n+" "+i},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=K[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=A(a);else if(null!=i){var u=this.mountChildren(i,e,n);r=u.join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&F(r,o.__html);else{var a=K[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)B(r,a);else if(null!=i)for(var u=this.mountChildren(i,e,n),s=0;st.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var u=l(e,o),s=l(e,a);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=e(130),l=e(116),c=e(117),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:u};t.exports=d},{116:116,117:117,130:130}],45:[function(e,t,n){"use strict";var r=e(49),o=e(80),a=e(84);r.inject();var i={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:a};t.exports=i},{49:49,80:80,84:84}],46:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(31),i=e(65),u=e(23),s=e(107),l=e(125),c=(e(128),function(e){});u(c.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){if(this._rootNodeID=e,t.useCreateElement){var r=n[i.ownerDocumentContextKey],a=r.createElement("span");return o.setAttributeForID(a,e),i.getID(a),l(a,this._stringText),a}var u=s(this._stringText);return t.renderToStaticMarkup?u:""+u+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=i.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=c},{107:107,11:11,125:125,128:128,23:23,31:31,65:65,9:9}],47:[function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);return u.asap(r,this),n}var a=e(22),i=e(40),u=e(83),s=e(23),l=e(144),c=(e(155),{getNativeProps:function(e,t,n){null!=t.dangerouslySetInnerHTML?l(!1):void 0;var r=s({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?l(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:l(!1),r=r[0]),n=""+r),null==n&&(n="");var i=a.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=a.getValue(t);null!=n&&i.updatePropertyByID(e._rootNodeID,"value",""+n)}});t.exports=c},{144:144,155:155,22:22,23:23,40:40,83:83}],48:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(83),a=e(100),i=e(23),u=e(136),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:o.flushBatchedUpdates.bind(o)},c=[l,s];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};t.exports=d},{100:100,136:136,23:23,83:83}],49:[function(e,t,n){"use strict";function r(){if(!M){M=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(C),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:_,BeforeInputEventPlugin:o}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(v),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(D),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(b),g.Updates.injectBatchingStrategy(f),g.RootIndex.injectCreateReactRootIndex(l.canUseDOM?i.createReactRootIndex:E.createReactRootIndex),g.Component.injectEnvironment(d)}}var o=e(3),a=e(7),i=e(8),u=e(13),s=e(14),l=e(130),c=e(21),p=e(25),d=e(31),f=e(48),h=e(37),v=e(46),m=e(58),g=e(59),y=e(61),C=e(65),b=e(75),_=e(86),E=e(87),x=e(88),D=e(85),M=!1;t.exports={inject:r}},{13:13,130:130,14:14,21:21,25:25,3:3,31:31,37:37,46:46,48:48,50:50,58:58,59:59,61:61,65:65,7:7,75:75,8:8,85:85,86:86,87:87,88:88}],50:[function(e,t,n){"use strict";function r(e){return Math.floor(100*e)/100}function o(e,t,n){e[t]=(e[t]||0)+n}var a=e(10),i=e(51),u=e(65),s=e(71),l=e(152),c={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){c._injected||s.injection.injectMeasure(c.measure),c._allMeasurements.length=0,s.enableMeasure=!0},stop:function(){s.enableMeasure=!1},getLastMeasurements:function(){return c._allMeasurements},printExclusive:function(e){e=e||c._allMeasurements;var t=i.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":r(e.inclusive),"Exclusive mount time (ms)":r(e.exclusive),"Exclusive render time (ms)":r(e.render),"Mount time per instance (ms)":r(e.exclusive/e.count),"Render time per instance (ms)":r(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||c._allMeasurements;var t=i.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":r(e.time),Instances:e.count}})),console.log("Total time:",i.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=i.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||c._allMeasurements,console.table(c.getMeasurementsSummaryMap(e)),console.log("Total time:",i.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||c._allMeasurements;var t=i.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[a.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",i.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var o=c._allMeasurements[c._allMeasurements.length-1].writes;o[e]=o[e]||[],o[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=arguments.length,a=Array(r),i=0;r>i;i++)a[i]=arguments[i];var s,p,d;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return c._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0,created:{}}),d=l(),p=n.apply(this,a),c._allMeasurements[c._allMeasurements.length-1].totalTime=l()-d,p;if("_mountImageIntoNode"===t||"ReactBrowserEventEmitter"===e||"ReactDOMIDOperations"===e||"CSSPropertyOperations"===e||"DOMChildrenOperations"===e||"DOMPropertyOperations"===e){if(d=l(),p=n.apply(this,a),s=l()-d,"_mountImageIntoNode"===t){var f=u.getID(a[1]);c._recordWrite(f,t,s,a[0])}else if("dangerouslyProcessChildrenUpdates"===t)a[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=a[1][e.markupIndex]),c._recordWrite(e.parentID,e.type,s,t)});else{var h=a[0];"object"==typeof h&&(h=u.getID(a[0])),c._recordWrite(h,t,s,Array.prototype.slice.call(a,1))}return p}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,a);if(this._currentElement.type===u.TopLevelWrapper)return n.apply(this,a);var v="mountComponent"===t?a[0]:this._rootNodeID,m="_renderValidatedComponent"===t,g="mountComponent"===t,y=c._mountStack,C=c._allMeasurements[c._allMeasurements.length-1];if(m?o(C.counts,v,1):g&&(C.created[v]=!0,y.push(0)),d=l(),p=n.apply(this,a),s=l()-d,m)o(C.render,v,s);else if(g){var b=y.pop();y[y.length-1]+=s,o(C.exclusive,v,s-b),o(C.inclusive,v,s)}else o(C.inclusive,v,s);return C.displayNames[v]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():""},p}}};t.exports=c},{10:10,152:152,51:51,65:65,71:71}],51:[function(e,t,n){"use strict";function r(e){for(var t=0,n=0;n=l&&u.push(n[t]);return u.sort(function(e,t){return t.exclusive-e.exclusive}),u}function i(e,t){for(var n,r={},o=0;o "+d.current,r[n]=r[n]||{componentName:n,time:0,count:0},i.inclusive[p]&&(r[n].time+=i.inclusive[p]),i.counts[p]&&(r[n].count+=i.counts[p])}}var f=[];for(n in r)r[n].time>=l&&f.push(r[n]);return f.sort(function(e,t){return t.time-e.time}),f}function u(e){var t={},n=Object.keys(e.writes),r=s({},e.exclusive,e.inclusive);for(var o in r){for(var a=!1,i=0;i0&&(t[o]=!0)}return t}var s=e(23),l=1.2,c={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",SET_MARKUP:"set innerHTML",TEXT_CONTENT:"set textContent",setValueForProperty:"update attribute",setValueForAttribute:"update attribute",deleteValueForProperty:"remove attribute",dangerouslyReplaceNodeWithMarkupByID:"replace"},p={getExclusiveSummary:a,getInclusiveSummary:i,getDOMSummary:o,getTotalTime:r};t.exports=p},{23:23}],52:[function(e,t,n){"use strict";var r=e(34),o=e(23),a=(e(104),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),i={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,i,u){var s={$$typeof:a,type:e,key:t,ref:n,props:u,_owner:i};return s};u.createElement=function(e,t,n){var o,a={},s=null,l=null,c=null,p=null;if(null!=t){l=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(o in t)t.hasOwnProperty(o)&&!i.hasOwnProperty(o)&&(a[o]=t[o])}var d=arguments.length-2;if(1===d)a.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];a.children=f}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof a[o]&&(a[o]=v[o])}return u(e,s,l,c,p,r.current,a)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneAndReplaceProps=function(e,t){var n=u(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},u.cloneElement=function(e,t,n){var a,s=o({},e.props),l=e.key,c=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=r.current),void 0!==t.key&&(l=""+t.key);for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(s[a]=t[a])}var h=arguments.length-2;if(1===h)s.children=n;else if(h>1){for(var v=Array(h),m=0;h>m;m++)v[m]=arguments[m+2];s.children=v}return u(e.type,l,c,p,d,f,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.exports=u},{104:104,23:23,34:34}],53:[function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;a("uniqueKey",e,t)}}function a(e,t,n){var o=r();if(!o){var a="string"==typeof n?n:n.displayName||n.name;a&&(o=" Check the top-level render call using <"+a+">.")}var i=h[e]||(h[e]={});if(i[o])return null;i[o]=!0;var u={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(u.childOwner=" It was passed a child from "+t._owner.getName()+"."),u}function i(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n=i;i++)if(o(e,i)&&o(t,i))r=i;else if(e.charAt(i)!==t.charAt(i))break;var u=e.substr(0,r);return a(u)?void 0:d(!1),u}function c(e,t,n,r,o,a){e=e||"",t=t||"",e===t?d(!1):void 0;var l=i(t,e);l||i(e,t)?void 0:d(!1);for(var c=0,p=l?u:s,f=e;;f=p(f,t)){var h;if(o&&f===e||a&&f===t||(h=n(f,l,r)),h===!1||f===t)break;c++1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var a=l(e,t);a!==e&&c(e,a,n,r,!1,!0),a!==t&&c(a,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:f};t.exports=m},{144:144,78:78}],62:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],63:[function(e,t,n){"use strict";var r=e(28),o=e(30),a=e(29),i=e(38),u=e(52),s=(e(53),e(74)),l=e(84),c=e(23),p=e(121),d=u.createElement,f=u.createFactory,h=u.cloneElement,v={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:p},Component:o,createElement:d,cloneElement:h,isValidElement:u.isValidElement,PropTypes:s,createClass:a.createClass,createFactory:f,createMixin:function(e){return e},DOM:i,version:l,__spread:c};t.exports=v},{121:121,23:23,28:28,29:29,30:30,38:38,52:52,53:53,74:74,84:84}],64:[function(e,t,n){"use strict";var r=e(103),o=/\/?>/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{103:103}],65:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function a(e){var t=o(e);return t&&Q.getID(t)}function i(e){var t=u(e);if(t)if(V.hasOwnProperty(t)){var n=V[t];n!==e&&(p(n,t)?L(!1):void 0,V[t]=e)}else V[t]=e;return t}function u(e){return e&&e.getAttribute&&e.getAttribute(B)||""}function s(e,t){var n=u(e);n!==t&&delete V[n],e.setAttribute(B,t),V[t]=e}function l(e){return V.hasOwnProperty(e)&&p(V[e],e)||(V[e]=Q.findReactNodeByID(e)),V[e]}function c(e){var t=N.get(e)._rootNodeID;return D.isNullComponentID(t)?null:(V.hasOwnProperty(t)&&p(V[t],t)||(V[t]=Q.findReactNodeByID(t)),V[t])}function p(e,t){if(e){u(e)!==t?L(!1):void 0;var n=Q.findReactContainerForID(t);if(n&&O(n,e))return!0}return!1}function d(e){delete V[e]}function f(e){var t=V[e];return t&&p(t,e)?void(G=t):!1}function h(e){G=null,M.traverseAncestors(e,f);var t=G;return G=null,t}function v(e,t,n,r,o,a){E.useCreateElement&&(a=T({},a),n.nodeType===W?a[H]=n:a[H]=n.ownerDocument);var i=I.mountComponent(e,t,r,a);e._renderedComponent._topLevelWrapper=e,Q._mountImageIntoNode(i,n,o,r)}function m(e,t,n,r,o){var a=S.ReactReconcileTransaction.getPooled(r);a.perform(v,null,e,t,n,a,r,o),S.ReactReconcileTransaction.release(a)}function g(e,t){for(I.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=a(e);return t?t!==M.getReactRootIDFromNodeID(t):!1}function C(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=u(e);if(t){var n,r=M.getReactRootIDFromNodeID(t),o=e;do if(n=u(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===Y[r])return e}}return null}var b=e(10),_=e(26),E=(e(34),e(39)),x=e(52),D=e(55),M=e(61),N=e(62),w=e(64),P=e(71),I=e(76),R=e(82),S=e(83),T=e(23),k=e(137),O=e(133),A=e(118),L=e(144),U=e(124),F=e(126),B=(e(128),e(155),b.ID_ATTRIBUTE_NAME),V={},j=1,W=9,K=11,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),q={},Y={},z=[],G=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var Q={TopLevelWrapper:X,_instancesByReactRootID:q,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Q.scrollMonitor(n,function(){R.enqueueElementInternal(e,t),r&&R.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,_.ensureScrollValueMonitoring();var n=Q.registerContainer(t);return q[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var o=A(e,null),a=Q._registerComponent(o,t);return S.batchedUpdates(m,o,a,t,n,r),o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?L(!1):void 0,Q._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.isValidElement(t)?void 0:L(!1);var i=new x(X,null,null,null,null,null,t),s=q[a(n)];if(s){var l=s._currentElement,c=l.props;if(F(c,t)){var p=s._renderedComponent.getPublicInstance(),d=r&&function(){r.call(p)};return Q._updateRootComponent(s,i,n,d),p}Q.unmountComponentAtNode(n)}var f=o(n),h=f&&!!u(f),v=y(n),m=h&&!s&&!v,g=Q._renderNewRootComponent(i,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):k)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return Q._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=a(e);return t&&(t=M.getReactRootIDFromNodeID(t)),t||(t=M.createReactRootID()),Y[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==j&&e.nodeType!==W&&e.nodeType!==K?L(!1):void 0;var t=a(e),n=q[t];if(!n){var r=(y(e),u(e));r&&r===M.getReactRootIDFromNodeID(r);return!1}return S.batchedUpdates(g,n,e),delete q[t],delete Y[t],!0},findReactContainerForID:function(e){var t=M.getReactRootIDFromNodeID(e),n=Y[t];return n},findReactNodeByID:function(e){var t=Q.findReactContainerForID(e);return Q.findComponentRoot(t,e)},getFirstReactDOM:function(e){return C(e)},findComponentRoot:function(e,t){var n=z,r=0,o=h(t)||e;for(n[0]=o.firstChild,n.length=1;r>"}var y=e(52),C=e(72),b=e(136),_=e(115),E="<>",x={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:i,element:u(),instanceOf:s,node:d(),objectOf:c,oneOf:l,oneOfType:p,shape:f};t.exports=x},{115:115,136:136,52:52,72:72}],75:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=!e&&u.useCreateElement}var o=e(6),a=e(24),i=e(26),u=e(39),s=e(60),l=e(100),c=e(23),p={initialize:s.getSelectionInformation,close:s.restoreSelection},d={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};c(r.prototype,l.Mixin,v),a.addPoolingTo(r),t.exports=r},{100:100,23:23,24:24,26:26,39:39,6:6,60:60}],76:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(77),a={mountComponent:function(e,t,n,o){var a=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),a},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var u=o.shouldUpdateRefs(i,t);u&&o.detachRefs(e,i),e.receiveComponent(t,n,a),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};t.exports=a},{77:77}],77:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=e(70),i={};i.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},i.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=i},{70:70}],78:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],79:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],80:[function(e,t,n){"use strict";function r(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!1),t.perform(function(){var r=f(e,null),o=r.mountComponent(n,t,d);return s.addChecksumToMarkup(o)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}function o(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!0),t.perform(function(){var r=f(e,null);return r.mountComponent(n,t,d)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}var a=e(48),i=e(52),u=e(61),s=e(64),l=e(79),c=e(81),p=e(83),d=e(137),f=e(118),h=e(144);t.exports={renderToString:r,renderToStaticMarkup:o}},{118:118,137:137,144:144,48:48,52:52,61:61,64:64,79:79,81:81,83:83}],81:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=a.getPooled(null),this.useCreateElement=!1}var o=e(24),a=e(6),i=e(100),u=e(23),s=e(136),l={initialize:function(){this.reactMountReady.reset()},close:s},c=[l],p={getTransactionWrappers:function(){return c},getReactMountReady:function(){return this.reactMountReady},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};u(r.prototype,i.Mixin,p),o.addPoolingTo(r),t.exports=r},{100:100,136:136,23:23,24:24,6:6}],82:[function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var a=(e(34),e(52)),i=e(62),u=e(83),s=e(23),l=e(144),c=(e(155),{isMounted:function(e){var t=i.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t){"function"!=typeof t?l(!1):void 0;var n=o(e);return n?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){"function"!=typeof t?l(!1):void 0,e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var a=n._pendingStateQueue||(n._pendingStateQueue=[]);a.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");n&&c.enqueueSetPropsInternal(n,t)},enqueueSetPropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,i=o.props,u=s({},i.props,t);n._pendingElement=a.cloneAndReplaceProps(o,a.cloneAndReplaceProps(i,u)),r(n)},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");n&&c.enqueueReplacePropsInternal(n,t)},enqueueReplacePropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,i=o.props;n._pendingElement=a.cloneAndReplaceProps(o,a.cloneAndReplaceProps(i,t)),r(n)},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});t.exports=c},{144:144,155:155,23:23,34:34,52:52,62:62,83:83}],83:[function(e,t,n){"use strict";function r(){N.ReactReconcileTransaction&&b?void 0:m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=N.ReactReconcileTransaction.getPooled(!1)}function a(e,t,n,o,a,i){r(),b.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==g.length?m(!1):void 0,g.sort(i);for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;ar;){for(;rr;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],104:[function(e,t,n){"use strict";var r=!1;t.exports=r},{}],105:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||a.hasOwnProperty(e)&&a[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(4),a=o.isUnitlessNumber;t.exports=r},{4:4}],106:[function(e,t,n){"use strict";function r(e,t,n,r,o){return o}e(23),e(155);t.exports=r},{155:155,23:23}],107:[function(e,t,n){"use strict";function r(e){return a[e]}function o(e){return(""+e).replace(i,r)}var a={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=o},{}],108:[function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:o.has(e)?a.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?i(!1):void 0,void i(!1))}var o=(e(34),e(62)),a=e(65),i=e(144);e(155);t.exports=r},{144:144,155:155,34:34,62:62,65:65}],109:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=void 0===r[n];o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return a(e,r,t),t}var a=e(127);e(155);t.exports=o},{127:127,155:155}],110:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],111:[function(e,t,n){ "use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],112:[function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=e(111),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{111:111}],113:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return r?!!n[r]:!1}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],114:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],115:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[a]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,a="@@iterator";t.exports=r},{}],116:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,t>=a&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}t.exports=a},{}],117:[function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=e(130),a=null;t.exports=r},{130:130}],118:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e){var t;if(null===e||e===!1)t=new i(o);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?l(!1):void 0,t="string"==typeof n.type?u.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=u.createInstanceForText(e):l(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var a=e(33),i=e(54),u=e(68),s=e(23),l=e(144),c=(e(155),function(){});s(c.prototype,a.Mixin,{_instantiateReactComponent:o}),t.exports=o},{144:144,155:155,23:23,33:33,54:54,68:68}],119:[function(e,t,n){"use strict";function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=e(130);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{130:130}],120:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&o[e.type]||"textarea"===t)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],121:[function(e,t,n){"use strict";function r(e){return o.isValidElement(e)?void 0:a(!1),e}var o=e(52),a=e(144);t.exports=r},{144:144,52:52}],122:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(107);t.exports=r},{107:107}],123:[function(e,t,n){"use strict";var r=e(65);t.exports=r.renderSubtreeIntoContainer},{65:65}],124:[function(e,t,n){"use strict";var r=e(130),o=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&a.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{130:130}],125:[function(e,t,n){"use strict";var r=e(130),o=e(107),a=e(124),i=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),t.exports=i},{107:107,124:124,130:130}],126:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}t.exports=r},{}],127:[function(e,t,n){"use strict";function r(e){return v[e]}function o(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function a(e){return(""+e).replace(m,r)}function i(e){return"$"+a(e)}function u(e,t,n,r){var a=typeof e;if(("undefined"===a||"boolean"===a)&&(e=null),null===e||"string"===a||"number"===a||l.isValidElement(e))return n(r,e,""===t?f+o(e,0):t),1;var s,c,v=0,m=""===t?f:t+h;if(Array.isArray(e))for(var g=0;g":i.innerHTML="<"+e+">",u[e]=!i.firstChild),u[e]?d[e]:null}var o=e(130),a=e(144),i=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),t.exports=r},{130:130,144:144}],141:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],142:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],143:[function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=e(142),a=/^ms-/;t.exports=r},{142:142}],144:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw s.framesToPop=1,s}};t.exports=r},{}],145:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],146:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(145);t.exports=r},{145:145}],147:[function(e,t,n){"use strict";var r=e(144),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{144:144}],148:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],149:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var a in e)o.call(e,a)&&(r[a]=t.call(n,e[a],a,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],150:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],151:[function(e,t,n){"use strict";var r,o=e(130);o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),t.exports=r||{}},{130:130}],152:[function(e,t,n){"use strict";var r=e(151),o=r;o&&o.now||(o=Date);var a=o.now.bind(o);t.exports=a},{151:151}],153:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=o.bind(t),i=0;ia;a++)r[a]=e[a];return r}var o=e(144);t.exports=r},{144:144}],155:[function(e,t,n){"use strict";var r=e(136),o=r;t.exports=o},{136:136}]},{},[1])(1)}),function(e){"undefined"!=typeof module&&"object"==typeof module.exports?module.exports.ReactDOM=e(module.exports.React):"object"==typeof AlloyEditor?AlloyEditor.ReactDOM=e(AlloyEditor.React):"undefined"!=typeof window?window.ReactDOM=e(window.React):"undefined"!=typeof self?self.ReactDOM=e(self.React):"undefined"!=typeof global?global.ReactDOM=e(global.React):this.ReactDOM=e(this.React)}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}); var React = (function() { return (0, eval)('this').React; }()); if (typeof React === 'undefined' && typeof AlloyEditor !== 'undefined') { React = AlloyEditor.React; } if (typeof React === 'undefined' && typeof require === 'function') { React = require('react'); } var ReactDOM = (function() { return (0, eval)('this').ReactDOM; }()); if (typeof ReactDOM === 'undefined' && typeof AlloyEditor !== 'undefined') { ReactDOM = AlloyEditor.ReactDOM; } if (typeof ReactDOM === 'undefined' && typeof require === 'function') { ReactDOM = require('react-dom'); } if (typeof window !== 'undefined') { deployCKEditor(); "use strict";!function(){CKEDITOR.tools.debounce=CKEDITOR.tools.debounce||function(e,t,n,i){var o,a=function(){var a=n||this;clearTimeout(o);for(var r=[],s=arguments.length,l=0;l0?t.getRangeAt(0).getClientRects():[]),0===o.length)i=this.getCaretRegion();else{for(var d=0,u=o.length;dl&&(l=p.right),p.topr&&(r=p.bottom)}var m=new CKEDITOR.dom.window(window).getScrollPosition();if(i.bottom=m.y+r,i.left=m.x+s,i.right=m.x+l,i.top=m.y+c,o.length){var g=o[o.length-1],h=o[0];i.endRect={bottom:m.y+g.bottom,height:g.height,left:m.x+g.left,right:m.x+g.right,top:m.y+g.top,width:g.width},i.startRect={bottom:m.y+h.bottom,height:h.height,left:m.x+h.left,right:m.x+h.right,top:m.y+h.top,width:h.width}}}return i},getSelectionDirection:function(){var e=CKEDITOR.SELECTION_TOP_TO_BOTTOM,t=this.getSelection(),n=t.getNative();if(!n)return e;var i;if((i=n.anchorNode)&&i.compareDocumentPosition){var o=i.compareDocumentPosition(n.focusNode);(!o&&n.anchorOffset>n.focusOffset||o===Node.DOCUMENT_POSITION_PRECEDING)&&(e=CKEDITOR.SELECTION_BOTTOM_TO_TOP)}return e}},CKEDITOR.plugins.add("ae_selectionregion",{init:function(t){var n,i;i=Object.prototype.hasOwnProperty;for(n in e.prototype)i.call(e.prototype,n)&&"undefined"==typeof t[n]&&(t[n]=e.prototype[n])}}))}(),function(){function e(e){this._editor=e}var t={table:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1};e.HEADING_BOTH="Both",e.HEADING_COL="Column",e.HEADING_NONE="None",e.HEADING_ROW="Row",e.prototype={constructor:e,create:function(e){var t=this._editor,n=this._createElement("table");e=e||{};for(var i=n.append(this._createElement("tbody")),o=e.rows||1,a=e.cols||1,r=0;r0&&(CKEDITOR.env.webkit&&i[0].shrink(CKEDITOR.NODE_ELEMENT),e=this._editor.elementPath(i[0].getCommonAncestor(!0)).contains("table",1))}return e},isEditable:function(e){return CKEDITOR.env.ie&&e.is(t)?e.hasAttribute("contenteditable")?"false"!==e.getAttribute("contenteditable"):this.isEditable(e.getParent()):!e.isReadOnly()},getHeading:function(t){if(t=t||this.getFromSelection(),!t)return null;for(var n=null!==t.$.tHead,i=!0,o=0;o0;){var h=a.getFirst(),f=h.getChildCount();for(i=0;i0){var t=e.data.$.clipboardData.items[0];if(0===t.type.indexOf("image")){var n=t.getAsFile();this._processFile(n,e.listenerData.editor)}}},_preventEvent:function(e){e=new CKEDITOR.dom.event(e.data.$),e.preventDefault(),e.stopPropagation()},_processFile:function(e,t){var n=new FileReader;n.addEventListener("loadend",function(){var i=n.result,o=CKEDITOR.dom.element.createFromHtml('');t.insertElement(o);var a={el:o,file:e};t.fire("imageAdd",a)}),n.readAsDataURL(e)}})}(),function(){if(!CKEDITOR.plugins.get("ae_autolink")){/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/.test(navigator.userAgent)&&document.execCommand("AutoUrlDetect",!1,!1);var e=8,t=188,n=13,i=186,o=32,a=[t,n,i,o],r=/[^\s]+/gm,s=/(https?\:\/\/|www\.)(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/i;CKEDITOR.plugins.add("ae_autolink",{init:function(e){e.once("contentDom",function(){var t=e.editable();t.attachListener(t,"keyup",this._onKeyUp,this,{editor:e})}.bind(this))},_getLastWord:function(e){var t=e.getSelection().getRanges()[0],i=t.startOffset,o="";if(this._currentKeyCode===n){var a,s=t.startContainer.getPrevious();if(s){for(;!s.getLast;)s=s.getPrevious();for(a=s.getLast();a&&!a.getText();)a=a.getPrevious()}a&&a.$.href||(this._startContainer=a,o=a?a.getText():"",this._offset=o.length)}else this._startContainer=t.startContainer,o=this._startContainer.getText().substring(0,i-1),this._offset=i-1;var l="",c=o.match(r);return c&&(l=c.pop()),l},_isValidURL:function(e){return s.test(e)},_onKeyDown:function(t){var n=t.data.$,i=t.listenerData.editor,o=i.editable();o.removeListener("keydown",this._onKeyDown),n.keyCode===e&&(t.cancel(),t.data.preventDefault(),this._removeLink(i)),this._ckLink=null},_onKeyUp:function(e){var t=e.data.$;if(this._currentKeyCode=t.keyCode,a.indexOf(this._currentKeyCode)!==-1){var n=e.listenerData.editor,i=this._getLastWord(n);this._isValidURL(i)&&this._replaceContentByLink(n,i)}},_replaceContentByLink:function(e,t){var i=e.createRange(),o=CKEDITOR.dom.element.get(this._startContainer),a=this._offset;i.setStart(o,a-t.length),i.setEnd(o,a),i.select();var r=new CKEDITOR.Link(e);r.create(t),this._ckLink=r;var s=r.getFromSelection();if(e.fire("autolinkAdd",s),this._subscribeToKeyEvent(e),i=e.getSelection().getRanges()[0],this._currentKeyCode===n){var l=i.getNextEditableNode();i.setStart(l,0),i.setEnd(l,0)}else{var c=i.getNextNode();i.setStart(c,1),i.setEnd(c,1)}i.select()},_removeLink:function(e){var t=e.getSelection().getRanges()[0],n=t.startOffset,i=this._startContainer.getNext()||this._startContainer,o=e.createRange();o.setStart(i,0),o.setEndAfter(i),o.select(),this._ckLink.remove(),t.setEnd(t.startContainer,n),t.setStart(t.startContainer,n),t.select()},_subscribeToKeyEvent:function(e){var t=e.editable();t.attachListener(t,"keydown",this._onKeyDown,this,{editor:e},1)}})}}(),function(){if(!CKEDITOR.plugins.get("ae_autolist")){var e=8,t=32,n=[{regex:/^\*$/,type:"bulletedlist"},{regex:/^1\.$/,type:"numberedlist"}];CKEDITOR.plugins.add("ae_autolist",{init:function(e){e.once("contentDom",function(){var t=e.editable();t.attachListener(t,"keydown",this._onKeyDown,this,{editor:e})}.bind(this))},_checkForBackspaceAndUndo:function(t){var n=t.listenerData.editor,i=t.data.$,o=n.editable();o.removeListener("keydown",this._checkForBackspaceAndUndo),i.keyCode===e&&(n.execCommand("undo"),n.insertHtml(t.listenerData.bullet+" "),t.data.preventDefault())},_getListConfig:function(e){for(var t=e.config.autolist||n,i=e.getSelection().getRanges()[0],o=i.endContainer.getText(),a=o.substring(0,i.startOffset),r=o.substring(i.startOffset,o.length),s=0,l=t.length,c=null;!c&&l>s;){var d=t[s];if(d.regex.test(a)){c={bullet:a,editor:e,text:r,type:d.type};break}s++}return c},_createList:function(e){var t=e.editor,n=t.getSelection().getRanges()[0];n.endContainer.setText(e.text),t.execCommand(e.type);var i=t.editable();i.attachListener(i,"keydown",this._checkForBackspaceAndUndo,this,{editor:t,bullet:e.bullet},1)},_onKeyDown:function(e){var n=e.data.$;if(n.keyCode===t){var i=this._getListConfig(e.listenerData.editor);i&&(e.data.preventDefault(),this._createList(i))}}})}}(),function(){function e(e){function n(){var t=e.getSelection();t&&(t.getType()!==CKEDITOR.SELECTION_NONE&&t.getStartElement().is("img")?i.event&&i.event.button&&0!==i.event.button||r.show(t.getStartElement().$):r.hide())}var i=e.window.$,o=e.document.$,a="undefined"==typeof d?null:d;e.config.imageScaleResize=e.config.imageScaleResize||"both";var r=new t(e,{imageScaleResize:e.config.imageScaleResize,snapToSize:a});o.addEventListener("mousedown",function(e){r.isHandle(e.target)&&r.initDrag(e)},!1),e.on("selectionChange",n),e.on("getData",function(e){var t=e.data.dataValue||"";t=t.replace(/
/i,""),t=t.replace(/\b(ckimgrsz)\b/g,""),e.data.dataValue=t}),e.on("beforeUndoImage",function(){r.hide()}),e.on("afterUndoImage",function(){n()}),e.on("blur",function(){r.hide()}),e.on("beforeModeUnload",function l(){e.removeListener("beforeModeUnload",l),r.hide()}),e.on("destroy",function(){var e=o.getElementById("ckimgrsz");e&&e.remove(),u&&o.execCommand("enableObjectResizing",!1,!0)});var s;e.window.on("resize",function(){clearTimeout(s),s=setTimeout(n,50)})}function t(e,t){this.editor=e,this.window=e.window.$,this.document=e.document.$,this.cfg=t||{},this.init()}function n(e,t){this.window=e,this.document=t,this.events={mousemove:o(this.mousemove,this),keydown:o(this.keydown,this),mouseup:o(this.mouseup,this)}}function i(e){for(var t=e.length,n=new Array(t),i=0;ii?t.height=Math.round(t.width/i):t.width=Math.round(t.height*i)}var o=this.cfg.snapToSize;if(o)for(var a=this.otherImages,r=0;r=15&&(u>=15||"auto"===u)?(f.setAttributes({width:d,height:u}),p=!0):p=!1}function l(){for(var i;i=T.pop();)i.removeListener();n.removeClass(C),o.removeClass("cke_image_resizing"),p&&(e.setData({height:u,width:d}),t.fire("saveSnapshot")),p=!1}var c,d,u,p,m,g,h,f=e.parts.image,y="right"==e.data.align?-1:1,E=a.data.$.screenX,b=a.data.$.screenY,v=f.$.clientWidth,R=f.$.clientHeight,T=[],C="cke_image_s"+(~y?"e":"w");t.fire("saveSnapshot"),r("mousemove",s,T),r("mouseup",l,T),n.addClass(C),o.addClass("cke_image_resizing")}),e.on("data",function(){o["right"==e.data.align?"addClass":"removeClass"]("cke_image_resizer_left")}),e.parts.image.on("click",function(){t._.editable.editor.getSelection().selectElement(this);var e=t._.editable.editor.getSelectionData();e&&t.fire("editorInteraction",{nativeEvent:event,selectionData:e})})}function s(e){var t={figcaption:!0,figure:{classes:"!"+e.config.image2_captionedClass},img:{attributes:"!src,alt,width,height"}};return t}function l(e){var t=e.config.image2_alignClasses,n={align:{requiredContent:"img"+(t?"("+t[0]+")":"{float}")},caption:{requiredContent:"figcaption"},dimension:{requiredContent:"img[width,height]"}};return n}function c(e){return e.data.hasCaption?e.element:e.parts.image}if(!CKEDITOR.plugins.get("ae_dragresize_ie")){var d={center:1,left:0,right:2},u={both:"nwse-resize", height:"ns-resize",scale:"nwse-resize",width:"ew-resize"},p=/^\s*(\d+\%)\s*$/i,m='';CKEDITOR.plugins.add("ae_dragresize_ie",{hidpi:!0,icons:"image",init:function(t){var n=e(t);t.widgets.add("image",n)},onLoad:function(){CKEDITOR.addCss(".cke_image_resizer_nwse-resize{cursor: nwse-resize;}.cke_image_resizer_ns-resize{cursor: ns-resize;}.cke_image_resizer_nwse-resize{cursor: nwse-resize;}.cke_image_resizer_ew-resize{cursor: ew-resize;}.cke_image_nocaption{line-height:0}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:nwse-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}")},requires:"widget"}),CKEDITOR.plugins.image2={checkHasNaturalRatio:function(e){var t=e.$,n=this.getNatural(e);return Math.round(t.clientWidth/n.width*n.height)==t.clientHeight||Math.round(t.clientHeight/n.height*n.width)==t.clientWidth},getNatural:function(e){var t;if(e.$.naturalWidth)t={height:e.$.naturalHeigh,width:e.$.naturalWidth};else{var n=new Image;n.src=e.getAttribute("src"),t={height:n.heigh,width:n.width}}return t}}}}(),CKEDITOR.config.image2_captionedClass="image",function(){if(!CKEDITOR.plugins.get("ae_embed")){var e=/^https?/;CKEDITOR.DEFAULT_AE_EMBED_URL_TPL="//alloy.iframe.ly/api/oembed?url={url}&callback={callback}",CKEDITOR.DEFAULT_AE_EMBED_WIDGET_TPL='
',CKEDITOR.plugins.add("ae_embed",{requires:"widget",init:function(t){var n=new CKEDITOR.template(t.config.embedUrlTemplate||CKEDITOR.DEFAULT_AE_EMBED_URL_TPL),i=new CKEDITOR.template(t.config.embedWidgetTpl||CKEDITOR.DEFAULT_AE_EMBED_WIDGET_TPL),o=function(e,t){if("div"===e.name&&e.attributes["data-ae-embed-url"])return t.url=e.attributes["data-ae-embed-url"],!0};t.addCommand("embedUrl",{exec:function(e,t){e.insertHtml(i.output({url:t.url}))}}),t.widgets.add("ae_embed",{allowedContent:"div[!data-ae-embed-url]",mask:!0,requiredContent:"div[data-ae-embed-url]",data:function(e){var t=this,i=e.data.url;i&&CKEDITOR.tools.jsonp(n,{url:encodeURIComponent(i)},function(e){e.html?t.element.setHtml(e.html):t.element.setHtml(i)},function(e){t.element.setHtml(i)})},upcast:function(e,n){var i=t.config.embedWidgetUpcastFn||o;return i(e,n)}}),t.once("contentDom",function(){t.on("paste",function(n){var i=n.data.dataValue;e.test(i)&&(n.stop(),t.execCommand("embedUrl",{url:n.data.dataValue}))})}),t.on("selectionChange",function(e){var n=t.getSelection();if(n){var i=n.getSelectedElement();if(i){var o=i.findOne('[data-widget="ae_embed"]');if(o){var a=i.getClientRect(),r=new CKEDITOR.dom.window(window).getScrollPosition();a.left-=r.x,a.top+=r.y,a.direction=CKEDITOR.SELECTION_BOTTOM_TO_TOP,t.fire("editorInteraction",{nativeEvent:{},selectionData:{element:o,region:a}})}}}}),t.filter.addElementCallback(function(e){if("data-ae-embed-url"in e.attributes)return CKEDITOR.FILTER_SKIP_TREE})}})}}(),function(){if(!CKEDITOR.plugins.get("ae_imagealignment")){var e={CENTER:"center",LEFT:"left",RIGHT:"right"},t=[e.LEFT,e.RIGHT,e.CENTER],n=[{name:"display",value:"block"},{name:"margin-left",value:"50%"},{name:"transform",value:"translateX(-50%)",vendorPrefixes:["-ms-"]}],i=function(t){var i=t.getStyle("float");if(i&&"inherit"!==i&&"none"!==i||(i=t.getAttribute("align")),!i){var o=n.every(function(e){var n=t.getStyle(e.name)===e.value;return!n&&e.vendorPrefixes&&(n=e.vendorPrefixes.some(function(n){return t.getStyle(n+e.name)===e.value})),n});i=o?e.CENTER:null}return i},o=function(t,o){o===e.LEFT||o===e.RIGHT?(t.removeStyle("float"),o===i(t)&&t.removeAttribute("align")):o===e.CENTER&&n.forEach(function(e){t.removeStyle(e.name),e.vendorPrefixes&&e.vendorPrefixes.forEach(function(n){t.removeStyle(n+e.name)})})},a=function(t,a){o(t,i(t)),a===e.LEFT||a===e.RIGHT?t.setStyle("float",a):a===e.CENTER&&n.forEach(function(e){t.setStyle(e.name,e.value),e.vendorPrefixes&&e.vendorPrefixes.forEach(function(n){t.setStyle(n+e.name,e.value)})})};CKEDITOR.plugins.add("ae_imagealignment",{afterInit:function(e){var n=this;t.forEach(function(t){var r=e.getCommand("justify"+t);r&&(r.on("exec",function(r){var s=e.getSelectionData();if(s&&AlloyEditor.SelectionTest.image({data:{selectionData:s}})){var l=s.element,c=i(l);c===t?o(l,t):a(l,t),r.cancel(),n.refreshCommands(e,new CKEDITOR.dom.elementPath(l))}}),r.on("refresh",function(e){var n={element:e.data.path.lastElement};if(AlloyEditor.SelectionTest.image({data:{selectionData:n}})){var o=i(n.element);this.setState(o===t?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.cancel()}}))})},refreshCommands:function(e,n){t.forEach(function(t){var i=e.getCommand("justify"+t);i&&i.refresh(e,n)})}})}}(),function(){CKEDITOR.plugins.get("ae_pasteimages")||CKEDITOR.plugins.add("ae_pasteimages",{init:function(e){e.once("contentDom",function(){var t=e.editable();t.attachListener(t,"paste",this._onPaste,this,{editor:e})}.bind(this))},_onPaste:function(e){if(e.data.$.clipboardData){var t=e.data.$.clipboardData.items[0],n=e.listenerData.editor;if(0===t.type.indexOf("image")){var i=new FileReader,o=t.getAsFile();i.onload=function(e){var t=n.fire("beforeImageAdd",{imageFiles:o});if(t){var i=CKEDITOR.dom.element.createFromHtml('');n.insertElement(i);var a={el:i,file:o};n.fire("imageAdd",a)}}.bind(this),i.readAsDataURL(o)}}}})}(),function(){CKEDITOR.plugins.get("ae_placeholder")||CKEDITOR.plugins.add("ae_placeholder",{init:function(e){e.on("blur",this._checkEmptyData,this),e.on("change",this._checkEmptyData,this),e.on("focus",this._removePlaceholderClass,this),e.once("contentDom",this._checkEmptyData,this)},_checkEmptyData:function(e){var t=e.editor,n=new CKEDITOR.dom.element(t.element.$);""===t.getData()?n.addClass(t.config.placeholderClass):n.removeClass(t.config.placeholderClass)},_removePlaceholderClass:function(e){var t=e.editor,n=new CKEDITOR.dom.element(t.element.$);n.removeClass(t.config.placeholderClass)}})}(),function(){CKEDITOR.plugins.get("ae_selectionkeystrokes")||CKEDITOR.plugins.add("ae_selectionkeystrokes",{requires:"ae_selectionregion",init:function(e){e.config.selectionKeystrokes&&e.config.selectionKeystrokes.forEach(function(t){var n=new CKEDITOR.command(e,{exec:function(e){e.fire("editorInteraction",{manualSelection:t.selection,nativeEvent:{},selectionData:e.getSelectionData()})}}),i="selectionKeystroke"+t.selection;e.addCommand(i,n),e.setKeystroke(t.keys,i)})}})}(),function(){function e(e){return CKEDITOR.env.ie?e.$.clientWidth:parseInt(e.getComputedStyle("width"),10)}function t(e,t){var n=e.getComputedStyle("border-"+t+"-width"),i={thin:"0px",medium:"1px",thick:"2px"};return n.indexOf("px")<0&&(n=n in i&&"none"!=e.getComputedStyle("border-style")?i[n]:0),parseInt(n,10)}function n(e){for(var t,n,i,o=e.$.rows,a=0,r=0,s=o.length;ra&&(a=t,n=i);return n}function i(e){for(var i=[],o=-1,a="rtl"===e.getComputedStyle("direction"),r=n(e),s=new CKEDITOR.dom.element(e.$.tBodies[0]),l=s.getDocumentPosition(),c=0,d=r.cells.length;c=o.x&&t<=o.x+o.width)return o}return null}function a(e){(e.data||e).preventDefault()}function r(n){function i(){p=null,y=0,h=0,m.removeListener("mouseup",d),g.removeListener("mousedown",c),g.removeListener("mousemove",u),m.getBody().setStyle("cursor","auto")}function o(){for(var t=p.index,n=CKEDITOR.tools.buildTableMap(p.table),i=[],o=[],r=Number.MAX_VALUE,s=r,l=p.rtl,c=0,d=n.length;c
',m),n.on("destroy",function(){g.remove()}),m.getDocumentElement().append(g),this.attachTo=function(e){h||(p=e,g.setStyles({width:l(e.width),height:l(e.height),left:l(e.x),top:l(e.y)}),g.on("mousedown",c,this),m.getBody().setStyle("cursor","col-resize"),g.show())};var T=this.move=function(e){if(!p)return 0;if(!h&&(ep.x+p.width))return i(),0;var t=e-Math.round(g.$.offsetWidth/2);if(h){if(t===v||t===R)return 1;t=Math.max(t,v),t=Math.min(t,R),y=t-f}return g.setStyle("left",l(t)),1}}function s(e){var t=e.data.getTarget();if("mouseout"===e.name){if(!t.is("table"))return;for(var n=new CKEDITOR.dom.element(e.data.$.relatedTarget||e.data.$.toElement);n&&n.$&&!n.equals(t)&&!n.is("body");)n=n.getParent();if(!n||n.equals(t))return}t.getAscendant("table",1).removeCustomData("_cke_table_pillars"),e.removeListener()}if(!CKEDITOR.plugins.get("ae_tableresize")){var l=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("ae_tableresize",{requires:"ae_tabletools",init:function(e){e.on("contentDom",function(){var t,n=e.editable();n.attachListener(n.isInline()?n:e.document,"mousemove",function(n){n=n.data;var l=n.getTarget();if(l.type===CKEDITOR.NODE_ELEMENT){var c=n.getPageOffset().x;if(t&&t.move(c))return void a(n);var d,u;if((l.is("table")||l.getAscendant("tbody",1))&&(d=l.getAscendant("table",1),e.editable().contains(d))){(u=d.getCustomData("_cke_table_pillars"))||(d.setCustomData("_cke_table_pillars",u=i(d)),d.on("mouseout",s),d.on("mousedown",s));var p=o(u,c);p&&(!t&&(t=new r(e)),t.attachTo(p))}}})})}})}}(),function(){function e(e){function t(e){i.length>0||e.type==CKEDITOR.NODE_ELEMENT&&y.test(e.getName())&&!e.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(o,e,"selected_cell",!0),i.push(e))}for(var n=e.getRanges(),i=[],o={},a=0;a1&&f&&h[b]==f[b]?(v=h[b],v.rowSpan+=1):(v=new CKEDITOR.dom.element(h[b]).clone(),v.removeAttribute("rowSpan"),v.appendBogus(),E.append(v),v=v.$),b+=v.colSpan-1}n?E.insertBefore(m):E.insertAfter(m)}function i(t){if(t instanceof CKEDITOR.dom.selection){for(var n=e(t),o=n[0],a=o.getAscendant("table"),r=CKEDITOR.tools.buildTableMap(a),s=n[0].getParent(),l=s.$.rowIndex,c=n[n.length-1],d=c.getParent().$.rowIndex+c.$.rowSpan-1,u=[],p=l;p<=d;p++){for(var m=r[p],g=new CKEDITOR.dom.element(a.$.rows[p]),h=0;h0?b[l-1]:null)||a.$.parentNode);for(p=u.length;p>=0;p--)i(u[p]);return v}return t instanceof CKEDITOR.dom.element&&(a=t.getAscendant("table"),1==a.$.rows.length?a.remove():t.remove()),null}function o(e,t){for(var n=e.getParent(),i=n.$.cells,o=0,a=0;an)&&(n=a)}return n}function r(t,n){for(var i=e(t),o=i[0],r=o.getAscendant("table"),s=a(i,1),l=a(i),c=n?s:l,d=CKEDITOR.tools.buildTableMap(r),u=[],p=[],m=d.length,g=0;g1&&p[g]==u[g]?(f=u[g],f.colSpan+=1):(f=new CKEDITOR.dom.element(u[g]).clone(),f.removeAttribute("colSpan"),f.appendBogus(),f[n?"insertBefore":"insertAfter"].call(f,new CKEDITOR.dom.element(u[g])),f=f.$),g+=f.rowSpan-1)}}function s(t){for(var n,i,o=e(t),a=o[0],r=o[o.length-1],s=a.getAscendant("table"),l=CKEDITOR.tools.buildTableMap(s),c=[],d=0,u=l.length;d=0;r--)c(i[r]);a?u(a,!0):o&&o.remove()}else if(n instanceof CKEDITOR.dom.element){var s=n.getParent();1==s.getChildCount()?s.remove():n.remove()}}function d(e){var t=e.getBogus();t&&t.remove(),e.trim()}function u(e,t){var n=e.getDocument(),i=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(i.focus(),n.focus());var o=new CKEDITOR.dom.range(n);o["moveToElementEdit"+(t?"End":"Start")](e)||(o.selectNodeContents(e),o.collapse(!t)),o.select(!0)}function p(e,t,n){var i=e[t];if("undefined"==typeof n)return i;for(var o=0;i&&o1&&(i+=o[t].rowSpan-1)}return n}function g(t,n,i){var o,a=e(t);if((n?1!=a.length:a.length<2)||(o=t.getCommonAncestor())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("table"))return!1;var r,s=a[0],l=s.getAscendant("table"),c=CKEDITOR.tools.buildTableMap(l),u=c.length,m=c[0].length,g=s.getParent().$.rowIndex,h=p(c,g,s);if(n){var f;try{var y=parseInt(s.getAttribute("rowspan"),10)||1,E=parseInt(s.getAttribute("colspan"),10)||1;f=c["up"==n?g-y:"down"==n?g+y:g]["left"==n?h-E:"right"==n?h+E:h]}catch(b){return!1}if(!f||s.$==f)return!1;a["up"==n||"left"==n?"unshift":"push"](new CKEDITOR.dom.element(f))}for(var v=s.getDocument(),R=g,T=0,C=0,_=!i&&new CKEDITOR.dom.documentFragment(v),A=0,I=0;I=m?s.removeAttribute("rowSpan"):s.$.rowSpan=T,T>=u?s.removeAttribute("colSpan"):s.$.colSpan=C;var N=new CKEDITOR.dom.nodeList(l.$.rows),B=N.count();for(I=B-1;I>=0;I--){var K=N.getItem(I);K.$.cells.length||(K.remove(),B++)}return s}function h(t,n){var i=e(t);if(i.length>1)return!1;if(n)return!0;var o,a,r,s,l=i[0],c=l.getParent(),d=c.getAscendant("table"),u=CKEDITOR.tools.buildTableMap(d),m=c.$.rowIndex,g=p(u,m,l),h=l.$.rowSpan;if(h>1){a=Math.ceil(h/2),r=Math.floor(h/2),s=m+a;var f,y=new CKEDITOR.dom.element(d.$.rows[s]),E=p(u,s);o=l.clone();for(var b=0;bg){o.insertBefore(new CKEDITOR.dom.element(f));break}f=null}f||y.append(o)}else{r=a=1,y=c.clone(),y.insertAfter(c),y.append(o=l.clone());for(var v=p(u,m),R=0;R1)return!1;if(n)return!0;var o,a,r,s=i[0],l=s.getParent(),c=l.getAscendant("table"),d=CKEDITOR.tools.buildTableMap(c),u=l.$.rowIndex,g=p(d,u,s),h=s.$.colSpan;if(h>1)a=Math.ceil(h/2),r=Math.floor(h/2);else{r=a=1;for(var f=m(d,g),y=0;y>>0),i=t(n,e);return new i}})}})}}(),function(){function e(){}function t(e,t,o){var a=AlloyEditor.Buttons[e];return i[o.name]=i[o.name]||{},i[o.name][e]=i[o.name][e]||t,a||(a=React.createClass(CKEDITOR.tools.merge(n,{displayName:e,propTypes:{editor:React.PropTypes.object.isRequired,tabIndex:React.PropTypes.number},statics:{key:e},render:function(){var t=this.props.editor.get("nativeEditor"),n=i[t.name][e].name||i[t.name][e].command||e,o="ae-button ae-button-bridge",a="ae-icon-"+n,r={},s=CKEDITOR.skin.getIconStyle(n);if(s){var l=s.split(";");r.backgroundImage=l[0].substring(l[0].indexOf(":")+1),r.backgroundPosition=l[1].substring(l[1].indexOf(":")+1),r.backgroundSize=l[2].substring(l[2].indexOf(":")+1)}var c;return this.props.expanded&&(c=this._getMenu()),React.createElement("div",{className:"ae-container ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":i[t.name][e].label,className:o,onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:i[t.name][e].label},React.createElement("span",{className:a,style:r})),c)},_getMenu:function(){return React.createElement(AlloyEditor.ButtonDropdown,{onDismiss:this.props.toggleDropdown},this._getMenuItems())},_getMenuItems:function(){var e=this.props.editor.get("nativeEditor"),n=t.onMenu(),i=Object.keys(n).map(function(t){var i=e.getMenuItem(t);if(!i)return null;var o=i.definition||i,a=n[t],r="ae-toolbar-element "+(a===CKEDITOR.TRISTATE_ON?"active":""),s=a===CKEDITOR.TRISTATE_DISABLED,l=function(){o.command?e.execCommand(o.command):o.onClick&&o.onClick.apply(o)};return React.createElement("li",{key:i.name,role:"option"},React.createElement("button",{className:r,disabled:s,onClick:l},o.label))}.bind(this));return i}})),AlloyEditor.Buttons[e]=a),a}if(!CKEDITOR.plugins.get("ae_menubuttonbridge")){var n={toFeature:e},i={};CKEDITOR.plugins.get("menubutton")||(CKEDITOR.UI_MENU_BUTTON="menubutton",CKEDITOR.plugins.add("menubutton",{})),CKEDITOR.plugins.add("ae_menubuttonbridge",{requires:["ae_uibridge","ae_menubridge"],init:function(e){e.ui.addMenuButton=function(e,t){this.add(e,CKEDITOR.UI_MENUBUTTON,t)},e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,{add:t,create:function(e){var n="buttonBridge"+(1e9*Math.random()>>>0),i=t(n,e);return new i}})}})}}(),function(){CKEDITOR.plugins.get("ae_menubridge")||CKEDITOR.plugins.add("ae_menubridge",{init:function(e){if(!CKEDITOR.plugins.get("menu")){for(var t=[],n=e._.menuGroups={},i=e._.menuItems={},o=0;o>>0),n=i(t,e);return new n}})}})}}(),function(){function e(){}if(!CKEDITOR.plugins.get("ae_richcombobridge")){var t={commit:e,createPanel:e,disable:e,enable:e,getState:e,hideGroup:e,hideItem:e,mark:e,showAll:e,startGroup:e,unmarkAll:e},n={},i=function(e,i,o){var a=AlloyEditor.Buttons[e];return n[o.name]=n[o.name]||{},n[o.name][e]=n[o.name][e]||i,n[o.name][e].currentValue=void 0,a||(a=React.createClass(CKEDITOR.tools.merge(t,{displayName:e,propTypes:{editor:React.PropTypes.object.isRequired},statics:{key:e},add:function(e,t,n){this._items.push({preview:t,title:n,value:e})},componentWillMount:function(){var t=this.props.editor.get("nativeEditor"),i=n[t.name][e];this._items=[],this.setValue=this._setValue,i.init&&i.init.call(this),i.onRender&&i.onRender.call(this)},componentWillUnmount:function(){this._cacheValue(this.state.value),this.setValue=this._cacheValue},getInitialState:function(){return{value:n[o.name][e].currentValue}},getValue:function(){return this.state.value},render:function(){var t,o=this.props.editor.get("nativeEditor"),a=n[o.name][e].currentValue||i.label;return this.props.expanded&&(t=this._getItemsList()),React.createElement("div",{className:"ae-container-dropdown ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":a,className:"ae-toolbar-element",onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:a},React.createElement("div",{className:"ae-container"},React.createElement("span",{className:"ae-container-dropdown-selected-item"},a),React.createElement("span",{className:"ae-icon-arrow"}))),t)},_cacheValue:function(t){var i=this.props.editor.get("nativeEditor");n[i.name][e].currentValue=t},_getItems:function(){var e=this,t=this._items.map(function(t){var n="ae-toolbar-element "+(t.value===this.state.value?"active":"");return React.createElement("li",{key:t.title,role:"option"},React.createElement("button",{className:n,dangerouslySetInnerHTML:{__html:t.preview},"data-value":t.value,onClick:e._onClick}))}.bind(this));return t},_getItemsList:function(){return React.createElement(AlloyEditor.ButtonDropdown,{onDismiss:this.props.toggleDropdown},this._getItems())},_onClick:function(t){var i=this.props.editor.get("nativeEditor"),o=n[i.name][e];if(o.onClick){var a=t.currentTarget.getAttribute("data-value");o.onClick.call(this,a),n[i.name][e].currentValue=a,i.fire("actionPerformed",this)}},_setValue:function(e){this._cacheValue(e),this.setState({value:e})}})),AlloyEditor.Buttons[e]=a),a};CKEDITOR.plugins.get("richcombo")||(CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.plugins.add("richcombo",{})),CKEDITOR.plugins.add("ae_richcombobridge",{requires:["ae_uibridge"],init:function(e){e.ui.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)},e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,{add:i,create:function(e){var t="richComboBridge"+(1e9*Math.random()>>>0),n=i(t,e);return new n}})}})}}(),function(){CKEDITOR.plugins.get("ae_uibridge")||CKEDITOR.plugins.add("ae_uibridge",{beforeInit:function(e){var t=e.ui.add;e.ui.add=function(n,i,o){t.apply(this,arguments);var a=this._.handlers[i];a&&a.add&&a.add(n,o,e)}}})}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){var e={isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},isBoolean:function(e){return"boolean"==typeof e},isFunction:function(e){return"function"==typeof e},isNull:function(e){return null===e},isNumber:function(e){return"number"==typeof e&&isFinite(e)},isObject:function(t){var n="undefined"==typeof t?"undefined":_typeof(t);return t&&("object"===n||e.isFunction(t))},isString:function(e){return"string"==typeof e},mix:function(e,t){var n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&(e[i]=t[i])},toInt:function(e){return parseInt(e,10)}};AlloyEditor.Lang=e}(),function(){var e={extend:function(e,t,n,i){if(!t||!e)throw"extend failed, verify dependencies";var o=t.prototype,a=Object.create(o);return e.prototype=a,a.constructor=e,e.superclass=o,t!==Object&&o.constructor===Object.prototype.constructor&&(o.constructor=t),n&&AlloyEditor.Lang.mix(a,n),i&&AlloyEditor.Lang.mix(e,i),e}};AlloyEditor.OOP=e}(),function(){function e(e){this.__config__=e||{},this.__ATTRS__={}}e.prototype={constructor:e,get:function(e){var t=this.constructor.ATTRS[e];if(t){this._isInitialized(e)||this._init(e);var n=this.__ATTRS__[e];return t.getter&&(n=this._callStringOrFunction(t.getter,n)),n}},set:function(e,t){var n=this.constructor.ATTRS[e];n&&(this._isInitialized(e)||this._init(e),n.readOnly||n.writeOnce&&this._isInitialized(e)||n.validator&&!this._callStringOrFunction(n.validator,t)||(n.setter&&(t=this._callStringOrFunction(n.setter,t)),this.__ATTRS__[e]=t))},_callStringOrFunction:function(e,t){var n=null;return AlloyEditor.Lang.isArray(t)||(t=[t]),AlloyEditor.Lang.isString(e)&&AlloyEditor.Lang.isFunction(this[e])?n=this[e].apply(this,t):AlloyEditor.Lang.isFunction(e)&&(n=e.apply(this,t)),n},_init:function(e){var t,n=this.constructor.ATTRS[e],i=Object.prototype.hasOwnProperty.call(n,"value"),o=Object.prototype.hasOwnProperty.call(this.__config__,e); if(n.valueFn)t=this._callStringOrFunction(n.valueFn,t),this.__ATTRS__[e]=t;else if(n.readOnly)t=n.value;else if(n.writeOnce)if(o)t=this.__config__[e];else{if(!i)return;t=n.value}else o?t=this.__config__[e]:i&&(t=n.value);if(n.validator&&o&&!this._callStringOrFunction(n.validator,t)){if(!i)return;t=n.value}n.setter&&o&&(t=this._callStringOrFunction(n.setter,t)),this.__ATTRS__[e]=t},_isInitialized:function(e){return Object.prototype.hasOwnProperty.call(this.__ATTRS__,e)}},AlloyEditor.Attribute=e}(),function(){function e(t){e.superclass.constructor.call(this,t),this.init(t)}AlloyEditor.OOP.extend(e,AlloyEditor.Attribute,{init:function(e){this._callChain("initializer",e)},destroy:function(){this._callChain("destructor")},_callChain:function(e,t){for(var n=[],i=this.constructor;i;)AlloyEditor.Lang.isFunction(i.prototype[e])&&n.push(i.prototype[e]),i=i.superclass?i.superclass.constructor:null;n=n.reverse(),t=AlloyEditor.Lang.isArray(t)?t:[t];for(var o=0;o>>0).toString(),i=e.getCommand(n);i||(i=new CKEDITOR.command(e,{exec:function(e){var n=t.fn;AlloyEditor.Lang.isString(n)?this[n].call(this,e):AlloyEditor.Lang.isFunction(n)&&n.call(this,e)}.bind(this)}),e.addCommand(n,i)),this._defaultKeystrokeCommand=e.keystrokeHandler.keystrokes[t.keys],e.setKeystroke(t.keys,n)},componentWillUnmount:function(){this.props.editor.get("nativeEditor").setKeystroke(this.props.keystroke.keys,this._defaultKeystrokeCommand)}};AlloyEditor.ButtonKeystroke=e}(),function(){var e={propTypes:{editor:React.PropTypes.object.isRequired},mergeButtonCfgProps:function(e){e=e||this.props;var t=this.props.editor.get("nativeEditor"),n=t.config.buttonCfg||{},i=CKEDITOR.tools.merge(e,n[AlloyEditor.ButtonLinkEdit.key]);return i}};AlloyEditor.ButtonCfgProps=e}(),function(){var e={getStateClasses:function(){var e="";return AlloyEditor.Lang.isFunction(this.isActive)&&this.isActive()&&(e+="ae-button-pressed"),AlloyEditor.Lang.isFunction(this.isDisabled)&&this.isDisabled()&&(e+=" ae-button-disabled"),e}};AlloyEditor.ButtonStateClasses=e}(),function(){var e={propTypes:{style:React.PropTypes.oneOfType([React.PropTypes.object,React.PropTypes.string])},componentWillMount:function(){var e=AlloyEditor.Lang,t=this.props.style;if(e.isString(t)){for(var n=t.split("."),i=this.props.editor.get("nativeEditor").config,o=n.shift();o&&e.isObject(i)&&e.isObject(i[o]);)i=i[o],o=n.shift();e.isObject(i)&&(t=i)}this._style=new CKEDITOR.style(t)},componentWillUnmount:function(){this._style=null},getStyle:function(){return this._style},isActive:function(){var e,t=this.props.editor.get("nativeEditor"),n=t.elementPath();return e=this.getStyle().checkActive(n,t)}};AlloyEditor.ButtonStyle=e}(),function(){var e={getToolbarButtons:function(e,t){var n={},i=this.props.editor.get("nativeEditor"),o=i.config.buttonCfg||{},a=this.filterExclusive(e.filter(function(e){return e&&(AlloyEditor.Buttons[e]||AlloyEditor.Buttons[e.name])}).map(function(e){return AlloyEditor.Lang.isString(e)?(n[e]=o[e],e=AlloyEditor.Buttons[e]):AlloyEditor.Lang.isString(e.name)&&(n[AlloyEditor.Buttons[e.name].key]=CKEDITOR.tools.merge(o[e],e.cfg),e=AlloyEditor.Buttons[e.name]),e})).map(function(e){var i=this.mergeExclusiveProps({editor:this.props.editor,key:e.key,tabKey:e.key,tabIndex:this.props.trigger&&this.props.trigger.props.tabKey===e.key?0:-1,trigger:this.props.trigger},e.key);return i=this.mergeDropdownProps(i,e.key),t&&(i=CKEDITOR.tools.merge(i,t)),i=CKEDITOR.tools.merge(i,n[e.key]),React.createElement(e,i)},this);return a}};AlloyEditor.ToolbarButtons=e}(),function(){var e={getArrowBoxClasses:function(){var e="ae-arrow-box";return AlloyEditor.Lang.isFunction(this.getInteractionPoint)&&this.getInteractionPoint()&&(e+=this.getInteractionPoint().direction===CKEDITOR.SELECTION_TOP_TO_BOTTOM?" ae-arrow-box-top":" ae-arrow-box-bottom"),e}};AlloyEditor.WidgetArrowBox=e}(),function(){var e={componentWillReceiveProps:function(e){this.setState({dropdownTrigger:null,itemDropdown:null})},getInitialState:function(){return{dropdownTrigger:null,itemDropdown:null}},mergeDropdownProps:function(e,t){return CKEDITOR.tools.merge(e,{expanded:this.state.itemDropdown===t,tabIndex:this.state.dropdownTrigger===t?0:-1,toggleDropdown:this.toggleDropdown.bind(this,t)})},toggleDropdown:function(e,t){this.setState({dropdownTrigger:e,itemDropdown:e!==this.state.itemDropdown?e:null},function(){this.state.itemDropdown||(this.moveFocus?this.moveFocus(t):ReactDOM.findDOMNode(this).focus())})}};AlloyEditor.WidgetDropdown=e}(),function(){var e={cancelExclusive:function(e){this.state.itemExclusive===e&&this.setState({itemExclusive:null})},componentWillReceiveProps:function(e){this.setState({itemExclusive:null})},filterExclusive:function(e){return e.filter(function(e){return this.state.itemExclusive?this.state.itemExclusive===e.key?e:void 0:e}.bind(this))},mergeExclusiveProps:function(e,t){return CKEDITOR.tools.merge(e,{cancelExclusive:this.cancelExclusive.bind(this,t),renderExclusive:this.state.itemExclusive===t,requestExclusive:this.requestExclusive.bind(this,t)})},requestExclusive:function(e){this.setState({itemExclusive:e})}};AlloyEditor.WidgetExclusive=e}(),function(){var e=0,t=1,n=-1,i=0,o=1,a=2,r={propTypes:{onDismiss:React.PropTypes.func,circular:React.PropTypes.bool.isRequired,focusFirstChild:React.PropTypes.bool,descendants:React.PropTypes.string.isRequired,keys:React.PropTypes.object.isRequired},componentDidMount:function(){this._refresh()},componentDidUpdate:function(){this._refresh()},focus:function(e){if((!e||this._isValidTarget(e.target))&&this._descendants){var t=this._descendants[this._activeDescendant];document.activeElement===t||this.props.focusFirstChild||this._descendants.indexOf(document.activeElement)===-1&&t.focus(),e&&(e.stopPropagation(),e.preventDefault())}},handleKey:function(e){if(this._isValidTarget(e.target)&&this._descendants){var t=this._getFocusAction(e);t.type&&(e.stopPropagation(),e.preventDefault(),t.type===o&&this._moveFocus(t.direction),t.type===a&&this.props.onDismiss(t.direction))}},moveFocus:function(e){e=AlloyEditor.Lang.isNumber(e)?e:0,this._moveFocus(e)},_getFocusAction:function(e){var t={type:i};if(this.props.keys){var n=this._getFocusMoveDirection(e);n&&(t.direction=n,t.type=o);var r=this._getFocusDismissAction(e,n);r.dismiss&&(t.direction=r.direction,t.type=a)}return t},_getFocusDismissAction:function(e,i){var o={direction:i,dismiss:!1};return this.props.onDismiss&&(this._isValidKey(e.keyCode,this.props.keys.dismiss)&&(o.dismiss=!0),this._isValidKey(e.keyCode,this.props.keys.dismissNext)&&(o.dismiss=!0,o.direction=t),this._isValidKey(e.keyCode,this.props.keys.dismissPrev)&&(o.dismiss=!0,o.direction=n),o.dismiss||this.props.circular||!i||(o.dismiss=i===n&&0===this._activeDescendant||i===t&&this._activeDescendant===this._descendants.length-1)),o},_getFocusMoveDirection:function(i){var o=e;return this._isValidKey(i.keyCode,this.props.keys.next)&&(o=t),this._isValidKey(i.keyCode,this.props.keys.prev)&&(o=n),i.shifKey&&(o*=-1),o},_isValidKey:function(e,t){return AlloyEditor.Lang.isArray(t)?t.indexOf(e)!==-1:e===t},_isValidTarget:function(e){var t=e.tagName.toLowerCase();return"input"!==t&&"select"!==t&&"textarea"!==t},_moveFocus:function(e){var t=this._descendants.length,n=this._descendants[this._activeDescendant];n.setAttribute("tabIndex",-1),this._activeDescendant+=e,this.props.circular?this._activeDescendant=(this._activeDescendant%t+t)%t:this._activeDescendant=Math.max(Math.min(this._activeDescendant,t-1),0),n=this._descendants[this._activeDescendant],n.setAttribute("tabIndex",0),n.focus()},_refresh:function(){var e=ReactDOM.findDOMNode(this);if(e){var t=e.querySelectorAll(this.props.descendants),n=[];this._descendants=[],Array.prototype.slice.call(t).forEach(function(e){var t=e.getAttribute("data-tabindex");t?n.push(e):this._descendants.push(e)}.bind(this)),n=n.sort(function(e,t){return AlloyEditor.Lang.toInt(e.getAttribute("data-tabindex"))>AlloyEditor.Lang.toInt(t.getAttribute("data-tabindex"))}),this._descendants=n.concat(this._descendants),this._activeDescendant=0,this._descendants.some(function(e,t){if("0"===e.getAttribute("tabindex"))return this._activeDescendant=t,this.focus(),!0}.bind(this))}}};AlloyEditor.WidgetFocusManager=r}(),function(){var e={propTypes:{editorEvent:React.PropTypes.object},getInteractionPoint:function(){var e=this.props.editorEvent?this.props.editorEvent.data:null;if(e){var t=e.selectionData,n=e.nativeEvent,i={x:e.nativeEvent.pageX,y:t.region.top},o=t.region.direction,a=t.region.endRect,r=t.region.startRect;a&&r&&r.top===a.top&&(o=CKEDITOR.SELECTION_BOTTOM_TO_TOP);var s,l;return i.x&&i.y?(s=this._getXPoint(t,i.x),l=o===CKEDITOR.SELECTION_BOTTOM_TO_TOP?Math.min(i.y,t.region.top):Math.max(i.y,this._getYPoint(t,n))):(s=t.region.left+t.region.width/2,l=o===CKEDITOR.SELECTION_TOP_TO_BOTTOM?this._getYPoint(t,n):t.region.top),{direction:o,x:s,y:l}}},_getXPoint:function(e,t){var n,i=e.region,o=i.startRect?i.startRect.left:i.left,a=i.endRect?i.endRect.right:i.right;if(ot)n=t;else{var r=Math.abs(o-t),s=Math.abs(a-t);n=rt.width&&(n-=e.left+e.width-t.width),i<0&&(i=0),{x:n,y:i}},getWidgetXYPoint:function(e,t,n){var i=ReactDOM.findDOMNode(this),o=this.props.gutter;return n===CKEDITOR.SELECTION_TOP_TO_BOTTOM||n===CKEDITOR.SELECTION_BOTTOM_TO_TOP?(e=e-o.left-i.offsetWidth/2,t=n===CKEDITOR.SELECTION_TOP_TO_BOTTOM?t+o.top:t-i.offsetHeight-o.top):n!==CKEDITOR.SELECTION_LEFT_TO_RIGHT&&n!==CKEDITOR.SELECTION_RIGHT_TO_LEFT||(e=n===CKEDITOR.SELECTION_LEFT_TO_RIGHT?e+o.left+i.offsetHeight/2:e-3*i.offsetHeight/2-o.left,t=t-o.top-i.offsetHeight/2),e<0&&(e=0),t<0&&(t=0),[e,t]},isVisible:function(){var e=ReactDOM.findDOMNode(this);if(e){var t=new CKEDITOR.dom.element(e);return t.hasClass("alloy-editor-visible")}return!1},moveToPoint:function(e,t){var n=new CKEDITOR.dom.element(ReactDOM.findDOMNode(this));n.setStyles({left:e[0]+"px",top:e[1]+"px",opacity:0}),n.removeClass("alloy-editor-invisible"),this._animate(function(){n.addClass("ae-toolbar-transition"),n.addClass("alloy-editor-visible"),n.setStyles({left:t[0]+"px",top:t[1]+"px",opacity:1})})},show:function(){var e=ReactDOM.findDOMNode(this);if(!this.isVisible()&&e){var t=this.getInteractionPoint();if(t){var n,i,o,a,r=new CKEDITOR.dom.element(e);if(n=o=parseFloat(r.getStyle("left")),i=a=parseFloat(r.getStyle("top")),this.props.constrainToViewport){var s=this.getConstrainedPosition({height:parseFloat(e.offsetHeight),left:n,top:i,width:parseFloat(e.offsetWidth)});n=s.x,i=s.y}a=t.direction===CKEDITOR.SELECTION_TOP_TO_BOTTOM?this.props.selectionData.region.bottom:this.props.selectionData.region.top,this.moveToPoint([o,a],[n,i])}}},updatePosition:function(){var e=this.getInteractionPoint(),t=ReactDOM.findDOMNode(this);if(e&&t){var n=this.getWidgetXYPoint(e.x,e.y,e.direction);new CKEDITOR.dom.element(t).setStyles({left:n[0]+"px",top:n[1]+"px"})}},_animate:function(e){window.requestAnimationFrame?this._animationFrameId=window.requestAnimationFrame(e):e()}};AlloyEditor.WidgetPosition=e}(),function(){var e=React.createClass({displayName:"ButtonBold",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonKeystroke],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"bold"},getDefaultProps:function(){return{command:"bold",keystroke:{fn:"execCommand",keys:CKEDITOR.CTRL+66},style:"coreStyles_bold"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.bold,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-bold",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.bold},React.createElement("span",{className:"ae-icon-bold"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonBold=e}(),function(){var e=React.createClass({displayName:"ButtonCameraImage",statics:{key:"cameraImage"},getDefaultProps:function(){return{videoWidth:320}},componentDidMount:function(){ReactDOM.findDOMNode(this.refs.buttonTakePhoto).focus()},componentWillUnmount:function(){this._stream&&(this._stream.stop?this._stream.stop():this._stream.getVideoTracks&&this._stream.getVideoTracks().forEach(function(e){e.stop()}),this._stream=null)},render:function(){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e.call(navigator,{video:!0,audio:!1},this._handleStreamSuccess,this._handleStreamError),React.createElement("div",{className:"ae-camera"},React.createElement("video",{ref:"videoContainer"},"Video stream not available."),React.createElement("button",{className:"ae-camera-shoot",onClick:this.takePhoto,ref:"buttonTakePhoto"},"Take photo"),React.createElement("canvas",{className:"ae-camera-canvas",ref:"canvasContainer"}))},takePhoto:function(){var e=ReactDOM.findDOMNode(this.refs.videoContainer),t=ReactDOM.findDOMNode(this.refs.canvasContainer),n=t.getContext("2d"),i=this._videoHeight,o=this.props.videoWidth;if(o&&i){t.width=o,t.height=i,n.drawImage(e,0,0,o,i);var a=t.toDataURL("image/png"),r=CKEDITOR.dom.element.createFromHtml(''),s=this.props.editor.get("nativeEditor");s.insertElement(r),this.props.cancelExclusive(),s.fire("actionPerformed",this),s.fire("imageCameraAdd",r)}},_handleStreamError:function(e){window.alert("An error occurred! "+e)},_handleStreamSuccess:function(e){var t=ReactDOM.findDOMNode(this.refs.videoContainer),n=ReactDOM.findDOMNode(this.refs.canvasContainer);t.addEventListener("canplay",function(e){var i=t.videoHeight/(t.videoWidth/this.props.videoWidth);isNaN(i)&&(i=this.props.videoWidth/(4/3)),t.setAttribute("width",this.props.videoWidth),t.setAttribute("height",i),n.setAttribute("width",this.props.videoWidth),n.setAttribute("height",i),this._videoHeight=i}.bind(this),!1),this._stream=e,navigator.mozGetUserMedia?t.mozSrcObject=e:t.src=(window.URL||window.webkitURL).createObjectURL(e),t.play(),ReactDOM.findDOMNode(this.refs.buttonTakePhoto).disabled=!1}});AlloyEditor.ButtonCameraImage=e}(),function(){var e=React.createClass({displayName:"ButtonCamera",propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"camera"},render:function(){if(this.props.renderExclusive)return React.createElement(AlloyEditor.ButtonCameraImage,this.props);var t=!(navigator.getUserMedia||navigator.webkitGetUserMedia&&"https"===location.protocol||navigator.mozGetUserMedia||navigator.msGetUserMedia),n=t?AlloyEditor.Strings.cameraDisabled:AlloyEditor.Strings.camera;return React.createElement("button",{"aria-label":n,className:"ae-button","data-type":"button-image-camera",disabled:t,onClick:this.props.requestExclusive.bind(e.key),tabIndex:this.props.tabIndex,title:n},React.createElement("span",{className:"ae-icon-camera"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonCamera=e}(),function(){var e=React.createClass({displayName:"ButtonCode",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonActionStyle],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"code"},getDefaultProps:function(){return{style:{element:"pre"}}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.code,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-code",onClick:this.applyStyle,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.code},React.createElement("span",{className:"ae-icon-code"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonCode=e}(),function(){var e=React.createClass({displayName:"ButtonCommandListItem",mixins:[AlloyEditor.ButtonCommand],propTypes:{description:React.PropTypes.string.isRequired,icon:React.PropTypes.string},statics:{key:"buttonCommandListItem"},render:function(){return React.createElement("button",{"aria-label":this.props.description,className:this._getClassName(),onClick:this.execCommand,tabIndex:this.props.tabIndex},this.props.description)},_getClassName:function(){var e="ae-toolbar-element";return this.props.icon&&(e+=" ae-icon-"+this.props.icon),e}});AlloyEditor.ButtonCommandListItem=e}(),function(){var e=React.createClass({displayName:"ButtonCommandsList",mixins:[AlloyEditor.WidgetFocusManager],propTypes:{commands:React.PropTypes.arrayOf(React.PropTypes.object),editor:React.PropTypes.object.isRequired,listId:React.PropTypes.string},statics:{key:"buttonCommandsList"},componentDidMount:function(){ReactDOM.findDOMNode(this).focus()},getDefaultProps:function(){return{circular:!1,descendants:".ae-toolbar-element",keys:{dismiss:[27],dismissNext:[39],dismissPrev:[37],next:[40],prev:[38]}}},render:function(){return React.createElement("div",{className:"ae-dropdown ae-arrow-box ae-arrow-box-top-left",onFocus:this.focus,onKeyDown:this.handleKey,tabIndex:"0"},React.createElement("ul",{className:"ae-listbox",id:this.props.listId,role:"listbox"},this._renderActions(this.props.commands)))},_renderActions:function(e){var t,n=this.props.editor;return e&&e.length&&(t=e.map(function(e){return React.createElement("li",{key:e.command,role:"option"},React.createElement(AlloyEditor.ButtonCommandListItem,{command:e.command,description:"string"==typeof e.label?e.label:e.label(),editor:n}))})),t}});AlloyEditor.ButtonCommandsList=e}(),function(){var e=React.createClass({displayName:"ButtonDropdown",mixins:[AlloyEditor.WidgetFocusManager],getDefaultProps:function(){return{circular:!1,descendants:".ae-toolbar-element",keys:{dismiss:[27],dismissNext:[39],dismissPrev:[37],next:[40],prev:[38]}}},statics:{key:"dropdown"},render:function(){return React.createElement("div",{className:"ae-dropdown ae-arrow-box ae-arrow-box-top-left",onFocus:this.focus,onKeyDown:this.handleKey,tabIndex:"0"},React.createElement("ul",{className:"ae-listbox",role:"listbox"},this.props.children))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonDropdown=e}(),function(){var e=13,t=27,n=React.createClass({displayName:"ButtonEmbedEdit",propTypes:{editor:React.PropTypes.object.isRequired},statics:{key:"embedEdit"},componentDidMount:function(){(this.props.renderExclusive||this.props.manualSelection)&&(window.requestAnimationFrame?window.requestAnimationFrame(this._focusLinkInput):setTimeout(this._focusLinkInput,0))},componentWillReceiveProps:function(e){this.replaceState(this.getInitialState())},getInitialState:function(){var e,t=this.props.editor.get("nativeEditor"),n=t.getSelection();if(n){var i=n.getSelectedElement();i&&(e=i.findOne('[data-widget="ae_embed"]'))}var o=e?e.getAttribute("data-ae-embed-url"):"";return{element:e,initialLink:{href:o},linkHref:o}},render:function(){var e={opacity:this.state.linkHref?1:0};return React.createElement("div",{className:"ae-container-edit-link"},React.createElement("button",{"aria-label":AlloyEditor.Strings.deleteEmbed,className:"ae-button","data-type":"button-embed-remove",disabled:!this.state.element,onClick:this._removeEmbed,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.deleteEmbed},React.createElement("span",{className:"ae-icon-bin"})),React.createElement("div",{className:"ae-container-input xxl"},React.createElement("input",{className:"ae-input",onChange:this._handleLinkHrefChange,onKeyDown:this._handleKeyDown,placeholder:AlloyEditor.Strings.editLink,ref:"linkInput",type:"text",value:this.state.linkHref}),React.createElement("button",{"aria-label":AlloyEditor.Strings.clearInput,className:"ae-button ae-icon-remove",onClick:this._clearLink,style:e,title:AlloyEditor.Strings.clear})),React.createElement("button",{"aria-label":AlloyEditor.Strings.confirm,className:"ae-button",disabled:!this._isValidState(),onClick:this._embedLink,title:AlloyEditor.Strings.confirm},React.createElement("span",{className:"ae-icon-ok"})))},_clearLink:function(){this.setState({linkHref:""})},_embedLink:function(){var e=this.props.editor.get("nativeEditor");e.execCommand("embedUrl",{url:this.state.linkHref}),this.props.cancelExclusive()},_focusLinkInput:function(){ReactDOM.findDOMNode(this.refs.linkInput).focus()},_handleKeyDown:function(n){if(n.keyCode!==e&&n.keyCode!==t||n.preventDefault(),n.keyCode===e)this._embedLink();else if(n.keyCode===t){var i=this.props.editor.get("nativeEditor");this.props.cancelExclusive(),i.fire("actionPerformed",this)}},_handleLinkHrefChange:function(e){this.setState({linkHref:e.target.value})},_isValidState:function(){var e=this.state.linkHref&&this.state.linkHref!==this.state.initialLink.href;return e},_removeEmbed:function(){var e=this.props.editor.get("nativeEditor"),t=this.state.element.getAscendant(function(e){return e.hasClass("cke_widget_wrapper")});t.remove(),e.fire("actionPerformed",this)}});AlloyEditor.Buttons[n.key]=AlloyEditor.ButtonEmbedEdit=n}(),function(){var e=React.createClass({displayName:"ButtonEmbed",mixins:[AlloyEditor.ButtonKeystroke],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"embed"},getDefaultProps:function(){return{keystroke:{fn:"_requestExclusive",keys:CKEDITOR.CTRL+CKEDITOR.SHIFT+76}}},render:function(){return this.props.renderExclusive?React.createElement(AlloyEditor.ButtonEmbedEdit,this.props):React.createElement("button",{"aria-label":AlloyEditor.Strings.link,className:"ae-button","data-type":"button-embed",onClick:this._requestExclusive,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.link},React.createElement("span",{className:"ae-icon-add"}))},_requestExclusive:function(){this.props.requestExclusive(e.key)}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonEmbed=e}(),function(){var e=React.createClass({displayName:"ButtonH1",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonActionStyle],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"h1"},getDefaultProps:function(){return{style:{element:"h1"}}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.h1,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-h1",onClick:this.applyStyle,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.h1},React.createElement("span",{className:"ae-icon-h1"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonH1=e}(),function(){var e=React.createClass({displayName:"ButtonH2",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonActionStyle],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"h2"},getDefaultProps:function(){return{style:{element:"h2"}}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.h2,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-h2",onClick:this.applyStyle,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.h2},React.createElement("span",{className:"ae-icon-h2"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonH2=e}(),function(){var e=React.createClass({displayName:"ButtonHline",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"hline"},getDefaultProps:function(){return{command:"horizontalrule", style:{element:"hr"}}},render:function(){return React.createElement("button",{"aria-label":AlloyEditor.Strings.horizontalrule,className:"ae-button","data-type":"button-hline",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.horizontalrule},React.createElement("span",{className:"ae-icon-separator"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonHline=e}(),function(){var e=React.createClass({displayName:"ButtonImageAlignCenter",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"imageCenter"},getDefaultProps:function(){return{command:"justifycenter"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignCenter,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-image-align-center",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignCenter},React.createElement("span",{className:"ae-icon-align-center"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonImageAlignCenter=e}(),function(){var e=React.createClass({displayName:"ButtonImageAlignLeft",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"imageLeft"},getDefaultProps:function(){return{command:"justifyleft"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignLeft,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-image-align-left",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignLeft},React.createElement("span",{className:"ae-icon-align-left"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonImageAlignLeft=e}(),function(){var e=React.createClass({displayName:"ButtonImageAlignRight",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"imageRight"},getDefaultProps:function(){return{command:"justifyright"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignRight,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-image-align-right",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignRight},React.createElement("span",{className:"ae-icon-align-right"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonImageAlignRight=e}(),function(){var e=React.createClass({displayName:"ButtonImage",propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"image"},render:function(){var e={display:"none"};return React.createElement("div",null,React.createElement("button",{"aria-label":AlloyEditor.Strings.image,className:"ae-button","data-type":"button-image",onClick:this.handleClick,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.image},React.createElement("span",{className:"ae-icon-image"})),React.createElement("input",{accept:"image/*",onChange:this._onInputChange,ref:"fileInput",style:e,type:"file"}))},handleClick:function(e){ReactDOM.findDOMNode(this.refs.fileInput).click()},_onInputChange:function(){var e=ReactDOM.findDOMNode(this.refs.fileInput);if(e.files.length){var t=new FileReader,n=e.files[0];t.onload=function(e){var t=this.props.editor.get("nativeEditor"),i=t.fire("beforeImageAdd",{imageFiles:n});if(i){var o=CKEDITOR.dom.element.createFromHtml('');t.insertElement(o),t.fire("actionPerformed",this);var a={el:o,file:n};t.fire("imageAdd",a)}}.bind(this),t.readAsDataURL(n),e.value=""}}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonImage=e}(),function(){var e=React.createClass({displayName:"ButtonIndentBlock",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"indentBlock"},getDefaultProps:function(){return{command:"indent"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.indent,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-indent-block",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.indent},React.createElement("span",{className:"ae-icon-indent-block"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonIndentBlock=e}(),function(){var e=React.createClass({displayName:"ButtonItalic",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonKeystroke],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"italic"},getDefaultProps:function(){return{command:"italic",keystroke:{fn:"execCommand",keys:CKEDITOR.CTRL+73},style:"coreStyles_italic"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.italic,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-italic",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.italic},React.createElement("span",{className:"ae-icon-italic"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonItalic=e}(),function(){var e=React.createClass({displayName:"ButtonLinkAutocompleteList",mixins:[AlloyEditor.WidgetFocusManager],propTypes:{data:React.PropTypes.func,autocompleteSelected:React.PropTypes.bool,term:React.PropTypes.string,setAutocompleteState:React.PropTypes.func},statics:{key:"buttonLinkAutocompleteList"},componentWillReceiveProps:function(e){e.term&&e.term===this.props.term||(clearTimeout(this._timeout),e.term?this._timeout=setTimeout(this._updateItems,this.props.delay):this.setState({items:[]})),e.autocompleteSelected&&(setTimeout(this.focus,0),this.props.setAutocompleteState({selected:!1}))},componentWillUnmount:function(){clearTimeout(this._timeout)},getDefaultProps:function(){return{circular:!1,data:[],delay:100,descendants:".ae-toolbar-element",keys:{dismiss:[27],dismissNext:[39],dismissPrev:[37],next:[40],prev:[38]}}},getInitialState:function(){return{items:[]}},render:function(){return this.props.expanded&&this.state.items.length?React.createElement(AlloyEditor.ButtonDropdown,null,this._renderAutocompleteItems(this.state.items)):null},shouldComponentUpdate:function(e,t){return e.expanded!==this.props.expanded||e.term!==this.props.term||t.items!==this.state.items},_renderAutocompleteItems:function(e){e=e||[];var t=this.props.handleLinkAutocompleteClick;return e.map(function(e){var n=this.props.term===e.url?"ae-toolbar-element active":"ae-toolbar-element";return React.createElement("li",{key:e.url,role:"option"},React.createElement("button",{className:n,onClick:t,"data-value":e.url},e.title))}.bind(this))},_updateItems:function(){var e=this;if(this.props.term){var t=Promise.resolve(this.props.data(this.props.term));t.then(function(t){t.length&&!e.props.expanded&&e.props.toggleDropdown(),e.setState({items:t})})}}});AlloyEditor.ButtonLinkAutocompleteList=e}(),function(){var e=React.createClass({displayName:"ButtonLinkEdit",mixins:[AlloyEditor.WidgetDropdown,AlloyEditor.WidgetFocusManager,AlloyEditor.ButtonCfgProps],propTypes:{allowedTargets:React.PropTypes.arrayOf(React.PropTypes.object),appendProtocol:React.PropTypes.bool,editor:React.PropTypes.object.isRequired,defaultLinkTarget:React.PropTypes.string,showTargetSelector:React.PropTypes.bool,data:React.PropTypes.oneOfType([React.PropTypes.func,React.PropTypes.arrayOf(React.PropTypes.object)])},statics:{key:"linkEdit"},componentDidMount:function(){(this.props.renderExclusive||this.props.manualSelection)&&this._focusLinkInput()},componentWillReceiveProps:function(e){this.replaceState(this.getInitialState())},getDefaultProps:function(){return{appendProtocol:!0,autocompleteUrl:"",circular:!0,customIndexStart:!0,defaultLinkTarget:"",descendants:".ae-toolbar-element",keys:{dismiss:[27],dismissNext:[39],dismissPrev:[37],next:[40],prev:[38]},showTargetSelector:!0}},getInitialState:function(){var e=new CKEDITOR.Link(this.props.editor.get("nativeEditor")).getFromSelection(),t=e?e.getAttribute("href"):"",n=e?e.getAttribute("target"):this.props.defaultLinkTarget;return{autocompleteSelected:!1,element:e,initialLink:{href:t,target:n},linkHref:t,linkTarget:n}},render:function(){var e={opacity:this.state.linkHref?1:0},t={allowedTargets:this.props.allowedTargets,editor:this.props.editor,handleLinkTargetChange:this._handleLinkTargetChange,selectedTarget:this.state.linkTarget||AlloyEditor.Strings.linkTargetDefault};t=this.mergeDropdownProps(t,AlloyEditor.ButtonLinkTargetEdit.key);var n;if(this.props.data){var i=this.props.data;if(!AlloyEditor.Lang.isFunction(i)){var o=this.props.data;i=function(e){return o}}var a={autocompleteSelected:this.state.autocompleteSelected,data:i,editor:this.props.editor,handleLinkAutocompleteClick:this._handleLinkAutocompleteClick,onDismiss:this.props.toggleDropdown,setAutocompleteState:this._setAutocompleteState,term:this.state.linkHref};a=this.mergeDropdownProps(a,AlloyEditor.ButtonLinkAutocompleteList.key),n=React.createElement(AlloyEditor.ButtonLinkAutocompleteList,a)}var r;return this.props.showTargetSelector&&(r=React.createElement(AlloyEditor.ButtonLinkTargetEdit,t)),React.createElement("div",{className:"ae-container-edit-link"},React.createElement("button",{"aria-label":AlloyEditor.Strings.removeLink,className:"ae-button",disabled:!this.state.element,onClick:this._removeLink,title:AlloyEditor.Strings.remove},React.createElement("span",{className:"ae-icon-unlink"})),React.createElement("div",{className:"ae-container-input xxl"},r,React.createElement("div",{className:"ae-container-input flexible"},React.createElement("input",{className:"ae-input",onChange:this._handleLinkHrefChange,onKeyDown:this._handleKeyDown,placeholder:AlloyEditor.Strings.editLink,ref:"linkInput",type:"text",value:this.state.linkHref}),n),React.createElement("button",{"aria-label":AlloyEditor.Strings.clearInput,className:"ae-button ae-icon-remove",onClick:this._clearLink,style:e,title:AlloyEditor.Strings.clear})),React.createElement("button",{"aria-label":AlloyEditor.Strings.confirm,className:"ae-button",disabled:!this._isValidState(),onClick:this._updateLink,title:AlloyEditor.Strings.confirm},React.createElement("span",{className:"ae-icon-ok"})))},_clearLink:function(){this.setState({linkHref:""})},_focusLinkInput:function(){var e=this,t=function(){ReactDOM.findDOMNode(e.refs.linkInput).focus()};window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,0)},_handleKeyDown:function(e){if(13!==e.keyCode&&27!==e.keyCode||e.preventDefault(),13===e.keyCode)this._updateLink();else if(40===e.keyCode)this.setState({autocompleteSelected:!0});else if(27===e.keyCode){var t=this.props.editor.get("nativeEditor");new CKEDITOR.Link(t).advanceSelection(),this.props.editor.get("nativeEditor").fire("actionPerformed",this)}},_handleLinkHrefChange:function(e){this.setState({linkHref:e.target.value}),this._focusLinkInput()},_handleLinkTargetChange:function(e){this.setState({itemDropdown:null,linkTarget:e.target.getAttribute("data-value")}),this._focusLinkInput()},_handleLinkAutocompleteClick:function(e){this.setState({itemDropdown:null,linkHref:e.target.getAttribute("data-value")}),this._focusLinkInput()},_isValidState:function(){var e=this.state.linkHref&&(this.state.linkHref!==this.state.initialLink.href||this.state.linkTarget!==this.state.initialLink.target);return e},_removeLink:function(){var e=this.props.editor.get("nativeEditor"),t=new CKEDITOR.Link(e),n=e.getSelection(),i=n.createBookmarks();t.remove(this.state.element,{advance:!0}),n.selectBookmarks(i),this.props.cancelExclusive(),e.fire("actionPerformed",this)},_setAutocompleteState:function(e){this.setState({autocompleteSelected:e.selected})},_updateLink:function(){var e=this.props.editor.get("nativeEditor"),t=new CKEDITOR.Link(e,{appendProtocol:this.props.appendProtocol}),n={target:this.state.linkTarget},i={advance:!0};this.state.linkHref&&(this.state.element?(n.href=this.state.linkHref,t.update(n,this.state.element,i)):t.create(this.state.linkHref,n,i),e.fire("actionPerformed",this)),this.props.cancelExclusive()}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonLinkEdit=e}(),function(){var e=React.createClass({displayName:"ButtonLinkTargetEdit",propTypes:{allowedTargets:React.PropTypes.arrayOf(React.PropTypes.object),editor:React.PropTypes.object.isRequired,selectedTarget:React.PropTypes.string},statics:{key:"linkTargetEdit"},render:function(){var e,t=this.props.handleLinkTargetChange,n=this.props.allowedTargets;return this.props.expanded&&(e=React.createElement(AlloyEditor.ButtonTargetList,{editor:this.props.editor,onDismiss:this.props.toggleDropdown,allowedLinkTargets:n,handleLinkTargetChange:t,selectedTarget:this.props.selectedTarget})),React.createElement("div",{className:"ae-container-edit-link-target ae-container-dropdown ae-container-dropdown-medium ae-has-dropdown",tabIndex:"0"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":this.props.selectedTarget,className:"ae-toolbar-element",onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:this.props.selectedTarget},React.createElement("div",{className:"ae-container"},React.createElement("span",{className:"ae-container-dropdown-selected-item"},this.props.selectedTarget),React.createElement("span",{className:"ae-icon-arrow"}))),e)},shouldComponentUpdate:function(e,t){return e.expanded!==this.props.expanded||e.selectedTarget!==this.props.selectedTarget}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonLinkTargetEdit=e}(),function(){var e=React.createClass({displayName:"ButtonLink",mixins:[AlloyEditor.ButtonKeystroke,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCfgProps],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"link"},getDefaultProps:function(){return{keystroke:{fn:"_requestExclusive",keys:CKEDITOR.CTRL+76}}},isActive:function(){return null!==new CKEDITOR.Link(this.props.editor.get("nativeEditor")).getFromSelection()},render:function(){var e="ae-button "+this.getStateClasses();if(this.props.renderExclusive){var t=this.mergeButtonCfgProps();return React.createElement(AlloyEditor.ButtonLinkEdit,t)}return React.createElement("button",{"aria-label":AlloyEditor.Strings.link,className:e,"data-type":"button-link",onClick:this._requestExclusive,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.link},React.createElement("span",{className:"ae-icon-link"}))},_requestExclusive:function(){this.props.requestExclusive(e.key)}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonLink=e}(),function(){var e=React.createClass({displayName:"ButtonOrderedList",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"ol"},getDefaultProps:function(){return{command:"numberedlist",style:{element:"ol"}}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.numberedlist,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-ol",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.numberedlist},React.createElement("span",{className:"ae-icon-numbered-list"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonOrderedList=e}(),function(){var e=React.createClass({displayName:"ButtonOutdentBlock",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"outdentBlock"},getDefaultProps:function(){return{command:"outdent"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.outdent,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-outdent-block",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.outdent},React.createElement("span",{className:"ae-icon-outdent-block"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonOutdentBlock=e}(),function(){var e=React.createClass({displayName:"ButtonParagraphAlignLeft",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"paragraphLeft"},getDefaultProps:function(){return{command:"justifyleft"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignLeft,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-paragraph-align-left",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignLeft},React.createElement("span",{className:"ae-icon-align-left"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonParagraphAlignLeft=e}(),function(){var e=React.createClass({displayName:"ButtonParagraphAlignRight",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"paragraphRight"},getDefaultProps:function(){return{command:"justifyright"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignRight,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-paragraph-align-right",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignRight},React.createElement("span",{className:"ae-icon-align-right"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonParagraphAlignRight=e}(),function(){var e=React.createClass({displayName:"ButtonParagraphCenter",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"paragraphCenter"},getDefaultProps:function(){return{command:"justifycenter"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignCenter,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-paragraph-center",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignCenter},React.createElement("span",{className:"ae-icon-align-center"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonParagraphCenter=e}(),function(){var e=React.createClass({displayName:"ButtonParagraphJustify",mixins:[AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonCommandActive],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"paragraphJustify"},getDefaultProps:function(){return{command:"justifyblock"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.alignJustify,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-paragraph-justify",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.alignJustify},React.createElement("span",{className:"ae-icon-align-justified"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonParagraphJustify=e}(),function(){var e=React.createClass({displayName:"ButtonQuote",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"quote"},getDefaultProps:function(){return{command:"blockquote",style:{element:"blockquote"}}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.quote,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-quote",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.quote},React.createElement("span",{className:"ae-icon-quote"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonQuote=e}(),function(){var e=React.createClass({displayName:"ButtonRemoveFormat",mixins:[AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"removeFormat"},getDefaultProps:function(){return{command:"removeFormat"}},render:function(){return React.createElement("button",{"aria-label":AlloyEditor.Strings.removeformat,className:"ae-button","data-type":"button-removeformat",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.removeformat},React.createElement("span",{className:"ae-icon-removeformat"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonRemoveFormat=e}(),function(){var e=React.createClass({displayName:"ButtonStrike",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"strike"},getDefaultProps:function(){return{command:"strike",style:"coreStyles_strike"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.strike,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-strike",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.strike},React.createElement("span",{className:"ae-icon-strike"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonStrike=e}(),function(){var e=React.createClass({displayName:"ButtonsStylesListHeader",render:function(){return this.props.styles&&this.props.styles.length?React.createElement("span",{className:"ae-list-header"},this.props.name):null}});AlloyEditor.ButtonsStylesListHeader=e}(),function(){var e=React.createClass({displayName:"ButtonStylesListItemRemove",propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,removeBlocks:React.PropTypes.array,tabIndex:React.PropTypes.number},statics:{key:"buttonStylesListItemRemove"},getDefaultProps:function(){return{removeBlocks:["h1","h2","h3","h4","h5","h6","pre"]}},render:function(){return React.createElement("li",{role:"option"},React.createElement("button",{className:"ae-toolbar-element",onClick:this._removeStyles,tabIndex:this.props.tabIndex},AlloyEditor.Strings.normal))},_removeStyles:function(){var e=this.props.editor.get("nativeEditor");e.execCommand("removeFormat"),this.props.removeBlocks.forEach(function(t){var n=new CKEDITOR.style({element:t});e.removeStyle(n)}),e.fire("actionPerformed",this)}});AlloyEditor.ButtonStylesListItemRemove=e}(),function(){var e=React.createClass({displayName:"ButtonStylesListItem",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonActionStyle],statics:{key:"buttonStylesListItem"},componentWillMount:function(){var e={element:"span",styles:{margin:0}};e=CKEDITOR.tools.merge(e,this.props.style),this._preview=new CKEDITOR.style(e).buildPreview(this.props.name)},render:function(){var e=this.props.name===this.props.activeStyle?"ae-toolbar-element active":"ae-toolbar-element";return React.createElement("button",{className:e,dangerouslySetInnerHTML:{__html:this._preview},onClick:this._onClick,tabIndex:this.props.tabIndex})},_onClick:function(){this.props.editor.get("nativeEditor").execCommand("removeFormat"),this.applyStyle()}});AlloyEditor.ButtonStylesListItem=e}(),function(){var e=React.createClass({displayName:"ButtonStylesList",mixins:[AlloyEditor.WidgetFocusManager],statics:{key:"buttonStylesList"},componentDidMount:function(){ReactDOM.findDOMNode(this).focus()},componentWillMount:function(){var e=[],t=[],n=[];this.props.styles.forEach(function(i){var o=new CKEDITOR.style(i.style);o.type===CKEDITOR.STYLE_BLOCK?e.push(i):o.type===CKEDITOR.STYLE_INLINE?t.push(i):o.type===CKEDITOR.STYLE_OBJECT&&n.push(i)}),this._blockStyles=e,this._inlineStyles=t,this._objectStyles=n},getDefaultProps:function(){return{circular:!1,descendants:".ae-toolbar-element",keys:{dismiss:[27],dismissNext:[39],dismissPrev:[37],next:[40],prev:[38]},showRemoveStylesItem:!0}},render:function(){var e;return this.props.showRemoveStylesItem&&(e=React.createElement(AlloyEditor.ButtonStylesListItemRemove,{editor:this.props.editor,onDismiss:this.props.toggleDropdown})),React.createElement(AlloyEditor.ButtonDropdown,this.props,e,React.createElement(AlloyEditor.ButtonsStylesListHeader,{name:AlloyEditor.Strings.blockStyles,styles:this._blockStyles}),this._renderStylesItems(this._blockStyles),React.createElement(AlloyEditor.ButtonsStylesListHeader,{name:AlloyEditor.Strings.inlineStyles,styles:this._inlineStyles}),this._renderStylesItems(this._inlineStyles),React.createElement(AlloyEditor.ButtonsStylesListHeader,{name:AlloyEditor.Strings.objectStyles,styles:this._objectStyles}),this._renderStylesItems(this._objectStyles))},_renderStylesItems:function(e){var t,n=this.props.editor;return e&&e.length&&(t=e.map(function(e){return React.createElement("li",{key:e.name,role:"option"},React.createElement(AlloyEditor.ButtonStylesListItem,{activeStyle:this.props.activeStyle,editor:n,name:e.name,style:e.style}))}.bind(this))),t}});AlloyEditor.ButtonStylesList=e}(),function(){var e=React.createClass({displayName:"ButtonStyles",propTypes:{editor:React.PropTypes.object.isRequired,expanded:React.PropTypes.bool,label:React.PropTypes.string,showRemoveStylesItem:React.PropTypes.bool,styles:React.PropTypes.arrayOf(React.PropTypes.object),tabIndex:React.PropTypes.number,toggleDropdown:React.PropTypes.func},statics:{key:"styles"},render:function(){var e=AlloyEditor.Strings.normal,t=this._getStyles();t.forEach(function(t){this._checkActive(t.style)&&(e=t.name)}.bind(this));var n;return this.props.expanded&&(n=React.createElement(AlloyEditor.ButtonStylesList,{activeStyle:e,editor:this.props.editor,onDismiss:this.props.toggleDropdown,showRemoveStylesItem:this.props.showRemoveStylesItem,styles:t})),React.createElement("div",{className:"ae-container-dropdown ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":AlloyEditor.Strings.styles+" "+e,className:"ae-toolbar-element",onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.styles+" "+e},React.createElement("div",{className:"ae-container"},React.createElement("span",{className:"ae-container-dropdown-selected-item"},e),React.createElement("span",{className:"ae-icon-arrow"}))),n)},_checkActive:function(e){var t=this.props.editor.get("nativeEditor");e=CKEDITOR.tools.merge({element:"span"},e);var n=new CKEDITOR.style(e);return n.checkActive(t.elementPath(),t)},_getStyles:function(){return this.props.styles||[{name:AlloyEditor.Strings.h1,style:{element:"h1"}},{name:AlloyEditor.Strings.h2,style:{element:"h2"}},{name:AlloyEditor.Strings.formatted,style:{element:"pre"}},{name:AlloyEditor.Strings.cite,style:{element:"cite"}},{name:AlloyEditor.Strings.code,style:{element:"code"}}]}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonStyles=e}(),function(){var e=React.createClass({displayName:"ButtonSubscript",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"subscript"},getDefaultProps:function(){return{command:"subscript",style:"coreStyles_subscript"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.subscript,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-subscript",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.subscript},React.createElement("span",{className:"ae-icon-subscript"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonSubscript=e}(),function(){var e=React.createClass({displayName:"ButtonSuperscript",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"superscript"},getDefaultProps:function(){return{command:"superscript",style:"coreStyles_superscript"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.superscript,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-superscript",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.superscript},React.createElement("span",{className:"ae-icon-superscript"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonSuperscript=e}(),function(){var e=React.createClass({displayName:"ButtonTableCell",propTypes:{commands:React.PropTypes.arrayOf(React.PropTypes.object),editor:React.PropTypes.object.isRequired,expanded:React.PropTypes.bool,label:React.PropTypes.string,tabIndex:React.PropTypes.number,toggleDropdown:React.PropTypes.func},statics:{key:"tableCell"},render:function(){var t,n;return this.props.expanded&&(n=e.key+"List",t=React.createElement(AlloyEditor.ButtonCommandsList,{commands:this._getCommands(),editor:this.props.editor,listId:n,onDismiss:this.props.toggleDropdown})),React.createElement("div",{className:"ae-container ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":AlloyEditor.Strings.cell,"aria-owns":n,className:"ae-button",onClick:this.props.toggleDropdown,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.cell},React.createElement("span",{className:"ae-icon-cell"})),t)},_getCommands:function(){return this.props.commands||[{command:"cellInsertBefore",label:AlloyEditor.Strings.cellInsertBefore},{command:"cellInsertAfter",label:AlloyEditor.Strings.cellInsertAfter},{command:"cellDelete",label:AlloyEditor.Strings.cellDelete},{command:"cellMerge",label:AlloyEditor.Strings.cellMerge},{command:"cellMergeDown",label:AlloyEditor.Strings.cellMergeDown},{command:"cellMergeRight",label:AlloyEditor.Strings.cellMergeRight},{command:"cellHorizontalSplit",label:AlloyEditor.Strings.cellSplitHorizontal},{command:"cellVerticalSplit",label:AlloyEditor.Strings.cellSplitVertical}]}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTableCell=e}(),function(){var e=React.createClass({displayName:"ButtonTableColumn",propTypes:{commands:React.PropTypes.arrayOf(React.PropTypes.object),editor:React.PropTypes.object.isRequired,expanded:React.PropTypes.bool,label:React.PropTypes.string,tabIndex:React.PropTypes.number,toggleDropdown:React.PropTypes.func},statics:{key:"tableColumn"},render:function(){var t,n;return this.props.expanded&&(n=e.key+"List",t=React.createElement(AlloyEditor.ButtonCommandsList,{commands:this._getCommands(),editor:this.props.editor,listId:n,onDismiss:this.props.toggleDropdown})),React.createElement("div",{className:"ae-container ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":AlloyEditor.Strings.column,"aria-owns":n,className:"ae-button",onClick:this.props.toggleDropdown, role:"listbox",tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.column},React.createElement("span",{className:"ae-icon-column"})),t)},_getCommands:function(){return this.props.commands||[{command:"columnInsertBefore",label:AlloyEditor.Strings.columnInsertBefore},{command:"columnInsertAfter",label:AlloyEditor.Strings.columnInsertAfter},{command:"columnDelete",label:AlloyEditor.Strings.columnDelete}]}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTableColumn=e}(),function(){var e=13,t=27,n=React.createClass({displayName:"ButtonTableEdit",propTypes:{cancelExclusive:React.PropTypes.func.isRequired,editor:React.PropTypes.object.isRequired},statics:{key:"tableEdit"},getDefaultProps:function(){return{tableAttributes:{border:1,cellPadding:0,cellSpacing:0,style:"width: 100%"}}},componentDidMount:function(){ReactDOM.findDOMNode(this.refs.rows).focus()},getInitialState:function(){return{cols:3,rows:3}},_createTable:function(){var e=this.props.editor.get("nativeEditor"),t=new CKEDITOR.Table(e);t.create({attrs:this.props.tableAttributes,cols:this.state.cols,rows:this.state.rows}),this.props.cancelExclusive(),e.fire("actionPerformed",this)},_handleChange:function(e,t){var n={};n[e]=t.target.value,this.setState(n)},_handleKeyDown:function(n){n.keyCode!==e&&n.keyCode!==t||n.preventDefault(),n.keyCode===e?this._createTable():n.keyCode===t&&this.props.cancelExclusive()},render:function(){var e=Date.now(),t=e+"rows",n=e+"cols";return React.createElement("div",{className:"ae-container-edit-table"},React.createElement("label",{htmlFor:t},AlloyEditor.Strings.rows),React.createElement("div",{className:"ae-container-input small"},React.createElement("input",{className:"ae-input",id:t,onChange:this._handleChange.bind(this,"rows"),min:"1",onKeyDown:this._handleKeyDown,placeholder:"Rows",ref:"rows",type:"number",value:this.state.rows})),React.createElement("label",{htmlFor:n},AlloyEditor.Strings.columns),React.createElement("div",{className:"ae-container-input small"},React.createElement("input",{className:"ae-input",id:n,onChange:this._handleChange.bind(this,"cols"),min:"1",onKeyDown:this._handleKeyDown,placeholder:"Colums",ref:"cols",type:"number",value:this.state.cols})),React.createElement("button",{"aria-label":"Confirm",className:"ae-button",onClick:this._createTable},React.createElement("span",{className:"ae-icon-ok"})))}});AlloyEditor.Buttons[n.key]=AlloyEditor.ButtonTableEdit=n}(),function(){var e=React.createClass({displayName:"ButtonTableHeading",propTypes:{commands:React.PropTypes.arrayOf(React.PropTypes.object),editor:React.PropTypes.object.isRequired,expanded:React.PropTypes.bool,label:React.PropTypes.string,tabIndex:React.PropTypes.number,toggleDropdown:React.PropTypes.func},statics:{key:"tableHeading"},render:function(){var t,n;this.props.expanded&&(n=e.key+"List",t=React.createElement(AlloyEditor.ButtonCommandsList,{commands:this._getCommands(),editor:this.props.editor,listId:n,onDismiss:this.props.toggleDropdown}));var i=new CKEDITOR.Table(this.props.editor.get("nativeEditor")).getHeading(),o=AlloyEditor.Strings.headers+":",a=AlloyEditor.Strings["headers"+i];return React.createElement("div",{className:"ae-container-dropdown-xl ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":"",className:"ae-toolbar-element",onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:""},React.createElement("div",{className:"ae-container"},React.createElement("span",{className:"ae-container-dropdown-selected-item"},o," ",React.createElement("strong",null,a)),React.createElement("span",{className:"ae-icon-arrow"}))),t)},_getCommands:function(){return this.props.commands||[{command:"tableHeadingNone",label:AlloyEditor.Strings.headersNone},{command:"tableHeadingRow",label:AlloyEditor.Strings.headersRow},{command:"tableHeadingColumn",label:AlloyEditor.Strings.headersColumn},{command:"tableHeadingBoth",label:AlloyEditor.Strings.headersBoth}]}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTableHeading=e}(),function(){var e=React.createClass({displayName:"ButtonTableRemove",propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"tableRemove"},render:function(){return React.createElement("button",{"aria-label":AlloyEditor.Strings.deleteTable,className:"ae-button","data-type":"button-table-remove",onClick:this._removeTable,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.deleteTable},React.createElement("span",{className:"ae-icon-bin"}))},_removeTable:function(){var e=this.props.editor.get("nativeEditor"),t=new CKEDITOR.Table(e);t.remove(),e.fire("actionPerformed",this)}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTableRemove=e}(),function(){var e=React.createClass({displayName:"ButtonTableRow",propTypes:{commands:React.PropTypes.arrayOf(React.PropTypes.object),editor:React.PropTypes.object.isRequired,expanded:React.PropTypes.bool,label:React.PropTypes.string,tabIndex:React.PropTypes.number,toggleDropdown:React.PropTypes.func},statics:{key:"tableRow"},render:function(){var t,n;return this.props.expanded&&(n=e.key+"List",t=React.createElement(AlloyEditor.ButtonCommandsList,{commands:this._getCommands(),editor:this.props.editor,listId:n,onDismiss:this.props.toggleDropdown})),React.createElement("div",{className:"ae-container ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":AlloyEditor.Strings.row,"aria-owns":n,className:"ae-button",onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.row},React.createElement("span",{className:"ae-icon-row"})),t)},_getCommands:function(){return this.props.commands||[{command:"rowInsertBefore",label:AlloyEditor.Strings.rowInsertBefore},{command:"rowInsertAfter",label:AlloyEditor.Strings.rowInsertAfter},{command:"rowDelete",label:AlloyEditor.Strings.rowDelete}]}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTableRow=e}(),function(){var e=React.createClass({displayName:"ButtonTable",propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"table"},render:function(){return this.props.renderExclusive?React.createElement(AlloyEditor.ButtonTableEdit,this.props):React.createElement("button",{"aria-label":AlloyEditor.Strings.table,className:"ae-button","data-type":"button-table",onClick:this.props.requestExclusive,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.table},React.createElement("span",{className:"ae-icon-table"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTable=e}(),function(){var e=React.createClass({displayName:"ButtonTargetList",mixins:[AlloyEditor.WidgetFocusManager],propTypes:{editor:React.PropTypes.object.isRequired},statics:{key:"targetList"},componentDidMount:function(){ReactDOM.findDOMNode(this).focus()},getDefaultProps:function(){return{circular:!0,descendants:".ae-toolbar-element",keys:{dismiss:[27],dismissNext:[39],dismissPrev:[37],next:[40],prev:[38]}}},render:function(){var e=this._renderListTargets();return React.createElement(AlloyEditor.ButtonDropdown,this.props,e)},_getAllowedTargetItems:function(){return this.props.allowedLinkTargets||[{label:AlloyEditor.Strings.linkTargetDefault,value:""},{label:AlloyEditor.Strings.linkTargetSelf,value:"_self"},{label:AlloyEditor.Strings.linkTargetBlank,value:"_blank"},{label:AlloyEditor.Strings.linkTargetParent,value:"_parent"},{label:AlloyEditor.Strings.linkTargetTop,value:"_top"}]},_renderListTargets:function(){var e=this._getAllowedTargetItems(),t=this.props.handleLinkTargetChange;return e=e.map(function(e){var n=this.props.selectedTarget===e.value?"ae-toolbar-element active":"ae-toolbar-element";return React.createElement("li",{key:e.value,role:"option"},React.createElement("button",{className:n,"data-value":e.value,onClick:t},e.label))}.bind(this))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTargetList=e}(),function(){var e=React.createClass({displayName:"ButtonTwitter",mixins:[AlloyEditor.ButtonStateClasses],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"twitter"},handleClick:function(){var e=this.props.editor.get("nativeEditor"),t=new CKEDITOR.Link(e);this.isActive()?t.remove(t.getFromSelection()):t.create(this._getHref(),{"class":"ae-twitter-link",target:"_blank"}),e.fire("actionPerformed",this)},isActive:function(){var e=new CKEDITOR.Link(this.props.editor.get("nativeEditor")).getFromSelection();return e&&e.getAttribute("href").indexOf("twitter.com/intent/tweet")!==-1},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.twitter,className:e,"data-type":"button-twitter",onClick:this.handleClick,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.twitter},React.createElement("span",{className:"ae-icon-twitter"}))},_getHref:function(){var e=this.props.editor.get("nativeEditor"),t=e.getSelection().getSelectedText(),n=this.props.url,i=this.props.via,o="https://twitter.com/intent/tweet?text="+t;return n&&(o+="&url="+n),i&&(o+="&via="+i),o}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonTwitter=e}(),function(){var e=React.createClass({displayName:"ButtonUnorderedlist",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"ul"},getDefaultProps:function(){return{command:"bulletedlist",style:{element:"ul"}}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.bulletedlist,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-ul",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.bulletedlist},React.createElement("span",{className:"ae-icon-bulleted-list"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonUnorderedlist=e}(),function(){var e=React.createClass({displayName:"ButtonUnderline",mixins:[AlloyEditor.ButtonStyle,AlloyEditor.ButtonStateClasses,AlloyEditor.ButtonCommand,AlloyEditor.ButtonKeystroke],propTypes:{editor:React.PropTypes.object.isRequired,label:React.PropTypes.string,tabIndex:React.PropTypes.number},statics:{key:"underline"},getDefaultProps:function(){return{command:"underline",keystroke:{fn:"execCommand",keys:CKEDITOR.CTRL+85},style:"coreStyles_underline"}},render:function(){var e="ae-button "+this.getStateClasses();return React.createElement("button",{"aria-label":AlloyEditor.Strings.underline,"aria-pressed":e.indexOf("pressed")!==-1,className:e,"data-type":"button-underline",onClick:this.execCommand,tabIndex:this.props.tabIndex,title:AlloyEditor.Strings.underline},React.createElement("span",{className:"ae-icon-underline"}))}});AlloyEditor.Buttons[e.key]=AlloyEditor.ButtonUnderline=e}(),function(){var e=1,t=2,n=React.createClass({displayName:"ToolbarAdd",mixins:[AlloyEditor.WidgetDropdown,AlloyEditor.WidgetExclusive,AlloyEditor.WidgetFocusManager,AlloyEditor.ToolbarButtons,AlloyEditor.WidgetPosition,AlloyEditor.WidgetArrowBox],propTypes:{config:React.PropTypes.object,editor:React.PropTypes.object.isRequired,editorEvent:React.PropTypes.object,gutterExclusive:React.PropTypes.object,label:React.PropTypes.string,onDismiss:React.PropTypes.func,position:React.PropTypes.oneOf([e,t]),selectionData:React.PropTypes.object},statics:{key:"add",left:e,right:t},getDefaultProps:function(){return{circular:!0,descendants:".ae-button",gutterExclusive:{left:10,top:0},keys:{dismiss:[27],next:[39,40],prev:[37,38]},position:e}},componentDidMount:function(){this._updatePosition()},componentDidUpdate:function(e,t){this._updatePosition(),this.props.renderExclusive&&this.focus()},render:function(){if(!this.state.itemExclusive&&this.props.editorEvent&&this.props.editorEvent.data.nativeEvent.target&&!this.props.editorEvent.data.nativeEvent.target.isContentEditable)return null;var e=this._getButtons(),t=this._getToolbarClassName();return React.createElement("div",{"aria-label":AlloyEditor.Strings.add,className:t,"data-tabindex":this.props.config.tabIndex||0,onFocus:this.focus,onKeyDown:this.handleKey,role:"toolbar",tabIndex:"-1"},React.createElement("div",{className:"ae-container"},e))},_getButtons:function(){var e;return this.props.renderExclusive?e=this.getToolbarButtons(this.props.config.buttons):this.props.selectionData&&this.props.selectionData.region&&(e=React.createElement("button",{"aria-label":AlloyEditor.Strings.add,className:"ae-button ae-button-add",onClick:this.props.requestExclusive.bind(this,n.key),title:AlloyEditor.Strings.add},React.createElement("span",{className:"ae-icon-add"}))),e},_getToolbarClassName:function(){var e="ae-toolbar-add";return this.props.renderExclusive&&(e="ae-toolbar "+this.getArrowBoxClasses()),e},_updatePosition:function(){var t;if(ReactDOM.findDOMNode(this))if(this.props.renderExclusive)this.updatePosition(),this.show();else if(this.props.selectionData&&(t=this.props.selectionData.region),t){var n,i=ReactDOM.findDOMNode(this),o=new CKEDITOR.dom.element(i),a=t.startRect||t,r=this.props.editor.get("nativeEditor"),s=r.editable().getClientRect(),l=this.props.config.position||this.props.position;n=l===e?s.left-i.offsetWidth-this.props.gutterExclusive.left+"px":s.right+this.props.gutterExclusive.left+"px",i.style.left=n,i.style.top=Math.floor((t.bottom+t.top)/2)+"px","auto"!==r.element.getStyle("overflow")?i.style.top=Math.floor(t.top-i.offsetHeight/2+a.height/2)+"px":i.style.top=Math.floor(r.element.$.offsetTop+a.height/2-i.offsetHeight/2)+"px",i.style.opacity=1,o.removeClass("ae-arrow-box"),this.cancelAnimation()}}});AlloyEditor.Toolbars[n.key]=AlloyEditor.ToolbarAdd=n}(),function(){var e=React.createClass({displayName:"ToolbarStyles",mixins:[AlloyEditor.WidgetDropdown,AlloyEditor.WidgetExclusive,AlloyEditor.WidgetFocusManager,AlloyEditor.ToolbarButtons,AlloyEditor.WidgetPosition,AlloyEditor.WidgetArrowBox],propTypes:{config:React.PropTypes.object,editor:React.PropTypes.object.isRequired,editorEvent:React.PropTypes.object,label:React.PropTypes.string,onDismiss:React.PropTypes.func,selectionData:React.PropTypes.object},statics:{key:"styles"},componentDidMount:function(){this._updatePosition()},componentDidUpdate:function(e,t){this._updatePosition()},getDefaultProps:function(){return{circular:!0,descendants:".ae-input, .ae-button:not([disabled]), .ae-toolbar-element",keys:{dismiss:[27],next:[39,40],prev:[37,38]}}},render:function(){var e=this._getCurrentSelection();if(e){var t,n=this._getSelectionFunction(e.getArrowBoxClasses);t=n?n():this.getArrowBoxClasses();var i="ae-toolbar-styles "+t,o=this.getToolbarButtons(e.buttons,{manualSelection:this.props.editorEvent?this.props.editorEvent.data.manualSelection:null,selectionType:e.name});return React.createElement("div",{"aria-label":AlloyEditor.Strings.styles,className:i,"data-tabindex":this.props.config.tabIndex||0,onFocus:this.focus,onKeyDown:this.handleKey,role:"toolbar",tabIndex:"-1"},React.createElement("div",{className:"ae-container"},o))}return null},_getSelectionFunction:function(e){var t,n=AlloyEditor.Lang;if(n.isFunction(e))t=e;else if(n.isString(e)){for(var i=e.split("."),o=window,a=i.shift();a&&n.isObject(o)&&n.isObject(o[a]);)o=o[a],a=i.shift();n.isFunction(o)&&(t=o)}return t},_getCurrentSelection:function(){var e,t=this.props.editorEvent?this.props.editorEvent.data:null;return t&&this.props.config.selections.some(function(n){var i,o=this._getSelectionFunction(n.test);return o&&(i=t.manualSelection===n.name||o({data:t,editor:this.props.editor})),i&&(e=n),i},this),e},_updatePosition:function(){if(ReactDOM.findDOMNode(this)){var e,t=this._getCurrentSelection();if(t){var n=this._getSelectionFunction(t.setPosition);n&&(e=n.call(this,{editor:this.props.editor,editorEvent:this.props.editorEvent,selectionData:this.props.selectionData}))}e||(this.updatePosition(),this.show())}}});AlloyEditor.Toolbars[e.key]=AlloyEditor.ToolbarStyles=e}(),function(){var e=React.createClass({displayName:"UI",mixins:[AlloyEditor.WidgetExclusive,AlloyEditor.WidgetFocusManager],propTypes:{ariaUpdates:React.PropTypes.object,editor:React.PropTypes.object.isRequired,eventsDelay:React.PropTypes.number,toolbars:React.PropTypes.object.isRequired},getInitialState:function(){return{hidden:!1}},getDefaultProps:function(){return{circular:!0,descendants:"[class^=ae-toolbar-]",eventsDelay:0,keys:{next:9}}},componentDidMount:function(){var e=this.props.editor.get("nativeEditor");e.on("editorInteraction",this._onEditorInteraction,this),e.on("actionPerformed",this._onActionPerformed,this),e.on("key",this._onEditorKey,this),this._mousedownListener=function(e){this._setUIHidden(e.target)}.bind(this),this._keyDownListener=CKEDITOR.tools.debounce(function(e){this._setUIHidden(document.activeElement)},this.props.eventsDelay,this),document.addEventListener("mousedown",this._mousedownListener),document.addEventListener("keydown",this._keyDownListener)},componentDidUpdate:function(e,t){var n=ReactDOM.findDOMNode(this),i=this.props.editor.get("nativeEditor");n&&i.fire("ariaUpdate",{message:this._getAvailableToolbarsMessage(n)}),i.fire("editorUpdate",{prevProps:e,prevState:t,props:this.props,state:this.state})},_getAriaUpdateTemplate:function(e){return this._ariaUpdateTemplates||(this._ariaUpdateTemplates={}),this._ariaUpdateTemplates[e]||(this._ariaUpdateTemplates[e]=new CKEDITOR.template(this._getAriaUpdates()[e])),this._ariaUpdateTemplates[e]},_getAriaUpdates:function(){return this.props.ariaUpdates||{noToolbar:AlloyEditor.Strings.ariaUpdateNoToolbar,oneToolbar:AlloyEditor.Strings.ariaUpdateOneToolbar,manyToolbars:AlloyEditor.Strings.ariaUpdateManyToolbars}},_getAvailableToolbarsMessage:function(e){var t=e.querySelectorAll('[role="toolbar"]');if(t.length){var n=Array.prototype.slice.call(t).map(function(e){return e.getAttribute("aria-label")}),i=1===n.length?"oneToolbar":"manyToolbars";return this._getAriaUpdateTemplate(i).output({toolbars:n.join(",").replace(/,([^,]*)$/," and $1")})}return this._getAriaUpdates().noToolbar},componentWillUnmount:function(){this._mousedownListener&&document.removeEventListener("mousedown",this._mousedownListener),this._keyDownListener&&(this._keyDownListener.detach(),document.removeEventListener("keydown",this._keyDownListener))},render:function(){if(this.state.hidden)return null;var e=Object.keys(this.props.toolbars).map(function(e){return AlloyEditor.Toolbars[e]||window[e]});return e=this.filterExclusive(e).map(function(e){var t=this.mergeExclusiveProps({config:this.props.toolbars[e.key],editor:this.props.editor,editorEvent:this.state.editorEvent,key:e.key,onDismiss:this._onDismissToolbarFocus,selectionData:this.state.selectionData},e.key);return React.createElement(e,t)}.bind(this)),React.createElement("div",{className:"ae-toolbars",onKeyDown:this.handleKey},e)},_onActionPerformed:function(e){var t=this.props.editor.get("nativeEditor");t.focus(),this.setState({itemExclusive:null,selectionData:t.getSelectionData()})},_onDismissToolbarFocus:function(){var e=this.props.editor.get("nativeEditor");e.focus()},_onEditorInteraction:function(e){this.setState({editorEvent:e,hidden:!1,itemExclusive:null,selectionData:e.data.selectionData})},_onEditorKey:function(e){var t=e.data.domEvent.$;t.altKey&&121===t.keyCode&&this.focus()},_setUIHidden:function(e){var t=ReactDOM.findDOMNode(this);if(t){var n=this.props.editor.get("nativeEditor").editable(),i=new CKEDITOR.dom.node(e),o=n.$===e||n.contains(i)||new CKEDITOR.dom.element(t).contains(i);o||this.setState({hidden:!0})}}});AlloyEditor.UI=e}(); } }());