/*
UEditor Mini??
version: 1.2.2
build: Fri Feb 10 2017 15:00:06 GMT+0800 (CST)
*/
var $jscomp={scope:{},findInternal:function(g,B,w){g instanceof String&&(g=String(g));for(var x=g.length,m=0;mc||d.quirks;d.ie9above=8c}d.gecko&&(f=a.match(/rv:([\d\.]+)/))&&(f=f[1].split("."),c=1E4*f[0]+100*(f[1]||0)+1*(f[2]||0));/chrome\/(\d+\.\d)/i.test(a)&&(d.chrome=+RegExp.$1);/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(a)&&!/chrome/i.test(a)&&(d.safari=+(RegExp.$1||RegExp.$2));d.opera&&(c=parseFloat(b.version()));d.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));d.version=c;d.isCompatible=
!d.mobile&&(d.ie&&6<=c||d.gecko&&10801<=c||d.opera&&9.5<=c||d.air&&1<=c||d.webkit&&522<=c||!1);return d}(),E=m.ie,n=UM.utils={each:function(a,b,d){if(null!=a)if(a.length===+a.length)for(var c=0,f=a.length;c=d&&a===b)return c=
h,!1});return c},removeItem:function(a,b){for(var d=0,c=a.length;d'](?:(amp|lt|quot|gt|#39|nbsp);)?/g,function(a,b){return b?a:{"<":"<","&":"&",'"':""",">":">","'":"'"}[a]}):""},html:function(a){return a?
a.replace(/&((g|l|quo)t|amp|#39);/g,function(a){return{"<":"<","&":"&",""":'"',">":">","'":"'"}[a]}):""},cssStyleToDomStyle:function(){var a=document.createElement("div").style,b={"float":void 0!=a.cssFloat?"cssFloat":void 0!=a.styleFloat?"styleFloat":"float"};return function(a){return b[a]||(b[a]=a.toLowerCase().replace(/-./g,function(a){return a.charAt(1).toUpperCase()}))}}(),loadFile:function(){function a(a,c){try{for(var d=0,h;h=b[d++];)if(h.doc===a&&h.url==(c.src||c.href))return h}catch(e){return null}}
var b=[];return function(d,c,f){var h=a(d,c);if(h)h.ready?f&&f():h.funs.push(f);else if(b.push({doc:d,url:c.src||c.href,funs:[f]}),!d.body){f=[];for(var e in c)"tag"!=e&&f.push(e+'="'+c[e]+'"');d.write("<"+c.tag+" "+f.join(" ")+" >"+c.tag+">")}else if(!c.id||!d.getElementById(c.id)){var l=d.createElement(c.tag);delete c.tag;for(e in c)l.setAttribute(e,c[e]);l.onload=l.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){h=a(d,c);if(0m.version?{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder"}:{tabindex:"tabIndex",readonly:"readOnly"},K=n.listToMap("-webkit-box -moz-box block list-item table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption".split(" ")),
k=x.domUtils={NODE_ELEMENT:1,NODE_DOCUMENT:9,NODE_TEXT:3,NODE_COMMENT:8,NODE_DOCUMENT_FRAGMENT:11,POSITION_IDENTICAL:0,POSITION_DISCONNECTED:1,POSITION_FOLLOWING:2,POSITION_PRECEDING:4,POSITION_IS_CONTAINED:8,POSITION_CONTAINS:16,fillChar:E&&"6"==m.version?"\ufeff":"\u200b",keys:{8:1,46:1,16:1,17:1,18:1,37:1,38:1,39:1,40:1,13:1},breakParent:function(a,b){var d,c=a,f=a,h,e;do{c=c.parentNode;h?(d=c.cloneNode(!1),d.appendChild(h),h=d,d=c.cloneNode(!1),d.appendChild(e),e=d):(h=c.cloneNode(!1),e=h.cloneNode(!1));
for(;d=f.previousSibling;)h.insertBefore(d,h.firstChild);for(;d=f.nextSibling;)e.appendChild(d);f=c}while(b!==c);d=b.parentNode;d.insertBefore(h,b);d.insertBefore(e,b);d.insertBefore(a,e);k.remove(b);return a},trimWhiteTextNode:function(a){function b(b){for(var c;(c=a[b])&&3==c.nodeType&&k.isWhitespace(c);)a.removeChild(c)}b("firstChild");b("lastChild")},getPosition:function(a,b){if(a===b)return 0;var d,c=[a],f=[b];for(d=a;d=d.parentNode;){if(d===b)return 10;c.push(d)}for(d=b;d=d.parentNode;){if(d===
a)return 20;f.push(d)}c.reverse();f.reverse();if(c[0]!==f[0])return 1;for(d=-1;d++,c[d]===f[d];);a=c[d];for(b=f[d];a=a.nextSibling;)if(a===b)return 4;return 2},getNodeIndex:function(a,b){for(var d=a,c=0;d=d.previousSibling;)b&&3==d.nodeType?d.nodeType!=d.nextSibling.nodeType&&c++:c++;return c},inDoc:function(a,b){return 10==k.getPosition(a,b)},findParent:function(a,b,d){if(a&&!k.isBody(a))for(a=d?a:a.parentNode;a;){if(!b||b(a)||k.isBody(a))return b&&!b(a)&&k.isBody(a)?null:a;a=a.parentNode}return null},
findParentByTagName:function(a,b,d,c){b=n.listToMap(n.isArray(b)?b:[b]);return k.findParent(a,function(a){return b[a.tagName]&&!(c&&c(a))},d)},findParents:function(a,b,d,c){for(b=b&&(d&&d(a)||!d)?[a]:[];a=k.findParent(a,d);)b.push(a);return c?b:b.reverse()},insertAfter:function(a,b){return a.parentNode.insertBefore(b,a.nextSibling)},remove:function(a,b){var d=a.parentNode,c;if(d){if(b&&a.hasChildNodes())for(;c=a.firstChild;)d.insertBefore(c,a);d.removeChild(a)}return a},getNextDomNode:function(a,
b,d,c){return w(a,"firstChild","nextSibling",b,d,c)},getPreDomNode:function(a,b,d,c){return w(a,"lastChild","previousSibling",b,d,c)},isBookmarkNode:function(a){return 1==a.nodeType&&a.id&&/^_baidu_bookmark_/i.test(a.id)},getWindow:function(a){a=a.ownerDocument||a;return a.defaultView||a.parentWindow},getCommonAncestor:function(a,b){if(a===b)return a;for(var d=[a],c=[b],f=a,h=-1;f=f.parentNode;){if(f===b)return f;d.push(f)}for(f=b;f=f.parentNode;){if(f===a)return f;c.push(f)}d.reverse();for(c.reverse();h++,
d[h]===c[h];);return 0==h?null:d[h-1]},clearEmptySibling:function(a,b,d){function c(a,b){for(var c;a&&!k.isBookmarkNode(a)&&(k.isEmptyInlineElement(a)||!(new RegExp("[^\t\n\r"+k.fillChar+"]")).test(a.nodeValue));)c=a[b],k.remove(a),a=c}!b&&c(a.nextSibling,"nextSibling");!d&&c(a.previousSibling,"previousSibling")},split:function(a,b){var d=a.ownerDocument;if(m.ie&&b==a.nodeValue.length){var c=d.createTextNode("");return k.insertAfter(a,c)}c=a.splitText(b);m.ie8&&(d=d.createTextNode(""),k.insertAfter(c,
d),k.remove(d));return c},isWhitespace:function(a){return!(new RegExp("[^ \t\n\r"+k.fillChar+"]")).test(a.nodeValue)},getXY:function(a){for(var b=0,d=0;a.offsetParent;)d+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return{x:b,y:d}},isEmptyInlineElement:function(a){if(1!=a.nodeType||!p.$removeEmpty[a.tagName])return 0;for(a=a.firstChild;a;){if(k.isBookmarkNode(a)||1==a.nodeType&&!k.isEmptyInlineElement(a)||3==a.nodeType&&!k.isWhitespace(a))return 0;a=a.nextSibling}return 1},isBlockElm:function(a){return 1==
a.nodeType&&(p.$block[a.tagName]||K[k.getComputedStyle(a,"display")])&&!p.$nonChild[a.tagName]},getElementsByTagName:function(a,b,d){if(d&&n.isString(d)){var c=d;d=function(a){var b=!1;g.each(n.trim(c).replace(/[ ]{2,}/g," ").split(" "),function(l,c){if(g(a).hasClass(c))return b=!0,!1});return b}}b=n.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var f=[],h=0,e;e=b[h++];){e=a.getElementsByTagName(e);for(var l=0,t;t=e[l++];)d&&!d(t)||f.push(t)}return f},unSelectable:E&&m.ie9below||m.opera?function(a){a.onselectstart=
function(){return!1};a.onclick=a.onkeyup=a.onkeydown=function(){return!1};a.unselectable="on";a.setAttribute("unselectable","on");for(var b=0,d;d=a.all[b++];)switch(d.tagName.toLowerCase()){case "iframe":case "textarea":case "input":case "select":break;default:d.unselectable="on",a.setAttribute("unselectable","on")}}:function(a){a.style.MozUserSelect=a.style.webkitUserSelect=a.style.msUserSelect=a.style.KhtmlUserSelect="none"},removeAttributes:function(a,b){b=n.isArray(b)?b:n.trim(b).replace(/[ ]{2,}/g,
" ").split(" ");for(var d=0,c;c=b[d++];){c=J[c]||c;switch(c){case "className":a[c]="";break;case "style":a.style.cssText="",a.getAttributeNode("style")&&!m.ie&&a.removeAttributeNode(a.getAttributeNode("style"))}a.removeAttribute(c)}},createElement:function(a,b,d){return k.setAttributes(a.createElement(b),d)},setAttributes:function(a,b){for(var d in b)if(b.hasOwnProperty(d)){var c=b[d];switch(d){case "class":a.className=c;break;case "style":a.style.cssText=a.style.cssText+";"+c;break;case "innerHTML":a[d]=
c;break;case "value":a.value=c;break;default:a.setAttribute(J[d]||d,c)}}return a},getComputedStyle:function(a,b){return n.transUnitToPx(n.fixColor(b,g(a).css(b)))},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},removeStyle:function(a,b){m.ie?("color"==b&&(b="(^|;)"+b),a.style.cssText=a.style.cssText.replace(new RegExp(b+"[^:]*:[^;]+;?","ig"),"")):a.style.removeProperty?a.style.removeProperty(b):a.style.removeAttribute(n.cssStyleToDomStyle(b));a.style.cssText||k.removeAttributes(a,
["style"])},getStyle:function(a,b){var d=a.style[n.cssStyleToDomStyle(b)];return n.fixColor(b,d)},setStyle:function(a,b,d){a.style[n.cssStyleToDomStyle(b)]=d;n.trim(a.style.cssText)||this.removeAttributes(a,"style")},removeDirtyAttr:function(a){for(var b=0,d,c=a.getElementsByTagName("*");d=c[b++];)d.removeAttribute("_moz_dirty");a.removeAttribute("_moz_dirty")},getChildCount:function(a,b){var d=0,c=a.firstChild;for(b=b||function(){return 1};c;)b(c)&&d++,c=c.nextSibling;return d},isEmptyNode:function(a){return!a.firstChild||
0==k.getChildCount(a,function(a){return!k.isBr(a)&&!k.isBookmarkNode(a)&&!k.isWhitespace(a)})},isBr:function(a){return 1==a.nodeType&&"BR"==a.tagName},isEmptyBlock:function(a,b){if(1!=a.nodeType)return 0;b=b||new RegExp("[ \t\r\n"+k.fillChar+"]","g");if(0=b.nodeValue.length)this.setStartAfter(b);else{var d=k.split(b,c);b===e?this.setEnd(d,this.endOffset-c):b.parentNode===e&&(this.endOffset+=1);this.setStartBefore(d)}if(l)return this.collapse(!0)}a||(c=this.endOffset,e=this.endContainer,3==e.nodeType&&(0==c?this.setEndBefore(e):(c=c.nodeValue.length)a["set"+b.replace(/(\w)/,function(a){return a.toUpperCase()})+"After"](c)}if(a||!this.collapsed)b(this,"start"),b(this,"end");return this},insertNode:function(a){var b=a,c=1;11==a.nodeType&&(b=a.firstChild,c=a.childNodes.length);this.trimBoundary(!0);var l=this.startContainer,e=l.childNodes[this.startOffset];e?l.insertBefore(a,e):
l.appendChild(a);b.parentNode===this.endContainer&&(this.endOffset+=c);return this.setStartBefore(b)},setCursor:function(a,b){return this.collapse(!a).select(b)},createBookmark:function(a,b){var l,e=this.document.createElement("span");e.style.cssText="display:none;line-height:0px;";e.appendChild(this.document.createTextNode("\u200d"));e.id="_baidu_bookmark_start_"+(b?"":c++);this.collapsed||(l=e.cloneNode(!0),l.id="_baidu_bookmark_end_"+(b?"":c++));this.insertNode(e);l&&this.collapse().insertNode(l).setEndBefore(l);
this.setStartAfter(e);return{start:a?e.id:e,end:l?a?l.id:l:null,id:a}},moveToBookmark:function(a){var b=a.id?this.document.getElementById(a.start):a.start;a=a.end&&a.id?this.document.getElementById(a.end):a.end;this.setStartBefore(b);k.remove(b);a?(this.setEndBefore(a),k.remove(a)):this.collapse(!0);return this},adjustmentBoundary:function(){if(!this.collapsed){for(;!k.isBody(this.startContainer)&&this.startOffset==this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length&&
this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length;)this.setStartAfter(this.startContainer);for(;!k.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[3==this.endContainer.nodeType?"nodeValue":"childNodes"].length;)this.setEndBefore(this.endContainer)}return this},getClosedNode:function(){var a;if(!this.collapsed){var b=this.cloneRange().adjustmentBoundary().shrinkBoundary();b.collapsed||1!=b.startContainer.nodeType||b.startContainer!==b.endContainer||
1!=b.endOffset-b.startOffset||(b=b.startContainer.childNodes[b.startOffset])&&1==b.nodeType&&(p.$empty[b.tagName]||p.$nonChild[b.tagName])&&(a=b)}return a},select:m.ie?function(a,c){var l;this.collapsed||this.shrinkBoundary();var e=this.getClosedNode();if(e&&!c){try{l=this.document.body.createControlRange(),l.addElement(e),l.select()}catch(G){}return this}var e=this.createBookmark(),t=e.start;l=this.document.body.createTextRange();l.moveToElementText(t);l.moveStart("character",1);if(!this.collapsed){var g=
this.document.body.createTextRange(),t=e.end;g.moveToElementText(t);l.setEndPoint("EndToEnd",g)}else if(!a&&3!=this.startContainer.nodeType){var g=this.document.createTextNode(f),A=this.document.createElement("span");A.appendChild(this.document.createTextNode(f));t.parentNode.insertBefore(A,t);t.parentNode.insertBefore(g,t);b(this.document,g);h=g;d(A,"previousSibling");d(t,"nextSibling");l.moveStart("character",-1);l.collapse(!0)}this.moveToBookmark(e);A&&k.remove(A);try{l.select()}catch(G){}return this}:
function(a){function c(a){function b(b,c,e){3==b.nodeType&&b.nodeValue.lengthe&&(e=0);d.push(e);return d}var e={},l=this;e.startAddress=c(!0);a||(e.endAddress=l.collapsed?[].concat(e.startAddress):c());return e},moveToAddress:function(a,b){function c(a,
b){for(var c=e.body,l,d,f=0,h,t=a.length;f ');this.cloneRange().insertNode(a.get(0));var b=g(window).scrollTop(),
c=g(window).height(),e=a.offset().top;if(eb+c)e>b+c?window.scrollTo(0,e-c+a.height()):window.scrollTo(0,b-e);a.remove()},getOffset:function(){var a=this.createBookmark(),b=g(a.start).css("display","inline-block").offset();this.moveToBookmark(a);return b}}})();(function(){function a(a,b){var c=k.getNodeIndex;a=a.duplicate();a.collapse(b);var e=a.parentElement();if(!e.hasChildNodes())return{container:e,offset:0};for(var l=e.children,d,f=a.duplicate(),r=0,g=l.length-1,y=-1;r<=g;){y=Math.floor((r+
g)/2);d=l[y];f.moveToElementText(d);var A=f.compareEndPoints("StartToStart",a);if(0A)r=y+1;else return{container:e,offset:c(d)}}if(-1==y){f.moveToElementText(e);f.setEndPoint("StartToStart",a);f=f.text.replace(/(\r\n|\r)/g,"\n").length;l=e.childNodes;if(!f)return d=l[l.length-1],{container:d,offset:d.nodeValue.length};for(c=l.length;0=m.version&&(a.style.height=c,a.style.setExpression("height",
"this.scrollHeight <= "+c+' ? "'+c+'px" : "auto"'))):g(a).height(c),a.style.zIndex=b.zIndex,this._setup(a))},_setup:function(b){var c=this,d=c.options;b.contentEditable=!0;document.body.spellcheck=!1;c.document=document;c.window=document.defaultView||document.parentWindow;c.body=b;c.$body=g(b);c.selection=new x.Selection(document,c.body);c._isEnabled=!1;var e;m.gecko&&(e=this.selection.getNative())&&e.removeAllRanges();this._initEvents();for(var f=b.parentNode;f&&!k.isBody(f);f=f.parentNode)if("FORM"==
f.tagName){c.form=f;if(c.options.autoSyncData)g(b).on("blur",function(){a(f,c)});else g(f).on("submit",function(){a(this,c)});break}if(d.initialContent)if(d.autoClearinitialContent){var h=c.execCommand;c.execCommand=function(){c.fireEvent("firstBeforeExecCommand");return h.apply(c,arguments)};this._setDefaultContent(d.initialContent)}else this.setContent(d.initialContent,!1,!0);k.isEmptyNode(c.body)&&(c.body.innerHTML=""+(m.ie?"":"
")+"
");d.focus&&setTimeout(function(){c.focus(c.options.focusInEnd);
!c.options.autoClearinitialContent&&c._selectionChange()},0);c.container||(c.container=b.parentNode);c._bindshortcutKeys();c.isReady=1;c.fireEvent("ready");d.onready&&d.onready.call(c);if(!m.ie||m.ie9above)g(c.body).on("blur focus",function(a){var b=c.selection.getNative();if("blur"==a.type)0=m.version&&this.container&&(this.container.style.height=a,this.container.style.setExpression("height","this.scrollHeight <= "+a+' ? "'+a+'px" : "auto"'))):g(this.body).height(a);this.fireEvent("resize")},setWidth:function(a){this.$container&&this.$container.width(a);g(this.body).width(a-
1*g(this.body).css("padding-left").replace("px","")-1*g(this.body).css("padding-right").replace("px",""));this.fireEvent("resize")},addshortcutkey:function(a,b){var c={};b?c[a]=b:c=a;n.extend(this.shortcutkeys,c)},_bindshortcutKeys:function(){var a=this,b=this.shortcutkeys;a.addListener("keydown",function(c,d){var e=d.keyCode||d.which,f;for(f in b)for(var l=b[f].split(","),h=0,t;t=l[h++];){t=t.split(":");var g=t[0];t=t[1];if(/^(ctrl)(\+shift)?\+(\d+)$/.test(g.toLowerCase())||/^(\d+)$/.test(g))if("ctrl"==
RegExp.$1&&(d.ctrlKey||d.metaKey)&&(""!=RegExp.$2?d[RegExp.$2.slice(1)+"Key"]:1)&&e==RegExp.$3||e==RegExp.$1)-1!=a.queryCommandState(f,t)&&a.execCommand(f,t),k.preventDefault(d)}})},getContent:function(a,b,c,d,f){a&&n.isFunction(a)&&(b=a);if(b?!b():!this.hasContents())return"";this.fireEvent("beforegetcontent");a=UM.htmlparser(this.body.innerHTML,d);this.filterOutputRule(a);this.fireEvent("aftergetcontent",a);return a.toHtml(f)},getAllHtml:function(){var a=[];this.fireEvent("getAllHtml",a);if(m.ie&&
8':""});n.each(this.document.getElementsByTagName("script"),function(a){b+=a.outerHTML})}return""+(this.options.charset?'':"")+(b||this.document.getElementsByTagName("head")[0].innerHTML)+a.join("\n")+"m.version?'class="view"':
"")+">"+this.getContent(null,null,!0)+""},getPlainTxt:function(){var a=new RegExp(k.fillChar,"g"),b=this.body.innerHTML.replace(/[\n\r]/g,""),b=b.replace(/<(p|div)[^>]*>(
| )<\/\1>/gi,"\n").replace(/
/gi,"\n").replace(/<[^>/]+>/g,"").replace(/(\n)?<\/([^>]+)>/g,function(a,b,c){return p.$block[c]?"\n":b?b:""});return b.replace(a,"").replace(/\u00a0/g," ").replace(/ /g," ")},getContentTxt:function(){return this.body[m.ie?"innerText":"textContent"].replace(new RegExp(k.fillChar,
"g"),"").replace(/\u00a0/g," ")},setContent:function(b,c,d){this.fireEvent("beforesetcontent",b);b=UM.htmlparser(b);this.filterInputRule(b);b=b.toHtml();this.body.innerHTML=(c?this.body.innerHTML:"")+b;if("p"==this.options.enterTag)if(c=this.body.firstChild,!c||1==c.nodeType&&(p.$cdata[c.tagName]||"DIV"==c.tagName&&c.getAttribute("cdata_tag")||k.isCustomeNode(c))&&c===this.body.lastChild)this.body.innerHTML=""+(m.ie?" ":"
")+"
"+this.body.innerHTML;else for(var e=this.document.createElement("p");c;){for(;c&&
(3==c.nodeType||1==c.nodeType&&p.p[c.tagName]&&!p.$cdata[c.tagName]);)b=c.nextSibling,e.appendChild(c),c=b;if(e.firstChild)if(c)c.parentNode.insertBefore(e,c),e=this.document.createElement("p");else{this.body.appendChild(e);break}c=c.nextSibling}this.fireEvent("aftersetcontent");this.fireEvent("contentchange");!d&&this._selectionChange();this._bakRange=this._bakIERange=this._bakNativeRange=null;var f;m.gecko&&(f=this.selection.getNative())&&f.removeAllRanges();this.options.autoSyncData&&this.form&&
a(this.form,this)},focus:function(a){try{var b=this.selection.getRange();a?b.setStartAtLast(this.body.lastChild).setCursor(!1,!0):b.select(!0);this.fireEvent("focus")}catch(t){}},blur:function(){var a=this.selection.getNative();a.empty?a.empty():a.removeAllRanges();this.fireEvent("blur")},isFocus:function(){return!0===this.fireEvent("isfocus")?!0:this.selection.isFocus()},_initEvents:function(){var a=this,b=function(){a._proxyDomEvent.apply(a,arguments)};g(a.body).on("click contextmenu mousedown keydown keyup keypress mouseup mouseover mouseout selectstart",
b).on("focus blur",b).on("mouseup keydown",function(b){"keydown"==b.type&&(b.ctrlKey||b.metaKey||b.shiftKey||b.altKey)||2!=b.button&&a._selectionChange(250,b)})},_proxyDomEvent:function(a){return this.fireEvent(a.type.replace(/^on/,""),a)},_selectionChange:function(a,b){var c=this,d=!1,e,l;m.ie&&9>m.version&&b&&"mouseup"==b.type&&!this.selection.getRange().collapsed&&(d=!0,e=b.clientX,l=b.clientY);clearTimeout(f);f=setTimeout(function(){if(c.selection.getNative()){var a;if(d&&"None"==c.selection.getNative().type){a=
c.document.body.createTextRange();try{a.moveToPoint(e,l)}catch(G){a=null}}var f;a&&(f=c.selection.getIERange,c.selection.getIERange=function(){return a});c.selection.cache();f&&(c.selection.getIERange=f);c.selection._cachedRange&&c.selection._cachedStartElement&&(c.fireEvent("beforeselectionchange"),c.fireEvent("selectionchange",!!b),c.fireEvent("afterselectionchange"),c.selection.clear())}},a||50)},_callCmdFn:function(a,b){b=Array.prototype.slice.call(b,0);var c=b.shift().toLowerCase(),d,e;e=(d=
this.commands[c]||UM.commands[c])&&d[a];if(!(d&&e||"queryCommandState"!=a))return 0;if(e)return e.apply(this,[c].concat(b))},execCommand:function(a){if(!this.isFocus()){var b=this.selection._bakRange;b?b.select():this.focus(!0)}a=a.toLowerCase();var c,b=this.commands[a]||UM.commands[a];if(!b||!b.execCommand)return null;b.notNeedUndo||this.__hasEnterExecCommand?(c=this._callCmdFn("execCommand",arguments),this.__hasEnterExecCommand||b.ignoreContentChange||this._ignoreContentChange||this.fireEvent("contentchange")):
(this.__hasEnterExecCommand=!0,-1!=this.queryCommandState.apply(this,arguments)&&(this.fireEvent("saveScene"),this.fireEvent("beforeexeccommand",a),c=this._callCmdFn("execCommand",arguments),b.ignoreContentChange||this._ignoreContentChange||this.fireEvent("contentchange"),this.fireEvent("afterexeccommand",a),this.fireEvent("saveScene")),this.__hasEnterExecCommand=!1);this.__hasEnterExecCommand||b.ignoreContentChange||this._ignoreContentChange||this._selectionChange();return c},queryCommandState:function(a){try{return this._callCmdFn("queryCommandState",
arguments)}catch(l){return 0}},queryCommandValue:function(a){try{return this._callCmdFn("queryCommandValue",arguments)}catch(l){return null}},hasContents:function(a){if(a)for(var b=0,c;c=a[b++];)if(0"+(E?"":"
")+"
",b.removeListener("firstBeforeExecCommand focus",a),setTimeout(function(){b.focus();b._selectionChange()},0))}return function(b){this.body.innerHTML=''+b+"
";this.addListener("firstBeforeExecCommand focus",a)}}(),setShow:function(){var a=this.selection.getRange();if("none"==this.container.style.display){try{a.moveToBookmark(this.lastBk),
delete this.lastBk}catch(l){a.setStartAtFirst(this.body).collapse(!0)}setTimeout(function(){a.select(!0)},100);this.container.style.display=""}},show:function(){return this.setShow()},setHide:function(){this.lastBk||(this.lastBk=this.selection.getRange().createBookmark(!0));this.container.style.display="none"},hide:function(){return this.setHide()},getLang:function(a){var b=UM.I18N[this.options.lang];if(!b)throw Error("not import language file");a=(a||"").split(".");for(var c=0,d;(d=a[c++])&&(b=b[d],
b););return b},getContentLength:function(a,b){var c=this.getContent(!1,!1,!0).length;if(a){b=(b||[]).concat(["hr","img","iframe"]);for(var c=this.getContentTxt().replace(/[\t\r\n]+/g,"").length,d=0,e;e=b[d++];)c+=this.body.getElementsByTagName(e).length}return c},addInputRule:function(a,b){a.ignoreUndo=b;this.inputRules.push(a)},filterInputRule:function(a,b){for(var c=0,d;d=this.inputRules[c++];)b&&d.ignoreUndo||d.call(this,a)},addOutputRule:function(a,b){a.ignoreUndo=b;this.outputRules.push(a)},
filterOutputRule:function(a,b){for(var c=0,d;d=this.outputRules[c++];)b&&d.ignoreUndo||d.call(this,a)}};n.inherits(h,I)})();UM.filterWord=function(){function a(a){return a=a.replace(/[\d.]+\w+/g,function(a){return n.transUnitToPx(a)})}function b(b){return b.replace(/[\t\r\n]+/g," ").replace(/\x3c!--[\s\S]*?--\x3e/ig,"").replace(/]*>[\s\S]*?.<\/v:shape>/gi,function(b){if(m.opera)return"";try{if(/Bitmap/i.test(b))return"";var c=b.match(/width:([ \d.]*p[tx])/i)[1],d=b.match(/height:([ \d.]*p[tx])/i)[1],
e=b.match(/src=\s*"([^"]*)"/i)[1];return''}catch(l){return""}}).replace(/<\/?div[^>]*>/g,"").replace(/v:\w+=(["']?)[^'"]+\1/g,"").replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|xml|meta|link|style|\w+:\w+)(?=[\s\/>]))[^>]*>/gi,"").replace(/]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"
$1
").replace(/\s+(class|lang|align)\s*=\s*(['"]?)([\w-]+)\2/ig,function(a,b,d,e){return"class"==b&&"MsoListParagraph"==
e?a:""}).replace(/<(font|span)[^>]*>(\s*)<\/\1>/gi,function(a,b,d){return d.replace(/[\t\r\n ]+/g," ")}).replace(/(<[a-z][^>]*)\sstyle=(["'])([^\2]*?)\2/gi,function(b,d,h,e){b=[];e=e.replace(/^\s+|\s+$/,"").replace(/'/g,"'").replace(/"/gi,"'").split(/;\s*/g);h=0;for(var c;c=e[h];h++){var f,g=c.split(":");if(2==g.length&&(c=g[0].toLowerCase(),f=g[1].toLowerCase(),!(/^(background)\w*/.test(c)&&0==f.replace(/(initial|\s)/g,"").length||/^(margin)\w*/.test(c)&&/^0\w+$/.test(f)))){switch(c){case "mso-padding-alt":case "mso-padding-top-alt":case "mso-padding-right-alt":case "mso-padding-bottom-alt":case "mso-padding-left-alt":case "mso-margin-alt":case "mso-margin-top-alt":case "mso-margin-right-alt":case "mso-margin-bottom-alt":case "mso-margin-left-alt":case "mso-height":case "mso-width":case "mso-vertical-align-alt":/");e&&!p.$inlineWithA[c.tagName]&&"pre"!=
c.tagName&&c.children&&c.children.length&&(l=a(f,l,!0),b(f,l));if(c.children&&c.children.length)for(h=0;r=c.children[h++];)e&&"element"==r.type&&!p.$inlineWithA[r.tagName]&&1"))}function f(a,b){var c;if("element"==a.type&&a.getAttr("id")==b)return a;if(a.children&&a.children.length)for(var d=0;c=a.children[d++];)if(c=f(c,b))return c}
function h(a,b,c){"element"==a.type&&a.tagName==b&&c.push(a);if(a.children&&a.children.length)for(var d=0,f;f=a.children[d++];)h(f,b,c)}function e(a,b){if(a.children&&a.children.length)for(var c=0,d;d=a.children[c];)e(d,b),d.parentNode&&(d.children&&d.children.length&&b(d),d.parentNode&&c++);else b(a)}var l=UM.uNode=function(a){this.type=a.type;this.data=a.data;this.tagName=a.tagName;this.parentNode=a.parentNode;this.attrs=a.attrs||{};this.children=a.children},t={href:1,src:1,_src:1,_href:1,cdata_data:1},
k={style:1,script:1};l.createElement=function(a){return/[<>]/.test(a)?UM.htmlparser(a).children[0]:new l({type:"element",children:[],tagName:a})};l.createText=function(a,b){return new UM.uNode({type:"text",data:b?a:n.unhtml(a||"")})};l.prototype={toHtml:function(a){var b=[];d(this,b,a,0);return b.join("")},innerHTML:function(a){if("element"!=this.type||p.$empty[this.tagName])return this;if(n.isString(a)){if(this.children)for(var b=0,c;c=this.children[b++];)c.parentNode=null;this.children=[];a=UM.htmlparser(a);
for(b=0;c=a.children[b++];)this.children.push(c),c.parentNode=this;return this}a=new UM.uNode({type:"root",children:this.children});return a.toHtml()},innerText:function(a,b){if("element"!=this.type||p.$empty[this.tagName])return this;if(a){if(this.children)for(var c=0,d;d=this.children[c++];)d.parentNode=null;this.children=[];this.appendChild(l.createText(a,b));return this}return this.toHtml().replace(/<[^>]+>/g,"")},getData:function(){return"element"==this.type?"":this.data},firstChild:function(){return this.children?
this.children[0]:null},lastChild:function(){return this.children?this.children[this.children.length-1]:null},previousSibling:function(){for(var a=this.parentNode,b=0,c;c=a.children[b];b++)if(c===this)return 0==b?null:a.children[b-1]},nextSibling:function(){for(var a=this.parentNode,b=0,c;c=a.children[b++];)if(c===this)return a.children[b]},replaceChild:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var c=0,d;d=this.children[c];c++)if(d===b)return this.children.splice(c,
1,a),b.parentNode=null,a.parentNode=this,a}},appendChild:function(a){if("root"==this.type||"element"==this.type&&!p.$empty[this.tagName]){this.children||(this.children=[]);a.parentNode&&a.parentNode.removeChild(a);for(var b=0,c;c=this.children[b];b++)if(c===a){this.children.splice(b,1);break}this.children.push(a);a.parentNode=this;return a}},insertBefore:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var c=0,d;d=this.children[c];c++)if(d===b)return this.children.splice(c,
0,a),a.parentNode=this,a}},insertAfter:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var c=0,d;d=this.children[c];c++)if(d===b)return this.children.splice(c+1,0,a),a.parentNode=this,a}},removeChild:function(a,b){if(this.children)for(var c=0,d;d=this.children[c];c++)if(d===a){this.children.splice(c,1);d.parentNode=null;if(b&&d.children&&d.children.length)for(var f=0,e;e=d.children[f];f++)this.children.splice(c+f,0,e),e.parentNode=this;return d}},getAttr:function(a){return this.attrs&&
this.attrs[a.toLowerCase()]},setAttr:function(a,b){if(a)if(this.attrs||(this.attrs={}),n.isObject(a))for(var c in a)a[c]?this.attrs[c.toLowerCase()]=a[c]:delete this.attrs[c];else b?this.attrs[a.toLowerCase()]=b:delete this.attrs[a];else delete this.attrs},hasAttr:function(a){a=this.getAttr(a);return null!==a&&void 0!==a},getIndex:function(){for(var a=this.parentNode,b=0,c;c=a.children[b];b++)if(c===this)return b;return-1},getNodeById:function(a){var b;if(this.children&&this.children.length)for(var c=
0;b=this.children[c++];)if(b=f(b,a))return b},getNodesByTagName:function(a){a=n.trim(a).replace(/[ ]{2,}/g," ").split(" ");var b=[],c=this;n.each(a,function(a){if(c.children&&c.children.length)for(var d=0,f;f=c.children[d++];)h(f,a,b)});return b},getStyle:function(a){var b=this.getAttr("style");return b?(a=b.match(new RegExp("(^|;)\\s*"+a+":([^;]+)","i")))&&a[0]?a[2]:"":""},setStyle:function(a,b){function c(a,b){d=d.replace(new RegExp("(^|;)\\s*"+a+":([^;]+;?)","gi"),"$1");b&&(d=a+":"+n.unhtml(b)+
";"+d)}var d=this.getAttr("style");d||(d="");if(n.isObject(a))for(var f in a)c(f,a[f]);else c(a,b);this.setAttr("style",n.trim(d))},hasClass:function(a){if(this.hasAttr("class")){var b=this.getAttr("class").split(/\s+/),c=!1;g.each(b,function(b,d){d===a&&(c=!0)});return c}return!1},addClass:function(a){var b=null,c=!1;this.hasAttr("class")?(b=this.getAttr("class"),b=b.split(/\s+/),b.forEach(function(b){b===a&&(c=!0)}),!c&&b.push(a),this.setAttr("class",b.join(" "))):this.setAttr("class",a)},removeClass:function(a){if(this.hasAttr("class")){var b=
this.getAttr("class"),b=b.replace(new RegExp("\\b"+a+"\\b","g"),"");this.setAttr("class",n.trim(b).replace(/[ ]{2,}/g," "))}},traversal:function(a){this.children&&this.children.length&&e(this,a);return this}}})();UM.htmlparser=function(a,b){function d(a,b){if(r[a.tagName]){var c=g.createElement(r[a.tagName]);a.appendChild(c);c.appendChild(g.createText(b))}else a.appendChild(g.createText(b))}function c(a,b,d){var f;if(f=v[b]){for(var e=a,t;"root"!=e.type;){if(n.isArray(f)?-1!=n.indexOf(f,e.tagName):
f==e.tagName){a=e;t=!0;break}e=e.parentNode}t||(a=c(a,n.isArray(f)?f[0]:f))}f=new g({parentNode:a,type:"element",tagName:b.toLowerCase(),children:p.$empty[b]?null:[]});if(d){for(e={};t=h.exec(d);)e[t[1].toLowerCase()]=l[t[1].toLowerCase()]?t[2]||t[3]||t[4]:n.unhtml(t[2]||t[3]||t[4]);f.attrs=e}a.children.push(f);return p.$empty[b]?a:f}var f=/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\s\/>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g,h=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
e={b:1,code:1,i:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,span:1,sub:1,img:1,sup:1,font:1,big:1,small:1,iframe:1,a:1,br:1,pre:1};a=a.replace(new RegExp(k.fillChar,"g"),"");b||(a=a.replace(new RegExp("[\\r\\t\\n"+(b?"":" ")+"]*?(\\w+)\\s*(?:[^>]*)>[\\r\\t\\n"+(b?"":" ")+"]*","g"),function(a,c){return c&&e[c.toLowerCase()]?a.replace(/(^[\n\r]+)|([\n\r]+$)/g,""):a.replace(new RegExp("^[\\r\\n"+(b?"":" ")+"]+"),"").replace(new RegExp("[\\r\\n"+(b?"":" ")+"]+$"),"")}));for(var l={href:1,src:1},
g=UM.uNode,v={td:"tr",tr:["tbody","thead","tfoot"],tbody:"table",th:"tr",thead:"table",tfoot:"table",caption:"table",li:["ul","ol"],dt:"dl",dd:"dl",option:"select"},r={ol:"li",ul:"li"},q,y=0,m=0,G=new g({type:"root",children:[]}),u=G;q=f.exec(a);){y=q.index;try{if(y>m&&d(u,a.slice(m,y)),q[3])p.$cdata[u.tagName]?d(u,q[0]):u=c(u,q[3].toLowerCase(),q[4]);else if(q[1]){if("root"!=u.type)if(p.$cdata[u.tagName]&&!p.$cdata[q[1]])d(u,q[0]);else{for(y=u;"element"==u.type&&u.tagName!=q[1].toLowerCase();)if(u=
u.parentNode,"root"==u.type)throw u=y,"break";u=u.parentNode}}else q[2]&&u.children.push(new g({type:"comment",data:q[2],parentNode:u}))}catch(L){}m=f.lastIndex}m"+(m.ie?"":"
")+
"",f.setStart(c.body.firstChild,0).collapse(!0)))),!f.collapsed&&f.deleteContents(),1==f.startContainer.nodeType)){b=f.startContainer.childNodes[f.startOffset];var h;if(b&&k.isBlockElm(b)&&(h=b.previousSibling)&&k.isBlockElm(h)){for(f.setEnd(h,h.childNodes.length).collapse();b.firstChild;)h.appendChild(b.firstChild);k.remove(b)}}var e,l;d=0;var g;f.inFillChar()&&(b=f.startContainer,k.isFillChar(b)?(f.setStartBefore(b).collapse(!0),k.remove(b)):k.isFillChar(b,!0)&&(b.nodeValue=b.nodeValue.replace(H,
""),f.startOffset--,f.collapsed&&f.collapse(!0)));for(;b=a.firstChild;){if(d){for(e=c.document.createElement("p");b&&(3==b.nodeType||!p.$block[b.tagName]);)g=b.nextSibling,e.appendChild(b),b=g;e.firstChild&&(b=e)}f.insertNode(b);g=b.nextSibling;if(!d&&b.nodeType==k.NODE_ELEMENT&&k.isBlockElm(b)&&(e=k.findParent(b,function(a){return k.isBlockElm(a)}))&&"body"!=e.tagName.toLowerCase()&&(!p[e.tagName][b.nodeName]||b.parentNode!==e)){if(p[e.tagName][b.nodeName])for(l=b.parentNode;l!==e;)h=l,l=l.parentNode;
else h=e;k.breakParent(b,h||l);h=b.previousSibling;k.trimWhiteTextNode(h);h.childNodes.length||k.remove(h);!m.ie&&(v=b.nextSibling)&&k.isBlockElm(v)&&v.lastChild&&!k.isBr(v.lastChild)&&v.appendChild(c.document.createElement("br"));d=1}var v=b.nextSibling;if(!a.firstChild&&v&&k.isBlockElm(v)){f.setStart(v,0).collapse(!0);break}f.setEndAfter(b).collapse()}b=f.startContainer;g&&k.isBr(g)&&k.remove(g);if(k.isBlockElm(b)&&k.isEmptyNode(b))if(g=b.nextSibling)k.remove(b),1==g.nodeType&&p.$block[g.tagName]&&
f.setStart(g,0).collapse(!0).shrinkBoundary();else try{b.innerHTML=m.ie?k.fillChar:"
"}catch(q){f.setStartBefore(b),k.remove(b)}try{if(m.ie9below&&1==f.startContainer.nodeType&&!f.startContainer.childNodes[f.startOffset]&&(h=f.startContainer.childNodes[f.startOffset-1])&&1==h.nodeType&&p.$empty[h.tagName]){var r=this.document.createTextNode(k.fillChar);f.insertNode(r).setStart(r,0).collapse(!0)}setTimeout(function(){f.select(!0)})}catch(q){}setTimeout(function(){f=c.selection.getRange();f.scrollIntoView();
c.fireEvent("afterinserthtml")},200)}}};UM.commands.insertimage={execCommand:function(a,b){b=n.isArray(b)?b:[b];if(b.length){var d=[],c,f;f=b[0];if(1==b.length)c='","center"==f.floatStyle&&(c=''+c+"
"),d.push(c);else for(var h=0;f=b[h++];)c="",d.push(c);this.execCommand("insertHtml",d.join(""),!0)}}};UM.plugins.justify=function(){var a=this;g.each(["justifyleft","justifyright","justifycenter","justifyfull"],function(b,d){a.commands[d]={execCommand:function(a){return this.document.execCommand(a)},queryCommandValue:function(a){var b=this.document.queryCommandValue(a);return!0===b||"true"===b?a.replace(/justify/,""):""},queryCommandState:function(a){return this.document.queryCommandState(a)?
1:0}}})};UM.plugins.font=function(){var a=this,b={forecolor:"forecolor",backcolor:"backcolor",fontsize:"fontsize",fontfamily:"fontname"},d={forecolor:"color",backcolor:"background-color",fontsize:"font-size",fontfamily:"font-family"},c={forecolor:"color",fontsize:"size",fontfamily:"face"};a.setOpt({fontfamily:[{name:"songti",val:"\u5b8b\u4f53,SimSun"},{name:"yahei",val:"\u5fae\u8f6f\u96c5\u9ed1,Microsoft YaHei"},{name:"kaiti",val:"\u6977\u4f53,\u6977\u4f53_GB2312, SimKai"},{name:"heiti",val:"\u9ed1\u4f53, SimHei"},
{name:"lishu",val:"\u96b6\u4e66, SimLi"},{name:"andaleMono",val:"andale mono"},{name:"arial",val:"arial, helvetica,sans-serif"},{name:"arialBlack",val:"arial black,avant garde"},{name:"comicSansMs",val:"comic sans ms"},{name:"impact",val:"impact,chicago"},{name:"timesNewRoman",val:"times new roman"},{name:"sans-serif",val:"sans-serif"}],fontsize:[10,12,16,18,24,32,48]});a.addOutputRule(function(a){n.each(a.getNodesByTagName("font"),function(a){if("font"==a.tagName){var b=[],c;for(c in a.attrs)switch(c){case "size":var d=
a.attrs[c];g.each({10:"1",12:"2",16:"3",18:"4",24:"5",32:"6",48:"7"},function(a,b){if(b==d)return d=a,!1});b.push("font-size:"+d+"px");break;case "color":b.push("color:"+a.attrs[c]);break;case "face":b.push("font-family:"+a.attrs[c]);break;case "style":b.push(a.attrs[c])}a.attrs={style:b.join(";")}}a.tagName="span";"span"==a.parentNode.tagName&&1==a.parentNode.children.length&&(g.each(a.attrs,function(b,c){a.parentNode.attrs[b]="style"==b?a.parentNode.attrs[b]+c:c}),a.parentNode.removeChild(a,!0))})});
for(var f in b)(function(f){a.commands[f]={execCommand:function(a,c){if("transparent"!=c){var f=this.selection.getRange();if(f.collapsed){var e=g("").css(d[a],c)[0];f.insertNode(e).setStart(e,0).setCursor()}else{"fontsize"==a&&(c={10:"1",12:"2",16:"3",18:"4",24:"5",32:"6",48:"7"}[(c+"").replace(/px/,"")]);this.document.execCommand(b[a],!1,c);m.gecko&&g.each(this.$body.find("a"),function(a,b){var c=b.parentNode;if(c.lastChild===c.firstChild&&/FONT|SPAN/.test(c.tagName)){var d=c.cloneNode(!1);
d.innerHTML=b.innerHTML;g(b).html("").append(d).insertBefore(c);g(c).remove()}});if(!m.ie){var e=this.selection.getNative().getRangeAt(0).commonAncestorContainer,f=this.selection.getRange(),l=f.createBookmark(!0);g(e).find("a").each(function(a,b){var c=b.parentNode;"FONT"==c.nodeName&&(c=c.cloneNode(!1),c.innerHTML=b.innerHTML,g(b).html("").append(c))});f.moveToBookmark(l).select()}return!0}}},queryCommandValue:function(b){var f=a.selection.getStart(),e=g(f).css(d[b]);void 0===e&&(e=g(f).attr(c[b]));
return e?n.fixColor(b,e).replace(/px/,""):""},queryCommandState:function(a){return this.queryCommandValue(a)}}})(f)};UM.plugins.link=function(){this.setOpt("autourldetectinie",!1);m.ie&&!1===this.options.autourldetectinie&&this.addListener("keyup",function(a,b){var d=b.keyCode;if(13==d||32==d){var c=this.selection.getRange().startContainer;13==d?"P"==c.nodeName&&(d=c.previousSibling)&&1==d.nodeType&&(d=d.lastChild)&&"A"==d.nodeName&&!d.getAttribute("_href")&&k.remove(d,!0):32==d&&3==c.nodeType&&/^\s$/.test(c.nodeValue)&&
(c=c.previousSibling)&&"A"==c.nodeName&&!c.getAttribute("_href")&&k.remove(c,!0)}});this.addOutputRule(function(a){g.each(a.getNodesByTagName("a"),function(a,d){var b=d.getAttr("_href");/^(ftp|https?|\/|file)/.test(b)||(b="http://"+b);d.setAttr("href",b);d.setAttr("_href");""==d.getAttr("title")&&d.setAttr("title")})});this.addInputRule(function(a){g.each(a.getNodesByTagName("a"),function(a,d){d.setAttr("_href",d.getAttr("href"))})});this.commands.link={execCommand:function(a,b){var d=this.selection.getRange();
b._href&&(b._href=n.unhtml(b._href,/[<">'](?:(amp|lt|quot|gt|#39|nbsp);)?/g));b.href&&(b.href=n.unhtml(b.href,/[<">'](?:(amp|lt|quot|gt|#39|nbsp);)?/g));if(d.collapsed){var c=d.startContainer;(c=k.findParentByTagName(c,"a",!0))?(g(c).attr(b),d.selectNode(c).select()):d.insertNode(g(""+b.href+"").attr(b)[0]).select()}else this.document.execCommand("createlink",!1,"_umeditor_link"),n.each(k.getElementsByTagName(this.body,"a",function(a){return"_umeditor_link"==a.getAttribute("href")}),function(a){"_umeditor_link"==
g(a).text()&&g(a).text(b.href);k.setAttributes(a,b);d.selectNode(a).select()})},queryCommandState:function(){return this.queryCommandValue("link")?1:0},queryCommandValue:function(){var a=this.selection.getStartElementPath(),b;g.each(a,function(a,c){if("A"==c.nodeName)return b=c,!1});return b}};this.commands.unlink={execCommand:function(){this.document.execCommand("unlink")}}};UM.commands.print={execCommand:function(){var a="editor_print_"+ +new Date;g('').attr("id",
a).css({width:"0px",height:"0px",overflow:"hidden","float":"left",position:"absolute",top:"-10000px",left:"-10000px"}).appendTo(this.$container.find(".edui-dialog-container"));var b=window.open("",a,"").document;b.open();b.write(""+this.getContent(null,null,!0)+"