UNPKG

ckeditor4

Version:

JavaScript WYSIWYG web text editor.

101 lines 679 kB
/* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/ */ (function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"M8SD",version:"4.20.0 (Standard)",revision:"cb4a59c665",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var c=window.CKEDITOR_BASEPATH||"";if(!c)for(var b=document.getElementsByTagName("script"),e=0;e<b.length;e++){var m=b[e].src.match(a);if(m){c=m[1];break}}-1==c.indexOf(":/")&& "//"!=c.slice(0,2)&&(c=0===c.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+c:location.href.match(/^[^\?]*\/(?:)/)[0]+c);if(!c)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return c}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);return a=this.appendTimestamp(a)},appendTimestamp:function(a){if(!this.timestamp||"/"===a.charAt(a.length-1)||/[&?]t=/.test(a))return a; var b=0<=a.indexOf("?")?"\x26":"?";return a+b+"t\x3d"+this.timestamp},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),window.removeEventListener("load",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),window.detachEvent("onload",a),b())}catch(e){}}function b(){for(var a;a=e.shift();)a()}var e=[];return function(b){function d(){try{document.documentElement.doScroll("left")}catch(g){setTimeout(d, 1);return}a()}e.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(h){}document.documentElement.doScroll&&b&&d()}}}()},e=window.CKEDITOR_GETURL;if(e){var b=f.getUrl;f.getUrl=function(a){return e.call(f,a)||b.call(f,a)}}return f}()), function(){var a={};CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,b;for(b in e)null==a[b]&&(a[b]=e[b])},CKEDITOR.event.prototype=function(){function f(a){var k=e(this);return k[a]||(k[a]=new b(a))}var e=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,e=this.listeners;b<e.length;b++)if(e[b].fn== a)return b;return-1}};return{define:function(a,b){var e=f.call(this,a);CKEDITOR.tools.extend(e,b,!0)},on:function(c,b,e,m,d){function h(n,d,h,v){n={name:c,sender:this,editor:n,data:d,listenerData:m,stop:h,cancel:v,removeListener:g};return!1===b.call(e,n)?a:n.data}function g(){n.removeListener(c,b)}var n=this,v=f.call(this,c);if(0>v.getListenerIndex(b)){v=v.listeners;e||(e=this);isNaN(d)&&(d=10);h.fn=b;h.priority=d;for(var w=v.length-1;0<=w;w--)if(v[w].priority<=d)return v.splice(w+1,0,h),{removeListener:g}; v.unshift(h)}return{removeListener:g}},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 c=0,b=function(){c=1},l=0,m=function(){l=1};return function(d,h,g){var n=e(this)[d];d=c;var v=l;c=l=0;if(n){var f=n.listeners;if(f.length)for(var f=f.slice(0), r,q=0;q<f.length;q++){if(n.errorProof)try{r=f[q].call(this,g,h,b,m)}catch(u){}else r=f[q].call(this,g,h,b,m);r===a?l=1:"undefined"!=typeof r&&(h=r);if(c||l)break}}h=l?!1:"undefined"==typeof h?!0:h;c=d;l=v;return h}}(),fireOnce:function(a,b,l){b=this.fire(a,b,l);delete e(this)[a];return b},removeListener:function(a,b){var l=e(this)[a];if(l){var m=l.getListenerIndex(b);0<=m&&l.listeners.splice(m,1)}},removeAllListeners:function(){var a=e(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a= e(this)[a])&&0<a.listeners.length}}}())}(),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,f,this)},CKEDITOR.editor.prototype.fireOnce=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)), CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),f=a.match(/edge[ \/](\d+.?\d*)/),e=-1<a.indexOf("trident/"),e=!(!f&&!e),e={ie:e,edge:!!f,webkit:!e&&-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; return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};e.gecko="Gecko"==navigator.product&&!e.webkit&&!e.ie;e.webkit&&(-1<a.indexOf("chrome")?e.chrome=!0:e.safari=!0);var b=0;e.ie&&(b=f?parseFloat(f[1]):e.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,e.ie9Compat=9==b,e.ie8Compat=8==b,e.ie7Compat=7==b,e.ie6Compat=7>b||e.quirks);e.gecko&&(f=a.match(/rv:([\d\.]+)/))&&(f=f[1].split("."),b=1E4*f[0]+100*(f[1]||0)+1*(f[2]||0));e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));e.version=b;e.isCompatible=!(e.ie&&7>b)&&!(e.gecko&&4E4>b)&&!(e.webkit&&534>b);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko||e.webkit||e.ie&&10<b;e.needsNbspFiller=e.ie&&11>b;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air"); e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add= function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*f))})})();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,f){CKEDITOR.verbosity& CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:f})},CKEDITOR.error=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:f})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var f=console[a.data.type]?a.data.type:"log",e=a.data.errorCode;if(a=a.data.additionalData)console[f]("[CKEDITOR] Error code: "+e+".",a);else console[f]("[CKEDITOR] Error code: "+e+".");console[f]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+ e)}},null,null,999),CKEDITOR.dom={},function(){function a(a,g,d){this._minInterval=a;this._context=d;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(g,d||{});var b=this;this.input=function(){function a(){b._lastOutput=(new Date).getTime();b._scheduledTimer=0;b._call()}if(!b._scheduledTimer||!1!==b._reschedule()){var n=(new Date).getTime()-b._lastOutput;n<b._minInterval?b._scheduledTimer=setTimeout(a,b._minInterval-n):a()}}}function f(n,g,d){a.call(this,n,g,d);this._args=[]; var b=this;this.input=CKEDITOR.tools.override(this.input,function(a){return function(){b._args=Array.prototype.slice.call(arguments);a.call(this)}})}var e=[],b=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,k=/>/g,l=/</g,m=/"/g,d=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,h={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},g=function(a,g){return"#"==g[0]?String.fromCharCode(parseInt(g.slice(1),10)):h[g]};CKEDITOR.on("reset",function(){e=[]});CKEDITOR.tools= {arrayCompare:function(a,g){if(!a&&!g)return!0;if(!a||!g||a.length!=g.length)return!1;for(var d=0;d<a.length;d++)if(a[d]!=g[d])return!1;return!0},getIndex:function(a,g){for(var d=0;d<a.length;++d)if(g(a[d]))return d;return-1},clone:function(a){var g;if(a&&a instanceof Array){g=[];for(var d=0;d<a.length;d++)g[d]=CKEDITOR.tools.clone(a[d]);return g}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;g=new a.constructor;for(d in a)g[d]=CKEDITOR.tools.clone(a[d]);return g},capitalize:function(a,g){return a.charAt(0).toUpperCase()+(g?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var g=arguments.length,d,b;"boolean"==typeof(d=arguments[g-1])?g--:"boolean"==typeof(d=arguments[g-2])&&(b=arguments[g-1],g-=2);for(var c=1;c<g;c++){var h=arguments[c]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(h),function(g){if(!0===d||null==a[g])if(!b||g in b)a[g]=h[g]})}return a}, prototypedCopy:function(a){var g=function(){};g.prototype=a;return new g},copy:function(a){var g={},d;for(d in a)g[d]=a[d];return g},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},isEmpty:function(a){for(var g in a)if(a.hasOwnProperty(g))return!1;return!0},cssVendorPrefix:function(a,g,d){if(d)return b+a+":"+g+";"+a+":"+g;d={};d[a]=g;d[b+a]=g;return d},cssStyleToDomStyle:function(){var a=document.createElement("div").style,g="undefined"!=typeof a.cssFloat?"cssFloat": "undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?g:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var g,d=[],b=0;b<a.length;b++)if(g=a[b])/@import|[{}]/.test(g)?d.push("\x3cstyle\x3e"+g+"\x3c/style\x3e"):(g=CKEDITOR.appendTimestamp(g),d.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+g+'"\x3e'));return d.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(c, "\x26amp;").replace(k,"\x26gt;").replace(l,"\x26lt;")},htmlDecode:function(a){return a.replace(d,g)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(m,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a,g){var d=g==CKEDITOR.ENTER_BR,b=this.htmlEncode(a.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),c=g==CKEDITOR.ENTER_P?"p":"div";if(!d){var h=/\n{2}/g;if(h.test(b))var e="\x3c"+c+"\x3e",m= "\x3c/"+c+"\x3e",b=e+b.replace(h,function(){return m+e})+m}b=b.replace(/\n/g,"\x3cbr\x3e");d||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+c+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,function(a,g){return g+"\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",g=0;8>g;g++)a+= Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,g){var d=g(a);d.prototype=a.prototype;return d},setTimeout:function(a,g,d,b,c){c||(c=window);d||(d=c);return c.setTimeout(function(){b?a.apply(d,[].concat(b)):a.apply(d)},g||0)},debounce:function(a,g){var d;return function(){var b=this,c=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(b,c)},g)}},throttle:function(a,g,d){return new this.buffers.throttle(a,g,d)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; return function(g){return g.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(g){return g.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(g){return g.replace(a,"")}}(),indexOf:function(a,g){if("function"==typeof g)for(var d=0,b=a.length;d<b;d++){if(g(a[d]))return d}else{if(a.indexOf)return a.indexOf(g);d=0;for(b=a.length;d<b;d++)if(a[d]===g)return d}return-1},search:function(a,g){var d=CKEDITOR.tools.indexOf(a,g);return 0<=d?a[d]:null},bind:function(a, g){var d=Array.prototype.slice.call(arguments,2);return function(){return a.apply(g,d.concat(Array.prototype.slice.call(arguments)))}},createClass:function(a){var g=a.$,d=a.base,b=a.privates||a._,c=a.proto;a=a.statics;!g&&(g=function(){d&&this.base.apply(this,arguments)});if(b)var h=g,g=function(){var a=this._||(this._={}),g;for(g in b){var d=b[g];a[g]="function"==typeof d?CKEDITOR.tools.bind(d,this):d}h.apply(this,arguments)};d&&(g.prototype=this.prototypedCopy(d.prototype),g.prototype.constructor= g,g.base=d,g.baseProto=d.prototype,g.prototype.base=function p(){this.base=d.prototype.base;d.apply(this,arguments);this.base=p});c&&this.extend(g.prototype,c,!0);a&&this.extend(g,a,!0);return g},addFunction:function(a,g){return e.push(function(){return a.apply(g||this,arguments)})-1},removeFunction:function(a){e[a]=null},callFunction:function(a){var g=e[a];return g&&g.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,g;return function(d){g=CKEDITOR.tools.trim(d+ "")+"px";return a.test(g)?g:d||""}}(),convertToPx:function(){var a,g;return function(d){if(!a||a.isDetached())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);if(!/%$/.test(d)){var b=0>parseFloat(d);b&&(d=d.replace("-",""));a.setStyle("width",d);g=a.getClientRect();d=Math.round(g.width);return b?-d:d}return d}}(),repeat:function(a,g){return Array(g+ 1).join(a)},tryThese:function(){for(var a,g=0,d=arguments.length;g<d;g++){var b=arguments[g];try{a=b();break}catch(c){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var g=arguments,d=this;window.setTimeout(function(){a.apply(d,g)},0)}},normalizeCssText:function(a,g){var d=[],b,c=CKEDITOR.tools.parseCssText(a,!0,g);for(b in c)d.push(b+":"+c[b]);d.sort();return d.length?d.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function(a,g,d,n){a=[g,d,n];for(g=0;3>g;g++)a[g]=("0"+parseInt(a[g],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,g,d,n){a=g.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+n})},_isValidColorFormat:function(a){if(!a)return!1;a=a.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(a)},parseCssText:function(a,g,d){var b={};d&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style", a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return b;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,d,n){g&&(d=d.toLowerCase(),"font-family"==d&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));b[d]=n});return b},writeCssText:function(a,g){var d,b=[];for(d in a)b.push(d+":"+a[d]);g&&b.sort();return b.join("; ")},objectCompare:function(a,g,d){var b;if(!a&&!g)return!0;if(!a||!g)return!1; for(b in a)if(a[b]!=g[b])return!1;if(!d)for(b in g)if(a[b]!=g[b])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,g){var d={};1==arguments.length&&(g=!0);for(var b=0,c=a.length;b<c;++b)d[a[b]]=g;return d},getStyledSpans:function(a,g){var d=CKEDITOR.env.ie&&8==CKEDITOR.env.version?a.toUpperCase():a,d=g.find("span[style*\x3d"+d+"]").toArray();return CKEDITOR.tools.array.filter(d,function(g){return!!g.getStyle(a)})},fixDomain:function(){for(var a;;)try{a= window.parent.document.domain;break}catch(g){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,g,d){return new this.buffers.event(a,g,d)},enableHtml5Elements:function(a,g){for(var d="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(" "),b=d.length,c;b--;)c=a.createElement(d[b]),g&&a.appendChild(c)},checkIfAnyArrayItemMatches:function(a, g){for(var d=0,b=a.length;d<b;++d)if(a[d].match(g))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,g){for(var d in a)if(d.match(g))return!0;return!1},keystrokeToString:function(a,g){var d=this.keystrokeToArray(a,g);d.display=d.display.join("+");d.aria=d.aria.join("+");return d},keystrokeToArray:function(a,g){var d=g&16711680,b=g&65535,c=CKEDITOR.env.mac,h=[],e=[];d&CKEDITOR.CTRL&&(h.push(c?"⌘":a[17]),e.push(c?a[224]:a[17]));d&CKEDITOR.ALT&&(h.push(c?"⌥":a[18]),e.push(a[18]));d&CKEDITOR.SHIFT&& (h.push(c?"⇧":a[16]),e.push(a[16]));b&&(a[b]?(h.push(a[b]),e.push(a[b])):(h.push(String.fromCharCode(b)),e.push(String.fromCharCode(b))));return{display:h,aria:e}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();for(var g=document.cookie.split(";"),d,b,c=0;c<g.length;c++)if(d=g[c].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(d[0]).toLowerCase()),b===a)return decodeURIComponent(1<d.length? d[1]:"");return null},setCookie:function(a,g){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(g)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],g="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var d=0;40>d;d++)a.push(Math.floor(256*Math.random()));for(d=0;d<a.length;d++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[d]%36),g=g+(.5<Math.random()? b.toUpperCase():b);a=g;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){if(a)if(window.CSS&&CSS.escape)a=CSS.escape(a);else{a=String(a);for(var g=a.length,d=-1,b,c="",h=a.charCodeAt(0);++d<g;)b=a.charCodeAt(d),c=0==b?c+"�":127==b||1<=b&&31>=b||0==d&&48<=b&&57>=b||1==d&&48<=b&&57>=b&&45==h?c+("\\"+b.toString(16)+" "):0==d&&1==g&&45==b?c+("\\"+a.charAt(d)):128<=b||45==b||95==b||48<=b&&57>=b||65<=b&&90>=b||97<=b&&122>=b?c+a.charAt(d):c+("\\"+a.charAt(d));a=c}else a="";return a}, getMouseButton:function(a){return(a=a&&a.data?a.data.$:a)?CKEDITOR.tools.normalizeMouseButton(a.button):!1},normalizeMouseButton:function(a,g){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return a;for(var d=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],b=0;b<d.length;b++){var c=d[b];if(c[0]===a&&g)return c[1];if(!g&&c[1]===a)return c[0]}},convertHexStringToBytes:function(a){var g=[],d=a.length/2,b;for(b=0;b<d;b++)g.push(parseInt(a.substr(2* b,2),16));return g},convertBytesToBase64:function(a){var g="",d=a.length,b;for(b=0;b<d;b+=3){var c=a.slice(b,b+3),h=c.length,e=[],m;if(3>h)for(m=h;3>m;m++)c[m]=0;e[0]=(c[0]&252)>>2;e[1]=(c[0]&3)<<4|c[1]>>4;e[2]=(c[1]&15)<<2|(c[2]&192)>>6;e[3]=c[2]&63;for(m=0;4>m;m++)g=m<=h?g+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e[m]):g+"\x3d"}return g},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/, _rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var g={},d=this._findColor(a);d.length&&(g.color=d[0],CKEDITOR.tools.array.forEach(d,function(g){a=a.replace(g,"")}));if(a=CKEDITOR.tools.trim(a))g.unprocessed=a;return g},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)|| ["0px"]})},sideShorthand:function(a,g){function d(a){b.top=c[a[0]];b.right=c[a[1]];b.bottom=c[a[2]];b.left=c[a[3]]}var b={},c=g?g(a):a.split(/\s+/);switch(c.length){case 1:d([0,0,0,0]);break;case 2:d([0,1,0,1]);break;case 3:d([0,1,2,1]);break;case 4:d([0,1,2,3])}return b},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(a)},_findColor:function(a){var g=[],d=CKEDITOR.tools.array,g=g.concat(a.match(this._rgbaRegExp)||[]),g=g.concat(a.match(this._hslaRegExp)||[]);return g=g.concat(d.filter(a.split(/\s+/), function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,g,d){var b=[];this.forEach(a,function(c,h){g.call(d,c,h,a)&&b.push(c)});return b},find:function(a,g,d){for(var b=a.length,c=0;c<b;){if(g.call(d,a[c],c,a))return a[c];c++}},forEach:function(a,g,d){var b=a.length,c;for(c=0;c<b;c++)g.call(d,a[c],c,a)},map:function(a,g,d){for(var b=[],c=0;c<a.length;c++)b.push(g.call(d,a[c],c,a));return b},reduce:function(a, g,d,b){for(var c=0;c<a.length;c++)d=g.call(b,d,a[c],c,a);return d},every:function(a,g,d){if(!a.length)return!0;g=this.filter(a,g,d);return a.length===g.length},some:function(a,g,d){for(var b=0;b<a.length;b++)if(g.call(d,a[b],b,a))return!0;return!1},zip:function(a,g){return CKEDITOR.tools.array.map(a,function(a,d){return[a,g[d]]})},unique:function(a){return this.filter(a,function(g,d){return d===CKEDITOR.tools.array.indexOf(a,g)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "), entries:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(g){return[g,a[g]]})},values:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(g){return a[g]})},keys:function(a){var g=Object.prototype.hasOwnProperty,d=[],b=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!a||"object"!==typeof a)){g=[];if("string"===typeof a)for(d=0;d<a.length;d++)g.push(String(d));return g}for(var c in a)d.push(c);if(CKEDITOR.env.ie&& 9>CKEDITOR.env.version)for(c=0;c<b.length;c++)g.call(a,b[c])&&d.push(b[c]);return d},findKey:function(a,g){if("object"!==typeof a)return null;for(var d in a)if(a[d]===g)return d;return null},merge:function(a,g){var d=CKEDITOR.tools,b=d.clone(a),c=d.clone(g);d.array.forEach(d.object.keys(c),function(a){b[a]="object"===typeof c[a]&&"object"===typeof b[a]?d.object.merge(b[a],c[a]):c[a]});return b}},getAbsoluteRectPosition:function(a,g){function d(a){if(a){var g=a.getClientRect();b.top+=g.top;b.left+= g.left;"x"in b&&"y"in b&&(b.x+=g.x,b.y+=g.y);d(a.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(g);d(a.getFrame());var c=CKEDITOR.document.getWindow().getScrollPosition();b.top+=c.y;b.left+=c.x;"x"in b&&"y"in b&&(b.y+=c.y,b.x+=c.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};a.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer); this._scheduledTimer=0}};f.prototype=CKEDITOR.tools.prototypedCopy(a.prototype);f.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};f.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=a;CKEDITOR.tools.buffers.throttle=f;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(a){a=a||{};this.width=a.width;this.style=a.style;this.color=a.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g, "black"]]},normalize:function(){for(var a in this._.normalizeMap){var g=this[a];g&&(this[a]=CKEDITOR.tools.array.reduce(this._.normalizeMap[a],function(a,g){return a.replace(g[0],g[1])},g))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(a){return!!a}).join(" ")}},statics:{fromCssRule:function(a){var g={},d=a.split(/\s+/g);a=CKEDITOR.tools.style.parse._findColor(a);a.length&&(g.color=a[0]);CKEDITOR.tools.array.forEach(d,function(a){g.style|| -1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,a)?!g.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&(g.width=a):g.style=a});return new CKEDITOR.tools.style.border(g)},splitCssValues:function(a,g){g=g||{};var d=CKEDITOR.tools.array.reduce(["width","style","color"],function(d,b){var c=a["border-"+b]||g[b];d[b]=c?CKEDITOR.tools.style.parse.sideShorthand(c):null;return d},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(g,b){var c={},h;for(h in d){var e= a["border-"+b+"-"+h];c[h]=e?e:d[h]&&d[h][b]}g["border-"+b]=new CKEDITOR.tools.style.border(c);return g},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=1;CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,f=function(a,g){for(var d=CKEDITOR.tools.clone(a),b=1;b<arguments.length;b++){g=arguments[b];for(var c in g)delete d[c]}return d},e={},b={}, c={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},k={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={},m={"#":1},d={center:1,dir:1,noframes:1};a(e,{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},m,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(b,c,e,d);f={a:f(e,{a:1,button:1}),abbr:e,address:b,area:l,article:b,aside:b,audio:a({source:1,track:1},b),b:e,base:l,bdi:e,bdo:e,blockquote:b,body:b,br:l,button:f(e,{a:1,button:1}),canvas:e,caption:b,cite:e,code:e,col:l,colgroup:{col:1},command:l, datalist:a({option:1},e),dd:b,del:e,details:a({summary:1},b),dfn:e,div:b,dl:{dt:1,dd:1},dt:b,em:e,embed:l,fieldset:a({legend:1},b),figcaption:b,figure:a({figcaption:1},b),footer:b,form:b,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,head:a({title:1,base:1},k),header:b,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:a({head:1,body:1},b,k),i:e,iframe:m,img:l,input:l,ins:e,kbd:e,keygen:l,label:e,legend:e,li:b,link:l,main:b,map:b,mark:e,menu:a({li:1},b),meta:l,meter:f(e,{meter:1}),nav:b,noscript:a({link:1,meta:1,style:1}, e),object:a({param:1},e),ol:{li:1},optgroup:{option:1},option:m,output:e,p:e,param:l,pre:e,progress:f(e,{progress:1}),q:e,rp:e,rt:e,ruby:a({rp:1,rt:1},e),s:e,samp:e,script:m,section:b,select:{optgroup:1,option:1},small:e,source:l,span:e,strong:e,style:m,sub:e,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},e),sup:e,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:b,textarea:m,tfoot:{tr:1},th:b,thead:{tr:1},time:f(e,{time:1}),title:m,tr:{th:1,td:1},track:l,u:e,ul:{li:1},"var":e, video:a({source:1,track:1},b),wbr:l,acronym:e,applet:a({param:1},b),basefont:l,big:e,center:b,dialog:l,dir:{li:1},font:e,isindex:l,noframes:b,strike:e,tt:e};a(f,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},c,d),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,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,track:1,wbr:1},$inline:e,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},f.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,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 f}(),CKEDITOR.dom.event=function(a){this.$=a},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 f=this.$;f.preventDefault?f.preventDefault():f.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=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,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.HISTORY_NATIVE=1,CKEDITOR.HISTORY_HASH=2,CKEDITOR.HISTORY_OFF=0,CKEDITOR.dom.domObject=function(a){a&&(this.$=a)},CKEDITOR.dom.domObject.prototype=function(){var a= function(a,e){return function(b){"undefined"!=typeof CKEDITOR&&a.fire(e,new CKEDITOR.dom.event(b))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(f){var e=this.getCustomData("_cke_nativeListeners");e||(e={},this.setCustomData("_cke_nativeListeners",e));e[f]||(e=e[f]=a(this,f),this.$.addEventListener?this.$.addEventListener(f,e,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+f,e));return CKEDITOR.event.prototype.on.apply(this, arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var e=this.getCustomData("_cke_nativeListeners"),b=e&&e[a];b&&(this.$.removeEventListener?this.$.removeEventListener(a,b,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,b),delete e[a])}},removeAllListeners:function(){try{var a=this.getCustomData("_cke_nativeListeners"),e;for(e in a){var b=a[e];this.$.detachEvent?this.$.detachEvent("on"+e,b):this.$.removeEventListener&&this.$.removeEventListener(e, b,!1);delete a[e]}}catch(c){if(!CKEDITOR.env.edge||-2146828218!==c.number)throw c;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var f={};CKEDITOR.on("reset",function(){f={}});a.equals=function(a){try{return a&&a.$===this.$}catch(b){return!1}};a.setCustomData=function(a,b){var c=this.getUniqueId();(f[c]||(f[c]={}))[a]=b;return this};a.getCustomData=function(a){var b=this.$["data-cke-expando"];return(b=b&&f[b])&&a in b?b[a]:null};a.removeCustomData=function(a){var b=this.$["data-cke-expando"], b=b&&f[b],c,k;b&&(c=b[a],k=a in b,delete b[a]);return k?c:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.getUniqueId();a&&delete f[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),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,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,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,f){a.append(this,f);return a},clone:function(a,f){function e(b){b["data-cke-expando"]&&(b["data-cke-expando"]=!1);if(b.nodeType==CKEDITOR.NODE_ELEMENT||b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(f||b.nodeType!=CKEDITOR.NODE_ELEMENT||b.removeAttribute("id",!1),a){b=b.childNodes;for(var c=0;c<b.length;c++)e(b[c])}}function b(c){if(c.type==CKEDITOR.NODE_ELEMENT||c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e= c.getName();":"==e[0]&&c.renameNode(e.substring(1))}if(a)for(e=0;e<c.getChildCount();e++)b(c.getChild(e))}}var c=this.$.cloneNode(a);e(c);c=new CKEDITOR.dom.node(c);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&b(c);return c},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$, a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var f=[],e=this.getDocument().$.documentElement,b=this;b&&b!=e;){var c=b.getParent();c&&f.unshift(this.getIndex.call(b,a));b=c}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function f(a,b){var c=b?a.getNext():a.getPrevious();return c&&c.type==CKEDITOR.NODE_TEXT?c.isEmpty()?f(c,b):c: null}var e=this,b=-1,c;if(!this.getParent()||a&&e.type==CKEDITOR.NODE_TEXT&&e.isEmpty()&&!f(e)&&!f(e,!0))return-1;do if(!a||e.equals(this)||e.type!=CKEDITOR.NODE_TEXT||!c&&!e.isEmpty())b++,c=e.type==CKEDITOR.NODE_TEXT;while(e=e.getPrevious());return b},getNextSourceNode:function(a,f,e){if(e&&!e.call){var b=e;e=function(a){return!a.equals(b)}}a=!a&&this.getFirst&&this.getFirst();var c;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;a=this.getNext()}for(;!a&&(c=(c||this).getParent());){if(e&& !1===e(c,!0))return null;a=c.getNext()}return!a||e&&!1===e(a)?null:f&&f!=a.type?a.getNextSourceNode(!1,f,e):a},getPreviousSourceNode:function(a,f,e){if(e&&!e.call){var b=e;e=function(a){return!a.equals(b)}}a=!a&&this.getLast&&this.getLast();var c;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;a=this.getPrevious()}for(;!a&&(c=(c||this).getParent());){if(e&&!1===e(c,!0))return null;a=c.getPrevious()}return!a||e&&!1===e(a)?null:f&&a.type!=f?a.getPreviousSourceNode(!1,f,e): a},getPrevious:function(a){var f=this.$,e;do e=(f=f.previousSibling)&&10!=f.nodeType&&new CKEDITOR.dom.node(f);while(e&&a&&!a(e));return e},getNext:function(a){var f=this.$,e;do e=(f=f.nextSibling)&&new CKEDITOR.dom.node(f);while(e&&a&&!a(e));return e},getParent:function(a){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||a&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(f):null},getParents:function(a){var f=this,e=[];do e[a?"push":"unshift"](f);while(f=f.getParent()); return e},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var f=this.contains?this:this.getParent();do if(f.contains(a))return f;while(f=f.getParent());return null},getPosition:function(a){var f=this.$,e=a.$;if(f.compareDocumentPosition)return f.compareDocumentPosition(e);if(f==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(f.contains){if(f.contains(e))return CKEDITOR.POSITION_CONTAINS+ CKEDITOR.POSITION_PRECEDING;if(e.contains(f))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in f)return 0>f.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:f.sourceIndex<e.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}f=this.getAddress();a=a.getAddress();for(var e=Math.min(f.length,a.length),b=0;b<e;b++)if(f[b]!=a[b])return f[b]<a[b]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return f.length<a.length?CKEDITOR.POSITION_CONTAINS+ CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,f){var e=this.$,b,c;f||(e=e.parentNode);"function"==typeof a?(c=!0,b=a):(c=!1,b=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof a?b==a:b in a});for(;e;){if(b(c?new CKEDITOR.dom.node(e):e))return new CKEDITOR.dom.node(e);try{e=e.parentNode}catch(k){e=null}}return null},hasAscendant:function(a,f){var e=this.$;f||(e=e.parentNode);for(;e;){if(e.nodeName&& e.nodeName.toLowerCase()==a)return!0;e=e.parentNode}return!1},move:function(a,f){a.append(this.remove(),f)},remove:function(a){var f=this.$,e=f.parentNode;if(e){if(a)for(;a=f.firstChild;)e.insertBefore(f.removeChild(a),f);e.removeChild(f)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.ltrim(a.getText()),e=a.getLength();if(f)f.length< e&&(a.split(e-f.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 f=CKEDITOR.tools.rtrim(a.getText()),e=a.getLength();if(f)f.length<e&&(a.split(f.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var f= this;this.type!=CKEDITOR.NODE_ELEMENT&&(f=this.getParent());CKEDITOR.env.edge&&f&&f.is("textarea","input")&&(a=!0);if(!a&&f&&"undefined"!=typeof f.$.isContentEditable)return!(f.$.isContentEditable||f.data("cke-editable"));for(;f;){if(f.data("cke-editable"))return!1;if(f.hasAttribute("contenteditable"))return"false"==f.getAttribute("contenteditable");f=f.getParent()}return!0}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject, CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,f="CSS1Compat"==a.compatMode;return{width:(f?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(f?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|| 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,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){a=CKEDITOR.appendTimestamp(a);if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var f=new CKEDITOR.dom.element("link");f.setAttributes({rel:"stylesheet", type:"text/css",href:a});this.getHead().append(f)}},appendStyleText:function(a){if(this.$.createStyleSheet){var f=this.$.createStyleSheet("");f.cssText=a}else{var e=new CKEDITOR.dom.element("style",this);e.append(new CKEDITOR.dom.text(a,this));this.getHead().append(e)}return f||e.$.sheet},createElement:function(a,f){var e=new CKEDITOR.dom.element(a,this);f&&(f.attributes&&e.setAttributes(f.attributes),f.styles&&e.setStyles(f.styles));return e},createText:function(a){return new CKEDITOR.dom.text(a, this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(f){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,f){for(var e=this.$.documentElement,b=0;e&&b<a.length;b++){var c=a[b];if(f)for(var k=-1,l=0;l<e.childNodes.length;l++){var m=e.childNodes[l];if(!0!==f||3!=m.nodeType||!m.previousSibling||3!=m.previousSibling.nodeType)if(k++,k== c){e=m;break}}else e=e.childNodes[c]}return e?new CKEDITOR.dom.node(e):null},getElementsByTag:function(a,f){CKEDITOR.env.ie&&8>=document.documentMode||!f||(a=f+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)}, getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null}, _getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}}, CKEDITOR.dom.element=function(a,f){"string"==typeof a&&(a=(f?f.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,f){var e=new CKEDITOR.dom.element("div",f);e.setHtml(a);return e.getFirst().remove()},CKEDITOR.dom.element.setMarker= function(a,f,e,b){var c=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),k=f.getCustomData("list_marker_names")||f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[c]=f;k[e]=1;return f.setCustomData(e,b)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var f in a)CKEDITOR.dom.element.clearMarkers(a,a[f],1)},CKEDITOR.dom.element.clearMarkers=function(a,f,e){var b=f.getCustomData("list_marker_names"), c=f.getCustomData("list_marker_id"),k;for(k in b)f.removeCustomData(k);f.removeCustomData("list_marker_names");e&&(f.removeCustomData("list_marker_id"),delete a[c])},function(){function a(a,d){return-1<(" "+a+" ").replace(k," ").indexOf(" "+d+" ")}function f(a){var d=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),d=!1);return function(){d||a.removeAttribute("id")}}function e(a,d){var b=CKEDITOR.tools.escapeCss(a.$.id);return"#"+b+" "+d.split(/,\s*/).join(", #"+b+" ")}function b(a){for(var d= 0,b=0,g=l[a].length;b<g;b++)d+=parseFloat(this.getComputedStyle(l[a][b])||0,10)||0;return d}var c=document.createElement("_").classList,c="undefined"!==typeof c&&null!==String(c.add).match(/\[Native code\]/gi),k=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:c?function(a){this.$.classList.add(a);return this}:function(b){var d=this.$.className;d&&(a(d,b)||(d+=" "+b));this.$.className=d||b;return this},removeClass:c?function(a){var d=this.$;d.classList.remove(a); d.className||d.removeAttribute("class");return this}:function(b){var d=this.getAttribute("class");d&&a(d,b)&&((d=d.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",d):this.removeAttribute("class"));return this},hasClass:function(b){return a(this.$.className,b)},append:function(a,d){"string"==typeof a&&(a=this.getDocument().createElement(a));d?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var d= new CKEDITOR.dom.element("div",this.getDocument());d.setHtml(a);d.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=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,d){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);var g=b.extractContents(!1,d||!1),c;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");c=g.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),b.append(c);b.insertAfter(this);b.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)& 16)}:function(a){var d=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?d.contains(a.getParent().$):d!=a.$&&d.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(d){}}return function(d){d?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(a){var d=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!d.width&&(d.width=d.right-d.left);!d.height&&(d.height=d.bottom-d.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),d):d},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var d=this.$;if(this.getParent())return d.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(d);d.innerHTML=a;b.removeChild(d);return a}catch(g){this.$.innerHTML=""; d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML=a;for(d=d.getChildren();d.count();)this.append(d.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(d){this.$[a?"textContent":"innerText"]=d}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a= "className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"): null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var d={},b=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g<b.length;g++)-1===CKEDITOR.tools.indexOf(a,b[g].name)&&(d[b[g].name]=b[g].value);return d},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getClientSize:function(){return{width:this.$.clientWidth,height:this.$.clientHeight}},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var d=this.getWindow().$.getComputedStyle(this.$, null);return d?d.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};r