/* Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ (function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var b=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"L2AA",version:"DEV",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:b},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var f=document.getElementsByTagName("script"),h=0;hd.getListenerIndex(g)){d=d.listeners;f||(f=this);isNaN(k)&&(k=10);var n=this;c.fn=g;c.priority=k;for(var v=d.length-1;0<=v;v--)if(d[v].priority<=k)return d.splice(v+1,0,c),{removeListener:e};d.unshift(c)}return{removeListener:e}},once:function(){var a=Array.prototype.slice.call(arguments),g=a[1];a[1]=function(a){a.removeListener();return g.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,g=function(){a=1},b=0,f=function(){b=1};return function(k,c,e){var d=h(this)[k];k=a;var n=b;a=b=0;if(d){var v=d.listeners;if(v.length)for(var v=v.slice(0),x,r=0;rdocument.documentMode),mobile:-1a||f.quirks);f.gecko&&(h=b.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),a=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));f.air&&(a=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(a=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));f.version=a;f.isCompatible=!(f.ie&&7>a)&&!(f.gecko&&4E4>a)&&!(f.webkit&&534>a);f.hidpi=2<=window.devicePixelRatio;f.needsBrFiller=f.gecko|| f.webkit||f.ie&&10a;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit":"unknown");f.quirks&&(f.cssClass+=" cke_browser_quirks");f.ie&&(f.cssClass+=" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));f.air&&(f.cssClass+=" cke_browser_air");f.iOS&&(f.cssClass+=" cke_browser_ios");f.hidpi&&(f.cssClass+=" cke_hidpi");return f}());"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 b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;b&&(CKEDITOR.status="basic_ready",b&&b._load?b():h&&setTimeout(function(){CKEDITOR.loadFullCore&& CKEDITOR.loadFullCore()},1E3*h))})})();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(b,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:b,additionalData:h})};CKEDITOR.error=function(b,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:b,additionalData:h})};CKEDITOR.on("log", function(b){if(window.console&&window.console.log){var h=console[b.data.type]?b.data.type:"log",f=b.data.errorCode;if(b=b.data.additionalData)console[h]("[CKEDITOR] Error code: "+f+".",b);else console[h]("[CKEDITOR] Error code: "+f+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+f)}},null,null,999);CKEDITOR.dom={};(function(){function b(n,d,a){this._minInterval=n;this._context=a;this._lastOutput=this._scheduledTimer= 0;this._output=CKEDITOR.tools.bind(d,a||{});var c=this;this.input=function(){function n(){c._lastOutput=(new Date).getTime();c._scheduledTimer=0;c._call()}if(!c._scheduledTimer||!1!==c._reschedule()){var d=(new Date).getTime()-c._lastOutput;d/g,m=/|\s) /g, function(d,n){return n+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var d=0;return function(){return++d}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var d="e",a=0;8>a;a++)d+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return d},override:function(d,a){var c=a(d);c.prototype=d.prototype;return c},setTimeout:function(d,a,c,e,b){b||(b=window);c||(c=b);return b.setTimeout(function(){e?d.apply(c,[].concat(e)):d.apply(c)}, a||0)},throttle:function(d,a,c){return new this.buffers.throttle(d,a,c)},trim:function(){var d=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(d,"")}}(),ltrim:function(){var d=/^[ \t\n\r]+/g;return function(a){return a.replace(d,"")}}(),rtrim:function(){var d=/[ \t\n\r]+$/g;return function(a){return a.replace(d,"")}}(),indexOf:function(d,a){if("function"==typeof a)for(var c=0,e=d.length;cparseFloat(a);c&&(a=a.replace("-",""));d.setStyle("width", a);a=d.$.clientWidth;return c?-a:a}return a}}(),repeat:function(d,a){return Array(a+1).join(d)},tryThese:function(){for(var d,a=0,c=arguments.length;aa;a++)d[a]=("0"+parseInt(d[a],10).toString(16)).slice(-2);return"#"+d.join("")})},normalizeHex:function(d){return d.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(d,a,n,c){d=a.toLowerCase();3==d.length&&(d=d.split(""),d=[d[0],d[0],d[1],d[1],d[2],d[2]].join(""));return"#"+d+c})},parseCssText:function(d,a,c){var e={}; c&&(d=(new CKEDITOR.dom.element("span")).setAttribute("style",d).getAttribute("style")||"");d&&(d=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(d)));if(!d||";"==d)return e;d.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(d,n,c){a&&(n=n.toLowerCase(),"font-family"==n&&(c=c.replace(/\s*,\s*/g,",")),c=CKEDITOR.tools.trim(c));e[n]=c});return e},writeCssText:function(d,a){var c,e=[];for(c in d)e.push(c+":"+d[c]);a&&e.sort();return e.join("; ")},objectCompare:function(d, a,c){var e;if(!d&&!a)return!0;if(!d||!a)return!1;for(e in d)if(d[e]!=a[e])return!1;if(!c)for(e in a)if(d[e]!=a[e])return!1;return!0},objectKeys:function(d){return CKEDITOR.tools.object.keys(d)},convertArrayToObject:function(d,a){var c={};1==arguments.length&&(a=!0);for(var e=0,b=d.length;ec;c++)d.push(Math.floor(256*Math.random()));for(c=0;cg)for(k=g;3>k;k++)b[k]=0;f[0]=(b[0]&252)>>2;f[1]=(b[0]&3)<<4|b[1]>>4;f[2]=(b[1]&15)<<2|(b[2]&192)>>6;f[3]= b[2]&63;for(k=0;4>k;k++)a=k<=g?a+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f[k]):a+"\x3d"}return a},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC", crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969", dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2", lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A", mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399", red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00", yellowgreen:"#9ACD32"},_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(d){var a={},c=this._findColor(d);c.length&&(a.color=c[0],CKEDITOR.tools.array.forEach(c,function(a){d=d.replace(a,"")})); if(d=CKEDITOR.tools.trim(d))a.unprocessed=d;return a},margin:function(d){return CKEDITOR.tools.style.parse.sideShorthand(d,function(d){return d.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(d,a){function c(d){e.top=b[d[0]];e.right=b[d[1]];e.bottom=b[d[2]];e.left=b[d[3]]}var e={},b=a?a(d):d.split(/\s+/);switch(b.length){case 1:c([0,0,0,0]);break;case 2:c([0,1,0,1]);break;case 3:c([0,1,2,1]);break;case 4:c([0,1,2,3])}return e},border:function(d){return CKEDITOR.tools.style.border.fromCssRule(d)}, _findColor:function(d){var a=[],c=CKEDITOR.tools.array,a=a.concat(d.match(this._rgbaRegExp)||[]),a=a.concat(d.match(this._hslaRegExp)||[]);return a=a.concat(c.filter(d.split(/\s+/),function(d){return d.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:d.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(d,a,c){var e=[];this.forEach(d,function(b,g){a.call(c,b,g,d)&&e.push(b)});return e},find:function(d,a,c){for(var e=d.length,b=0;bCKEDITOR.env.version&&(!d||"object"!==typeof d)){a=[];if("string"===typeof d)for(c=0;cCKEDITOR.env.version)for(b=0;bCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(g);return g},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(b){b.$.parentNode.insertBefore(this.$,b.$.nextSibling);return b},insertBefore:function(b){b.$.parentNode.insertBefore(this.$, b.$);return b},insertBeforeMe:function(b){this.$.parentNode.insertBefore(b.$,this.$);return b},getAddress:function(b){for(var h=[],f=this.getDocument().$.documentElement,a=this;a&&a!=f;){var g=a.getParent();g&&h.unshift(this.getIndex.call(a,b));a=g}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(b){function h(a,b){var g=b?a.getNext():a.getPrevious();return g&&g.type==CKEDITOR.NODE_TEXT?g.isEmpty()?h(g,b):g: null}var f=this,a=-1,g;if(!this.getParent()||b&&f.type==CKEDITOR.NODE_TEXT&&f.isEmpty()&&!h(f)&&!h(f,!0))return-1;do if(!b||f.equals(this)||f.type!=CKEDITOR.NODE_TEXT||!g&&!f.isEmpty())a++,g=f.type==CKEDITOR.NODE_TEXT;while(f=f.getPrevious());return a},getNextSourceNode:function(b,h,f){if(f&&!f.call){var a=f;f=function(b){return!b.equals(a)}}b=!b&&this.getFirst&&this.getFirst();var g;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;b=this.getNext()}for(;!b&&(g=(g||this).getParent());){if(f&& !1===f(g,!0))return null;b=g.getNext()}return!b||f&&!1===f(b)?null:h&&h!=b.type?b.getNextSourceNode(!1,h,f):b},getPreviousSourceNode:function(b,h,f){if(f&&!f.call){var a=f;f=function(b){return!b.equals(a)}}b=!b&&this.getLast&&this.getLast();var g;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;b=this.getPrevious()}for(;!b&&(g=(g||this).getParent());){if(f&&!1===f(g,!0))return null;b=g.getPrevious()}return!b||f&&!1===f(b)?null:h&&b.type!=h?b.getPreviousSourceNode(!1,h,f): b},getPrevious:function(b){var h=this.$,f;do f=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(f&&b&&!b(f));return f},getNext:function(b){var h=this.$,f;do f=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(f&&b&&!b(f));return f},getParent:function(b){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||b&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(b){var h=this,f=[];do f[b?"push":"unshift"](h);while(h=h.getParent()); return f},getCommonAncestor:function(b){if(b.equals(this))return this;if(b.contains&&b.contains(this))return b;var h=this.contains?this:this.getParent();do if(h.contains(b))return h;while(h=h.getParent());return null},getPosition:function(b){var h=this.$,f=b.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(f);if(h==f)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&b.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(f))return CKEDITOR.POSITION_CONTAINS+ CKEDITOR.POSITION_PRECEDING;if(f.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>f.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex=document.documentMode||!h||(b=h+":"+b);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b=b?new CKEDITOR.dom.element(b):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(b){this.$.open("text/html","replace");CKEDITOR.env.ie&&(b=b.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(b);this.$.close()},find:function(b){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b))},findOne:function(b){return(b=this.$.querySelector(b))?new CKEDITOR.dom.element(b):null},_getHtml5ShivFrag:function(){var b=this.getCustomData("html5ShivFrag");b|| (b=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(b,!0),this.setCustomData("html5ShivFrag",b));return b}});CKEDITOR.dom.nodeList=function(b){this.$=b};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(b){return 0>b||b>=this.$.length?null:(b=this.$[b])?new CKEDITOR.dom.node(b):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(b){return new CKEDITOR.dom.node(b)})}};CKEDITOR.dom.element=function(b,h){"string"==typeof b&& (b=(h?h.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)};CKEDITOR.dom.element.get=function(b){return(b="string"==typeof b?document.getElementById(b)||document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(b,h){var f=new CKEDITOR.dom.element("div",h);f.setHtml(b);return f.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(b,h,f,a){var g=h.getCustomData("list_marker_id")|| h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),l=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[g]=h;l[f]=1;return h.setCustomData(f,a)};CKEDITOR.dom.element.clearAllMarkers=function(b){for(var h in b)CKEDITOR.dom.element.clearMarkers(b,b[h],1)};CKEDITOR.dom.element.clearMarkers=function(b,h,f){var a=h.getCustomData("list_marker_names"),g=h.getCustomData("list_marker_id"),l;for(l in a)h.removeCustomData(l); h.removeCustomData("list_marker_names");f&&(h.removeCustomData("list_marker_id"),delete b[g])};(function(){function b(a,c){return-1<(" "+a+" ").replace(l," ").indexOf(" "+c+" ")}function h(a){var c=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||a.removeAttribute("id")}}function f(a,c){var e=CKEDITOR.tools.escapeCss(a.$.id);return"#"+e+" "+c.split(/,\s*/).join(", #"+e+" ")}function a(a){for(var c=0,e=0,d=m[a].length;eCKEDITOR.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, c){var e=new CKEDITOR.dom.range(this.getDocument());e.setStartAfter(this);e.setEndAfter(a);var d=e.extractContents(!1,c||!1),b;e.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(e=new CKEDITOR.dom.element("div");b=d.getFirst();)b.$.style.backgroundColor&&(b.$.style.backgroundColor=b.$.style.backgroundColor),e.append(b);e.insertAfter(this);e.remove(!0)}else d.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)& 16)}:function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):c!=a.$&&c.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(c){}}return function(c){c?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 c=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&&(c.height=c.bottom-c.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),c):c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var c=this.$;if(this.getParent())return c.innerHTML=a;var e=this.getDocument()._getHtml5ShivFrag();e.appendChild(c);c.innerHTML=a;e.removeChild(c);return a}catch(d){this.$.innerHTML=""; c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.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(c){this.$[a?"textContent":"innerText"]=c}}(),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 c={},e=this.$.attributes,d;a=CKEDITOR.tools.isArray(a)?a:[];for(d=0;d=document.documentMode){var c=this.$.scopeName;"HTML"!=c&&(a=c.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var c=this.$.firstChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getNext(a)); return c},getLast:function(a){var c=this.$.lastChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getPrevious(a));return c},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var c=0;cCKEDITOR.env.version&&this.is("a")){var e=this.getParent();e.type==CKEDITOR.NODE_ELEMENT&&(e=e.clone(),e.setHtml(c),c=e.getHtml(),e.setHtml(a),a=e.getHtml())}return c==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),c,e;a&&CKEDITOR.env.webkit&& (c=this.getWindow(),!c.equals(CKEDITOR.document.getWindow())&&(e=c.$.frameElement)&&(a=(new CKEDITOR.dom.element(e)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),c=0,e=a.count();cCKEDITOR.env.version?function(c){return"name"==c?!!this.$.name:a.call(this,c)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var e=this.$; a=a.$;if(e!=a){var d;if(c)for(;d=e.lastChild;)a.insertBefore(e.removeChild(d),a.firstChild);else for(;d=e.firstChild;)a.appendChild(e.removeChild(d))}},mergeSiblings:function(){function a(c,e,d){if(e&&e.type==CKEDITOR.NODE_ELEMENT){for(var b=[];e.data("cke-bookmark")||e.isEmptyInlineRemoveable();)if(b.push(e),e=d?e.getNext():e.getPrevious(),!e||e.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(e)){for(var g=d?c.getLast():c.getFirst();b.length;)b.shift().move(c,!d);e.moveChildren(c,!d);e.remove(); g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(c){if(!1===c||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,e){this.$.setAttribute(a,e);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,e){"class"==c?this.$.className=e:"style"==c?this.$.style.cssText=e:"tabindex"==c? this.$.tabIndex=e:"checked"==c?this.$.checked=e:"contenteditable"==c?a.call(this,"contentEditable",e):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,e){if("src"==c&&e.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);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 c=0;cCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,c=this.getElementsByTag("*"),e=0,d=c.count();ef||0f?f:b);e&&(0>g||0g?g:d,0)},setState:function(a,c,e){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+"_off");this.removeClass(c+"_disabled");e&&this.setAttribute("aria-pressed",!0);e&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on"); e&&this.setAttribute("aria-disabled",!0);e&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off"),this.removeClass(c+"_on"),this.removeClass(c+"_disabled"),e&&this.removeAttribute("aria-pressed"),e&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){var e=this.$.attributes;c=c||{};for(var d=0;dCKEDITOR.env.version){var b=d.ownerDocument.createEventObject(),g;for(g in c)b[g]=c[g];d.fireEvent(e,b)}else d[d[a]?a:e](c)},isDetached:function(){var a=this.getDocument(),c=a.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8=E.getChildCount()?(E=E.getChild(B-1),G=!0):E=E.getChild(B):D=G=!0;u.type==CKEDITOR.NODE_TEXT?k?F=!0:u.split(C):0ha)for(;X;)X=f(X,L,!0);L=ea}k||h()}}function f(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(!0),b=CKEDITOR.dom.walker.bogus();return function(g){return e(g)||c(g)?!0:b(g)&&!a?a=!0:g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(l)?!1:!0}}function a(a){var c=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(1);return function(b){return e(b)||c(b)?!0:!a&&m(b)||b.type== CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$removeEmpty)}}function g(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&e(a)&&(b=a);return c(a)&&!(m(a)&&a.equals(b))})}}var l={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},m=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?: |\xa0)$/,c=CKEDITOR.dom.walker.editable(),e=CKEDITOR.dom.walker.ignored(!0); CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var c=new CKEDITOR.dom.documentFragment(this.document); this.collapsed||h(this,2,c,!1,"undefined"==typeof a?!0:a);return c},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,c){var e=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,e,a,"undefined"==typeof c?!0:c);return e},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function c(a){return a.getAscendant(function(a){var d; if(d=a.data&&a.data("cke-temp"))d=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return d},!0)}var e=this.startContainer,b=this.endContainer,g=this.collapsed,f,p,h,l;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");a&&(h="cke_bm_"+CKEDITOR.tools.getNextNumber(),f.setAttribute("id",h+(g?"C":"S")));g||(p=f.clone(),p.setHtml("\x26nbsp;"),a&&p.setAttribute("id",h+"E"),l=this.clone(),c(b)&&(b=c(b), l.moveToPosition(b,CKEDITOR.POSITION_AFTER_END)),l.collapse(),l.insertNode(p));l=this.clone();c(e)&&(b=c(e),l.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START));l.collapse(!0);l.insertNode(f);p?(this.setStartAfter(f),this.setEndBefore(p)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:a?h+(g?"C":"S"):f,endNode:a?h+"E":p,serializable:a,collapsed:g}},createBookmark2:function(){function a(d){var c=d.container,b=d.offset,g;g=c;var n=b;g=g.type!=CKEDITOR.NODE_ELEMENT||0===n||n==g.getChildCount()? 0:g.getChild(n-1).type==CKEDITOR.NODE_TEXT&&g.getChild(n).type==CKEDITOR.NODE_TEXT;g&&(c=c.getChild(b-1),b=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=b.getIndex(),a.container=b.getParent()))}}var e=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(e){var b=this.collapsed,g={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};e&&(a(g),c(g,this.root), b||(a(f),c(f,this.root)));return{start:g.container.getAddress(e),end:b?null:f.container.getAddress(e),startOffset:g.offset,endOffset:f.offset,normalized:e,collapsed:b,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var c=this.document.getByAddress(a.start,a.normalized),e=a.startOffset,b=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(c,e);b?this.setEnd(b,a):this.collapse(!0)}else c=(e=a.serializable)?this.document.getById(a.startNode):a.startNode,a=e?this.document.getById(a.endNode): a.endNode,this.setStartBefore(c),c.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,c=this.endContainer,e=this.startOffset,b=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT)if(g=a.getChildCount(),g>e)a=a.getChild(e);else if(1>g)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(c.type==CKEDITOR.NODE_ELEMENT)if(g=c.getChildCount(),g>b)c=c.getChild(b).getPreviousSourceNode(!0); else if(1>g)c=c.getPreviousSourceNode();else{for(c=c.$;c.lastChild;)c=c.lastChild;c=new CKEDITOR.dom.node(c)}a.getPosition(c)&CKEDITOR.POSITION_FOLLOWING&&(a=c);return{startNode:a,endNode:c}},getCommonAncestor:function(a,c){var e=this.startContainer,b=this.endContainer,e=e.equals(b)?a&&e.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?e.getChild(this.startOffset):e:e.getCommonAncestor(b);return c&&!e.is?e.getParent():e},optimize:function(){var a=this.startContainer,c=this.startOffset; a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;c=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,c=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);c&&c.is&&c.is("span")&&c.data("cke-bookmark")&&this.setEndAt(c,CKEDITOR.POSITION_AFTER_END)},trim:function(a, c){var e=this.startContainer,b=this.startOffset,g=this.collapsed;if((!a||g)&&e&&e.type==CKEDITOR.NODE_TEXT){if(b)if(b>=e.getLength())b=e.getIndex()+1,e=e.getParent();else{var f=e.split(b),b=e.getIndex()+1,e=e.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):e.equals(this.endContainer)&&(this.endOffset+=1)}else b=e.getIndex(),e=e.getParent();this.setStart(e,b);if(g){this.collapse(!0);return}}e=this.endContainer;b=this.endOffset;c||g||!e||e.type!= CKEDITOR.NODE_TEXT||(b?(b>=e.getLength()||e.split(b),b=e.getIndex()+1):b=e.getIndex(),e=e.getParent(),this.setEnd(e,b))},enlarge:function(a,c){function e(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var b=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:var f=function(a,d){var c=new CKEDITOR.dom.range(h);c.setStart(a,d);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),e;for(c.guard= function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return!1;I=e!=a?e.getText():e.substring(d);if(b.test(I))return!1}return!0};if(this.collapsed)break;var p=this.getCommonAncestor(),h=this.root,l,m,k,u,E,C=!1,B,I;B=this.startContainer;var G=this.startOffset;B.type==CKEDITOR.NODE_TEXT?(G&&(B=!CKEDITOR.tools.trim(B.substring(0,G)).length&&B,C=!!B),B&&((u=B.getPrevious())||(k=B.getParent()))):(G&&(u=B.getChild(G-1)||B.getLast()),u||(k=B)); for(k=e(k);k||u;){if(k&&!u){!E&&k.equals(p)&&(E=!0);if(g?k.isBlockBoundary():!h.contains(k))break;C&&"inline"==k.getComputedStyle("display")||(C=!1,E?l=k:this.setStartBefore(k));u=k.getPrevious()}for(;u;)if(B=!1,u.type==CKEDITOR.NODE_COMMENT)u=u.getPrevious();else{if(u.type==CKEDITOR.NODE_TEXT)I=u.getText(),b.test(I)&&(u=null),B=/[\s\ufeff]$/.test(I);else if((u.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||c&&u.is("br"))&&!u.data("cke-bookmark"))if(C&&CKEDITOR.dtd.$removeEmpty[u.getName()]){I=u.getText(); if(b.test(I))u=null;else for(var G=u.$.getElementsByTagName("*"),J=0,D;D=G[J++];)if(!CKEDITOR.dtd.$removeEmpty[D.nodeName.toLowerCase()]){u=null;break}u&&(B=!!I.length)}else u=null;B&&(C?E?l=k:k&&this.setStartBefore(k):C=!0);if(u){B=u.getPrevious();if(!k&&!B){k=u;u=null;break}u=B}else k=null}k&&(k=e(k.getParent()))}B=this.endContainer;G=this.endOffset;k=u=null;E=C=!1;B.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(B.substring(G)).length?C=!0:(C=!B.getLength(),G==B.getLength()?(u=B.getNext())||(k=B.getParent()): f(B,G)&&(k=B.getParent())):(u=B.getChild(G))||(k=B);for(;k||u;){if(k&&!u){!E&&k.equals(p)&&(E=!0);if(g?k.isBlockBoundary():!h.contains(k))break;C&&"inline"==k.getComputedStyle("display")||(C=!1,E?m=k:k&&this.setEndAfter(k));u=k.getNext()}for(;u;){B=!1;if(u.type==CKEDITOR.NODE_TEXT)I=u.getText(),f(u,0)||(u=null),B=/^[\s\ufeff]/.test(I);else if(u.type==CKEDITOR.NODE_ELEMENT){if((0=p.getLength()?f.setStartAfter(p):(f.setStartBefore(p),e=0):f.setStartBefore(p));h&&h.type==CKEDITOR.NODE_TEXT&&(k?k>=h.getLength()?f.setEndAfter(h):(f.setEndAfter(h),m=0):f.setEndBefore(h));var f=new CKEDITOR.dom.walker(f),u=CKEDITOR.dom.walker.bookmark(),E=CKEDITOR.dom.walker.bogus();f.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var C;f.guard=function(c,e){if(g&&E(c)||u(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&& c.type==CKEDITOR.NODE_TEXT||e&&c.equals(C)||!1===b&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return!1;e||c.type!=CKEDITOR.NODE_ELEMENT||(C=c);return!0};e&&(p=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(p,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);m&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)); return!(!e&&!m)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var c=this.startContainer,e=c.getChild(this.startOffset);e?a.insertBefore(e):c.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,c){this.setStartAt(a,c);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(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=c;this.endContainer||(this._setEndContainer(a),this.endOffset=c);b(this)},setEnd:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=c;this.startContainer||(this._setStartContainer(a), this.startOffset=c);b(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a, a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}b(this)},setEndAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}b(this)},fixBlock:function(a, c){var e=this.createBookmark(),b=this.document.createElement(c);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(b);b.trim();this.insertNode(b);var g=b.getBogus();g&&g.remove();b.appendBogus();this.moveToBookmark(e);return b},splitBlock:function(a,c){var e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),b=new CKEDITOR.dom.elementPath(this.endContainer,this.root),g=e.block,f=b.block,p=null;if(!e.blockLimit.equals(b.blockLimit))return null;"br"!= a&&(g||(g=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));e=g&&this.checkStartOfBlock();b=f&&this.checkEndOfBlock();this.deleteContents();g&&g.equals(f)&&(b?(p=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),f=null):e?(p=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g=null):(f=this.splitElement(g,c|| !1),g.is("ul","ol")||g.appendBogus()));return{previousBlock:g,nextBlock:f,wasStartOfBlock:e,wasEndOfBlock:b,elementPath:p}},splitElement:function(a,c){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var e=this.extractContents(!1,c||!1),b=a.clone(!1,c||!1);e.appendTo(b);b.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return b},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return c(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()|| d.is("table")&&a.is("caption")?!1:!0}}var c=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(!1);return function(c){for(var e=this.createBookmark(),b=this[c?"endPath":"startPath"](),g=b.block||b.blockLimit,f;g&&!g.equals(b.root)&&!g.getFirst(a(g));)f=g.getParent(),this[c?"setEndAt":"setStartAt"](g,CKEDITOR.POSITION_AFTER_END),g.remove(1),g=f;this.moveToBookmark(e)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer, this.root)},checkBoundaryOfElement:function(d,c){var e=c==CKEDITOR.START,b=this.clone();b.collapse(e);b[e?"setStartAt":"setEndAt"](d,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(b);b.evaluator=a(e);return b[e?"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)),k.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer, this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=f();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)),k.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=f();return a.checkForward()},getPreviousNode:function(a,c,e){var b=this.clone();b.collapse(1);b.setStartAt(e||this.root,CKEDITOR.POSITION_AFTER_START);e=new CKEDITOR.dom.walker(b);e.evaluator=a;e.guard=c;return e.previous()},getNextNode:function(a,c,e){var b=this.clone();b.collapse();b.setEndAt(e||this.root,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(b);e.evaluator=a;e.guard=c;return e.next()},checkReadOnly:function(){function a(d,c){for(;d;){if(d.type== CKEDITOR.NODE_ELEMENT){if("false"==d.getAttribute("contentEditable")&&!d.data("cke-editable"))return 0;if(d.is("html")||"true"==d.getAttribute("contentEditable")&&(d.contains(c)||d.equals(c)))break}d=d.getParent()}return 1}return function(){var c=this.startContainer,e=this.endContainer;return!(a(c,e)&&a(e,c))}}(),moveToElementEditablePosition:function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START), !0;for(var b=0;a;){if(a.type==CKEDITOR.NODE_TEXT){c&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);b=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),b=1;else if(c&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var g=a,f=b,h=void 0;g.type==CKEDITOR.NODE_ELEMENT&&g.isEditable(!1)&&(h=g[c?"getLast":"getFirst"](e));f||h||(h=g[c?"getPrevious":"getNext"](e));a=h}return!!b},moveToClosestEditablePosition:function(a,c){var e,b=0,g,f,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(e=new CKEDITOR.dom.range(this.root),e.moveToPosition(a,h[c?0:1])):e=this.clone();if(a&& !a.is(CKEDITOR.dtd.$block))b=1;else if(g=e[c?"getNextEditableNode":"getPreviousEditableNode"]())b=1,(f=g.type==CKEDITOR.NODE_ELEMENT)&&g.is(CKEDITOR.dtd.$block)&&"false"==g.getAttribute("contenteditable")?(e.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),e.setEndAt(g,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&g.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(e.setEnd(g,0),e.collapse()):e.moveToPosition(g,h[c?1:0]);b&&this.moveToRange(e);return!!b},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)}, moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),c=CKEDITOR.dom.walker.bookmark(!1,!0),e=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return e(a)&&c(a)};var b=a.next();a.reset();return b&&b.equals(a.previous())?b:null},getTouchedStartNode:function(){var a=this.startContainer; return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:g(),getPreviousEditableNode:g(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.getTouchedStartNode(),e=this.getTouchedEndNode(),b=c.getAscendant("table",!0),e=e.getAscendant("table",!0);return b&&!this.root.contains(b)? null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):b&&e&&(b.equals(e)||b.contains(e)||e.contains(b))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,e,b,g=this.clone();g.optimize();(b=g.startContainer.type==CKEDITOR.NODE_TEXT)?(e=g.startContainer.getText(),c=g.startContainer.split(g.startOffset),a.insertAfter(g.startContainer)):g.insertNode(a);a.scrollIntoView();b&&(g.startContainer.setText(e), c.remove());a.remove()},getClientRects:function(){function a(c,d){var e=CKEDITOR.tools.array.map(c,function(a){return a}),b=new CKEDITOR.dom.range(d.root),g,f,n;d.startContainer instanceof CKEDITOR.dom.element&&(f=0===d.startOffset&&d.startContainer.hasAttribute("data-widget"));d.endContainer instanceof CKEDITOR.dom.element&&(n=(n=d.endOffset===(d.endContainer.getChildCount?d.endContainer.getChildCount():d.endContainer.length))&&d.endContainer.hasAttribute("data-widget"));f&&b.setStart(d.startContainer.getParent(), d.startContainer.getIndex());n&&b.setEnd(d.endContainer.getParent(),d.endContainer.getIndex()+1);if(f||n)d=b;b=d.cloneContents().find("[data-cke-widget-id]").toArray();if(b=CKEDITOR.tools.array.map(b,function(a){var c=d.root.editor;a=a.getAttribute("data-cke-widget-id");return c.widgets.instances[a].element}))return b=CKEDITOR.tools.array.map(b,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;g=this.root.getDocument().$.createRange();g.setStart(c.getParent().$,c.getIndex()); g.setEnd(c.getParent().$,c.getIndex()+1);c=g.getClientRects();c.widgetRect=a.getClientRect();return c},d),CKEDITOR.tools.array.forEach(b,function(a){function c(b){CKEDITOR.tools.array.forEach(e,function(c,g){var f=CKEDITOR.tools.objectCompare(a[b],c);f||(f=CKEDITOR.tools.objectCompare(a.widgetRect,c));f&&(Array.prototype.splice.call(e,g,a.length-b,a.widgetRect),d=!0)});d||(barguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._|| (this._={}))}function h(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function f(a,c,b,g){a:{null==g&&(g=h(b));for(var l;l=g.shift();)if(l.getDtd().p){g={element:l,remaining:g};break a}g=null}if(!g)return 0;if((l=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&!l.check(c))return f(a,c,b,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=l;a._.nestedEditable={element:g.element,container:b,remaining:g.remaining,iterator:c};return 1}function a(a,c,b){if(!c)return!1;a=a.clone();a.collapse(!b);return a.checkBoundaryOfElement(c,b?CKEDITOR.START:CKEDITOR.END)}var g=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return l(a)&&m(a)},c={dd:1,dt:1,li:1};b.prototype={getNextParagraph:function(e){var d,b,h,m,r; e=e||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(f(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;if(!this._.started){var q=this.range.clone(); b=q.startPath();var p=q.endPath(),y=!q.collapsed&&a(q,b.block),t=!q.collapsed&&a(q,p.block,1);q.shrink(CKEDITOR.SHRINK_ELEMENT,!0);y&&q.setStartAt(b.block,CKEDITOR.POSITION_BEFORE_END);t&&q.setEndAt(p.block,CKEDITOR.POSITION_AFTER_START);b=q.endContainer.hasAscendant("pre",!0)||q.startContainer.hasAscendant("pre",!0);q.enlarge(this.forceBrBreak&&!b||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);q.collapsed||(b=new CKEDITOR.dom.walker(q.clone()),p=CKEDITOR.dom.walker.bookmark(!0, !0),b.evaluator=p,this._.nextNode=b.next(),b=new CKEDITOR.dom.walker(q.clone()),b.evaluator=p,b=b.previous(),this._.lastNode=b.getNextSourceNode(!0,null,q.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(p=this.range.clone(),p.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),p.checkEndOfBlock()&&(p=new CKEDITOR.dom.elementPath(p.endContainer,p.root),this._.lastNode=(p.block|| p.blockLimit).getNextSourceNode(!0))),this._.lastNode&&q.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=q.document.createText(""),this._.lastNode.insertAfter(b)),q=null);this._.started=1;b=q}p=this._.nextNode;q=this._.lastNode;for(this._.nextNode=null;p;){var y=0,t=p.hasAscendant("pre"),A=p.type!=CKEDITOR.NODE_ELEMENT,w=0;if(A)p.type==CKEDITOR.NODE_TEXT&&g.test(p.getText())&&(A=0);else{var u=p.getName();if(CKEDITOR.dtd.$block[u]&&"false"==p.getAttribute("contenteditable")){d= p;f(this,e,d);break}else if(p.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){if("br"==u)A=1;else if(!b&&!p.getChildCount()&&"hr"!=u){d=p;h=p.equals(q);break}b&&(b.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),"br"!=u&&(this._.nextNode=p));y=1}else{if(p.getFirst()){b||(b=this.range.clone(),b.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));p=p.getFirst();continue}A=1}}A&&!b&&(b=this.range.clone(),b.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));h=(!y||A)&&p.equals(q);if(b&&!y)for(;!p.getNext(k)&&!h;){u= p.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){y=1;A=0;h||u.equals(q);b.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}p=u;A=1;h=p.equals(q);w=1}A&&b.setEndAt(p,CKEDITOR.POSITION_AFTER_END);p=this._getNextSourceNode(p,w,q);if((h=!p)||y&&b)break}if(!d){if(!b)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(b.startContainer,b.root);p=d.blockLimit;y={div:1,th:1,td:1};d=d.block;!d&&p&&!this.enforceRealBlocks&&y[p.getName()]&& b.checkStartOfBlock()&&b.checkEndOfBlock()&&!p.equals(b.root)?d=p:!d||this.enforceRealBlocks&&d.is(c)?(d=this.range.document.createElement(e),b.extractContents().appendTo(d),d.trim(),b.insertNode(d),m=r=!0):"li"!=d.getName()?b.checkStartOfBlock()&&b.checkEndOfBlock()||(d=d.clone(!1),b.extractContents().appendTo(d),d.trim(),r=b.splitBlock(),m=!r.wasStartOfBlock,r=!r.wasEndOfBlock,b.insertNode(d)):h||(this._.nextNode=d.equals(q)?null:this._getNextSourceNode(b.getBoundaryNodes().endNode,1,q))}m&&(m= d.getPrevious())&&m.type==CKEDITOR.NODE_ELEMENT&&("br"==m.getName()?m.remove():m.getLast()&&"br"==m.getLast().$.nodeName.toLowerCase()&&m.getLast().remove());r&&(m=d.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&"br"==m.getName()&&(!CKEDITOR.env.needsBrFiller||m.getPrevious(l)||m.getNext(l))&&m.remove();this._.nextNode||(this._.nextNode=h||d.equals(q)||!q?null:this._getNextSourceNode(d,1,q));return d},_getNextSourceNode:function(a,c,b){function g(a){return!(a.equals(b)||a.equals(f))}var f=this.range.root; for(a=a.getNextSourceNode(c,null,g);!l(a);)a=a.getNextSourceNode(c,null,g);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}})();CKEDITOR.command=function(b,h){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&b.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,b,a)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)|| !this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:b})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var f;this.checkAllowed=function(a){return a||"boolean"!=typeof f?f=b.activeFilter.checkFeature(this):f};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)};CKEDITOR.command.prototype= {enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b||b!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=b;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON): this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3;CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"), extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};(function(){function b(a,c,d,e,b){var g,f;a=[];for(g in c){f=c[g];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:J(f);"$"!=g.charAt(0)&&(f.elements=g);d&&(f.featureName=d.toLowerCase());var n=f;n.elements=m(n.elements,/\s+/)||null;n.propertiesOnly=n.propertiesOnly||!0===n.elements;var h=/\s*,\s*/,p=void 0;for(p in O){n[p]=m(n[p], h)||null;var l=n,z=K[p],H=m(n[K[p]],h),u=n[p],k=[],D=!0,N=void 0;H?D=!1:H={};for(N in u)"!"==N.charAt(0)&&(N=N.slice(1),k.push(N),H[N]=!0,D=!1);for(;N=k.pop();)u[N]=u["!"+N],delete u["!"+N];l[z]=(D?!1:H)||null}n.match=n.match||null;e.push(f);a.push(f)}c=b.elements;b=b.generic;var v;d=0;for(e=a.length;d=--k&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),d(b))},v=function(a,c){b[a]=1;var d=h[a];delete h[a];for(var e=0;e=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==e.$.readyState)e.$.onreadystatechange=null,v(c,!0)}:(e.$.onload=function(){setTimeout(function(){e.$.onload=null;e.$.onerror=null;v(c,!0)},0)},e.$.onerror=function(){e.$.onload=null;e.$.onerror=null;v(c,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}; (function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={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(f){for(var a,g,l=0,m;a=this._.htmlPartsRegex.exec(f);){g=a.index;if(g>l)if(l=f.substring(l,g),m)m.push(l);else this.onText(l); l=this._.htmlPartsRegex.lastIndex;if(g=a[1])if(g=g.toLowerCase(),m&&CKEDITOR.dtd.$cdata[g]&&(this.onCDATA(m.join("")),m=null),!m){this.onTagClose(g);continue}if(m)m.push(a[0]);else if(g=a[3]){if(g=g.toLowerCase(),!/="/.test(g)){var k={},c,e=a[4];a=!!a[5];if(e)for(;c=b.exec(e);){var d=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";k[d]=!c&&h[d]?d:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(g,k,a);!m&&CKEDITOR.dtd.$cdata[g]&&(m=[])}}else if(g=a[2])this.onComment(g)}if(f.length>l)this.onText(f.substring(l, f.length))}}})();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("\x3c",b)},openTagClose:function(b,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(b,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",b,'\x3d"',h,'"')},closeTag:function(b){this._.output.push("\x3c/",b,"\x3e")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("\x3c!--", b,"--\x3e")},write:function(b){this._.output.push(b)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(b){var h=this._.output.join("");b&&this.reset();return h}}});"use strict";(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,h=CKEDITOR.tools.indexOf(b,this),f=this.previous,a=this.next;f&&(f.next=a);a&&(a.previous=f);b.splice(h,1);this.parent=null},replaceWith:function(b){var h=this.parent.children, f=CKEDITOR.tools.indexOf(h,this),a=b.previous=this.previous,g=b.next=this.next;a&&(a.next=b);g&&(g.previous=b);h[f]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var h=b.parent.children,f=CKEDITOR.tools.indexOf(h,b),a=b.next;h.splice(f+1,0,this);this.next=b.next;this.previous=b;b.next=this;a&&(a.previous=this);this.parent=b.parent},insertBefore:function(b){var h=b.parent.children,f=CKEDITOR.tools.indexOf(h,b);h.splice(f,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next= this);b.previous=this;this.parent=b.parent},getAscendant:function(b){var h="function"==typeof b?b:"string"==typeof b?function(a){return a.name==b}:function(a){return a.name in b},f=this.parent;for(;f&&f.type==CKEDITOR.NODE_ELEMENT;){if(h(f))return f;f=f.parent}return null},wrapWith:function(b){this.replaceWith(b);b.add(this);return b},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(b){return b||{}}}})();"use strict";CKEDITOR.htmlParser.comment= function(b){this.value=b;this._={isBlockLike:!1}};CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(b,h){var f=this.value;if(!(f=b.onComment(h,f,this)))return this.remove(),!1;if("string"!=typeof f)return this.replaceWith(f),!1;this.value=f;return!0},writeHtml:function(b,h){h&&this.filter(h);b.comment(this.value)}});"use strict";(function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:!1}}; CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b,h){if(!(this.value=b.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(b,h){h&&this.filter(h);b.text(this.value)}})})();"use strict";(function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})})(); "use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}};(function(){function b(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),f={ol:1,ul:1},a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1, script:1}),g={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(l,m,k){function c(a){var c;if(0m;m++)if(h=g[m]){h=h.exec(b,a,this);if(!1===h)return null;if(h&&h!=a)return this.onNode(b,h);if(a.parent&&!a.name)break}return a},onNode:function(b,a){var g=a.type;return g==CKEDITOR.NODE_ELEMENT?this.onElement(b,a):g==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(b,a.value,a)):g==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(b,a.value,a)):null},onAttribute:function(b,a,g,h){return(g=this.attributesRules[g])?g.exec(b,h,a,this):h}}}); CKEDITOR.htmlParser.filterRulesGroup=b;b.prototype={add:function(b,a,g){this.rules.splice(this.findIndex(a),0,{value:b,priority:a,options:g})},addMany:function(b,a,g){for(var h=[this.findIndex(a),0],m=0,k=b.length;m/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(K,function(a,c){return decodeURIComponent(c)})}function v(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function(a){return"\x3c!--"+t+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function x(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function r(a,c){var d=c._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return d&&d[c]||""})}function q(a,c){var d=[],e=c.config.protectedSource,b=c._.dataStore||(c._.dataStore= {id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,e=[/|$)/gi,//gi,//gi].concat(e);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var f=0;f]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,c){b[b.id]=decodeURIComponent(c);return"{cke_protected_"+b.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,e,b){return"\x3c"+d+e+"\x3e"+r(x(b),c)+"\x3c/"+d+"\x3e"})}var p;CKEDITOR.htmlDataProcessor=function(a){var c, g,f=this;this.editor=a;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=g=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(E);c.addRules(C,{applyToAll:!0});c.addRules(b(a,"data"),{applyToAll:!0});g.addRules(B);g.addRules(I,{applyToAll:!0});g.addRules(b(a,"html"),{applyToAll:!0});a.on("toHtml",function(c){c=c.data;var b=c.dataValue,g,b=p(b),b=q(b,a),b=d(b,O),b=e(b),b=d(b,F),b=b.replace(M,"$1cke:$2"),b=b.replace(N,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), b=b.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),b=b.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");g=c.context||a.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==g&&(g="div",b="\x3cpre\x3e"+b+"\x3c/pre\x3e",f=1);g=a.document.createElement(g);g.setHtml("a"+b);b=g.getHtml().substr(1);b=b.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(b=b.replace(/^
|<\/pre>$/gi,""));b=b.replace(z,"$1$2");b=n(b);b=x(b);g=!1===c.fixForBody?!1:
h(c.enterMode,a.config.autoParagraph);b=CKEDITOR.htmlParser.fragment.fromHtml(b,c.context,g);g&&(f=b,!f.children.length&&CKEDITOR.dtd[f.name][g]&&(g=new CKEDITOR.htmlParser.element(g),f.add(g)));c.dataValue=b},null,null,5);a.on("toHtml",function(c){c.data.filter.applyTo(c.data.dataValue,!0,c.data.dontFilter,c.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var c=a.dataValue,
d=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(d);c=d.getHtml(!0);a.dataValue=v(c)},null,null,15);a.on("toDataFormat",function(c){var d=c.data.dataValue;c.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^
/i,""));c.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,c.data.context,h(c.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, !1,!0)},null,null,11);a.on("toDataFormat",function(c){var d=c.data.dataValue,b=f.writer;b.reset();d.writeChildrenHtml(b);d=b.getHtml(!0);d=x(d);d=r(d,a);c.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,d,b){var e=this.editor,g,f,h,n;c&&"object"==typeof c?(g=c.context,d=c.fixForBody,b=c.dontFilter,f=c.filter,h=c.enterMode,n=c.protectedWhitespaces):g=c;g||null===g||(g=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:g,fixForBody:d,dontFilter:b, filter:f||e.filter,enterMode:h||e.enterMode,protectedWhitespaces:n}).dataValue},toDataFormat:function(a,c){var d,b,e;c&&(d=c.context,b=c.filter,e=c.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:b||this.editor.filter,context:d,enterMode:e||this.editor.enterMode}).dataValue}};var y=/(?: |\xa0)$/,t="{cke_protected}",A=CKEDITOR.dtd,w="caption colgroup col thead tfoot tbody".split(" "),u=CKEDITOR.tools.extend({},A.$blockLimit, A.$block),E={elements:{input:k,textarea:k}},C={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var c=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===c.indexOf("javascript")||0===c.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},B={elements:{embed:function(a){var c=a.parent;if(c&&"object"==c.name){var d=c.attributes.width,c=c.attributes.height; d&&(a.attributes.width=d);c&&(a.attributes.height=c)}},a:function(a){var c=a.attributes;if(!(a.children.length||c.name||c.id||a.attributes["data-cke-saved-name"]))return!1}}},I={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return!1;for(var d=["name","href","src"],b,e=0;eb?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 c=a.children[0];c&&c.value&&(c.value=CKEDITOR.tools.trim(c.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var c=a.children[0];!c&&m(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(I.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g, function(a){return a.toLowerCase()})});var G=/<(a|area|img|input|source)\b([^>]*)>/gi,J=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/^(href|src|name)$/i,F=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,O=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,K=/([^<]*)<\/cke:encoded>/gi,M=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,z=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,N=/]*?)\/?>(?!\s*<\/cke:\1)/gi; p=function(){function a(d){return CKEDITOR.tools.array.reduce(d.split(""),function(a,d){var b=d.toLowerCase(),e=d.toUpperCase(),g=c(b);b!==e&&(g+="|"+c(e));return a+("("+g+")")},"")}function c(a){var d;d=a.charCodeAt(0);var b=d.toString(16);d={htmlCode:"\x26#"+d+";?",hex:"\x26#x0*"+b+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var e in d)d[e]&&(a+="|"+d[e]);return a}var d=new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+ "?"+a("cke:encoded\x3e")+")","gi"),b=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+a("}")+")","gi");return function(a){return a.replace(d,"").replace(b,"")}}()})();"use strict";CKEDITOR.htmlParser.element=function(b,h){this.name=b;this.attributes=h||{};this.children=[];var f=b||"",a=f.match(/^cke:(.*)/);a&&(f=a[1]);f=!!(CKEDITOR.dtd.$nonBodyContent[f]||CKEDITOR.dtd.$block[f]||CKEDITOR.dtd.$listItem[f]||CKEDITOR.dtd.$tableContent[f]||CKEDITOR.dtd.$nonEditable[f]||"br"==f);this.isEmpty=!!CKEDITOR.dtd.$empty[b]; this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:f,hasInlineStarted:this.isEmpty||!f}};CKEDITOR.htmlParser.cssStyle=function(b){var h={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,a,g){"font-family"==a&&(g=g.replace(/["']/g,""));h[a.toLowerCase()]=g});return{rules:h,populate:function(b){var a=this.toString();a&&(b instanceof CKEDITOR.dom.element?b.setAttribute("style",a):b instanceof CKEDITOR.htmlParser.element? b.attributes.style=a:b.style=a)},toString:function(){var b=[],a;for(a in h)h[a]&&b.push(a,":",h[a],";");return b.join("")}}};(function(){function b(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var h=function(a,b){a=a[0];b=b[0];return ab?1:0},f=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:f.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name, this.attributes)},filter:function(a,b){var f=this,h,k;b=f.getFilterContext(b);if(!f.parent)a.onRoot(b,f);for(;;){h=f.name;if(!(k=a.onElementName(b,h)))return this.remove(),!1;f.name=k;if(!(f=a.onElement(b,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==h)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f),!1;if(!f.name)return this.replaceWithChildren(),!1}h=f.attributes;var c,e;for(c in h){for(k=h[c];;)if(e=a.onAttributeName(b,c))if(e!=c)delete h[c], c=e;else break;else{delete h[c];break}e&&(!1===(k=a.onAttribute(b,f,e,k))?delete h[e]:h[e]=k)}f.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:f.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var f=this.name,m=[],k=this.attributes,c,e;a.openTag(f,k);for(c in k)m.push([c,k[c]]);a.sortAttributes&&m.sort(h);c=0;for(e=m.length;cCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),c());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};A.eol.detect(a,this);A.bogus.exclude(a);A.cell.shrink(a);a.fragment=a.range.cloneContents(); A.tree.rebuild(a,this);A.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var d=w,b={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(b);b.bookmark=a.createBookmark();delete b.range;var g=this.editor.createRange();g.moveToPosition(b.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);b.targetBookmark=g.createBookmark();d.list.detectMerge(b,this); d.table.detectRanges(b,this);d.block.detectMerge(b,this);b.tableContentsRanges?(d.table.deleteRanges(b),a.moveToBookmark(b.bookmark),b.range=a):(a.moveToBookmark(b.bookmark),b.range=a,a.extractContents(d.detectExtractMerge(b)));a.moveToBookmark(b.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(b,this);d.table.purge(b,this);d.block.merge(b,this);if(c){d=a.startPath();if(b=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var b=d.block.getElementsByTag("span"), g=0,f;if(b)for(;f=b.getItem(g++);)if(!v(f)){b=!0;break a}b=!1}b=!b}b&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),x(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var c=this.editor;this.attachListener(c,"beforeGetData",function(){var a=this.getData();this.is("textarea")||!1!==c.config.ignoreEmptyParagraph&&(a=a.replace(q,function(a,c){return c}));c.setData(a,null,1)}, this);this.attachListener(c,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(c,"afterSetData",function(){this.setData(c.getData(1))},this);this.attachListener(c,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(c,"beforeFocus",function(){var a=c.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},this);this.attachListener(c,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(c, "insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(c,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(c.readOnly);this.attachClass("cke_editable");c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):c.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+c.config.contentsLangDirection);c.keystrokeHandler.blockedKeystrokes[8]= +c.readOnly;c.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(){c._.previousScrollTop=c.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?k.$.styleSheet.cssText=h:k.setText(h)):(h=e.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),g.setCustomData("stylesheet",h),h.data("cke-temp",1))}g=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",g+1);this.setCustomData("cke_includeReadonly",!c.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var c= (new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");c&&2!=a.$.button&&c.isReadOnly()&&a.preventDefault()});var m={8:1,46:1};this.attachListener(c,"key",function(a){if(c.readOnly)return!0;var d=a.data.domEvent.getKey(),b;a=c.getSelection();if(0!==a.getRanges().length){if(d in m){var e,g=a.getRanges()[0],f=g.startPath(),h,k,p,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=a.getSelectedElement())||(e=l(a))?(c.fire("saveSnapshot"),g.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(), g.select(),c.fire("saveSnapshot"),b=1):g.collapsed&&((h=f.block)&&(p=h[d?"getPrevious":"getNext"](n))&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("table")&&g[d?"checkStartOfBlock":"checkEndOfBlock"]()?(c.fire("saveSnapshot"),g[d?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),g["moveToElementEdit"+(d?"End":"Start")](p),g.select(),c.fire("saveSnapshot"),b=1):f.blockLimit&&f.blockLimit.is("td")&&(k=f.blockLimit.getAscendant("table"))&&g.checkBoundaryOfElement(k,d?CKEDITOR.START:CKEDITOR.END)&&(p=k[d? "getPrevious":"getNext"](n))?(c.fire("saveSnapshot"),g["moveToElementEdit"+(d?"End":"Start")](p),g.checkStartOfBlock()&&g.checkEndOfBlock()?p.remove():g.select(),c.fire("saveSnapshot"),b=1):(k=f.contains(["td","th","caption"]))&&g.checkBoundaryOfElement(k,d?CKEDITOR.START:CKEDITOR.END)&&(b=1))}return!b}});c.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(d){d.data.getKeystroke()in m&&!this.getFirst(a)&&(this.appendBogus(),d=c.createRange(),d.moveToPosition(this, CKEDITOR.POSITION_AFTER_START),d.select())});this.attachListener(this,"dblclick",function(a){if(c.readOnly)return!1;a={element:a.data.getTarget()};c.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",f);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var d=a.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(c.getSelection().selectElement(d),d.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&& this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&c.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(q,""))){var d=c.createRange();d.moveToElementEditStart(a);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}), this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(c,"key",function(a){if(c.readOnly)return!0;var b=a.data.domEvent.getKey();if(b in m&&(a=c.getSelection(),0!==a.getRanges().length)){var b=8==b,e=a.getRanges()[0];a=e.startPath();if(e.collapsed)a:{var g=a.block;if(g&&e[b?"checkStartOfBlock":"checkEndOfBlock"]()&&e.moveToClosestEditablePosition(g,!b)&&e.collapsed){if(e.startContainer.type==CKEDITOR.NODE_ELEMENT){var f= e.startContainer.getChild(e.startOffset-(b?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){c.fire("saveSnapshot");f.remove();a=!0;break a}}e=e.startPath().block;if(!e||e&&e.contains(g))a=void 0;else{c.fire("saveSnapshot");var h;(h=(b?e:g).getBogus())&&h.remove();h=c.getSelection();f=h.createBookmarks();(b?g:e).moveChildren(b?e:g,!1);a.lastElement.mergeSiblings();d(g,e,!b);h.selectBookmarks(f);a=!0}}else a=!1}else b=e,h=a.block,e=b.endPath().block,h&&e&&!h.equals(e)?(c.fire("saveSnapshot"), (g=h.getBogus())&&g.remove(),b.enlarge(CKEDITOR.ENLARGE_INLINE),b.deleteContents(),e.getParent()&&(e.moveChildren(h,!1),a.lastElement.mergeSiblings(),d(h,e,!0)),b=c.getSelection().getRanges()[0],b.collapse(1),b.optimize(),""===b.startContainer.getHtml()&&b.startContainer.appendBogus(),b.select(),a=!0):a=!1;if(!a)return;c.getSelection().scrollIntoView();c.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(c){a= this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),c=a.getHead();if(c.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),c.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable= function(a){var c=this._.editable;if(c&&a)return 0;if(!arguments.length)return c;a?c=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),c=null);return this._.editable=c};CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable", !1))});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),b(a),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var c=a.editor;c.on("mode",function(){var a=c.editable();if(a&&a.isInline()){var d=c.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var b=c.fire("ariaEditorHelpLabel",{}).label;if(b&& (d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),b=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+b+"\x3c/span\x3e");d.append(b);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");n=CKEDITOR.dom.walker.whitespaces(!0);v=CKEDITOR.dom.walker.bookmark(!1,!0);x=CKEDITOR.dom.walker.empty(); r=CKEDITOR.dom.walker.bogus();q=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function d(a){return a.type==CKEDITOR.NODE_ELEMENT}function b(a,c){var e,g,f,h,n=[],k=c.range.startContainer;e=c.range.startPath();for(var k=l[k.getName()],m=0,p=a.getChildren(),v=p.count(),J=-1,G=-1,x=0,F=e.contains(l.$list);mCKEDITOR.env.version&&b.getChildCount()&&b.getFirst().remove())}return function(b){var e=b.startContainer,g=e.getAscendant("table",1),f=!1;d(g.getElementsByTag("td"));d(g.getElementsByTag("th"));g=b.clone();g.setStart(e,0);g= a(g).lastBackward();g||(g=b.clone(),g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),f=!0);g||(g=e);g.is("table")?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),g.remove()):(g.is({tbody:1,thead:1,tfoot:1})&&(g=c(g,"tr",f)),g.is("tr")&&(g=c(g,g.getParent().is("thead")?"th":"td",f)),(e=g.getBogus())&&e.remove(),b.moveToPosition(g,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();t=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a, c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return c}return function(c){var d=c.startContainer,b=!1,e;e=c.clone();e.setStart(d,0);e=a(e).lastBackward();e||(e=c.clone(),e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),b=!0);e||(e=d);e.is(CKEDITOR.dtd.$list)?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),e.remove()): ((d=e.getBogus())&&d.remove(),c.moveToPosition(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),c.select())}}();A={eol:{detect:function(a,c){var d=a.range,b=d.clone(),e=d.clone(),g=new CKEDITOR.dom.elementPath(d.startContainer,c),f=new CKEDITOR.dom.elementPath(d.endContainer,c);b.collapse(1);e.collapse();g.block&&b.checkBoundaryOfElement(g.block,CKEDITOR.END)&&(d.setStartAfter(g.block),a.prependEolBr=1);f.block&&e.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(d.setEndBefore(f.block), a.appendEolBr=1)},fix:function(a,c){var d=c.getDocument(),b;a.appendEolBr&&(b=this.createEolBr(d),a.fragment.append(b));!a.prependEolBr||b&&!b.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var c=a.range.getBoundaryNodes(),d=c.startNode,c=c.endNode;!c||!r(c)||d&&d.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var d=a.range,b=d.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(b, c),g=new CKEDITOR.dom.elementPath(d.startContainer,c),d=new CKEDITOR.dom.elementPath(d.endContainer,c),f;b.type==CKEDITOR.NODE_TEXT&&(b=b.getParent());if(e.blockLimit.is({tr:1,table:1})){var h=e.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(g=g.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!g.equals(d))){var n=e.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(n)}}f||(f=function(a){return!a.equals(e.block)&& !a.equals(e.blockLimit)});this.rebuildFragment(a,c,b,f)},rebuildFragment:function(a,c,d,b){for(var e;d&&!d.equals(c)&&b(d);)e=d.clone(0,1),a.fragment.appendTo(e),a.fragment=e,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,d=a.endContainer,b=a.startOffset,e=a.endOffset;c.type==CKEDITOR.NODE_ELEMENT&&c.equals(d)&&c.is("tr")&&++b==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};w=function(){function a(c,d){var b=c.getParent();if(b.is(CKEDITOR.dtd.$inline))c[d?"insertBefore":"insertAfter"](b)} function c(d,b,e){a(b);a(e,1);for(var g;g=e.getNext();)g.insertAfter(b),b=g;x(d)&&d.remove()}function d(a,c){var b=new CKEDITOR.dom.range(a);b.setStartAfter(c.startNode);b.setEndBefore(c.endNode);return b}return{list:{detectMerge:function(a,c){var b=d(c,a.bookmark),e=b.startPath(),g=b.endPath(),f=e.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&& g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)b=b.clone(),b.setStartBefore(a.bookmark.startNode),b.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=b.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var b=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(b,d),f=new CKEDITOR.dom.elementPath(e,d);if(a.mergeList){var h=g.contains(CKEDITOR.dtd.$list),n=f.contains(CKEDITOR.dtd.$list);h.equals(n)||(n.moveChildren(h),n.remove())}a.mergeListItems&& (g=g.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),g.equals(f)||c(f,b,e));b.remove();e.remove()}}},block:{detectMerge:function(a,c){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(c);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var b=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(b, d),f=new CKEDITOR.dom.elementPath(e,d),g=g.block,f=f.block;g&&f&&!g.equals(f)&&c(f,b,e);b.remove();e.remove()}}},table:function(){function a(d){var e=[],g,f=new CKEDITOR.dom.walker(d),h=d.startPath().contains(b),n=d.endPath().contains(b),z={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(z,a,l,1)}if(f&&h&&a.equals(h))g=d.clone(),g.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!f&&n&& a.equals(n))g=d.clone(),g.setStartAt(n,CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&(!h||c(a,h))&&(!n||c(a,n));if(!l&&(l=f))if(a.is(b))var l=h&&h.getAscendant("table",!0),k=n&&n.getAscendant("table",!0),m=a.getAscendant("table",!0),l=l&&l.contains(m)||k&&k.contains(m);else l=void 0;l&&(g=d.clone(),g.selectNodeContents(a),e.push(g))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(z);return e}function c(a,d){var b=CKEDITOR.POSITION_CONTAINS+ CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(d);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&b)}var b={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,d=c.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),e=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&++e};d.checkForward();if(1g&&e&&e.intersectsNode(d.$)){var f=[{node:b.anchorNode,offset:b.anchorOffset},{node:b.focusNode,offset:b.focusOffset}];b.anchorNode==d.$&&b.anchorOffset>g&&(f[0].offset-=g);b.focusNode==d.$&&b.focusOffset>g&&(f[1].offset-=g)}}d.setText(v(d.getText(),1));f&&(d=a.getDocument().$, b=d.getSelection(),d=d.createRange(),d.setStart(f[0].node,f[0].offset),d.collapse(!0),b.removeAllRanges(),b.addRange(d),b.extend(f[1].node,f[1].offset))}}function v(a,c){return c?a.replace(A,function(a,c){return c?" ":""}):a.replace(t,"")}function x(a,c){var d=c&&CKEDITOR.tools.htmlEncode(c)||"\x26nbsp;",d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+ '"\x3e'+d+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var b=a.getSelection(1),e=a.createRange(),g=b.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(d,CKEDITOR.POSITION_AFTER_START);e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);b.selectRanges([e]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function r(a){var c={37:1,39:1,8:1,46:1};return function(d){var b=d.data.getKeystroke();if(c[b]){var e=a.getSelection().getRanges(), g=e[0];1==e.length&&g.collapsed&&(b=g[38>b?"getPreviousEditableNode":"getNextEditableNode"]())&&b.type==CKEDITOR.NODE_ELEMENT&&"false"==b.getAttribute("contenteditable")&&(a.getSelection().fake(b),d.data.preventDefault(),d.cancel())}}}function q(a){for(var c=0;c=b.getLength()?h.setStartAfter(b):h.setStartBefore(b));e&&e.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(e):h.setEndBefore(e));b=new CKEDITOR.dom.walker(h);b.evaluator=function(b){if(b.type==CKEDITOR.NODE_ELEMENT&&b.isReadOnly()){var e=d.clone();d.setEndBefore(b);d.collapsed&&a.splice(c--,1);b.getPosition(h.endContainer)& CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(b),e.collapsed||a.splice(c+1,0,e));return!0}return!1};b.next()}}return a}var p="function"!=typeof window.getSelection,y=1,t=CKEDITOR.tools.repeat("​",7),A=new RegExp(t+"( )?","g"),w,u,E,C=CKEDITOR.dom.walker.invisible(1),B=function(){function a(c){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,c)&&a.editor.getSelection().selectRanges([d]);return!1}}function c(a){return function(c){var d=c.editor,b=d.createRange(), e;if(!d.readOnly)return(e=b.moveToClosestEditablePosition(c.selected,a))||(e=b.moveToClosestEditablePosition(c.selected,!a)),e&&d.getSelection().selectRanges([b]),d.fire("saveSnapshot"),c.selected.remove(),e||(b.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([b])),d.fire("saveSnapshot"),!1}}var d=a(),b=a(1);return{37:d,38:d,39:b,40:b,8:c(),46:c(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom", function(){function a(){t=new CKEDITOR.dom.selection(d.getSelection());t.lock()}function c(){f.removeListener("mouseup",c);v.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==g.$&&d.select()}function b(a){var c,d;c=(c=this.document.getActive())?"input"===c.getName()||"textarea"===c.getName():!1;c||(c=this.getSelection(1),(d=e(c))&&!d.equals(h)&&(c.selectElement(d),a.data.preventDefault()))}function e(a){a= a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var g=d.document,f=CKEDITOR.document,h=d.editable(),k=g.getBody(),v=g.getDocumentElement(),x=h.isInline(),q,t;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==q&&(a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$&&(a=d.createRange(),a.moveToElementEditStart(h), a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(q&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){q=d._.previousActive&&d._.previousActive.equals(g.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&q&&a&&(h.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(q);q=0},null,null,-1);h.attachListener(h,"mousedown",function(){q=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||x)p?h.attachListener(h, "beforedeactivate",a,null,null,-1):h.attachListener(d,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=t&&(t.isFake||2>t.getRanges().length);CKEDITOR.env.gecko&&!x&&a||(d.lockSelection(t),q=1)},null,null,-1),h.attachListener(h,"mousedown",function(){q=0});if(CKEDITOR.env.ie&&!x){var y;h.attachListener(h,"mousedown",function(a){2==a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(y=d.window.getScrollPosition()))}); h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&y&&(d.document.$.documentElement.scrollLeft=y.x,d.document.$.documentElement.scrollTop=y.y);y=null});if("BackCompat"!=g.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var J,w;v.on("mousedown",function(a){function c(a){a=a.data.$;if(J){var d=k.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(b){}J.setEndPoint(0>w.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);J.select()}}function d(){v.removeListener("mousemove", c);f.removeListener("mouseup",d);v.removeListener("mouseup",d);J.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)v.on("mousedown",function(a){a.data.getTarget().is("html")&&(f.on("mouseup",c),v.on("mouseup",c))})}}h.attachListener(h,"selectionchange",l, d);h.attachListener(h,"keyup",m,d);h.attachListener(h,"touchstart",m,d);h.attachListener(h,"touchend",m,d);CKEDITOR.env.ie&&h.attachListener(h,"keydown",b,d);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(x&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var u;h.attachListener(h,"mousedown",function(){u=1});h.attachListener(g.getDocumentElement(),"mouseup",function(){u&&m.call(d);u=0})}else h.attachListener(CKEDITOR.env.ie? h:g.getDocumentElement(),"mouseup",m,d);CKEDITOR.env.webkit&&h.attachListener(g,"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.hasFocus&&n(h)}},null,null,-1);h.attachListener(h,"keydown",r(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&c()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",c,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection; delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),c=d.editable().getLast(a);c&&c.hasAttribute("data-cke-hidden-sel")&&(c.remove(),CKEDITOR.env.gecko&&(a=d.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);d.on("key",function(a){if("wysiwyg"==d.mode){var c=d.getSelection();if(c.isFake){var b=B[a.data.keyCode];if(b)return b({editor:d,selected:c.getSelectedElement(), selection:c,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var c=a.editor;c.on("selectionChange",function(){var a=c.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):d.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",function(){n(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=v(a.data))},c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=v(a.data.dataValue)}, null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?l:m).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var c=this.getSelection();return c&&c.getRanges(a)||[]};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 c=this._.savedSelection;return c?(c.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var c=a;a=a.root}var d=a instanceof CKEDITOR.dom.element;this.rev=c?c.rev:y++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(c)return CKEDITOR.tools.extend(this._.cache, c._.cache),this.isFake=c.isFake,this.isLocked=c.isLocked,this;a=this.getNative();var b,e;if(a)if(a.getRangeAt)b=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(g){}b=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!b||b.type!=CKEDITOR.NODE_ELEMENT&&b.type!=CKEDITOR.NODE_TEXT||!this.root.equals(b)&&!this.root.contains(b))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 I={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:v,_createFillingCharSequenceNode:d,FILLING_CHAR_SEQUENCE:t});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel= p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),b=d.type;"Text"==b&&(c=CKEDITOR.SELECTION_TEXT);"Control"==b&&(c=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=c}:function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)c=CKEDITOR.SELECTION_NONE; else if(1==d.rangeCount){var d=d.getRangeAt(0),b=d.startContainer;b==d.endContainer&&1==b.nodeType&&1==d.endOffset-d.startOffset&&I[b.childNodes[d.startOffset].nodeName.toLowerCase()]&&(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=p?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,d){c=c.duplicate();c.collapse(d);var b=c.parentElement();if(!b.hasChildNodes())return{container:b,offset:0};for(var e=b.children,g,f,h=c.duplicate(),n=0, l=e.length-1,k=-1,m,p;n<=l;)if(k=Math.floor((n+l)/2),g=e[k],h.moveToElementText(g),m=h.compareEndPoints("StartToStart",c),0m)n=k+1;else return{container:b,offset:a(g)};if(-1==k||k==e.length-1&&0>m){h.moveToElementText(b);h.setEndPoint("StartToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=b.childNodes;if(!h)return g=e[e.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:b,offset:e.length}:{container:g,offset:g.nodeValue.length};for(b=e.length;0d.length?this.selectElement(c):this.selectRanges(d))}},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 c=a._.hiddenSelectionContainer;if(c){var d=a.checkDirty();a.fire("lockSnapshot");c.remove();a.fire("unlockSnapshot");!d&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=y++},selectElement:function(a){var c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(a){var c= this.root.editor,b=c&&c._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,f,l=0;l]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, " ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(g);g.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";g.copyAttributes(h.getFirst());g=h.getFirst().remove()}else g.setHtml(f);c=g}else f?c=v(b?[a.getHtml()]:d(a),c):a.moveChildren(c);c.replace(a);if(e){var b=c,l;(l=b.getPrevious(F))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("pre")&&(e=n(l.getHtml(),/\n$/,"")+"\n\n"+n(b.getHtml(),/^\n/,""),CKEDITOR.env.ie?b.$.outerHTML="\x3cpre\x3e"+e+"\x3c/pre\x3e": b.setHtml(e),l.remove())}else b&&p(c)}function d(a){var c=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,c,d){return c+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,d){c.push(d)});return c}function n(a,c,d){var b="",e="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,c,d){c&&(b=c);d&&(e=d);return""});return b+a.replace(c,d)+e}function v(a,c){var d; 1=a?(l=g.createText(""),l.insertAfter(this)): (b=g.createText(""),b.insertAfter(l),b.remove()));return l},substring:function(b,h){return"number"!=typeof h?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,h)}});(function(){function b(b,a,g){var h=b.serializable,m=a[g?"endContainer":"startContainer"],k=g?"endOffset":"startOffset",c=h?a.document.getById(b.startNode):b.startNode;b=h?a.document.getById(b.endNode):b.endNode;m.equals(c.getPrevious())?(a.startOffset=a.startOffset-m.getLength()-b.getPrevious().getLength(),m=b.getNext()):m.equals(b.getPrevious())&& (a.startOffset-=m.getLength(),m=b.getNext());m.equals(c.getParent())&&a[k]++;m.equals(b.getParent())&&a[k]++;a[g?"endContainer":"startContainer"]=m;return a}CKEDITOR.dom.rangeList=function(b){if(b instanceof CKEDITOR.dom.rangeList)return b;b?b instanceof CKEDITOR.dom.range&&(b=[b]):b=[];return CKEDITOR.tools.extend(b,h)};var h={createIterator:function(){var b=this,a=CKEDITOR.dom.walker.bookmark(),g=[],h;return{getNextRange:function(m){h=void 0===h?0:h+1;var k=b[h];if(k&&1c?-1:1}),f=0,h;fCKEDITOR.env.version?a[l].$.styleSheet.cssText+=h:a[l].$.innerHTML+=h}}var l={};CKEDITOR.skin={path:b,loadPart:function(a,c){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(b()+ "skin.js"),function(){f(a,c)}):f(a,c)},getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,c,b,g){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:c,offset:b||0,bgsize:g||"16px"})},getIconStyle:function(a,c,b,g,f){var h;a&&(a=a.toLowerCase(),c&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=b||h&&h.path||"";g=g||h&&h.offset;f=f||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+g+"px;background-size:"+ f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(b){var d=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var b=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof b&&(e=b(this,"editor"),f=b(this,"panel"));a=[[c,a]];g([d],e,a);g(k,f,a)}).call(this,b)}});var m="cke_ui_color",k=[],c=/\$color/g;CKEDITOR.on("instanceLoaded",function(b){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var d=b.editor;b=function(b){b= (b.data[0]||b.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!b.getById("cke_ui_color")){var e=a(b);k.push(e);d.on("destroy",function(){k=CKEDITOR.tools.array.filter(k,function(a){return e!==a})});(b=d.getUiColor())&&g([e],CKEDITOR.skin.chameleon(d,"panel"),[[c,b]])}};d.on("panelShow",b);d.on("menuShow",b);d.config.uiColor&&d.setUiColor(d.config.uiColor)}})})();(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var b=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);b.appendTo(CKEDITOR.document.getHead());try{var h=b.getComputedStyle("border-top-color"),f=b.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=f)}catch(a){CKEDITOR.env.hc=!1}b.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(b=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;hh;h++){var k=h,c;c=parseInt(f[h],16);c=("0"+(0>b?0|c*(1+b):0|c+(255-c)*b).toString(16)).slice(-2);f[k]=c}return"#"+f.join("")}}(),h=function(){var a=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(b,f){return a.output({from:b,to:f})}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; return function(a,g){var l=a.uiColor,l={id:"."+a.id,defaultBorder:b(l,-.1),defaultGradient:h(b(l,.9),l),lightGradient:h(b(l,1),b(l,.7)),mediumGradient:h(b(l,.8),b(l,.5)),ckeButtonOn:h(b(l,.6),b(l,.7)),ckeResizer:b(l,-.4),ckeToolbarSeparator:b(l,.5),ckeColorauto:b(l,.8),dialogBody:b(l,.7),dialogTabSelected:h("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:b(l,-.6),elementsPathBg:l,menubuttonIcon:b(l,.5),menubuttonIconHover:b(l,.3)};return f[g].output(l).replace(/\[/g,"{").replace(/\]/g, "}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(b){var h=0,f=function(g,f,c,e){if(e){e=new CKEDITOR.style(e);var d=a[c];d.unshift(e);b.attachStyleStateChange(e,function(a){!b.readOnly&&b.getCommand(c).setState(a)});b.addCommand(c,new CKEDITOR.styleCommand(e,{contentForms:d}));b.ui.addButton&&b.ui.addButton(g,{label:f,command:c,toolbar:"basicstyles,"+(h+=10)})}},a={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"== a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},g=b.config,l=b.lang.basicstyles;f("Bold",l.bold,"bold",g.coreStyles_bold);f("Italic",l.italic,"italic",g.coreStyles_italic);f("Underline",l.underline,"underline",g.coreStyles_underline);f("Strike",l.strike,"strike",g.coreStyles_strike);f("Subscript",l.subscript, "subscript",g.coreStyles_subscript);f("Superscript",l.superscript,"superscript",g.coreStyles_superscript);b.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"}; CKEDITOR.config.coreStyles_superscript={element:"sup"};CKEDITOR.plugins.add("dialogui",{onLoad:function(){var b=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],d=1;darguments.length)){var f=b.call(this, e);f.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var h={role:e.role||"presentation"};e.includeLabel&&(h["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,e,d,"div",null,h,function(){var d=[],b=e.required?" cke_required":"";"horizontal"!=e.labelLayout?d.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.inputId+'"':"",(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e",e.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', e.controlStyle?' style\x3d"'+e.controlStyle+'"':"",' role\x3d"presentation"\x3e',g.call(this,a,e),"\x3c/div\x3e"):(b={type:"hbox",widths:e.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" id\x3d"'+f.labelId+'" for\x3d"'+f.inputId+'"'+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(e.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(e.controlStyle?' style\x3d"'+e.controlStyle+ '"':"")+"\x3e"+g.call(this,a,e)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,b,d));return d.join("")})}},textInput:function(a,e,d){if(!(3>arguments.length)){b.call(this,e);var g=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",f={"class":"cke_dialog_ui_input_"+e.type,id:g,type:e.type};e.validate&&(this.validate=e.validate);e.maxLength&&(f.maxlength=e.maxLength);e.size&&(f.size=e.size);e.inputStyle&&(f.style=e.inputStyle);var h=this,l=!1;a.on("load",function(){h.getInputElement().on("keydown", function(a){13==a.data.getKeystroke()&&(l=!0)});h.getInputElement().on("keyup",function(d){13==d.data.getKeystroke()&&l&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),l=!1);h.bidi&&k.call(h,d)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,e,d,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',e.type,'" role\x3d"presentation"'];e.width&&a.push('style\x3d"width:'+e.width+'" ');a.push("\x3e\x3cinput ");f["aria-labelledby"]=this._.labelId;this._.required&& (f["aria-required"]=this._.required);for(var c in f)a.push(c+'\x3d"'+f[c]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,e,d){if(!(3>arguments.length)){b.call(this,e);var g=this,f=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};e.validate&&(this.validate=e.validate);h.rows=e.rows||5;h.cols=e.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(e["class"]||"");"undefined"!=typeof e.inputStyle&&(h.style=e.inputStyle);e.dir&&(h.dir=e.dir);if(g.bidi)a.on("load", function(){g.getInputElement().on("keyup",k)},g);CKEDITOR.ui.dialog.labeledElement.call(this,a,e,d,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',f,'" '],c;for(c in h)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(h[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(g._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(a, e,d){if(!(3>arguments.length)){var g=b.call(this,e,{"default":!!e["default"]});e.validate&&(this.validate=e.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,e,d,"span",null,null,function(){var d=CKEDITOR.tools.extend({},e,{id:e.id?e.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),b=[],f=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};m(d);e["default"]&&(h.checked="checked");"undefined"!=typeof d.inputStyle&&(d.style=d.inputStyle); g.checkbox=new CKEDITOR.ui.dialog.uiElement(a,d,b,"input",null,h);b.push(' \x3clabel id\x3d"',f,'" for\x3d"',h.id,'"'+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(e.label),"\x3c/label\x3e");return b.join("")})}},radio:function(a,e,d){if(!(3>arguments.length)){b.call(this,e);this._["default"]||(this._["default"]=this._.initValue=e.items[0][1]);e.validate&&(this.validate=e.validate);var g=[],f=this;e.role="radiogroup";e.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, a,e,d,function(){for(var d=[],b=[],h=(e.id?e.id:CKEDITOR.tools.getNextId())+"_radio",l=0;larguments.length)){var g=b.call(this,e);e.validate&&(this.validate=e.validate);g.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,e,d,function(){var d=CKEDITOR.tools.extend({},e,{id:e.id?e.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),b=[],f=[],h={id:g.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};b.push('\x3cdiv class\x3d"cke_dialog_ui_input_', e.type,'" role\x3d"presentation"');e.width&&b.push('style\x3d"width:'+e.width+'" ');b.push("\x3e");void 0!==e.size&&(h.size=e.size);void 0!==e.multiple&&(h.multiple=e.multiple);m(d);for(var l=0,k;larguments.length)){void 0===e["default"]&&(e["default"]="");var g=CKEDITOR.tools.extend(b.call(this,e),{definition:e,buttons:[]});e.validate&&(this.validate=e.validate);a.on("load",function(){CKEDITOR.document.getById(g.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,e,d,function(){g.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', g.frameId,'" title\x3d"',e.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(a,e,d){var g=this;if(!(3>arguments.length)){b.call(this,e);e.validate&&(this.validate=e.validate);var f=CKEDITOR.tools.extend({},e),h=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(d){var b= e["for"];d=h?h.call(this,d):!1;!1!==d&&("xhr"!==d&&a.getContentElement(b[0],b[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(e["for"][0],e["for"][1])._.buttons.push(g)});CKEDITOR.ui.dialog.button.call(this,a,f,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(g,f,h){if(!(3>arguments.length)){var l=[],k=f.html;"\x3c"!=k.charAt(0)&&(k="\x3cspan\x3e"+k+"\x3c/span\x3e");var m=f.focus;if(m){var y=this.focus; this.focus=function(){("function"==typeof m?m:y).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,g,f,l,"span",null,null,"");l=l.join("").match(a);k=k.match(b)||["","",""];d.test(k[1])&&(k[1]=k[1].slice(0,-1),k[2]="/"+k[2]);h.push([k[1]," ",l[1]||"",k[2]].join(""))}}}(),fieldset:function(a,b,d,g,f){var h=f.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,g,"fieldset",null,null,function(){var a= [];h&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var c=0;cb.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue= a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:g},!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 a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")}, isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.textarea.prototype= new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,d){var g=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),f=this.getInputElement().$;g.$.text=a;g.$.value=void 0===b||null===b?a:b;void 0===d||null===d?CKEDITOR.env.ie?f.add(g.$):f.add(g.$,null):f.add(g.$,d);return this},remove:function(a){this.getInputElement().$.remove(a); return this},clear:function(){for(var a=this.getInputElement().$;0c-a;b--)if(this._.tabs[this._.tabIdList[b%a]][0].$.offsetHeight)return this._.tabIdList[b%a];return null}function f(){for(var a=this._.tabIdList.length,c=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),b=c+1;bl.width-n.width-f?l.width-n.width+("rtl"==g.lang.dir?0:h[1]):e.x;n=e.y+h[0]l.height-n.height-f?l.height-n.height+h[2]:e.y;k=Math.floor(k);n=Math.floor(n);a.move(k,n,1);b.data.preventDefault()}function b(){CKEDITOR.document.removeListener("mousemove",c);CKEDITOR.document.removeListener("mouseup",b);if(CKEDITOR.env.ie6Compat){var a=I.getChild(0).getFrameDocument();a.removeListener("mousemove",c);a.removeListener("mouseup",b)}}var d=null,e=null,g=a.getParentEditor(), f=g.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(g){if(!a._.moved){var f=a._.element;f.getFirst().setStyle("position","absolute");f.removeStyle("display");a._.moved=!0;a.layout()}d={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",c);CKEDITOR.document.on("mouseup",b);e=a.getPosition();CKEDITOR.env.ie6Compat&&(f=I.getChild(0).getFrameDocument(),f.on("mousemove",c),f.on("mouseup",b));g.data.preventDefault()}, a)}function v(a){function c(b){var m="rtl"==g.lang.dir,p=k.width,v=k.height,t=p+(b.data.$.screenX-l.x)*(m?-1:1)*(a._.moved?1:2),P=v+(b.data.$.screenY-l.y)*(a._.moved?1:2),U=a._.element.getFirst(),U=m&&parseInt(U.getComputedStyle("right"),10),r=a.getPosition();r.x=r.x||0;r.y=r.y||0;r.y+P>n.height&&(P=n.height-r.y);(m?U:r.x)+t>n.width&&(t=n.width-(m?U:r.x));P=Math.floor(P);t=Math.floor(t);if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(d.minWidth||0,t-f);if(e==CKEDITOR.DIALOG_RESIZE_HEIGHT|| e==CKEDITOR.DIALOG_RESIZE_BOTH)v=Math.max(d.minHeight||0,P-h);a.resize(p,v);a._.moved&&x(a,a._.position.x,a._.position.y);a._.moved||a.layout();b.data.preventDefault()}function b(){CKEDITOR.document.removeListener("mouseup",b);CKEDITOR.document.removeListener("mousemove",c);m&&(m.remove(),m=null);if(CKEDITOR.env.ie6Compat){var a=I.getChild(0).getFrameDocument();a.removeListener("mouseup",b);a.removeListener("mousemove",c)}}var d=a.definition,e=d.resizable;if(e!=CKEDITOR.DIALOG_RESIZE_NONE){var g= a.getParentEditor(),f,h,n,l,k,m,p=CKEDITOR.tools.addFunction(function(d){function e(a){return a.isVisible()}k=a.getSize();var g=a.parts.contents,p=g.$.getElementsByTagName("iframe").length,v=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);p&&(m=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),g.append(m));h=k.height-a.parts.contents.getFirst(e).getSize("height",v); f=k.width-a.parts.contents.getFirst(e).getSize("width",1);l={x:d.screenX,y:d.screenY};n=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",c);CKEDITOR.document.on("mouseup",b);CKEDITOR.env.ie6Compat&&(g=I.getChild(0).getFrameDocument(),g.on("mousemove",c),g.on("mouseup",b));d.preventDefault&&d.preventDefault()});a.on("load",function(){var c="";e==CKEDITOR.DIALOG_RESIZE_WIDTH?c=" cke_resizer_horizontal":e==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(c=" cke_resizer_vertical");c=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+ c+" cke_resizer_"+g.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event )"\x3e'+("ltr"==g.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(c,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function x(a,c,b){var d=a.parts.dialog.getParent().getClientSize(),e=a.getSize(),g=a._.viewportRatio,f=Math.max(d.width-e.width,0),d=Math.max(d.height-e.height,0);g.width=f?c/f:g.width;g.height=d?b/d:g.height; a._.viewportRatio=g}function r(a){a.data.preventDefault(1)}function q(a){var c=a.config,b=CKEDITOR.skinName||a.config.skin,d=c.dialog_backgroundCoverColor||("moono-lisa"==b?"black":"white"),b=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,b,e),g=K[c];CKEDITOR.document.getBody().addClass("cke_dialog_open");g?g.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;", 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",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')), e.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(e.join("")),g.setOpacity(void 0!==b?b:.5),g.on("keydown",r),g.on("keypress",r),g.on("keyup",r),g.appendTo(CKEDITOR.document.getBody()),K[c]=g);a.focusManager.add(g);I=g;CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus()}function p(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");I&&(a.focusManager.remove(I),I.hide())}function y(a){var c=a.data.$.ctrlKey||a.data.$.metaKey,b=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode); (c=M[(c?"CTRL+":"")+(b?"ALT+":"")+(d?"SHIFT+":"")+e])&&c.length&&(c=c[c.length-1],c.keydown&&c.keydown.call(c.uiElement,c.dialog,c.key),a.data.preventDefault())}function t(a){var c=a.data.$.ctrlKey||a.data.$.metaKey,b=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(c=M[(c?"CTRL+":"")+(b?"ALT+":"")+(d?"SHIFT+":"")+e])&&c.length&&(c=c[c.length-1],c.keyup&&(c.keyup.call(c.uiElement,c.dialog,c.key),a.data.preventDefault()))}function A(a,c,b,d,e){(M[b]||(M[b]=[])).push({uiElement:a, dialog:c,key:b,keyup:e||a.accessKeyUp,keydown:d||a.accessKeyDown})}function w(a){for(var c in M){for(var b=M[c],d=b.length-1;0<=d;d--)b[d].dialog!=a&&b[d].uiElement!=a||b.splice(d,1);0===b.length&&delete M[c]}}function u(a,c){a._.accessKeyMap[c]&&a.selectPage(a._.accessKeyMap[c])}function E(){}var C=CKEDITOR.tools.cssLength,B,I,G=!CKEDITOR.env.ie||CKEDITOR.env.edge,J='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(G?"display:flex": "")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(G?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; CKEDITOR.dialog=function(a,c){function d(){var a=D._.focusList;a.sort(function(a,c){return a.tabIndex!=c.tabIndex?c.tabIndex-a.tabIndex:a.focusIndex-c.focusIndex});for(var c=a.length,b=0;bc.length)){var b=D._.currentFocusIndex;D._.tabBarMode&&0>a&&(b=0);try{c[b].getInputElement().$.blur()}catch(d){}var e=b,g=1arguments.length)){var h=(d.call?d(c):d)||"div",n=["\x3c",h," "],l=(e&&e.call?e(c):e)||{},k=(g&&g.call?g(c):g)||{},m=(f&&f.call?f.call(this,a,c):f)||"",p=this.domId=k.id||CKEDITOR.tools.getNextId()+"_uiElement";c.requiredContent&&!a.getParentEditor().filter.check(c.requiredContent)&&(l.display="none",this.notAllowed=!0);k.id=p;var v={};c.type&&(v["cke_dialog_ui_"+c.type]=1);c.className&&(v[c.className]= 1);c.disabled&&(v.cke_disabled=1);for(var r=k["class"]&&k["class"].split?k["class"].split(" "):[],p=0;pCKEDITOR.env.version?"cke_dialog_ui_focused":"";c.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;t.fire("focus");b&&this.addClass(b)});c.on("blur",function(){t.fire("blur"); b&&this.removeClass(b)})}});CKEDITOR.tools.extend(this,c);this.keyboardFocusable&&(this.tabIndex=c.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=t.focusIndex}))}},hbox:function(a,c,b,d,e){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=c,f=e&&e.widths||null,h=e&&e.height||null,n,k={role:"presentation"};e&&e.align&&(k.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},k,function(){var a= ['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(n=0;narguments.length)){this._||(this._={});var g=this._.children=c,f=e&&e.width||null,h=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var c=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];c.push('style\x3d"');e&&e.expand&&c.push("height:100%;"); c.push("width:"+C(f||"100%"),";");CKEDITOR.env.webkit&&c.push("float:none;");c.push('"');c.push('align\x3d"',CKEDITOR.tools.htmlEncode(e&&e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');c.push("\x3e\x3ctbody\x3e");for(var d=0;darguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,c,b){for(var d=c.children,e,g=[],f=[],h=0;ha||(this.notifications.splice(a,1),b.element.remove(), this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,a=b.config,g=new CKEDITOR.dom.element("div");g.addClass("cke_notifications_area");g.setAttribute("id","cke_notifications_area_"+b.name);g.setStyle("z-index",a.baseFloatZIndex-2);return g},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input);a.on("change",this._changeBuffer.input); a.on("floatingSpaceLayout",this._layout,this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left",y(t+h.width-n-v))}var a=this.element,g= this.editor,h=g.ui.contentsElement.getClientRect(),m=g.ui.contentsElement.getDocumentPosition(),k,c,e=a.getClientRect(),d,n=this._notificationWidth,v=this._notificationMargin;d=CKEDITOR.document.getWindow();var x=d.getScrollPosition(),r=d.getViewPaneSize(),q=CKEDITOR.document.getBody(),p=q.getDocumentPosition(),y=CKEDITOR.tools.cssLength;n&&v||(d=this.element.getChild(0),n=this._notificationWidth=d.getClientRect().width,v=this._notificationMargin=parseInt(d.getComputedStyle("margin-left"),10)+parseInt(d.getComputedStyle("margin-right"), 10));g.toolbar&&(k=g.ui.space(g.config.toolbarLocation),c=k.getClientRect());k&&k.isVisible()&&c.bottom>h.top&&c.bottomx.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:y(m.y+h.height-e.height)});var t="fixed"==a.getStyle("position")?h.left:"static"!=q.getComputedStyle("position")?m.x-p.x:m.x;h.widthx.x+r.width?b(): a.setStyle("left",y(t)):m.x+n+v>x.x+r.width?a.setStyle("left",y(t)):m.x+h.width/2+n/2+v>x.x+r.width?a.setStyle("left",y(t-m.x+x.x+r.width-n-v)):0>h.left+h.width-n-v?b():0>h.left+h.width/2-n/2?a.setStyle("left",y(t-m.x+x.x)):a.setStyle("left",y(t+h.width/2-n/2-v/2))}};CKEDITOR.plugins.notification=b})();(function(){var b='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"'; CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var b=b+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ '\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',f=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),a=CKEDITOR.addTemplate("button",b);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(b,h){function m(){var a=b.mode;a&&(a=this.modes[a]?void 0!==k[a]?k[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=b.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED: a,this.setState(a),this.refresh&&this.refresh())}var k=null,c=CKEDITOR.env,e=this._.id=CKEDITOR.tools.getNextId(),d="",n=this.command,v,x,r;this._.editor=b;var q={id:e,button:this,editor:b,focus:function(){CKEDITOR.document.getById(e).focus()},execute:function(){this.button.click(b)},attach:function(a){this.button.attach(a)}},p=CKEDITOR.tools.addFunction(function(a){if(q.onkey)return a=new CKEDITOR.dom.event(a),!1!==q.onkey(q,a.getKeystroke())}),y=CKEDITOR.tools.addFunction(function(a){var c;q.onfocus&& (c=!1!==q.onfocus(q,new CKEDITOR.dom.event(a)));return c}),t=0;q.clickFn=v=CKEDITOR.tools.addFunction(function(){t&&(b.unlockSelection(1),t=0);q.execute();c.iOS&&b.focus()});this.modes?(k={},b.on("beforeModeUnload",function(){b.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(k[b.mode]=this._.state)},this),b.on("activeFilterChange",m,this),b.on("mode",m,this),!this.readOnly&&b.on("readOnly",m,this)):n&&(n=b.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),d+=n.state==CKEDITOR.TRISTATE_ON? "on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var A;if(this.directional)b.on("contentDirChanged",function(a){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();a=a.data;a!=b.lang.dir?c.addClass("cke_"+a):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(A,"rtl"==a,this.icon,this.iconOffset))},this);n?(x=b.getCommandKeystroke(n))&&(r=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,x)):d+="off";x=this.name||this.command;var w= null,u=this.icon;A=x;this.icon&&!/\./.test(this.icon)?(A=this.icon,u=null):(this.icon&&(w=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(w=this.iconHiDpi));w?(CKEDITOR.skin.addIcon(w,w),u=null):w=A;d={id:e,name:x,iconName:A,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:d,ariaDisabled:"disabled"==d?"true":"false",title:this.title+(r?" ("+r.display+")":""),ariaShortcut:r?b.lang.common.keyboardShortcut+" "+r.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title|| "").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:p,focusFn:y,clickFn:v,style:CKEDITOR.skin.getIconStyle(w,"rtl"==b.lang.dir,u,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};a.output(d,h);if(this.onRender)this.onRender();return q},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED), this.hasArrow?b.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}})();(function(){function b(a){function b(){for(var c= f(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),e=0;ec.order?-1:0>a.order? 1:a.order]+data-cke-bookmark[^<]*?<\/span>/ig,"");g&&b(a,e)})}function E(){if("wysiwyg"==a.mode){var c=C("paste");a.getCommand("cut").setState(C("cut"));a.getCommand("copy").setState(C("copy"));a.getCommand("paste").setState(c);a.fire("pasteState",c)}}function C(c){var b= a.getSelection(),b=b&&b.getRanges()[0];if((a.readOnly||b&&b.checkReadOnly())&&c in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==c)return CKEDITOR.TRISTATE_OFF;c=a.getSelection();b=c.getRanges();return c.getType()==CKEDITOR.SELECTION_NONE||1==b.length&&b[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var B=CKEDITOR.plugins.clipboard,I=0,G=0;(function(){a.on("key",w);a.on("contentDom",c);a.on("selectionChange",E);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:C("cut"), copy:C("copy"),paste:C("paste")}});var b=null;a.on("menuShow",function(){b&&(b.removeListener(),b=null);var c=a.contextMenu.findItemByCommandName("paste");c&&c.element&&(b=c.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(c){if(c=a.ui.get(c))if(c=CKEDITOR.document.getById(c._.id))c.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function c(b, e,g,f,h){var n=a.lang.clipboard[e];a.addCommand(e,g);a.ui.addButton&&a.ui.addButton(b,{label:n,command:e,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(e,{label:n,command:e,group:"clipboard",order:h})}c("Cut","cut",e("cut"),10,1);c("Copy","copy",e("copy"),20,4);c("Paste","paste",g(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(c,b){function e(a){a.removeListener();a.cancel();b(a.data)}function g(a){a.removeListener();a.cancel(); b({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,h="auto";b||(b=c,c=null);a.on("beforePaste",function(a){a.removeListener();f=!0;h=a.data.type},null,null,1E3);a.on("paste",e,null,null,0);!1===A()&&(a.removeListener("paste",e),a._.forcePasteDialog&&f&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",g),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",g);a.data._.committed||b(null)})):b(null))}}function f(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&& !a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

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

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

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

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


<\/div>$/,function(c,d){return d in b?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):c}):CKEDITOR.env.gecko&&(c=c.replace(/(\s)
$/,"$1"));a.data.dataValue=c},null, null,3);b.on("paste",function(c){c=c.data;var e=b._.nextPasteType||c.type,g=c.dataValue,h,n=b.config.clipboard_defaultContentType||"html",k=c.dataTransfer.getTransferType(b)==CKEDITOR.DATA_TRANSFER_EXTERNAL,v=!0===b.config.forcePasteAsPlainText;h="html"==e||"html"==c.preSniffing?"html":f(g);delete b._.nextPasteType;"htmlifiedtext"==h&&(g=a(b.config,g));if("text"==e&&"html"==h)g=l(b,g,m.get("plain-text"));else if(k&&b.pasteFilter&&!c.dontFilter||v)g=l(b,g,b.pasteFilter);c.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+ g);c.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==h||"html"==n?"html":"text");c.type=e;c.dataValue=g;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);b.on("paste",function(a){a=a.data;a.dataValue&&(b.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){b.fire("afterPaste")},0))},null,null,1E3);b.on("pasteDialog",function(a){setTimeout(function(){b.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&& 16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||c.isInline()?c:a.document},fixSplitNodesAfterDrop:function(a,c,b,e){function g(a,b,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(b)&& d!=b.getChildCount())return a=c.startContainer.getChild(c.startOffset-1),b=c.startContainer.getChild(c.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&b&&b.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+b.getText()),b.remove(),c.setStart(a,d),c.collapse(!0)),!0}var f=c.startContainer;"number"==typeof e&&"number"==typeof b&&f.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,f,b)||g(a.endContainer,f,e))},isDropRangeAffectedByDragRange:function(a,c){var b=c.startContainer,e=c.endOffset; return a.endContainer.equals(b)&&a.endOffset<=e||a.startContainer.getParent().equals(b)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,c,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a, c))||(k=a.createBookmark(!1));f=c.clone().createBookmark(!1);l&&(k=a.createBookmark(!1));a=k.startNode;c=k.endNode;l=f.startNode;c&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=g.createRange();a.moveToBookmark(k);h.extractHtmlFromRange(a,1);c=g.createRange();f.startNode.getCommonAncestor(h)||(f=g.getSelection().createBookmarks()[0]);c.moveToBookmark(f);b(g,{dataTransfer:e,method:"drop",range:c},1);g.fire("unlockSnapshot")},getRangeAtDropPosition:function(a, c){var b=a.data.$,e=b.clientX,g=b.clientY,f=c.getSelection(!0).getRanges()[0],h=c.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&c.document.$.caretRangeFromPoint(e,g))b=c.document.$.caretRangeFromPoint(e,g),h.setStart(CKEDITOR.dom.node(b.startContainer),b.startOffset),h.collapse(!0);else if(b.rangeParent)h.setStart(CKEDITOR.dom.node(b.rangeParent),b.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!k;l++){if(!k)try{b.moveToPoint(e,g-l),k=!0}catch(m){}if(!k)try{b.moveToPoint(e,g+l),k=!0}catch(w){}}if(k){var u="cke-temp-"+(new Date).getTime();b.pasteHTML('\x3cspan id\x3d"'+u+'"\x3e​\x3c/span\x3e');var E=c.document.getById(u);h.moveToPosition(E,CKEDITOR.POSITION_BEFORE_START);E.remove()}else{var C=c.document.$.elementFromPoint(e,g),B=new CKEDITOR.dom.element(C),I;if(B.equals(c.editable())|| "html"==B.getName())return f&&f.startContainer&&!f.startContainer.equals(c.editable())?f:null;I=B.getClientRect();e/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"== a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(e);this.id||(this.id="Text"==e?"":"cke-"+CKEDITOR.tools.getUniqueId());c&&(this.sourceEditor=c,this.setData("text/html",c.getSelectedHtml(1)),"Text"==e||this.getData("text/plain")||this.setData("text/plain",c.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(a,c){a=this._.normalizeType(a);var b="text/html"==a&&c?this._.nativeHtmlCache:this._.data[a];if(void 0===b||null===b||""===b){if(this._.fallbackDataTransfer.isRequired())b=this._.fallbackDataTransfer.getData(a,c);else try{b=this.$.getData(a)||""}catch(e){b=""}"text/html"!=a||c||(b=this._stripHtml(b))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==b.substring(0,7)&&(b="");if("string"===typeof b)var g=b.indexOf("\x3c/html\x3e"),b=-1!==g?b.substring(0,g+7):b;return b}, setData:function(a,c){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(c),this._.nativeHtmlCache=c):this._.data[a]=c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==e&&"Text"==a&&(this.id=c),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,c);else try{this.$.setData(a,c)}catch(b){}},storeId:function(){"Text"!==e&&this.setData(e,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor== a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(b){b=c._.normalizeType(b);var d=c.getData(b);"text/html"==b&&(c._.nativeHtmlCache=c.getData(b,!0),d=c._stripHtml(d));d&&(c._.data[b]=d)}if(this.$){var c=this,b,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(b=0;bd?p+d:b.width>d?p-a.left:p-a.right+b.width):fd?p-d:b.width>d?p-a.right+b.width:p-a.left);d=a.top;b.height- a.topg?y-g:b.height>g?y-a.bottom+b.height:y-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&(p=CKEDITOR.env.ie8Compat?p-2*n.getDocument().getDocumentElement().$.scrollLeft:p-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this); n.setStyles({top:y+"px",left:p+"px"});n.setOpacity(1);k&&k()},this);c.isLoaded?a():c.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();e.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){e.markFirstDisplayed?e.markFirstDisplayed():e._.markFirstDisplayed()},0):e.markFirstDisplayed?e.markFirstDisplayed(): e._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var b=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,b))},focus:function(){if(CKEDITOR.env.webkit){var b=CKEDITOR.document.getActive();b&&!b.equals(this._.iframe)&&b.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var b= this._.iframe.getFrameDocument().getActive();b&&b.is("a")&&(this._.lastFocused=b)},hide:function(b){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(b=b&&this._.returnFocus)CKEDITOR.env.webkit&&b.type&&b.getWindow().$.focus(),b.focus();delete this._.lastFocused;this._.showBlockParams= null;this._.editor.fire("panelHide",this)}},allowBlur:function(b){var a=this._.panel;void 0!==b&&(a.allowBlur=b);return a.allowBlur},showAsChild:function(b,a,g,h,m,k){if(this._.activeChild!=b||b._.panel._.offsetParentId!=g.getId())this.hideChild(),b.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=b,this._.focused=!1,b.showBlock(a,g,h,m,k),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){b.element.getChild(0).$.style.cssText+= ""},100)},hideChild:function(b){var a=this._.activeChild;a&&(delete a.onHide,delete this._.activeChild,a.hide(),b&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var b=CKEDITOR.tools.isEmpty(CKEDITOR.instances),a;for(a in h){var g=h[a];b?g.destroy():g.element.hide()}b&&(h={})})})();(function(){var b,h,f;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function g(b){function g(){var c=a.config["colorButton_"+v+"Style"];c.childRule="back"==v?function(a){return m(a)}: function(a){return!(a.is("a")||a.getElementsByTag("a").count())||m(a)};return c}function n(c,b,d){var e={};c&&(e.color=c);b&&(e.colorName=b);b=!CKEDITOR.tools.isEmpty(e)&&new CKEDITOR.style(g(),e);a.execCommand(w,{newStyle:b});if(c&&d)for(d.addColor(c.substr(1).toUpperCase()),c=J.element.find("[role\x3doption]").toArray(),d=0;db)return null;this.boxes[b].getElement().remove(); return this.boxes.splice(b,1)[0]}}});f=CKEDITOR.tools.createClass({$:function(a,b,f){this.editor=a;this.cssProperty=b;this.clickFn=f;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,b){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',b.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e', "\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return f.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,b){var h=this._.getHexCode(b,this.cssProperty,f.colorList); a[h]=a[h]||0;a[h]+=1;return a},{},this)},getHexCode:function(a,b,f){var h=a.getStyle(b);return h in f?f[h].substr(1):this._.normalizeColor(a.getComputedStyle(b)).toUpperCase()},sortByOccurrencesAscending:function(a,b){var f=[],h;for(h in a){var k={};k[b]=h;k.frequency=a[h];f.push(k)}f.sort(function(a,b){return b.frequency-a.frequency});this._.trimToCapacity(f);return f.reverse()},trimToCapacity:function(a){a.splice(f.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a, function(a){this.addColor(a.colorCode)},this)},extractColorBox:function(a){for(var b=0;bCKEDITOR.env.version?l.createText("\r"):l.createElement("br"),g.deleteContents(),g.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("").insertAfter(a), m&&(p||q.blockLimit).appendBogus(),a.getNext().$.nodeValue="",g.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):g.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),g.collapse(!0),g.select(),g.scrollIntoView()):k(a,b,g,f)}}};l=CKEDITOR.plugins.enterkey;m=l.enterBr;k=l.enterBlock;c=/^h[1-6]$/})();(function(){function b(b,f){var a={},g=[],l={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};b=b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(c,b){var h=f?"\x26"+b+";":l[b]; a[h]=f?l[b]:"\x26"+b+";";g.push(h);return""});b=b.replace(/,$/,"");if(!f&&b){b=b.split(",");var m=document.createElement("div"),k;m.innerHTML="\x26"+b.join(";\x26")+";";k=m.innerHTML;m=null;for(m=0;my.height-p.bottom?e("pin"):e("bottom"),d=y.width/2,d=b.floatSpacePreferRight?"right":0q.width? "rtl"==b.contentsLangDirection?"right":"left":d-p.left>p.right-d?"left":"right",q.width>y.width?(d="left",n=0):(n="left"==d?0y.width&&(d="left"==d?"right":"left",n=0)),c.setStyle(d,f(("pin"==k?E:w)+n+("pin"==k?0:"left"==d?A:-A)))):(k="pin",e("pin"),m(d))}}}();if(l){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+ (CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(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':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),c=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:l, id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(b.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),e=CKEDITOR.tools.eventsBuffer(500,m),d=CKEDITOR.tools.eventsBuffer(100,m);c.unselectable();c.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(c){m(c);a.on("change",e.input);h.on("scroll",d.input);h.on("resize",d.input)});a.on("blur",function(){c.hide();a.removeListener("change", e.input);h.removeListener("scroll",d.input);h.removeListener("resize",d.input)});a.on("destroy",function(){h.removeListener("scroll",d.input);h.removeListener("resize",d.input);c.clearCustomData();c.remove()});a.focusManager.hasFocus&&c.show();a.focusManager.add(c,1)}}var h=CKEDITOR.document.getWindow(),f=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){b(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var b= CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), f=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),a=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var f=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&& (f["aria-multiselectable"]=!0);!f.role&&(f.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",f.role);f=this.keys;f[40]="next";f[9]="next";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(f[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=b.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a); delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(b,f,m){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[b]=k;var c;c=CKEDITOR.tools.htmlEncodeAttr(b).replace(a,"\\'");b={id:k,val:c,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': "",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(m||b),text:f||b};this._.pendingList.push(h.output(b))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(f.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a= this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,f=this.element.getDocument(),h;for(h in a)f.getById(a[h]).setStyle("display","");for(var c in b)a=f.getById(b[c]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display", "")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var f=b.getById(a);f.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected"); this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),f;for(f in a){var h=a[f];b.getById(h).removeClass("cke_selected");b.getById(h+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),f,h=-1;if(a)for(f=this.element.getDocument().getById(this._.items[a]).getFirst();a= b.getItem(++h);){if(a.equals(f)){this._.focusIndex=h;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}});(function(){var b='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+ (CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var b=b+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+ h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),f=CKEDITOR.addTemplate("combo",b);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this, a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{},listeners:[]}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c= this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var m=CKEDITOR.env,k,c,e="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(b){c&&(a.unlockSelection(1),c=0);k.execute(b)},this),n=this;k={id:e,combo:this,focus:function(){CKEDITOR.document.getById(e).getChild(1).focus()},execute:function(c){var b=n._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a), b.on)b.panel.hide();else{n.commit();var d=n.getValue();d?b.list.mark(d):b.list.unmarkAll();b.panel.showBlock(n.id,new CKEDITOR.dom.element(c),4)}},clickFn:d};this._.listeners.push(a.on("activeFilterChange",h,this));this._.listeners.push(a.on("mode",h,this));this._.listeners.push(a.on("selectionChange",h,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",h,this));var v=CKEDITOR.tools.addFunction(function(a,c){a=new CKEDITOR.dom.event(a);var b=a.getKeystroke();switch(b){case 13:case 32:case 40:CKEDITOR.tools.callFunction(d, c);break;default:k.onkey(k,b)}a.preventDefault()}),x=CKEDITOR.tools.addFunction(function(){k.onfocus&&k.onfocus()});c=0;k.keyDownFn=v;m={id:e,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:v,focusFn:x,clickFn:d};f.output(m,b);if(this.onRender)this.onRender();return k},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,f=this._.panelDefinition.block,h=b.parent||CKEDITOR.document.getBody(), k="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,h,b),b=c.addListBlock(this.id,f),e=this;c.onShow=function(){this.element.addClass(k);e.setState(CKEDITOR.TRISTATE_ON);e._.on=1;e.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(e.onOpen)e.onOpen()};c.onHide=function(c){this.element.removeClass(k);e.setState(e.modes&&e.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e._.on=0;if(!c&&e.onClose)e.onClose()};c.onEscape=function(){c.hide(1)};b.onClick=function(a,b){e.onClick&& e.onClick.call(e,a,b);c.hide()};this._.panel=c;this._.list=b;c.getBlock(this.id).onHide=function(){e._.on=0;e.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var f=this.document.getById("cke_"+this.id+"_text");f&&(a||b?f.removeClass("cke_combo_inlinelabel"):(b=this.label,f.addClass("cke_combo_inlinelabel")),f.setText("undefined"!=typeof b?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)}, hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,f){this._.items[a]=f||a;this._.list.add(a,b,f)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id),f=b.getElementsByTag("a").getItem(0); b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");f&&f.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners, function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var b in this._.items)if(a({value:b,text:this._.items[b]})){this.setValue(b);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function b(b,f){var m=b.config,k=f.lang,c=new CKEDITOR.style(f.styleDefinition),e=new a({entries:f.entries,styleVariable:f.styleVariable, styleDefinition:f.styleDefinition}),d;b.addCommand(f.commandName,{exec:function(a,c){var b=c.newStyle,d=c.oldStyle,e=a.getSelection().getRanges()[0],f=void 0===b;if(d||b)if(d&&e.collapsed&&h({editor:a,range:e,style:d}),f)a.removeStyle(d);else{if(e=d)e=d instanceof CKEDITOR.style&&b instanceof CKEDITOR.style?CKEDITOR.style.getStyleText(d.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition()):!1,e=!e;e&&a.removeStyle(d);a.applyStyle(b)}},refresh:function(a,b){c.checkApplicable(b,a,a.activeFilter)|| this.setState(CKEDITOR.TRISTATE_DISABLED)}});d=b.getCommand(f.commandName);b.ui.addRichCombo(f.comboName,{label:k.label,title:k.panelTitle,command:f.commandName,toolbar:"styles,"+f.order,defaultValue:"cke-default",allowedContent:c,requiredContent:c,contentTransformations:"span"===f.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var c=" x-small small medium large x-large xx-large 48px".split(" "); a.name="span";a.attributes.size&&(a.styles["font-size"]=c[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(m.contentsCss),multiSelect:!1,attributes:{"aria-label":k.panelTitle}},init:function(){var a="("+b.lang.common.optionDefault+")";this.startGroup(k.panelTitle);this.add(this.defaultValue, a,a);e.addToCombo(this)},onClick:function(a){var c=this.getValue();b.focus();b.fire("saveSnapshot");b.execCommand(f.commandName,{newStyle:e.getStyle(a),oldStyle:e.getStyle(c)});b.fire("saveSnapshot")},onRender:function(){b.on("selectionChange",function(a){var c=this.getValue();(a=e.getMatchingValue(b,a.data.path))?a!=c&&this.setValue(a):this.setValue("",f.defaultLabel)},this);d.on("state",function(){this.setState(d.state)},this)},refresh:function(){this.setState(d.state)}})}function h(a){var b=a.editor, h=a.range,k=a.style,c,e,d;c=b.elementPath();if(a=c.contains(function(a){return k.checkElementRemovable(a)})){e=h.checkBoundaryOfElement(a,CKEDITOR.START);d=h.checkBoundaryOfElement(a,CKEDITOR.END);if(e&&d){for(e=h.createBookmark();c=a.getFirst();)c.insertBefore(a);a.remove();h.moveToBookmark(e)}else e||d?h.moveToPosition(a,e?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(h.splitElement(a),h.moveToPosition(a,CKEDITOR.POSITION_AFTER_END)),f(h,c.elements.slice(),a);b.getSelection().selectRanges([h])}} function f(a,b,h){var k=b.pop();if(k){if(h)return f(a,b,k.equals(h)?null:h);h=k.clone();a.insertNode(h);a.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);f(a,b)}}var a=CKEDITOR.tools.createClass({$:function(a){var b=a.entries.split(";");this._.data={};this._.names=[];for(var f=0;f(c+=d?1:-1))return;c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0c)return;c=Math.max(c,0);c=Math.ceil(c/f)*f;a.setStyle(b,c?c+(e.config.indentUnit||"px"):"");""=== a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function h(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var f=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,g=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(m){function k(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0, styles:e?null:"margin-left,margin-right",classes:e||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(e? "("+e.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var c=b.block||b.blockLimit;if(!c.is(f))var k=c.getAscendant(f),c=k&&b.contains(k)||c;c.is(f)&&(c=c.getParent());if(this.enterBr||this.getContext(b)){if(e){var k=e,c=c.$.className.match(this.classNameRegex),m=this.isIndent,k=c?m?c[1]!=k.slice(-1):!0:m;return k?l:g}return this.isIndent?l:c?CKEDITOR[0>=(parseInt(c.getStyle(h(c)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:g}return g},exec:function(c){var f=c.getSelection(),f= f&&f.getRanges()[0],g;if(g=c.elementPath().contains(a))b.call(this,g,e);else for(f=f.createIterator(),c=c.config.enterMode,f.enforceRealBlocks=!0,f.enlargeBr=c!=CKEDITOR.ENTER_BR;g=f.getNextParagraph(c==CKEDITOR.ENTER_P?"p":"div");)g.isReadOnly()||b.call(this,g,e);return!0}}}}var c=CKEDITOR.plugins.indent,e=m.config.indentClasses;c.registerCommands(m,{indentblock:new k(m,"indentblock",!0),outdentblock:new k(m,"outdentblock")});CKEDITOR.tools.extend(k.prototype,c.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:e?new RegExp("(?:^|\\s+)("+e.join("|")+")(?\x3d$|\\s)"):null})}})})();(function(){function b(a){function b(c){for(var h=l.startContainer,m=l.endContainer;h&&!h.getParent().equals(c);)h=h.getParent();for(;m&&!m.getParent().equals(c);)m=m.getParent();if(!h||!m)return!1;for(var q=[],w=!1;!w;)h.equals(m)&&(w=!0),q.push(h),h=h.getNext();if(1>q.length)return!1;h=c.getParents(!0);for(m=0;mu;m++)w[m].indent+=h;h=CKEDITOR.plugins.list.arrayToList(w, d,null,a.config.enterMode,c.getDirection());if(!e.isIndent){var B;if((B=c.getParent())&&B.is("li"))for(var q=h.listNode.getChildren(),I=[],x,m=q.count()-1;0<=m;m--)(x=q.getItem(m))&&x.is&&x.is("li")&&I.push(x)}h&&h.listNode.replace(c);if(I&&I.length)for(m=0;mf.length)){d=f[f.length-1].getNext();g=e.createElement(this.type);for(c.push(g);f.length;)c=f.shift(),a=e.createElement("li"),n=c,n.is("pre")||r.test(n.getName())||"false"==n.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function f(a,b,c){function d(c){if(!(!(n= k[c?"getFirst":"getLast"]())||n.is&&n.isBlockBoundary()||!(l=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||l.is&&l.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](n)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;ge[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,n,l;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function a(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function g(a,b,c,d){for(var e, f;e=a[d?"getLast":"getFirst"](q);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function l(a){function b(c){var d=a[c?"getPrevious":"getNext"](v);d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())&&(g(a,d,null,!c),a.remove(),a=d)}b();b(1)}function m(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function k(a,b, d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var e=d.extractContents();b.trim(!1,!0);var f=b.createBookmark(),h=new CKEDITOR.dom.elementPath(b.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,n=new CKEDITOR.dom.elementPath(d.startContainer),m=n.contains(CKEDITOR.dtd.$listItem),n=n.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():n&&(k=n.getPrevious(v))&&x(k)&&k.remove();(k=e.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k= b.startContainer.getChild(b.startOffset))?e.insertBefore(k):b.startContainer.append(e);m&&(e=c(m))&&(h.contains(m)?(g(e,m.getParent(),m),e.remove()):h.append(e));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){n=d.startPath();e=n.block;if(!e)break;e.is("li")&&(h=e.getParent(),e.equals(h.getLast(v))&&e.equals(h.getFirst(v))&&(e=h));d.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove()}d=d.clone();e=a.editable();d.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator= function(a){return v(a)&&!x(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&l(d);b.moveToBookmark(f);b.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(v))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in e?a:null}var e={ol:1,ul:1},d=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),v=function(a){return!(d(a)||n(a))},x=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,f){if(!e[a.getName()])return[];d||(d= 0);c||(c=[]);for(var g=0,h=a.getChildCount();g=h.$.documentMode&&r.append(h.createText(" ")),r.append(m.listNode),m=m.nextIndex;else if(-1== K.indent&&!c&&g){e[g.getName()]?(r=K.element.clone(!1,!0),x!=g.getDirection(1)&&r.setAttribute("dir",x)):r=new CKEDITOR.dom.documentFragment(h);var l=g.getDirection(1)!=x,M=K.element,z=M.getAttribute("class"),N=M.getAttribute("style"),H=r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||l||N||z),L,ea=K.contents.length,T;for(g=0;g=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());e?(f=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[d]=f;this.previousKeyGroup= d},keyGroupChanged:function(b){return a.getKeyGroup(b)!=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,d){var f=this.editor;if(this.locked||"ready"!=f.status|| "wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;b||(b=new g(f));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==d&&f.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(b)-1;this.currentImage=b;!1!==d&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,d;a.bookmarks&&(b.focus(), d=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?d.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(d=this.editor.document.getBody().$.createTextRange(),d.collapse(!0),d.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,d=this.currentImage,f;if(d)if(a)for(f=this.index-1;0<=f;f--){if(a=b[f],!d.equalsContent(a))return a.index= f,a}else for(f=this.index+1;f=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var e= this.undoManager;b=b.data.getKey();var d=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(a.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new g(e.editor,!0))))if(0=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);d.attachListener(a,"resize",f);d.attachListener(a,"mode",k);a.on("destroy",k);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({}, l,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function a(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(m[a.getComputedStyle("float")]||m[a.getAttribute("align")]);return b&& !k[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;b.prototype={start:function(a){var b=this,d=this.editor,f=this.doc,g,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(b.relations={},(h=f.$.elementFromPoint(k,l))&&h.nodeType&&(g=new CKEDITOR.dom.element(h),b.traverseSearch(g),isNaN(k+l)||b.pixelSearch(g,k,l),a&&a(b.relations,k,l)))});this.listener=this.editable.attachListener(this.target, "mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;m.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){m.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(b){var d=this.editor.createRange();d.moveToPosition(this.relations[b.uid].element, a[b.type]);return d}}(),store:function(){function b(a,c,f){var g=a.getUniqueId();g in f?f[g].type|=c:f[g]={element:a,type:c}}return function(e,d){var f;d&CKEDITOR.LINEUTILS_AFTER&&a(f=e.getNext())&&f.isVisible()&&(b(f,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_AFTER);d&CKEDITOR.LINEUTILS_INSIDE&&a(f=e.getFirst())&&f.isVisible()&&(b(f,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_INSIDE);b(e,d,this.relations)}}(),traverseSearch:function(b){var e,d,f;do if(f=b.$["data-cke-expando"], !(f&&f in this.relations)){if(b.equals(this.editable))break;if(a(b))for(e in this.lookups)(d=this.lookups[e](b))&&this.store(b,d)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(c,f,g,h,k){for(var l=0,m;k(g);){g+=h;if(25==++l)break;if(m=this.doc.$.elementFromPoint(f,g))if(m==c)l=0;else if(e(c,m)&&(l=0,a(m=new CKEDITOR.dom.element(m))))return m}}var e=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}: function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(d,e,f){var g=this.win.getViewPaneSize().height,h=b.call(this,d.$,e,f,-1,function(a){return 0this.rect.bottom)return!1;this.inline? g.left=d.elementRect.left-this.rect.relativeX:(0[^<]*e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f, 0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c,b,f):d(e,b,f))}function l(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 m(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,g;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll(); else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();da.selected.length||O(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable(); a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function C(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),f=c(a.endContainer);!d&&f?(a.setEndBefore(f.wrapper),a.select()):d&&!f&&(a.setStartAfter(d.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")}var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e, "key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(p(a,d,null),c&&b&&p(a,c,b)):c&&b&&p(a,c,b)});e.on("dataReady",function(){G(a).commit()});e.on("blur",function(){var b;(b=a.focused)&&l(a,b);(b=a.widgetHoldingFocusedEditable)&& p(a,b,null)})}function B(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var f=CKEDITOR.tools.getNextNumber(),g=[];b.data.downcastingSessionId=f;d[f]=g;b.data.dataValue.forEach(function(b){var d=b.attributes,f;if("data-cke-widget-white-space"in d){f=c(b);var k=e(b);f.parent.attributes["data-cke-white-space-first"]&&(f.value=f.value.replace(/^ /g," "));k.parent.attributes["data-cke-white-space-last"]&&(k.value=k.value.replace(/ $/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])f= b.getFirst(h.isParserWidgetElement),g.push({wrapper:b,element:f,widget:d,editables:{}}),"1"!=f.attributes["data-cke-widget-keep-attr"]&&delete f.attributes["data-widget"]}else if("data-cke-widget-editable"in d)return 0CKEDITOR.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,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&l(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(), g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function J(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"").replace(/]*cke_widget_drag_handler_container[^>]*.*?<\/span>/gmi,"")})}function D(a,b,c){var d=0;b=K(b);var e=a.data.classes|| {},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function F(a){a.cancel()}function O(a,b){var c=a.widgets.focused,d,e,f;R.hasCopyBin(a)||(e=new R(a,{beforeDestroy:function(){!b&&c&&c.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),c||(d=CKEDITOR.env.webkit&& CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),e.handle(N(a)))}function K(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function M(){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 z(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(), this.editor.selectionChange(1))}function N(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function H(a,b){L(a);ea(a);T(a);X(a);ia(a);aa(a);W(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||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){O(a.editor,b==CKEDITOR.CTRL+88);return}if(b in S||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function L(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function ea(a,b){a.partSelectors||(a.partSelectors= a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function T(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function X(a){if(!0===a.mask)ha(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,V,a),c=CKEDITOR.env.gecko?300:0,d,e;a.on("focus",function(){b.input();d=a.editor.on("change", b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[g].on("blur", function(){a.editor.removeListener("change",b.input)});b.input()}}function ha(a){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 V(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");b||(b=new CKEDITOR.dom.element("img", this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+"px",height:a.$.offsetHeight+ "px"})}}}function ia(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.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);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1", src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",Z,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)}); a.dragHandlerContainer=c}}function Z(a){function b(){var c;for(p.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=this.repository.finder, d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),p=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;p.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup", b,this))}}function aa(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);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 da(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))} function Y(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,f=0;f)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, S={37:1,38:1,39:1,40:1,8:1,46:1};S[CKEDITOR.SHIFT+121]=1;var R=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection? "left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout, n,p,q;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);n=c.on("selectionChange",F,null,null,0);p=c.widgets.on("checkSelection",F,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();p.removeListener();c.fire("unlockSnapshot"); h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!R.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=b;h.nestedEditable=f})();CKEDITOR.config.plugins="basicstyles,dialogui,dialog,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,divarea,elementspath,enterkey,entities,floatingspace,listblock,richcombo,font,htmlwriter,indent,indentblock,indentlist,justify,list,sourcearea,undo,lineutils,widgetselection,widget"; CKEDITOR.config.skin="moono";(function(){var b=function(b,f){var a=CKEDITOR.getUrl("plugins/"+f);b=b.split(",");for(var g=0;g