all.js 720 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865
  1. /* ---- /1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8/alloy-editor/alloy-editor-all-min.js ---- */
  2. /**
  3. * AlloyEditor v1.3.0
  4. *
  5. * Copyright 2014-present, Liferay, Inc.
  6. * All rights reserved.
  7. *
  8. * This source code is licensed under the GNU LGPL-style license found in the
  9. * LICENSE file in the root directory of this source tree.
  10. */
  11. (function() {
  12. function deployCKEditor() {
  13. /*
  14. Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  15. For licensing, see LICENSE.md or http://ckeditor.com/license
  16. */
  17. (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;d<c.length;d++){var l=c[d].src.match(a);if(l){b=l[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
  18. b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",
  19. a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(c){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){function d(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(d,1);return}a()}c.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",
  20. a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(r){}document.documentElement.doScroll&&b&&d()}}}()},b=window.CKEDITOR_GETURL;if(b){var c=d.getUrl;d.getUrl=function(a){return b.call(d,a)||c.call(d,a)}}return d}());
  21. CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var d=CKEDITOR.event.prototype,b;for(b in d)null==a[b]&&(a[b]=d[b])},CKEDITOR.event.prototype=function(){function a(a){var e=d(this);return e[a]||(e[a]=new b(a))}var d=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var b=0,d=this.listeners;b<d.length;b++)if(d[b].fn==a)return b;return-1}};
  22. return{define:function(b,d){var g=a.call(this,b);CKEDITOR.tools.extend(g,d,!0)},on:function(b,d,g,h,l){function m(a,f,D,l){a={name:b,sender:this,editor:a,data:f,listenerData:h,stop:D,cancel:l,removeListener:r};return!1===d.call(g,a)?!1:a.data}function r(){D.removeListener(b,d)}var f=a.call(this,b);if(0>f.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}},
  23. 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;x<t.length;x++){if(f.errorProof)try{z=
  24. t[x].call(this,r,m,b,h)}catch(p){}else z=t[x].call(this,r,m,b,h);!1===z?g=1:"undefined"!=typeof z&&(m=z);if(a||g)break}}m=g?!1:"undefined"==typeof m?!0:m;a=l;g=D;return m}}(),fireOnce:function(a,b,g){b=this.fire(a,b,g);delete d(this)[a];return b},removeListener:function(a,b){var g=d(this)[a];if(g){var h=g.getListenerIndex(b);0<=h&&g.listeners.splice(h,1)}},removeAllListeners:function(){var a=d(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=d(this)[a])&&0<a.listeners.length}}}());
  25. CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
  26. CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=a.match(/edge[ \/](\d+.?\d*)/),b=-1<a.indexOf("trident/"),b=!(!d&&!b),b={ie:b,edge:!!d,webkit:!b&&-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;
  27. return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};b.gecko="Gecko"==navigator.product&&!b.webkit&&!b.ie;b.webkit&&(-1<a.indexOf("chrome")?b.chrome=!0:b.safari=!0);var c=0;b.ie&&(c=d?parseFloat(d[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,b.ie9Compat=9==c,b.ie8Compat=8==c,b.ie7Compat=7==c,b.ie6Compat=7>c||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]));
  28. 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&&10<c;b.needsNbspFiller=b.ie&&11>c;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");
  29. b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}());
  30. "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=
  31. 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})};
  32. CKEDITOR.error=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})};
  33. 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={};
  34. (function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,e=/</g,g=/"/g,h=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,l={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},m=function(a,f){return"#"==f[0]?String.fromCharCode(parseInt(f.slice(1),10)):l[f]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return!0;if(!a||!f||a.length!=f.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!=f[b])return!1;
  35. return!0},getIndex:function(a,f){for(var b=0;b<a.length;++b)if(f(a[b]))return b;return-1},clone:function(a){var f;if(a&&a instanceof Array){f=[];for(var b=0;b<a.length;b++)f[b]=CKEDITOR.tools.clone(a[b]);return f}if(null===a||"object"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;f=new a.constructor;for(b in a)f[b]=CKEDITOR.tools.clone(a[b]);return f},capitalize:function(a,f){return a.charAt(0).toUpperCase()+
  36. (f?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var f=arguments.length,b,c;"boolean"==typeof(b=arguments[f-1])?f--:"boolean"==typeof(b=arguments[f-2])&&(c=arguments[f-1],f-=2);for(var l=1;l<f;l++){var d=arguments[l],p;for(p in d)if(!0===b||null==a[p])if(!c||p in c)a[p]=d[p]}return a},prototypedCopy:function(a){var f=function(){};f.prototype=a;return new f},copy:function(a){var f={},b;for(b in a)f[b]=a[b];return f},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},
  37. isEmpty:function(a){for(var f in a)if(a.hasOwnProperty(f))return!1;return!0},cssVendorPrefix:function(a,f,b){if(b)return d+a+":"+f+";"+a+":"+f;b={};b[a]=f;b[d+a]=f;return b},cssStyleToDomStyle:function(){var a=document.createElement("div").style,f="undefined"!=typeof a.cssFloat?"cssFloat":"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?f:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var f,
  38. b=[],c=0;c<a.length;c++)if(f=a[c])/@import|[{}]/.test(f)?b.push("\x3cstyle\x3e"+f+"\x3c/style\x3e"):b.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+f+'"\x3e');return b.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(b,"\x26amp;").replace(c,"\x26gt;").replace(e,"\x26lt;")},htmlDecode:function(a){return a.replace(h,m)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(g,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},
  39. transformPlainTextToHtml:function(a,f){var b=f==CKEDITOR.ENTER_BR,c=this.htmlEncode(a.replace(/\r\n/g,"\n")),c=c.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),l=f==CKEDITOR.ENTER_P?"p":"div";if(!b){var d=/\n{2}/g;if(d.test(c))var p="\x3c"+l+"\x3e",m="\x3c/"+l+"\x3e",c=p+c.replace(d,function(){return m+p})+m}c=c.replace(/\n/g,"\x3cbr\x3e");b||(c=c.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+l+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));c=c.replace(/^ | $/g,"\x26nbsp;");return c=c.replace(/(>|\s) /g,
  40. 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)},
  41. 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;b<c;b++){if(f(a[b]))return b}else{if(a.indexOf)return a.indexOf(f);b=0;for(c=a.length;b<c;b++)if(a[b]===f)return b}return-1},search:function(a,f){var b=CKEDITOR.tools.indexOf(a,
  42. f);return 0<=b?a[b]:null},bind:function(a,f){return function(){return a.apply(f,arguments)}},createClass:function(a){var f=a.$,b=a.base,c=a.privates||a._,l=a.proto;a=a.statics;!f&&(f=function(){b&&this.base.apply(this,arguments)});if(c)var d=f,f=function(){var a=this._||(this._={}),f;for(f in c){var b=c[f];a[f]="function"==typeof b?CKEDITOR.tools.bind(b,this):b}d.apply(this,arguments)};b&&(f.prototype=this.prototypedCopy(b.prototype),f.prototype.constructor=f,f.base=b,f.baseProto=b.prototype,f.prototype.base=
  43. function(){this.base=b.prototype.base;b.apply(this,arguments);this.base=arguments.callee});l&&this.extend(f.prototype,l,!0);a&&this.extend(f,a,!0);return f},addFunction:function(b,f){return a.push(function(){return b.apply(f||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var f=a[b];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,f;return function(b){f=CKEDITOR.tools.trim(b+"")+"px";return a.test(f)?
  44. f:b||""}}(),convertToPx:function(){var a;return function(f){a||(a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(a));return/%$/.test(f)?f:(a.setStyle("width",f),a.$.clientWidth)}}(),repeat:function(a,f){return Array(f+1).join(a)},tryThese:function(){for(var a,f=0,b=arguments.length;f<b;f++){var c=arguments[f];try{a=c();break}catch(l){}}return a},
  45. genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var f=arguments,b=this;window.setTimeout(function(){a.apply(b,f)},0)}},normalizeCssText:function(a,f){var b=[],c,l=CKEDITOR.tools.parseCssText(a,!0,f);for(c in l)b.push(c+":"+l[c]);b.sort();return b.length?b.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,b,c,l){a=[b,c,l];for(b=0;3>b;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2);
  46. 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(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
  47. 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==
  48. arguments.length&&(b=!0);for(var l=0,d=a.length;l<d;++l)c[a[l]]=b;return c},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(b){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,b,c){function l(){m=(new Date).getTime();d=!1;c?b.call(c):b()}var d,m=0;return{input:function(){if(!d){var b=(new Date).getTime()-m;b<a?d=setTimeout(l,a-b):l()}},reset:function(){d&&clearTimeout(d);d=m=0}}},enableHtml5Elements:function(a,
  49. b){for(var c="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),l=c.length,d;l--;)d=a.createElement(c[l]),b&&a.appendChild(d)},checkIfAnyArrayItemMatches:function(a,b){for(var c=0,l=a.length;c<l;++c)if(a[c].match(b))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,b){for(var c in a)if(c.match(b))return!0;return!1},keystrokeToString:function(a,b){var c=b&16711680,l=
  50. b&65535,d=CKEDITOR.env.mac,m=[],p=[];c&CKEDITOR.CTRL&&(m.push(d?"⌘":a[17]),p.push(d?a[224]:a[17]));c&CKEDITOR.ALT&&(m.push(d?"⌥":a[18]),p.push(a[18]));c&CKEDITOR.SHIFT&&(m.push(d?"⇧":a[16]),p.push(a[16]));l&&(a[l]?(m.push(a[l]),p.push(a[l])):(m.push(String.fromCharCode(l)),p.push(String.fromCharCode(l))));return{display:m.join("+"),aria:p.join("+")}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();
  51. for(var b=document.cookie.split(";"),c,l,d=0;d<b.length;d++)if(c=b[d].split("\x3d"),l=decodeURIComponent(CKEDITOR.tools.trim(c[0]).toLowerCase()),l===a)return decodeURIComponent(1<c.length?c[1]:"");return null},setCookie:function(a,b){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(b)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],b="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);
  52. else for(var c=0;40>c;c++)a.push(Math.floor(256*Math.random()));for(c=0;c<a.length;c++)var l="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[c]%36),b=b+(.5<Math.random()?l.toUpperCase():l);a=b;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){return a?window.CSS&&CSS.escape?CSS.escape(a):isNaN(parseInt(a.charAt(0),10))?a:"\\3"+a.charAt(0)+" "+a.substring(1,a.length):""}}})();
  53. CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(a,b){for(var c=CKEDITOR.tools.clone(a),l=1;l<arguments.length;l++){b=arguments[l];for(var d in b)delete c[d]}return c},b={},c={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},g={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},l={"#":1},m={center:1,dir:1,noframes:1};
  54. a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},l,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,m);d={a:d(b,{a:1,button:1}),abbr:b,address:c,
  55. area:h,article:c,aside:c,audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:d(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:c,dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},g),header:c,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,
  56. body:1},c,g),i:b,iframe:l,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,main:c,map:c,mark:b,menu:a({li:1},c),meta:h,meter:d(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:l,output:b,p:b,param:h,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:l,section:c,select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:l,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),
  57. sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:l,tfoot:{tr:1},th:c,thead:{tr:1},time:d(b,{time:1}),title:l,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,m),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,
  58. fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,
  59. track:1,wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},d.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi: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,mark:1,meter:1,output:1,q:1,ruby:1,
  60. s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return d}();
  61. CKEDITOR.dom.event=function(a){this.$=a};
  62. CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},preventDefault:function(a){var d=this.$;d.preventDefault?d.preventDefault():d.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=
  63. this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;
  64. CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){a&&(this.$=a)};
  65. CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(c){"undefined"!=typeof CKEDITOR&&a.fire(b,new CKEDITOR.dom.event(c))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(d){var b=this.getCustomData("_cke_nativeListeners");b||(b={},this.setCustomData("_cke_nativeListeners",b));b[d]||(b=b[d]=a(this,d),this.$.addEventListener?this.$.addEventListener(d,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+
  66. d,b));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),c=b&&b[a];c&&(this.$.removeEventListener?this.$.removeEventListener(a,c,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,c),delete b[a])}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var c=a[b];this.$.detachEvent?this.$.detachEvent("on"+
  67. b,c):this.$.removeEventListener&&this.$.removeEventListener(b,c,!1);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();
  68. (function(a){var d={};CKEDITOR.on("reset",function(){d={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return!1}};a.setCustomData=function(a,c){var e=this.getUniqueId();(d[e]||(d[e]={}))[a]=c;return this};a.getCustomData=function(a){var c=this.$["data-cke-expando"];return(c=c&&d[c])&&a in c?c[a]:null};a.removeCustomData=function(a){var c=this.$["data-cke-expando"],c=c&&d[c],e,g;c&&(e=c[a],g=a in c,delete c[a]);return g?e:null};a.clearCustomData=function(){this.removeAllListeners();var a=
  69. this.$["data-cke-expando"];a&&delete d[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype);
  70. CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;
  71. CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;
  72. CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,d){a.append(this,d);return a},clone:function(a,d){function b(c){c["data-cke-expando"]&&(c["data-cke-expando"]=!1);if(c.nodeType==CKEDITOR.NODE_ELEMENT||c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(d||c.nodeType!=CKEDITOR.NODE_ELEMENT||c.removeAttribute("id",!1),a){c=c.childNodes;for(var e=0;e<c.length;e++)b(c[e])}}function c(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=
  73. b.getName();":"==d[0]&&b.renameNode(d.substring(1))}if(a)for(d=0;d<b.getChildCount();d++)c(b.getChild(d))}}var e=this.$.cloneNode(a);b(e);e=new CKEDITOR.dom.node(e);CKEDITOR.env.ie&&9>CKEDITOR.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.$,
  74. 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,
  75. 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==
  76. 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===
  77. 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)?
  78. 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==
  79. 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<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}d=this.getAddress();a=a.getAddress();for(var b=Math.min(d.length,a.length),c=0;c<b;c++)if(d[c]!=
  80. a[c])return d[c]<a[c]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return d.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,d){var b=this.$,c,e;d||(b=b.parentNode);"function"==typeof a?(e=!0,c=a):(e=!1,c=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof a?b==a:b in a});for(;b;){if(c(e?new CKEDITOR.dom.node(b):b))return new CKEDITOR.dom.node(b);
  81. try{b=b.parentNode}catch(g){b=null}}return null},hasAscendant:function(a,d){var b=this.$;d||(b=b.parentNode);for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return!0;b=b.parentNode}return!1},move:function(a,d){a.append(this.remove(),d)},remove:function(a){var d=this.$,b=d.parentNode;if(b){if(a)for(;a=d.firstChild;)b.insertBefore(d.removeChild(a),d);b.removeChild(d)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&
  82. (a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(d)d.length<b&&(a.split(b-d.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(d)d.length<b&&(a.split(d.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&
  83. (a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var d=this;this.type!=CKEDITOR.NODE_ELEMENT&&(d=this.getParent());CKEDITOR.env.edge&&d&&d.is("textarea","input")&&(a=!0);if(!a&&d&&"undefined"!=typeof d.$.isContentEditable)return!(d.$.isContentEditable||d.data("cke-editable"));for(;d;){if(d.data("cke-editable"))return!1;if(d.hasAttribute("contenteditable"))return"false"==d.getAttribute("contenteditable");d=d.getParent()}return!0}});
  84. CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject;
  85. CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,d="CSS1Compat"==a.compatMode;return{width:(d?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(d?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||
  86. a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}});CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject;
  87. CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var d=new CKEDITOR.dom.element("link");d.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(d)}},appendStyleText:function(a){if(this.$.createStyleSheet){var d=this.$.createStyleSheet("");d.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return d||
  88. b.$.sheet},createElement:function(a,d){var b=new CKEDITOR.dom.element(a,this);d&&(d.attributes&&b.setAttributes(d.attributes),d.styles&&b.setStyles(d.styles));return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(d){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,d){for(var b=
  89. this.$.documentElement,c=0;b&&c<a.length;c++){var e=a[c];if(d)for(var g=-1,h=0;h<b.childNodes.length;h++){var l=b.childNodes[h];if(!0!==d||3!=l.nodeType||!l.previousSibling||3!=l.previousSibling.nodeType)if(g++,g==e){b=l;break}}else b=b.childNodes[e]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,d){CKEDITOR.env.ie&&8>=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];
  90. 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*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+
  91. 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};
  92. 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;
  93. 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)};
  94. 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])};
  95. (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;c<f;c++)b+=parseInt(this.getComputedStyle(h[a][c])||0,10)||0;return b}var e=document.createElement("_").classList,e="undefined"!==typeof e&&
  96. null!==String(e.add).match(/\[Native code\]/gi),g=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:e?function(a){this.$.classList.add(a);return this}:function(b){var c=this.$.className;c&&(a(c,b)||(c+=" "+b));this.$.className=c||b;return this},removeClass:e?function(a){var b=this.$;b.classList.remove(a);b.className||b.removeAttribute("class");return this}:function(b){var c=this.getAttribute("class");c&&a(c,b)&&((c=c.replace(new RegExp("(?:^|\\s+)"+
  97. b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(b){return a(this.$.className,b)},append:function(a,b){"string"==typeof a&&(a=this.getDocument().createElement(a));b?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var b=new CKEDITOR.dom.element("div",this.getDocument());b.setHtml(a);b.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=
  98. this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.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);
  99. 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().$):
  100. 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({},
  101. 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}}:
  102. 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,
  103. 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)?
  104. a:[];for(f=0;f<c.length;f++)-1===CKEDITOR.tools.indexOf(a,c[f].name)&&(b[c[f].name]=c[f].value);return b},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=
  105. function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();
  106. if(CKEDITOR.env.ie&&8>=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)]},
  107. is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;b<arguments.length;b++)if(arguments[b]==a)return!0;return!1},isEditable:function(a){var b=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[b]||
  108. CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var b=this.clone(0,1);a=a.clone(0,1);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(b.$.isEqualNode)return b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),b.$.isEqualNode(a.$);b=b.getOuterHtml();a=
  109. a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.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;
  110. for(var a=this.getChildren(),b=0,c=a.count();b<c;b++){var f=a.getItem(b);if(f.type!=CKEDITOR.NODE_ELEMENT||!f.data("cke-bookmark"))if(f.type==CKEDITOR.NODE_ELEMENT&&!f.isEmptyInlineRemoveable()||f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var c=a[b];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
  111. default:if(c.specified)return!0}}return!1}:function(){var a=this.$.attributes,b=a.length,c={"data-cke-expando":1,_moz_dirty:1};return 0<b&&(2<b||!c[a[0].nodeName]||2==b&&!c[a[1].nodeName])},hasAttribute:function(){function a(b){var c=this.$.attributes.getNamedItem(b);if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return c?
  112. c.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.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=
  113. [];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:"",
  114. 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,
  115. 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=
  116. 0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a=a||this.getAttributes(),a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var b=[],d=0;d<c.length;d++)if(f)for(var t=
  117. 0;t<f.length;t++)b.push([a,c[d],f[t]].join("-"));else b.push([a,c[d]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.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",
  118. "none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,f=b.count();c<f;c++)a=b.getItem(c),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,f=this.getDocument(),d=f.getBody(),t="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
  119. 8!==CKEDITOR.env.version:1)){var e=this.$.getBoundingClientRect(),g=f.$.documentElement,p=g.clientTop||d.$.clientTop||0,w=g.clientLeft||d.$.clientLeft||0,h=!0;CKEDITOR.env.ie&&(h=f.getDocumentElement().contains(this),f=f.getBody().contains(this),h=t&&f||!t&&h);h&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=d.$.scrollLeft||g.scrollLeft,c=d.$.scrollTop||g.scrollTop):(c=t?d.$:g,b=c.scrollLeft,c=c.scrollTop),b=e.left+b-w,c=e.top+c-p)}else for(p=this,w=null;p&&"body"!=p.getName()&&
  120. "html"!=p.getName();){b+=p.$.offsetLeft-p.$.scrollLeft;c+=p.$.offsetTop-p.$.scrollTop;p.equals(this)||(b+=p.$.clientLeft||0,c+=p.$.clientTop||0);for(;w&&!w.equals(p);)b-=w.$.scrollLeft,c-=w.$.scrollTop,w=w.getParent();w=p;p=(e=p.$.offsetParent)?new CKEDITOR.dom.element(e):null}a&&(e=this.getWindow(),p=a.getWindow(),!e.equals(p)&&e.$.frameElement&&(a=(new CKEDITOR.dom.element(e.$.frameElement)).getDocumentPosition(a),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
  121. t||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var c=b.getWindow();try{var f=c.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(d){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var f,d,e,z;function g(b,c){/body|html/.test(a.getName())?
  122. a.getWindow().$.scrollBy(b,c):(a.$.scrollLeft+=b,a.$.scrollTop+=c)}function p(a,b){var c={x:0,y:0};if(!a.is(h?"body":"html")){var f=a.$.getBoundingClientRect();c.x=f.left;c.y=f.top}f=a.getWindow();f.equals(b)||(f=p(CKEDITOR.dom.element.get(f.$.frameElement),b),c.x+=f.x,c.y+=f.y);return c}function w(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var h="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=h?e.getBody():e.getDocumentElement());
  123. CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();d=p(this,e);var v=p(a,e),u=this.$.offsetHeight;f=this.$.offsetWidth;var k=a.$.clientHeight,q=a.$.clientWidth;e=d.x-w(this,"left")-v.x||0;z=d.y-w(this,"top")-v.y||0;f=d.x+f+w(this,"right")-(v.x+q)||0;d=d.y+u+w(this,"bottom")-(v.y+k)||0;(0>z||0<d)&&g(0,!0===b?z:!1===b?d:0>z?z:d);c&&(0>e||0<f)&&g(0>e?e:f,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
  124. "_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")}},
  125. 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<c.length;f++){var d=c[f],e=d.nodeName.toLowerCase(),g;if(!(e in b))if("checked"==e&&(g=this.getAttribute(e)))a.setAttribute(e,g);else if(!CKEDITOR.env.ie||this.hasAttribute(e))g=this.getAttribute(e),null===g&&(g=d.nodeValue),a.setAttribute(e,g)}""!==this.$.style.cssText&&
  126. (a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,c){var f=b.childNodes;if(0<=c&&c<f.length)return f[c]}return function(b){var c=this.$;if(b.slice)for(b=b.slice();0<b.length&&c;)c=a(c,
  127. b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
  128. "ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,c,f,d;a=a||void 0===a;for(c in b)if(f=b[c],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(d=f.editable(),d.equals(this)||d.contains(this)))return f;return null},find:function(a){var c=d(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this,
  129. a)));c();return a},findOne:function(a){var c=d(this);a=this.$.querySelector(b(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var f=a(this);if(!1!==f){c=this.getChildren();for(var d=0;d<c.count();d++)f=c.getItem(d),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}}});var h={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
  130. CKEDITOR.dom.element.prototype.setSize=function(a,b,d){"number"==typeof b&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=c.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(d-=c.call(this,a));return d}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a};
  131. CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,
  132. insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});
  133. (function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),null;c.optimize()}var f,d=c.startContainer;f=c.endContainer;var e=c.startOffset,D=c.endOffset,u,k=this.guard,q=this.type,n=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var y=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),g=f.type==CKEDITOR.NODE_ELEMENT?f.getChild(D):f.getNext();this._.guardLTR=function(a,b){return(!b||!y.equals(a))&&(!g||
  134. !a.equals(g))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var h=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),G=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,b){return(!b||!h.equals(a))&&(!G||!a.equals(G))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var l=a?this._.guardRTL:this._.guardLTR;u=k?function(a,b){return!1===l(a,b)?!1:k(a,b)}:l;this.current?f=this.current[n](!1,q,u):(a?f.type==CKEDITOR.NODE_ELEMENT&&
  135. (f=0<D?f.getChild(D-1):!1===u(f,!0)?null:f.getPreviousSourceNode(!0,q,u)):(f=d,f.type==CKEDITOR.NODE_ELEMENT&&((f=f.getChild(e))||(f=!1===u(d,!0)?null:d.getNextSourceNode(!0,q,u)))),f&&!1===u(f)&&(f=null));for(;f&&!this._.end;){this.current=f;if(!this.evaluator||!1!==this.evaluator(f)){if(!b)return f}else if(b&&this.evaluator)return!1;f=f[n](!1,q,u)}this.end();return this.current=null}function d(b){for(var c,f=null;c=a.call(this,b);)f=c;return f}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=
  136. a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return d.call(this)},lastBackward:function(){return d.call(this,1)},reset:function(){delete this.current;this._={}}}});var b={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,
  137. "table-column":1,"table-cell":1,"table-caption":1},c={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in c||!b[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};
  138. CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(f){var d,e;d=f&&f.type!=CKEDITOR.NODE_ELEMENT&&(e=f.getParent())&&c(e);d=a?d:d||c(f);return!!(b^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^c)}};CKEDITOR.dom.walker.invisible=
  139. function(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(f){b(f)?f=1:(f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent()),f=f.$.offsetWidth<=c);return!!(a^f)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!h(a)}return function(c){var f=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&e.test(c.getText());f&&(f=c.getParent(),c=c.getNext(b),f=f.isBlockBoundary()&&
  140. (!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^f)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var e=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp(),m=function(a){return h(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=
  141. function(a){return function(b){b=g(b)||h(b)||l(b);return!!(a^b)}};var r=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var c=0,f=b.getChildCount();c<f;++c)if(!r(b.getChild(c)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),D=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(b){b=
  142. r(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(D)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(m(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&e.test(a.getText()))?a:!1}})();
  143. CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var d=a instanceof CKEDITOR.dom.document;this.document=d?a:a.getDocument();this.root=d?a.getBody():a};
  144. (function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function d(a,b,c,d,e){function p(a,b,c,f){var d=c?a.getPrevious():a.getNext();if(f&&l)return d;k||f?b.append(a.clone(!0,e),c):(a.remove(),u&&b.append(a));return d}function g(){var a,b,c,f=Math.min(O.length,B.length);for(a=0;a<f;a++)if(b=O[a],c=B[a],!b.equals(c))return a;return a-1}function h(){var b=I-1,c=C&&r&&!q.equals(n);b<E-1||b<K-1||c?(c?a.moveToPosition(n,
  145. CKEDITOR.POSITION_BEFORE_START):K==b+1&&G?a.moveToPosition(B[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(B[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=O[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var l=0===b,u=1==b,k=2==b;b=k||u;var q=a.startContainer,n=a.endContainer,
  146. y=a.startOffset,A=a.endOffset,J,G,C,r,m,P;if(k&&n.type==CKEDITOR.NODE_TEXT&&q.equals(n))q=a.document.createText(q.substring(y,A)),c.append(q);else{n.type==CKEDITOR.NODE_TEXT?k?P=!0:n=n.split(A):0<n.getChildCount()?A>=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):0<q.getChildCount()?0===y?(q=q.getChild(y),J=!0):q=q.getChild(y-1):C=J=!0;for(var O=q.getParents(),B=n.getParents(),I=g(),E=O.length-1,K=B.length-1,F=c,L,aa,V,ga=-1,R=I;R<=E;R++){aa=
  147. O[R];V=aa.getNext();for(R!=E||aa.equals(B[R])&&E<K?b&&(L=F.append(aa.clone(0,e))):J?p(aa,F,!1,C):m&&F.append(a.document.createText(aa.substring(y)));V;){if(V.equals(B[R])){ga=R;break}V=p(V,F)}F=L}F=c;for(R=I;R<=K;R++)if(c=B[R],V=c.getPrevious(),c.equals(O[R]))b&&(F=F.getChild(0));else{R!=K||c.equals(O[R])&&K<E?b&&(L=F.append(c.clone(0,e))):G?p(c,F,!1,r):P&&F.append(a.document.createText(c.substring(0,A)));if(R>ga)for(;V;)V=p(V,F,!0);F=L}k||h()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),
  148. 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?
  149. "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 ]*(?:&nbsp;|\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);
  150. 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||
  151. 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(),
  152. 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-
  153. 1),d=f.getLength());if(f.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(e=f;d--;)if(g=e.getChild(d).getIndex(!0),0<=g){d=g;break a}d=-1}d+=1}if(f.type==CKEDITOR.NODE_TEXT){e=f;for(g=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)g+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;e=g;f.getText()?d+=e:(g=f.getPrevious(c),e?(d=e,f=g?g.getNext():f.getParent().getFirst()):(f=f.getParent(),d=g?g.getIndex(!0)+1:0))}b.container=f;b.offset=d}function b(a,c){var f=c.getCustomData("cke-fillingChar");
  154. if(f){var d=a.container;f.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,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),
  155. 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()):
  156. 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=
  157. 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):
  158. 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||
  159. 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):
  160. 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=
  161. 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():
  162. !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=
  163. 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||
  164. 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<q.$.offsetWidth||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(G=q.$.getElementsByTagName("*"),C=
  165. 0;r=G[C++];)if(!CKEDITOR.dtd.$removeEmpty[r.nodeName.toLowerCase()]){q=null;break}q&&(A=!!J.length)}else q=null}else A=1;A&&y&&(n?u=k:this.setEndAfter(k));if(q){A=q.getNext();if(!k&&!A){k=q;q=null;break}q=A}else k=null}k&&(k=c(k.getParent()))}l&&u&&(g=l.contains(u)?u:l,this.setStartBefore(g),this.setEndAfter(g));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:k=new CKEDITOR.dom.range(this.root);h=this.root;k.setStartAt(h,CKEDITOR.POSITION_AFTER_START);k.setEnd(this.startContainer,
  166. this.startOffset);k=new CKEDITOR.dom.walker(k);var m,P,O=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),B=null,I=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(B){if(B.equals(a)){B=null;return}}else B=a;else if(B)return;var b=O(a);b||(m=a);return b},e=function(a){var b=I(a);!b&&a.is&&a.is("br")&&(P=a);return b};k.guard=I;k=k.lastBackward();m=m||h;this.setStartAt(m,!m.is("br")&&(!k&&this.checkStartOfBlock()||k&&m.contains(k))?
  167. CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){k=this.clone();k=new CKEDITOR.dom.walker(k);var E=CKEDITOR.dom.walker.whitespaces(),K=CKEDITOR.dom.walker.bookmark();k.evaluator=function(a){return!E(a)&&!K(a)};if((k=k.previous())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br"))break}k=this.clone();k.collapse();k.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);k=new CKEDITOR.dom.walker(k);k.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:I;m=B=P=null;k=k.lastForward();
  168. m=m||h;this.setEndAt(m,!k&&this.checkEndOfBlock()||k&&m.contains(k)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);P&&this.setEndAfter(P)}},shrink:function(a,b,c){if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var d=this.clone(),e=this.startContainer,p=this.endContainer,g=this.startOffset,h=this.endOffset,l=1,u=1;e&&e.type==CKEDITOR.NODE_TEXT&&(g?g>=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):
  169. (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||
  170. (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)&&
  171. 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=
  172. 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(),
  173. 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,
  174. 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();
  175. 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)&&
  176. (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);
  177. 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||
  178. 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:
  179. 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);
  180. 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();
  181. 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")||
  182. "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,
  183. 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),
  184. !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)&&
  185. 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=
  186. 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=
  187. 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();
  188. 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;p<g.count();p++)if(c=g.getItem(p),b||!c.isReadOnly())h=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(c),l=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED,
  189. h&&l&&e.push(c);return e}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";
  190. (function(){function a(a){1>arguments.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,
  191. 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),
  192. 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=
  193. 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);
  194. 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()&&
  195. (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();
  196. 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));
  197. 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};
  198. 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,
  199. 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=
  200. 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)}})();
  201. 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",
  202. {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)};
  203. 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?
  204. 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;
  205. 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]};
  206. (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]=
  207. 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<d;++c){k=C(a[c]);q=!0===k.classes||!0===k.styles||!0===k.attributes;n=k;p=g=f=void 0;for(f in P)n[f]=H(n[f]);E=!0;for(p in O){f=O[p];g=n[f];u=[];y=void 0;for(y in g)-1<y.indexOf("*")?u.push(new RegExp("^"+y.replace(/\*/g,".*")+"$")):u.push(y);g=u;g.length&&(n[f]=g,E=!1)}n.nothingRequired=E;n.noProperties=!(n.attributes||n.classes||n.styles);if(!0===k.elements||
  208. null===k.elements)e[q?"unshift":"push"](k);else for(G in n=k.elements,delete k.elements,n)if(b[G])b[G][q?"unshift":"push"](k);else b[G]=[k]}}function d(a,c,d,e){if(!a.match||a.match(c))if(e||l(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=b(a.attributes,c.attributes,d.validAttributes)),d.allStyles||(d.allStyles=b(a.styles,c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;e=d.validClasses;if(a)if(!0===a)a=!0;else{for(var k=0,q=c.length,n;k<q;++k)n=c[k],e[n]||
  209. (e[n]=a(n));a=!1}else a=!1;d.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var d in b)c[d]||(c[d]=a(d));return!1}function c(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=e(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=e(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=!1,k=!0===a,q=b.length;q--;)if(k||a(b[q]))b.splice(q,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function e(a,
  210. b){if(!a)return!1;var c=!1,d=!0===a,e;for(e in b)if(d||a(e))delete b[e],c=!0;return c}function g(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function h(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=Z(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},d=0,e;for(e in a)c[e]=a[e],d++;return d?c:!1}function l(a,b){if(a.nothingRequired)return!0;
  211. var c,d,e,k;if(e=a.requiredClasses)for(k=b.classes,c=0;c<e.length;++c)if(d=e[c],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(k,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(k,d))return!1;return m(b.styles,a.requiredStyles)&&m(b.attributes,a.requiredAttributes)}function m(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],"string"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function r(a){if(!a)return{};
  212. a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,c,d,e,k={},q=1;for(a=Z(a);b=a.match(B);)(c=b[2])?(d=D(c,"styles"),e=D(c,"attrs"),c=D(c,"classes")):d=e=c=null,k["$"+q++]={elements:b[1],classes:c,styles:d,attributes:e},a=a.slice(b[0].length);return k}function D(a,b){var c=a.match(I[b]);return c?Z(c[1]):null}function t(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||
  213. "",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function z(a,b,e,k){var n=0,f;k.toHtml&&(b.name=b.name.replace(E,"$1"));if(k.doCallbacks&&a.elementCallbacks){a:{f=a.elementCallbacks;for(var g=0,u=f.length,y;g<u;++g)if(y=f[g](b)){f=y;break a}f=void 0}if(f)return f}if(k.doTransform&&(f=a._.transformations[b.name])){t(b);for(g=0;g<f.length;++g)q(a,b,f[g]);p(b)}if(k.doFilter){a:{g=b.name;u=a._;a=u.allowedRules.elements[g];f=u.allowedRules.generic;g=u.disallowedRules.elements[g];u=u.disallowedRules.generic;
  214. y=k.skipRequired;var h={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},B,A;if(a||f){t(b);if(g)for(B=0,A=g.length;B<A;++B)if(!1===c(g[B],b,h)){a=null;break a}if(u)for(B=0,A=u.length;B<A;++B)c(u[B],b,h);if(a)for(B=0,A=a.length;B<A;++B)d(a[B],b,h,y);if(f)for(B=0,A=f.length;B<A;++B)d(f[B],b,h,y);a=h}else a=null}if(!a||!a.valid)return e.push(b),1;A=a.validAttributes;var G=a.validStyles;
  215. f=a.validClasses;var g=b.attributes,l=b.styles,u=b.classes;y=b.classBackup;var J=b.styleBackup,F,I,C=[],h=[],m=/^data-cke-/;B=!1;delete g.style;delete g["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(F in g)A[F]||(m.test(F)?F==(I=F.replace(/^data-cke-saved-/,""))||A[I]||(delete g[F],B=!0):(delete g[F],B=!0));if(!a.allStyles||a.hadInvalidStyle){for(F in l)a.allStyles||G[F]?C.push(F+":"+l[F]):B=!0;C.length&&(g.style=C.sort().join("; "))}else J&&(g.style=J);if(!a.allClasses||
  216. a.hadInvalidClass){for(F=0;F<u.length;++F)(a.allClasses||f[u[F]])&&h.push(u[F]);h.length&&(g["class"]=h.sort().join(" "));y&&h.length<y.split(/\s+/).length&&(B=!0)}else y&&(g["class"]=y);B&&(n=1);if(!k.skipFinalValidation&&!w(b))return e.push(b),1}k.toHtml&&(b.name=b.name.replace(K,"cke:$1"));return n}function x(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function p(a){var b=a.attributes,c;delete b.style;delete b["class"];
  217. if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function w(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function H(a){if(!a)return!1;if(!0===a)return!0;var b=x(a);return function(c){return c in a||b&&c.match(b)}}function v(){return new CKEDITOR.htmlParser.element("br")}function u(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==
  218. a.name||G.$block[a.name])}function k(a,b,c){var d=a.name;if(G.$empty[d]||!a.children.length)"hr"==d&&"br"==b?a.replaceWith(v()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(G.$block[d]||"tr"==d)if("br"==b)a.previous&&!u(a.previous)&&(b=v(),b.insertBefore(a)),a.next&&!u(a.next)&&(b=v(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,e;b:{e=G[b];for(var k=0,q=d.length,n;k<q;++k)if(n=d[k],n.type==CKEDITOR.NODE_ELEMENT&&!e[n.name]){e=!1;break b}e=!0}if(e)a.name=b,a.attributes=
  219. {},c.push({check:"parent-down",el:a});else{e=a.parent;for(var k=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,f,g,q=d.length;0<q;)n=d[--q],k&&(n.type==CKEDITOR.NODE_TEXT||n.type==CKEDITOR.NODE_ELEMENT&&G.$inline[n.name])?(f||(f=new CKEDITOR.htmlParser.element(b),f.insertAfter(a),c.push({check:"parent-down",el:f})),f.add(n,0)):(f=null,g=G[e.name]||G.span,n.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n.type!=CKEDITOR.NODE_ELEMENT||g[n.name]||c.push({check:"el-up",el:n}));a.remove()}}else d in
  220. {style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function q(a,b,c){var d,e;for(d=0;d<c.length;++d)if(e=c[d],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(b))){e.right(b,F);break}}function n(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,k,q,n,f;if(a.name!=c.element)return!1;for(k in d)if("class"==k)for(c=d[k].split(/\s+/),n=a.classes.join("|");f=c.pop();){if(-1==n.indexOf(f))return!1}else if(a.attributes[k]!=d[k])return!1;for(q in e)if(a.styles[q]!=
  221. e[q])return!1;return!0}function y(a,b){var c,d;"string"==typeof a?c=a:a instanceof CKEDITOR.style?d=a:(c=a[0],d=a[1]);return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function A(a){return function(b){return n(b,a)}}function J(a){return function(b,c){c[a](b)}}var G=CKEDITOR.dtd,C=CKEDITOR.tools.copy,Z=CKEDITOR.tools.trim,Q=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=
  222. !1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var b=a.config.allowedContent;!0===b?this.disabled=!0:(b||(this.customConfig=!1),this.allow(b,"config",1),this.allow(a.config.extraAllowedContent,"extra",1),this.allow(Q[a.enterMode]+" "+Q[a.shiftEnterMode],"default",
  223. 1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!g(this,b,d))return!1;var e,k;if("string"==typeof b)b=f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);e=b.getDefinition();b={};d=e.attributes;b[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.objectKeys(e.styles)};d&&(d=
  224. C(d),e.classes=d["class"]?d["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete d["class"],e.attributes=d,e.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)k=this.allow(b[e],c,d);return k}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,q=[],n=this.editor&&this.editor.config.protectedSource,f,g=!1,p={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};
  225. a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(f=z(e,a,q,p),f&1)g=!0;else if(f&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var k,u,E;if(n)for(u=0;u<n.length;++u)if((E=d.match(n[u]))&&E[0].length==d.length){c=!0;
  226. break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(k=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&z(e,k,c,p);c=!c.length}c||q.push(a)}},null,!0);q.length&&(g=!0);var u;a=[];d=Q[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var E;c=q.pop();)c.type==CKEDITOR.NODE_ELEMENT?k(c,d,a):c.remove();for(;u=a.pop();)if(c=u.el,c.parent)switch(E=G[c.parent.name]||G.span,u.check){case "it":G.$removeEmpty[c.name]&&!c.children.length?k(c,d,a):w(c)||k(c,d,a);break;case "el-up":c.parent.type==
  227. CKEDITOR.NODE_DOCUMENT_FRAGMENT||E[c.name]||k(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||E[c.name]||k(c.parent,d,a)}return g},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!g(this,b,!0))return!1;"string"==typeof b&&(b=f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},
  228. addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],e;for(b=0;b<a.length&&!e;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(e=c);if(e){for(b=0;b<a.length;++b)d.push(y(a[b],e));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);
  229. this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var k=void 0,q=void 0,n=void 0,f=void 0,g=void 0,p=void 0;c=[];for(q=0;q<b.length;++q)n=b[q],"string"==typeof n?(n=n.split(/\s*:\s*/),f=n[0],g=null,p=n[1]):(f=n.check,g=n.left,p=n.right),k||(k=n,k=k.element?k.element:f?f.match(/^([a-z0-9]+)/i)[0]:
  230. k.left.getDefinition().element),g instanceof CKEDITOR.style&&(g=A(g)),c.push({check:f==k?null:f,left:g,right:"string"==typeof p?J(p):p});b=k;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var e,k;if("string"==typeof a){k=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];d=f(a).$1;e=d.styles;var n=d.classes;d.name=d.elements;
  231. d.classes=n=n?n.split(/\s*,\s*/):[];d.styles=r(e);d.attributes=r(d.attributes);d.children=[];n.length&&(d.attributes["class"]=n.join(" "));e&&(d.attributes.style=CKEDITOR.tools.writeCssText(d.styles));e=d}else d=a.getDefinition(),e=d.styles,n=d.attributes||{},e&&!CKEDITOR.tools.isEmpty(e)?(e=C(e),n.style=CKEDITOR.tools.writeCssText(e,!0)):e={},e={name:d.element,attributes:n,classes:n["class"]?n["class"].split(/\s+/):[],styles:e,children:[]};var n=CKEDITOR.tools.clone(e),g=[],u;if(!1!==b&&(u=this._.transformations[e.name])){for(d=
  232. 0;d<u.length;++d)q(this,e,u[d]);p(e)}z(this,n,g,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});b=0<g.length?!1:CKEDITOR.tools.objectCompare(e.attributes,n.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[k]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),k;if(this.check(Q[c]))return c;for(d||(e=e.reverse());k=e.pop();)if(this.check(k))return b[k];
  233. return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var P={styles:1,attributes:1,classes:1},O={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},B=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,I={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},E=/^cke:(object|embed|param)$/,
  234. K=/^(object|embed|param)$/,F;F=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],e=d&&d.match(/^(\d+)(?:\.\d*)?px$/);
  235. e?a.attributes[c]=e[1]:"cke-test"==d&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){function b(d){a.styles["border-top-width"]=c[d[0]];a.styles["border-right-width"]=
  236. c[d[1]];a.styles["border-bottom-width"]=c[d[2]];a.styles["border-left-width"]=c[d[3]]}if(a.styles.border){var c=a.styles.border.match(/([\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles["border-width"]=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}a.styles["border-style"]=a.styles["border-style"]||(a.styles.border.match(/(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit)/)||[])[0];a.styles["border-style"]||delete a.styles["border-style"];
  237. delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(d){a.styles["margin-top"]=
  238. c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles.margin=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:n,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,k,n,q,f;a.name=c.element;for(k in e)if("class"==
  239. k)for(c=a.classes.join("|"),q=e[k].split(/\s+/);f=q.pop();)-1==c.indexOf(f)&&a.classes.push(f);else a.attributes[k]=e[k];for(n in d)a.styles[n]=d[n]}}}})();
  240. (function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=
  241. 1},unlock:function(){delete this._.locked},blur:function(a){function d(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},b,this)}},add:function(a,d){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b=
  242. "focus",c="blur";d&&(CKEDITOR.env.ie?(b="focusin",c="focusout"):CKEDITOR.event.useCapture=1);var e={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,e.focus,this);a.on(c,e.blur,this);d&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",e)}},remove:function(a){a.removeCustomData("focusmanager");var d=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",d.blur);a.removeListener("focus",
  243. d.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};
  244. (function(){var a,d=function(b){b=b.data;var d=b.getKeystroke(),g=this.keystrokes[d],h=this._.editor;a=!1===h.fire("key",{keyCode:d,domEvent:b});a||(g&&(a=!1!==h.execCommand(g,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[d]));a&&b.preventDefault(!0);return!a},b=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",d,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})();
  245. (function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,d,b){a&&CKEDITOR.lang.languages[a]||
  246. (a=this.detect(d,a));var c=this;d=function(){c[a].dir=c.rtl[a]?"rtl":"ltr";b(a,c[a])};this[a]?d():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),d,this)},detect:function(a,d){var b=this.languages;d=d||navigator.userLanguage||navigator.language||a;var c=d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=c[1],c=c[2];b[e+"-"+c]?e=e+"-"+c:b[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||a}}})();
  247. CKEDITOR.scriptLoader=function(){var a={},d={};return{load:function(b,c,e,g){var h="string"==typeof b;h&&(b=[b]);e||(e=CKEDITOR);var l=b.length,m=[],r=[],f=function(a){c&&(h?c.call(e,a):c.call(e,m,r))};if(0===l)f(!0);else{var D=function(a,b){(b?m:r).push(a);0>=--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<e.length;f++)e[f](b,c)},z=function(b){if(a[b])D(b,!0);else{var e=d[b]||(d[b]=[]);e.push(D);if(!(1<e.length)){var f=
  248. new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:b});c&&(CKEDITOR.env.ie&&(8>=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<l;x++)z(b[x])}},
  249. queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(d,g){var h=this;c.push({scriptUrl:d,callback:function(){g&&g.apply(this,arguments);c.shift();a.call(h)}});1==c.length&&a.call(this)}}()}}();CKEDITOR.resourceManager=function(a,d){this.basePath=a;this.fileName=d;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};
  250. CKEDITOR.resourceManager.prototype={add:function(a,d){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var b=this.registered[a]=d||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var d=this.externals[a];return CKEDITOR.getUrl(d&&d.dir||this.basePath+a+"/")},getFilePath:function(a){var d=this.externals[a];
  251. return CKEDITOR.getUrl(this.getPath(a)+(d?d.file:this.fileName+".js"))},addExternal:function(a,d,b){a=a.split(",");for(var c=0;c<a.length;c++){var e=a[c];b||(d=d.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[e]={dir:d,file:b||this.fileName+".js"}}},load:function(a,d,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,e=this.registered,g=[],h={},l={},m=0;m<a.length;m++){var r=a[m];if(r)if(c[r]||e[r])l[r]=this.get(r);else{var f=this.getFilePath(r);g.push(f);f in h||(h[f]=
  252. []);h[f].push(r)}}CKEDITOR.scriptLoader.load(g,function(a,e){if(e.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+h[e[0]].join(",")+'" was not found at "'+e[0]+'".');for(var f=0;f<a.length;f++)for(var g=h[a[f]],p=0;p<g.length;p++){var w=g[p];l[w]=this.get(w);c[w]=1}d.call(b,l)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");
  253. CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var d={};return function(b,c,e){var g={},h=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(g,a);var b=[],f;for(f in a){var l=a[f],t=l&&l.requires;if(!d[f]){if(l.icons)for(var z=l.icons.split(","),x=z.length;x--;)CKEDITOR.skin.addIcon(z[x],l.path+"icons/"+(CKEDITOR.env.hidpi&&l.hidpi?"hidpi/":"")+z[x]+".png");d[f]=1}if(t)for(t.split&&(t=t.split(",")),l=0;l<t.length;l++)g[t[l]]||b.push(t[l])}if(b.length)h.call(this,
  254. b);else{for(f in g)l=g[f],l.onLoad&&!l.onLoad._called&&(!1===l.onLoad()&&delete g[f],l.onLoad._called=1);c&&c.call(e||window,g)}},this)};h.call(this,b)}});CKEDITOR.plugins.setLang=function(a,d,b){var c=this.get(a);a=c.langEntries||(c.langEntries={});c=c.lang||(c.lang=[]);c.split&&(c=c.split(","));-1==CKEDITOR.tools.indexOf(c,d)&&c.push(d);a[d]=b};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this};
  255. CKEDITOR.ui.prototype={add:function(a,d,b){b.name=a.toLowerCase();var c=this.items[a]={type:d,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(c,b)},get:function(a){return this.instances[a]},create:function(a){var d=this.items[a],b=d&&this._.handlers[d.type],c=d&&d.command&&this.editor.getCommand(d.command),b=b&&b.create.apply(this,d.args);this.instances[a]=b;c&&c.uiItems.push(b);b&&!b.type&&(b.type=d.type);return b},addHandler:function(a,d){this._.handlers[a]=
  256. d},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}};CKEDITOR.event.implementOn(CKEDITOR.ui);
  257. (function(){function a(a,e,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==e){if(!(e instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!b(e,f))throw Error('The specified element mode is not supported on element: "'+e.getName()+'".');
  258. this.element=e;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(e.getId()||e.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||d();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",
  259. c);this.on("selectionChange",function(a){g(this,a.data.path)});this.on("activeFilterChange",function(){g(this,this.elementPath(),!0)});this.on("mode",c);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?l(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function d(){do var a="editor"+ ++z;while(CKEDITOR.instances[a]);return a}function b(a,
  260. b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function c(){var a=this.commands,b;for(b in a)e(this,a[b])}function e(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function g(a,b,c){if(b){var d,e,k=a.commands;for(e in k)d=k[e],(c||d.contextSensitive)&&d.refresh(a,b)}}function h(a){var b=a.config.customConfig;if(!b)return!1;var b=
  261. CKEDITOR.getUrl(b),c=x[b]||(x[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&h(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};h(a)});return!0}function l(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}c=a.config;a.readOnly=c.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?
  262. a.element.is("textarea")?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;
  263. a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;c.skin&&(CKEDITOR.skinName=c.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);m(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);h(a)||a.fireOnce("customConfigLoaded")}function m(a){CKEDITOR.skin.loadPart("editor",function(){r(a)})}function r(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,
  264. c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");f(a)})}function f(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);D(a)})}function D(a){var b=a.config,c=b.plugins,d=b.extraPlugins,e=
  265. b.removePlugins;if(d)var k=new RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(k,""),c=c+(","+d);if(e)var q=new RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(q,"");CKEDITOR.env.air&&(c+=",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],e=[],k=[];a.plugins=c;for(var f in c){var g=c[f],u=g.lang,h=null,l=g.requires,m;CKEDITOR.tools.isArray(l)&&(l=l.join(","));if(l&&(m=l.match(q)))for(;l=m.pop();)CKEDITOR.error("editor-plugin-required",
  266. {plugin:l.replace(",",""),requiredBy:f});u&&!a.lang[f]&&(u.split&&(u=u.split(",")),0<=CKEDITOR.tools.indexOf(u,a.langCode)?h=a.langCode:(h=a.langCode.replace(/-.*/,""),h=h!=a.langCode&&0<=CKEDITOR.tools.indexOf(u,h)?h:0<=CKEDITOR.tools.indexOf(u,"en")?"en":u[0]),g.langEntries&&g.langEntries[h]?(a.lang[f]=g.langEntries[h],h=null):k.push(CKEDITOR.getUrl(g.path+"lang/"+h+".js")));e.push(h);d.push(g)}CKEDITOR.scriptLoader.load(k,function(){for(var c=["beforeInit","init","afterInit"],k=0;k<c.length;k++)for(var n=
  267. 0;n<d.length;n++){var q=d[n];0===k&&e[n]&&q.lang&&q.langEntries&&(a.lang[q.name]=q.langEntries[e[n]]);if(q[c[k]])q[c[k]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(n=0;n<a.config.blockedKeystrokes.length;n++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[n]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function t(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();
  268. this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var z=0,x={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,b);this.mode&&e(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}
  269. function b(a){return!!(a&&a.call&&a.apply)}var c=this,d=c.element,e=new CKEDITOR.dom.element(d.$.form);d.is("textarea")&&e&&(e.on("submit",a),b(e.$.submit)&&(e.$.submit=CKEDITOR.tools.override(e.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){e.removeListener("submit",a)}))},destroy:function(a){this.fire("beforeDestroy");!a&&t.call(this);this.editable(null);this.filter&&(this.filter.destroy(),delete this.filter);delete this.activeFilter;this.status=
  270. "destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&
  271. !1!==this.fire("beforeCommandExec",d)&&(d.returnValue=c.exec(d.commandData),!c.async&&!1!==this.fire("afterCommandExec",d))?d.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");
  272. "string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var d=!0,e=b;b&&"object"==typeof b&&(c=b.internal,e=b.callback,d=!b.noSnapshot);!c&&d&&this.fire("saveSnapshot");if(e||!c)this.once("dataReady",function(a){!c&&d&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;
  273. !c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,c){this.fire("insertHtml",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;
  274. for(var d=new CKEDITOR.dom.documentFragment,e,k,q,n=0;n<c.length;n++){var f=c[n],g=f.startContainer;g.getName&&"tr"==g.getName()?(e||(e=g.getAscendant("table").clone(),e.append(g.getAscendant("tbody").clone()),d.append(e),e=e.findOne("tbody")),k&&k.equals(g)||(k=g,q=g.clone(),e.append(q)),q.append(f.cloneContents())):d.append(f.cloneContents())}b=e?d:b.getHtmlFromRange(c[0]);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),d=this.getSelection().getRanges();if(!c||0===
  275. d.length)return null;d=d[0];c=c.extractHtmlFromRange(d,b);b||this.getSelection().selectRanges([d]);return a?c.getHtml():c},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return t.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,
  276. 0)],c,d,e=b.length;e--;)c=b[e],d=0,CKEDITOR.tools.isArray(c)&&(d=c[1],c=c[0]),d?a[c]=d:delete a[c]},getCommandKeystroke:function(a){var b=a.name,c=this.keystrokeHandler.keystrokes,d;if(a.fakeKeystroke)return a.fakeKeystroke;for(d in c)if(c.hasOwnProperty(d)&&c[d]==b)return d;return null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,
  277. null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)}})})();CKEDITOR.ELEMENT_MODE_NONE=0;
  278. CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}};
  279. (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);
  280. 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,
  281. b.length))}}})();
  282. 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,
  283. "--\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";
  284. (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,
  285. 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&&
  286. 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}};
  287. 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";
  288. (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";
  289. (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}};
  290. (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=
  291. function(g,h,l){function m(a){var b;if(0<w.length)for(var c=0;c<w.length;c++){var d=w[c],e=d.name,k=CKEDITOR.dtd[e],f=v.name&&CKEDITOR.dtd[v.name];f&&!f[e]||a&&k&&!k[a]&&CKEDITOR.dtd[a]?e==v.name&&(D(v,v.parent,1),c--):(b||(r(),b=1),d=d.clone(),d.parent=v,v=d,w.splice(c,1),c--)}}function r(){for(;H.length;)D(H.shift(),v)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?
  292. c.value=d:a.children.length=b-1)}}function D(b,c,d){c=c||v||p;var e=v;void 0===b.previous&&(t(c,b)&&(v=c,x.onTagOpen(l,{}),b.returnPoint=c=v),f(b),a(b)&&!b.children.length||c.add(b),"pre"==b.name&&(k=!1),"textarea"==b.name&&(u=!1));b.returnPoint?(v=b.returnPoint,delete b.returnPoint):v=d?c:e}function t(a,b){if((a==p||"body"==a.name)&&l&&(!a.name||CKEDITOR.dtd[a.name][l])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&
  293. !b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function z(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var x=new CKEDITOR.htmlParser,p=h instanceof CKEDITOR.htmlParser.element?h:"string"==typeof h?new CKEDITOR.htmlParser.element(h):new CKEDITOR.htmlParser.fragment,w=[],H=[],v=p,u="textarea"==p.name,k="pre"==p.name;x.onTagOpen=function(e,n,f,g){n=new CKEDITOR.htmlParser.element(e,n);n.isUnknown&&f&&(n.isEmpty=!0);n.isOptionalClose=g;
  294. if(a(n))w.push(n);else{if("pre"==e)k=!0;else{if("br"==e&&k){v.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==e&&(u=!0)}if("br"==e)H.push(n);else{for(;!(g=(f=v.name)?CKEDITOR.dtd[f]||(v._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c,n.isUnknown||v.isUnknown||g[e]);)if(v.isOptionalClose)x.onTagClose(f);else if(e in b&&f in b)f=v.children,(f=f[f.length-1])&&"li"==f.name||D(f=new CKEDITOR.htmlParser.element("li"),v),!n.returnPoint&&(n.returnPoint=v),v=f;else if(e in CKEDITOR.dtd.$listItem&&
  295. !z(e,f))x.onTagOpen("li"==e?"ul":"dl",{},0,1);else if(f in d&&!z(e,f))!n.returnPoint&&(n.returnPoint=v),v=v.parent;else if(f in CKEDITOR.dtd.$inline&&w.unshift(v),v.parent)D(v,v.parent,1);else{n.isOrphan=1;break}m(e);r();n.parent=v;n.isEmpty?D(n):v=n}}};x.onTagClose=function(a){for(var b=w.length-1;0<=b;b--)if(a==w[b].name){w.splice(b,1);return}for(var c=[],d=[],e=v;e!=p&&e.name!=a;)e._.isBlockLike||d.unshift(e),c.push(e),e=e.returnPoint||e.parent;if(e!=p){for(b=0;b<c.length;b++){var k=c[b];D(k,k.parent)}v=
  296. e;e._.isBlockLike&&r();D(e,e.parent);e==v&&(v=v.parent);w=w.concat(d)}"body"==a&&(l=!1)};x.onText=function(a){if(!(v._.hasInlineStarted&&!H.length||k||u)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=v.name,f=b?CKEDITOR.dtd[b]||(v._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!u&&!f["#"]&&b in d)x.onTagOpen(e[b]||""),x.onText(a);else{r();m();k||u||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(t(v,a))this.onTagOpen(l,{},0,1);v.add(a)}};x.onCDATA=
  297. function(a){v.add(new CKEDITOR.htmlParser.cdata(a))};x.onComment=function(a){r();m();v.add(new CKEDITOR.htmlParser.comment(a))};x.parse(g);for(r();v!=p;)D(v,v.parent,1);f(p);return p};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),0===c.value.length)){this.children.pop();this.add(a);return}c.next=
  298. a}a.previous=c;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,
  299. c)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,!1,d);b=0;c=this.children;for(d=c.length;b<d;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var d=a(this);if(!1!==d){c=this.children;for(var e=0;e<c.length;e++)d=c[e],d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):b&&d.type!=b||a(d)}},getFilterContext:function(a){return a||
  300. {}}}})();"use strict";
  301. (function(){function a(){this.rules=[]}function d(b,c,d,g){var h,l;for(h in c)(l=b[h])||(l=b[h]=new a),l.add(c[h],d,g)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,c){var e;"number"==typeof c?e=c:c&&"priority"in c&&(e=
  302. c.priority);"number"!=typeof e&&(e=10);"object"!=typeof c&&(c={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,e,c);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,e,c);a.elements&&d(this.elementsRules,a.elements,e,c);a.attributes&&d(this.attributesRules,a.attributes,e,c);a.text&&this.textRules.add(a.text,e,c);a.comment&&this.commentRules.add(a.comment,e,c);a.root&&this.rootRules.add(a.root,e,c)},applyTo:function(a){a.filter(this)},onElementName:function(a,c){return this.elementNameRules.execOnName(a,
  303. c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c,d){return this.textRules.exec(a,c,d)},onComment:function(a,c,d){return this.commentRules.exec(a,c,d)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var d=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],g,h=0;3>h;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},
  304. 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,
  305. c,d){for(var g=[this.findIndex(c),0],h=0,l=a.length;h<l;h++)g.push({value:a[h],priority:c,options:d});this.rules.splice.apply(this.rules,g)},findIndex:function(a){for(var c=this.rules,d=c.length-1;0<=d&&a<c[d].priority;)d--;return d+1},exec:function(a,c){var d=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,g=Array.prototype.slice.call(arguments,1),h=this.rules,l=h.length,m,r,f,D;for(D=0;D<l;D++)if(d&&(m=c.type,r=c.name),f=h[D],!(a.nonEditable&&!f.options.applyToAll||
  306. a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,g);if(!1===f||d&&f&&(f.name!=r||f.type!=m))return f;null!=f&&(g[0]=c=f)}return c},execOnName:function(a,c){for(var d=0,g=this.rules,h=g.length,l;c&&d<h;d++)l=g[d],a.nonEditable&&!l.options.applyToAll||a.nestedEditable&&l.options.excludeNestedEditable||(c=c.replace(l.value[0],l.value[1]));return c}}})();
  307. (function(){function a(a,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function n(a,d){return function(e){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=[],n=b(e),u,E;if(n)for(q(n,1)&&k.push(n);n;)g(n)&&(u=c(n))&&q(u)&&((E=c(u))&&!g(E)?k.push(u):(f(y).insertAfter(u),u.remove())),n=n.previous;for(n=0;n<k.length;n++)k[n].remove();if(k=!a||!1!==("function"==typeof d?d(e):d))y||CKEDITOR.env.needsBrFiller||
  308. e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?y||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem)?(k=b(e),k=!k||"form"==e.name&&"input"==k.name):k=!1:k=!1;k&&e.add(f(a))}}}function q(a,b){if((!y||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(w))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),
  309. a.value=c[0]),!CKEDITOR.env.needsBrFiller&&y&&(!b||a.parent.name in B)||!y&&((c=a.previous)&&"br"==c.name||!c||g(c)))?!0:!1}var u={elements:{}},y="html"==d,B=CKEDITOR.tools.extend({},k),A;for(A in B)"#"in v[A]||delete B[A];for(A in B)u.elements[A]=n(y,a.config.fillEmptyBlocks);u.root=n(y,!1);u.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=
  310. d.next;var k=c(b);!d&&g(b.parent)?h(b.parent,f(a)):g(d)&&k&&!g(k)&&f(a).insertBefore(d)}}}}(y);return u}function d(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function g(a){return a&&
  311. (a.type==CKEDITOR.NODE_ELEMENT&&a.name in k||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function l(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function m(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function r(a){return a.replace(J,
  312. function(a,b,c){return"\x3c"+b+c.replace(G,function(a,b){return C.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+z(c).replace(/</g,"\x26lt;").replace(/>/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,
  313. 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=
  314. {id:1}),k=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/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<d.length;n++)a=a.replace(d[n],function(a){a=a.replace(k,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(k,function(a,b,d){return"\x3c!--"+H+(b?"{C}":
  315. "")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\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,
  316. 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"),
  317. c=c.replace(/(<pre\b[^>]*>)(\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>|<\/pre>$/gi,""));c=c.replace(B,"$1$2");c=D(c);c=z(c);e=!1===a.fixForBody?!1:
  318. 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,
  319. 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(/^<br *\/?>/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,
  320. !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,
  321. 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=/(?:&nbsp;|\xa0)$/,H="{cke_protected}",v=CKEDITOR.dtd,u="caption colgroup col thead tfoot tbody".split(" "),k=CKEDITOR.tools.extend({},v.$blockLimit,
  322. 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)-/,
  323. ""],[/^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;e<c.length;e++)d="data-cke-saved-"+c[e],d in b&&delete b[c[e]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(u,a.name),d=CKEDITOR.tools.indexOf(u,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?
  324. 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);
  325. 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=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
  326. Q=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,P=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,B=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict";
  327. 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}};
  328. CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/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;
  329. for(c in d)d[c]&&a.push(c,":",d[c],";");return a.join("")}}};
  330. (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 a<b?-1:a>b?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;
  331. 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]:
  332. 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;m<r;m++)l=h[m],a.attribute(l[0],l[1]);a.openTagClose(g,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(g)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);
  333. this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&(b=a(b));for(var d=0,g=this.children.length;d<g;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var b=0,d=a.length;b<d;++b)a[b].parent=this},getOuterHtml:function(){var a=
  334. new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),d=this.clone(),h=0;h<b.length;++h)b[h].parent=d;d.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(d,this.getIndex()+1);return d},find:function(a,b){void 0===b&&(b=!1);var d=[],h;for(h=0;h<this.children.length;h++){var l=this.children[h];"function"==typeof a&&a(l)?d.push(l):"string"==typeof a&&l.name===a&&d.push(l);
  335. b&&l.find&&(d=d.concat(l.find(a,b)))}return d},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=
  336. [];a||(a={off:!1,nonEditable:!1,nestedEditable:!1});a.off||"off"!=this.attributes["data-cke-processor"]||b.push("off",!0);a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var d=0;d<b.length;d+=2)a[b[d]]=b[d+1]}return a}},!0)})();
  337. (function(){var a={},d=/{([^}]+)}/g,b=/([\\'])/g,c=/\n/g,e=/\r/g;CKEDITOR.template=function(g){if(a[g])this.output=a[g];else{var h=g.replace(b,"\\$1").replace(c,"\\n").replace(e,"\\r").replace(d,function(a,b){return"',data['"+b+"']\x3d\x3dundefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[g]=Function("data","buffer","return buffer?buffer.push('"+h+"'):['"+h+"'].join('');")}}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);
  338. CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",function(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]};
  339. (function(){var a={};CKEDITOR.addTemplate=function(d,b){var c=a[d];if(c)return c;c={name:d,source:b};CKEDITOR.fire("template",c);return a[d]=new CKEDITOR.template(c.source)};CKEDITOR.getTemplate=function(d){return a[d]}})();(function(){var a=[];CKEDITOR.addCss=function(d){a.push(d)};CKEDITOR.getCss=function(){return a.join("\n")}})();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2;
  340. CKEDITOR.TRISTATE_DISABLED=0;
  341. (function(){CKEDITOR.inline=function(a,d){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,a,CKEDITOR.ELEMENT_MODE_INLINE),c=a.is("textarea")?a:null;c?(b.setData(c.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!b.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+c.getValue()+"\x3c/div\x3e",CKEDITOR.document),
  342. a.insertAfter(c),c.hide(),c.$.form&&b._attachToForm()):b.setData(a.getHtml(),null,!0);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){c&&(b.container.clearCustomData(),b.container.remove(),c.show());b.element.clearCustomData();delete b.element});
  343. return b};CKEDITOR.inlineAll=function(){var a,d,b;for(b in CKEDITOR.dtd.$editable)for(var c=CKEDITOR.document.getElementsByTag(b),e=0,g=c.count();e<g;e++)a=c.getItem(e),"true"==a.getAttribute("contenteditable")&&(d={element:a,config:{}},!1!==CKEDITOR.fire("inline",d)&&CKEDITOR.inline(a,d.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";
  344. (function(){function a(a,e,g,h){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var l=new CKEDITOR.editor(e,a,h);h==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),l._.required=a.hasAttribute("required"),a.removeAttribute("required"));g&&l.setData(g,null,!0);l.on("loaded",function(){b(l);h==CKEDITOR.ELEMENT_MODE_REPLACE&&l.config.autoUpdateElement&&
  345. a.$.form&&l._attachToForm();l.setMode(l.config.startupMode,function(){l.resetDirty();l.status="ready";l.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,l)})});l.on("destroy",d);return l}function d(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,d=a.element,h=a.elementMode,l=
  346. a.fire("uiSpace",{space:"top",html:""}).html,m=a.fire("uiSpace",{space:"bottom",html:""}).html,r=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
  347. b=CKEDITOR.dom.element.createFromHtml(r.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:l?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+l+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:m?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+m+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));h==CKEDITOR.ELEMENT_MODE_REPLACE?
  348. (d.hide(),b.insertAfter(d)):d.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");l&&a.ui.space("top").unselectable();m&&a.ui.space("bottom").unselectable();d=a.config.width;h=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));h&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(h));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,d){return a(b,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
  349. CKEDITOR.appendTo=function(b,d,g){return a(b,d,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var d=null,h=a[b];if(h.name||h.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(h.className))continue}else if("function"==typeof arguments[0]&&(d={},!1===arguments[0](h,d)))continue;this.replace(h,d)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes=
  350. {}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var d=this,h=this._.modes;if(a!=d.mode&&h&&h[a]){d.fire("beforeSetMode",a);if(d.mode){var l=d.checkDirty(),h=d._.previousModeData,m,r=0;d.fire("beforeModeUnload");d.editable(0);d._.previousMode=d.mode;d._.previousModeData=m=d.getData(1);"source"==d.mode&&h==m&&(d.fire("lockSnapshot",{forceUpdate:!0}),r=1);d.ui.space("contents").setHtml("");d.mode=""}else d._.previousModeData=d.getData(1);this._.modes[a](function(){d.mode=a;void 0!==l&&!l&&
  351. d.resetDirty();r?d.fire("unlockSnapshot"):"wysiwyg"==a&&d.fire("saveSnapshot");setTimeout(function(){d.fire("mode");b&&b.call(d)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,d,h){var l=this.container,m=this.ui.space("contents"),r=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;h=h?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):l;h.setSize("width",a,!0);r&&(r.style.width="1%");var f=(h.$.offsetHeight||0)-(m.$.clientHeight||
  352. 0),l=Math.max(b-(d?0:f),0);b=d?b+f:b;m.setStyle("height",l+"px");r&&(r.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:l,outerWidth:a||h.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";
  353. (function(){function a(a){var b=a.editor,e=a.data.path,n=e.blockLimit,f=a.data.selection,g=f.getRanges()[0],l;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(f=d(f,e))f.appendBogus(),l=CKEDITOR.env.ie;h(b,e.block,n)&&g.collapsed&&!g.getCommonAncestor().isReadOnly()&&(e=g.clone(),e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),n=new CKEDITOR.dom.walker(e),n.guard=function(a){return!c(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!n.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock())&&
  354. (b=g.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(c))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),l=1,a.cancel());l&&g.select()}function d(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,e=d&&d.getLast(c);if(!(!d||!d.isBlockBoundary()||e&&e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function b(a){var b=a.data.getTarget();b.is("input")&&
  355. (b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function c(a){return f(a)&&D(a)}function e(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function g(a){function b(a){return function(b,e){e&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(f)&&(d=b);if(!(e||!c(b)||a&&z(b)))return!1}}var d,e=a.getRanges()[0];a=a.root;
  356. var f={table:1,ul:1,ol:1,dl:1};if(e.startPath().contains(f)){var g=e.clone();g.collapse(1);g.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=b();a.checkBackward();if(d)return g=e.clone(),g.collapse(),g.setEndAt(d,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=b(!0),d=!1,a.checkForward(),d}return null}function h(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}
  357. function l(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function m(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function r(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var f,D,t,z,x,p,w,H,v;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||
  358. b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document)?
  359. this.$.focus():this.$.setActive()}catch(b){if(!CKEDITOR.env.ie)throw b;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=e(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=
  360. Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,
  361. b){var c=this.getAttribute(a);b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,c){var d=
  362. this.editor;d.focus();d.fire("saveSnapshot");c||(c=d.getSelection().getRanges()[0]);p(this,b||"html",a,c);c.select();m(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){p(this,c||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,b){var d=this.editor;d.focus();d.fire("saveSnapshot");var e=d.activeEnterMode,d=d.getSelection(),f=a.getName(),f=CKEDITOR.dtd.$block[f];b||(b=d.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,
  363. CKEDITOR.POSITION_AFTER_END),f&&((f=a.getNext(function(a){return c(a)&&!z(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)?f.getDtd()["#"]?b.moveToElementEditStart(f):b.moveToElementEditEnd(a):f||e==CKEDITOR.ENTER_BR||(f=b.fixBlock(!0,e==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(f))));d.selectRanges([b]);m(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];
  364. if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&w(b);var g,h;if(f)for(;(g=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&(!h||!h[e]);)g.getName()in CKEDITOR.dtd.span?b.splitElement(g):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(g),b.collapse(!0),g.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return!0},setData:function(a,b){b||
  365. (a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},
  366. fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),e;a:if(d.anchorNode&&d.anchorNode==c.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=c.getDocument().getActive())&&e.equals(c)&&!d.anchorNode){e=!0;break a}e=void 0}e&&(e=new CKEDITOR.dom.range(c),e.moveToElementEditStart(c),b=b.createRange(),b.setStart(e.startContainer.$,e.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,e=c.getDocument().getActive();"None"==
  367. d.type&&e.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.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);
  368. 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();
  369. 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);
  370. 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=
  371. 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()},
  372. 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||
  373. 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&&14<CKEDITOR.env.version){var d=function(){var b=a.editable();
  374. null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",d))};this.on("scroll",d)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var e=a.document;this.changeAttr("spellcheck",
  375. !a.config.disableNativeSpellChecker);var n=a.config.contentsLangDirection;this.getDirection(1)!=n&&this.changeAttr("dir",n);var h=CKEDITOR.getCss();if(h){var n=e.getHead(),l=n.getCustomData("stylesheet");l?h!=l.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.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",
  376. 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=
  377. 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")&&
  378. (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",
  379. 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")&&
  380. !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,
  381. "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,
  382. !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,
  383. 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(),
  384. 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=
  385. 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",
  386. 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":
  387. "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=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;
  388. 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);y<A;++y)e=l.getItem(y),a(e)?(n=e.getName(),C&&n in CKEDITOR.dtd.$list?q=q.concat(b(e,d)):(g=!!h[n],"br"!=n||!e.data("cke-eol")||y&&y!=A-1||(r=(f=y?q[y-1].node:l.getItem(y+1))&&(!a(f)||!f.is("br")),f=f&&a(f)&&p.$block[f.getName()]),-1!=J||g||(J=y),g||(m=y),q.push({isElement:1,
  389. isLineBreak:r,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:n,allowed:g}),f=r=0)):q.push({isElement:0,node:e,allowed:1});-1<J&&(q[J].firstNotAllowed=1);-1<m&&(q[m].lastNotAllowed=1);return q}function d(b,c){var e=[],f=b.getChildren(),k=f.count(),n,g=0,h=p[c],y=!b.is(p.$inline)||b.is("br");for(y&&e.push(" ");g<k;g++)n=f.getItem(g),a(n)&&!n.is(h)?e=e.concat(d(n,c)):e.push(n);y&&e.push(" ");return e}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function f(b){return b&&
  390. a(b)&&(b.is(p.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function g(b,c,d,e){var f=b.clone(),k,n;f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(k=(new CKEDITOR.dom.walker(f)).next())&&a(k)&&m[k.getName()]&&(n=k.getPrevious())&&a(n)&&!n.getParent().equals(b.startContainer)&&d.contains(n)&&e.contains(k)&&k.isIdentical(n)&&(k.moveChildren(n),k.remove(),g(b,c,d,e))}function J(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var e=c.endContainer.getChild(c.endOffset),
  391. f=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);f&&d(f,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var p=CKEDITOR.dtd,m={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},w=CKEDITOR.tools.extend({},p.$inline);delete w.br;return function(m,C,B,I){var E=m.editor,K=!1;"unfiltered_html"==C&&(C="html",K=!0);if(!I.checkReadOnly()){var F=(new CKEDITOR.dom.elementPath(I.startContainer,I.root)).blockLimit||
  392. I.root;m={type:C,dontFilter:K,editable:m,editor:E,range:I,blockLimit:F,mergeCandidates:[],zombies:[]};C=m.range;I=m.mergeCandidates;var L,t;"text"==m.type&&C.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(L=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",C.document),C.insertNode(L),C.setStartAfter(L));K=new CKEDITOR.dom.elementPath(C.startContainer);m.endPath=F=new CKEDITOR.dom.elementPath(C.endContainer);if(!C.collapsed){var E=F.block||F.blockLimit,D=C.getCommonAncestor();E&&!E.equals(D)&&
  393. !E.contains(D)&&C.checkEndOfBlock()&&m.zombies.push(E);C.deleteContents()}for(;(t=e(C))&&a(t)&&t.isBlockBoundary()&&K.contains(t);)C.moveToPosition(t,CKEDITOR.POSITION_BEFORE_END);g(C,m.blockLimit,K,F);L&&(C.setEndBefore(L),C.collapse(),L.remove());L=C.startPath();if(E=L.contains(f,!1,1))C.splitElement(E),m.inlineStylesRoot=E,m.inlineStylesPeak=L.lastElement;L=C.createBookmark();(E=L.startNode.getPrevious(c))&&a(E)&&f(E)&&I.push(E);(E=L.startNode.getNext(c))&&a(E)&&f(E)&&I.push(E);for(E=L.startNode;(E=
  394. E.getParent())&&f(E);)I.push(E);C.moveToBookmark(L);if(L=B){L=m.range;if("text"==m.type&&m.inlineStylesRoot){t=m.inlineStylesPeak;C=t.getDocument().createText("{cke-peak}");for(I=m.inlineStylesRoot.getParent();!t.equals(I);)C=C.appendTo(t.clone()),t=t.getParent();B=C.getOuterHtml().split("{cke-peak}").join(B)}t=m.blockLimit.getName();if(/^\s+|\s+$/.test(B)&&"span"in CKEDITOR.dtd[t]){var z='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';B=z+B+z}B=m.editor.dataProcessor.toHtml(B,{context:null,
  395. fixForBody:!1,protectedWhitespaces:!!z,dontFilter:m.dontFilter,filter:m.editor.activeFilter,enterMode:m.editor.activeEnterMode});t=L.document.createElement("body");t.setHtml(B);z&&(t.getFirst().remove(),t.getLast().remove());if((z=L.startPath().block)&&(1!=z.getChildCount()||!z.getBogus()))a:{var v;if(1==t.getChildCount()&&a(v=t.getFirst())&&v.is(r)&&!v.hasAttribute("contenteditable")){z=v.getElementsByTag("*");L=0;for(I=z.count();L<I;L++)if(C=z.getItem(L),!C.is(w))break a;v.moveChildren(v.getParent(1));
  396. v.remove()}}m.dataWrapper=t;L=B}if(L){v=m.range;L=v.document;var x;t=m.blockLimit;I=0;var N,z=[],M,H;B=E=0;var S,X;C=v.startContainer;var K=m.endPath.elements[0],Y,F=K.getPosition(C),D=!!K.getCommonAncestor(C)&&F!=CKEDITOR.POSITION_IDENTICAL&&!(F&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);C=b(m.dataWrapper,m);for(J(C,v);I<C.length;I++){F=C[I];if(x=F.isLineBreak){x=v;S=t;var U=void 0,ba=void 0;F.hasBlockSibling?x=1:(U=x.startContainer.getAscendant(p.$block,1))&&U.is({div:1,p:1})?(ba=
  397. U.getPosition(S),ba==CKEDITOR.POSITION_IDENTICAL||ba==CKEDITOR.POSITION_CONTAINS?x=0:(S=x.splitElement(U),x.moveToPosition(S,CKEDITOR.POSITION_AFTER_START),x=1)):x=0}if(x)B=0<I;else{x=v.startPath();!F.isBlock&&h(m.editor,x.block,x.blockLimit)&&(H=l(m.editor))&&(H=L.createElement(H),H.appendBogus(),v.insertNode(H),CKEDITOR.env.needsBrFiller&&(N=H.getBogus())&&N.remove(),v.moveToPosition(H,CKEDITOR.POSITION_BEFORE_END));if((x=v.startPath().block)&&!x.equals(M)){if(N=x.getBogus())N.remove(),z.push(x);
  398. M=x}F.firstNotAllowed&&(E=1);if(E&&F.isElement){x=v.startContainer;for(S=null;x&&!p[x.getName()][F.name];){if(x.equals(t)){x=null;break}S=x;x=x.getParent()}if(x)S&&(X=v.splitElement(S),m.zombies.push(X),m.zombies.push(S));else{S=t.getName();Y=!I;x=I==C.length-1;S=d(F.node,S);for(var U=[],ba=S.length,ca=0,ea=void 0,fa=0,ha=-1;ca<ba;ca++)ea=S[ca]," "==ea?(fa||Y&&!ca||(U.push(new CKEDITOR.dom.text(" ")),ha=U.length),fa=1):(U.push(ea),fa=0);x&&ha==U.length&&U.pop();Y=U}}if(Y){for(;x=Y.pop();)v.insertNode(x);
  399. Y=0}else v.insertNode(F.node);F.lastNotAllowed&&I<C.length-1&&((X=D?K:X)&&v.setEndAt(X,CKEDITOR.POSITION_AFTER_START),E=0);v.collapse()}}1!=C.length?N=!1:(N=C[0],N=N.isElement&&"false"==N.node.getAttribute("contenteditable"));N&&(B=!0,x=C[0].node,v.setStartAt(x,CKEDITOR.POSITION_BEFORE_START),v.setEndAt(x,CKEDITOR.POSITION_AFTER_END));m.dontMoveCaret=B;m.bogusNeededBlocks=z}N=m.range;var T;X=m.bogusNeededBlocks;for(Y=N.createBookmark();M=m.zombies.pop();)M.getParent()&&(H=N.clone(),H.moveToElementEditStart(M),
  400. H.removeEmptyBlocksAtEnd());if(X)for(;M=X.pop();)CKEDITOR.env.needsBrFiller?M.appendBogus():M.append(N.document.createText(" "));for(;M=m.mergeCandidates.pop();)M.mergeSiblings();N.moveToBookmark(Y);if(!m.dontMoveCaret){for(M=e(N);M&&a(M)&&!M.is(p.$empty);){if(M.isBlockBoundary())N.moveToPosition(M,CKEDITOR.POSITION_BEFORE_END);else{if(f(M)&&M.getHtml().match(/(\s|&nbsp;)$/g)){T=null;break}T=N.clone();T.moveToPosition(M,CKEDITOR.POSITION_BEFORE_END)}M=M.getLast(c)}T&&N.moveToRange(T)}}}}();w=function(){function a(b){b=
  401. new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e=
  402. 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:
  403. 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),
  404. 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,
  405. 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,
  406. 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=
  407. 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(),
  408. 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),
  409. 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;
  410. 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),
  411. 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),
  412. e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(1<e){var c=b.startPath().contains("table"),f=b.endPath().contains("table");c&&f&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(f,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(f),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(e,f){var k=c(f,e.bookmark),g=k.clone(),h,l,m=k.getCommonAncestor();m.is(CKEDITOR.dtd.$tableContent)&&!m.is(d)&&(m=m.getAscendant("table",
  413. !0));l=m;m=new CKEDITOR.dom.elementPath(k.startContainer,l);l=new CKEDITOR.dom.elementPath(k.endContainer,l);m=m.contains("table");l=l.contains("table");if(m||l)m&&l&&b(m,l)?(e.tableSurroundingRange=g,g.setStartAt(m,CKEDITOR.POSITION_AFTER_END),g.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),g=k.clone(),g.setEndAt(m,CKEDITOR.POSITION_AFTER_END),h=k.clone(),h.setStartAt(l,CKEDITOR.POSITION_BEFORE_START),h=a(g).concat(a(h))):m?l||(e.tableSurroundingRange=g,g.setStartAt(m,CKEDITOR.POSITION_AFTER_END),k.setEndAt(m,
  414. CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=g,g.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),k.setStartAt(l,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=h?h:a(k)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),t(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);
  415. c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),d;h(a,c.block,c.blockLimit)&&(d=l(a))&&(d=b.document.createElement(d),d.appendBogus(),
  416. b.insertNode(d),b.moveToPosition(d,CKEDITOR.POSITION_AFTER_START))}}}()})();
  417. (function(){function a(){var a=this._.fakeSelection,b;a&&(b=this.getSelection(1),b&&b.isHidden()||(a.reset(),a=0));if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){var c=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit);CKEDITOR.env.webkit&&!c&&(this._.previousActive=this.document.getActive());this._.selectionPreviousPath=b;this.fire("selectionChange",
  418. {selection:a,path:b})}}function d(){w=!0;p||(b.call(this),p=CKEDITOR.tools.setTimeout(b,200,this))}function b(){p=null;w&&(CKEDITOR.tools.setTimeout(a,0,this),w=!1)}function c(a){return H(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function e(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,e=a.getPreviousNode(c,null,d),f=a.getNextNode(c,null,
  419. d);return b(e)||b(f,1)||!(e||f||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function g(a){h(a,!1);var b=a.getDocument().createText(z);a.setCustomData("cke-fillingChar",b);return b}function h(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var d=a.getDocument().getSelection().getNative(),e=d&&"None"!=d.type&&d.getRangeAt(0),f=z.length;if(c.getLength()>f&&e&&e.intersectsNode(c.$)){var g=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];
  420. 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"'+
  421. (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=
  422. {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<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=
  423. c.startContainer,e;d&&!((e=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)e&&"false"==d.getAttribute("contentEditable")&&c.setStartAfter(d),d=d.getParent();d=c.startContainer;e=c.endContainer;var f=c.startOffset,g=c.endOffset,h=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(f>=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&&
  424. 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]);
  425. 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=
  426. 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",
  427. 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,
  428. "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()))});
  429. 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",
  430. b);k.removeListener("mouseup",c);l.removeListener("mouseup",c);E.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<l.$.clientHeight&&a.$.x<l.$.clientWidth){E=q.$.createTextRange();try{E.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}K=E.duplicate();l.on("mousemove",b);k.on("mouseup",c);l.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.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,
  431. 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)}},
  432. 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")&&
  433. (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");
  434. 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"==
  435. 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};
  436. 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;
  437. 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||
  438. 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,
  439. _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()&&
  440. (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()}
  441. 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),0<n)l=B-1;else if(0>n)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=
  442. 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<k&&0<d;)g=e[--d],g.nodeType==CKEDITOR.NODE_TEXT&&(m=g,k-=g.nodeValue.length);return{container:m,offset:-k}}k.collapse(0<n?!0:!1);k.setEndPoint(0<n?"StartToStart":"EndToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;if(!k)return{container:d,offset:a(f)+(0<n?0:1)};for(;0<k;)try{g=f[0<n?"previousSibling":"nextSibling"],g.nodeType==CKEDITOR.NODE_TEXT&&(k-=g.nodeValue.length,
  443. m=g),f=g}catch(p){return{container:d,offset:a(f)}}return{container:m,offset:0<n?-k:m.nodeValue.length+k}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
  444. a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),g=f.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<g.childNodes.length&&g.childNodes[k]!=f;k++);a.setStart(new CKEDITOR.dom.node(g),k);a.setEnd(new CKEDITOR.dom.node(g),k+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),
  445. e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?f(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];
  446. if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=c.startContainer,c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?
  447. new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&u[c.getName()]&&(d=c));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=
  448. this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=D?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&
  449. a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=t++},selectElement:function(a){var b=
  450. new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,c,d=0;d<a.length;++d)c=a[d],c.endContainer.equals(b)&&(c.endOffset=Math.min(c.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var f=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();f&&!f.equals(this.root)&&f.focus()}else{var l;a:{var m,p;if(1==a.length&&
  451. !(p=a[0]).collapsed&&(l=p.getEnclosedNode())&&l.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(m=p.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(l=m),"false"==l.getAttribute("contenteditable")))break a;l=void 0}if(l)this.fake(l);else{if(D){p=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;b={table:1,tbody:1,tr:1};1<a.length&&(l=a[a.length-1],a[0].setEnd(l.endContainer,l.endOffset));l=a[0];a=l.collapsed;var r,t,x;if((c=l.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&
  452. c.getName()in u&&(!c.is("a")||!c.getText()))try{x=c.$.createControlRange();x.addElement(c.$);x.select();return}catch(z){}if(l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in b||l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in b)l.shrink(CKEDITOR.NODE_ELEMENT,!0),a=l.collapsed;x=l.createBookmark();b=x.startNode;a||(f=x.endNode);x=l.document.$.body.createTextRange();x.moveToElementText(b.$);x.moveStart("character",1);f?(m=l.document.$.body.createTextRange(),
  453. m.moveToElementText(f.$),x.setEndPoint("EndToEnd",m),x.moveEnd("character",-1)):(r=b.getNext(p),t=b.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(m))&&(t||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br")),t=l.document.createElement("span"),t.setHtml("\x26#65279;"),t.insertBefore(b),r&&l.document.createText("").insertBefore(b));l.setStartBefore(b);b.remove();a?(r?(x.moveStart("character",-1),x.select(),l.document.$.selection.clear()):x.select(),l.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),
  454. t.remove()):(l.setEndBefore(f),f.remove(),x.select())}else{f=this.getNative();if(!f)return;this.removeAllRanges();for(x=0;x<a.length;x++){if(x<a.length-1&&(r=a[x],t=a[x+1],m=r.clone(),m.setStart(r.endContainer,r.endOffset),m.setEnd(t.startContainer,t.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),l=m.getCommonAncestor(),m=m.getEnclosedNode(),l.isReadOnly()||m&&m.isReadOnly()))){t.setStart(r.startContainer,r.startOffset);a.splice(x--,1);continue}l=a[x];t=this.document.$.createRange();
  455. l.collapsed&&CKEDITOR.env.webkit&&e(l)&&(m=g(this.root),l.insertNode(m),(r=m.getNext())&&!m.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(h(this.root),l.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):l.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));t.setStart(l.startContainer.$,l.startOffset);try{t.setEnd(l.endContainer.$,l.endOffset)}catch(B){if(0<=B.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))l.collapse(1),t.setEnd(l.endContainer.$,l.endOffset);else throw B;}f.addRange(t)}}this.reset();
  456. this.root.fire("selectionchange")}}},fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();m(c,b);var d=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(e);d.selectedElement=d.startElement=a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=t++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=
  457. this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,d=0;d<a.length;d++){var e=new CKEDITOR.dom.range(this.root);e.moveToBookmark(a[d]);b.push(e)}a.isFake&&(c=b[0].getEnclosedNode(),c&&c.type==
  458. CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[D?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();
  459. "use strict";CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3;
  460. (function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function d(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function b(c){var f=c.document;if(c.collapsed)f=H(this,f),c.insertNode(f),c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,h=this._.definition,l,k=h.ignoreReadonly,m=k||h.includeReadonly;null==
  461. m&&(m=c.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[g];n||(l=!0,n=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var p=c.createBookmark(),q=p.startNode,r=p.endNode,t=q,u;if(!k){var z=c.getCommonAncestor(),k=a(q,z),z=a(r,z);k&&(t=k.getNextSourceNode(!0));z&&(r=z)}for(t.getPosition(r)==CKEDITOR.POSITION_FOLLOWING&&(t=0);t;){k=!1;if(t.equals(r))t=null,k=!0;else{var v=t.type==CKEDITOR.NODE_ELEMENT?t.getName():null,z=v&&"false"==t.getAttribute("contentEditable"),w=v&&
  462. t.getAttribute("data-nostyle");if(v&&t.data("cke-bookmark")){t=t.getNextSourceNode(!0);continue}if(z&&m&&CKEDITOR.dtd.$block[v])for(var D=t,y=e(D),A=void 0,C=y.length,G=0,D=C&&new CKEDITOR.dom.range(D.getDocument());G<C;++G){var A=y[G],J=CKEDITOR.filter.instances[A.data("cke-filter")];if(J?J.check(this):1)D.selectNodeContents(A),b.call(this,D)}y=v?!n[v]||w?0:z&&!m?0:d(t,r,h,P):1;if(y)if(A=t.getParent(),y=h,C=g,G=l,!A||!(A.getDtd()||CKEDITOR.dtd.span)[C]&&!G||y.parentRule&&!y.parentRule(A))k=!0;else{if(u||
  463. v&&CKEDITOR.dtd.$removeEmpty[v]&&(t.getPosition(r)|P)!=P||(u=c.clone(),u.setStartBefore(t)),v=t.type,v==CKEDITOR.NODE_TEXT||z||v==CKEDITOR.NODE_ELEMENT&&!t.getChildCount()){for(var v=t,Q;(k=!v.getNext(Z))&&(Q=v.getParent(),n[Q.getName()])&&d(Q,q,h,O);)v=Q;u.setEndAfter(v)}}else k=!0;t=t.getNextSourceNode(w||z)}if(k&&u&&!u.collapsed){for(var k=H(this,f),z=k.hasAttributes(),w=u.getCommonAncestor(),v={},y={},A={},C={},T,W,da;k&&w;){if(w.getName()==g){for(T in h.attributes)!C[T]&&(da=w.getAttribute(W))&&
  464. (k.getAttribute(T)==da?y[T]=1:C[T]=1);for(W in h.styles)!A[W]&&(da=w.getStyle(W))&&(k.getStyle(W)==da?v[W]=1:A[W]=1)}w=w.getParent()}for(T in y)k.removeAttribute(T);for(W in v)k.removeStyle(W);z&&!k.hasAttributes()&&(k=null);k?(u.extractContents().appendTo(k),u.insertNode(k),x.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(k),u.insertNode(k),x.call(this,k),k.remove(!0));u=null}}c.moveToBookmark(p);c.shrink(CKEDITOR.SHRINK_TEXT);
  465. c.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function c(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),e=null,f=null,g=0;g<a.elements.length;g++){var h=a.elements[g];if(h==a.block||h==a.blockLimit)break;n.checkElementRemovable(h,!0)&&(e=h)}for(g=0;g<c.elements.length;g++){h=c.elements[g];if(h==c.block||h==c.blockLimit)break;n.checkElementRemovable(h,!0)&&(f=h)}f&&m.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=
  466. a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,g=0,h;g<e.elements.length&&(h=e.elements[g])&&h!=e.block&&h!=e.blockLimit;g++)if(this.checkElementRemovable(h)){var l;a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(l=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(f=h,f.match=l?"start":"end"):(h.mergeSiblings(),h.is(this.element)?z.call(this,h):p(h,k(this)[h.getName()]))}if(f){h=d;for(g=0;;g++){l=e.elements[g];if(l.equals(f))break;
  467. else if(l.match)continue;else l=l.clone();l.append(h);h=l}h["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var m=c.endNode,n=this;b();for(e=d;!e.equals(m);)f=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?z.call(this,e):p(e,k(this)[e.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(b(),f=d.getNext())),e=f}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function e(a){var b=[];a.forEach(function(a){if("true"==
  468. a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function g(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&v(a,this)}function h(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
  469. a.removeStyle(e)}}function l(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,e=a.document,f;d=c.getNextParagraph();)!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(f=H(this,e,d),r(d,f));a.moveToBookmark(b)}function m(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)this.checkElementRemovable(d)&&
  470. (d.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e),r(d,e)):z.call(this,d));a.moveToBookmark(b)}function r(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),g=!d&&e;if(d&&!e){e=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=D(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g,
  471. " ");g=g.replace(/<br\b[^>]*>/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":
  472. c.setHtml(d),k.remove())}else c&&w(b)}function f(a){var b=[];D(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function D(a,b,c){var d="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<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;
  473. 1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=D(e,/^[ \t]*\n/,""),e=D(e,/\n$/,""),e=D(e,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);
  474. c.append(f)}else b.setHtml(e)}return c||b}function z(a,b){var c=this._.definition,d=c.attributes,c=c.styles,e=k(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),g;for(g in d)if("class"!=g&&!this._.definition.fullMatch||a.getAttribute(g)==q(g,d[g]))b&&"data-"==g.slice(0,5)||(f=a.hasAttribute(g),a.removeAttribute(g));for(var h in c)this._.definition.fullMatch&&a.getStyle(h)!=q(h,c[h],!0)||(f=f||!!a.getStyle(h),a.removeStyle(h));p(a,e,A[a.getName()]);f&&(this._.definition.alwaysRemoveElement?
  475. w(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?w(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function x(a){for(var b=k(this),c=a.getElementsByTag(this.element),d,e=c.count();0<=--e;)d=c.getItem(e),d.isReadOnly()||z.call(this,d,!0);for(var f in b)if(f!=this.element)for(c=a.getElementsByTag(f),e=c.count()-1;0<=e;e--)d=c.getItem(e),d.isReadOnly()||p(d,b[f])}function p(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],
  476. f;if(f=a.getAttribute(e)){var g=b[d][1];(null===g||g.test&&g.test(f)||"string"==typeof g&&f==g)&&a.removeAttribute(e)}}c||w(a)}function w(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(Q),d=a.getNext(Q);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),d=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),
  477. d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function H(a,b,c){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=v(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function v(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function u(a,
  478. b){for(var c in a)a[c]=a[c].replace(C,function(a,c){return b[c]})}function k(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,g;"string"==typeof e?f=e.toLowerCase():(f=e.element?e.element.toLowerCase():a.element,g=e.attributes);e=b[f]||(b[f]={});if(g){var e=e.attributes=e.attributes||[],h;for(h in g)e.push([h.toLowerCase(),g[h]])}}}return b}function q(a,b,c){var d=new CKEDITOR.dom.element("span");
  479. d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function n(a,b){function c(a,b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var d in a)if(!(d in b)||c(b[d],d)!=c(a[d],d)&&"inherit"!=a[d]&&"inherit"!=b[d])return!1;return!0}function y(a,b,c){var d=a.document,e=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var f,g=e.createIterator();f=
  480. g.getNextRange();)b.call(this,f,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var A={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},J={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},G=/\s*(?:;\s*|$)/,C=/#\((.+?)\)/g,Z=CKEDITOR.dom.walker.bookmark(0,
  481. 1),Q=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),u(a.attributes,b),u(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(A[c]?CKEDITOR.STYLE_BLOCK:J[c]?CKEDITOR.STYLE_OBJECT:
  482. CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return y.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);y.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return y.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
  483. a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);y.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?g:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?m:this.type==CKEDITOR.STYLE_OBJECT?h:null;return this.removeFromRange(a)},applyToObject:function(a){v(a,
  484. this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++)if(e=c[d],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var f=e.getName();if(!("string"==typeof this.element?f==this.element:f in this.element))continue}if(this.checkElementRemovable(e,!0,b))return!0}}return!1},checkApplicable:function(a,
  485. b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;
  486. if(f)for(var g in f)e++,d[g]=f[g];if(g=CKEDITOR.style.getStyleText(c))d.style||e++,d.style=g;d._length=e;c=c._AC=d}if(c._length){for(var h in c)if("_length"!=h)if(d=a.getAttribute(h)||"","style"==h?n(c[h],d):c[h]==d){if(!b)return!0}else if(b)return!1;if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=k(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var e=b[c][1];
  487. if(null===e)return!0;if("string"==typeof e){if(d==e)return!0}else if(e.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;"bdo"==d&&(d="span");var c=["\x3c",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'\x3d"',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',e,'"');c.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;
  488. var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(G,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(G,";");"inherit"==f?d+=g:c+=g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},
  489. a,!0);return this.customHandlers[a.type]=b};var P=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,O=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(a,d){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,d,!0)};
  490. CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,d,b){CKEDITOR.stylesSet.addExternal(a,d,"");CKEDITOR.stylesSet.load(a,b)};
  491. CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,d){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var d=0;d<b.length;d++){var g=b[d],h=g.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,h)}}));b.push({style:a,fn:d})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);
  492. else{var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)d._.stylesDefinitions=b,a(b);else{b||(b="default");var b=b.split(":"),c=b[0];CKEDITOR.stylesSet.addExternal(c,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(c,function(b){d._.stylesDefinitions=b[c];a(d._.stylesDefinitions)})}}}});
  493. CKEDITOR.dom.comment=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}});"use strict";
  494. (function(){var a={},d={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(d[b]=1);CKEDITOR.dom.elementPath=function(b,e){var g=null,h=null,l=[],m=b,r;e=e||b.getDocument().getBody();do if(m.type==CKEDITOR.NODE_ELEMENT){l.push(m);if(!this.lastElement&&(this.lastElement=m,m.is(CKEDITOR.dtd.$object)||"false"==m.getAttribute("contenteditable")))continue;if(m.equals(e))break;if(!h&&(r=m.getName(),
  495. "true"==m.getAttribute("contenteditable")?h=m:!g&&d[r]&&(g=m),a[r])){if(r=!g&&"div"==r){a:{r=m.getChildren();for(var f=0,D=r.count();f<D;f++){var t=r.getItem(f);if(t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[t.getName()]){r=!0;break a}}r=!1}r=!r}r?g=m:h=m}}while(m=m.getParent());h||(h=e);this.block=g;this.blockLimit=h;this.root=e;this.elements=l}})();
  496. CKEDITOR.dom.elementPath.prototype={compare:function(a){var d=this.elements;a=a&&a.elements;if(!a||d.length!=a.length)return!1;for(var b=0;b<d.length;b++)if(!d[b].equals(a[b]))return!1;return!0},contains:function(a,d,b){var c;"string"==typeof a&&(c=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?c=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?c=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:"function"==typeof a?c=a:"object"==typeof a&&(c=function(b){return b.getName()in
  497. a});var e=this.elements,g=e.length;d&&g--;b&&(e=Array.prototype.slice.call(e,0),e.reverse());for(d=0;d<g;d++)if(c(e[d]))return e[d];return null},isContextFor:function(a){var d;return a in CKEDITOR.dtd.$block?(d=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!d.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};
  498. CKEDITOR.dom.text=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createTextNode(a));this.$=a};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node;
  499. CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var d=this.$.parentNode,b=d.childNodes.length,c=this.getLength(),e=this.getDocument(),g=new CKEDITOR.dom.text(this.$.splitText(a),e);d.childNodes.length==b&&(a>=c?(g=e.createText(""),g.insertAfter(this)):(a=e.createText(""),a.insertAfter(g),a.remove()));return g},substring:function(a,
  500. d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}});
  501. (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}
  502. 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&&1<a.length){if(!g)for(var m=a.length-1;0<=m;m--)d.unshift(a[m].createBookmark(!0));if(h)for(var r=0;a[g+r+1];){var f=l.document;h=0;m=f.getById(d[r].endNode);for(f=f.getById(d[r+1].startNode);;){m=
  503. m.getNextSourceNode(!1);if(f.equals(m))h=1;else if(c(m)||m.type==CKEDITOR.NODE_ELEMENT&&m.isBlockBoundary())continue;break}if(!h)break;r++}for(l.moveToBookmark(d.shift());r--;)m=a[++g],m.moveToBookmark(d.shift()),l.setEnd(m.endContainer,m.endOffset)}return l}}},createBookmarks:function(b){for(var c=[],d,g=0;g<this.length;g++){c.push(d=this[g].createBookmark(b,!0));for(var h=g+1;h<this.length;h++)this[h]=a(d,this[h]),this[h]=a(d,this[h],!0)}return c},createBookmarks2:function(a){for(var c=[],d=0;d<
  504. this.length;d++)c.push(this[d].createBookmark2(a));return c},moveToBookmarks:function(a){for(var c=0;c<this.length;c++)this[c].moveToBookmark(a[c])}}})();
  505. (function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function d(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,g;e<c.length;e++)if(g=c[e],d.ie&&(g.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==g)&&(g="ie"),d[g]){b+="_"+c[e];break}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){g[a]||(CKEDITOR.document.appendStyleSheet(d(a)),g[a]=1);b&&b()}function c(a){var b=
  506. a.getById(h);b||(b=a.getHead().append("style"),b.setAttribute("id",h),b.setAttribute("type","text/css"));return b}function e(a,b,c){var d,e,g;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),e=0;e<b.length;e++)b[e]=b[e].split("{");for(var h=0;h<a.length;h++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){g=b[e][1];for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);a[h].$.sheet.addRule(b[e][0],g)}else{g=b;for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?
  507. 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"]),
  508. 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=
  509. 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)}})})();
  510. (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;}");
  511. CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;d<a.length;d++)CKEDITOR.editor.prototype.constructor.apply(a[d][0],a[d][1]),CKEDITOR.add(a[d][0])})();/*
  512. Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  513. For licensing, see LICENSE.md or http://ckeditor.com/license
  514. */
  515. CKEDITOR.skin.name="moono";CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8";
  516. CKEDITOR.skin.chameleon=function(){var b=function(){return function(b,e){for(var a=b.match(/[^#]./g),c=0;3>c;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,
  517. 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};] "),
  518. 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};] ")};
  519. 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,
  520. "}")}}();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"==
  521. 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,
  522. "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"};
  523. 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();
  524. 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;b<e.length;b++)a=e[b],d=d.getCommonAncestor(a.getParent());for(a={table:1,tbody:1,
  525. tr:1,ol:1,ul:1};a[d.getName()];)d=d.getParent();for(b=null;0<e.length;){for(a=e.shift();!a.getParent().equals(d);)a=a.getParent();a.equals(b)||c.push(a);b=a}for(;0<c.length;)if(a=c.shift(),"blockquote"==a.getName()){for(b=new CKEDITOR.dom.documentFragment(g.document);a.getFirst();)b.append(a.getFirst().remove()),e.push(b.getLast());b.replace(a)}else e.push(a);c=g.document.createElement("blockquote");for(c.insertBefore(e[0]);0<e.length;)a=e.shift(),c.append(a)}else if(a==CKEDITOR.TRISTATE_ON){b=[];
  526. for(d={};a=f.getNextParagraph();){for(e=c=null;a.getParent();){if("blockquote"==a.getParent().getName()){c=a.getParent();e=a;break}a=a.getParent()}c&&e&&!e.getCustomData("blockquote_moveout")&&(b.push(e),CKEDITOR.dom.element.setMarker(d,e,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(d);a=[];e=[];for(d={};0<b.length;)f=b.shift(),c=f.getParent(),f.getPrevious()?f.getNext()?(f.breakParent(f.getParent()),e.push(f.getNext())):f.remove().insertAfter(c):f.remove().insertBefore(c),c.getCustomData("blockquote_processed")||
  527. (e.push(c),CKEDITOR.dom.element.setMarker(d,c,"blockquote_processed",!0)),a.push(f);CKEDITOR.dom.element.clearAllMarkers(d);for(b=e.length-1;0<=b;b--){c=e[b];a:{d=c;for(var f=0,m=d.getChildCount(),l=void 0;f<m&&(l=d.getChild(f));f++)if(l.type==CKEDITOR.NODE_ELEMENT&&l.isBlockBoundary()){d=!1;break a}d=!0}d&&c.remove()}if(g.config.enterMode==CKEDITOR.ENTER_BR)for(c=!0;a.length;)if(f=a.shift(),"div"==f.getName()){b=new CKEDITOR.dom.documentFragment(g.document);!c||!f.getPrevious()||f.getPrevious().type==
  528. CKEDITOR.NODE_ELEMENT&&f.getPrevious().isBlockBoundary()||b.append(g.document.createElement("br"));for(c=f.getNext()&&!(f.getNext().type==CKEDITOR.NODE_ELEMENT&&f.getNext().isBlockBoundary());f.getFirst();)f.getFirst().remove().appendTo(b);c&&b.append(g.document.createElement("br"));b.replace(f);c=!1}}k.selectBookmarks(h);g.focus()}},refresh:function(g,a){this.setState(g.elementPath(a.block||a.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",
  529. requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(g){g.blockless||(g.addCommand("blockquote",m),g.ui.addButton&&g.ui.addButton("Blockquote",{label:g.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})})();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var h=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;d<arguments.length;d++)a.push(arguments[d]);a.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,a);return this._},v={build:function(b,a,d){return new CKEDITOR.ui.dialog.textInput(b,a,d)}},n={build:function(b,a,d){return new CKEDITOR.ui.dialog[a.type](b,a,d)}},q={isChanged:function(){return this.getValue()!=
  530. this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},r=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,a){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
  531. this)},this),this._.domOnChangeRegistered=!0);this.on("change",a)}},!0),x=/^on([A-Z]\w+)/,t=function(b){for(var a in b)(x.test(a)||"title"==a||"type"==a)&&delete b[a];return b},w=function(b){b=b.data.getKeystroke();b==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):b==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,a,d,f){if(!(4>arguments.length)){var c=h.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+
  532. "_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"',
  533. 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+
  534. '"':"")+"\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",
  535. 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&&
  536. (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",
  537. 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,
  538. 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);
  539. 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,
  540. b,a,d,function(){for(var e=[],d=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<a.items.length;k++){var l=a.items[k],h=void 0!==l[2]?l[2]:l[0],n=void 0!==l[1]?l[1]:l[0],p=CKEDITOR.tools.getNextId()+"_radio_input",q=p+"_label",p=CKEDITOR.tools.extend({},a,{id:p,title:null,type:null},!0),h=CKEDITOR.tools.extend({},p,{title:h},!0),r={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:n,"aria-labelledby":q},u=[];c._["default"]==n&&(r.checked="checked");t(p);t(h);"undefined"!=typeof p.inputStyle&&
  541. (p.style=p.inputStyle);p.keyboardFocusable=!0;f.push(new CKEDITOR.ui.dialog.uiElement(b,p,u,"input",null,r));u.push(" ");new CKEDITOR.ui.dialog.uiElement(b,h,u,"label",null,{id:q,"for":r.id},l[0]);e.push(u.join(""))}new CKEDITOR.ui.dialog.hbox(b,f,e,d);return d.join("")});this._.children=f}},button:function(b,a,d){if(arguments.length){"function"==typeof a&&(a=a(b.getParentEditor()));h.call(this,a,{disabled:a.disabled||!1});CKEDITOR.event.implementOn(this);var f=this;b.on("load",function(){var a=this.getElement();
  542. (function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var c=CKEDITOR.tools.extend({},a);delete c.style;var e=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"a",null,{style:a.style,href:"javascript:void(0)",title:a.label,hidefocus:"true","class":a["class"],role:"button","aria-labelledby":e},'\x3cspan id\x3d"'+e+'" class\x3d"cke_dialog_ui_button"\x3e'+
  543. CKEDITOR.tools.htmlEncode(a.label)+"\x3c/span\x3e")}},select:function(b,a,d){if(!(3>arguments.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_',
  544. 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;k<a.items.length&&(l=a.items[k]);k++)d.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(l[0]));"undefined"!=typeof c.inputStyle&&(c.style=c.inputStyle);f.select=new CKEDITOR.ui.dialog.uiElement(b,c,e,"select",null,
  545. g,d.join(""));e.push("\x3c/div\x3e");return e.join("")})}},file:function(b,a,d){if(!(3>arguments.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"',
  546. 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=
  547. 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"==
  548. 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"+
  549. (c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+e+"\x3c/legend\x3e");for(var b=0;b<d.length;b++)a.push(d[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(b){var a=CKEDITOR.document.getById(this._.labelId);1>a.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b=
  550. 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()},
  551. 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)},
  552. 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)},
  553. 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=
  554. 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);
  555. return this},clear:function(){for(var b=this.getInputElement().$;0<b.length;)b.remove(0);return this},keyboardFocusable:!0},q,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,a){this.getInputElement().$.checked=b;!a&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,
  556. a){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return r.onChange.apply(this,arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",a);return null}},keyboardFocusable:!0},q,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,a){for(var d=this._.children,f,c=0;c<d.length&&(f=d[c]);c++)f.getElement().$.checked=
  557. f.getValue()==b;!a&&this.fire("change",{value:b})},getValue:function(){for(var b=this._.children,a=0;a<b.length;a++)if(b[a].getElement().$.checked)return b[a].getValue();return null},accessKeyUp:function(){var b=this._.children,a;for(a=0;a<b.length;a++)if(b[a].getElement().$.checked){b[a].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,a){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return r.onChange.apply(this,arguments);b.on("load",function(){for(var a=
  558. this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",a);return null}}},q,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,q,{getInputElement:function(){var b=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<b.$.forms.length?new CKEDITOR.dom.element(b.$.forms[0].elements[0]):
  559. this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var a=/^on([A-Z]\w+)/,d,f=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},c;for(c in b)if(d=c.match(a))this.eventProcessors[c]?this.eventProcessors[c].call(this,this._.dialog,b[c]):f(this,this._.dialog,d[1].toLowerCase(),b[c]);return this},reset:function(){function b(){d.$.open();
  560. var b="";f.size&&(b=f.size-(CKEDITOR.env.ie?7:0));var h=a.frameId+"_input";d.$.write(['\x3chtml dir\x3d"'+g+'" lang\x3d"'+k+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+g+'" lang\x3d"'+k+'" action\x3d"',CKEDITOR.tools.htmlEncode(f.action),'"\x3e\x3clabel id\x3d"',a.labelId,'" for\x3d"',h,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(f.label),
  561. '\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',h,'" aria-labelledby\x3d"',a.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(f.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<b?b:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+e+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+m+")}","\x3c/script\x3e"].join(""));
  562. d.$.close();for(b=0;b<c.length;b++)c[b].enable()}var a=this._,d=CKEDITOR.document.getById(a.frameId).getFrameDocument(),f=a.definition,c=a.buttons,e=this.formLoadedNumber,m=this.formUnloadNumber,g=a.dialog._.editor.lang.dir,k=a.dialog._.editor.langCode;e||(e=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),m=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(e);
  563. CKEDITOR.tools.removeFunction(m)}));CKEDITOR.env.gecko?setTimeout(b,500):b()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(b,a){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",a)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=
  564. new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",v);CKEDITOR.dialog.addUIElement("password",v);CKEDITOR.dialog.addUIElement("textarea",n);CKEDITOR.dialog.addUIElement("checkbox",n);CKEDITOR.dialog.addUIElement("radio",n);CKEDITOR.dialog.addUIElement("button",n);CKEDITOR.dialog.addUIElement("select",n);CKEDITOR.dialog.addUIElement("file",n);CKEDITOR.dialog.addUIElement("fileButton",n);CKEDITOR.dialog.addUIElement("html",
  565. n);CKEDITOR.dialog.addUIElement("fieldset",{build:function(b,a,d){for(var f=a.children,c,e=[],h=[],g=0;g<f.length&&(c=f[g]);g++){var k=[];e.push(k);h.push(CKEDITOR.dialog._.uiElementBuilders[c.type].build(b,c,k))}return new CKEDITOR.ui.dialog[a.type](b,h,e,d,a)}})}});CKEDITOR.DIALOG_RESIZE_NONE=0;CKEDITOR.DIALOG_RESIZE_WIDTH=1;CKEDITOR.DIALOG_RESIZE_HEIGHT=2;CKEDITOR.DIALOG_RESIZE_BOTH=3;CKEDITOR.DIALOG_STATE_IDLE=1;CKEDITOR.DIALOG_STATE_BUSY=2;
  566. (function(){function x(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-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;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function K(a,b){for(var c=a.$.getElementsByTagName("input"),
  567. e=0,d=c.length;e<d;e++){var f=new CKEDITOR.dom.element(c[e]);"text"==f.getAttribute("type").toLowerCase()&&(b?(f.setAttribute("value",f.getCustomData("fake_value")||""),f.removeCustomData("fake_value")):(f.setCustomData("fake_value",f.getAttribute("value")),f.setAttribute("value","")))}}function T(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}
  568. function U(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function V(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",W).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=b.getChild([0,0,0,0,0]),e=c.getChild(0),d=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);
  569. !CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));e.unselectable();d.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:e,close:d,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),
  570. footer:c.getChild([3,0,1,0])}}}function L(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function X(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();
  571. c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function M(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function Y(a){function b(b){var c=a.getSize(),k=CKEDITOR.document.getWindow().getViewPaneSize(),q=b.data.$.screenX,n=b.data.$.screenY,r=q-e.x,l=n-e.y;e={x:q,y:n};d.x+=r;d.y+=l;a.move(d.x+h[3]<g?-h[3]:d.x-h[1]>k.width-c.width-g?k.width-c.width+("rtl"==f.lang.dir?0:h[1]):d.x,d.y+h[0]<g?-h[0]:d.y-h[2]>k.height-c.height-g?k.height-c.height+h[2]:d.y,1);b.data.preventDefault()}
  572. 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",
  573. 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||
  574. 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;
  575. 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",
  576. 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'+
  577. 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,
  578. 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:'),
  579. 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()),
  580. 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=
  581. 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 '+
  582. 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';
  583. 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;c<b;c++)a[c].focusIndex=c}function e(a){var b=l._.focusList;a=a||0;if(!(1>b.length)){var c=l._.currentFocusIndex;l._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,g=1<l._.pageCount;do{e+=a;if(g&&!l._.tabBarMode&&(e==b.length||-1==e)){l._.tabBarMode=!0;l._.tabs[l._.currentTabId][0].focus();
  584. l._.currentFocusIndex=-1;return}e=(e+b.length)%b.length;if(e==c)break}while(a&&!b[e].isFocusable());b[e].focus();"text"==b[e].type&&b[e].select()}}function d(b){if(l==CKEDITOR.dialog._.currentTop){var c=b.data.getKeystroke(),d="rtl"==a.lang.dir,g=[37,38,39,40];q=n=0;if(9==c||c==CKEDITOR.SHIFT+9)e(c==CKEDITOR.SHIFT+9?-1:1),q=1;else if(c==CKEDITOR.ALT+121&&!l._.tabBarMode&&1<l.getPageCount())l._.tabBarMode=!0,l._.tabs[l._.currentTabId][0].focus(),l._.currentFocusIndex=-1,q=1;else if(-1!=CKEDITOR.tools.indexOf(g,
  585. c)&&l._.tabBarMode)c=-1!=CKEDITOR.tools.indexOf([d?39:37,38],c)?x.call(l):A.call(l),l.selectPage(c),l._.tabs[c][0].focus(),q=1;else if(13!=c&&32!=c||!l._.tabBarMode)if(13==c)c=b.data.getTarget(),c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||((c=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(c.click,0,c),q=1),n=1;else if(27==c)(c=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(c.click,0,c):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),n=1;else return;else this.selectPage(this._.currentTabId),
  586. this._.tabBarMode=!1,this._.currentFocusIndex=-1,e(1),q=1;f(b)}}function f(a){q?a.data.preventDefault(1):n&&a.data.stopPropagation()}var g=CKEDITOR.dialog._.dialogDefinitions[b],h=CKEDITOR.tools.clone(aa),p=a.config.dialog_buttonsOrder||"OS",m=a.lang.dir,k={},q,n;("OS"==p&&CKEDITOR.env.mac||"rtl"==p&&"ltr"==m||"ltr"==p&&"rtl"==m)&&h.buttons.reverse();g=CKEDITOR.tools.extend(g(a),h);g=CKEDITOR.tools.clone(g);g=new P(this,g);h=V(a);this._={editor:a,element:h.element,name:b,contentSize:{width:0,height:0},
  587. size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=h.parts;CKEDITOR.tools.setTimeout(function(){a.fire("ariaWidget",this.parts.contents)},0,this);h={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};h["rtl"==m?"right":"left"]=0;this.parts.dialog.setStyles(h);CKEDITOR.event.call(this);this.definition=g=CKEDITOR.fire("dialogDefinition",
  588. {name:b,definition:g},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){h=a.config.removeDialogTabs.split(";");for(m=0;m<h.length;m++)if(p=h[m].split(":"),2==p.length){var r=p[0];k[r]||(k[r]=[]);k[r].push(p[1])}a._.removeDialogTabs=k}if(a._.removeDialogTabs&&(k=a._.removeDialogTabs[b]))for(m=0;m<k.length;m++)g.removeContents(k[m]);if(g.onLoad)this.on("load",g.onLoad);if(g.onShow)this.on("show",g.onShow);if(g.onHide)this.on("hide",g.onHide);if(g.onOk)this.on("ok",function(b){a.fire("saveSnapshot");
  589. setTimeout(function(){a.fire("saveSnapshot")},0);!1===g.onOk.call(this,b)&&(b.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(g.onCancel)this.on("cancel",function(a){!1===g.onCancel.call(this,a)&&(a.data.hide=!1)});var l=this,t=function(a){var b=l._.contents,c=!1,d;for(d in b)for(var e in b[d])if(c=a.call(this,b[d][e]))return};this.on("ok",function(a){t(function(b){if(b.validate){var c=b.validate(this),d="string"==typeof c||!1===c;d&&(a.data.hide=!1,a.stop());T.call(b,!d,"string"==typeof c?
  590. c:void 0);return d}})},this,null,0);this.on("cancel",function(b){t(function(c){if(c.isChanged())return a.config.dialog_noConfirmCancel||confirm(a.lang.common.confirmCancel)||(b.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=e;var y=this._.element;a.focusManager.add(y,1);this.on("show",function(){y.on("keydown",d,this);if(CKEDITOR.env.gecko)y.on("keypress",f,this)});this.on("hide",
  591. function(){y.removeListener("keydown",d);CKEDITOR.env.gecko&&y.removeListener("keypress",f);t(function(a){U.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",d,this,null,0)});this.on("show",function(){c();var b=1<l._.pageCount;a.config.dialog_startupFocusTab&&b?(l._.tabBarMode=!0,l._.tabs[l._.currentTabId][0].focus(),l._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=b?-1:this._.focusList.length-1,g.onFocus?
  592. (b=g.onFocus.call(this))&&b.focus():e(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);Y(this);Z(this);(new CKEDITOR.dom.text(g.title,CKEDITOR.document)).appendTo(this.parts.title);for(m=0;m<g.contents.length;m++)(k=g.contents[m])&&this.addPage(k);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
  593. this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,e(1)),a.data.preventDefault())},this);m=[];k=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:g.buttons},m).getChild();this.parts.footer.setHtml(m.join(""));for(m=0;m<k.length;m++)this._.buttons[k[m].id]=k[m]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){this._.contentSize&&this._.contentSize.width==
  594. a&&this._.contentSize.height==b||(CKEDITOR.dialog.fire("resize",{dialog:this,width:a,height:b},this._.editor),this.fire("resize",{width:a,height:b},this._.editor),this.parts.contents.setStyles({width:a+"px",height:b+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:a,height:b})}}(),getSize:function(){var a=this._.element.getFirst();
  595. return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var e=this._.element.getFirst(),d="rtl"==this._.editor.lang.dir,f="fixed"==e.getComputedStyle("position");CKEDITOR.env.ie&&e.setStyle("zoom","100%");f&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},f||(f=CKEDITOR.document.getWindow().getScrollPosition(),a+=f.x,b+=f.y),d&&(f=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-f.width-a),b={top:(0<b?b:0)+"px"},
  596. b[d?"right":"left"]=(0<a?a:0)+"px",e.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition;a.getParent()&&a.getParent().equals(CKEDITOR.document.getBody())?a.setStyle("display","block"):a.appendTo(CKEDITOR.document.getBody());this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);
  597. null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,N(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this);
  598. a.on("keydown",Q);a.on("keyup",R);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],e=this._.tabs[a.id],d=a.requiredContent,f=0;if(e){for(var g in this._.contents[a.id]){var h=this._.contents[a.id][g];"hbox"!=h.type&&"vbox"!=h.type&&h.getInputElement()&&(h.requiredContent&&!this._.editor.activeFilter.check(h.requiredContent)?h.disable():(h.enable(),f++))}!f||d&&!this._.editor.activeFilter.check(d)?e[0].addClass("cke_dialog_tab_disabled"):e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();
  599. X(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=this.parts.dialog,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),e=(c.width-b.width)/2,d=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<d?d:0)>c.height||
  600. b.width+(0<e?e:0)>c.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)})},
  601. 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();
  602. 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;
  603. 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(),
  604. 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"',0<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',d,'"',e.gecko&&!e.hc?"":' href\x3d"javascript:void(0)"',
  605. ' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",d);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(S(this,this,"CTRL+"+a.accessKey,ca,da),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&
  606. !1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var b in this._.tabs){var c=this._.tabs[b][0],e=this._.tabs[b][1];b!=a&&(c.removeClass("cke_dialog_tab_selected"),e.hide());e.setAttribute("aria-hidden",b!=a)}var d=this._.tabs[a];d[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(K(d[1]),d[1].show(),setTimeout(function(){K(d[1],1)},0)):d[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},
  607. updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(x.call(this)),b.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},
  608. getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},
  609. getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new L(this,a,b));else{this._.focusList.splice(b,0,new L(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},
  610. styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]="8px";this.parts.spinner=CKEDITOR.document.createElement("div",c);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",a)}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){this._.dialogDefinitions[a]&&
  611. "function"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,c){c=c||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",
  612. {hide:!0}).hide&&a.hide()}},c,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=function(a,c){c=c||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},c,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,
  613. b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var aa={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},D=function(a,b,c){for(var e=0,d;d=a[e];e++)if(d.id==b||c&&d[c]&&(d=D(d[c],
  614. b,c)))return d;return null},E=function(a,b,c,e,d){if(c){for(var f=0,g;g=a[f];f++){if(g.id==c)return a.splice(f,0,b),b;if(e&&g[e]&&(g=E(g[e],b,c,e,!0)))return g}if(d)return null}a.push(b);return b},F=function(a,b,c){for(var e=0,d;d=a[e];e++){if(d.id==b)return a.splice(e,1);if(c&&d[c]&&(d=F(d[c],b,c)))return d}return null},P=function(a,b){this.dialog=a;for(var c=b.contents,e=0,d;d=c[e];e++)c[e]=d&&new M(a,d);CKEDITOR.tools.extend(this,b)};P.prototype={getContents:function(a){return D(this.contents,
  615. a)},getButton:function(a){return D(this.buttons,a)},addContents:function(a,b){return E(this.contents,a,b)},addButton:function(a,b){return E(this.buttons,a,b)},removeContents:function(a){F(this.contents,a)},removeButton:function(a){F(this.buttons,a)}};M.prototype={get:function(a){return D(this.elements,a,"children")},add:function(a,b){return E(this.elements,a,b,"children")},remove:function(a){F(this.elements,a,"children")}};var J,z={},u,w={},Q=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=
  616. a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=w[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},R=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=w[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),
  617. a.data.preventDefault()))},S=function(a,b,c,e,d){(w[c]||(w[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:d||a.accessKeyUp,keydown:e||a.accessKeyDown})},ba=function(a){for(var b in w){for(var c=w[b],e=c.length-1;0<=e;e--)c[e].dialog!=a&&c[e].uiElement!=a||c.splice(e,1);0===c.length&&delete w[b]}},da=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},ca=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,e,d,f,g){if(!(4>arguments.length)){var h=(e.call?e(b):e)||
  618. "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;n<l.length;n++)l[n]&&(r[l[n]]=1);l=
  619. [];for(n in r)l.push(n);k["class"]=l.join(" ");b.title&&(k.title=b.title);r=(b.style||"").split(";");b.align&&(l=b.align,m["margin-left"]="left"==l?0:"auto",m["margin-right"]="right"==l?0:"auto");for(n in m)r.push(n+":"+m[n]);b.hidden&&r.push("display:none");for(n=r.length-1;0<=n;n--)""===r[n]&&r.splice(n,1);0<r.length&&(k.style=(k.style?k.style+"; ":"")+r.join("; "));for(n in k)p.push(n+'\x3d"'+CKEDITOR.tools.htmlEncode(k[n])+'" ');p.push("\x3e",q,"\x3c/",h,"\x3e");c.push(p.join(""));(this._||(this._=
  620. {})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}}));"function"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);
  621. this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&S(this,a,"CTRL+"+b.accessKey);var t=this;a.on("load",function(){var b=t.getInputElement();if(b){var c=t.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.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=
  622. 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;p<c.length;p++){var b="cke_dialog_ui_hbox_child",
  623. e=[];0===p&&(b="cke_dialog_ui_hbox_first");p==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');g?g[p]&&e.push("width:"+v(g[p])):e.push("width:"+Math.floor(100/c.length)+"%");h&&e.push("height:"+v(h));d&&void 0!==d.padding&&e.push("padding:"+v(d.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f[p].align&&e.push("text-align:"+f[p].align);0<e.length&&a.push('style\x3d"'+e.join("; ")+'" ');a.push("\x3e",c[p],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");
  624. return a.join("")})}},vbox:function(a,b,c,e,d){if(!(3>arguments.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"',
  625. CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;e<c.length;e++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');g&&k.push("width:"+v(g||"100%"));h?k.push("height:"+v(h[e])):d&&d.expand&&k.push("height:"+Math.floor(100/c.length)+"%");d&&void 0!==d.padding&&k.push("padding:"+v(d.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f[e].align&&k.push("text-align:"+f[e].align);0<k.length&&b.push('style\x3d"',
  626. k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[e],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},
  627. isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,e=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},d;for(d in a)if(c=
  628. d.match(b))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,a[d]):e(this,this._.dialog,c[1].toLowerCase(),a[d]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=
  629. this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>
  630. 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<d.length&&(f=d[p]);p++){var m=[];g.push(m);h.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,m))}return new CKEDITOR.ui.dialog[c.type](a,h,g,e,c)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",
  631. a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){a.openDialog(this.dialogName)},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,f=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=
  632. arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c,d=CKEDITOR.VALIDATE_AND,e=[],f;for(f=0;f<a.length;f++)if("function"==typeof a[f])e.push(a[f]);else break;f<a.length&&"string"==typeof a[f]&&(c=a[f],f++);f<a.length&&"number"==typeof a[f]&&(d=a[f]);var n=d==CKEDITOR.VALIDATE_AND?!0:!1;for(f=0;f<e.length;f++)n=d==CKEDITOR.VALIDATE_AND?n&&e[f](b):n||e[f](b);return n?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},
  633. notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},
  634. notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in z)z[c].remove();z={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,e=CKEDITOR.dialog._.dialogDefinitions[a];null===CKEDITOR.dialog._.currentTop&&N(this);if("function"==typeof e)c=
  635. this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,c),c.show();else{if("failed"==e)throw O(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})})();
  636. CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(x){x.on("doubleclick",function(A){A.data.dialog&&x.openDialog(A.data.dialog)},null,null,999)}});(function(){function r(b,a,c){a.type||(a.type="auto");if(c&&!1===b.fire("beforePaste",a)||!a.dataValue&&a.dataTransfer.isEmpty())return!1;a.dataValue||(a.dataValue="");if(CKEDITOR.env.gecko&&"drop"==a.method&&b.toolbox)b.once("afterPaste",function(){b.toolbox.focus()});return b.fire("paste",a)}function y(b){function a(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.readOnly&&"cut"==a.name||n.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on("copy",
  637. d);a.on("cut",d);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(n.mainPasteEvent,function(b){"beforepaste"==n.mainPasteEvent&&p||k(b)});"beforepaste"==n.mainPasteEvent&&(a.on("paste",function(a){v||(e(),a.data.preventDefault(),k(a),f("paste")||b.openDialog("paste"))}),a.on("contextmenu",g,null,null,0),a.on("beforepaste",function(b){!b.data||b.data.$.ctrlKey||b.data.$.shiftKey||g()},null,null,0));a.on("beforecut",function(){!p&&h(b)});var c;a.attachListener(CKEDITOR.env.ie?
  638. a:b.document.getDocumentElement(),"mouseup",function(){c=setTimeout(function(){t()},0)});b.on("destroy",function(){clearTimeout(c)});a.on("keyup",t)}function c(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&h();var a;var d=this.type;if(CKEDITOR.env.ie)a=f(d);else try{a=b.document.$.execCommand(d,!1,null)}catch(c){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function d(){return{canUndo:!1,
  639. async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,a){var d=this,c=function(a,c){a&&r(b,a,!!c);b.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!a})};"string"==typeof a?c({dataValue:a,method:"paste",dataTransfer:n.initPasteDataTransfer()},1):b.getClipboardData(c)}}}function e(){v=1;setTimeout(function(){v=0},100)}function g(){p=1;setTimeout(function(){p=0},10)}function f(a){var d=b.document,c=d.getBody(),e=!1,f=function(){e=!0};c.on(a,f);7<CKEDITOR.env.version?d.$.execCommand(a):
  640. d.$.selection.createRange().execCommand(a);c.removeListener(a,f);return e}function h(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),d,c,e;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(d=a.getSelectedElement())&&(c=a.getRanges()[0],e=b.document.createText(""),e.insertBefore(d),c.setStartBefore(e),c.setEndAfter(d),a.selectRanges([c]),setTimeout(function(){d.getParent()&&(e.remove(),a.selectElement(d))},0))}}function l(a,d){var c=b.document,e=b.editable(),f=function(b){b.cancel()},q;
  641. if(!c.getById("cke_pastebin")){var g=b.getSelection(),h=g.createBookmarks();CKEDITOR.env.ie&&g.root.fire("selectionchange");var m=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",c);m.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var k=0,c=c.getWindow();CKEDITOR.env.webkit?(e.append(m),m.addClass("cke_editable"),e.is("body")||(k="static"!=e.getComputedStyle("position")?e:CKEDITOR.dom.element.get(e.$.offsetParent),k=k.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?
  642. "body":"html",1).append(m);m.setStyles({position:"absolute",top:c.getScrollPosition().y-k+10+"px",width:"1px",height:Math.max(1,c.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&m.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(k=m.getParent().isReadOnly())?(m.setOpacity(0),m.setAttribute("contenteditable",!0)):m.setStyle("ltr"==b.config.contentsLangDirection?"left":"right","-10000px");b.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||
  643. CKEDITOR.env.gecko)q=e.once("blur",f,null,null,-100);k&&m.focus();k=new CKEDITOR.dom.range(m);k.selectNodeContents(m);var t=k.select();CKEDITOR.env.ie&&(q=e.once("blur",function(){b.lockSelection(t)}));var l=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=l);q&&q.removeListener();CKEDITOR.env.ie&&e.focus();g.selectBookmarks(h);m.remove();var a;CKEDITOR.env.webkit&&(a=m.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&
  644. (m=a);b.removeListener("selectionChange",f);d(m.getHtml())},0)}}function z(){if("paste"==n.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();e();var a=b.focusManager;a.lock();if(b.editable().fire(n.mainPasteEvent)&&!f("paste"))return a.unlock(),!1;a.unlock();return!0}function q(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=b.editable();e();"paste"==n.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
  645. 46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function k(a){var d={type:"auto",method:"paste",dataTransfer:n.initPasteDataTransfer(a)};d.dataTransfer.cacheData();var c=!1!==b.fire("beforePaste",d);c&&n.canClipboardApiBeTrusted(d.dataTransfer,b)?(a.data.preventDefault(),setTimeout(function(){r(b,d)},0)):l(a,function(a){d.dataValue=a.replace(/<span[^>]+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"));
  646. 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=
  647. 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",
  648. "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",
  649. 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><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!b.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!b.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!b.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";
  650. 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(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");a=a.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(a.match(/^[^<]$/))return a;CKEDITOR.env.webkit&&-1<a.indexOf("\x3cdiv\x3e")&&(a=a.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),
  651. a.match(/<div>(<br>|)<\/div>/)&&(a="\x3cp\x3e"+a.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),a=a.replace(/<\/div><div>/g,"\x3cbr\x3e"),a=a.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(a=a.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<a.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(a="\x3cp\x3e"+a.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return C(b,a)}function D(){function b(){var a=
  652. {},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,
  653. b.activeEnterMode);a.writeHtml(d);return d.getHtml()}function C(b,a){b.enterMode==CKEDITOR.ENTER_BR?a=a.replace(/(<\/p><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,
  654. 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()}
  655. 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=
  656. 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()});
  657. 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,
  658. 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||
  659. (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<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,
  660. function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),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")||
  661. f.hasClass("cke_contents"));)l=h=f;h&&(b=h.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\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><br><\/div>$/,function(b,f){return f in c?(a.data.endsWithEOL=1,"\x3c/"+f+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$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||
  662. "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},
  663. 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||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?
  664. "beforepaste":"paste",canClipboardApiBeTrusted:function(b,a){return b.getTransferType(a)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!b.isEmpty()||CKEDITOR.env.gecko&&(b.getData("text/html")||b.getFilesCount())?!0:!1},getDropTarget:function(b){var a=b.editable();return CKEDITOR.env.ie&&9>CKEDITOR.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=
  665. 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)&&
  666. b.endOffset<=d||b.startContainer.getParent().equals(c)&&b.startContainer.getIndex()<d||b.endContainer.getParent().equals(c)&&b.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,a,c,d){var e=CKEDITOR.plugins.clipboard,g=d.editable(),f,h;d.fire("saveSnapshot");d.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,a,e.dragStartContainerChildCount,e.dragEndContainerChildCount);(h=this.isDropRangeAffectedByDragRange(b,a))||(f=b.createBookmark(!1));
  667. 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=
  668. 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&&8<CKEDITOR.env.version&&g&&a.editable().hasFocus)return g;if(document.body.createTextRange){a.focus();c=a.document.getBody().$.createTextRange();try{for(var h=!1,l=0;20>l&&
  669. !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();
  670. d<r.left?f.setStartAt(n,CKEDITOR.POSITION_AFTER_START):f.setStartAt(n,CKEDITOR.POSITION_BEFORE_END);f.collapse(!0)}}catch(v){return null}}else return null}return f},initDragDataTransfer:function(b,a){var c=b.data.$?b.data.$.dataTransfer:null,d=new this.dataTransfer(c,a);c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;b.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(b,a){if(this.isCustomCopyCutSupported){if(b&&
  671. b.data&&b.data.$){var c=new this.dataTransfer(b.data.$.clipboardData,a);this.copyCutData&&c.id==this.copyCutData.id?(c=this.copyCutData,c.$=b.data.$.clipboardData):this.copyCutData=c;return c}return new this.dataTransfer(null,a)}return new this.dataTransfer(CKEDITOR.env.edge&&b&&b.data.$&&b.data.$.clipboardData||null,a)},preventDefaultDropOnElement:function(b){b&&b.on("dragover",E)}};var p=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=
  672. function(b,a){b&&(this.$=b);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\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"==
  673. 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))&&
  674. 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:
  675. 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;c<this.$.types.length;c++)b(this.$.types[c])}else b("Text"),b("URL");d=this._getImageFromClipboard();if(this.$&&this.$.files||d){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&
  676. d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(b){return this._.files.length?this._.files[b]:this.$&&this.$.files&&this.$.files.length?this.$.files[b]:0===b?this._getImageFromClipboard():void 0},isEmpty:function(){var b={},a;if(this.getFilesCount())return!1;for(a in this._.data)b[a]=1;if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=
  677. 0;c<this.$.types.length;c++)b[this.$.types[c]]=1}else b.Text=1,b.URL=1;"Text"!=p&&(b[p]=0);for(a in b)if(b[a]&&""!==this.getData(a))return!1;return!0},_getImageFromClipboard:function(){var b;if(this.$&&this.$.items&&this.$.items[0])try{if((b=this.$.items[0].getAsFile())&&b.type)return b}catch(a){}}}})();(function(){function q(b,d,a){a=b.config.forceEnterMode||a;"wysiwyg"==b.mode&&(d||(d=b.activeEnterMode),b.elementPath().isContextFor("p")||(d=CKEDITOR.ENTER_BR,a=1),b.fire("saveSnapshot"),d==CKEDITOR.ENTER_BR?t(b,d,null,a):u(b,d,null,a),b.fire("saveSnapshot"))}function v(b){b=b.getSelection().getRanges(!0);for(var d=b.length-1;0<d;d--)b[d].deleteContents();return b[0]}function y(b){var d=b.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},
  678. !0);if(b.root.equals(d))return b;d=new CKEDITOR.dom.range(d);d.moveToRange(b);return d}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){q(b)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){q(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var z=CKEDITOR.dom.walker.whitespaces(),A=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(b,
  679. d,a,h){if(a=a||v(b)){a=y(a);var f=a.document,k=a.checkStartOfBlock(),m=a.checkEndOfBlock(),l=b.elementPath(a.startContainer),c=l.block,n=d==CKEDITOR.ENTER_DIV?"div":"p",e;if(k&&m){if(c&&(c.is("li")||c.getParent().is("li"))){c.is("li")||(c=c.getParent());a=c.getParent();e=a.getParent();h=!c.hasPrevious();var p=!c.hasNext(),n=b.getSelection(),g=n.createBookmarks(),k=c.getDirection(1),m=c.getAttribute("class"),r=c.getAttribute("style"),q=e.getDirection(1)!=k;b=b.enterMode!=CKEDITOR.ENTER_BR||q||r||m;
  680. if(e.is("li"))h||p?(h&&p&&a.remove(),c[p?"insertAfter":"insertBefore"](e)):c.breakParent(e);else{if(b)if(l.block.is("li")?(e=f.createElement(d==CKEDITOR.ENTER_P?"p":"div"),q&&e.setAttribute("dir",k),r&&e.setAttribute("style",r),m&&e.setAttribute("class",m),c.moveChildren(e)):e=l.block,h||p)e[h?"insertBefore":"insertAfter"](a);else c.breakParent(a),e.insertAfter(a);else if(c.appendBogus(!0),h||p)for(;f=c[h?"getFirst":"getLast"]();)f[h?"insertBefore":"insertAfter"](a);else for(c.breakParent(a);f=c.getLast();)f.insertAfter(a);
  681. c.remove()}n.selectBookmarks(g);return}if(c&&c.getParent().is("blockquote")){c.breakParent(c.getParent());c.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||c.getPrevious().remove();c.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||c.getNext().remove();a.moveToElementEditStart(c);a.select();return}}else if(c&&c.is("pre")&&!m){t(b,d,a,h);return}if(k=a.splitBlock(n)){d=k.previousBlock;c=k.nextBlock;l=k.wasStartOfBlock;b=k.wasEndOfBlock;c?(g=c.getParent(),g.is("li")&&(c.breakParent(g),
  682. c.move(c.getNext(),1))):d&&(g=d.getParent())&&g.is("li")&&(d.breakParent(g),g=d.getNext(),a.moveToElementEditStart(g),d.move(d.getPrevious()));if(l||b){if(d){if(d.is("li")||!w.test(d.getName())&&!d.is("pre"))e=d.clone()}else c&&(e=c.clone());e?h&&!e.is("li")&&e.renameNode(n):g&&g.is("li")?e=g:(e=f.createElement(n),d&&(p=d.getDirection())&&e.setAttribute("dir",p));if(f=k.elementPath)for(h=0,n=f.elements.length;h<n;h++){g=f.elements[h];if(g.equals(f.block)||g.equals(f.blockLimit))break;CKEDITOR.dtd.$removeEmpty[g.getName()]&&
  683. (g=g.clone(),e.moveChildren(g),e.append(g))}e.appendBogus();e.getParent()||a.insertNode(e);e.is("li")&&e.removeAttribute("value");!CKEDITOR.env.ie||!l||b&&d.getChildCount()||(a.moveToElementEditStart(b?d:e),a.select());a.moveToElementEditStart(l&&!b?c:e)}else c.is("li")&&(e=a.clone(),e.selectNodeContents(c),e=new CKEDITOR.dom.walker(e),e.evaluator=function(a){return!(A(a)||z(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(g=e.next())&&
  684. g.type==CKEDITOR.NODE_ELEMENT&&g.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?f.createElement("br"):f.createText(" ")).insertBefore(g)),c&&a.moveToElementEditStart(c);a.select();a.scrollIntoView()}}},enterBr:function(b,d,a,h){if(a=a||v(b)){var f=a.document,k=a.checkEndOfBlock(),m=new CKEDITOR.dom.elementPath(b.getSelection().getStartElement()),l=m.block,c=l&&m.block.getName();h||"li"!=c?(!h&&k&&w.test(c)?(k=l.getDirection())?(f=f.createElement("div"),f.setAttribute("dir",k),f.insertAfter(l),a.setStart(f,
  685. 0)):(f.createElement("br").insertAfter(l),CKEDITOR.env.gecko&&f.createText("").insertAfter(l),a.setStartAt(l.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(b="pre"==c&&CKEDITOR.env.ie&&8>CKEDITOR.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)):
  686. 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;
  687. 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)&&
  688. 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<d.length;h++)c.hasClass(d[h]+g[0])&&(c.removeClass(d[h]+g[0]),c.addClass(d[h]+g[1]));d=c.getStyle("margin-right");g=c.getStyle("margin-left");d?c.setStyle("margin-left",d):c.removeStyle("margin-left");g?c.setStyle("margin-right",g):c.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;
  689. this.startDisabled=!this.isIndent},specificDefinition:function(a,b,e){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=e?"indent":"outdent";this.indentKey=e?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var e=a.getCommand(b.relatedGlobal),c;for(c in b.jobs)e.on("exec",function(d){d.data.done||(a.fire("lockSnapshot"),b.execJob(a,c)&&(d.data.done=
  690. !0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,c),e.on("refresh",function(d){d.data.states||(d.data.states={});d.data.states[b.name+"@"+c]=b.refreshJob(a,c,d.data.path)},this,null,c);a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var e=this.jobs[b];if(e.state!=k)return e.exec.call(this,a)},refreshJob:function(a,
  691. b,e){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,e):b.state=k;return b.state},getContext:function(a){return a.contains(this.context)}}})();(function(){function f(b,c,a){if(!b.getCustomData("indent_processed")){var d=this.editor,l=this.isIndent;if(c){d=b.$.className.match(this.classNameRegex);a=0;d&&(d=d[1],a=CKEDITOR.tools.indexOf(c,d)+1);if(0>(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,""));0<a&&b.addClass(c[a-1])}else{c=m(b,a);a=parseInt(b.getStyle(c),10);var g=d.config.indentOffset||40;isNaN(a)&&(a=0);a+=(l?1:-1)*g;if(0>a)return;a=Math.max(a,
  692. 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,
  693. 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&&
  694. (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":
  695. "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")});
  696. 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;a<g.length;a++)if(g[a].getName&&p[g[a].getName()]){b=g[a];break}for(var g=l.isIndent?1:-1,a=e[0],e=e[e.length-1],k=CKEDITOR.plugins.list.listToArray(b,q),n=k[e.getCustomData("listarray_index")].indent,
  697. a=a.getCustomData("listarray_index");a<=e.getCustomData("listarray_index");a++)if(k[a].indent+=g,0<g){var h=k[a].parent;k[a].parent=new CKEDITOR.dom.element(h.getName(),h.getDocument())}for(a=e.getCustomData("listarray_index")+1;a<k.length&&k[a].indent>n;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")&&
  698. r.push(m)}e&&e.listNode.replace(b);if(r&&r.length)for(a=0;a<r.length;a++){for(m=b=r[a];(m=m.getNext())&&m.is&&m.getName()in p;)CKEDITOR.env.needsNbspFiller&&!b.getFirst(x)&&b.append(d.document.createText(" ")),b.append(m);b.insertAfter(f)}e&&c.fire("contentDomInvalidated");return!0}for(var l=this,q=this.database,p=this.context,n=c.getSelection(),n=(n&&n.getRanges()).createIterator(),d;d=n.getNextRange();){for(var b=d.getCommonAncestor();b&&(b.type!=CKEDITOR.NODE_ELEMENT||!p[b.getName()]);){if(c.editable().equals(b)){b=
  699. !1;break}b=b.getParent()}b||(b=d.startPath().contains(p))&&d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);if(!b){var h=d.getEnclosedNode();h&&h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in p&&(d.setStartAt(h,CKEDITOR.POSITION_AFTER_START),d.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),b=h)}b&&d.startContainer.type==CKEDITOR.NODE_ELEMENT&&d.startContainer.getName()in p&&(h=new CKEDITOR.dom.walker(d),h.evaluator=t,d.startContainer=h.next());b&&d.endContainer.type==CKEDITOR.NODE_ELEMENT&&d.endContainer.getName()in
  700. p&&(h=new CKEDITOR.dom.walker(d),h.evaluator=t,d.endContainer=h.previous());if(b)return f(b)}return 0}function t(c){return c.type==CKEDITOR.NODE_ELEMENT&&c.is("li")}function x(c){return y(c)&&z(c)}var y=CKEDITOR.dom.walker.whitespaces(!0),z=CKEDITOR.dom.walker.bookmark(!1,!0),u=CKEDITOR.TRISTATE_DISABLED,v=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(c){function f(c){l.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];c.on("key",
  701. function(f){if("wysiwyg"==c.mode&&f.data.keyCode==this.indentKey){var n=this.getContext(c.elementPath());!n||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c.elementPath(),n)||(c.execCommand(this.relatedGlobal),f.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(c,f){var d=this.getContext(f),b=CKEDITOR.plugins.indentList.firstItemInPath(this.context,f,d);return d&&this.isIndent&&!b?v:u}:function(c,f){return!this.getContext(f)||this.isIndent?
  702. u:v},exec:CKEDITOR.tools.bind(w,this)}}var l=CKEDITOR.plugins.indent;l.registerCommands(c,{indentlist:new f(c,"indentlist",!0),outdentlist:new f(c,"outdentlist")});CKEDITOR.tools.extend(f.prototype,l.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(c,f,l){var q=f.contains(t);l||(l=f.contains(c));return l&&q&&q.equals(l.getFirst(t))}})();(function(){function n(a,c){c=void 0===c||c;var b;if(c)b=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){b=a.getParent();if(!b)break;a=b}b=a.getStyle("text-align")||a.getAttribute("align")||""}b&&(b=b.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!b&&c&&(b="rtl"==a.getComputedStyle("direction")?"right":"left");return b}function g(a,c,b){this.editor=a;this.name=c;this.value=b;this.context="p";c=a.config.justifyClasses;var h=a.config.enterMode==
  703. CKEDITOR.ENTER_P?"p":"div";if(c){switch(b){case "left":this.cssClassName=c[0];break;case "center":this.cssClassName=c[1];break;case "right":this.cssClassName=c[2];break;case "justify":this.cssClassName=c[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+c.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=h+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",
  704. classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function l(a){var c=a.editor,b=c.createRange();b.setStartBefore(a.data.node);b.setEndAfter(a.data.node);for(var h=new CKEDITOR.dom.walker(b),d;d=h.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(a.data.node)&&d.getDirection())b.setStartAfter(d),h=new CKEDITOR.dom.walker(b);else{var e=c.config.justifyClasses;e&&(d.hasClass(e[0])?(d.removeClass(e[0]),d.addClass(e[2])):d.hasClass(e[2])&&(d.removeClass(e[2]),
  705. d.addClass(e[0])));e=d.getStyle("text-align");"left"==e?d.setStyle("text-align","right"):"right"==e&&d.setStyle("text-align","left")}}g.prototype={exec:function(a){var c=a.getSelection(),b=a.config.enterMode;if(c){for(var h=c.createBookmarks(),d=c.getRanges(),e=this.cssClassName,g,f,k=a.config.useComputedState,k=void 0===k||k,m=d.length-1;0<=m;m--)for(g=d[m].createIterator(),g.enlargeBr=b!=CKEDITOR.ENTER_BR;f=g.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){f.removeAttribute("align");
  706. f.removeStyle("text-align");var l=e&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),p=this.state==CKEDITOR.TRISTATE_OFF&&(!k||n(f,!0)!=this.value);e?p?f.addClass(e):l||f.removeAttribute("class"):p&&f.setStyle("text-align",this.value)}a.focus();a.forceNextSelectionCheck();c.selectBookmarks(h)}},refresh:function(a,c){var b=c.block||c.blockLimit;this.setState("body"!=b.getName()&&n(b,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};
  707. CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var c=new g(a,"justifyleft","left"),b=new g(a,"justifycenter","center"),h=new g(a,"justifyright","right"),d=new g(a,"justifyblock","justify");a.addCommand("justifyleft",c);a.addCommand("justifycenter",b);a.addCommand("justifyright",h);a.addCommand("justifyblock",d);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.justify.left,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{label:a.lang.justify.center,
  708. command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",{label:a.lang.justify.right,command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{label:a.lang.justify.block,command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",l)}}})})();(function(){function I(b,m,e){function c(c){if(!(!(a=d[c?"getFirst":"getLast"]())||a.is&&a.isBlockBoundary()||!(p=m.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||p.is&&p.isBlockBoundary({br:1})))b.document.createElement("br")[c?"insertBefore":"insertAfter"](a)}for(var f=CKEDITOR.plugins.list.listToArray(m.root,e),g=[],k=0;k<m.contents.length;k++){var h=m.contents[k];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(g.push(h),CKEDITOR.dom.element.setMarker(e,
  709. h,"list_item_processed",!0))}h=null;for(k=0;k<g.length;k++)h=g[k].getCustomData("listarray_index"),f[h].indent=-1;for(k=h+1;k<f.length;k++)if(f[k].indent>f[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=
  710. 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)&&
  711. 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&&
  712. 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);
  713. 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[];
  714. c||(c=0);e||(e=[]);for(var g=0,k=b.getChildCount();g<k;g++){var h=b.getChild(g);h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(h,m,e,c+1);if("li"==h.$.nodeName.toLowerCase()){var d={parent:b,indent:c,element:h,contents:[]};f?d.grandparent=f:(d.grandparent=b.getParent(),d.grandparent&&"li"==d.grandparent.$.nodeName.toLowerCase()&&(d.grandparent=d.grandparent.getParent()));m&&CKEDITOR.dom.element.setMarker(m,h,"listarray_index",e.length);e.push(d);
  715. for(var a=0,p=h.getChildCount(),l;a<p;a++)l=h.getChild(a),l.type==CKEDITOR.NODE_ELEMENT&&v[l.getName()]?CKEDITOR.plugins.list.listToArray(l,m,e,c+1,d.grandparent):d.contents.push(l)}}return e},arrayToList:function(b,m,e,c,f){e||(e=0);if(!b||b.length<e+1)return null;for(var g,k=b[e].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(k),d=null,a=e,p=Math.max(b[e].indent,0),l=null,q,n,t=c==CKEDITOR.ENTER_P?"p":"div";;){var r=b[a];g=r.grandparent;q=r.element.getDirection(1);if(r.indent==p){d&&b[a].parent.getName()==
  716. d.getName()||(d=b[a].parent.clone(!1,1),f&&d.setAttribute("dir",f),h.append(d));l=d.append(r.element.clone(0,1));q!=d.getDirection(1)&&l.setAttribute("dir",q);for(g=0;g<r.contents.length;g++)l.append(r.contents[g].clone(1,1));a++}else if(r.indent==Math.max(p,0)+1)r=b[a-1].element.getDirection(1),a=CKEDITOR.plugins.list.arrayToList(b,null,a,c,r!=q?q:null),!l.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=k.$.documentMode&&l.append(k.createText(" ")),l.append(a.listNode),a=a.nextIndex;else if(-1==
  717. 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;g<B;g++)if(w=r.contents[g],H(w)&&1<B)A?x=w.clone(1,1):l.append(w.clone(1,1));else if(w.type==CKEDITOR.NODE_ELEMENT&&w.isBlockBoundary()){d&&!w.getDirection()&&
  718. w.setAttribute("dir",q);n=w;var C=y.getAttribute("style");C&&n.setAttribute("style",C.replace(/([^;])$/,"$1;")+(n.getAttribute("style")||""));D&&w.addClass(D);n=null;x&&(l.append(x),x=null);l.append(w.clone(1,1))}else A?(n||(n=k.createElement(t),l.append(n),d&&n.setAttribute("dir",q)),z&&n.setAttribute("style",z),D&&n.setAttribute("class",D),x&&(n.append(x),x=null),n.append(w.clone(1,1))):l.append(w.clone(1,1));x&&((n||l).append(x),x=null);l.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&a!=b.length-1&&(CKEDITOR.env.needsBrFiller&&
  719. (q=l.getLast())&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("br")&&q.remove(),(q=l.getLast(u))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is(CKEDITOR.dtd.$block)||l.append(k.createElement("br")));q=l.$.nodeName.toLowerCase();"div"!=q&&"p"!=q||l.appendBogus();h.append(l);d=null;a++}else return null;n=null;if(b.length<=a||Math.max(b[a].indent,0)<p)break}if(m)for(b=h.getFirst();b;){if(b.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(m,b),b.getName()in CKEDITOR.dtd.$listItem&&(e=b,k=f=c=void 0,c=e.getDirection()))){for(f=
  720. e.getParent();f&&!(k=f.getDirection());)f=f.getParent();c==k&&e.removeAttribute("dir")}b=b.getNextSourceNode()}return{listNode:h,nextIndex:a}}};var L=/^h[1-6]$/,J=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);B.prototype={exec:function(b){this.refresh(b,b.elementPath());var m=b.config,e=b.getSelection(),c=e&&e.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var f=b.editable();if(f.getFirst(u)){var g=1==c.length&&c[0];(m=g&&g.getEnclosedNode())&&m.is&&this.type==m.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else m.enterMode==
  721. CKEDITOR.ENTER_BR?f.appendBogus():c[0].fixBlock(1,m.enterMode==CKEDITOR.ENTER_P?"p":"div"),e.selectRanges(c)}for(var m=e.createBookmarks(!0),f=[],k={},c=c.createIterator(),h=0;(g=c.getNextRange())&&++h;){var d=g.getBoundaryNodes(),a=d.startNode,p=d.endNode;a.type==CKEDITOR.NODE_ELEMENT&&"td"==a.getName()&&g.setStartAt(d.startNode,CKEDITOR.POSITION_AFTER_START);p.type==CKEDITOR.NODE_ELEMENT&&"td"==p.getName()&&g.setEndAt(d.endNode,CKEDITOR.POSITION_BEFORE_END);g=g.createIterator();for(g.forceBrBreak=
  722. this.state==CKEDITOR.TRISTATE_OFF;d=g.getNextParagraph();)if(!d.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(k,d,"list_block",1);for(var l=b.elementPath(d),a=l.elements,p=0,l=l.blockLimit,q,n=a.length-1;0<=n&&(q=a[n]);n--)if(v[q.getName()]&&l.contains(q)){l.removeCustomData("list_group_object_"+h);(a=q.getCustomData("list_group_object"))?a.contents.push(d):(a={root:q,contents:[d]},f.push(a),CKEDITOR.dom.element.setMarker(k,q,"list_group_object",a));p=1;break}p||(p=l,p.getCustomData("list_group_object_"+
  723. h)?p.getCustomData("list_group_object_"+h).contents.push(d):(a={root:p,contents:[d]},CKEDITOR.dom.element.setMarker(k,p,"list_group_object_"+h,a),f.push(a)))}}for(q=[];0<f.length;)if(a=f.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(v[a.root.getName()]){c=b;h=a;a=k;g=q;p=CKEDITOR.plugins.list.listToArray(h.root,a);l=[];for(d=0;d<h.contents.length;d++)n=h.contents[d],(n=n.getAscendant("li",!0))&&!n.getCustomData("list_item_processed")&&(l.push(n),CKEDITOR.dom.element.setMarker(a,n,"list_item_processed",
  724. !0));for(var n=h.root.getDocument(),t=void 0,r=void 0,d=0;d<l.length;d++){var y=l[d].getCustomData("listarray_index"),t=p[y].parent;t.is(this.type)||(r=n.createElement(this.type),t.copyAttributes(r,{start:1,type:1}),r.removeStyle("list-style-type"),p[y].parent=r)}a=CKEDITOR.plugins.list.arrayToList(p,a,null,c.config.enterMode);p=void 0;l=a.listNode.getChildCount();for(d=0;d<l&&(p=a.listNode.getChild(d));d++)p.getName()==this.type&&g.push(p);a.listNode.replace(h.root);c.fire("contentDomInvalidated")}else{p=
  725. b;g=a;d=q;l=g.contents;c=g.root.getDocument();h=[];1==l.length&&l[0].equals(g.root)&&(a=c.createElement("div"),l[0].moveChildren&&l[0].moveChildren(a),l[0].append(a),l[0]=a);g=g.contents[0].getParent();for(n=0;n<l.length;n++)g=g.getCommonAncestor(l[n].getParent());t=p.config.useComputedState;p=a=void 0;t=void 0===t||t;for(n=0;n<l.length;n++)for(r=l[n];y=r.getParent();){if(y.equals(g)){h.push(r);!p&&r.getDirection()&&(p=1);r=r.getDirection(t);null!==a&&(a=a&&a!=r?null:r);break}r=y}if(!(1>h.length)){l=
  726. 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);
  727. for(n=0;n<q.length;n++)F(q[n]);CKEDITOR.dom.element.clearAllMarkers(k);e.selectBookmarks(m);b.focus()},refresh:function(b,m){var e=m.contains(v,1),c=m.blockLimit||m.root;e&&c.contains(e)?this.setState(e.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(b){b.blockless||(b.addCommand("numberedlist",new B("numberedlist","ol")),b.addCommand("bulletedlist",new B("bulletedlist","ul")),b.ui.addButton&&
  728. (b.ui.addButton("NumberedList",{label:b.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),b.ui.addButton("BulletedList",{label:b.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),b.on("key",function(m){var e=m.data.domEvent.getKey(),c;if("wysiwyg"==b.mode&&e in{8:1,46:1}){var f=b.getSelection().getRanges()[0],g=f&&f.startPath();if(f&&f.collapsed){var k=8==e,h=b.editable(),d=new CKEDITOR.dom.walker(f.clone());d.evaluator=function(a){return u(a)&&
  729. !z(a)};d.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};e=f.clone();if(k){var a;(a=g.contains(v))&&f.checkBoundaryOfElement(a,CKEDITOR.START)&&(a=a.getParent())&&a.is("li")&&(a=A(a))?(c=a,a=a.getPrevious(u),e.moveToPosition(a&&z(a)?a:c,CKEDITOR.POSITION_BEFORE_START)):(d.range.setStartAt(h,CKEDITOR.POSITION_AFTER_START),d.range.setEnd(f.startContainer,f.startOffset),(a=d.previous())&&a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in v||a.is("li"))&&(a.is("li")||(d.range.selectNodeContents(a),
  730. d.reset(),d.evaluator=G,a=d.previous()),c=a,e.moveToElementEditEnd(c),e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(c)C(b,e,f),m.cancel();else{var p=g.contains(v);p&&f.checkBoundaryOfElement(p,CKEDITOR.START)&&(c=p.getFirst(u),f.checkBoundaryOfElement(c,CKEDITOR.START)&&(a=p.getPrevious(u),A(c)?a&&(f.moveToElementEditEnd(a),f.select()):b.execCommand("outdent"),m.cancel()))}}else if(c=g.contains("li")){if(d.range.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),k=(h=c.getLast(u))&&
  731. G(h)?h:c,g=0,(a=d.next())&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in v&&a.equals(h)?(g=1,a=d.next()):f.checkBoundaryOfElement(k,CKEDITOR.END)&&(g=2),g&&a){f=f.clone();f.moveToElementEditStart(a);if(1==g&&(e.optimize(),!e.startContainer.equals(c))){for(c=e.startContainer;c.is(CKEDITOR.dtd.$inline);)p=c,c=c.getParent();p&&e.moveToPosition(p,CKEDITOR.POSITION_AFTER_END)}2==g&&(e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END),f.endPath().block&&f.moveToPosition(f.endPath().block,CKEDITOR.POSITION_AFTER_START));
  732. C(b,e,f);m.cancel()}}else d.range.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),(a=d.next())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(v)&&(a=a.getFirst(u),g.block&&f.checkStartOfBlock()&&f.checkEndOfBlock()?(g.block.remove(),f.moveToElementEditStart(a),f.select()):A(a)?(f.moveToElementEditStart(a),f.select()):(f=f.clone(),f.moveToElementEditStart(a),C(b,e,f)),m.cancel());setTimeout(function(){b.selectionChange(1)})}}}))}})})();(function(){function l(a,b,f){var d=CKEDITOR.cleanWord;d?f():(a=CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||b+"filter/default.js"),CKEDITOR.scriptLoader.load(a,f,null,!0));return!d}function g(a){a.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(a){var b=0,f=this.path;a.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a){var c=this;b=1;a.once("beforePaste",g);a.getClipboardData({title:a.lang.pastefromword.title},function(b){b&&a.fire("paste",
  733. {type:"html",dataValue:b.dataValue,method:"paste",dataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()});a.fire("afterCommandExec",{name:"pastefromword",command:c,returnValue:!!b})})}});a.ui.addButton&&a.ui.addButton("PasteFromWord",{label:a.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});a.on("pasteState",function(b){a.getCommand("pastefromword").setState(b.data)});a.on("paste",function(d){var c=d.data,h=c.dataValue,g=/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,
  734. 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"})}});
  735. 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);
  736. 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())?
  737. 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<e.length;f++)if(!1===e[f](h))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)};CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var";
  738. CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign";(function(){function k(c){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(d){if(d.editable().hasFocus){var e=d.getSelection(),b;if(b=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,th:1},1)){var e=d.createRange(),a=CKEDITOR.tools.tryThese(function(){var a=b.getParent().$.cells[b.$.cellIndex+(c?-1:1)];a.parentNode.parentNode;return a},function(){var a=b.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(c?-1:1)];return a.cells[c?a.cells.length-1:
  739. 0]});if(a||c)if(a)a=new CKEDITOR.dom.element(a),e.moveToElementEditStart(a),e.checkStartOfBlock()&&e.checkEndOfBlock()||e.selectNodeContents(a);else return!0;else{for(var f=b.getAscendant("table").$,a=b.getParent().$.cells,f=new CKEDITOR.dom.element(f.insertRow(-1),d.document),g=0,h=a.length;g<h;g++)f.append((new CKEDITOR.dom.element(a[g],d.document)).clone(!1,!1)).appendBogus();e.moveToElementEditStart(f)}e.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},g={exec:function(c){c.container.focusNext(!0,
  740. c.tabIndex)}},f={exec:function(c){c.container.focusPrevious(!0,c.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(c){for(var d=!1!==c.config.enableTabKeyTools,e=c.config.tabSpaces||0,b="";e--;)b+=" ";if(b)c.on("key",function(a){9==a.data.keyCode&&(c.insertText(b),a.cancel())});if(d)c.on("key",function(a){(9==a.data.keyCode&&c.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&c.execCommand("selectPreviousCell"))&&a.cancel()});c.addCommand("blur",CKEDITOR.tools.extend(g,h));c.addCommand("blurBack",
  741. CKEDITOR.tools.extend(f,h));c.addCommand("selectNextCell",k());c.addCommand("selectPreviousCell",k(!0))}})})();
  742. CKEDITOR.dom.element.prototype.focusNext=function(k,h){var g=void 0===h?this.getTabIndex():h,f,c,d,e,b,a;if(0>=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)&&
  743. (f=1);if(b.isVisible()&&!(0>(a=b.getTabIndex()))){if(f&&a==g){d=b;break}a>g&&(!d||!e||a<e)?(d=b,e=a):d||0!==a||(d=b,e=a)}}d&&d.focus()};
  744. CKEDITOR.dom.element.prototype.focusPrevious=function(k,h){for(var g=void 0===h?this.getTabIndex():h,f,c,d,e=0,b,a=this.getDocument().getBody().getLast();a=a.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!c&&a.equals(this)){if(c=!0,k){if(!(a=a.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else c&&!this.contains(a)&&(f=1);if(a.isVisible()&&!(0>(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}b<g&&(!d||b>e)&&(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()&&
  745. (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")});
  746. 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",
  747. 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]=
  748. 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||
  749. "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,
  750. 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=
  751. d,a}else for(d=this.index+1;d<b.length;d++)if(a=b[d],!c.equalsContent(a))return a.index=d,a;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var a=this.getNextImage(!0);if(a)return this.restoreImage(a),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=this.getNextImage(!1);if(a)return this.restoreImage(a),!0}return!1},update:function(a){if(!this.locked){a||
  752. (a=new f(this.editor));for(var b=this.index,c=this.snapshots;0<b&&this.currentImage.equalsContent(c[b-1]);)--b;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var b=this.snapshots,c=b[b.length-1];return c.equalsContent(a)&&!c.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var c=null;if(b)c=!0;else{var d=new f(this.editor,
  753. !0);this.currentImage&&this.currentImage.equalsContent(d)&&(c=d)}this.locked={update:c,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=new f(this.editor,!0);a.equalsContent(b)||this.update()}}}};e.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};e.keyGroups={PRINTABLE:0,FUNCTIONAL:1};e.isNavigationKey=function(a){return!!e.navigationKeyCodes[a]};e.getKeyGroup=function(a){var b=e.keyGroups;
  754. return n[a]?b.FUNCTIONAL:b.PRINTABLE};e.getOppositeKeyGroup=function(a){var b=e.keyGroups;return a==b.FUNCTIONAL?b.PRINTABLE:b.FUNCTIONAL};e.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&e.getKeyGroup(a)==e.keyGroups.FUNCTIONAL};var f=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;b||(this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(!0));a.fire("afterUndoImage")},
  755. h=/\b(?:href|src|name)="[^"]*?"/gi;f.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(h,""),a=a.replace(h,""));return b!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var c=0;c<b.length;c++){var d=b[c],e=a[c];if(d.startOffset!=e.startOffset||d.endOffset!=e.endOffset||!CKEDITOR.tools.arrayCompare(d.start,e.start)||!CKEDITOR.tools.arrayCompare(d.end,
  756. e.end))return!1}}return!0}};var k=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new m;this.lastKeydownImage=null};k.prototype={onKeydown:function(a){var b=a.data.getKey();if(229!==b)if(-1<CKEDITOR.tools.indexOf(g,a.data.getKeystroke()))a.data.preventDefault();else if(this.keyEventsStack.cleanUp(a),a=this.undoManager,this.keyEventsStack.getLast(b)||this.keyEventsStack.push(b),this.lastKeydownImage=new f(a.editor),e.isNavigationKey(b)||
  757. this.undoManager.keyGroupChanged(b))if(a.strokesRecorded[0]||a.strokesRecorded[1])a.save(!1,this.lastKeydownImage,!1),a.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var b=this.undoManager;
  758. 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<c)b.type(a);else if(e.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new f(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},attachListeners:function(){var a=this.undoManager.editor,
  759. b=a.editable(),c=this;b.attachListener(b,"keydown",function(a){c.onKeydown(a);if(e.ieFunctionalKeysBug(a.data.getKey()))c.onInput()},null,null,999);b.attachListener(b,CKEDITOR.env.ie?"keypress":"input",c.onInput,c,null,999);b.attachListener(b,"keyup",c.onKeyup,c,null,999);b.attachListener(b,"paste",c.ignoreInputEventListener,c,null,999);b.attachListener(b,"drop",c.ignoreInputEventListener,c,null,999);b.attachListener(b.isInline()?b:a.document.getDocumentElement(),"click",function(){c.onNavigationKey()},
  760. null,null,999);b.attachListener(this.undoManager.editor,"blur",function(){c.keyEventsStack.remove(9)},null,null,999)}};var m=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};m.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:
  761. null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}})();(function(){function m(a,d){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),doc:a.document,win:a.window},d,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function n(a,d){CKEDITOR.tools.extend(this,d,{editor:a},!0)}function p(a,d){var b=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:b,inline:b.isInline(),doc:a.document,win:a.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},
  762. d,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var c=CKEDITOR.tools.bind(this.queryViewport,this),e=CKEDITOR.tools.bind(this.hideVisible,this),g=CKEDITOR.tools.bind(this.removeAll,this);b.attachListener(this.winTop,"resize",c);b.attachListener(this.winTop,"scroll",c);b.attachListener(this.winTop,"resize",e);b.attachListener(this.win,"scroll",e);b.attachListener(this.inline?b:this.frame,"mouseout",function(a){var b=a.data.$.clientX;a=a.data.$.clientY;
  763. this.queryViewport();(b<=this.rect.left||b>=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({},
  764. 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&&
  765. !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,
  766. "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,
  767. 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"],
  768. !(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)}:
  769. 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 0<a});c=a.call(this,b.$,c,d,1,function(a){return a<g});if(f)for(this.traverseSearch(f);!f.getParent().equals(b);)f=f.getParent();if(c)for(this.traverseSearch(c);!c.getParent().equals(b);)c=c.getParent();for(;f||c;){f&&(f=f.getNext(l));if(!f||f.equals(c))break;this.traverseSearch(f);c&&(c=c.getPrevious(l));if(!c||c.equals(f))break;this.traverseSearch(c)}}}(),
  770. greedySearch:function(){this.relations={};for(var a=this.editable.getElementsByTag("*"),d=0,b,c,e;b=a.getItem(d++);)if(!b.equals(this.editable)&&b.type==CKEDITOR.NODE_ELEMENT&&(b.hasAttribute("contenteditable")||!b.isReadOnly())&&l(b)&&b.isVisible())for(e in this.lookups)(c=this.lookups[e](b))&&this.store(b,c);return this.relations}};n.prototype={locate:function(){function a(a,b){var c=a.element[b===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return c&&l(c)?(a.siblingRect=c.getClientRect(),
  771. b==CKEDITOR.LINEUTILS_BEFORE?(a.siblingRect.bottom+a.elementRect.top)/2:(a.elementRect.bottom+a.siblingRect.top)/2):b==CKEDITOR.LINEUTILS_BEFORE?a.elementRect.top:a.elementRect.bottom}return function(d){var b;this.locations={};for(var c in d)b=d[c],b.elementRect=b.element.getClientRect(),b.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(c,CKEDITOR.LINEUTILS_BEFORE,a(b,CKEDITOR.LINEUTILS_BEFORE)),b.type&CKEDITOR.LINEUTILS_AFTER&&this.store(c,CKEDITOR.LINEUTILS_AFTER,a(b,CKEDITOR.LINEUTILS_AFTER)),b.type&
  772. CKEDITOR.LINEUTILS_INSIDE&&this.store(c,CKEDITOR.LINEUTILS_INSIDE,(b.elementRect.top+b.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,d,b,c;return function(e,g){a=this.locations;d=[];for(var f in a)for(var h in a[f])if(b=Math.abs(e-a[f][h]),d.length){for(c=0;c<d.length;c++)if(b<d[c].dist){d.splice(c,0,{uid:+f,type:h,dist:b});break}c==d.length&&d.push({uid:+f,type:h,dist:b})}else d.push({uid:+f,type:h,dist:b});return"undefined"!=typeof g?d.slice(0,g):d}}(),store:function(a,
  773. d,b){this.locations[a]||(this.locations[a]={});this.locations[a][d]=b}};var q={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},t={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};p.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var d=a.getUniqueId();
  774. a.hide();this.hidden[d]=a;delete this.visible[d]},showLine:function(a){var d=a.getUniqueId();a.show();this.visible[d]=a;delete this.hidden[d]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,d){var b,c,e;if(b=this.getStyle(a.uid,a.type)){for(e in this.visible)if(this.visible[e].getCustomData("hash")!==this.hash){c=this.visible[e];break}if(!c)for(e in this.hidden)if(this.hidden[e].getCustomData("hash")!==this.hash){this.showLine(c=this.hidden[e]);
  775. break}c||this.showLine(c=this.addLine());c.setCustomData("hash",this.hash);this.visible[c.getUniqueId()]=c;c.setStyles(b);d&&d(c)}},getStyle:function(a,d){var b=this.relations[a],c=this.locations[a][d],e={};e.width=b.siblingRect?Math.max(b.siblingRect.width,b.elementRect.width):b.elementRect.width;e.top=this.inline?c+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+c;if(e.top-this.winTopScroll.y<this.rect.top||e.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
  776. e.left=b.elementRect.left-this.rect.relativeX:(0<b.elementRect.left?e.left=this.rect.left+b.elementRect.left:(e.width+=b.elementRect.left,e.left=this.rect.left),0<(b=e.left+e.width-(this.rect.left+this.winPane.width))&&(e.width-=b));e.left+=this.winTopScroll.x;for(var g in e)e[g]=CKEDITOR.tools.cssLength(e[g]);return e},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,d){this.relations=a;this.locations=d;this.hash=Math.random()},
  777. cleanup:function(){var a,d;for(d in this.visible)a=this.visible[d],a.getCustomData("hash")!==this.hash&&this.hideLine(a)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(a){a=a.getClientRect();var d=this.container.getDocumentPosition(),b=this.container.getComputedStyle("position");a.relativeX=a.relativeY=
  778. 0;"static"!=b&&(a.relativeY=d.y,a.relativeX=d.x,a.top-=a.relativeY,a.bottom-=a.relativeY,a.left-=a.relativeX,a.right-=a.relativeX);return a}};var r={left:1,right:1,center:1},u={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:m,locator:n,liner:p}})();(function(){function p(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};F(this);G(this);this.on("checkWidgets",H);this.editor.on("contentDomInvalidated",this.checkWidgets,this);I(this);J(this);K(this);L(this);M(this)}function g(a,b,c,d,e){var f=a.editor;CKEDITOR.tools.extend(this,d,{editor:f,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},
  779. "function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:g.prototype.edit,focusedEditable:null,definition:d,repository:a,draggable:!1!==d.draggable,_:{downcastFn:d.downcast&&"string"==typeof d.downcast?d.downcasts[d.downcast]:d.downcast}},!0);a.fire("instanceCreated",this);N(this,d);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",
  780. this.getClasses());this.dataReady=!0;r(this);this.fire("data",this.data);this.isInited()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function q(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=b?b.getAllowedEnterMode(a.enterMode):a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function O(a,
  781. b){a.addCommand(b.name,{exec:function(a,d){function e(){a.widgets.finalizeCreation(g)}var f=a.widgets.focused;if(f&&f.name==b.name)f.edit();else if(b.insert)b.insert();else if(b.template){var f="function"==typeof b.defaults?b.defaults():b.defaults,f=CKEDITOR.dom.element.createFromHtml(b.template.output(f)),h,l=a.widgets.wrapElement(f,b.name),g=new CKEDITOR.dom.documentFragment(l.getDocument());g.append(l);(h=a.widgets.initOn(f,b,d&&d.startupData))?(f=h.once("edit",function(b){if(b.data.dialog)h.once("dialog",
  782. function(b){b=b.data;var d,f;d=b.once("ok",e,null,null,20);f=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(h,!0)});b.once("hide",function(){d.removeListener();f.removeListener()})});else e()},null,null,999),h.edit(),f.removeListener()):e()}},allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function P(a,b){function c(b,c,d){var e=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>
  783. 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()&&
  784. !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();d<e;d++){f=l.getItem(d);if(h=!this.getByElement(f,!0)){a:{h=Q;for(var k=f;k=k.getParent();)if(h(k)){h=!0;break a}h=!1}h=!h}h&&b.contains(f)&&(f.addClass("cke_widget_new"),c.push(this.initOn(f.getFirst(g.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function u(a,b,c){if(!c.allowedContent)return null;var d=this._.filters[a];
  785. d||(this._.filters[a]=d={});(a=d[b])||(d[b]=a=new CKEDITOR.filter(c.allowedContent));return a}function R(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var f,h,l,k,m;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(g.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(m=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(f=d.length;k<f;++k)if(!1===d[k](a))return;for(k=0;k<m;++k)if(f=
  786. c[k],l={},h=f[0](a,l))return h instanceof CKEDITOR.htmlParser.element&&(a=h),a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(l)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,f[1]]),!1}}}}function v(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function w(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];
  787. if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||d.remove();return w(e,b,c)}}a.add(c,b)}function x(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function Q(a){return a.hasAttribute("data-cke-temp")}function n(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),d.filter&&
  788. e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function S(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function T(a,b){return CKEDITOR.tools.trim(b)}function L(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;
  789. b.on("dragstart",function(c){var e=c.data.target;g.isDomDragHandler(e)&&(e=a.getByElement(e),c.data.dataTransfer.setData("cke/widget-id",e.id),b.focus(),e.focus())});b.on("drop",function(c){var e=c.data.dataTransfer,f=e.getData("cke/widget-id"),h=e.getTransferType(b),e=b.createRange();""!==f&&h===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c.cancel():""!==f&&h==CKEDITOR.DATA_TRANSFER_INTERNAL&&(f=a.instances[f])&&(e.setStartBefore(f.wrapper),e.setEndAfter(f.wrapper),c.data.dragRange=e,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,
  790. delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",b.editable().getHtmlFromRange(e).getHtml()),b.widgets.destroy(f,!0))});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(c){if(!c.is(CKEDITOR.dtd.$listItem)&&c.is(CKEDITOR.dtd.$block)&&!g.isDomNestedEditable(c)&&!a._.draggedWidget.wrapper.contains(c)){var b=g.getNestedEditable(d,c);if(b){c=a._.draggedWidget;if(a.getByElement(b)==
  791. c)return;b=CKEDITOR.filter.instances[b.data("cke-filter")];c=c.requiredContent;if(b&&c&&!b.check(c))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function J(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,f;c.attachListener(d,
  792. "mousedown",function(c){var d=c.data.getTarget();if(!d.type)return!1;e=a.getByElement(d);f=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=e&&b.getSelection().removeAllRanges()):g.getNestedEditable(e.wrapper,d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){f&&e&&e.wrapper&&(f=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&
  793. c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(c){var b=a.getByElement(c.data.element);if(b&&!g.getNestedEditable(b.wrapper,c.data.element))return b.fire("doubleclick",{element:c.data.element})},null,null,1)}function K(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),
  794. c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function M(a){function b(c){a.focused&&y(a.focused,"cut"==c.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function I(a){var b=a.editor;b.on("selectionCheck",function(){a.fire("checkSelection")});
  795. a.on("checkSelection",a.checkSelection,a);b.on("selectionChange",function(c){var d=(c=g.getNestedEditable(b.editable(),c.data.selection.getStartElement()))&&a.getByElement(c),e=a.widgetHoldingFocusedEditable;e?e===d&&e.focusedEditable.equals(c)||(n(a,e,null),d&&c&&n(a,d,c)):d&&c&&n(a,d,c)});b.on("dataReady",function(){z(a).commit()});b.on("blur",function(){var c;(c=a.focused)&&t(a,c);(c=a.widgetHoldingFocusedEditable)&&n(a,c,null)})}function G(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var e=
  796. CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=e;c[e]=f;b.data.dataValue.forEach(function(c){var b=c.attributes,d;if("data-cke-widget-id"in b){if(b=a.instances[b["data-cke-widget-id"]])d=c.getFirst(g.isParserWidgetElement),f.push({wrapper:c,element:d,widget:b,editables:{}}),"1"!=d.attributes["data-cke-widget-keep-attr"]&&delete d.attributes["data-widget"]}else if("data-cke-widget-editable"in b)return f[f.length-1].editables[b["data-cke-widget-editable"]]=c,!1},CKEDITOR.NODE_ELEMENT,
  797. !0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId){a=c[a.data.downcastingSessionId];for(var b,f,h,g,k,m;b=a.shift();){f=b.widget;h=b.element;g=f._.downcastFn&&f._.downcastFn.call(f,h);for(m in b.editables)k=b.editables[m],delete k.attributes.contenteditable,k.setHtml(f.editables[m].getData());g||(g=h);b.wrapper.replaceWith(g)}}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function F(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=R(a),h;
  798. for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);h=d.toBeWrapped.pop();){var l=h[0],k=l.parent;k.type==CKEDITOR.NODE_ELEMENT&&k.attributes["data-cke-widget-wrapper"]&&k.replaceWith(l);a.wrapElement(h[0],h[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&g.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&g.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),
  799. f,h,l=0,k=c.count();l<k;++l)f=c.getItem(l),h=f.getFirst(g.isDomWidgetElement),h.type==CKEDITOR.NODE_ELEMENT&&h.data("widget")?(h.replace(f),a.wrapElement(h)):f.remove();d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(U,T);a.range&&(a=g.getNestedEditable(b.editable(),a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&
  800. b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}function z(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.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&&
  801. (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],
  802. 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);
  803. 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||
  804. 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(),
  805. 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,
  806. 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,
  807. 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=
  808. 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;
  809. 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"==
  810. 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",
  811. 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);
  812. 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}")},
  813. 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]=
  814. 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===
  815. 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<e;++f)(c=this.getByElement(d.getItem(f),
  816. !0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&g.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(a){return a.is(b)&&a.data("cke-widget-id")}var b={div:1,span:1};return function(b,d){if(!b)return null;var e=a(b);if(!d&&!e){var f=this.editor.editable();do b=b.getParent();while(b&&!b.equals(f)&&!(e=a(b)))}return this.instances[e]||null}}(),
  817. initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new g(this,this._.nextId++,a,b,c),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");for(var b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(g.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=
  818. Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var c=null,d,e;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");d=this.registered[b];if(!d)return null;
  819. if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);e=x(d,a.getName());c=new CKEDITOR.dom.element(e?"span":"div");c.setAttributes(v(e,b));c.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(!0)&&c.replace(a);a.appendTo(c)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"];d=this.registered[b];
  820. if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&&c.attributes["data-cke-widget-wrapper"])return c;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);b&&(a.attributes["data-widget"]=b);e=x(d,a.name);c=new CKEDITOR.htmlParser.element(e?"span":"div",v(e,b));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var f;d&&(f=a.getIndex(),a.remove());c.add(a);d&&w(d,f,c)}return c},_tests_createEditableFilter:u};
  821. CKEDITOR.event.implementOn(p.prototype);g.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(g.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){A(this,a,1)},checkStyleActive:function(a){a=B(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&&this.element.removeAttribute("data-widget"),
  822. this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(a,b){var c=this.editables[a];c.removeListener("focus",E);c.removeListener("blur",D);this.editor.focusManager.remove(c);b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),c.removeAttributes(["contenteditable","data-cke-widget-editable",
  823. "data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var d,e;!1!==b.fire("dialog",a)&&(d=a.on("show",function(){a.setupContent(b)}),e=a.on("ok",function(){var d,e=b.on("data",function(a){d=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);e.removeListener();d&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){d.removeListener();
  824. e.removeListener()}))});return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(a,b){var c=this._findOneNotNested(b.selector);return c&&c.is(CKEDITOR.dtd.$editable)?(c=new q(this.editor,c,{filter:u.call(this.repository,this.name,a,b)}),this.editables[a]=c,c.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":c.enterMode}),c.filter&&
  825. c.data("cke-filter",c.filter.id),c.addClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),b.pathName&&c.data("cke-display-name",b.pathName),this.editor.focusManager.add(c),c.on("focus",E,this),CKEDITOR.env.ie&&c.on("blur",D,this),c._.initialSetData=!0,c.setData(c.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=a.getItem(d),c=b.getAscendant(g.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper||
  826. !this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(g.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){A(this,a,0)},setData:function(a,b){var c=this.data,d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=
  827. e[a])}d&&this.dataReady&&(r(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset,b={x:b.offsetLeft,y:b.offsetTop-15};c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),
  828. a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px",display:"block"}),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(g.prototype);g.getNestedEditable=function(a,b){return!b||b.equals(a)?null:g.isDomNestedEditable(b)?b:g.getNestedEditable(a,b.getParent())};g.isDomDragHandler=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};g.isDomDragHandlerContainer=function(a){return a.type==
  829. CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};g.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};g.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};g.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};g.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};
  830. g.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};g.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";q.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData||this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},
  831. getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var U=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*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(){}
  832. 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,
  833. 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();
  834. 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};}());
  835. if (typeof CKEDITOR !== 'undefined') {
  836. CKEDITOR.disableAutoInline = true;
  837. }
  838. }
  839. "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<o.length;n++){var a=o[n].src.match(e.regexBasePath);if(a){t=a[1];break}}if(t.indexOf(":/")===-1&&"//"!==t.slice(0,2)&&(t=0===t.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+t:location.href.match(/^[^\?]*\/(?:)/)[0]+t),!t)throw'The AlloyEditor installation path could not be automatically detected. Please set the global variable "ALLOYEDITOR_BASEPATH" before creating editor instances.';return t},loadLanguageResources:function(t){if(e.implementEventTarget(),e.Lang.isFunction(t)&&(e.Strings?setTimeout(t,0):e.once("languageResourcesLoaded",t)),!e._langResourceRequested){e._langResourceRequested=!0;var o=["af","ar","bg","bn","bs","ca","cs","cy","da","de","el","en-au","en-ca","en-gb","en","eo","es","et","eu","fa","fi","fo","fr-ca","fr","gl","gu","he","hi","hr","hu","id","is","it","ja","ka","km","ko","ku","lt","lv","mk","mn","ms","nb","nl","no","pl","pt-br","pt","ro","ru","si","sk","sl","sq","sr-latn","sr","sv","th","tr","tt","ug","uk","vi","zh-cn","zh"],n=navigator.language||navigator.userLanguage||"en",a=n.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),r=a[1],i=a[2];o.indexOf(r+"-"+i)>=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}();
  840. !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;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";var r=e(35),o=e(45),a=e(63),i=e(23),u=e(106),s={};i(s,a),i(s,{findDOMNode:u("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:u("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:u("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:u("renderToString","ReactDOMServer","react-dom/server",o,o.renderToString),renderToStaticMarkup:u("renderToStaticMarkup","ReactDOMServer","react-dom/server",o,o.renderToStaticMarkup)}),s.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,t.exports=s},{106:106,23:23,35:35,45:45,63:63}],2:[function(e,t,n){"use strict";var r=e(65),o=e(108),a=e(138),i={componentDidMount:function(){this.props.autoFocus&&a(o(this))}},u={Mixin:i,focusDOMComponent:function(){a(r.getNode(this._rootNodeID))}};t.exports=u},{108:108,138:138,65:65}],3:[function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function a(e){switch(e){case P.topCompositionStart:return I.compositionStart;case P.topCompositionEnd:return I.compositionEnd;case P.topCompositionUpdate:return I.compositionUpdate}}function i(e,t){return e===P.topKeyDown&&t.keyCode===_}function u(e,t){switch(e){case P.topKeyUp:return-1!==b.indexOf(t.keyCode);case P.topKeyDown:return t.keyCode!==_;case P.topKeyPress:case P.topMouseDown:case P.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r,o){var l,c;if(E?l=a(e):S?u(e,r)&&(l=I.compositionEnd):i(e,r)&&(l=I.compositionStart),!l)return null;M&&(S||l!==I.compositionStart?l===I.compositionEnd&&S&&(c=S.getData()):S=m.getPooled(t));var p=g.getPooled(l,n,r,o);if(c)p.data=c;else{var d=s(r);null!==d&&(p.data=d)}return h.accumulateTwoPhaseDispatches(p),p}function c(e,t){switch(e){case P.topCompositionEnd:return s(t);case P.topKeyPress:var n=t.which;return n!==N?null:(R=!0,w);case P.topTextInput:var r=t.data;return r===w&&R?null:r;default:return null}}function p(e,t){if(S){if(e===P.topCompositionEnd||u(e,t)){var n=S.getData();return m.release(S),S=null,n}return null}switch(e){case P.topPaste:return null;case P.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case P.topCompositionEnd:return M?null:t.data;default:return null}}function d(e,t,n,r,o){var a;if(a=D?c(e,r):p(e,r),!a)return null;var i=y.getPooled(I.beforeInput,n,r,o);return i.data=a,h.accumulateTwoPhaseDispatches(i),i}var f=e(15),h=e(19),v=e(130),m=e(20),g=e(90),y=e(94),C=e(148),b=[9,13,27,32],_=229,E=v.canUseDOM&&"CompositionEvent"in window,x=null;v.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var D=v.canUseDOM&&"TextEvent"in window&&!x&&!r(),M=v.canUseDOM&&(!E||x&&x>8&&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;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{144:144,23:23,24:24}],7:[function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(I.change,S,e,D(e));b.accumulateTwoPhaseDispatches(t),E.batchedUpdates(a,t)}function a(e){C.enqueueEvents(e),C.processEventQueue(!1)}function i(e,t){R=e,S=t,R.attachEvent("onchange",o)}function u(){R&&(R.detachEvent("onchange",o),R=null,S=null)}function s(e,t,n){return e===P.topChange?n:void 0}function l(e,t,n){e===P.topFocus?(u(),i(t,n)):e===P.topBlur&&u()}function c(e,t){R=e,S=t,T=e.value,k=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(R,"value",L),R.attachEvent("onpropertychange",d)}function p(){R&&(delete R.value,R.detachEvent("onpropertychange",d),R=null,S=null,T=null,k=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==T&&(T=t,o(e))}}function f(e,t,n){return e===P.topInput?n:void 0}function h(e,t,n){e===P.topFocus?(p(),c(t,n)):e===P.topBlur&&p()}function v(e,t,n){return e!==P.topSelectionChange&&e!==P.topKeyUp&&e!==P.topKeyDown||!R||R.value===T?void 0:(T=R.value,S)}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===P.topClick?n:void 0}var y=e(15),C=e(16),b=e(19),_=e(130),E=e(83),x=e(92),D=e(114),M=e(119),N=e(120),w=e(148),P=y.topLevelTypes,I={change:{phasedRegistrationNames:{bubbled:w({onChange:null}),captured:w({onChangeCapture:null})},dependencies:[P.topBlur,P.topChange,P.topClick,P.topFocus,P.topInput,P.topKeyDown,P.topKeyUp,P.topSelectionChange]}},R=null,S=null,T=null,k=null,O=!1;_.canUseDOM&&(O=M("change")&&(!("documentMode"in document)||document.documentMode>8));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;p<e.length;p++)if(n=e[p],n.type===a.MOVE_EXISTING||n.type===a.REMOVE_NODE){var d=n.fromIndex,f=n.parentNode.childNodes[d],h=n.parentID;f?void 0:l(!1),i=i||{},i[h]=i[h]||[],i[h][d]=f,c=c||[],c.push(f)}var v;if(v=t.length&&"string"==typeof t[0]?o.dangerouslyRenderMarkup(t):t,c)for(var m=0;m<c.length;m++)c[m].parentNode.removeChild(c[m]);for(var g=0;g<e.length;g++)switch(n=e[g],n.type){case a.INSERT_MARKUP:r(n.parentNode,v[n.markupIndex],n.toIndex);break;case a.MOVE_EXISTING:r(n.parentNode,i[n.parentID][n.fromIndex],n.toIndex);break;case a.SET_MARKUP:u(n.parentNode,n.content);break;case a.TEXT_CONTENT:s(n.parentNode,n.content);break;case a.REMOVE_NODE:}}};i.measureMethods(c,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),t.exports=c},{12:12,124:124,125:125,144:144,67:67,71:71}],10:[function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=e(144),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){u.properties.hasOwnProperty(p)?o(!1):void 0;var d=p.toLowerCase(),f=n[p],h={attributeName:d,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(f,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasSideEffects:r(f,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?o(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?o(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o(!1),s.hasOwnProperty(p)){var v=s[p];h.attributeName=v}i.hasOwnProperty(p)&&(h.attributeNamespace=i[p]),l.hasOwnProperty(p)&&(h.propertyName=l[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),u.properties[p]=h}}},i={},u={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){var n=u._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=i[e];return r||(i[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:a};t.exports=u},{144:144}],11:[function(e,t,n){"use strict";function r(e){return c.hasOwnProperty(e)?!0:l.hasOwnProperty(e)?!1:s.test(e)?(c[e]=!0,!0):(l[e]=!0,!1)}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&1>t||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<e.length;p++)e[p]?void 0:s(!1),t=r(e[p]),t=u(t)?t:"*",n[t]=n[t]||[],n[t][p]=e[p];var d=[],f=0;for(t in n)if(n.hasOwnProperty(t)){var h,v=n[t];for(h in v)if(v.hasOwnProperty(h)){var m=v[h];v[h]=m.replace(l,"$1 "+c+'="'+h+'" ')}for(var g=a(v.join(""),i),y=0;y<g.length;++y){var C=g[y];C.hasAttribute&&C.hasAttribute(c)&&(h=+C.getAttribute(c),C.removeAttribute(c),d.hasOwnProperty(h)?s(!1):void 0,d[h]=C,f+=1)}}return f!==d.length?s(!1):void 0,d.length!==e.length?s(!1):void 0,d},dangerouslyReplaceNodeWithMarkup:function(e,t){o.canUseDOM?void 0:s(!1),t?void 0:s(!1),"html"===e.tagName.toLowerCase()?s(!1):void 0;var n;n="string"==typeof t?a(t,i)[0]:t,e.parentNode.replaceChild(n,e)}};t.exports=p},{130:130,135:135,136:136,140:140,144:144}],13:[function(e,t,n){"use strict";var r=e(148),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];t.exports=o},{148:148}],14:[function(e,t,n){"use strict";var r=e(15),o=e(19),a=e(96),i=e(65),u=e(148),s=r.topLevelTypes,l=i.getFirstReactDOM,c={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r,u){if(e===s.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var d;if(t.window===t)d=t;else{var f=t.ownerDocument;d=f?f.defaultView||f.parentWindow:window}var h,v,m="",g="";if(e===s.topMouseOut?(h=t,m=n,v=l(r.relatedTarget||r.toElement),v?g=i.getID(v):v=d,v=v||d):(h=d,v=t,g=n),h===v)return null;var y=a.getPooled(c.mouseLeave,m,r,u);y.type="mouseleave",y.target=h,y.relatedTarget=v;var C=a.getPooled(c.mouseEnter,g,r,u);return C.type="mouseenter",C.target=v,C.relatedTarget=h,o.accumulateEnterLeaveDispatches(y,C,m,g),p[0]=y,p[1]=C,p}};t.exports=d},{148:148,15:15,19:19,65:65,96:96}],15:[function(e,t,n){"use strict";var r=e(147),o=r({bubbled:null,captured:null}),a=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),i={topLevelTypes:a,PropagationPhases:o};t.exports=i},{147:147}],16:[function(e,t,n){"use strict";var r=e(17),o=e(18),a=e(56),i=e(102),u=e(110),s=e(144),l=(e(155),{}),c=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return p(e,!0)},f=function(e){return p(e,!1)},h=null,v={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){h=e},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?s(!1):void 0;var o=l[t]||(l[t]={});o[e]=n;var a=r.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];o&&delete o[e]},deleteAllListeners:function(e){for(var t in l)if(l[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e]}},extractEvents:function(e,t,n,o,a){for(var u,s=r.plugins,l=0;l<s.length;l++){var c=s[l];if(c){var p=c.extractEvents(e,t,n,o,a);p&&(u=i(u,p))}}return u},enqueueEvents:function(e){e&&(c=i(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,d):u(t,f),c?s(!1):void 0,a.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};t.exports=v},{102:102,110:110,144:144,155:155,17:17,18:18,56:56}],17:[function(e,t,n){"use strict";function r(){if(u)for(var e in s){var t=s[e],n=u.indexOf(e);if(n>-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;o<n.length&&!e.isPropagationStopped();o++)i(e,t,n[o],r[o]);else n&&i(e,t,n,r);e._dispatchListeners=null,e._dispatchIDs=null}function s(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=s(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;Array.isArray(t)?h(!1):void 0;var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e(15),f=e(56),h=e(144),v=(e(155),{Mount:null,injectMount:function(e){v.Mount=e}}),m=d.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:a,executeDirectDispatch:c,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,getNode:function(e){return v.Mount.getNode(e)},getID:function(e){return v.Mount.getID(e)},injection:v};t.exports=g},{144:144,15:15,155:155,56:56}],19:[function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function o(e,t,n){var o=t?g.bubbled:g.captured,a=r(e,n,o);a&&(n._dispatchListeners=v(n._dispatchListeners,a),n._dispatchIDs=v(n._dispatchIDs,e))}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,o,e)}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=y(e,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchIDs=v(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e.dispatchMarker,null,e)}function l(e){m(e,a)}function c(e){m(e,i)}function p(e,t,n,r){h.injection.getInstanceHandle().traverseEnterLeave(n,r,u,e,t)}function d(e){m(e,s)}var f=e(15),h=e(16),v=(e(155),e(102)),m=e(110),g=f.PropagationPhases,y=h.getListener,C={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};t.exports=C},{102:102,110:110,15:15,155:155,16:16}],20:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e(24),a=e(23),i=e(117);a(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),a=o.length;for(e=0;r>e&&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<arguments.length;o++){var a=arguments[o];if(null!=a){var i=Object(a);for(var u in i)r.call(i,u)&&(n[u]=i[u])}}return n}t.exports=r},{}],24:[function(e,t,n){"use strict";var r=e(144),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},s=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,p=o,d=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=l,n},f={addPoolingTo:d,oneArgumentPooler:o,twoArgumentPooler:a,threeArgumentPooler:i,fourArgumentPooler:u,fiveArgumentPooler:s};t.exports=f},{144:144}],25:[function(e,t,n){"use strict";var r=(e(62),e(108)),o=(e(155),"_getDOMNodeDidWarn"),a={getDOMNode:function(){return this.constructor[o]=!0,r(this)}};t.exports=a},{108:108,155:155,62:62}],26:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,d[e[m]]={}),d[e[m]]}var o=e(15),a=e(16),i=e(17),u=e(57),s=e(71),l=e(101),c=e(23),p=e(119),d={},f=!1,h=0,v={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",
  841. topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),g=c({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,a=r(n),u=i.registrationNameDependencies[e],s=o.topLevelTypes,l=0;l<u.length;l++){var c=u[l];a.hasOwnProperty(c)&&a[c]||(c===s.topWheel?p("wheel")?g.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?g.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):c===s.topScroll?p("scroll",!0)?g.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):c===s.topFocus||c===s.topBlur?(p("focus",!0)?(g.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(g.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),a[s.topBlur]=!0,a[s.topFocus]=!0):v.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,v[c],n),a[c]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!f){var e=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),f=!0}},eventNameDispatchConfigs:a.eventNameDispatchConfigs,registrationNameModules:a.registrationNameModules,putListener:a.putListener,getListener:a.getListener,deleteListener:a.deleteListener,deleteAllListeners:a.deleteAllListeners});s.measureMethods(g,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"}),t.exports=g},{101:101,119:119,15:15,16:16,17:17,23:23,57:57,71:71}],27:[function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=a(t,null))}var o=e(76),a=e(118),i=e(126),u=e(127),s=(e(155),{instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return u(e,r,o),o},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var u;for(u in t)if(t.hasOwnProperty(u)){var s=e&&e[u],l=s&&s._currentElement,c=t[u];if(null!=s&&i(l,c))o.receiveComponent(s,c,n,r),t[u]=s;else{s&&o.unmountComponent(s,u);var p=a(c,null);t[u]=p}}for(u in e)!e.hasOwnProperty(u)||t&&t.hasOwnProperty(u)||o.unmountComponent(e[u]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];o.unmountComponent(n)}}});t.exports=s},{118:118,126:126,127:127,155:155,76:76}],28:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"//")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,a,r),o.release(r)}function u(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,u=e.context,s=i.call(u,t,e.count++);Array.isArray(s)?l(s,o,n,m.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,a+(s!==t?r(s.key||"")+"/":"")+n)),o.push(s))}function l(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var l=u.getPooled(t,i,o,a);g(e,s,l),u.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return l(e,t,null,m.thatReturnsArgument),t}var h=e(24),v=e(52),m=e(136),g=e(127),y=h.twoArgumentPooler,C=h.fourArgumentPooler,b=/\/(?!\/)/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,C);var _={forEach:i,map:c,mapIntoWithKeyPrefixInternal:l,count:d,toArray:f};t.exports=_},{127:127,136:136,24:24,52:52}],29:[function(e,t,n){"use strict";function r(e,t){var n=E.hasOwnProperty(t)?E[t]:null;D.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?m(!1):void 0),e.hasOwnProperty(t)&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?m(!1):void 0)}function o(e,t){if(t){"function"==typeof t?m(!1):void 0,d.isValidElement(t)?m(!1):void 0;var n=e.prototype;t.hasOwnProperty(C)&&x.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==C){var a=t[o];if(r(n,o),x.hasOwnProperty(o))x[o](e,a);else{var i=E.hasOwnProperty(o),l=n.hasOwnProperty(o),c="function"==typeof a,p=c&&!i&&!l&&t.autobind!==!1;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=a,n[o]=a;else if(l){var f=E[o];!i||f!==b.DEFINE_MANY_MERGED&&f!==b.DEFINE_MANY?m(!1):void 0,f===b.DEFINE_MANY_MERGED?n[o]=u(n[o],a):f===b.DEFINE_MANY&&(n[o]=s(n[o],a))}else n[o]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in x;o?m(!1):void 0;var a=n in e;a?m(!1):void 0,e[n]=r}}}function i(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=l(e,n)}}var p=e(30),d=e(52),f=(e(73),e(72),e(69)),h=e(23),v=e(137),m=e(144),g=e(147),y=e(148),C=(e(155),y({mixins:null})),b=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],E={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},x={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=h({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=h({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=h({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},D={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(e,t){this.updater.enqueueSetProps(this,e),t&&this.updater.enqueueCallback(this,t)},replaceProps:function(e,t){this.updater.enqueueReplaceProps(this,e),t&&this.updater.enqueueCallback(this,t)}},M=function(){};h(M.prototype,p.prototype,D);var N={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindMap&&c(this),this.props=e,this.context=t,this.refs=v,this.updater=n||f,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?m(!1):void 0,this.state=r};t.prototype=new M,t.prototype.constructor=t,_.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:m(!1);for(var n in E)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){_.push(e)}}};t.exports=N},{137:137,144:144,147:147,148:148,155:155,23:23,30:30,52:52,69:69,72:72,73:73}],30:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||o}var o=e(69),a=(e(104),e(137)),i=e(144);e(155);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?i(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e)};t.exports=r},{104:104,137:137,144:144,155:155,69:69}],31:[function(e,t,n){"use strict";var r=e(40),o=e(65),a={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};t.exports=a},{40:40,65:65}],32:[function(e,t,n){"use strict";var r=e(144),o=!1,a={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r(!1):void 0,a.unmountIDFromEnvironment=e.unmountIDFromEnvironment,a.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,a.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=a},{144:144}],33:[function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function o(e){}var a=e(32),i=e(34),u=e(52),s=e(62),l=e(71),c=e(73),p=(e(72),e(76)),d=e(82),f=e(23),h=e(137),v=e(144),m=e(126);e(155);o.prototype.render=function(){var e=s.get(this)._currentElement.type;return e(this.props,this.context,this.updater)};var g=1,y={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=g++,this._rootNodeID=e;var r,a,i=this._processProps(this._currentElement.props),l=this._processContext(n),c=this._currentElement.type,f="prototype"in c;f&&(r=new c(i,l,d)),(!f||null===r||r===!1||u.isValidElement(r))&&(a=r,r=new o(c)),r.props=i,r.context=l,r.refs=h,r.updater=d,this._instance=r,s.set(r,this);var m=r.state;void 0===m&&(r.state=m=null),"object"!=typeof m||Array.isArray(m)?v(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===a&&(a=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(a);var y=p.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return r.componentDidMount&&t.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),p.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,s.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return h;t={};for(var o in r)t[o]=e[o];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?v(!1):void 0;for(var o in r)o in t.childContextTypes?void 0:v(!1);return f({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var o=this.getName();for(var a in e)if(e.hasOwnProperty(a)){var i;try{"function"!=typeof e[a]?v(!1):void 0,i=e[a](t,a,o,n)}catch(u){i=u}if(i instanceof Error){r(this);n===c.prop}}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&p.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,o){var a,i=this._instance,u=this._context===o?i.context:this._processContext(o);t===n?a=n.props:(a=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(a,u));var s=this._processPendingState(a,u),l=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(a,s,u);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,s,u,e,o)):(this._currentElement=n,this._context=o,i.props=a,i.state=s,i.context=u)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var a=f({},o?r[0]:n.state),i=o?1:0;i<r.length;i++){var u=r[i];f(a,"function"==typeof u?u.call(n,a,e,t):u)}return a},_performComponentUpdate:function(e,t,n,r,o,a){var i,u,s,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(i=l.props,u=l.state,s=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=a,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,a),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,i,u,s),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(m(r,o))p.receiveComponent(n,o,e,this._processChildContext(t));else{var a=this._rootNodeID,i=n._rootNodeID;p.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(o);var u=p.mountComponent(this._renderedComponent,a,e,this._processChildContext(t));this._replaceNodeWithMarkupByID(i,u)}},_replaceNodeWithMarkupByID:function(e,t){a.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;i.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{i.current=null}return null===e||e===!1||u.isValidElement(e)?void 0:v(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?v(!1):void 0;var r=t.getPublicInstance(),o=n.refs===h?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return e instanceof o?null:e},_instantiateReactComponent:null};l.measureMethods(y,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var C={Mixin:y};t.exports=C},{126:126,137:137,144:144,155:155,23:23,32:32,34:34,52:52,62:62,71:71,72:72,73:73,76:76,82:82}],34:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],35:[function(e,t,n){"use strict";var r=e(34),o=e(46),a=e(49),i=e(61),u=e(65),s=e(71),l=e(76),c=e(83),p=e(84),d=e(108),f=e(123);e(155);a.inject();var h=s.measure("React","render",u.render),v={findDOMNode:d,render:h,unmountComponentAtNode:u.unmountComponentAtNode,version:p,unstable_batchedUpdates:c.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:r,InstanceHandles:i,Mount:u,Reconciler:l,TextComponent:o});t.exports=v},{108:108,123:123,130:130,155:155,34:34,46:46,49:49,61:61,65:65,71:71,76:76,83:83,84:84}],36:[function(e,t,n){"use strict";var r={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},o={getNativeProps:function(e,t,n){if(!t.disabled)return t;var o={};for(var a in t)t.hasOwnProperty(a)&&!r[a]&&(o[a]=t[a]);return o}};t.exports=o},{}],37:[function(e,t,n){"use strict";function r(){return this}function o(){var e=this._reactInternalComponent;return!!e}function a(){}function i(e,t){var n=this._reactInternalComponent;n&&(T.enqueueSetPropsInternal(n,e),t&&T.enqueueCallbackInternal(n,t))}function u(e,t){var n=this._reactInternalComponent;n&&(T.enqueueReplacePropsInternal(n,e),t&&T.enqueueCallbackInternal(n,t))}function s(e,t){t&&(null!=t.dangerouslySetInnerHTML&&(null!=t.children?L(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&Y in t.dangerouslySetInnerHTML?void 0:L(!1)),null!=t.style&&"object"!=typeof t.style?L(!1):void 0)}function l(e,t,n,r){var o=I.findReactContainerForID(e);if(o){var a=o.nodeType===z?o.ownerDocument:o;j(t,a)}r.getReactMountReady().enqueue(c,{id:e,registrationName:t,listener:n})}function c(){var e=this;E.putListener(e.id,e.registrationName,e.listener)}function p(){var e=this;e._rootNodeID?void 0:L(!1);var t=I.getNode(e._rootNodeID);switch(t?void 0:L(!1),e._tag){case"iframe":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(_.topLevelTypes[n],G[n],t));break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topError,"error",t),E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topReset,"reset",t),E.trapBubbledEvent(_.topLevelTypes.topSubmit,"submit",t)]}}function d(){M.mountReadyWrapper(this)}function f(){w.postUpdateWrapper(this)}function h(e){J.call(Z,e)||($.test(e)?void 0:L(!1),Z[e]=!0)}function v(e,t){return e.indexOf("-")>=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+"</"+this._currentElement.type+">"}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;s<u.length;s++)r.appendChild(u[s])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var o=t.props,a=this._currentElement.props;switch(this._tag){case"button":o=D.getNativeProps(this,o),a=D.getNativeProps(this,a);break;case"input":M.updateWrapper(this),o=M.getNativeProps(this,o),a=M.getNativeProps(this,a);break;case"option":o=N.getNativeProps(this,o),a=N.getNativeProps(this,a);break;case"select":o=w.getNativeProps(this,o),a=w.getNativeProps(this,a);break;case"textarea":P.updateWrapper(this),o=P.getNativeProps(this,o),a=P.getNativeProps(this,a)}s(this,a),this._updateDOMProperties(o,a,e,null),this._updateDOMChildren(o,a,e,r),!O&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=a),"select"===this._tag&&e.getReactMountReady().enqueue(f,this)},_updateDOMProperties:function(e,t,n,r){var o,a,i;for(o in e)if(!t.hasOwnProperty(o)&&e.hasOwnProperty(o))if(o===q){var u=this._previousStyleCopy;for(a in u)u.hasOwnProperty(a)&&(i=i||{},i[a]="");this._previousStyleCopy=null}else W.hasOwnProperty(o)?e[o]&&V(this._rootNodeID,o):(C.properties[o]||C.isCustomAttribute(o))&&(r||(r=I.getNode(this._rootNodeID)),b.deleteValueForProperty(r,o));for(o in t){var s=t[o],c=o===q?this._previousStyleCopy:e[o];if(t.hasOwnProperty(o)&&s!==c)if(o===q)if(s?s=this._previousStyleCopy=k({},s):this._previousStyleCopy=null,c){for(a in c)!c.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(i=i||{},i[a]="");for(a in s)s.hasOwnProperty(a)&&c[a]!==s[a]&&(i=i||{},i[a]=s[a])}else i=s;else W.hasOwnProperty(o)?s?l(this._rootNodeID,o,s,n):c&&V(this._rootNodeID,o):v(this._tag,t)?(r||(r=I.getNode(this._rootNodeID)),o===H&&(s=null),b.setValueForAttribute(r,o,s)):(C.properties[o]||C.isCustomAttribute(o))&&(r||(r=I.getNode(this._rootNodeID)),null!=s?b.setValueForProperty(r,o,s):b.deleteValueForProperty(r,o))}i&&(r||(r=I.getNode(this._rootNodeID)),y.setValueForStyles(r,i))},_updateDOMChildren:function(e,t,n,r){var o=K[typeof e.children]?e.children:null,a=K[typeof t.children]?t.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=a?null:t.children,c=null!=o||null!=i,p=null!=a||null!=u;null!=s&&null==l?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=a?o!==a&&this.updateTextContent(""+a):null!=u?i!==u&&this.updateMarkup(""+u):null!=l&&this.updateChildren(l,n,r)},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var e=this._wrapperState.listeners;if(e)for(var t=0;t<e.length;t++)e[t].remove();break;case"input":M.unmountWrapper(this);break;case"html":case"head":case"body":L(!1)}if(this.unmountChildren(),E.deleteAllListeners(this._rootNodeID),x.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties){var n=this._nodeWithLegacyProperties;n._reactInternalComponent=null,this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var e=I.getNode(this._rootNodeID);e._reactInternalComponent=this,e.getDOMNode=r,e.isMounted=o,e.setState=a,e.replaceState=a,e.forceUpdate=a,e.setProps=i,e.replaceProps=u,e.props=this._currentElement.props,this._nodeWithLegacyProperties=e}return this._nodeWithLegacyProperties}},S.measureMethods(m,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),k(m.prototype,m.Mixin,R.Mixin),t.exports=m},{10:10,104:104,107:107,11:11,119:119,124:124,125:125,128:128,144:144,148:148,15:15,153:153,155:155,2:2,23:23,26:26,31:31,36:36,41:41,42:42,43:43,47:47,5:5,65:65,66:66,71:71,82:82}],38:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e(52),a=(e(53),e(149)),i=a({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=i},{149:149,52:52,53:53}],39:[function(e,t,n){"use strict";var r={useCreateElement:!1};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(65),i=e(71),u=e(144),s={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(e,t,n){var r=a.getNode(e);s.hasOwnProperty(t)?u(!1):void 0,null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);r.processUpdates(e,t)}};i.measureMethods(l,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=l},{11:11,144:144,65:65,71:71,9:9}],41:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);s.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=u.getNode(this._rootNodeID),l=a;l.parentNode;)l=l.parentNode;for(var d=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<d.length;f++){var h=d[f];if(h!==a&&h.form===a.form){var v=u.getID(h);v?void 0:c(!1);var m=p[v];m?void 0:c(!1),s.asap(r,m)}}}return n}var a=e(40),i=e(22),u=e(65),s=e(83),l=e(23),c=e(144),p={},d={getNativeProps:function(e,t,n){var r=i.getValue(t),o=i.getChecked(t),a=l({},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=r?r:e._wrapperState.initialValue,checked:null!=o?o:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return a},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,onChange:o.bind(e)}},mountReadyWrapper:function(e){p[e._rootNodeID]=e},unmountWrapper:function(e){delete p[e._rootNodeID]},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&a.updatePropertyByID(e._rootNodeID,"checked",n||!1);var r=i.getValue(t);null!=r&&a.updatePropertyByID(e._rootNodeID,"value",""+r)}};t.exports=d},{144:144,22:22,23:23,40:40,65:65,83:83}],42:[function(e,t,n){"use strict";var r=e(28),o=e(43),a=e(23),i=(e(155),o.valueContextKey),u={mountWrapper:function(e,t,n){var r=n[i],o=null;if(null!=r)if(o=!1,Array.isArray(r)){for(var a=0;a<r.length;a++)if(""+r[a]==""+t.value){o=!0;break}}else o=""+r==""+t.value;e._wrapperState={selected:o}},getNativeProps:function(e,t,n){var o=a({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(o.selected=e._wrapperState.selected);var i="";return r.forEach(t.children,function(e){null!=e&&("string"==typeof e||"number"==typeof e)&&(i+=e)}),o.children=i,o}};t.exports=u},{155:155,23:23,28:28,43:43}],43:[function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=i.getValue(e);null!=t&&o(this,e,t)}}function o(e,t,n){var r,o,a=u.getNode(e._rootNodeID).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<a.length;o++){var i=r.hasOwnProperty(a[o].value);a[o].selected!==i&&(a[o].selected=i)}}else{for(r=""+n,o=0;o<a.length;o++)if(a[o].value===r)return void(a[o].selected=!0);a.length&&(a[0].selected=!0)}}function a(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);return this._wrapperState.pendingUpdate=!0,s.asap(r,this),n}var i=e(22),u=e(65),s=e(83),l=e(23),c=(e(155),"__ReactDOMSelect_value$"+Math.random().toString(36).slice(2)),p={valueContextKey:c,getNativeProps:function(e,t,n){return l({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=i.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,onChange:a.bind(e),wasMultiple:Boolean(t.multiple)}},processChildContext:function(e,t,n){var r=l({},n);return r[c]=e._wrapperState.initialValue,r},postUpdateWrapper:function(e){var t=e._currentElement.props;
  842. e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=i.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};t.exports=p},{155:155,22:22,23:23,65:65,83:83}],44:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var a=o.text.length,i=a+r;return{start:a,end:i}}function a(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,a=t.focusNode,i=t.focusOffset,u=t.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(s){return null}var l=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=l?0:u.toString().length,p=u.cloneRange();p.selectNodeContents(e),p.setEnd(u.startContainer,u.startOffset);var d=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),f=d?0:p.toString().length,h=f+c,v=document.createRange();v.setStart(n,o),v.setEnd(a,i);var m=v.collapsed;return{start:m?h:f,end:m?f:h}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.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:"<span "+o.createMarkupForID(e)+">"+u+"</span>"},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():"<root>"},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<e.length;n++){var r=e[n];t+=r.totalTime}return t}function o(e){var t=[];return e.forEach(function(e){Object.keys(e.writes).forEach(function(n){e.writes[n].forEach(function(e){t.push({id:n,type:c[e.type]||e.type,args:e.args})})})}),t}function a(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r],a=s({},o.exclusive,o.inclusive);for(var i in a)t=o.displayNames[i].current,n[t]=n[t]||{componentName:t,inclusive:0,exclusive:0,render:0,count:0},o.render[i]&&(n[t].render+=o.render[i]),o.exclusive[i]&&(n[t].exclusive+=o.exclusive[i]),o.inclusive[i]&&(n[t].inclusive+=o.inclusive[i]),o.counts[i]&&(n[t].count+=o.counts[i])}var u=[];for(t in n)n[t].exclusive>=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<e.length;o++){var a,i=e[o],c=s({},i.exclusive,i.inclusive);t&&(a=u(i));for(var p in c)if(!t||a[p]){var d=i.displayNames[p];n=d.owner+" > "+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;i<n.length;i++)if(0===n[i].indexOf(o)){a=!0;break}e.created[o]&&(a=!0),!a&&e.counts[o]>0&&(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<e.length;n++){var r=e[n];l.isValidElement(r)&&o(r,t)}else if(l.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var a=d(e);if(a&&a!==e.entries)for(var i,u=a.call(e);!(i=u.next()).done;)l.isValidElement(i.value)&&o(i.value,t)}}function u(e,t,n,o){for(var a in t)if(t.hasOwnProperty(a)){var i;try{"function"!=typeof t[a]?f(!1):void 0,i=t[a](n,a,e,o)}catch(u){i=u}if(i instanceof Error&&!(i.message in v)){v[i.message]=!0;r()}}}function s(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&u(n,t.propTypes,e.props,c.prop),"function"==typeof t.getDefaultProps}}var l=e(52),c=e(73),p=(e(72),e(34)),d=(e(104),e(115)),f=e(144),h=(e(155),{}),v={},m={createElement:function(e,t,n){var r="string"==typeof e||"function"==typeof e,o=l.createElement.apply(this,arguments);if(null==o)return o;if(r)for(var a=2;a<arguments.length;a++)i(arguments[a],e);return s(o),o},createFactory:function(e){var t=m.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=l.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)i(arguments[o],r.type);return s(r),r}};t.exports=m},{104:104,115:115,144:144,155:155,34:34,52:52,72:72,73:73}],54:[function(e,t,n){"use strict";var r,o=e(52),a=e(55),i=e(76),u=e(23),s={injectEmptyComponent:function(e){r=o.createElement(e)}},l=function(e){this._currentElement=null,this._rootNodeID=null,this._renderedComponent=e(r)};u(l.prototype,{construct:function(e){},mountComponent:function(e,t,n){return a.registerNullComponentID(e),this._rootNodeID=e,i.mountComponent(this._renderedComponent,e,t,n)},receiveComponent:function(){},unmountComponent:function(e,t,n){i.unmountComponent(this._renderedComponent),a.deregisterNullComponentID(this._rootNodeID),this._rootNodeID=null,this._renderedComponent=null}}),l.injection=s,t.exports=l},{23:23,52:52,55:55,76:76}],55:[function(e,t,n){"use strict";function r(e){return!!i[e]}function o(e){i[e]=!0}function a(e){delete i[e]}var i={},u={isNullComponentID:r,registerNullComponentID:o,deregisterNullComponentID:a};t.exports=u},{}],56:[function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(a){return void(null===o&&(o=a))}}var o=null,a={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};t.exports=a},{}],57:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=e(16),a={handleTopLevel:function(e,t,n,a,i){var u=o.extractEvents(e,t,n,a,i);r(u)}};t.exports=a},{16:16}],58:[function(e,t,n){"use strict";function r(e){var t=d.getID(e),n=p.getReactRootIDFromNodeID(t),r=d.findReactContainerForID(n),o=d.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){i(e)}function i(e){for(var t=d.getFirstReactDOM(v(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0;o<e.ancestors.length;o++){t=e.ancestors[o];var a=d.getID(t)||"";g._handleTopLevel(e.topLevelType,t,a,e.nativeEvent,v(e.nativeEvent))}}function u(e){var t=m(window);e(t)}var s=e(129),l=e(130),c=e(24),p=e(61),d=e(65),f=e(83),h=e(23),v=e(114),m=e(141);h(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){g._handleTopLevel=e},setEnabled:function(e){g._enabled=!!e},isEnabled:function(){return g._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=u.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(a,n)}finally{o.release(n)}}}};t.exports=g},{114:114,129:129,130:130,141:141,23:23,24:24,61:61,65:65,83:83}],59:[function(e,t,n){"use strict";var r=e(10),o=e(16),a=e(32),i=e(29),u=e(54),s=e(26),l=e(68),c=e(71),p=e(78),d=e(83),f={Component:a.injection,Class:i.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventEmitter:s.injection,NativeComponent:l.injection,Perf:c.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{10:10,16:16,26:26,29:29,32:32,54:54,68:68,71:71,78:78,83:83}],60:[function(e,t,n){"use strict";function r(e){return a(document.documentElement,e)}var o=e(44),a=e(133),i=e(138),u=e(139),s={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=u();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=u(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,o),i(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var a=e.createTextRange();a.collapse(!0),a.moveStart("character",n),a.moveEnd("character",r-n),a.select()}else o.setOffsets(e,t)}};t.exports=s},{133:133,138:138,139:139,44:44}],61:[function(e,t,n){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function a(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function i(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function u(e){return e?e.substr(0,e.lastIndexOf(f)):""}function s(e,t){if(a(e)&&a(t)?void 0:d(!1),i(e,t)?void 0:d(!1),e===t)return e;var n,r=e.length+h;for(n=r;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function l(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,i=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++<v?void 0:d(!1)}}var p=e(78),d=e(144),f=".",h=f.length,v=1e4,m={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===f&&e.length>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<n.length;){for(var a,i=n[r++];i;){var u=Q.getID(i);u?t===u?a=i:M.isAncestorIDOf(u,t)&&(n.length=r=0,n.push(i.firstChild)):n.push(i.firstChild),i=i.nextSibling}if(a)return n.length=0,a}n.length=0,L(!1)},_mountImageIntoNode:function(e,t,n,a){if(!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,n){var i=o(t);if(w.canReuseMarkup(e,i))return;var u=i.getAttribute(w.CHECKSUM_ATTR_NAME);i.removeAttribute(w.CHECKSUM_ATTR_NAME);var s=i.outerHTML;i.setAttribute(w.CHECKSUM_ATTR_NAME,u);var l=e,c=r(l,s);" (client) "+l.substring(c-20,c+20)+"\n (server) "+s.substring(c-20,c+20);t.nodeType===W?L(!1):void 0}if(t.nodeType===W?L(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else U(t,e)},ownerDocumentContextKey:H,getReactRootID:a,getID:i,setID:s,getNode:l,getNodeFromInstance:c,isValid:p,purgeID:d};P.measureMethods(Q,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=Q},{10:10,118:118,124:124,126:126,128:128,133:133,137:137,144:144,155:155,23:23,26:26,34:34,39:39,52:52,55:55,61:61,62:62,64:64,71:71,76:76,82:82,83:83}],66:[function(e,t,n){"use strict";function r(e,t,n){m.push({parentID:e,parentNode:null,type:p.INSERT_MARKUP,markupIndex:g.push(t)-1,content:null,fromIndex:null,toIndex:n})}function o(e,t,n){m.push({parentID:e,parentNode:null,type:p.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:t,toIndex:n})}function a(e,t){m.push({parentID:e,parentNode:null,type:p.REMOVE_NODE,markupIndex:null,content:null,fromIndex:t,toIndex:null})}function i(e,t){m.push({parentID:e,parentNode:null,type:p.SET_MARKUP,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function u(e,t){m.push({parentID:e,parentNode:null,type:p.TEXT_CONTENT,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function s(){m.length&&(c.processChildrenUpdates(m,g),l())}function l(){m.length=0,g.length=0}var c=e(32),p=e(67),d=(e(34),e(76)),f=e(27),h=e(109),v=0,m=[],g=[],y={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return f.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r){var o;return o=h(t),f.updateChildren(e,o,n,r)},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var u=r[i],s=this._rootNodeID+i,l=d.mountComponent(u,s,t,n);u._mountIndex=a++,o.push(l)}return o},updateTextContent:function(e){v++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChild(n[r]);this.setTextContent(e),t=!1}finally{v--,v||(t?l():s())}},updateMarkup:function(e){v++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setMarkup(e),t=!1}finally{v--,v||(t?l():s())}},updateChildren:function(e,t,n){v++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{v--,v||(r?l():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=this._reconcilerUpdateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var a,i=0,u=0;for(a in o)if(o.hasOwnProperty(a)){var s=r&&r[a],l=o[a];s===l?(this.moveChild(s,u,i),i=Math.max(s._mountIndex,i),s._mountIndex=u):(s&&(i=Math.max(s._mountIndex,i),this._unmountChild(s)),this._mountChildByNameAtIndex(l,a,u,t,n)),u++}for(a in r)!r.hasOwnProperty(a)||o&&o.hasOwnProperty(a)||this._unmountChild(r[a])}},unmountChildren:function(){var e=this._renderedChildren;f.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){a(this._rootNodeID,e._mountIndex)},setTextContent:function(e){u(this._rootNodeID,e)},setMarkup:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var a=this._rootNodeID+t,i=d.mountComponent(e,a,r,o);e._mountIndex=n,this.createChild(e,i)},_unmountChild:function(e){this.removeChild(e),e._mountIndex=null}}};t.exports=y},{109:109,27:27,32:32,34:34,67:67,76:76}],67:[function(e,t,n){"use strict";var r=e(147),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});t.exports=o},{147:147}],68:[function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=l(t)),n}function o(e){return c?void 0:s(!1),new c(e.type,e.props)}function a(e){return new d(e)}function i(e){return e instanceof d}var u=e(23),s=e(144),l=null,c=null,p={},d=null,f={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){u(p,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:a,isTextComponent:i,injection:f};t.exports=h},{144:144,23:23}],69:[function(e,t,n){"use strict";function r(e,t){}var o=(e(155),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});t.exports=o},{155:155}],70:[function(e,t,n){"use strict";var r=e(144),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t);
  843. }};t.exports=o},{144:144}],71:[function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};t.exports=o},{}],72:[function(e,t,n){"use strict";var r={};t.exports=r},{}],73:[function(e,t,n){"use strict";var r=e(147),o=r({prop:null,context:null,childContext:null});t.exports=o},{147:147}],74:[function(e,t,n){"use strict";function r(e){function t(t,n,r,o,a,i){if(o=o||E,i=i||r,null==n[r]){var u=C[a];return t?new Error("Required "+u+" `"+i+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,a,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if(u!==e){var s=C[o],l=m(i);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function a(){return r(b.thatReturns(null))}function i(e){function t(t,n,r,o,a){var i=t[n];if(!Array.isArray(i)){var u=C[o],s=v(i);return new Error("Invalid "+u+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<i.length;l++){var c=e(i,l,r,o,a+"["+l+"]");if(c instanceof Error)return c}return null}return r(t)}function u(){function e(e,t,n,r,o){if(!y.isValidElement(e[t])){var a=C[r];return new Error("Invalid "+a+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function s(e){function t(t,n,r,o,a){if(!(t[n]instanceof e)){var i=C[o],u=e.name||E,s=g(t[n]);return new Error("Invalid "+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return r(t)}function l(e){function t(t,n,r,o,a){for(var i=t[n],u=0;u<e.length;u++)if(i===e[u])return null;var s=C[o],l=JSON.stringify(e);return new Error("Invalid "+s+" `"+a+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if("object"!==u){var s=C[o];return new Error("Invalid "+s+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in i)if(i.hasOwnProperty(l)){var c=e(i,l,r,o,a+"."+l);if(c instanceof Error)return c}return null}return r(t)}function p(e){function t(t,n,r,o,a){for(var i=0;i<e.length;i++){var u=e[i];if(null==u(t,n,r,o,a))return null}var s=C[o];return new Error("Invalid "+s+" `"+a+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function d(){function e(e,t,n,r,o){if(!h(e[t])){var a=C[r];return new Error("Invalid "+a+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function f(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if("object"!==u){var s=C[o];return new Error("Invalid "+s+" `"+a+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var c=e[l];if(c){var p=c(i,l,r,o,a+"."+l);if(p)return p}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||y.isValidElement(e))return!0;var t=_(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:"<<anonymous>>"}var y=e(52),C=e(72),b=e(136),_=e(115),E="<<anonymous>>",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;a<o.length;a++)e.callbackQueue.enqueue(o[a],r.getPublicInstance())}}function s(e){return r(),b.isBatchingUpdates?void g.push(e):void b.batchedUpdates(s,e)}function l(e,t){b.isBatchingUpdates?void 0:m(!1),y.enqueue(e,t),C=!0}var c=e(6),p=e(24),d=e(71),f=e(76),h=e(100),v=e(23),m=e(144),g=[],y=c.getPooled(),C=!1,b=null,_={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),D()):g.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[_,E];v(o.prototype,h.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,N.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return h.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var D=function(){for(;g.length||C;){if(g.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(C){C=!1;var t=y;y=c.getPooled(),t.notifyAll(),c.release(t)}}};D=d.measure("ReactUpdates","flushBatchedUpdates",D);var M={injectReconcileTransaction:function(e){e?void 0:m(!1),N.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:m(!1),"function"!=typeof e.batchedUpdates?m(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?m(!1):void 0,b=e}},N={ReactReconcileTransaction:null,batchedUpdates:a,enqueueUpdate:s,flushBatchedUpdates:D,injection:M,asap:l};t.exports=N},{100:100,144:144,23:23,24:24,6:6,71:71,76:76}],84:[function(e,t,n){"use strict";t.exports="0.14.2"},{}],85:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_ATTRIBUTE,a={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,xlinkActuate:o,xlinkArcrole:o,xlinkHref:o,xlinkRole:o,xlinkShow:o,xlinkTitle:o,xlinkType:o,xmlBase:o,xmlLang:o,xmlSpace:o,y1:o,y2:o,y:o},DOMAttributeNamespaces:{xlinkActuate:a.xlink,xlinkArcrole:a.xlink,xlinkHref:a.xlink,xlinkRole:a.xlink,xlinkShow:a.xlink,xlinkTitle:a.xlink,xlinkType:a.xlink,xmlBase:a.xml,xmlLang:a.xml,xmlSpace:a.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};t.exports=i},{10:10}],86:[function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(b||null==g||g!==c())return null;var n=r(g);if(!C||!f(C,n)){C=n;var o=l.getPooled(m.select,y,e,t);return o.type="select",o.target=g,i.accumulateTwoPhaseDispatches(o),o}return null}var a=e(15),i=e(19),u=e(130),s=e(60),l=e(92),c=e(139),p=e(120),d=e(148),f=e(153),h=a.topLevelTypes,v=u.canUseDOM&&"documentMode"in document&&document.documentMode<=11,m={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[h.topBlur,h.topContextMenu,h.topFocus,h.topKeyDown,h.topMouseDown,h.topMouseUp,h.topSelectionChange]}},g=null,y=null,C=null,b=!1,_=!1,E=d({onSelect:null}),x={eventTypes:m,extractEvents:function(e,t,n,r,a){if(!_)return null;switch(e){case h.topFocus:(p(t)||"true"===t.contentEditable)&&(g=t,y=n,C=null);break;case h.topBlur:g=null,y=null,C=null;break;case h.topMouseDown:b=!0;break;case h.topContextMenu:case h.topMouseUp:return b=!1,o(r,a);case h.topSelectionChange:if(v)break;case h.topKeyDown:case h.topKeyUp:return o(r,a)}return null},didPutListener:function(e,t,n){t===E&&(_=!0)}};t.exports=x},{120:120,130:130,139:139,148:148,15:15,153:153,19:19,60:60,92:92}],87:[function(e,t,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};t.exports=o},{}],88:[function(e,t,n){"use strict";var r=e(15),o=e(129),a=e(19),i=e(65),u=e(89),s=e(92),l=e(93),c=e(95),p=e(96),d=e(91),f=e(97),h=e(98),v=e(99),m=e(136),g=e(111),y=e(144),C=e(148),b=r.topLevelTypes,_={abort:{phasedRegistrationNames:{bubbled:C({onAbort:!0}),captured:C({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:C({onBlur:!0}),captured:C({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:C({onCanPlay:!0}),captured:C({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:C({onCanPlayThrough:!0}),captured:C({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:C({onClick:!0}),captured:C({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:C({onContextMenu:!0}),captured:C({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:C({onCopy:!0}),captured:C({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:C({onCut:!0}),captured:C({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:C({onDoubleClick:!0}),captured:C({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:C({onDrag:!0}),captured:C({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:C({onDragEnd:!0}),captured:C({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:C({onDragEnter:!0}),captured:C({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:C({onDragExit:!0}),captured:C({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:C({onDragLeave:!0}),captured:C({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:C({onDragOver:!0}),captured:C({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:C({onDragStart:!0}),captured:C({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:C({onDrop:!0}),captured:C({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:C({onDurationChange:!0}),captured:C({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:C({onEmptied:!0}),captured:C({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:C({onEncrypted:!0}),captured:C({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:C({onEnded:!0}),captured:C({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:C({onError:!0}),captured:C({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:C({onFocus:!0}),captured:C({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:C({onInput:!0}),captured:C({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:C({onKeyDown:!0}),captured:C({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:C({onKeyPress:!0}),captured:C({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:C({onKeyUp:!0}),captured:C({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:C({onLoad:!0}),captured:C({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:C({onLoadedData:!0}),captured:C({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:C({onLoadedMetadata:!0}),captured:C({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:C({onLoadStart:!0}),captured:C({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:C({onMouseDown:!0}),captured:C({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:C({onMouseMove:!0}),captured:C({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:C({onMouseOut:!0}),captured:C({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:C({onMouseOver:!0}),captured:C({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:C({onMouseUp:!0}),captured:C({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:C({onPaste:!0}),captured:C({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:C({onPause:!0}),captured:C({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:C({onPlay:!0}),captured:C({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:C({onPlaying:!0}),captured:C({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:C({onProgress:!0}),captured:C({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:C({onRateChange:!0}),captured:C({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:C({onReset:!0}),captured:C({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:C({onScroll:!0}),captured:C({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:C({onSeeked:!0}),captured:C({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:C({onSeeking:!0}),captured:C({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:C({onStalled:!0}),captured:C({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:C({onSubmit:!0}),captured:C({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:C({onSuspend:!0}),captured:C({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:C({onTimeUpdate:!0}),captured:C({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:C({onTouchCancel:!0}),captured:C({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:C({onTouchEnd:!0}),captured:C({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:C({onTouchMove:!0}),captured:C({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:C({onTouchStart:!0}),captured:C({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:C({onVolumeChange:!0}),captured:C({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:C({onWaiting:!0}),captured:C({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:C({onWheel:!0}),captured:C({onWheelCapture:!0})}}},E={topAbort:_.abort,topBlur:_.blur,topCanPlay:_.canPlay,topCanPlayThrough:_.canPlayThrough,topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,topDrag:_.drag,topDragEnd:_.dragEnd,topDragEnter:_.dragEnter,topDragExit:_.dragExit,topDragLeave:_.dragLeave,topDragOver:_.dragOver,topDragStart:_.dragStart,topDrop:_.drop,topDurationChange:_.durationChange,topEmptied:_.emptied,topEncrypted:_.encrypted,topEnded:_.ended,topError:_.error,topFocus:_.focus,topInput:_.input,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,topLoad:_.load,topLoadedData:_.loadedData,topLoadedMetadata:_.loadedMetadata,topLoadStart:_.loadStart,topMouseDown:_.mouseDown,topMouseMove:_.mouseMove,topMouseOut:_.mouseOut,topMouseOver:_.mouseOver,topMouseUp:_.mouseUp,topPaste:_.paste,topPause:_.pause,topPlay:_.play,topPlaying:_.playing,topProgress:_.progress,topRateChange:_.rateChange,topReset:_.reset,topScroll:_.scroll,topSeeked:_.seeked,topSeeking:_.seeking,topStalled:_.stalled,topSubmit:_.submit,topSuspend:_.suspend,topTimeUpdate:_.timeUpdate,topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topVolumeChange:_.volumeChange,topWaiting:_.waiting,topWheel:_.wheel};for(var x in E)E[x].dependencies=[x];var D=C({onClick:null}),M={},N={eventTypes:_,extractEvents:function(e,t,n,r,o){var i=E[e];if(!i)return null;var m;switch(e){case b.topAbort:case b.topCanPlay:case b.topCanPlayThrough:case b.topDurationChange:case b.topEmptied:case b.topEncrypted:case b.topEnded:case b.topError:case b.topInput:case b.topLoad:case b.topLoadedData:case b.topLoadedMetadata:case b.topLoadStart:case b.topPause:case b.topPlay:case b.topPlaying:case b.topProgress:case b.topRateChange:case b.topReset:case b.topSeeked:case b.topSeeking:case b.topStalled:case b.topSubmit:case b.topSuspend:case b.topTimeUpdate:case b.topVolumeChange:case b.topWaiting:m=s;break;case b.topKeyPress:if(0===g(r))return null;case b.topKeyDown:case b.topKeyUp:m=c;break;case b.topBlur:case b.topFocus:m=l;break;case b.topClick:if(2===r.button)return null;case b.topContextMenu:case b.topDoubleClick:case b.topMouseDown:case b.topMouseMove:case b.topMouseOut:case b.topMouseOver:case b.topMouseUp:m=p;break;case b.topDrag:case b.topDragEnd:case b.topDragEnter:case b.topDragExit:case b.topDragLeave:case b.topDragOver:case b.topDragStart:case b.topDrop:m=d;break;case b.topTouchCancel:case b.topTouchEnd:case b.topTouchMove:case b.topTouchStart:m=f;break;case b.topScroll:m=h;break;case b.topWheel:m=v;break;case b.topCopy:case b.topCut:case b.topPaste:m=u}m?void 0:y(!1);var C=m.getPooled(i,n,r,o);return a.accumulateTwoPhaseDispatches(C),C},didPutListener:function(e,t,n){if(t===D){var r=i.getNode(e);M[e]||(M[e]=o.listen(r,"click",m))}},willDeleteListener:function(e,t){t===D&&(M[e].remove(),delete M[e])}};t.exports=N},{111:111,129:129,136:136,144:144,148:148,15:15,19:19,65:65,89:89,91:91,92:92,93:93,95:95,96:96,97:97,98:98,99:99}],89:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(92),a={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,a),t.exports=r},{92:92}],90:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(92),a={data:null};o.augmentClass(r,a),t.exports=r},{92:92}],91:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a={dataTransfer:null};o.augmentClass(r,a),t.exports=r},{96:96}],92:[function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n,this.target=r,this.currentTarget=r;var o=this.constructor.Interface;for(var a in o)if(o.hasOwnProperty(a)){var u=o[a];u?this[a]=u(n):this[a]=n[a]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=i.thatReturnsTrue:this.isDefaultPrevented=i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var o=e(24),a=e(23),i=e(136),u=(e(155),{type:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});a(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);a(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=a({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),t.exports=r},{136:136,155:155,23:23,24:24}],93:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(98),a={relatedTarget:null};o.augmentClass(r,a),t.exports=r},{98:98}],94:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(92),a={data:null};o.augmentClass(r,a),t.exports=r},{92:92}],95:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(98),a=e(111),i=e(112),u=e(113),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,charCode:function(e){return"keypress"===e.type?a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,s),t.exports=r},{111:111,112:112,113:113,98:98}],96:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(98),a=e(101),i=e(113),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+a.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+a.currentScrollTop}};o.augmentClass(r,u),t.exports=r},{101:101,113:113,98:98}],97:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(98),a=e(113),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};o.augmentClass(r,i),t.exports=r},{113:113,98:98}],98:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(92),a=e(114),i={view:function(e){if(e.view)return e.view;var t=a(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,i),t.exports=r},{114:114,92:92}],99:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,a),t.exports=r},{96:96}],100:[function(e,t,n){"use strict";var r=e(144),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,a,i,u,s){this.isInTransaction()?r(!1):void 0;var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,o,a,i,u,s),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=a.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===a.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,i=t[n],u=this.wrapperInitData[n];try{o=!0,u!==a.OBSERVED_ERROR&&i.close&&i.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}},a={Mixin:o,OBSERVED_ERROR:{}};t.exports=a},{144:144}],101:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],102:[function(e,t,n){"use strict";function r(e,t){if(null==t?o(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=e(144);t.exports=r},{144:144}],103:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,a=e.length,i=-4&a;i>r;){for(;r<Math.min(r+4096,i);r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;a>r;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={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},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){
  844. "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<e.length;g++)s=e[g],c=m+o(s,g),v+=u(s,c,n,r);else{var y=p(e);if(y){var C,b=y.call(e);if(y!==e.entries)for(var _=0;!(C=b.next()).done;)s=C.value,c=m+o(s,_++),v+=u(s,c,n,r);else for(;!(C=b.next()).done;){var E=C.value;E&&(s=E[1],c=m+i(E[0])+h+o(s,0),v+=u(s,c,n,r))}}else if("object"===a){String(e);d(!1)}}return v}function s(e,t,n){return null==e?0:u(e,"",t,n)}var l=(e(34),e(52)),c=e(61),p=e(115),d=e(144),f=(e(155),c.SEPARATOR),h=":",v={"=":"=0",".":"=1",":":"=2"},m=/[=.:]/g;t.exports=s},{115:115,144:144,155:155,34:34,52:52,61:61}],128:[function(e,t,n){"use strict";var r=(e(23),e(136)),o=(e(155),r);t.exports=o},{136:136,155:155,23:23}],129:[function(e,t,n){"use strict";var r=e(136),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{136:136}],130:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],131:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],132:[function(e,t,n){"use strict";function r(e){return o(e.replace(a,"ms-"))}var o=e(131),a=/^-ms-/;t.exports=r},{131:131}],133:[function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(o(r))return!1;if(o(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1}return!1}}var o=e(146);t.exports=r},{146:146}],134:[function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return r(e)?Array.isArray(e)?e.slice():a(e):[e]}var a=e(154);t.exports=o},{154:154}],135:[function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;l?void 0:s(!1);var o=r(e),a=o&&u(o);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),i(p).forEach(t));for(var d=i(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var a=e(130),i=e(134),u=e(140),s=e(144),l=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{130:130,134:134,140:140,144:144}],136:[function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],137:[function(e,t,n){"use strict";var r={};t.exports=r},{}],138:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],139:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],140:[function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),d.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?i.innerHTML="<link />":i.innerHTML="<"+e+"></"+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,'<select multiple="true">',"</select>"],l=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],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;i<n.length;i++)if(!a(n[i])||e[n[i]]!==t[n[i]])return!1;return!0}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],154:[function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?o(!1):void 0,"number"!=typeof t?o(!1):void 0,0===t||t-1 in e?void 0:o(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),a=0;t>a;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});
  845. var React = (function() {
  846. return (0, eval)('this').React;
  847. }());
  848. if (typeof React === 'undefined' && typeof AlloyEditor !== 'undefined') {
  849. React = AlloyEditor.React;
  850. }
  851. if (typeof React === 'undefined' && typeof require === 'function') {
  852. React = require('react');
  853. }
  854. var ReactDOM = (function() {
  855. return (0, eval)('this').ReactDOM;
  856. }());
  857. if (typeof ReactDOM === 'undefined' && typeof AlloyEditor !== 'undefined') {
  858. ReactDOM = AlloyEditor.ReactDOM;
  859. }
  860. if (typeof ReactDOM === 'undefined' && typeof require === 'function') {
  861. ReactDOM = require('react-dom');
  862. }
  863. if (typeof window !== 'undefined') {
  864. deployCKEditor();
  865. "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;l<s;++l)r.push(arguments[l]);var c=r.concat(i||[]);o=setTimeout(function(){e.apply(a,c)},t)};return a.detach=function(){clearTimeout(o)},a}}();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(){function e(e,t){this._editor=e,this.appendProtocol=!t||t.appendProtocol!==!1}var t=/^[a-z0-9\u0430-\u044F\._-]+@/i,n=/^(?:[a-z][a-z0-9+\-.]*)\:|^\//i;e.prototype={constructor:e,advanceSelection:function(e){e=e||this.getFromSelection();var t=this._editor.getSelection().getRanges()[0];if(e){t.moveToElementEditEnd(e);var n=t.getNextEditableNode();if(n&&!this._editor.element.equals(n.getCommonAncestor(e))){var i=/\s/.exec(n.getText()),o=i?i.index+1:0;t.setStart(n,o),t.setEnd(n,o)}}this._editor.getSelection().selectRanges([t])},create:function(e,t,n){var i=this._editor.getSelection(),o=i.getRanges()[0];if(o.collapsed){var a=new CKEDITOR.dom.text(e,this._editor.document);o.insertNode(a),o.selectNodeContents(a)}e=this._getCompleteURI(e);var r=CKEDITOR.tools.merge({"data-cke-saved-href":e,href:e},t),s=new CKEDITOR.style({attributes:r,element:"a"});s.type=CKEDITOR.STYLE_INLINE,s.applyToRange(o,this._editor),n&&n.advance?this.advanceSelection():o.select()},getFromSelection:function(){var e=this._editor.getSelection(),t=e.getSelectedElement();if(t&&t.is("a"))return t;var n=e.getRanges()[0];return n?(n.shrink(CKEDITOR.SHRINK_TEXT),this._editor.elementPath(n.getCommonAncestor()).contains("a",1)):null},remove:function(e,t){var n=this._editor;if(e)t&&t.advance&&this.advanceSelection(),e.remove(n);else{var i=new CKEDITOR.style({alwaysRemoveElement:1,element:"a",type:CKEDITOR.STYLE_INLINE}),o=n.getSelection();o.selectElement(o.getStartElement()),n.removeStyle(i)}},update:function(e,t,n){if(t=t||this.getFromSelection(),"string"==typeof e)t.setAttributes({"data-cke-saved-href":e,href:e});else if("object"===("undefined"==typeof e?"undefined":_typeof(e))){var i=[],o={};Object.keys(e).forEach(function(t){null===e[t]?("href"===t&&i.push("data-cke-saved-href"),i.push(t)):("href"===t&&(o["data-cke-saved-href"]=e[t]),o[t]=e[t])}),t.removeAttributes(i),t.setAttributes(o)}n&&n.advance&&this.advanceSelection(t)},_getCompleteURI:function(e){return t.test(e)?e="mailto:"+e:n.test(e)||(e=this.appendProtocol?"http://"+e:e),e}},CKEDITOR.Link=CKEDITOR.Link||e}(),function(){function e(){}CKEDITOR.plugins.get("ae_selectionregion")||(CKEDITOR.SELECTION_TOP_TO_BOTTOM=0,CKEDITOR.SELECTION_BOTTOM_TO_TOP=1,CKEDITOR.SELECTION_LEFT_TO_RIGHT=2,CKEDITOR.SELECTION_RIGHT_TO_LEFT=3,e.prototype={constructor:e,createSelectionFromPoint:function(e,t){this.createSelectionFromRange(e,t,e,t)},createSelectionFromRange:function(e,t,n,i){var o,a,r,s,l,c,d;if("function"==typeof document.caretPositionFromPoint?(l=document.caretPositionFromPoint(e,t),o=document.caretPositionFromPoint(n,i),c=l.offsetNode,a=o.offsetNode,d=l.offset,r=o.offset,s=this.createRange()):"function"==typeof document.caretRangeFromPoint&&(l=document.caretRangeFromPoint(e,t),o=document.caretRangeFromPoint(n,i),c=l.startContainer,a=o.startContainer,d=l.startOffset,r=o.startOffset,s=this.createRange()),s&&document.getSelection)s.setStart(new CKEDITOR.dom.node(c),d),s.setEnd(new CKEDITOR.dom.node(a),r),this.getSelection().selectRanges([s]);else if("function"==typeof document.body.createTextRange){var u=this.getSelection();u.unlock(),s=document.body.createTextRange(),s.moveToPoint(e,t);var p=s.duplicate();p.moveToPoint(n,i),s.setEndPoint("EndToEnd",p),s.select(),this.getSelection().lock()}},getCaretRegion:function(){var e=this.getSelection(),t={bottom:0,left:0,right:0,top:0},n=e.createBookmarks();if(!n.length)return t;var i=n[0].startNode.$;i.style.display="inline-block",t=new CKEDITOR.dom.element(i).getClientRect(),i.parentNode.removeChild(i);var o=new CKEDITOR.dom.window(window).getScrollPosition();return t.bottom=o.y+t.bottom,t.left=o.x+t.left,t.right=o.x+t.right,t.top=o.y+t.top,t},getSelectionData:function(){var e=this.getSelection();if(!e.getNative())return null;var t={element:e.getSelectedElement(),text:e.getSelectedText()};return t.region=this.getSelectionRegion(e),t},getSelectionRegion:function(){var e=this.getClientRectsRegion();return e.direction=this.getSelectionDirection(),e.height=e.bottom-e.top,e.width=e.right-e.left,e},isSelectionEmpty:function(){var e,t=this.getSelection();return t.getType()===CKEDITOR.SELECTION_NONE||(e=t.getRanges())&&1===e.length&&e[0].collapsed},getClientRectsRegion:function(){var e=this.getSelection(),t=e.getNative(),n={bottom:0,height:0,left:0,right:0,top:0,width:0},i={bottom:0,endRect:n,left:0,right:0,top:0,startRect:n};if(!t)return i;var o,a,r=0,s=1/0,l=-(1/0),c=1/0;if(t.createRange?o=t.createRange().getClientRects():(a=t.rangeCount,o=t.rangeCount>0?t.getRangeAt(0).getClientRects():[]),0===o.length)i=this.getCaretRegion();else{for(var d=0,u=o.length;d<u;d++){var p=o[d];p.left<s&&(s=p.left),p.right>l&&(l=p.right),p.top<c&&(c=p.top),p.bottom>r&&(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;r<o;r++)for(var s=i.append(this._createElement("tr")),l=0;l<a;l++){var c=s.append(this._createElement("td"));c.appendBogus()}this.setAttributes(n,e.attrs),this.setHeading(n,e.heading),t.insertElement(n);var d=new CKEDITOR.dom.element(n.$.rows[0].cells[0]),u=t.createRange();return u.moveToPosition(d,CKEDITOR.POSITION_AFTER_START),u.select(),n},getFromSelection:function(){var e,t=this._editor.getSelection(),n=t.getSelectedElement();if(n&&n.is("table"))e=n;else{var i=t.getRanges();i.length>0&&(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;o<t.$.rows.length;o++){var a=t.$.rows[o].cells[0];if(a&&"th"!==a.nodeName.toLowerCase()){i=!1;break}}var r=e.HEADING_NONE;return n&&(r=e.HEADING_ROW),i&&(r=r===e.HEADING_ROW?e.HEADING_BOTH:e.HEADING_COL),r},remove:function(e){var t=this._editor;if(e)e.remove();else if(e=t.elementPath().contains("table",1)){var n=e.getParent(),i=t.editable();1!==n.getChildCount()||n.is("td","th")||n.equals(i)||(e=n);var o=t.createRange();o.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),o.select()}},setAttributes:function(e,t){t&&Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})},setHeading:function(t,n){t=t||this.getFromSelection();var i,o,a,r=t.getElementsByTag("tbody").getItem(0),s=this.getHeading(t),l=s===e.HEADING_COL||s===e.HEADING_BOTH,c=n===e.HEADING_COL||n===e.HEADING_BOTH,d=n===e.HEADING_ROW||n===e.HEADING_BOTH;if(!t.$.tHead&&d){var u=r.getElementsByTag("tr").getItem(0),p=u.getChildCount();for(i=0;i<p;i++){var m=u.getChild(i);m.type!==CKEDITOR.NODE_ELEMENT||m.data("cke-bookmark")||(m.renameNode("th"),m.setAttribute("scope","col"))}a=this._createElement(t.$.createTHead()),a.append(u.remove())}if(null!==t.$.tHead&&!d){a=this._createElement(t.$.tHead);for(var g=r.getFirst();a.getChildCount()>0;){var h=a.getFirst(),f=h.getChildCount();for(i=0;i<f;i++)o=h.getChild(i),o.type===CKEDITOR.NODE_ELEMENT&&(o.renameNode("td"),o.removeAttribute("scope"));h.insertBefore(g)}a.remove()}s=this.getHeading(t);var y=s===e.HEADING_COL||s===e.HEADING_BOTH;if(!y&&c)for(i=0;i<t.$.rows.length;i++)"th"!==t.$.rows[i].cells[0].nodeName.toLowerCase()&&(o=new CKEDITOR.dom.element(t.$.rows[i].cells[0]),o.renameNode("th"),o.setAttribute("scope","row"));if(l&&!c)for(i=0;i<t.$.rows.length;i++){var E=new CKEDITOR.dom.element(t.$.rows[i]);"tbody"===E.getParent().getName()&&(o=new CKEDITOR.dom.element(E.$.cells[0]),o.renameNode("td"),o.removeAttribute("scope"))}},_createElement:function(e){return new CKEDITOR.dom.element(e,this._editor.document)}},CKEDITOR.on("instanceReady",function(t){var n=[e.HEADING_NONE,e.HEADING_ROW,e.HEADING_COL,e.HEADING_BOTH],i=new e(t.editor);n.forEach(function(e){t.editor.addCommand("tableHeading"+e,{exec:function(t){i.setHeading(null,e)}})})}),CKEDITOR.Table=CKEDITOR.Table||e}(),function(){CKEDITOR.tools.jsonp=function(e,t,n,i){function o(){r&&(r.remove(),delete CKEDITOR._.jsonpCallbacks[a],r=null)}var a=CKEDITOR.tools.getNextNumber();t=t||{},t.callback="CKEDITOR._.jsonpCallbacks["+a+"]",CKEDITOR._.jsonpCallbacks||(CKEDITOR._.jsonpCallbacks={}),CKEDITOR._.jsonpCallbacks[a]=function(e){setTimeout(function(){o(),n(e)})};var r=new CKEDITOR.dom.element("script");return r.setAttribute("src",e.output(t)),r.on("error",function(){o(),i&&i()}),CKEDITOR.document.getBody().append(r),{cancel:o,id:a}},CKEDITOR.tools.merge=CKEDITOR.tools.merge||function(){for(var e={},t=0;t<arguments.length;++t){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},CKEDITOR.tools.simulate=function(e,t){var n=document.createEvent("Events");n.initEvent(t,!0,!1),e.dispatchEvent(n)}}(),function(){CKEDITOR.plugins.get("ae_uicore")||CKEDITOR.plugins.add("ae_uicore",{init:function(e){var t=[],n=this._createAriaElement(e.id),i=e.config.uicore?e.config.uicore.timeout:50,o=CKEDITOR.tools.debounce(function(n){if(t=[],"keyup"!==n.name||27!==n.data.$.keyCode||e.config.allowEsc){var i=e.getSelectionData();i&&e.fire("editorInteraction",{nativeEvent:n.data.$,selectionData:i})}},i),a=CKEDITOR.tools.debounce(function(e){n.innerHTML=t.join(". ")},i),r=CKEDITOR.tools.debounce(function(e){for(var t,n=document.querySelectorAll(".ae-ui"),i=0;i<n.length;i++)if(n[i].contains(e.data.$.relatedTarget)){t=!0;break}t||o(e)},i),s=function l(t){var n=e.editable();n.removeListener("blur",l),n.removeListener("keyup",o),n.removeListener("mouseleave",r),n.removeListener("mouseup",o),o(t)};e.on("ariaUpdate",function(e){t.push(e.data.message),a()}),e.once("contentDom",function(){var t=e.editable();t.attachListener(t,"focus",function(e){t.attachListener(t,"blur",s),t.attachListener(t,"keyup",o),t.attachListener(t,"mouseup",o),t.attachListener(t,"mouseleave",r),o(e)})}),e.on("destroy",function(e){n.parentNode.removeChild(n),o.detach()})},_createAriaElement:function(e){var t=document.createElement("div");return t.className="ae-sr-only",t.setAttribute("aria-live","polite"),t.setAttribute("role","status"),t.setAttribute("id",e+"LiveRegion"),document.body.appendChild(t),t}})}(),function(){var e=CKEDITOR.env.ie;CKEDITOR.plugins.get("ae_addimages")||CKEDITOR.plugins.add("ae_addimages",{init:function(e){e.once("contentDom",function(){var t=e.editable();t.attachListener(t,"dragenter",this._onDragEnter,this,{editor:e}),t.attachListener(t,"dragover",this._onDragOver,this,{editor:e}),t.attachListener(t,"drop",this._onDragDrop,this,{editor:e}),t.attachListener(t,"paste",this._onPaste,this,{editor:e})}.bind(this))},_handleFiles:function(e,t){var n,i,o=[];for(i=0;i<e.length;i++)n=e[i],0===n.type.indexOf("image")&&o.push(n);var a=t.fire("beforeImageAdd",{imageFiles:o});if(a)for(i=0;i<e.length;i++)n=e[i],this._processFile(n,t);return!1},_onDragDrop:function(e){var t=e.data.$;new CKEDITOR.dom.event(t).preventDefault();var n=e.listenerData.editor;e.listenerData.editor.createSelectionFromPoint(t.clientX,t.clientY),this._handleFiles(t.dataTransfer.files,n)},_onDragEnter:function(t){e&&this._preventEvent(t)},_onDragOver:function(t){e&&this._preventEvent(t)},_onPaste:function(e){if(e.data&&e.data.$&&e.data.$.clipboardData&&e.data.$.clipboardData.items&&e.data.$.clipboardData.items.length>0){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('<img src="'+i+'">');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+"&nbsp;"),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(/<div id="ckimgrsz"([\s\S]*?)<\/div>/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;i<t;i++)n[i]=e[i];return n}function o(e,t){return e.bind?e.bind(t):function(){e.apply(t,arguments)}}function a(e,t,n){e.style.left=String(t)+"px",e.style.top=String(n)+"px"}function r(e,t,n){var i=this.editor.config.imageScaleResize;"both"===i?(e.style.width=String(t)+"px",e.style.height=String(n)+"px"):"width"===i||"scale"===i?(e.style.height="auto",e.style.width=String(t)+"px"):"height"===i&&(e.style.height=String(n)+"px",e.style.width="auto")}function s(e,t){var n=t.getBoundingClientRect();return{left:n.left+e.pageXOffset,top:n.top+e.pageYOffset,width:n.width,height:n.height}}if(!CKEDITOR.plugins.get("ae_dragresize")){var l={both:["tl","tm","tr","lm","rm","bl","bm","br"],height:["tl","tm","tr","bl","bm","br"],scale:["tl","tr","bl","br"],width:["tl","tr","lm","rm","bl","br"]},c={bl:function(e,t,n,i){a(e,-3+t,i.height-4+n)},bm:function(e,t,n,i){a(e,Math.round(i.width/2)-3+t,i.height-4+n)},br:function(e,t,n,i){a(e,i.width-4+t,i.height-4+n)},lm:function(e,t,n,i){a(e,-3+t,Math.round(i.height/2)-3+n)},tl:function(e,t,n,i){a(e,t-3,n-3)},tm:function(e,t,n,i){a(e,Math.round(i.width/2)-3+t,-3+n)},tr:function(e,t,n,i){a(e,i.width-4+t,-3+n)},rm:function(e,t,n,i){a(e,i.width-4+t,Math.round(i.height/2)-3+n)}},d=7,u="MozAppearance"in document.documentElement.style,p="WebkitAppearance"in document.documentElement.style,m=p||u;u&&document.execCommand("enableObjectResizing",!1,!1),m&&CKEDITOR.addCss("img::selection{color:rgba(0,0,0,0)}img.ckimgrsz{outline:1px dashed #000}#ckimgrsz{position:absolute;width:0;height:0;cursor:default;z-index:10001}#ckimgrsz span{display:none;position:absolute;top:0;left:0;width:0;height:0;background-size:100% 100%;opacity:.65;outline:1px dashed #000}#ckimgrsz i{position:absolute;display:block;width:5px;height:5px;background:#fff;border:1px solid #000}#ckimgrsz i.active,#ckimgrsz i:hover{background:#000}#ckimgrsz i.br,#ckimgrsz i.tl{cursor:nwse-resize}#ckimgrsz i.bm,#ckimgrsz i.tm{cursor:ns-resize}#ckimgrsz i.bl,#ckimgrsz i.tr{cursor:nesw-resize}#ckimgrsz i.lm,#ckimgrsz i.rm{cursor:ew-resize}body.dragging-br,body.dragging-br *,body.dragging-tl,body.dragging-tl *{cursor:nwse-resize!important}body.dragging-bm,body.dragging-bm *,body.dragging-tm,body.dragging-tm *{cursor:ns-resize!important}body.dragging-bl,body.dragging-bl *,body.dragging-tr,body.dragging-tr *{cursor:nesw-resize!important}body.dragging-lm,body.dragging-lm *,body.dragging-rm,body.dragging-rm *{cursor:ew-resize!important}"),CKEDITOR.plugins.add("ae_dragresize",{onLoad:function(){},init:function(t){m&&t.once("contentDom",function(n){e(t)})}}),t.prototype={init:function(){var e=this,t=this.container=this.document.createElement("div");t.id="ckimgrsz",this.preview=this.document.createElement("span"),t.appendChild(this.preview);var n=this.handles={};l[this.cfg.imageScaleResize].forEach(function(t,i){n[t]=e.handles[t]=e.createHandle(t)});for(var i in n)t.appendChild(n[i])},createHandle:function(e){var t=this.document.createElement("i");return t.classList.add(e),t},isHandle:function(e){var t=this.handles;for(var n in t)if(t[n]===e)return!0;return!1},show:function(e){this.el=e,this.cfg.snapToSize&&(this.otherImages=i(this.document.getElementsByTagName("img")),this.otherImages.splice(this.otherImages.indexOf(e),1));var t=this.box=s(this.window,e);a(this.container,t.left,t.top),this.document.body.appendChild(this.container),this.el.classList.add("ckimgrsz"),this.showHandles()},hide:function(){for(var e=this.document.getElementsByClassName("ckimgrsz"),t=0;t<e.length;++t)e[t].classList.remove("ckimgrsz");this.hideHandles(),this.container.parentNode&&this.container.parentNode.removeChild(this.container)},initDrag:function(e){if(0===e.button){var t=this,i=new n(this.window,this.document);i.onStart=function(){t.showPreview(),t.isDragging=!0,t.editor.getSelection().lock()},i.onDrag=function(){t.calculateSize(this),t.updatePreview();var e=t.previewBox;t.updateHandles(e,e.left,e.top)},i.onRelease=function(){t.isDragging=!1,t.hidePreview(),t.hide(),t.editor.getSelection().unlock(),t.editor.fire("saveSnapshot")},i.onComplete=function(){t.resizeComplete(),t.editor.fire("saveSnapshot")},i.start(e)}},updateHandles:function(e,t,n){t=t||0,n=n||0;var i=this.handles;for(var o in i)c[o](i[o],t,n,e)},showHandles:function(){var e=this.handles;this.updateHandles(this.box);for(var t in e)e[t].style.display="block"},hideHandles:function(){var e=this.handles;for(var t in e)e[t].style.display="none"},showPreview:function(){this.preview.style.backgroundImage='url("'+this.el.src+'")',this.calculateSize(),this.updatePreview(),this.preview.style.display="block"},updatePreview:function(){var e=this.previewBox;a(this.preview,e.left,e.top),this.preview.style.width=this.previewBox.width+"px",this.preview.style.height=this.previewBox.height+"px"},hidePreview:function(){var e=s(this.window,this.preview);this.result={width:e.width,height:e.height},this.preview.style.display="none"},calculateSize:function(e){var t=this.previewBox={top:0,left:0,width:this.box.width,height:this.box.height};if(e){var n=e.target.className;if(~n.indexOf("r")&&(t.width=Math.max(32,this.box.width+e.delta.x)),~n.indexOf("b")&&(t.height=Math.max(32,this.box.height+e.delta.y)),~n.indexOf("l")&&(t.width=Math.max(32,this.box.width-e.delta.x)),~n.indexOf("t")&&(t.height=Math.max(32,this.box.height-e.delta.y)),n.indexOf("m")<0&&!e.keys.shift){var i=this.box.width/this.box.height;t.width/t.height>i?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<a.length;r++){var l=s(this.window,a[r]);if(Math.abs(t.width-l.width)<=o&&Math.abs(t.height-l.height)<=o){t.width=l.width,t.height=l.height;break}}~n.indexOf("l")&&(t.left=this.box.width-t.width),~n.indexOf("t")&&(t.top=this.box.height-t.height)}},resizeComplete:function(){r.call(this,this.el,this.result.width,this.result.height)}},n.prototype={start:function(e){e.preventDefault(),e.stopPropagation(),this.target=e.target,this.attr=e.target.className,this.startPos={x:e.clientX,y:e.clientY},this.update(e);var t=this.events;this.document.addEventListener("mousemove",t.mousemove,!1),this.document.addEventListener("keydown",t.keydown,!1),this.document.addEventListener("mouseup",t.mouseup,!1),this.document.body.classList.add("dragging-"+this.attr),this.onStart&&this.onStart()},update:function(e){this.currentPos={x:e.clientX,y:e.clientY},this.delta={x:e.clientX-this.startPos.x,y:e.clientY-this.startPos.y},this.keys={shift:e.shiftKey,ctrl:e.ctrlKey,alt:e.altKey}},mousemove:function(e){this.update(e),this.onDrag&&this.onDrag(),0===e.which&&this.mouseup(e)},keydown:function(e){27===e.keyCode&&this.release()},mouseup:function(e){this.update(e),this.release(),this.onComplete&&this.onComplete()},release:function(){this.document.body.classList.remove("dragging-"+this.attr);var e=this.events;this.document.removeEventListener("mousemove",e.mousemove,!1),this.document.removeEventListener("keydown",e.keydown,!1),this.document.removeEventListener("mouseup",e.mouseup,!1),this.onRelease&&this.onRelease()}}}}(),function(){function e(e){e.config.imageScaleResize=e.config.imageScaleResize||"both",e.on("imageAdd",function(t){e.widgets.initOn(t.data.el,"image")});var i=e.config.image2_alignClasses,o=e.config.image2_captionedClass;return{init:function(){var t=CKEDITOR.plugins.image2,n=this.parts.image,o={alt:n.getAttribute("alt")||"",hasCaption:!!this.parts.caption,height:n.getAttribute("height")||"",lock:!this.ready||t.checkHasNaturalRatio(n),src:n.getAttribute("src"),width:n.getAttribute("width")||""},a=n.getAscendant("a");if(a&&this.wrapper.contains(a)&&(this.parts.link=a),!o.align){var s=o.hasCaption?this.element:n;i?(s.hasClass(i[0])?o.align="left":s.hasClass(i[2])&&(o.align="right"),o.align?s.removeClass(i[d[o.align]]):o.align="none"):(o.align=s.getStyle("float")||"none",s.removeStyle("float"))}this.wrapper[(o.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption"),this.setData(o),e.config.image2_disableResizer!==!0&&r(this)},addClass:function(e){c(this).addClass(e)},allowedContent:s(e),contentTransformations:[["img[width]: sizeToAttribute"]],data:function(){var t=this.features;if(this.data.hasCaption&&!e.filter.checkFeature(t.caption)&&(this.data.hasCaption=!1),"none"==this.data.align||e.filter.checkFeature(t.align)||(this.data.align="none"),this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&&delete this.parts.link,this.parts.image.setAttributes({alt:this.data.alt,contenteditable:!this.parts.image.getAttribute("contenteditable")||this.parts.image.getAttribute("contenteditable"),"data-cke-saved-src":this.data.src,src:this.data.src}),this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var n in this.data.classes)this.parts.image.removeClass(n);e.filter.checkFeature(t.dimension)&&a(this),this.oldData=CKEDITOR.tools.extend({},this.data)},downcast:n(e),draggable:!1,editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},features:l(e),getClasses:function(){var e=new RegExp("^("+[].concat(o,i).join("|")+")$");return function(){var t=this.repository.parseElementClasses(c(this).getAttribute("class"));for(var n in t)e.test(n)&&delete t[n];return t}}(),getLabel:function(){var e=(this.data.alt||"")+" "+this.pathName;return e},hasClass:function(e){return c(this).hasClass(e)},parts:{caption:"figcaption",image:"img"},removeClass:function(e){c(this).removeClass(e)},requiredContent:"img[src,alt]",styleableElements:"img figure",template:m,upcast:t(e)}}function t(e){var t=i(e),n=e.config.image2_captionedClass;return function(e,i){var a,r={height:1,width:1},s=e.name;if(!e.attributes["data-cke-realelement"]){if(t(e)){if("div"==s){var l=e.getFirst("figure");l&&(e.replaceWith(l),e=l)}i.align="center",a=e.getFirst("img")||e.getFirst("a").getFirst("img")}else"figure"==s&&e.hasClass(n)?a=e.getFirst("img")||e.getFirst("a").getFirst("img"):o(e)&&(a="a"==e.name?e.children[0]:e);if(a){for(var c in r){var d=a.attributes[c];d&&d.match(p)&&delete a.attributes[c]}return e}}}}function n(e){var t=e.config.image2_alignClasses;return function(e){var n="a"==e.name?e.getFirst():e,i=n.attributes,o=this.data.align;if(!this.inline){var a=e.getFirst("span");a&&a.replaceWith(a.getFirst({a:1,img:1}))}if(o&&"none"!=o){var r=CKEDITOR.tools.parseCssText(i.style||"");"center"==o&&"figure"==e.name?e=e.wrapWith(new CKEDITOR.htmlParser.element("div",t?{"class":t[1]}:{style:"text-align:center"})):o in{left:1,right:1}&&(t?n.addClass(t[d[o]]):r["float"]=o),t||CKEDITOR.tools.isEmpty(r)||(i.style=CKEDITOR.tools.writeCssText(r))}return e}}function i(e){var t=e.config.image2_captionedClass,n=e.config.image2_alignClasses,i={a:1,figure:1,img:1};return function(a){if(!(a.name in{div:1,p:1}))return!1;var r=a.children;if(1!==r.length)return!1;var s=r[0];if(!(s.name in i))return!1;if("p"==a.name){if(!o(s))return!1}else if("figure"==s.name){if(!s.hasClass(t))return!1}else{if(e.enterMode==CKEDITOR.ENTER_P)return!1;if(!o(s))return!1}return!(n?!a.hasClass(n[1]):"center"!=CKEDITOR.tools.parseCssText(a.attributes.style||"",!0)["text-align"])}}function o(e){return"img"==e.name||"a"==e.name&&(1==e.children.length&&e.getFirst("img"))}function a(e){var t=e.data,n={height:t.height,width:t.width},i=e.parts.image;for(var o in n)n[o]?i.setAttribute(o,n[o]):i.removeAttribute(o)}function r(e){var t=e.editor,n=t.editable(),i=t.document,o=e.resizer=i.createElement("span");if(o.addClass("cke_image_resizer"),o.addClass("cke_image_resizer_"+u[t.config.imageScaleResize]),o.append(new CKEDITOR.dom.text("​",i)),e.inline)e.wrapper.append(o);else{var a=e.parts.link||e.parts.image,r=a.getParent(),s=i.createElement("span");s.addClass("cke_image_resizer_wrapper"),s.append(a),s.append(o),e.element.append(s,!0),r.is("span")&&r.remove()}o.on("mousedown",function(a){function r(e,t,n){var o=CKEDITOR.document,a=[];if(i.equals(o)||a.push(o.on(e,t)),a.push(i.on(e,t)),n)for(var r=a.length;r--;)n.push(a.pop())}function s(e){var n=t.config.imageScaleResize;c=e.data.$,m=c.screenX-E,g=b-c.screenY,h=Math.abs(m/g),"width"!==n&&"both"!==n&&"scale"!==n||(d=v+y*m),"height"!==n&&"both"!==n||(u=R-g),"scale"===n&&(u="auto"),d=d||v,u=u||R,d>=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",
  866. height:"ns-resize",scale:"nwse-resize",width:"ew-resize"},p=/^\s*(\d+\%)\s*$/i,m='<img alt="" src="" />';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='<div data-ae-embed-url="{url}"></div>',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('<img src="'+e.target.result+'">');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;r<s;r++)i=o[r],t=i.cells.length,t>a&&(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<d;c++){var u=new CKEDITOR.dom.element(r.cells[c]),p=r.cells[c+1]&&new CKEDITOR.dom.element(r.cells[c+1]);o+=u.$.colSpan||1;var m,g,h,f=u.getDocumentPosition().x;a?g=f+t(u,"left"):m=f+u.$.offsetWidth-t(u,"right"),p?(f=p.getDocumentPosition().x,a?m=f+p.$.offsetWidth-t(p,"right"):g=f+t(p,"left")):(f=e.getDocumentPosition().x,a?m=f:g=f+e.$.offsetWidth),h=Math.max(g-m,4),i.push({table:e,index:o,x:m,y:l.y,width:h,height:s.$.offsetHeight,rtl:a})}return i}function o(e,t){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(t>=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<d;c++){var T=n[c],C=T[t+(l?1:0)],_=T[t+(l?0:1)];C=C&&new CKEDITOR.dom.element(C),_=_&&new CKEDITOR.dom.element(_),C&&_&&C.equals(_)||(C&&(r=Math.min(r,e(C))),_&&(s=Math.min(s,e(_))),i.push(C),o.push(_))}E=i,b=o,v=p.x-r,R=p.x+s,g.setOpacity(.5),f=parseInt(g.getStyle("left"),10),y=0,h=1,g.on("mousemove",u),m.on("dragstart",a)}function r(){h=0,g.setOpacity(0),y&&s();var e=p.table;setTimeout(function(){e.removeCustomData("_cke_table_pillars")},0),m.removeListener("dragstart",a)}function s(){for(var n=p.rtl,i=n?b.length:E.length,o=0;o<i;o++){var a=E[o],r=b[o],s=p.table;CKEDITOR.tools.setTimeout(function(e,t,i,o,a,r){e&&e.setStyle("width",l(Math.max(t+r,1))),i&&i.setStyle("width",l(Math.max(o-r,1))),a&&s.setStyle("width",l(a+r*(n?-1:1)))},0,this,[a,a&&e(a),r,r&&e(r),(!a||!r)&&e(s)+t(s,"left")+t(s,"right"),y])}}function c(e){a(e),o(),m.on("mouseup",d,this)}function d(e){e.removeListener(),r()}function u(e){T(e.data.getPageOffset().x)}var p,m,g,h,f,y,E,b,v,R;m=n.document,g=CKEDITOR.dom.element.createFromHtml('<div data-cke-temp=1 contenteditable=false unselectable=on style="position:absolute;cursor:col-resize;filter:alpha(opacity=0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"></div>',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&&(e<p.x||e>p.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;a<n.length;a++){var r=n[a];if(r.collapsed){var s=r.getCommonAncestor(),l=s.getAscendant("td",!0)||s.getAscendant("th",!0);l&&i.push(l)}else{var c,d=new CKEDITOR.dom.walker(r);for(d.guard=t;c=d.next();)if(c.type!=CKEDITOR.NODE_ELEMENT||!c.is(CKEDITOR.dtd.table)){var u=c.getAscendant("td",!0)||c.getAscendant("th",!0);u&&!u.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(o,u,"selected_cell",!0),i.push(u))}}}return CKEDITOR.dom.element.clearAllMarkers(o),i}function t(e){for(var t,n,i,o=0,a=e.length-1,r={};t=e[o++];)CKEDITOR.dom.element.setMarker(r,t,"delete_cell",!0);for(o=0;t=e[o++];)if((n=t.getPrevious())&&!n.getCustomData("delete_cell")||(n=t.getNext())&&!n.getCustomData("delete_cell"))return CKEDITOR.dom.element.clearAllMarkers(r),n;return CKEDITOR.dom.element.clearAllMarkers(r),i=e[0].getParent(),(i=i.getPrevious())?i.getLast():(i=e[a].getParent(),(i=i.getNext())?i.getChild(0):null)}function n(t,n){for(var i=e(t),o=i[0],a=o.getAscendant("table"),r=o.getDocument(),s=i[0].getParent(),l=s.$.rowIndex,c=i[i.length-1],d=c.getParent().$.rowIndex+c.$.rowSpan-1,u=new CKEDITOR.dom.element(a.$.rows[d]),p=n?l:d,m=n?s:u,g=CKEDITOR.tools.buildTableMap(a),h=g[p],f=n?g[p-1]:g[p+1],y=g[0].length,E=r.createElement("tr"),b=0;h[b]&&b<y;b++){var v;h[b].rowSpan>1&&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;h<m.length;h++){var f=new CKEDITOR.dom.element(m[h]),y=f.getParent().$.rowIndex;if(1==f.$.rowSpan)f.remove();else if(f.$.rowSpan-=1,y==p){var E=r[p+1];E[h-1]?f.insertAfter(new CKEDITOR.dom.element(E[h-1])):new CKEDITOR.dom.element(a.$.rows[p+1]).append(f,1)}h+=f.$.colSpan-1}u.push(g)}var b=a.$.rows,v=new CKEDITOR.dom.element(b[d+1]||(l>0?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;a<i.length;a++){var r=i[a];if(o+=t?1:r.colSpan,r==e.$)break}return o-1}function a(e,t){for(var n=t?1/0:0,i=0;i<e.length;i++){var a=o(e[i],t);(t?a<n:a>n)&&(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;g<m;g++){u.push(d[g][c]);var h=n?d[g][c-1]:d[g][c+1];p.push(h)}for(g=0;g<m;g++){var f;u[g]&&(u[g].colSpan>1&&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<u;d++)for(var p=0,m=l[d].length;p<m;p++)l[d][p]==a.$&&(n=p),l[d][p]==r.$&&(i=p);for(d=n;d<=i;d++)for(p=0;p<l.length;p++){var g=l[p],h=new CKEDITOR.dom.element(s.$.rows[p]),f=new CKEDITOR.dom.element(g[d]);f.$&&(1==f.$.colSpan?f.remove():f.$.colSpan-=1,p+=f.$.rowSpan-1,h.$.cells.length||c.push(h))}var y=s.$.rows[0]&&s.$.rows[0].cells,E=new CKEDITOR.dom.element(y[n]||(n?y[n-1]:s.$.parentNode));return c.length==u&&s.remove(),E}function l(e,t){var n=e.getStartElement(),i=n.getAscendant("td",1)||n.getAscendant("th",1);if(i){var o=i.clone();o.appendBogus(),t?o.insertBefore(i):o.insertAfter(i)}}function c(n){if(n instanceof CKEDITOR.dom.selection){for(var i=e(n),o=i[0]&&i[0].getAscendant("table"),a=t(i),r=i.length-1;r>=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&&o<i.length;o++){if(n.is&&i[o]==n.$)return o;if(o==n)return new CKEDITOR.dom.element(i[o])}return n.is?-1:null}function m(e,t){for(var n=[],i=0;i<e.length;i++){var o=e[i];n.push(o[t]),o[t].rowSpan>1&&(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<a.length;I++){r=a[I];var D=r.getParent(),S=r.getFirst(),k=r.$.colSpan,w=r.$.rowSpan,O=D.$.rowIndex,x=p(c,O,r);if(A+=k*w,C=Math.max(C,x-h+k),T=Math.max(T,O-g+w),!i){if(d(r),r.getChildren().count()){if(O!=R&&S&&(!S.isBlockBoundary||!S.isBlockBoundary({br:1}))){var P=_.getLast(CKEDITOR.dom.walker.whitespaces(!0));!P||P.is&&P.is("br")||_.append("br")}r.moveChildren(_)}I?r.remove():r.setHtml("")}R=O}if(i)return T*C==A;_.moveChildren(s),s.appendBogus(),C>=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;b<E.length;b++){if(f=E[b],f.parentNode==y.$&&b>g){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;R<v.length;R++)v[R].rowSpan++}return o.appendBogus(),l.$.rowSpan=a,o.$.rowSpan=r,1==a&&l.removeAttribute("rowSpan"),1==r&&o.removeAttribute("rowSpan"),o}function f(t,n){var i=e(t);if(i.length>1)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<f.length;y++)f[y].colSpan++}return o=s.clone(),o.insertAfter(s),o.appendBogus(),s.$.colSpan=a,o.$.colSpan=r,1==a&&s.removeAttribute("colSpan"),1==r&&o.removeAttribute("colSpan"),o}if(!CKEDITOR.plugins.get("ae_tabletools")){var y=/^(?:td|th)$/;CKEDITOR.plugins.add("ae_tabletools",{init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function o(t,n){var i=e.getCommand(t);i||(i=e.addCommand(t,n),e.addFeature(i))}e.lang.table;o("rowDelete",t({requiredContent:"table",exec:function(e){var t=e.getSelection();u(i(t))}})),o("rowInsertBefore",t({requiredContent:"table",exec:function(e){var t=e.getSelection();n(t,!0)}})),o("rowInsertAfter",t({requiredContent:"table",exec:function(e){var t=e.getSelection();n(t)}})),o("columnDelete",t({requiredContent:"table",exec:function(e){var t=e.getSelection(),n=s(t);n&&u(n,!0)}})),o("columnInsertBefore",t({requiredContent:"table",exec:function(e){var t=e.getSelection();r(t,!0)}})),o("columnInsertAfter",t({requiredContent:"table",exec:function(e){var t=e.getSelection();r(t)}})),o("cellDelete",t({requiredContent:"table",exec:function(e){var t=e.getSelection();c(t)}})),o("cellMerge",t({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(e){u(g(e.getSelection()),!0)}})),o("cellMergeRight",t({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){u(g(e.getSelection(),"right"),!0)}})),o("cellMergeDown",t({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){u(g(e.getSelection(),"down"),!0)}})),o("cellVerticalSplit",t({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){u(h(e.getSelection()))}})),o("cellHorizontalSplit",t({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){u(f(e.getSelection()))}})),o("cellInsertBefore",t({requiredContent:"table",exec:function(e){var t=e.getSelection();l(t,!0)}})),o("cellInsertAfter",t({requiredContent:"table",exec:function(e){var t=e.getSelection();l(t)}}))},getSelectedCells:e})}}(),CKEDITOR.tools.buildTableMap=function(e){for(var t=e.$.rows,n=-1,i=[],o=0;o<t.length;o++){n++,!i[n]&&(i[n]=[]);for(var a=-1,r=0;r<t[o].cells.length;r++){var s=t[o].cells[r];for(a++;i[n][a];)a++;for(var l=isNaN(s.colSpan)?1:s.colSpan,c=isNaN(s.rowSpan)?1:s.rowSpan,d=0;d<c;d++){i[n+d]||(i[n+d]=[]);for(var u=0;u<l;u++)i[n+d][a+u]=t[o].cells[r]}a+=l-1}}return 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="ae-button ae-button-bridge",o=i[t.name][e].name||i[t.name][e].command||e,a=i[t.name][e].label,r="button-"+o,s="ae-icon-"+o,l={},c=CKEDITOR.skin.getIconStyle(o);if(c){var d=c.split(";");l.backgroundImage=d[0].substring(d[0].indexOf(":")+1),l.backgroundPosition=d[1].substring(d[1].indexOf(":")+1),l.backgroundSize=d[2].substring(d[2].indexOf(":")+1)}return React.createElement("button",{"aria-label":a,className:n,"data-type":r,onClick:this._handleClick,tabIndex:this.props.tabIndex,title:a},React.createElement("span",{className:s,style:l}))},_handleClick:function(t){var n=this.props.editor.get("nativeEditor"),o=i[n.name][e].command,a=i[n.name][e].onClick;a?a.call(this):n.execCommand(o),n.fire("actionPerformed",this)}})),AlloyEditor.Buttons[e]=a),a}if(!CKEDITOR.plugins.get("ae_buttonbridge")){var n={toFeature:e},i={};CKEDITOR.plugins.get("button")||(CKEDITOR.UI_BUTTON="button",CKEDITOR.plugins.add("button",{})),CKEDITOR.plugins.add("ae_buttonbridge",{requires:["ae_uibridge"],init:function(e){e.ui.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)},e.ui.addHandler(CKEDITOR.UI_BUTTON,{add:t,create:function(e){var n="buttonBridge"+(1e9*Math.random()>>>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<t.length;o++)n[t[o]]=o+1;e.addMenuGroup=function(e,t){n[e]=t||100},e.addMenuItem=function(e,t){n[t.group]&&(i[e]={name:e,definition:t})},e.addMenuItems=function(e){for(var t in e)this.addMenuItem(t,e[t])},e.getMenuItem=function(e){return i[e]},e.removeMenuItem=function(e){delete i[e]}}}})}(),function(){function e(){}if(!CKEDITOR.plugins.get("ae_panelmenubuttonbridge")){var t={createPanel: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,a||(a=React.createClass(CKEDITOR.tools.merge(t,{displayName:e,propTypes:{editor:React.PropTypes.object.isRequired},statics:{key:e},render:function(){var t=this.props.editor.get("nativeEditor"),i=n[t.name][e].name||n[t.name][e].command||e,o="ae-button ae-button-bridge",a="ae-icon-"+i,r={},s=CKEDITOR.skin.getIconStyle(i);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._getPanel()),React.createElement("div",{className:"ae-container ae-has-dropdown"},React.createElement("button",{"aria-expanded":this.props.expanded,"aria-label":n[t.name][e].label,className:o,onClick:this.props.toggleDropdown,role:"combobox",tabIndex:this.props.tabIndex,title:n[t.name][e].label},React.createElement("span",{className:a,style:r})),c)},_getPanel:function(){var t=this.props.editor.get("nativeEditor"),i=n[t.name][e].onBlock,o={hide:this.props.toggleDropdown,show:this.props.toggleDropdown},a=new CKEDITOR.dom.element("div"),r={element:a,keys:{}};return i&&i.call(this,o,r),React.createElement(AlloyEditor.ButtonDropdown,{onDismiss:this.props.toggleDropdown},React.createElement("div",{className:a.getAttribute("class"),dangerouslySetInnerHTML:{__html:a.getHtml()}}))}})),AlloyEditor.Buttons[e]=a),a};CKEDITOR.plugins.get("panelmenubutton")||(CKEDITOR.UI_PANELBUTTON="panelmenubutton",CKEDITOR.plugins.add("panelmenubutton",{})),CKEDITOR.plugins.add("ae_panelmenubuttonbridge",{requires:["ae_uibridge"],init:function(e){e.ui.addPanelMenuButton=function(e,t){this.add(e,CKEDITOR.UI_PANELBUTTON,t)},e.ui.addHandler(CKEDITOR.UI_PANELBUTTON,{add:i,create:function(e){var t="panelMenuButtonBridge"+(1e9*Math.random()>>>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);
  867. 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<n.length;o++){var a=n[o];a.apply(this,t)}}}),AlloyEditor.Base=e}(),function(){var e=function(){return"ae-arrow-box ae-arrow-box-bottom"};AlloyEditor.SelectionGetArrowBoxClasses={table:e}}(),function(){var e={left:0,top:0},t=function(t,n){var i=ReactDOM.findDOMNode(t),o=i.offsetWidth/2,a=new CKEDITOR.dom.window(window).getScrollPosition(),r=t.props.gutter||e,s=t.getWidgetXYPoint(n.left+n.width/2-a.x,n.top+a.y,CKEDITOR.SELECTION_BOTTOM_TO_TOP);t.moveToPoint([s[0],s[1]],[n.left+n.width/2-o-a.x,n.top-i.offsetHeight+a.y-r.top])},n=function(e){return t(this,e.selectionData.element.getClientRect()),!0},i=function(e){var n=e.editor.get("nativeEditor"),i=new CKEDITOR.Table(n).getFromSelection();return t(this,i.getClientRect()),!0};AlloyEditor.SelectionSetPosition={image:n,table:i}}(),function(){var e=function(e,t){return t.getText().length===e.endOffset||t.equals(e.startContainer)&&t.equals(e.endContainer)&&e.startOffset===e.endOffset&&1===e.endOffset},t=function(e){var t=e.data.selectionData;return!(!t.element||"ae_embed"!==t.element.getAttribute("data-widget"))},n=function(t){var n,i=t.editor.get("nativeEditor"),o=i.getSelection().getRanges()[0];return!(!i.isSelectionEmpty()||!(n=new CKEDITOR.Link(i).getFromSelection())||n.getText().length===o.endOffset||n.isReadOnly()||e(o,n))},i=function(e){var t=e.data.selectionData;return!(!t.element||"img"!==t.element.getName()||t.element.isReadOnly())},o=function(e){var t=e.editor.get("nativeEditor"),n=t.isSelectionEmpty(),i=e.data.selectionData;return!(i.element||!i.region||n||t.getSelection().getCommonAncestor().isReadOnly())},a=function(e){var t=e.editor.get("nativeEditor"),n=new CKEDITOR.Table(t),i=n.getFromSelection();return!(!i||!n.isEditable(i))};AlloyEditor.SelectionTest={embed:t,image:i,link:n,table:a,text:o}}(),function(){var e=[{name:"embed",buttons:["embedRemove","embedEdit"],test:AlloyEditor.SelectionTest.embed},{name:"link",buttons:["linkEdit"],test:AlloyEditor.SelectionTest.link},{name:"image",buttons:["imageLeft","imageCenter","imageRight"],setPosition:AlloyEditor.SelectionSetPosition.image,test:AlloyEditor.SelectionTest.image},{name:"text",buttons:["styles","bold","italic","underline","link","twitter"],test:AlloyEditor.SelectionTest.text},{name:"table",buttons:["tableHeading","tableRow","tableColumn","tableCell","tableRemove"],getArrowBoxClasses:AlloyEditor.SelectionGetArrowBoxClasses.table,setPosition:AlloyEditor.SelectionSetPosition.table,test:AlloyEditor.SelectionTest.table}];AlloyEditor.Selections=e}(),function(){function e(t){e.superclass.constructor.call(this,t)}AlloyEditor.OOP.extend(e,AlloyEditor.Base,{initializer:function(e){var t=this.get("srcNode");this.get("enableContentEditable")&&t.setAttribute("contenteditable","true");var n=CKEDITOR.inline(t);n.config.allowedContent=this.get("allowedContent"),n.config.toolbars=this.get("toolbars"),n.config.removePlugins=this.get("removePlugins"),n.config.extraPlugins=this.get("extraPlugins"),n.config.placeholderClass=this.get("placeholderClass"),n.config.pasteFromWordRemoveStyles=!1,n.config.pasteFromWordRemoveFontStyles=!1,n.config.selectionKeystrokes=this.get("selectionKeystrokes"),CKEDITOR.env.ie&&(n.config.extraPlugins=n.config.extraPlugins.replace("ae_dragresize","ae_dragresize_ie"),n.config.removePlugins=n.config.removePlugins.replace("ae_dragresize","ae_dragresize_ie")),AlloyEditor.Lang.mix(n.config,e),n.once("contentDom",function(){this._addReadOnlyLinkClickListener(n);var e=n.editable();e.addClass("ae-editable")}.bind(this)),AlloyEditor.loadLanguageResources(this._renderUI.bind(this)),this._editor=n},destructor:function(){this._destroyed=!0,this._editorUIElement&&(ReactDOM.unmountComponentAtNode(this._editorUIElement),this._editorUIElement.parentNode.removeChild(this._editorUIElement));var e=this.get("nativeEditor");if(e){var t=e.editable();t&&(t.removeClass("ae-editable"),this.get("enableContentEditable")&&this.get("srcNode").setAttribute("contenteditable","false")),this._clearSelections(),e.destroy()}},_clearSelections:function(){var e=this.get("nativeEditor"),t="function"!=typeof window.getSelection;t?e.document.$.selection.empty():e.document.getWindow().$.getSelection().removeAllRanges()},_addReadOnlyLinkClickListener:function(e){e.editable().on("click",this._defaultReadOnlyClickFn,this,{editor:e})},_defaultReadOnlyClickFn:function(e){var t=e.data.$,n=t.ctrlKey||t.metaKey,i=this._editor.config.readOnly||n;if(t.preventDefault(),i&&e.listenerData.editor.editable().editor.fire("readOnlyClick",e.data)!==!1){var o=new CKEDITOR.dom.elementPath(e.data.getTarget(),this),a=o.lastElement;if(a){var r=a.$.attributes.href?a.$.attributes.href.value:null,s=n?"_blank":a.$.attributes.target?a.$.attributes.target.value:null;this._redirectLink(r,s)}}},_getNativeEditor:function(){return this._editor},_redirectLink:function(e,t){t&&e?window.open(e,t):e&&(window.location.href=e)},_renderUI:function(){if(!this._destroyed){var e=document.createElement("div");e.className="ae-ui";var t=this.get("uiNode")||document.body;t.appendChild(e),this._mainUI=ReactDOM.render(React.createElement(AlloyEditor.UI,{editor:this,eventsDelay:this.get("eventsDelay"),toolbars:this.get("toolbars")}),e),this._editorUIElement=e,this.get("nativeEditor").fire("uiReady")}},_toElement:function(e){return AlloyEditor.Lang.isString(e)&&(e=document.getElementById(e)),e},_validateAllowedContent:function(e){return AlloyEditor.Lang.isString(e)||AlloyEditor.Lang.isObject(e)||AlloyEditor.Lang.isBoolean(e)},_validateToolbars:function(e){return AlloyEditor.Lang.isObject(e)||AlloyEditor.Lang.isNull(e)}},{ATTRS:{allowedContent:{validator:"_validateAllowedContent",value:!0,writeOnce:!0},enableContentEditable:{validator:AlloyEditor.Lang.isBoolean,value:!0,writeOnce:!0},eventsDelay:{validator:AlloyEditor.Lang.isNumber,value:100},extraPlugins:{validator:AlloyEditor.Lang.isString,value:"ae_uicore,ae_selectionregion,ae_selectionkeystrokes,ae_imagealignment,ae_addimages,ae_placeholder,ae_tabletools,ae_tableresize,ae_autolink,ae_embed,ae_autolist,ae_dragresize",writeOnce:!0},nativeEditor:{getter:"_getNativeEditor",readOnly:!0},placeholderClass:{validator:AlloyEditor.Lang.isString,value:"ae-placeholder",writeOnce:!0},removePlugins:{validator:AlloyEditor.Lang.isString,value:"contextmenu,toolbar,elementspath,resize,liststyle,link",writeOnce:!0},selectionKeystrokes:{validator:AlloyEditor.Lang.isArray,value:[{keys:CKEDITOR.CTRL+76,selection:"link"},{keys:CKEDITOR.CTRL+CKEDITOR.SHIFT+76,selection:"embed"}]},srcNode:{setter:"_toElement",writeOnce:!0},toolbars:{validator:"_validateToolbars",value:{add:{buttons:["image","embed","camera","hline","table"],tabIndex:2},styles:{selections:AlloyEditor.Selections,tabIndex:1}}},uiNode:{setter:"_toElement",writeOnce:!0}}}),CKEDITOR.event.implementOn(e),AlloyEditor.Core=e}(),function(){var e={applyStyle:function(){if(AlloyEditor.Lang.isFunction(this.isActive)&&AlloyEditor.Lang.isFunction(this.getStyle)){var e=this.props.editor.get("nativeEditor");e.getSelection().lock(),this.isActive()?e.removeStyle(this.getStyle()):e.applyStyle(this.getStyle()),e.getSelection().unlock(),e.fire("actionPerformed",this)}}};AlloyEditor.ButtonActionStyle=e}(),function(){var e={isActive:function(){var e=this.props.editor.get("nativeEditor"),t=e.getCommand(this.props.command);return!!t&&t.state===CKEDITOR.TRISTATE_ON}};AlloyEditor.ButtonCommandActive=e}(),function(){var e={propTypes:{command:React.PropTypes.string.isRequired,modifiesSelection:React.PropTypes.bool},execCommand:function(e){var t=this.props.editor.get("nativeEditor");t.execCommand(this.props.command,e),this.props.modifiesSelection&&t.selectionChange(!0),t.fire("actionPerformed",this)}};AlloyEditor.ButtonCommand=e}(),function(){var e={propTypes:{keystroke:React.PropTypes.object.isRequired},componentWillMount:function(){var e=this.props.editor.get("nativeEditor"),t=this.props.keystroke,n=t.name||(1e9*Math.random()>>>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(o<t&&a>t)n=t;else{var r=Math.abs(o-t),s=Math.abs(a-t);n=r<s?o:a}return n},_getYPoint:function(e,t){var n=0;if(e&&t){var i=new CKEDITOR.dom.element(t.target);n=i.$&&"auto"===i.getStyle("overflow")?t.target.offsetTop+t.target.offsetHeight:e.region.bottom}return n}};AlloyEditor.WidgetInteractionPoint=e}(),function(){var e={mixins:[AlloyEditor.WidgetInteractionPoint],propTypes:{constrainToViewport:React.PropTypes.bool,gutter:React.PropTypes.object},getDefaultProps:function(){return{gutter:{left:0,top:10},constrainToViewport:!0}},cancelAnimation:function(){window.cancelAnimationFrame&&window.cancelAnimationFrame(this._animationFrameId)},getConstrainedPosition:function(e,t){t=t||new CKEDITOR.dom.window(window).getViewPaneSize();var n=e.left,i=e.top;return e.left+e.width>t.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('<img src="'+a+'">'),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",
  868. 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('<img src="'+e.target.result+'">');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,
  869. 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}();
  870. }
  871. }());
  872. /* ---- /1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8/alloy-editor/alloy-editor-config.js ---- */
  873. CKEDITOR.lang['en'] = {"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"<not set>","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"General","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"You have changed some options. Are you sure you want to close the dialog window?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","alignLeft":"Left","alignRight":"Right","alignCenter":"Center","alignJustify":"Justify","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","alignNone":"None","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1<span class=\"cke_accessibility\">, unavailable</span>","keyboard":{"8":"Backspace","13":"Enter","16":"Shift","17":"Ctrl","18":"Alt","32":"Space","35":"End","36":"Home","46":"Delete","224":"Command"},"keyboardShortcut":"Keyboard shortcut"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"blockquote":{"toolbar":"Block Quote"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteArea":"Paste Area","pasteMsg":"Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"Paste"},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"justify":{"block":"Justify","center":"Center","left":"Align Left","right":"Align Right"},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"removeformat":{"toolbar":"Remove Format"},"undo":{"redo":"Redo","undo":"Undo"},"widget":{"move":"Click and drag to move","label":"%1 widget"}};
  874. CKEDITOR.config.stylesSet = []; // We don't need styles.js
  875. CKEDITOR.document.appendStyleSheet = function(e) { return e }; // We load editor.css manually
  876. AlloyEditor.Strings = {"alignCenter":"Center","alignJustify":"Justify","alignLeft":"Left","alignRight":"Right","bold":"Bold","bulletedlist":"Insert/Remove Bulleted List","cancel":"Cancel","horizontalrule":"Insert Horizontal Line","italic":"Italic","numberedlist":"Insert/Remove Numbered List","quote":"Block Quote","removeformat":"Remove Format","strike":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline","formatted":"Formatted","h1":"Heading 1","h2":"Heading 2","normal":"Normal","blockStyles":"Block Styles","inlineStyles":"Inline Styles","objectStyles":"Object Styles","styles":"Styles","cell":"Cell","cellDelete":"Delete Cells","cellInsertAfter":"Insert Cell After","cellInsertBefore":"Insert Cell Before","cellMerge":"Merge Cells","cellMergeDown":"Merge Down","cellMergeRight":"Merge Right","cellSplitHorizontal":"Split Cell Horizontally","cellSplitVertical":"Split Cell Vertically","column":"Column","columnDelete":"Delete Columns","columnInsertAfter":"Insert Column After","columnInsertBefore":"Insert Column Before","deleteTable":"Delete Table","row":"Row","rowDelete":"Delete Rows","rowInsertAfter":"Insert Row After","rowInsertBefore":"Insert Row Before","add":"Add","ariaUpdateNoToolbar":"No toolbars are available","ariaUpdateOneToolbar":"{toolbars} toolbar is available. Press ALT+F10 to focus.","ariaUpdateManyToolbars":"{toolbars} toolbars are available. Press ALT+F10 to focus.","camera":"Insert Image from Camera","cite":"Cite","code":"Code","clearInput":"Clear Input Field","confirm":"Confirm","editLink":"Type or paste link here","image":"Insert Image","link":"Link","removeLink":"Remove link","table":"Insert Table","twitter":"Twitter","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","linkTargetBlank":"_blank (new tab)","linkTargetDefault":"default","linkTargetParent":"_parent","linkTargetSelf":"_self (same tab)","linkTargetTop":"_top","cameraDisabled":"The browser does not support this action, or it is available on https only (Chrome).","indent":"Increase Indent","outdent":"Decrease Indent","deleteEmbed":"Delete embed","columns":"Cols","rows":"Rows"};
  877. AlloyEditor._langResourceRequested = true; // We include en.js
  878. // Inline code button
  879. React = AlloyEditor.React;
  880. var ButtonInlineCode = React.createClass({
  881. displayName: 'ButtonInlineCode',
  882. mixins: [AlloyEditor.ButtonStyle, AlloyEditor.ButtonStateClasses, AlloyEditor.ButtonActionStyle],
  883. propTypes: {
  884. editor: React.PropTypes.object.isRequired,
  885. label: React.PropTypes.string,
  886. tabIndex: React.PropTypes.number
  887. },
  888. statics: {
  889. key: 'inlinecode'
  890. },
  891. getDefaultProps: function getDefaultProps() {
  892. return {
  893. style: {
  894. element: 'code'
  895. }
  896. };
  897. },
  898. render: function render() {
  899. var cssClass = 'ae-button ' + this.getStateClasses();
  900. return React.createElement(
  901. 'button',
  902. { 'aria-label': AlloyEditor.Strings.code, 'aria-pressed': cssClass.indexOf('pressed') !== -1, className: cssClass, 'data-type': 'button-code', onClick: this.applyStyle, tabIndex: this.props.tabIndex, title: AlloyEditor.Strings.code },
  903. React.createElement('span', { className: 'ae-icon-code' })
  904. );
  905. }
  906. });
  907. AlloyEditor.Buttons[ButtonInlineCode.key] = AlloyEditor.ButtonInlineCode = ButtonInlineCode;
  908. var ButtonH3 = React.createClass({
  909. displayName: 'ButtonH3',
  910. mixins: [AlloyEditor.ButtonStyle, AlloyEditor.ButtonStateClasses, AlloyEditor.ButtonActionStyle],
  911. propTypes: {
  912. editor: React.PropTypes.object.isRequired,
  913. label: React.PropTypes.string,
  914. tabIndex: React.PropTypes.number
  915. },
  916. statics: {
  917. key: 'h3'
  918. },
  919. getDefaultProps: function getDefaultProps() {
  920. return {
  921. style: {
  922. element: 'h3'
  923. }
  924. };
  925. },
  926. render: function render() {
  927. var cssClass = 'ae-button ' + this.getStateClasses();
  928. return React.createElement(
  929. 'button',
  930. { 'aria-label': AlloyEditor.Strings.h3, 'aria-pressed': cssClass.indexOf('pressed') !== -1, className: cssClass, 'data-type': 'button-h3', onClick: this.applyStyle, tabIndex: this.props.tabIndex, title: "Heading 3" },
  931. React.createElement('span', { className: 'ae-icon-h3' })
  932. );
  933. }
  934. });
  935. AlloyEditor.Buttons[ButtonH3.key] = AlloyEditor.ButtonH3 = ButtonH3;
  936. selections = AlloyEditor.Selections
  937. selections.unshift({
  938. name: 'text',
  939. buttons: ['bold', 'italic', 'strike', 'inlinecode', 'link'],
  940. test: AlloyEditor.SelectionTest.text
  941. })
  942. // Remove Image toolbar
  943. AlloyEditor.Core.ATTRS.toolbars.value.styles.selections.forEach(
  944. function(selection, i, selections) {
  945. if (selection.name == "image") selections.splice(i, 1)
  946. }
  947. )
  948. // Other settings
  949. CKEDITOR.config.language = "en"
  950. CKEDITOR.config.title = ""
  951. CKEDITOR.config.fullPage = true
  952. CKEDITOR.config.pasteFromWordRemoveFontStyles = true
  953. CKEDITOR.config.removePlugins = "dragdrop"
  954. AlloyEditor.Core.ATTRS.removePlugins.value += ',ae_embed,ae_imagealignment,ae_dragresize'
  955. AlloyEditor.Buttons.linkEdit.defaultProps.appendProtocol = false
  956. CKEDITOR.config.buttonCfg = {
  957. buttonLinkEdit: {
  958. appendProtocol: false
  959. }
  960. }
  961. AlloyEditor.Core.ATTRS.toolbars.value = {
  962. add: {
  963. buttons: ['h2', 'h3', 'quote', 'code', 'hline', 'table', 'image'],
  964. tabIndex: 2
  965. },
  966. styles: {
  967. selections: selections,
  968. tabIndex: 1
  969. }
  970. }
  971. CKEDITOR.config.customConfig = "";
  972. // Helpers
  973. function createSelectionFromPoint(startX, startY, endX, endY) { // Select text based on x y coordinates
  974. var doc = document;
  975. var start, end, range = null;
  976. if (typeof doc.caretPositionFromPoint != "undefined") {
  977. start = doc.caretPositionFromPoint(startX, startY);
  978. end = doc.caretPositionFromPoint(endX, endY);
  979. range = doc.createRange();
  980. range.setStart(start.offsetNode, start.offset);
  981. range.setEnd(end.offsetNode, end.offset);
  982. } else if (typeof doc.caretRangeFromPoint != "undefined") {
  983. start = doc.caretRangeFromPoint(startX, startY);
  984. end = doc.caretRangeFromPoint(endX, endY);
  985. range = doc.createRange();
  986. range.setStart(start.startContainer, start.startOffset);
  987. range.setEnd(end.startContainer, end.startOffset);
  988. }
  989. if (range !== null && typeof window.getSelection != "undefined") {
  990. var sel = window.getSelection();
  991. sel.removeAllRanges();
  992. sel.addRange(range);
  993. } else if (typeof doc.body.createTextRange != "undefined") {
  994. range = doc.body.createTextRange();
  995. range.moveToPoint(startX, startY);
  996. var endRange = range.duplicate();
  997. endRange.moveToPoint(endX, endY);
  998. range.setEndPoint("EndToEnd", endRange);
  999. range.select();
  1000. }
  1001. }
  1002. function selectElement(editor, elem) { // Select CKEditor element
  1003. var range = new CKEDITOR.dom.range(editor.document);
  1004. range.moveToElementEditablePosition(elem, true);
  1005. range.setStart(elem, 0)
  1006. range.setEnd(elem, elem.getChildCount())
  1007. editor.getSelection().selectRanges([range]);
  1008. }
  1009. /* ---- /1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8/alloy-editor/to-markdown.js ---- */
  1010. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toMarkdown = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  1011. /*
  1012. * to-markdown - an HTML to Markdown converter
  1013. *
  1014. * Copyright 2011+, Dom Christie
  1015. * Licenced under the MIT licence
  1016. *
  1017. */
  1018. 'use strict'
  1019. var toMarkdown
  1020. var converters
  1021. var mdConverters = require('./lib/md-converters')
  1022. var gfmConverters = require('./lib/gfm-converters')
  1023. var HtmlParser = require('./lib/html-parser')
  1024. var collapse = require('collapse-whitespace')
  1025. /*
  1026. * Utilities
  1027. */
  1028. var blocks = ['address', 'article', 'aside', 'audio', 'blockquote', 'body',
  1029. 'canvas', 'center', 'dd', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption',
  1030. 'figure', 'footer', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
  1031. 'header', 'hgroup', 'hr', 'html', 'isindex', 'li', 'main', 'menu', 'nav',
  1032. 'noframes', 'noscript', 'ol', 'output', 'p', 'pre', 'section', 'table',
  1033. 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'
  1034. ]
  1035. function isBlock (node) {
  1036. return blocks.indexOf(node.nodeName.toLowerCase()) !== -1
  1037. }
  1038. var voids = [
  1039. 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input',
  1040. 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'
  1041. ]
  1042. function isVoid (node) {
  1043. return voids.indexOf(node.nodeName.toLowerCase()) !== -1
  1044. }
  1045. function htmlToDom (string) {
  1046. var tree = new HtmlParser().parseFromString(string, 'text/html')
  1047. collapse(tree.documentElement, isBlock)
  1048. return tree
  1049. }
  1050. /*
  1051. * Flattens DOM tree into single array
  1052. */
  1053. function bfsOrder (node) {
  1054. var inqueue = [node]
  1055. var outqueue = []
  1056. var elem
  1057. var children
  1058. var i
  1059. while (inqueue.length > 0) {
  1060. elem = inqueue.shift()
  1061. outqueue.push(elem)
  1062. children = elem.childNodes
  1063. for (i = 0; i < children.length; i++) {
  1064. if (children[i].nodeType === 1) inqueue.push(children[i])
  1065. }
  1066. }
  1067. outqueue.shift()
  1068. return outqueue
  1069. }
  1070. /*
  1071. * Contructs a Markdown string of replacement text for a given node
  1072. */
  1073. function getContent (node) {
  1074. var text = ''
  1075. for (var i = 0; i < node.childNodes.length; i++) {
  1076. if (node.childNodes[i].nodeType === 1) {
  1077. text += node.childNodes[i]._replacement
  1078. } else if (node.childNodes[i].nodeType === 3) {
  1079. text += node.childNodes[i].data
  1080. } else continue
  1081. }
  1082. return text
  1083. }
  1084. /*
  1085. * Returns the HTML string of an element with its contents converted
  1086. */
  1087. function outer (node, content) {
  1088. return node.cloneNode(false).outerHTML.replace('><', '>' + content + '<')
  1089. }
  1090. function canConvert (node, filter) {
  1091. if (typeof filter === 'string') {
  1092. return filter === node.nodeName.toLowerCase()
  1093. }
  1094. if (Array.isArray(filter)) {
  1095. return filter.indexOf(node.nodeName.toLowerCase()) !== -1
  1096. } else if (typeof filter === 'function') {
  1097. return filter.call(toMarkdown, node)
  1098. } else {
  1099. throw new TypeError('`filter` needs to be a string, array, or function')
  1100. }
  1101. }
  1102. function isFlankedByWhitespace (side, node) {
  1103. var sibling
  1104. var regExp
  1105. var isFlanked
  1106. if (side === 'left') {
  1107. sibling = node.previousSibling
  1108. regExp = / $/
  1109. } else {
  1110. sibling = node.nextSibling
  1111. regExp = /^ /
  1112. }
  1113. if (sibling) {
  1114. if (sibling.nodeType === 3) {
  1115. isFlanked = regExp.test(sibling.nodeValue)
  1116. } else if (sibling.nodeType === 1 && !isBlock(sibling)) {
  1117. isFlanked = regExp.test(sibling.textContent)
  1118. }
  1119. }
  1120. return isFlanked
  1121. }
  1122. function flankingWhitespace (node, content) {
  1123. var leading = ''
  1124. var trailing = ''
  1125. if (!isBlock(node)) {
  1126. var hasLeading = /^[ \r\n\t]/.test(content)
  1127. var hasTrailing = /[ \r\n\t]$/.test(content)
  1128. if (hasLeading && !isFlankedByWhitespace('left', node)) {
  1129. leading = ' '
  1130. }
  1131. if (hasTrailing && !isFlankedByWhitespace('right', node)) {
  1132. trailing = ' '
  1133. }
  1134. }
  1135. return { leading: leading, trailing: trailing }
  1136. }
  1137. /*
  1138. * Finds a Markdown converter, gets the replacement, and sets it on
  1139. * `_replacement`
  1140. */
  1141. function process (node) {
  1142. var replacement
  1143. var content = getContent(node)
  1144. // Remove blank nodes
  1145. if (!isVoid(node) && !/A|TH|TD/.test(node.nodeName) && /^\s*$/i.test(content)) {
  1146. node._replacement = ''
  1147. return
  1148. }
  1149. for (var i = 0; i < converters.length; i++) {
  1150. var converter = converters[i]
  1151. if (canConvert(node, converter.filter)) {
  1152. if (typeof converter.replacement !== 'function') {
  1153. throw new TypeError(
  1154. '`replacement` needs to be a function that returns a string'
  1155. )
  1156. }
  1157. var whitespace = flankingWhitespace(node, content)
  1158. if (whitespace.leading || whitespace.trailing) {
  1159. content = content.trim()
  1160. }
  1161. replacement = whitespace.leading +
  1162. converter.replacement.call(toMarkdown, content, node) +
  1163. whitespace.trailing
  1164. break
  1165. }
  1166. }
  1167. node._replacement = replacement
  1168. }
  1169. toMarkdown = function (input, options) {
  1170. options = options || {}
  1171. if (typeof input !== 'string') {
  1172. throw new TypeError(input + ' is not a string')
  1173. }
  1174. if (input === '') {
  1175. return ''
  1176. }
  1177. // Escape potential ol triggers
  1178. input = input.replace(/(\d+)\. /g, '$1\\. ')
  1179. var clone = htmlToDom(input).body
  1180. var nodes = bfsOrder(clone)
  1181. var output
  1182. converters = mdConverters.slice(0)
  1183. if (options.gfm) {
  1184. converters = gfmConverters.concat(converters)
  1185. }
  1186. if (options.converters) {
  1187. converters = options.converters.concat(converters)
  1188. }
  1189. // Process through nodes in reverse (so deepest child elements are first).
  1190. for (var i = nodes.length - 1; i >= 0; i--) {
  1191. process(nodes[i])
  1192. }
  1193. output = getContent(clone)
  1194. return output.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g, '')
  1195. .replace(/\n\s+\n/g, '\n\n')
  1196. .replace(/\n{3,}/g, '\n\n')
  1197. }
  1198. toMarkdown.isBlock = isBlock
  1199. toMarkdown.isVoid = isVoid
  1200. toMarkdown.outer = outer
  1201. module.exports = toMarkdown
  1202. },{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":7}],2:[function(require,module,exports){
  1203. 'use strict'
  1204. function cell (content, node) {
  1205. var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node)
  1206. var prefix = ' '
  1207. if (index === 0) prefix = '| '
  1208. return prefix + content + ' |'
  1209. }
  1210. var highlightRegEx = /lang-(\S+)/
  1211. module.exports = [
  1212. {
  1213. filter: 'br',
  1214. replacement: function () {
  1215. return '\n'
  1216. }
  1217. },
  1218. {
  1219. filter: ["main", "article", "section", "figure", "footer", "header", "body", "figcaption"],
  1220. replacement: function (content) {
  1221. return content
  1222. }
  1223. },
  1224. {
  1225. filter: ['del', 's', 'strike'],
  1226. replacement: function (content) {
  1227. return '~~' + content + '~~'
  1228. }
  1229. },
  1230. {
  1231. filter: function (node) {
  1232. return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'
  1233. },
  1234. replacement: function (content, node) {
  1235. return (node.checked ? '[x]' : '[ ]') + ' '
  1236. }
  1237. },
  1238. {
  1239. filter: ['th', 'td'],
  1240. replacement: function (content, node) {
  1241. return cell(content, node)
  1242. }
  1243. },
  1244. {
  1245. filter: 'tr',
  1246. replacement: function (content, node) {
  1247. var borderCells = ''
  1248. var alignMap = { left: ':--', right: '--:', center: ':-:' }
  1249. if (node.parentNode.nodeName === 'THEAD') {
  1250. for (var i = 0; i < node.childNodes.length; i++) {
  1251. var align = node.childNodes[i].attributes.align
  1252. var border = '---'
  1253. if (align) border = alignMap[align.value] || border
  1254. borderCells += cell(border, node.childNodes[i])
  1255. }
  1256. }
  1257. return '\n' + content + (borderCells ? '\n' + borderCells : '')
  1258. }
  1259. },
  1260. {
  1261. filter: 'table',
  1262. replacement: function (content) {
  1263. if (content.indexOf("-") == -1) {
  1264. var firstline = content.split("\n")[1]
  1265. console.log("table", content)
  1266. content = firstline.replace(/[^|]/g, " ") + "\n" + firstline.replace(/[^|]/g, "-") + content
  1267. }
  1268. return '\n\n' + content + '\n\n'
  1269. }
  1270. },
  1271. {
  1272. filter: ['thead', 'tbody', 'tfoot'],
  1273. replacement: function (content) {
  1274. return content
  1275. }
  1276. },
  1277. // Syntax-highlighted code blocks
  1278. {
  1279. filter: function (node) {
  1280. return node.nodeName === 'PRE' &&
  1281. node.firstChild &&
  1282. node.firstChild.nodeName === 'CODE' &&
  1283. highlightRegEx.test(node.firstChild.className)
  1284. },
  1285. replacement: function (content, node) {
  1286. var language = node.firstChild.className.match(highlightRegEx)[1]
  1287. return '\n\n```' + language + '\n' + node.innerText.trimRight() + '\n```\n\n'
  1288. }
  1289. },
  1290. // Fenced code blocks
  1291. {
  1292. filter: function (node) {
  1293. return node.nodeName === 'PRE' &&
  1294. node.firstChild &&
  1295. node.firstChild.nodeName === 'CODE'
  1296. },
  1297. replacement: function (content, node) {
  1298. return '\n\n```\n' + node.firstChild.innerText.trimRight() + '\n```\n\n'
  1299. }
  1300. },
  1301. // Fenced code blocks
  1302. {
  1303. filter: function (node) {
  1304. return node.nodeName === 'PRE'
  1305. },
  1306. replacement: function (content, node) {
  1307. return '\n\n```\n' + node.innerText.trimRight() + '\n```\n\n'
  1308. }
  1309. },
  1310. {
  1311. filter: function (node) {
  1312. return node.nodeName === 'DIV' &&
  1313. highlightRegEx.test(node.className)
  1314. },
  1315. replacement: function (content) {
  1316. return '\n\n' + content + '\n\n'
  1317. }
  1318. }
  1319. ]
  1320. },{}],3:[function(require,module,exports){
  1321. /*
  1322. * Set up window for Node.js
  1323. */
  1324. var _window = (typeof window !== 'undefined' ? window : this)
  1325. /*
  1326. * Parsing HTML strings
  1327. */
  1328. function canParseHtmlNatively () {
  1329. var Parser = _window.DOMParser
  1330. var canParse = false
  1331. // Adapted from https://gist.github.com/1129031
  1332. // Firefox/Opera/IE throw errors on unsupported types
  1333. try {
  1334. // WebKit returns null on unsupported types
  1335. if (new Parser().parseFromString('', 'text/html')) {
  1336. canParse = true
  1337. }
  1338. } catch (e) {}
  1339. return canParse
  1340. }
  1341. function createHtmlParser () {
  1342. var Parser = function () {}
  1343. // For Node.js environments
  1344. if (typeof document === 'undefined') {
  1345. var jsdom = require('jsdom')
  1346. Parser.prototype.parseFromString = function (string) {
  1347. return jsdom.jsdom(string, {
  1348. features: {
  1349. FetchExternalResources: [],
  1350. ProcessExternalResources: false
  1351. }
  1352. })
  1353. }
  1354. } else {
  1355. if (!shouldUseActiveX()) {
  1356. Parser.prototype.parseFromString = function (string) {
  1357. var doc = document.implementation.createHTMLDocument('')
  1358. doc.open()
  1359. doc.write(string)
  1360. doc.close()
  1361. return doc
  1362. }
  1363. } else {
  1364. Parser.prototype.parseFromString = function (string) {
  1365. var doc = new window.ActiveXObject('htmlfile')
  1366. doc.designMode = 'on' // disable on-page scripts
  1367. doc.open()
  1368. doc.write(string)
  1369. doc.close()
  1370. return doc
  1371. }
  1372. }
  1373. }
  1374. return Parser
  1375. }
  1376. function shouldUseActiveX () {
  1377. var useActiveX = false
  1378. try {
  1379. document.implementation.createHTMLDocument('').open()
  1380. } catch (e) {
  1381. if (window.ActiveXObject) useActiveX = true
  1382. }
  1383. return useActiveX
  1384. }
  1385. module.exports = canParseHtmlNatively() ? _window.DOMParser : createHtmlParser()
  1386. },{"jsdom":6}],4:[function(require,module,exports){
  1387. 'use strict'
  1388. module.exports = [
  1389. {
  1390. filter: 'p',
  1391. replacement: function (content) {
  1392. return '\n\n' + content + '\n\n'
  1393. }
  1394. },
  1395. {
  1396. filter: 'br',
  1397. replacement: function () {
  1398. return ' \n'
  1399. }
  1400. },
  1401. {
  1402. filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
  1403. replacement: function (content, node) {
  1404. var hLevel = node.nodeName.charAt(1)
  1405. var hPrefix = ''
  1406. for (var i = 0; i < hLevel; i++) {
  1407. hPrefix += '#'
  1408. }
  1409. return '\n\n' + hPrefix + ' ' + content + '\n\n'
  1410. }
  1411. },
  1412. {
  1413. filter: 'hr',
  1414. replacement: function () {
  1415. return '\n\n* * *\n\n'
  1416. }
  1417. },
  1418. {
  1419. filter: ['em', 'i'],
  1420. replacement: function (content) {
  1421. return '_' + content + '_'
  1422. }
  1423. },
  1424. {
  1425. filter: ['strong', 'b'],
  1426. replacement: function (content) {
  1427. return '**' + content + '**'
  1428. }
  1429. },
  1430. // Inline code
  1431. {
  1432. filter: function (node) {
  1433. var hasSiblings = node.previousSibling || node.nextSibling
  1434. var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings
  1435. return node.nodeName === 'CODE' && !isCodeBlock
  1436. },
  1437. replacement: function (content) {
  1438. return '`' + content + '`'
  1439. }
  1440. },
  1441. {
  1442. filter: function (node) {
  1443. return node.nodeName === 'A' && node.getAttribute('href')
  1444. },
  1445. replacement: function (content, node) {
  1446. var titlePart = node.title ? ' "' + node.title + '"' : ''
  1447. return '[' + content + '](' + node.getAttribute('href') + titlePart + ')'
  1448. }
  1449. },
  1450. {
  1451. filter: 'img',
  1452. replacement: function (content, node) {
  1453. var alt = node.alt || ''
  1454. var src = node.getAttribute('src') || ''
  1455. var title = node.title || ''
  1456. var titlePart = title ? ' "' + title + '"' : ''
  1457. return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''
  1458. }
  1459. },
  1460. // Code blocks
  1461. {
  1462. filter: function (node) {
  1463. return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE'
  1464. },
  1465. replacement: function (content, node) {
  1466. return '\n\n ' + node.firstChild.textContent.replace(/\n/g, '\n ') + '\n\n'
  1467. }
  1468. },
  1469. {
  1470. filter: 'blockquote',
  1471. replacement: function (content) {
  1472. content = content.trim()
  1473. content = content.replace(/\n{3,}/g, '\n\n')
  1474. content = content.replace(/^/gm, '> ')
  1475. return '\n\n' + content + '\n\n'
  1476. }
  1477. },
  1478. {
  1479. filter: 'li',
  1480. replacement: function (content, node) {
  1481. content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ')
  1482. var prefix = '* '
  1483. var parent = node.parentNode
  1484. var index = Array.prototype.indexOf.call(parent.children, node) + 1
  1485. prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '* '
  1486. return prefix + content
  1487. }
  1488. },
  1489. {
  1490. filter: ['ul', 'ol'],
  1491. replacement: function (content, node) {
  1492. var strings = []
  1493. for (var i = 0; i < node.childNodes.length; i++) {
  1494. strings.push(node.childNodes[i]._replacement)
  1495. }
  1496. if (/li/i.test(node.parentNode.nodeName)) {
  1497. return '\n' + strings.join('\n')
  1498. }
  1499. return '\n\n' + strings.join('\n') + '\n\n'
  1500. }
  1501. },
  1502. {
  1503. filter: function (node) {
  1504. return this.isBlock(node)
  1505. },
  1506. replacement: function (content, node) {
  1507. return '\n\n' + this.outer(node, content) + '\n\n'
  1508. }
  1509. },
  1510. // Anything else!
  1511. {
  1512. filter: function () {
  1513. return true
  1514. },
  1515. replacement: function (content, node) {
  1516. return this.outer(node, content)
  1517. }
  1518. }
  1519. ]
  1520. },{}],5:[function(require,module,exports){
  1521. /**
  1522. * This file automatically generated from `build.js`.
  1523. * Do not manually edit.
  1524. */
  1525. module.exports = [
  1526. "address",
  1527. "article",
  1528. "aside",
  1529. "audio",
  1530. "blockquote",
  1531. "canvas",
  1532. "dd",
  1533. "div",
  1534. "dl",
  1535. "fieldset",
  1536. "figcaption",
  1537. "figure",
  1538. "footer",
  1539. "form",
  1540. "h1",
  1541. "h2",
  1542. "h3",
  1543. "h4",
  1544. "h5",
  1545. "h6",
  1546. "header",
  1547. "hgroup",
  1548. "hr",
  1549. "main",
  1550. "nav",
  1551. "noscript",
  1552. "ol",
  1553. "output",
  1554. "p",
  1555. "pre",
  1556. "section",
  1557. "table",
  1558. "tfoot",
  1559. "ul",
  1560. "video"
  1561. ];
  1562. },{}],6:[function(require,module,exports){
  1563. },{}],7:[function(require,module,exports){
  1564. 'use strict';
  1565. var voidElements = require('void-elements');
  1566. Object.keys(voidElements).forEach(function (name) {
  1567. voidElements[name.toUpperCase()] = 1;
  1568. });
  1569. var blockElements = {};
  1570. require('block-elements').forEach(function (name) {
  1571. blockElements[name.toUpperCase()] = 1;
  1572. });
  1573. /**
  1574. * isBlockElem(node) determines if the given node is a block element.
  1575. *
  1576. * @param {Node} node
  1577. * @return {Boolean}
  1578. */
  1579. function isBlockElem(node) {
  1580. return !!(node && blockElements[node.nodeName]);
  1581. }
  1582. /**
  1583. * isVoid(node) determines if the given node is a void element.
  1584. *
  1585. * @param {Node} node
  1586. * @return {Boolean}
  1587. */
  1588. function isVoid(node) {
  1589. return !!(node && voidElements[node.nodeName]);
  1590. }
  1591. /**
  1592. * whitespace(elem [, isBlock]) removes extraneous whitespace from an
  1593. * the given element. The function isBlock may optionally be passed in
  1594. * to determine whether or not an element is a block element; if none
  1595. * is provided, defaults to using the list of block elements provided
  1596. * by the `block-elements` module.
  1597. *
  1598. * @param {Node} elem
  1599. * @param {Function} blockTest
  1600. */
  1601. function collapseWhitespace(elem, isBlock) {
  1602. if (!elem.firstChild || elem.nodeName === 'PRE') return;
  1603. if (typeof isBlock !== 'function') {
  1604. isBlock = isBlockElem;
  1605. }
  1606. var prevText = null;
  1607. var prevVoid = false;
  1608. var prev = null;
  1609. var node = next(prev, elem);
  1610. while (node !== elem) {
  1611. if (node.nodeType === 3) {
  1612. // Node.TEXT_NODE
  1613. var text = node.data.replace(/[ \r\n\t]+/g, ' ');
  1614. if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text[0] === ' ') {
  1615. text = text.substr(1);
  1616. }
  1617. // `text` might be empty at this point.
  1618. if (!text) {
  1619. node = remove(node);
  1620. continue;
  1621. }
  1622. node.data = text;
  1623. prevText = node;
  1624. } else if (node.nodeType === 1) {
  1625. // Node.ELEMENT_NODE
  1626. if (isBlock(node) || node.nodeName === 'BR') {
  1627. if (prevText) {
  1628. prevText.data = prevText.data.replace(/ $/, '');
  1629. }
  1630. prevText = null;
  1631. prevVoid = false;
  1632. } else if (isVoid(node)) {
  1633. // Avoid trimming space around non-block, non-BR void elements.
  1634. prevText = null;
  1635. prevVoid = true;
  1636. }
  1637. } else {
  1638. node = remove(node);
  1639. continue;
  1640. }
  1641. var nextNode = next(prev, node);
  1642. prev = node;
  1643. node = nextNode;
  1644. }
  1645. if (prevText) {
  1646. prevText.data = prevText.data.replace(/ $/, '');
  1647. if (!prevText.data) {
  1648. remove(prevText);
  1649. }
  1650. }
  1651. }
  1652. /**
  1653. * remove(node) removes the given node from the DOM and returns the
  1654. * next node in the sequence.
  1655. *
  1656. * @param {Node} node
  1657. * @return {Node} node
  1658. */
  1659. function remove(node) {
  1660. var next = node.nextSibling || node.parentNode;
  1661. node.parentNode.removeChild(node);
  1662. return next;
  1663. }
  1664. /**
  1665. * next(prev, current) returns the next node in the sequence, given the
  1666. * current and previous nodes.
  1667. *
  1668. * @param {Node} prev
  1669. * @param {Node} current
  1670. * @return {Node}
  1671. */
  1672. function next(prev, current) {
  1673. if (prev && prev.parentNode === current || current.nodeName === 'PRE') {
  1674. return current.nextSibling || current.parentNode;
  1675. }
  1676. return current.firstChild || current.nextSibling || current.parentNode;
  1677. }
  1678. module.exports = collapseWhitespace;
  1679. },{"block-elements":5,"void-elements":8}],8:[function(require,module,exports){
  1680. /**
  1681. * This file automatically generated from `pre-publish.js`.
  1682. * Do not manually edit.
  1683. */
  1684. module.exports = {
  1685. "area": true,
  1686. "base": true,
  1687. "br": true,
  1688. "col": true,
  1689. "embed": true,
  1690. "hr": true,
  1691. "img": true,
  1692. "input": true,
  1693. "keygen": true,
  1694. "link": true,
  1695. "menuitem": true,
  1696. "meta": true,
  1697. "param": true,
  1698. "source": true,
  1699. "track": true,
  1700. "wbr": true
  1701. };
  1702. },{}]},{},[1])(1)
  1703. });