BVB Source Codes

Easy to point the content management system DianCMS v6.0.0 SQL version Show ueditor.all.min.js Source code

Return Download Easy to point the content management system DianCMS v6.0.0 SQL version: download ueditor.all.min.js Source code - Download Easy to point the content management system DianCMS v6.0.0 SQL version Source code - Type:.js
  1. (function(){function W(d,c,b){var a;c=c.toLowerCase();return(a=d.__allListeners||b&&(d.__allListeners={}))&&(a[c]||b&&(a[c]=[]))}function X(d,c,b,a,e,h){a=a&&d[c];var g;for(!a&&(a=d[b]);!a&&(g=(g||d).parentNode);){if("BODY"==g.tagName||h&&!h(g))return null;a=g[b]}return a&&e&&!e(a)?X(a,c,b,!1,e):a}UEDITOR_CONFIG=window.UEDITOR_CONFIG||{};var s=window.baidu||{};window.baidu=s;window.UE=s.editor=window.UE||{};UE.plugins={};UE.commands={};UE.instants={};UE.I18N={};UE._customizeUI={};UE.version="1.4.3";
  2. var L=UE.dom={},r=UE.browser=function(){var d=navigator.userAgent.toLowerCase(),c=window.opera,b={ie:/(msie\s|trident.*rv:)([\w.]+)/.test(d),opera:!!c&&c.version,webkit:-1<d.indexOf(" applewebkit/"),mac:-1<d.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode};b.gecko="Gecko"==navigator.product&&!b.webkit&&!b.opera&&!b.ie;var a=0;if(b.ie){var a=d.match(/(?:msie\s([\w.]+))/),e=d.match(/(?:trident.*rv:([\w.]+))/),a=a&&e&&a[1]&&e[1]?Math.max(1*a[1],1*e[1]):a&&a[1]?1*a[1]:e&&e[1]?1*e[1]:0;b.ie11Compat=
  3. 11==document.documentMode;b.ie9Compat=9==document.documentMode;b.ie8=!!document.documentMode;b.ie8Compat=8==document.documentMode;b.ie7Compat=7==a&&!document.documentMode||7==document.documentMode;b.ie6Compat=7>a||b.quirks;b.ie9above=8<a;b.ie9below=9>a;b.ie11above=10<a;b.ie11below=11>a}b.gecko&&(e=d.match(/rv:([\d\.]+)/))&&(e=e[1].split("."),a=1E4*e[0]+100*(e[1]||0)+1*(e[2]||0));/chrome\/(\d+\.\d)/i.test(d)&&(b.chrome=+RegExp.$1);/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(d)&&!/chrome/i.test(d)&&
  4. (b.safari=+(RegExp.$1||RegExp.$2));b.opera&&(a=parseFloat(c.version()));b.webkit&&(a=parseFloat(d.match(/ applewebkit\/(\d+)/)[1]));b.version=a;b.isCompatible=!b.mobile&&(b.ie&&6<=a||b.gecko&&10801<=a||b.opera&&9.5<=a||b.air&&1<=a||b.webkit&&522<=a||!1);return b}(),I=r.ie,ma=r.opera,p=UE.utils={each:function(d,c,b){if(null!=d)if(d.length===+d.length)for(var a=0,e=d.length;a<e;a++){if(!1===c.call(b,d[a],a,d))return!1}else for(a in d)if(d.hasOwnProperty(a)&&!1===c.call(b,d[a],a,d))return!1},makeInstance:function(d){var c=
  5. new Function;c.prototype=d;d=new c;c.prototype=null;return d},extend:function(d,c,b){if(c)for(var a in c)b&&d.hasOwnProperty(a)||(d[a]=c[a]);return d},extend2:function(d){for(var c=arguments,b=1;b<c.length;b++){var a=c[b],e;for(e in a)d.hasOwnProperty(e)||(d[e]=a[e])}return d},inherits:function(d,c){var b=d.prototype,a=p.makeInstance(c.prototype);p.extend(a,b,!0);d.prototype=a;return a.constructor=d},bind:function(d,c){return function(){return d.apply(c,arguments)}},defer:function(d,c,b){var a;return function(){b&&
  6. clearTimeout(a);a=setTimeout(d,c)}},indexOf:function(d,c,b){var a=-1;b=this.isNumber(b)?b:0;this.each(d,function(e,h){if(h>=b&&e===c)return a=h,!1});return a},removeItem:function(d,c){for(var b=0,a=d.length;b<a;b++)d[b]===c&&(d.splice(b,1),b--)},trim:function(d){return d.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")},listToMap:function(d){if(!d)return{};d=p.isArray(d)?d:d.split(",");for(var c=0,b,a={};b=d[c++];)a[b.toUpperCase()]=a[b]=1;return a},unhtml:function(d,c){return d?d.replace(c||/[&<">'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g,
  7. function(b,a){return a?b:{"<":"&lt;","&":"&amp;",'"':"&quot;",">":"&gt;","'":"&#39;"}[b]}):""},html:function(d){return d?d.replace(/&((g|l|quo)t|amp|#39|nbsp);/g,function(c){return{"&lt;":"<","&amp;":"&","&quot;":'"',"&gt;":">","&#39;":"'","&nbsp;":" "}[c]}):""},cssStyleToDomStyle:function(){var d=document.createElement("div").style,c={"float":void 0!=d.cssFloat?"cssFloat":void 0!=d.styleFloat?"styleFloat":"float"};return function(b){return c[b]||(c[b]=b.toLowerCase().replace(/-./g,function(a){return a.charAt(1).toUpperCase()}))}}(),
  8. loadFile:function(){function d(b,a){try{for(var e=0,h;h=c[e++];)if(h.doc===b&&h.url==(a.src||a.href))return h}catch(g){return null}}var c=[];return function(b,a,e){var h=d(b,a);if(h)h.ready?e&&e():h.funs.push(e);else if(c.push({doc:b,url:a.src||a.href,funs:[e]}),!b.body){e=[];for(var g in a)"tag"!=g&&e.push(g+'="'+a[g]+'"');b.write("<"+a.tag+" "+e.join(" ")+" ></"+a.tag+">")}else if(!a.id||!b.getElementById(a.id)){var l=b.createElement(a.tag);delete a.tag;for(g in a)l.setAttribute(g,a[g]);l.onload=
  9. l.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){h=d(b,a);if(0<h.funs.length){h.ready=1;for(var e;e=h.funs.pop();)e()}l.onload=l.onreadystatechange=null}};l.onerror=function(){throw Error("The load "+(a.href||a.src)+" fails,check the url settings of file ueditor.config.js ");};b.getElementsByTagName("head")[0].appendChild(l)}}}(),isEmptyObject:function(d){if(null==d)return!0;if(this.isArray(d)||this.isString(d))return 0===d.length;for(var c in d)if(d.hasOwnProperty(c))return!1;
  10. return!0},fixColor:function(d,c){if(/color/i.test(d)&&/rgba?/.test(c)){var b=c.split(",");if(3<b.length)return"";c="#";for(var a=0,e;e=b[a++];)e=parseInt(e.replace(/[^\d]/gi,""),10).toString(16),c+=1==e.length?"0"+e:e;c=c.toUpperCase()}return c},optCss:function(d){function c(a,b){if(!a)return"";var g=a.top,c=a.bottom,k=a.left,d=a.right,n="";if(g&&k&&c&&d)n+=";"+b+":"+(g==c&&c==k&&k==d?g:g==c&&k==d?g+" "+k:k==d?g+" "+k+" "+c:g+" "+d+" "+c+" "+k)+";";else for(var f in a)n+=";"+b+"-"+f+":"+a[f]+";";
  11. return n}var b,a;d=d.replace(/(padding|margin|border)\-([^:]+):([^;]+);?/gi,function(e,c,g,l){if(1==l.split(" ").length)switch(c){case "padding":return!b&&(b={}),b[g]=l,"";case "margin":return!a&&(a={}),a[g]=l,"";case "border":return"initial"==l?"":e}return e});d+=c(b,"padding")+c(a,"margin");return d.replace(/^[ \n\r\t;]*|[ \n\r\t]*$/,"").replace(/;([ \n\r\t]+)|\1;/g,";").replace(/(&((l|g)t|quot|#39))?;{2,}/g,function(a,b){return b?b+";;":";"})},clone:function(d,c){var b;c=c||{};for(var a in d)d.hasOwnProperty(a)&&
  12. (b=d[a],"object"==typeof b?(c[a]=p.isArray(b)?[]:{},p.clone(d[a],c[a])):c[a]=b);return c},transUnitToPx:function(d){if(!/(pt|cm)/.test(d))return d;var c;d.replace(/([\d.]+)(\w+)/,function(b,a,e){d=a;c=e});switch(c){case "cm":d=25*parseFloat(d);break;case "pt":d=Math.round(96*parseFloat(d)/72)}return d+(d?"px":"")},domReady:function(){function d(b){for(b.isReady=!0;b=c.pop();b());}var c=[];return function(b,a){a=a||window;var e=a.document;b&&c.push(b);"complete"===e.readyState?d(e):(e.isReady&&d(e),
  13. r.ie&&11!=r.version?(function(){if(!e.isReady){try{e.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}d(e)}}(),a.attachEvent("onload",function(){d(e)})):(e.addEventListener("DOMContentLoaded",function(){e.removeEventListener("DOMContentLoaded",arguments.callee,!1);d(e)},!1),a.addEventListener("load",function(){d(e)},!1)))}}(),cssRule:r.ie&&11!=r.version?function(d,c,b){var a,e;if(void 0===c||c&&c.nodeType&&9==c.nodeType){if(b=c&&c.nodeType&&9==c.nodeType?c:b||document,
  14. a=b.indexList||(b.indexList={}),e=a[d],void 0!==e)return b.styleSheets[e].cssText}else{b=b||document;a=b.indexList||(b.indexList={});e=a[d];if(""===c)return void 0!==e?(b.styleSheets[e].cssText="",delete a[d],!0):!1;void 0!==e?sheetStyle=b.styleSheets[e]:(sheetStyle=b.createStyleSheet("",e=b.styleSheets.length),a[d]=e);sheetStyle.cssText=c}}:function(d,c,b){var a;if(void 0===c||c&&c.nodeType&&9==c.nodeType)return b=c&&c.nodeType&&9==c.nodeType?c:b||document,(a=b.getElementById(d))?a.innerHTML:void 0;
  15. b=b||document;a=b.getElementById(d);if(""===c)return a?(a.parentNode.removeChild(a),!0):!1;a?a.innerHTML=c:(a=b.createElement("style"),a.id=d,a.innerHTML=c,b.getElementsByTagName("head")[0].appendChild(a))},sort:function(d,c){c=c||function(a,e){return a.localeCompare(e)};for(var b=0,a=d.length;b<a;b++)for(var e=b,h=d.length;e<h;e++)if(0<c(d[b],d[e])){var g=d[b];d[b]=d[e];d[e]=g}return d},serializeParam:function(d){var c=[],b;for(b in d)if("method"!=b&&"timeout"!=b&&"async"!=b)if("function"!=(typeof d[b]).toLowerCase()&&
  16. "object"!=(typeof d[b]).toLowerCase())c.push(encodeURIComponent(b)+"="+encodeURIComponent(d[b]));else if(p.isArray(d[b]))for(var a=0;a<d[b].length;a++)c.push(encodeURIComponent(b)+"[]="+encodeURIComponent(d[b][a]));return c.join("&")},formatUrl:function(d){d=d.replace(/&&/g,"&");d=d.replace(/\?&/g,"?");d=d.replace(/&$/g,"");d=d.replace(/&#/g,"#");return d=d.replace(/&+/g,"&")},isCrossDomainUrl:function(d){var c=document.createElement("a");c.href=d;r.ie&&(c.href=c.href);return!(c.protocol==location.protocol&&
  17. c.hostname==location.hostname&&(c.port==location.port||"80"==c.port&&""==location.port||""==c.port&&"80"==location.port))},clearEmptyAttrs:function(d){for(var c in d)""===d[c]&&delete d[c];return d},str2json:function(d){return p.isString(d)?window.JSON?JSON.parse(d):(new Function("return "+p.trim(d||"")))():null},json2str:function(){if(window.JSON)return JSON.stringify;var d={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},c=function(a){/["\\\x00-\x1f]/.test(a)&&(a=a.replace(/["\\\x00-\x1f]/g,
  18. function(a){var b=d[a];if(b)return b;b=a.charCodeAt();return"\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16)}));return'"'+a+'"'},b=function(a){return 10>a?"0"+a:a};return function(a){switch(typeof a){case "undefined":return"undefined";case "number":return isFinite(a)?String(a):"null";case "string":return c(a);case "boolean":return String(a);default:if(null===a)return"null";if(p.isArray(a)){var e=["["],h=a.length,g,l,k;for(l=0;l<h;l++)switch(k=a[l],typeof k){case "undefined":case "function":case "unknown":break;
  19. default:g&&e.push(","),e.push(p.json2str(k)),g=1}e.push("]");return e.join("")}if(p.isDate(a))return'"'+a.getFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+'"';g=["{"];l=p.json2str;for(h in a)if(Object.prototype.hasOwnProperty.call(a,h))switch(k=a[h],typeof k){case "undefined":case "unknown":case "function":break;default:e&&g.push(","),e=1,g.push(l(h)+":"+l(k))}g.push("}");return g.join("")}}}()};p.each("String Function Array Number RegExp Object Date".split(" "),
  20. function(d){UE.utils["is"+d]=function(c){return Object.prototype.toString.apply(c)=="[object "+d+"]"}});var Z=UE.EventBase=function(){};Z.prototype={addListener:function(d,c){d=p.trim(d).split(/\s+/);for(var b=0,a;a=d[b++];)W(this,a,!0).push(c)},on:function(d,c){return this.addListener(d,c)},off:function(d,c){return this.removeListener(d,c)},trigger:function(){return this.fireEvent.apply(this,arguments)},removeListener:function(d,c){d=p.trim(d).split(/\s+/);for(var b=0,a;a=d[b++];)p.removeItem(W(this,
  21. a)||[],c)},fireEvent:function(){for(var d=arguments[0],d=p.trim(d).split(" "),c=0,b;b=d[c++];){var a=W(this,b),e,h,g;if(a)for(g=a.length;g--;)if(a[g]){h=a[g].apply(this,arguments);if(!0===h)return h;void 0!==h&&(e=h)}if(h=this["on"+b.toLowerCase()])e=h.apply(this,arguments)}return e}};var v=L.dtd=function(){function d(a){for(var e in a)a[e.toUpperCase()]=a[e];return a}var c=p.extend2,b=d({isindex:1,fieldset:1}),a=d({input:1,button:1,select:1,textarea:1,label:1}),e=c(d({a:1}),a),h=c({iframe:1},e),
  22. g=d({hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1}),l=d({ins:1,del:1,script:1,style:1}),k=c(d({b:1,acronym:1,bdo:1,"var":1,"#":1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1}),l),m=c(d({sub:1,img:1,embed:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1}),k),n=c(d({p:1}),m),a=c(d({iframe:1}),m,a),m=d({img:1,embed:1,noscript:1,br:1,kbd:1,center:1,
  23. button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,"#":1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,"var":1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1}),f=c(d({a:0}),a),t=d({tr:1}),w=d({"#":1}),y=c(d({param:1}),m),u=c(d({form:1}),b,h,g,n),
  24. C=d({li:1,ol:1,ul:1}),E=d({style:1,script:1}),G=d({base:1,link:1,meta:1,title:1}),E=c(G,E),A=d({head:1,body:1}),N=d({html:1}),r=d({address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1}),s=d({area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1});return d({$nonBodyContent:c(N,A,G),$block:r,$inline:f,$inlineWithA:c(d({a:1}),
  25. f),$body:c(d({script:1,style:1}),r),$cdata:d({script:1,style:1}),$empty:s,$nonChild:d({iframe:1,textarea:1}),$listItem:d({dd:1,dt:1,li:1}),$list:d({ul:1,ol:1,dl:1}),$isNotEmpty:d({table:1,ul:1,ol:1,dl:1,iframe:1,area:1,base:1,col:1,hr:1,img:1,embed:1,input:1,link:1,meta:1,param:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1}),$removeEmpty:d({a:1,abbr:1,acronym:1,address: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,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,
  26. u:1,"var":1}),$removeEmptyBlock:d({p:1,div:1}),$tableContent:d({caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1,table:1}),$notTransContent:d({pre:1,script:1,style:1,textarea:1}),html:A,head:E,style:w,script:w,body:u,base:{},link:{},meta:{},title:w,col:{},tr:d({td:1,th:1}),img:{},embed:{},colgroup:d({thead:1,col:1,tbody:1,tr:1,tfoot:1}),noscript:u,td:u,br:{},th:u,center:u,kbd:f,button:c(n,g),basefont:{},h5:f,h4:f,samp:f,h6:f,ol:C,h1:f,h3:f,option:w,h2:f,form:c(b,h,g,n),select:d({optgroup:1,
  27. option:1}),font:f,ins:f,menu:C,abbr:f,label:f,table:d({thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}),code:f,tfoot:t,cite:f,li:u,input:{},iframe:u,strong:f,textarea:w,noframes:u,big:f,small:f,span:d({"#":1,br:1,b:1,strong:1,u:1,i:1,em:1,sub:1,sup:1,strike:1,span:1}),hr:f,dt:f,sub:f,optgroup:d({option:1}),param:{},bdo:f,"var":f,div:u,object:y,sup:f,dd:u,strike:f,area:{},dir:C,map:c(d({area:1,form:1,p:1}),b,l,g),applet:y,dl:d({dt:1,dd:1}),del:f,isindex:{},fieldset:c(d({legend:1}),m),thead:t,
  28. ul:C,acronym:f,b:f,a:c(d({a:1}),a),blockquote:c(d({td:1,tr:1,tbody:1,li:1}),u),caption:f,i:f,u:f,tbody:t,s:f,address:c(h,n),tt:f,legend:f,q:f,pre:c(k,e),p:c(d({a:1}),f),em:f,dfn:f})}(),ea=I&&9>r.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"},oa=p.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(" ")),
  29. f=L.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:I&&"6"==r.version?"\ufeff":"\u200b",keys:{8:1,46:1,16:1,17:1,18:1,37:1,38:1,39:1,40:1,13:1},getPosition:function(d,c){if(d===c)return 0;var b,a=[d],e=[c];for(b=d;b=b.parentNode;){if(b===c)return 10;a.push(b)}for(b=c;b=b.parentNode;){if(b===d)return 20;e.push(b)}a.reverse();
  30. e.reverse();if(a[0]!==e[0])return 1;for(b=-1;b++,a[b]===e[b];);d=a[b];for(c=e[b];d=d.nextSibling;)if(d===c)return 4;return 2},getNodeIndex:function(d,c){for(var b=d,a=0;b=b.previousSibling;)c&&3==b.nodeType?b.nodeType!=b.nextSibling.nodeType&&a++:a++;return a},inDoc:function(d,c){return 10==f.getPosition(d,c)},findParent:function(d,c,b){if(d&&!f.isBody(d))for(d=b?d:d.parentNode;d;){if(!c||c(d)||f.isBody(d))return c&&!c(d)&&f.isBody(d)?null:d;d=d.parentNode}return null},findParentByTagName:function(d,
  31. c,b,a){c=p.listToMap(p.isArray(c)?c:[c]);return f.findParent(d,function(e){return c[e.tagName]&&!(a&&a(e))},b)},findParents:function(d,c,b,a){for(c=c&&(b&&b(d)||!b)?[d]:[];d=f.findParent(d,b);)c.push(d);return a?c:c.reverse()},insertAfter:function(d,c){return d.nextSibling?d.parentNode.insertBefore(c,d.nextSibling):d.parentNode.appendChild(c)},remove:function(d,c){var b=d.parentNode,a;if(b){if(c&&d.hasChildNodes())for(;a=d.firstChild;)b.insertBefore(a,d);b.removeChild(d)}return d},getNextDomNode:function(d,
  32. c,b,a){return X(d,"firstChild","nextSibling",c,b,a)},getPreDomNode:function(d,c,b,a){return X(d,"lastChild","previousSibling",c,b,a)},isBookmarkNode:function(d){return 1==d.nodeType&&d.id&&/^_baidu_bookmark_/i.test(d.id)},getWindow:function(d){d=d.ownerDocument||d;return d.defaultView||d.parentWindow},getCommonAncestor:function(d,c){if(d===c)return d;for(var b=[d],a=[c],e=d,h=-1;e=e.parentNode;){if(e===c)return e;b.push(e)}for(e=c;e=e.parentNode;){if(e===d)return e;a.push(e)}b.reverse();for(a.reverse();h++,
  33. b[h]===a[h];);return 0==h?null:b[h-1]},clearEmptySibling:function(d,c,b){function a(a,b){for(var g;a&&!f.isBookmarkNode(a)&&(f.isEmptyInlineElement(a)||!RegExp("[^\t\n\r"+f.fillChar+"]").test(a.nodeValue));)g=a[b],f.remove(a),a=g}!c&&a(d.nextSibling,"nextSibling");!b&&a(d.previousSibling,"previousSibling")},split:function(d,c){var b=d.ownerDocument;if(r.ie&&c==d.nodeValue.length){var a=b.createTextNode("");return f.insertAfter(d,a)}a=d.splitText(c);r.ie8&&(b=b.createTextNode(""),f.insertAfter(a,b),
  34. f.remove(b));return a},isWhitespace:function(d){return!RegExp("[^ \t\n\r"+f.fillChar+"]").test(d.nodeValue)},getXY:function(d){for(var c=0,b=0;d.offsetParent;)b+=d.offsetTop,c+=d.offsetLeft,d=d.offsetParent;return{x:c,y:b}},on:function(d,c,b){var a=p.isArray(c)?c:p.trim(c).split(/\s+/),e=a.length;if(e)for(;e--;)if(c=a[e],d.addEventListener)d.addEventListener(c,b,!1);else{b._d||(b._d={els:[]});var h=c+b.toString(),g=p.indexOf(b._d.els,d);b._d[h]&&-1!=g||(-1==g&&b._d.els.push(d),b._d[h]||(b._d[h]=function(a){return b.call(a.srcElement,
  35. a||window.event)}),d.attachEvent("on"+c,b._d[h]))}d=null},un:function(d,c,b){var a=p.isArray(c)?c:p.trim(c).split(/\s+/),e=a.length;if(e)for(;e--;)if(c=a[e],d.removeEventListener)d.removeEventListener(c,b,!1);else{var h=c+b.toString();try{d.detachEvent("on"+c,b._d?b._d[h]:b)}catch(g){}b._d&&b._d[h]&&(c=p.indexOf(b._d.els,d),-1!=c&&b._d.els.splice(c,1),0==b._d.els.length&&delete b._d[h])}},isSameElement:function(d,c){if(d.tagName!=c.tagName)return!1;var b=d.attributes,a=c.attributes;if(!I&&b.length!=
  36. a.length)return!1;for(var e,h,g=0,l=0,k=0;e=b[k++];){if("style"==e.nodeName)if(e.specified&&g++,f.isSameStyle(d,c))continue;else return!1;if(I)if(e.specified)g++,h=a.getNamedItem(e.nodeName);else continue;else h=c.attributes[e.nodeName];if(!h.specified||e.nodeValue!=h.nodeValue)return!1}if(I){for(k=0;h=a[k++];)h.specified&&l++;if(g!=l)return!1}return!0},isSameStyle:function(d,c){var b=d.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":"),a=c.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,
  37. ":");if(r.opera){b=d.style;a=c.style;if(b.length!=a.length)return!1;for(var e in b)if(!/^(\d+|csstext)$/i.test(e)&&b[e]!=a[e])return!1;return!0}if(!b||!a)return b==a;b=b.split(";");a=a.split(";");if(b.length!=a.length)return!1;e=0;for(var h;h=b[e++];)if(-1==p.indexOf(a,h))return!1;return!0},isBlockElm:function(d){return 1==d.nodeType&&(v.$block[d.tagName]||oa[f.getComputedStyle(d,"display")])&&!v.$nonChild[d.tagName]},isBody:function(d){return d&&1==d.nodeType&&"body"==d.tagName.toLowerCase()},breakParent:function(d,
  38. c){var b,a=d,e=d,h,g;do{a=a.parentNode;h?(b=a.cloneNode(!1),b.appendChild(h),h=b,b=a.cloneNode(!1),b.appendChild(g),g=b):(h=a.cloneNode(!1),g=h.cloneNode(!1));for(;b=e.previousSibling;)h.insertBefore(b,h.firstChild);for(;b=e.nextSibling;)g.appendChild(b);e=a}while(c!==a);b=c.parentNode;b.insertBefore(h,c);b.insertBefore(g,c);b.insertBefore(d,g);f.remove(c);return d},isEmptyInlineElement:function(d){if(1!=d.nodeType||!v.$removeEmpty[d.tagName])return 0;for(d=d.firstChild;d;){if(f.isBookmarkNode(d)||
  39. 1==d.nodeType&&!f.isEmptyInlineElement(d)||3==d.nodeType&&!f.isWhitespace(d))return 0;d=d.nextSibling}return 1},trimWhiteTextNode:function(d){function c(b){for(var a;(a=d[b])&&3==a.nodeType&&f.isWhitespace(a);)d.removeChild(a)}c("firstChild");c("lastChild")},mergeChild:function(d,c,b){c=f.getElementsByTagName(d,d.tagName.toLowerCase());for(var a=0,e;e=c[a++];)if(e.parentNode&&!f.isBookmarkNode(e))if("span"==e.tagName.toLowerCase()){if(d===e.parentNode&&(f.trimWhiteTextNode(d),1==d.childNodes.length)){d.style.cssText=
  40. e.style.cssText+";"+d.style.cssText;f.remove(e,!0);continue}e.style.cssText=d.style.cssText+";"+e.style.cssText;if(b){var h=b.style;if(h)for(var h=h.split(";"),g=0,l;l=h[g++];)e.style[p.cssStyleToDomStyle(l.split(":")[0])]=l.split(":")[1]}f.isSameStyle(e,d)&&f.remove(e,!0)}else f.isSameElement(d,e)&&f.remove(e,!0)},getElementsByTagName:function(d,c,b){if(b&&p.isString(b)){var a=b;b=function(e){return f.hasClass(e,a)}}c=p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var e=[],h=0,g;g=c[h++];){g=d.getElementsByTagName(g);
  41. for(var l=0,k;k=g[l++];)b&&!b(k)||e.push(k)}return e},mergeToParent:function(d){for(var c=d.parentNode;c&&v.$removeEmpty[c.tagName];){if(c.tagName==d.tagName||"A"==c.tagName){f.trimWhiteTextNode(c);if("SPAN"==c.tagName&&!f.isSameStyle(c,d)||"A"==c.tagName&&"SPAN"==d.tagName)if(1<c.childNodes.length||c!==d.parentNode){d.style.cssText=c.style.cssText+";"+d.style.cssText;c=c.parentNode;continue}else c.style.cssText+=";"+d.style.cssText,"A"==c.tagName&&(c.style.textDecoration="underline");if("A"!=c.tagName){c===
  42. d.parentNode&&f.remove(d,!0);break}}c=c.parentNode}},mergeSibling:function(d,c,b){function a(a,b,g){var c;if((c=g[a])&&!f.isBookmarkNode(c)&&1==c.nodeType&&f.isSameElement(g,c)){for(;c.firstChild;)"firstChild"==b?g.insertBefore(c.lastChild,g.firstChild):g.appendChild(c.firstChild);f.remove(c)}}!c&&a("previousSibling","firstChild",d);!b&&a("nextSibling","lastChild",d)},unSelectable:I&&r.ie9below||r.opera?function(d){d.onselectstart=function(){return!1};d.onclick=d.onkeyup=d.onkeydown=function(){return!1};
  43. d.unselectable="on";d.setAttribute("unselectable","on");for(var c=0,b;b=d.all[c++];)switch(b.tagName.toLowerCase()){case "iframe":case "textarea":case "input":case "select":break;default:b.unselectable="on",d.setAttribute("unselectable","on")}}:function(d){d.style.MozUserSelect=d.style.webkitUserSelect=d.style.msUserSelect=d.style.KhtmlUserSelect="none"},removeAttributes:function(d,c){c=p.isArray(c)?c:p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a;a=c[b++];){a=ea[a]||a;switch(a){case "className":d[a]=
  44. "";break;case "style":d.style.cssText="";var e=d.getAttributeNode("style");!r.ie&&e&&d.removeAttributeNode(e)}d.removeAttribute(a)}},createElement:function(d,c,b){return f.setAttributes(d.createElement(c),b)},setAttributes:function(d,c){for(var b in c)if(c.hasOwnProperty(b)){var a=c[b];switch(b){case "class":d.className=a;break;case "style":d.style.cssText=d.style.cssText+";"+a;break;case "innerHTML":d[b]=a;break;case "value":d.value=a;break;default:d.setAttribute(ea[b]||b,a)}}return d},getComputedStyle:function(d,
  45. c){if(-1<"width height top left".indexOf(c))return d["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]+"px";3==d.nodeType&&(d=d.parentNode);if(r.ie&&9>r.version&&"font-size"==c&&!d.style.fontSize&&!v.$empty[d.tagName]&&!v.$nonChild[d.tagName]){var b=d.ownerDocument.createElement("span");b.style.cssText="padding:0;border:0;font-family:simsun;";b.innerHTML=".";d.appendChild(b);var a=b.offsetHeight;d.removeChild(b);b=null;return a+"px"}try{b=f.getStyle(d,c)||(window.getComputedStyle?f.getWindow(d).getComputedStyle(d,
  46. "").getPropertyValue(c):(d.currentStyle||d.style)[p.cssStyleToDomStyle(c)])}catch(e){return""}return p.transUnitToPx(p.fixColor(c,b))},removeClasses:function(d,c){c=p.isArray(c)?c:p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a,e=d.className;a=c[b++];)e=e.replace(RegExp("\\b"+a+"\\b"),"");(e=p.trim(e).replace(/[ ]{2,}/g," "))?d.className=e:f.removeAttributes(d,["class"])},addClass:function(d,c){if(d){c=p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a,e=d.className;a=c[b++];)RegExp("\\b"+
  47. a+"\\b").test(e)||(e+=" "+a);d.className=p.trim(e)}},hasClass:function(d,c){if(p.isRegExp(c))return c.test(d.className);c=p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a,e=d.className;a=c[b++];)if(!RegExp("\\b"+a+"\\b","i").test(e))return!1;return b-1==c.length},preventDefault:function(d){d.preventDefault?d.preventDefault():d.returnValue=!1},removeStyle:function(d,c){r.ie?("color"==c&&(c="(^|;)"+c),d.style.cssText=d.style.cssText.replace(RegExp(c+"[^:]*:[^;]+;?","ig"),"")):d.style.removeProperty?
  48. d.style.removeProperty(c):d.style.removeAttribute(p.cssStyleToDomStyle(c));d.style.cssText||f.removeAttributes(d,["style"])},getStyle:function(d,c){var b=d.style[p.cssStyleToDomStyle(c)];return p.fixColor(c,b)},setStyle:function(d,c,b){d.style[p.cssStyleToDomStyle(c)]=b;p.trim(d.style.cssText)||this.removeAttributes(d,"style")},setStyles:function(d,c){for(var b in c)c.hasOwnProperty(b)&&f.setStyle(d,b,c[b])},removeDirtyAttr:function(d){for(var c=0,b,a=d.getElementsByTagName("*");b=a[c++];)b.removeAttribute("_moz_dirty");
  49. d.removeAttribute("_moz_dirty")},getChildCount:function(d,c){var b=0,a=d.firstChild;for(c=c||function(){return 1};a;)c(a)&&b++,a=a.nextSibling;return b},isEmptyNode:function(d){return!d.firstChild||0==f.getChildCount(d,function(c){return!f.isBr(c)&&!f.isBookmarkNode(c)&&!f.isWhitespace(c)})},clearSelectedArr:function(d){for(var c;c=d.pop();)f.removeAttributes(c,["class"])},scrollToView:function(d,c,b){var a=function(){var a=c.document,b="CSS1Compat"==a.compatMode;return{width:(b?a.documentElement.clientWidth:
  50. a.body.clientWidth)||0,height:(b?a.documentElement.clientHeight:a.body.clientHeight)||0}}().height;b=-1*a+b+(d.offsetHeight||0);d=f.getXY(d);b+=d.y;d=function(a){if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}}(c).y;(b>d||b<d-a)&&c.scrollTo(0,b+(0>b?-20:20))},isBr:function(d){return 1==d.nodeType&&"BR"==d.tagName},isFillChar:function(d,c){if(3!=d.nodeType)return!1;
  51. var b=d.nodeValue;return c?RegExp("^"+f.fillChar).test(b):!b.replace(RegExp(f.fillChar,"g"),"").length},isStartInblock:function(d){d=d.cloneRange();var c=0,b=d.startContainer,a;if(1==b.nodeType&&b.childNodes[d.startOffset])for(var b=b.childNodes[d.startOffset],e=b.previousSibling;e&&f.isFillChar(e);)b=e,e=e.previousSibling;this.isFillChar(b,!0)&&1==d.startOffset&&(d.setStartBefore(b),b=d.startContainer);for(;b&&f.isFillChar(b);)a=b,b=b.previousSibling;a&&(d.setStartBefore(a),b=d.startContainer);for(1==
  52. b.nodeType&&f.isEmptyNode(b)&&1==d.startOffset&&d.setStart(b,0).collapse(!0);!d.startOffset;){b=d.startContainer;if(f.isBlockElm(b)||f.isBody(b)){c=1;break}var e=d.startContainer.previousSibling,h;if(e){for(;e&&f.isFillChar(e);)h=e,e=e.previousSibling;h?d.setStartBefore(h):d.setStartBefore(d.startContainer)}else d.setStartBefore(d.startContainer)}return c&&!f.isBody(d.startContainer)?1:0},isEmptyBlock:function(d,c){if(1!=d.nodeType)return 0;c=c||RegExp("[ \u00a0\t\r\n"+f.fillChar+"]","g");if(0<d[r.ie?
  53. "innerText":"textContent"].replace(c,"").length)return 0;for(var b in v.$isNotEmpty)if(d.getElementsByTagName(b).length)return 0;return 1},setViewportOffset:function(d,c){var b=parseInt(d.style.left)|0,a=parseInt(d.style.top)|0,e=d.getBoundingClientRect(),h=c.left-e.left,e=c.top-e.top;h&&(d.style.left=b+h+"px");e&&(d.style.top=a+e+"px")},fillNode:function(d,c){var b=r.ie?d.createTextNode(f.fillChar):d.createElement("br");c.innerHTML="";c.appendChild(b)},moveChild:function(d,c,b){for(;d.firstChild;)b&&
  54. c.firstChild?c.insertBefore(d.lastChild,c.firstChild):c.appendChild(d.firstChild)},hasNoAttributes:function(d){return r.ie?/^<\w+\s*?>/.test(d.outerHTML):0==d.attributes.length},isCustomeNode:function(d){return 1==d.nodeType&&d.getAttribute("_ue_custom_node_")},isTagNode:function(d,c){return 1==d.nodeType&&RegExp("\\b"+d.tagName+"\\b","i").test(c)},filterNodeList:function(d,c,b){var a=[];if(!p.isFunction(c)){var e=c;c=function(a){return-1!=p.indexOf(p.isArray(e)?e:e.split(" "),a.tagName.toLowerCase())}}p.each(d,
  55. function(e){c(e)&&a.push(e)});return 0==a.length?null:1!=a.length&&b?a:a[0]},isInNodeEndBoundary:function(d,c){var b=d.startContainer;if(3==b.nodeType&&d.startOffset!=b.nodeValue.length||1==b.nodeType&&d.startOffset!=b.childNodes.length)return 0;for(;b!==c;){if(b.nextSibling)return 0;b=b.parentNode}return 1},isBoundaryNode:function(d,c){for(var b;!f.isBody(d);)if(b=d,d=d.parentNode,b!==d[c])return!1;return!0},fillHtml:r.ie11below?"&nbsp;":"<br/>"},P=RegExp(f.fillChar,"g");(function(){function d(a){return!a.collapsed&&
  56. 1==a.startContainer.nodeType&&a.startContainer===a.endContainer&&1==a.endOffset-a.startOffset}function c(a,e,g,b){1==e.nodeType&&(v.$empty[e.tagName]||v.$nonChild[e.tagName])&&(g=f.getNodeIndex(e)+(a?0:1),e=e.parentNode);a?(b.startContainer=e,b.startOffset=g,b.endContainer||b.collapse(!0)):(b.endContainer=e,b.endOffset=g,b.startContainer||b.collapse(!1));b.collapsed=b.startContainer&&b.endContainer&&b.startContainer===b.endContainer&&b.startOffset==b.endOffset;return b}function b(a,e){var g=a.startContainer,
  57. b=a.endContainer,c=a.startOffset,l=a.endOffset,k=a.document,h=k.createDocumentFragment(),d,p;1==g.nodeType&&(g=g.childNodes[c]||(d=g.appendChild(k.createTextNode(""))));1==b.nodeType&&(b=b.childNodes[l]||(p=b.appendChild(k.createTextNode(""))));if(g===b&&3==g.nodeType)return h.appendChild(k.createTextNode(g.substringData(c,l-c))),e&&(g.deleteData(c,l-c),a.collapse(!0)),h;for(var A,N,r=h,s=f.findParents(g,!0),v=f.findParents(b,!0),z=0;s[z]==v[z];)z++;for(var H=z,D;D=s[H];H++){A=D.nextSibling;D==g?
  58. d||(3==a.startContainer.nodeType?(r.appendChild(k.createTextNode(g.nodeValue.slice(c))),e&&g.deleteData(c,g.nodeValue.length-c)):r.appendChild(e?g:g.cloneNode(!0))):(N=D.cloneNode(!1),r.appendChild(N));for(;A&&A!==b&&A!==v[H];)D=A.nextSibling,r.appendChild(e?A:A.cloneNode(!0)),A=D;r=N}r=h;s[z]||(r.appendChild(s[z-1].cloneNode(!1)),r=r.firstChild);for(H=z;c=v[H];H++){A=c.previousSibling;c==b?p||3!=a.endContainer.nodeType||(r.appendChild(k.createTextNode(b.substringData(0,l))),e&&b.deleteData(0,l)):
  59. (N=c.cloneNode(!1),r.appendChild(N));if(H!=z||!s[z])for(;A&&A!==g;)c=A.previousSibling,r.insertBefore(e?A:A.cloneNode(!0),r.firstChild),A=c;r=N}e&&a.setStartBefore(v[z]?s[z]?v[z]:s[z-1]:v[z-1]).collapse(!0);d&&f.remove(d);p&&f.remove(p);return h}function a(a,g){try{if(l&&f.inDoc(l,a))if(l.nodeValue.replace(P,"").length)l.nodeValue=l.nodeValue.replace(P,"");else{var e=l.parentNode;for(f.remove(l);e&&f.isEmptyInlineElement(e)&&(r.safari?!(f.getPosition(e,g)&f.POSITION_CONTAINS):!e.contains(g));)l=e.parentNode,
  60. f.remove(e),e=l}}catch(b){}}function e(a,e){var g;for(a=a[e];a&&f.isFillChar(a);)g=a[e],f.remove(a),a=g}var h=0,g=f.fillChar,l,k=L.Range=function(a){this.startContainer=this.startOffset=this.endContainer=this.endOffset=null;this.document=a;this.collapsed=!0};k.prototype={cloneContents:function(){return this.collapsed?null:b(this,0)},deleteContents:function(){var a;this.collapsed||b(this,1);r.webkit&&(a=this.startContainer,3!=a.nodeType||a.nodeValue.length||(this.setStartBefore(a).collapse(!0),f.remove(a)));
  61. return this},extractContents:function(){return this.collapsed?null:b(this,2)},setStart:function(a,e){return c(!0,a,e,this)},setEnd:function(a,e){return c(!1,a,e,this)},setStartAfter:function(a){return this.setStart(a.parentNode,f.getNodeIndex(a)+1)},setStartBefore:function(a){return this.setStart(a.parentNode,f.getNodeIndex(a))},setEndAfter:function(a){return this.setEnd(a.parentNode,f.getNodeIndex(a)+1)},setEndBefore:function(a){return this.setEnd(a.parentNode,f.getNodeIndex(a))},setStartAtFirst:function(a){return this.setStart(a,
  62. 0)},setStartAtLast:function(a){return this.setStart(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},setEndAtFirst:function(a){return this.setEnd(a,0)},setEndAtLast:function(a){return this.setEnd(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},selectNode:function(a){return this.setStartBefore(a).setEndAfter(a)},selectNodeContents:function(a){return this.setStart(a,0).setEndAtLast(a)},cloneRange:function(){return(new k(this.document)).setStart(this.startContainer,this.startOffset).setEnd(this.endContainer,
  63. this.endOffset)},collapse:function(a){a?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset);this.collapsed=!0;return this},shrinkBoundary:function(a){function e(a){return 1==a.nodeType&&!f.isBookmarkNode(a)&&!v.$empty[a.tagName]&&!v.$nonChild[a.tagName]}for(var g,b=this.collapsed;1==this.startContainer.nodeType&&(g=this.startContainer.childNodes[this.startOffset])&&e(g);)this.setStart(g,0);if(b)return this.collapse(!0);
  64. if(!a)for(;1==this.endContainer.nodeType&&0<this.endOffset&&(g=this.endContainer.childNodes[this.endOffset-1])&&e(g);)this.setEnd(g,g.childNodes.length);return this},getCommonAncestor:function(a,e){var g=this.startContainer,b=this.endContainer;return g===b?a&&d(this)&&(g=g.childNodes[this.startOffset],1==g.nodeType)?g:e&&3==g.nodeType?g.parentNode:g:f.getCommonAncestor(g,b)},trimBoundary:function(a){this.txtToElmBoundary();var g=this.startContainer,e=this.startOffset,b=this.collapsed,c=this.endContainer;
  65. if(3==g.nodeType){if(0==e)this.setStartBefore(g);else if(e>=g.nodeValue.length)this.setStartAfter(g);else{var l=f.split(g,e);g===c?this.setEnd(l,this.endOffset-e):g.parentNode===c&&(this.endOffset+=1);this.setStartBefore(l)}if(b)return this.collapse(!0)}a||(e=this.endOffset,c=this.endContainer,3==c.nodeType&&(0==e?this.setEndBefore(c):(e<c.nodeValue.length&&f.split(c,e),this.setEndAfter(c))));return this},txtToElmBoundary:function(a){function g(a,e){var b=a[e+"Container"],c=a[e+"Offset"];if(3==b.nodeType)if(!c)a["set"+
  66. e.replace(/(\w)/,function(a){return a.toUpperCase()})+"Before"](b);else if(c>=b.nodeValue.length)a["set"+e.replace(/(\w)/,function(a){return a.toUpperCase()})+"After"](b)}if(a||!this.collapsed)g(this,"start"),g(this,"end");return this},insertNode:function(a){var g=a,e=1;11==a.nodeType&&(g=a.firstChild,e=a.childNodes.length);this.trimBoundary(!0);var b=this.startContainer,c=b.childNodes[this.startOffset];c?b.insertBefore(a,c):b.appendChild(a);g.parentNode===this.endContainer&&(this.endOffset+=e);return this.setStartBefore(g)},
  67. setCursor:function(a,g){return this.collapse(!a).select(g)},createBookmark:function(a,g){var e,b=this.document.createElement("span");b.style.cssText="display:none;line-height:0px;";b.appendChild(this.document.createTextNode("\u200d"));b.id="_baidu_bookmark_start_"+(g?"":h++);this.collapsed||(e=b.cloneNode(!0),e.id="_baidu_bookmark_end_"+(g?"":h++));this.insertNode(b);e&&this.collapse().insertNode(e).setEndBefore(e);this.setStartAfter(b);return{start:a?b.id:b,end:e?a?e.id:e:null,id:a}},moveToBookmark:function(a){var e=
  68. a.id?this.document.getElementById(a.start):a.start;a=a.end&&a.id?this.document.getElementById(a.end):a.end;this.setStartBefore(e);f.remove(e);a?(this.setEndBefore(a),f.remove(a)):this.collapse(!0);return this},enlarge:function(a,e){var g=f.isBody,b,c,l=this.document.createTextNode("");if(a){c=this.startContainer;1==c.nodeType?c.childNodes[this.startOffset]?b=c=c.childNodes[this.startOffset]:(c.appendChild(l),b=c=l):b=c;for(;;){if(f.isBlockElm(c)){for(c=b;(b=c.previousSibling)&&!f.isBlockElm(b);)c=
  69. b;this.setStartBefore(c);break}b=c;c=c.parentNode}c=this.endContainer;1==c.nodeType?((b=c.childNodes[this.endOffset])?c.insertBefore(l,b):c.appendChild(l),b=c=l):b=c;for(;;){if(f.isBlockElm(c)){for(c=b;(b=c.nextSibling)&&!f.isBlockElm(b);)c=b;this.setEndAfter(c);break}b=c;c=c.parentNode}l.parentNode===this.endContainer&&this.endOffset--;f.remove(l)}if(!this.collapsed){for(;!(0!=this.startOffset||e&&e(this.startContainer)||g(this.startContainer));)this.setStartBefore(this.startContainer);for(;!(this.endOffset!=
  70. (1==this.endContainer.nodeType?this.endContainer.childNodes.length:this.endContainer.nodeValue.length)||e&&e(this.endContainer)||g(this.endContainer));)this.setEndAfter(this.endContainer)}return this},enlargeToBlockElm:function(a){for(;!f.isBlockElm(this.startContainer);)this.setStartBefore(this.startContainer);if(!a)for(;!f.isBlockElm(this.endContainer);)this.setEndAfter(this.endContainer);return this},adjustmentBoundary:function(){if(!this.collapsed){for(;!f.isBody(this.startContainer)&&this.startOffset==
  71. this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length&&this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length;)this.setStartAfter(this.startContainer);for(;!f.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[3==this.endContainer.nodeType?"nodeValue":"childNodes"].length;)this.setEndBefore(this.endContainer)}return this},applyInlineStyle:function(a,e,g){if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(a){return 1==
  72. a.nodeType&&f.isBlockElm(a)}).adjustmentBoundary();for(var b=this.createBookmark(),c=b.end,l=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase():!f.isWhitespace(a)},k=f.getNextDomNode(b.start,!1,l),h,d,p=this.cloneRange();k&&f.getPosition(k,c)&f.POSITION_PRECEDING;)if(3==k.nodeType||v[a][k.tagName]){p.setStartBefore(k);for(h=k;h&&(3==h.nodeType||v[a][h.tagName])&&h!==c;)d=h,h=f.getNextDomNode(h,1==h.nodeType,null,function(e){return v[a][e.tagName]});var k=p.setEndAfter(d).extractContents(),
  73. A;if(g&&0<g.length){var N;N=A=g[0].cloneNode(!1);for(var r=1,s;s=g[r++];)A.appendChild(s.cloneNode(!1)),A=A.firstChild}else A=p.document.createElement(a);e&&f.setAttributes(A,e);A.appendChild(k);p.insertNode(g?N:A);var T;"span"==a&&e.style&&/text\-decoration/.test(e.style)&&(T=f.findParentByTagName(A,"a",!0))?(f.setAttributes(T,e),f.remove(A,!0),A=T):(f.mergeSibling(A),f.clearEmptySibling(A));f.mergeChild(A,e);k=f.getNextDomNode(A,!1,l);f.mergeToParent(A);if(h===c)break}else k=f.getNextDomNode(k,
  74. !0,l);return this.moveToBookmark(b)},removeInlineStyle:function(a){if(this.collapsed)return this;a=p.isArray(a)?a:[a];this.shrinkBoundary().adjustmentBoundary();for(var e=this.startContainer,g=this.endContainer;;){if(1==e.nodeType){if(-1<p.indexOf(a,e.tagName.toLowerCase()))break;if("body"==e.tagName.toLowerCase()){e=null;break}}e=e.parentNode}for(;;){if(1==g.nodeType){if(-1<p.indexOf(a,g.tagName.toLowerCase()))break;if("body"==g.tagName.toLowerCase()){g=null;break}}g=g.parentNode}var b=this.createBookmark(),
  75. c,l;e&&(l=this.cloneRange().setEndBefore(b.start).setStartBefore(e),c=l.extractContents(),l.insertNode(c),f.clearEmptySibling(e,!0),e.parentNode.insertBefore(b.start,e));g&&(l=this.cloneRange().setStartAfter(b.end).setEndAfter(g),c=l.extractContents(),l.insertNode(c),f.clearEmptySibling(g,!1,!0),g.parentNode.insertBefore(b.end,g.nextSibling));for(e=f.getNextDomNode(b.start,!1,function(a){return 1==a.nodeType});e&&e!==b.end;)g=f.getNextDomNode(e,!0,function(a){return 1==a.nodeType}),-1<p.indexOf(a,
  76. e.tagName.toLowerCase())&&f.remove(e,!0),e=g;return this.moveToBookmark(b)},getClosedNode:function(){var a;if(!this.collapsed){var e=this.cloneRange().adjustmentBoundary().shrinkBoundary();d(e)&&(e=e.startContainer.childNodes[e.startOffset])&&1==e.nodeType&&(v.$empty[e.tagName]||v.$nonChild[e.tagName])&&(a=e)}return a},select:r.ie?function(b,c){var k;this.collapsed||this.shrinkBoundary();var h=this.getClosedNode();if(h&&!c){try{k=this.document.body.createControlRange(),k.addElement(h),k.select()}catch(d){}return this}var h=
  77. this.createBookmark(),y=h.start;k=this.document.body.createTextRange();k.moveToElementText(y);k.moveStart("character",1);if(!this.collapsed){var u=this.document.body.createTextRange(),y=h.end;u.moveToElementText(y);k.setEndPoint("EndToEnd",u)}else if(!b&&3!=this.startContainer.nodeType){var u=this.document.createTextNode(g),C=this.document.createElement("span");C.appendChild(this.document.createTextNode(g));y.parentNode.insertBefore(C,y);y.parentNode.insertBefore(u,y);a(this.document,u);l=u;e(C,"previousSibling");
  78. e(y,"nextSibling");k.moveStart("character",-1);k.collapse(!0)}this.moveToBookmark(h);C&&f.remove(C);try{k.select()}catch(E){}return this}:function(b){function c(a){function e(b,g,c){3==b.nodeType&&b.nodeValue.length<g&&(a[c+"Offset"]=b.nodeValue.length)}e(a.startContainer,a.startOffset,"start");e(a.endContainer,a.endOffset,"end")}var k=f.getWindow(this.document),h=k.getSelection();r.gecko?this.document.body.focus():k.focus();if(h){h.removeAllRanges();this.collapsed&&!b&&(b=k=this.startContainer,1==
  79. k.nodeType&&(b=k.childNodes[this.startOffset]),3==k.nodeType&&this.startOffset||(b?b.previousSibling&&3==b.previousSibling.nodeType:k.lastChild&&3==k.lastChild.nodeType)||(b=this.document.createTextNode(g),this.insertNode(b),a(this.document,b),e(b,"previousSibling"),e(b,"nextSibling"),l=b,this.setStart(b,r.webkit?1:0).collapse(!0)));k=this.document.createRange();if(this.collapsed&&r.opera&&1==this.startContainer.nodeType)if(b=this.startContainer.childNodes[this.startOffset]){for(;b&&f.isBlockElm(b);)if(1==
  80. b.nodeType&&b.childNodes[0])b=b.childNodes[0];else break;b&&this.setStartBefore(b).collapse(!0)}else(b=this.startContainer.lastChild)&&f.isBr(b)&&this.setStartBefore(b).collapse(!0);c(this);k.setStart(this.startContainer,this.startOffset);k.setEnd(this.endContainer,this.endOffset);h.addRange(k)}return this},scrollToView:function(a,e){a=a?window:f.getWindow(this.document);var b=this.document.createElement("span");b.innerHTML="&nbsp;";this.cloneRange().insertNode(b);f.scrollToView(b,a,e);f.remove(b);
  81. return this},inFillChar:function(){var a=this.startContainer;return this.collapsed&&3==a.nodeType&&a.nodeValue.replace(RegExp("^"+f.fillChar),"").length+1==a.nodeValue.length?!0:!1},createAddress:function(a,e){function b(a){for(var g=a?c.startContainer:c.endContainer,l=f.findParents(g,!0,function(a){return!f.isBody(a)}),k=[],h=0,d;d=l[h++];)k.push(f.getNodeIndex(d,e));l=0;if(e)if(3==g.nodeType){for(g=g.previousSibling;g&&3==g.nodeType;)l+=g.nodeValue.replace(P,"").length,g=g.previousSibling;l+=a?
  82. c.startOffset:c.endOffset}else if(g=g.childNodes[a?c.startOffset:c.endOffset])l=f.getNodeIndex(g,e);else for(g=a?c.startContainer:c.endContainer,a=g.firstChild;a;)if(f.isFillChar(a))a=a.nextSibling;else if(l++,3==a.nodeType)for(;a&&3==a.nodeType;)a=a.nextSibling;else a=a.nextSibling;else l=a?f.isFillChar(g)?0:c.startOffset:c.endOffset;0>l&&(l=0);k.push(l);return k}var g={},c=this;g.startAddress=b(!0);a||(g.endAddress=c.collapsed?[].concat(g.startAddress):b());return g},moveToAddress:function(a,e){function g(a,
  83. e){for(var c=b.document.body,l,k,h=0,d,f=a.length;h<f;h++)if(d=a[h],l=c,c=c.childNodes[d],!c){k=d;break}e?c?b.setStartBefore(c):b.setStart(l,k):c?b.setEndBefore(c):b.setEnd(l,k)}var b=this;g(a.startAddress,!0);!e&&a.endAddress&&g(a.endAddress);return b},equals:function(a){for(var e in this)if(this.hasOwnProperty(e)&&this[e]!==a[e])return!1;return!0},traversal:function(a,e){if(this.collapsed)return this;for(var b=this.createBookmark(),g=b.end,c=f.getNextDomNode(b.start,!1,e);c&&c!==g&&f.getPosition(c,
  84. g)&f.POSITION_PRECEDING;){var l=f.getNextDomNode(c,!1,e);a(c);c=l}return this.moveToBookmark(b)}}})();(function(){function d(a,e){var b=f.getNodeIndex;a=a.duplicate();a.collapse(e);var g=a.parentElement();if(!g.hasChildNodes())return{container:g,offset:0};for(var c=g.children,k,d=a.duplicate(),n=0,q=c.length-1,t=-1;n<=q;){t=Math.floor((n+q)/2);k=c[t];d.moveToElementText(k);var w=d.compareEndPoints("StartToStart",a);if(0<w)q=t-1;else if(0>w)n=t+1;else return{container:g,offset:b(k)}}if(-1==t){d.moveToElementText(g);
  85. d.setEndPoint("StartToStart",a);d=d.text.replace(/(\r\n|\r)/g,"\n").length;c=g.childNodes;if(!d)return k=c[c.length-1],{container:k,offset:k.nodeValue.length};for(b=c.length;0<d;)d-=c[--b].nodeValue.length;return{container:c[b],offset:-d}}d.collapse(0<w);d.setEndPoint(0<w?"StartToStart":"EndToStart",a);d=d.text.replace(/(\r\n|\r)/g,"\n").length;if(!d)return v.$empty[k.tagName]||v.$nonChild[k.tagName]?{container:g,offset:b(k)+(0<w?0:1)}:{container:k,offset:0<w?0:k.childNodes.length};for(;0<d;)try{c=
  86. k,k=k[0<w?"previousSibling":"nextSibling"],d-=k.nodeValue.length}catch(y){return{container:g,offset:b(c)}}return{container:k,offset:0<w?-d:k.nodeValue.length+d}}function c(a,e){if(a.item)e.selectNode(a.item(0));else{var b=d(a,!0);e.setStart(b.container,b.offset);0!=a.compareEndPoints("StartToEnd",a)&&(b=d(a,!1),e.setEnd(b.container,b.offset))}return e}function b(a){var b;try{b=a.getNative().createRange()}catch(c){return null}var g=b.item?b.item(0):b.parentElement();return(g.ownerDocument||g)===a.document?
  87. b:null}(L.Selection=function(a){var e=this;e.document=a;r.ie9below&&(a=f.getWindow(a).frameElement,f.on(a,"beforedeactivate",function(){e._bakIERange=e.getIERange()}),f.on(a,"activate",function(){try{!b(e)&&e._bakIERange&&e._bakIERange.select()}catch(a){}e._bakIERange=null}));a=a=null}).prototype={rangeInBody:function(a,b){var c=r.ie9below||b?a.item?a.item():a.parentElement():a.startContainer;return c===this.document.body||f.inDoc(c,this.document)},getNative:function(){var a=this.document;try{return a?
  88. r.ie9below?a.selection:f.getWindow(a).getSelection():null}catch(b){return null}},getIERange:function(){var a=b(this);return!a&&this._bakIERange?this._bakIERange:a},cache:function(){this.clear();this._cachedRange=this.getRange();this._cachedStartElement=this.getStart();this._cachedStartElementPath=this.getStartElementPath()},getStartElementPath:function(){if(this._cachedStartElementPath)return this._cachedStartElementPath;var a=this.getStart();return a?f.findParents(a,!0,null,!0):[]},clear:function(){this._cachedStartElementPath=
  89. this._cachedRange=this._cachedStartElement=null},isFocus:function(){try{if(r.ie9below){var a=b(this);return!(!a||!this.rangeInBody(a))}return!!this.getNative().rangeCount}catch(e){return!1}},getRange:function(){function a(a){for(var g=b.document.body.firstChild,c=a.collapsed;g&&g.firstChild;)a.setStart(g,0),g=g.firstChild;a.startContainer||a.setStart(b.document.body,0);c&&a.collapse(!0)}var b=this;if(null!=b._cachedRange)return this._cachedRange;var h=new s.editor.dom.Range(b.document);if(r.ie9below){var g=
  90. b.getIERange();if(g)try{c(g,h)}catch(l){a(h)}else a(h)}else{var k=b.getNative();if(k&&k.rangeCount)g=k.getRangeAt(0),k=k.getRangeAt(k.rangeCount-1),h.setStart(g.startContainer,g.startOffset).setEnd(k.endContainer,k.endOffset),h.collapsed&&f.isBody(h.startContainer)&&!h.startOffset&&a(h);else{if(this._bakRange&&f.inDoc(this._bakRange.startContainer,this.document))return this._bakRange;a(h)}}return this._bakRange=h},getStart:function(){if(this._cachedStartElement)return this._cachedStartElement;var a=
  91. r.ie9below?this.getIERange():this.getRange(),b,c;if(r.ie9below){if(!a)return this.document.body.firstChild;if(a.item)return a.item(0);b=a.duplicate();0<b.text.length&&b.moveStart("character",1);b.collapse(1);b=b.parentElement();for(c=a=a.parentElement();a=a.parentNode;)if(a==b){b=c;break}}else if(a.shrinkBoundary(),b=a.startContainer,1==b.nodeType&&b.hasChildNodes()&&(b=b.childNodes[Math.min(b.childNodes.length-1,a.startOffset)]),3==b.nodeType)return b.parentNode;return b},getText:function(){var a;
  92. return this.isFocus()&&(a=this.getNative())?(a=r.ie9below?a.createRange():a.getRangeAt(0),r.ie9below?a.text:a.toString()):""},clearRange:function(){this.getNative()[r.ie9below?"empty":"removeAllRanges"]()}}})();(function(){function d(a,b){var c;if(b.textarea)if(p.isString(b.textarea))for(var e=0,h,d=f.getElementsByTagName(a,"textarea");h=d[e++];){if(h.id=="ueditor_textarea_"+b.options.textarea){c=h;break}}else c=b.textarea;c||(a.appendChild(c=f.createElement(document,"textarea",{name:b.options.textarea,
  93. id:"ueditor_textarea_"+b.options.textarea,style:"display:none"})),b.textarea=c);!c.getAttribute("name")&&c.setAttribute("name",b.options.textarea);c.value=b.hasContents()?b.options.allHtmlEnabled?b.getAllHtml():b.getContent(null,null,!0):""}function c(a){for(var b in a)return b}function b(a){a.langIsReady=!0;a.fireEvent("langReady")}var a=0,e,h=UE.Editor=function(g){var e=this;e.uid=a++;Z.call(e);e.commands={};e.options=p.extend(p.clone(g||{}),UEDITOR_CONFIG,!0);e.shortcutkeys={};e.inputRules=[];
  94. e.outputRules=[];e.setOpt(h.defaultOptions(e));e.loadServerConfig();p.isEmptyObject(UE.I18N)?p.loadFile(document,{src:e.options.langPath+e.options.lang+"/"+e.options.lang+".js",tag:"script",type:"text/javascript",defer:"defer"},function(){UE.plugin.load(e);b(e)}):(e.options.lang=c(UE.I18N),UE.plugin.load(e),b(e));UE.instants["ueditorInstant"+e.uid]=e};h.prototype={registerCommand:function(a,b){this.commands[a]=b},ready:function(a){a&&(this.isReady?a.apply(this):this.addListener("ready",a))},setOpt:function(a,
  95. b){var e={};p.isString(a)?e[a]=b:e=a;p.extend(this.options,e,!0)},getOpt:function(a){return this.options[a]},destroy:function(){this.fireEvent("destroy");var a=this.container.parentNode,b=this.textarea;b?b.style.display="":(b=document.createElement("textarea"),a.parentNode.insertBefore(b,a));b.style.width=this.iframe.offsetWidth+"px";b.style.height=this.iframe.offsetHeight+"px";b.value=this.getContent();b.id=this.key;a.innerHTML="";f.remove(a);var a=this.key,e;for(e in this)this.hasOwnProperty(e)&&
  96. delete this[e];UE.delEditor(a)},render:function(a){var b=this.options;p.isString(a)&&(a=document.getElementById(a));if(a){b.minFrameWidth=b.initialFrameWidth?b.initialFrameWidth:b.initialFrameWidth=a.offsetWidth;b.initialFrameHeight?b.minFrameHeight=b.initialFrameHeight:b.initialFrameHeight=b.minFrameHeight=a.offsetHeight;a.style.width=/%$/.test(b.initialFrameWidth)?"100%":b.initialFrameWidth-parseInt(f.getComputedStyle(a,"padding-left"))-parseInt(f.getComputedStyle(a,"padding-right"))+"px";a.style.height=
  97. /%$/.test(b.initialFrameHeight)?"100%":b.initialFrameHeight-parseInt(f.getComputedStyle(a,"padding-top"))-parseInt(f.getComputedStyle(a,"padding-bottom"))+"px";a.style.zIndex=b.zIndex;var e=(I&&9>r.version?"":"<!DOCTYPE html>")+"<html xmlns='http://www.w3.org/1999/xhtml' class='view' ><head><style type='text/css'>.view{padding:0;word-wrap:break-word;cursor:text;height:90%;}\nbody{margin:8px;font-family:sans-serif;font-size:16px;}p{margin:5px 0;}</style>"+(b.iframeCssUrl?"<link rel='stylesheet' type='text/css' href='"+
  98. p.unhtml(b.iframeCssUrl)+"'/>":"")+(b.initialStyle?"<style>"+b.initialStyle+"</style>":"")+"</head><body class='view' ></body><script type='text/javascript' "+(I?"defer='defer'":"")+" id='_initialScript'>setTimeout(function(){editor = window.parent.UE.instants['ueditorInstant"+this.uid+"'];editor._setup(document);},0);var _tmpScript = document.getElementById('_initialScript');_tmpScript.parentNode.removeChild(_tmpScript);\x3c/script></html>";a.appendChild(f.createElement(document,"iframe",{id:"ueditor_"+
  99. this.uid,width:"100%",height:"100%",frameborder:"0",src:"javascript:void(function(){document.open();"+(b.customDomain&&document.domain!=location.hostname?'document.domain="'+document.domain+'";':"")+'document.write("'+e+'");document.close();}())'}));a.style.overflow="hidden";setTimeout(function(){/%$/.test(b.initialFrameWidth)&&(b.minFrameWidth=b.initialFrameWidth=a.offsetWidth);/%$/.test(b.initialFrameHeight)&&(b.minFrameHeight=b.initialFrameHeight=a.offsetHeight,a.style.height=b.initialFrameHeight+
  100. "px")})}},_setup:function(a){var b=this,e=b.options;I?(a.body.disabled=!0,a.body.contentEditable=!0,a.body.disabled=!1):a.body.contentEditable=!0;a.body.spellcheck=!1;b.document=a;b.window=a.defaultView||a.parentWindow;b.iframe=b.window.frameElement;b.body=a.body;b.selection=new L.Selection(a);var c;r.gecko&&(c=this.selection.getNative())&&c.removeAllRanges();this._initEvents();for(var h=this.iframe.parentNode;!f.isBody(h);h=h.parentNode)if("FORM"==h.tagName){b.form=h;if(b.options.autoSyncData)f.on(b.window,
  101. "blur",function(){d(h,b)});else f.on(h,"submit",function(){d(this,b)});break}if(e.initialContent)if(e.autoClearinitialContent){var q=b.execCommand;b.execCommand=function(){b.fireEvent("firstBeforeExecCommand");return q.apply(b,arguments)};this._setDefaultContent(e.initialContent)}else this.setContent(e.initialContent,!1,!0);f.isEmptyNode(b.body)&&(b.body.innerHTML="<p>"+(r.ie?"":"<br/>")+"</p>");e.focus&&setTimeout(function(){b.focus(b.options.focusInEnd);!b.options.autoClearinitialContent&&b._selectionChange()},
  102. 0);b.container||(b.container=this.iframe.parentNode);e.fullscreen&&b.ui&&b.ui.setFullScreen(!0);try{b.document.execCommand("2D-position",!1,!1)}catch(t){}try{b.document.execCommand("enableInlineTableEditing",!1,!1)}catch(w){}try{b.document.execCommand("enableObjectResizing",!1,!1)}catch(y){}b._bindshortcutKeys();b.isReady=1;b.fireEvent("ready");e.onready&&e.onready.call(b);if(!r.ie9below)f.on(b.window,["blur","focus"],function(a){if("blur"==a.type){b._bakRange=b.selection.getRange();try{b._bakNativeRange=
  103. b.selection.getNative().getRangeAt(0),b.selection.getNative().removeAllRanges()}catch(e){b._bakNativeRange=null}}else try{b._bakRange&&b._bakRange.select()}catch(c){}});r.gecko&&10902>=r.version&&(b.body.contentEditable=!1,setTimeout(function(){b.body.contentEditable=!0},100),setInterval(function(){b.body.style.height=b.iframe.offsetHeight-20+"px"},100));!e.isShow&&b.setHide();e.readonly&&b.setDisabled()},sync:function(a){(a=a?document.getElementById(a):f.findParent(this.iframe.parentNode,function(a){return"FORM"==
  104. a.tagName},!0))&&d(a,this)},setHeight:function(a,b){a!==parseInt(this.iframe.parentNode.style.height)&&(this.iframe.parentNode.style.height=a+"px");!b&&(this.options.minFrameHeight=this.options.initialFrameHeight=a);this.body.style.height=a+"px";!b&&this.trigger("setHeight")},addshortcutkey:function(a,b){var e={};b?e[a]=b:e=a;p.extend(this.shortcutkeys,e)},_bindshortcutKeys:function(){var a=this,b=this.shortcutkeys;a.addListener("keydown",function(e,c){var h=c.keyCode||c.which,d;for(d in b)for(var t=
  105. b[d].split(","),w=0,y;y=t[w++];){y=y.split(":");var u=y[0];y=y[1];if(/^(ctrl)(\+shift)?\+(\d+)$/.test(u.toLowerCase())||/^(\d+)$/.test(u))if("ctrl"==RegExp.$1&&(c.ctrlKey||c.metaKey)&&(""!=RegExp.$2?c[RegExp.$2.slice(1)+"Key"]:1)&&h==RegExp.$3||h==RegExp.$1)-1!=a.queryCommandState(d,y)&&a.execCommand(d,y),f.preventDefault(c)}})},getContent:function(a,b,e,c,h){a&&p.isFunction(a)&&(b=a,a="");if(b?!b():!this.hasContents())return"";this.fireEvent("beforegetcontent");b=UE.htmlparser(this.body.innerHTML,
  106. c);this.filterOutputRule(b);this.fireEvent("aftergetcontent",a,b);return b.toHtml(h)},getAllHtml:function(){var a=[];this.fireEvent("getAllHtml",a);if(r.ie&&8<r.version){var b="";p.each(this.document.styleSheets,function(a){b+=a.href?'<link rel="stylesheet" type="text/css" href="'+a.href+'" />':"<style>"+a.cssText+"</style>"});p.each(this.document.getElementsByTagName("script"),function(a){b+=a.outerHTML})}return"<html><head>"+(this.options.charset?'<meta http-equiv="Content-Type" content="text/html; charset='+
  107. this.options.charset+'"/>':"")+(b||this.document.getElementsByTagName("head")[0].innerHTML)+a.join("\n")+"</head><body "+(I&&9>r.version?'class="view"':"")+">"+this.getContent(null,null,!0)+"</body></html>"},getPlainTxt:function(){var a=RegExp(f.fillChar,"g"),b=this.body.innerHTML.replace(/[\n\r]/g,""),b=b.replace(/<(p|div)[^>]*>(<br\/?>|&nbsp;)<\/\1>/gi,"\n").replace(/<br\/?>/gi,"\n").replace(/<[^>/]+>/g,"").replace(/(\n)?<\/([^>]+)>/g,function(a,b,e){return v.$block[e]?"\n":b?b:""});return b.replace(a,
  108. "").replace(/\u00a0/g," ").replace(/&nbsp;/g," ")},getContentTxt:function(){return this.body[r.ie?"innerText":"textContent"].replace(RegExp(f.fillChar,"g"),"").replace(/\u00a0/g," ")},setContent:function(a,b,e){this.fireEvent("beforesetcontent",a);a=UE.htmlparser(a);this.filterInputRule(a);a=a.toHtml();this.body.innerHTML=(b?this.body.innerHTML:"")+a;if("p"==this.options.enterTag)if(b=this.body.firstChild,!b||1==b.nodeType&&(v.$cdata[b.tagName]||"DIV"==b.tagName&&b.getAttribute("cdata_tag")||f.isCustomeNode(b))&&
  109. b===this.body.lastChild)this.body.innerHTML="<p>"+(r.ie?"&nbsp;":"<br/>")+"</p>"+this.body.innerHTML;else for(var c=this.document.createElement("p");b;){for(;b&&(3==b.nodeType||1==b.nodeType&&v.p[b.tagName]&&!v.$cdata[b.tagName]);)a=b.nextSibling,c.appendChild(b),b=a;if(c.firstChild)if(b)b.parentNode.insertBefore(c,b),c=this.document.createElement("p");else{this.body.appendChild(c);break}b=b.nextSibling}this.fireEvent("aftersetcontent");this.fireEvent("contentchange");!e&&this._selectionChange();
  110. this._bakRange=this._bakIERange=this._bakNativeRange=null;var h;r.gecko&&(h=this.selection.getNative())&&h.removeAllRanges();this.options.autoSyncData&&this.form&&d(this.form,this)},focus:function(a){try{var b=this.selection.getRange();if(a){var e=this.body.lastChild;e&&1==e.nodeType&&!v.$empty[e.tagName]&&(f.isEmptyBlock(e)?b.setStartAtFirst(e):b.setStartAtLast(e),b.collapse(!0));b.setCursor(!0)}else!b.collapsed&&f.isBody(b.startContainer)&&0==b.startOffset&&(e=this.body.firstChild)&&1==e.nodeType&&
  111. !v.$empty[e.tagName]&&b.setStartAtFirst(e).collapse(!0),b.select(!0);this.fireEvent("focus selectionchange")}catch(c){}},isFocus:function(){return this.selection.isFocus()},blur:function(){var a=this.selection.getNative();if(a.empty&&r.ie){var b=document.body.createTextRange();b.moveToElementText(document.body);b.collapse(!0);b.select();a.empty()}else a.removeAllRanges()},_initEvents:function(){var a=this,b=a.document,e=a.window;a._proxyDomEvent=p.bind(a._proxyDomEvent,a);f.on(b,"click contextmenu mousedown keydown keyup keypress mouseup mouseover mouseout selectstart".split(" "),
  112. a._proxyDomEvent);f.on(e,["focus","blur"],a._proxyDomEvent);f.on(a.body,"drop",function(b){r.gecko&&b.stopPropagation&&b.stopPropagation();a.fireEvent("contentchange")});f.on(b,["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!1===this.fireEvent("before"+a.type.replace(/^on/,"").toLowerCase())||!1===this.fireEvent(a.type.replace(/^on/,""),a)?!1:this.fireEvent("after"+a.type.replace(/^on/,
  113. "").toLowerCase())},_selectionChange:function(a,b){var c=this,h=!1,d,f;r.ie&&9>r.version&&b&&"mouseup"==b.type&&!this.selection.getRange().collapsed&&(h=!0,d=b.clientX,f=b.clientY);clearTimeout(e);e=setTimeout(function(){if(c.selection&&c.selection.getNative()){var a;if(h&&"None"==c.selection.getNative().type){a=c.document.body.createTextRange();try{a.moveToPoint(d,f)}catch(e){a=null}}var g;a&&(g=c.selection.getIERange,c.selection.getIERange=function(){return a});c.selection.cache();g&&(c.selection.getIERange=
  114. g);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){var e=b[0].toLowerCase(),c;c=(e=this.commands[e]||UE.commands[e])&&e[a];if(!(e&&c||"queryCommandState"!=a))return 0;if(c)return c.apply(this,b)},execCommand:function(a){a=a.toLowerCase();var b,e=this.commands[a]||UE.commands[a];if(!e||!e.execCommand)return null;e.notNeedUndo||
  115. this.__hasEnterExecCommand?(b=this._callCmdFn("execCommand",arguments),this.__hasEnterExecCommand||e.ignoreContentChange||this._ignoreContentChange||this.fireEvent("contentchange")):(this.__hasEnterExecCommand=!0,-1!=this.queryCommandState.apply(this,arguments)&&(this.fireEvent("saveScene"),this.fireEvent.apply(this,["beforeexeccommand",a].concat(arguments)),b=this._callCmdFn("execCommand",arguments),this.fireEvent.apply(this,["afterexeccommand",a].concat(arguments)),this.fireEvent("saveScene")),
  116. this.__hasEnterExecCommand=!1);this.__hasEnterExecCommand||e.ignoreContentChange||this._ignoreContentChange||this._selectionChange();return b},queryCommandState:function(a){return this._callCmdFn("queryCommandState",arguments)},queryCommandValue:function(a){return this._callCmdFn("queryCommandValue",arguments)},hasContents:function(a){if(a)for(var b=0,e;e=a[b++];)if(0<this.document.getElementsByTagName(e).length)return!0;if(!f.isEmptyBlock(this.body))return!0;a=["div"];for(b=0;e=a[b++];){e=f.getElementsByTagName(this.document,
  117. e);for(var c=0,h;h=e[c++];)if(f.isCustomeNode(h))return!0}return!1},reset:function(){this.fireEvent("reset")},setEnabled:function(){var a;if("false"==this.body.contentEditable){this.body.contentEditable=!0;a=this.selection.getRange();try{a.moveToBookmark(this.lastBk),delete this.lastBk}catch(b){a.setStartAtFirst(this.body).collapse(!0)}a.select(!0);this.bkqueryCommandState&&(this.queryCommandState=this.bkqueryCommandState,delete this.bkqueryCommandState);this.bkqueryCommandValue&&(this.queryCommandValue=
  118. this.bkqueryCommandValue,delete this.bkqueryCommandValue);this.fireEvent("selectionchange")}},enable:function(){return this.setEnabled()},setDisabled:function(a){var b=this;a=a?p.isArray(a)?a:[a]:[];"true"==b.body.contentEditable&&(b.lastBk||(b.lastBk=b.selection.getRange().createBookmark(!0)),b.body.contentEditable=!1,b.bkqueryCommandState=b.queryCommandState,b.bkqueryCommandValue=b.queryCommandValue,b.queryCommandState=function(e){return-1!=p.indexOf(a,e)?b.bkqueryCommandState.apply(b,arguments):
  119. -1},b.queryCommandValue=function(e){return-1!=p.indexOf(a,e)?b.bkqueryCommandValue.apply(b,arguments):null},b.fireEvent("selectionchange"))},disable:function(a){return this.setDisabled(a)},_setDefaultContent:function(){function a(){var b=this;b.document.getElementById("initContent")&&(b.body.innerHTML="<p>"+(I?"":"<br/>")+"</p>",b.removeListener("firstBeforeExecCommand focus",a),setTimeout(function(){b.focus();b._selectionChange()},0))}return function(b){this.body.innerHTML='<p id="initContent">'+
  120. b+"</p>";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(b){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"},
  121. hide:function(){return this.setHide()},getLang:function(a){var b=UE.I18N[this.options.lang];if(!b)throw Error("not import language file");a=(a||"").split(".");for(var e=0,c;(c=a[e++])&&(b=b[c],b););return b},getContentLength:function(a,b){var e=this.getContent(!1,!1,!0).length;if(a){b=(b||[]).concat(["hr","img","iframe"]);for(var e=this.getContentTxt().replace(/[\t\r\n]+/g,"").length,c=0,h;h=b[c++];)e+=this.document.getElementsByTagName(h).length}return e},addInputRule:function(a){this.inputRules.push(a)},
  122. filterInputRule:function(a){for(var b=0,e;e=this.inputRules[b++];)e.call(this,a)},addOutputRule:function(a){this.outputRules.push(a)},filterOutputRule:function(a){for(var b=0,e;e=this.outputRules[b++];)e.call(this,a)},getActionUrl:function(a){a=this.getOpt(a)||a;var b=this.getOpt("imageUrl"),e=this.getOpt("serverUrl");!e&&b&&(e=b.replace(/^(.*[\/]).+([\.].+)$/,"$1controller$2"));return e?(e=e+(-1==e.indexOf("?")?"?":"&")+"action="+(a||""),p.formatUrl(e)):""}};p.inherits(h,Z)})();UE.Editor.defaultOptions=
  123. function(d){d=d.options.UEDITOR_HOME_URL;return{isShow:!0,initialContent:"",initialStyle:"",autoClearinitialContent:!1,iframeCssUrl:d+"themes/iframe.css",textarea:"editorValue",focus:!1,focusInEnd:!0,autoClearEmptyNode:!0,fullscreen:!1,readonly:!1,zIndex:999,imagePopup:!0,enterTag:"p",customDomain:!1,lang:"zh-cn",langPath:d+"lang/",theme:"default",themePath:d+"themes/",allHtmlEnabled:!1,scaleEnabled:!1,tableNativeEditInFF:!1,autoSyncData:!0,fileNameFormat:"{time}{rand:6}"}};(function(){UE.Editor.prototype.loadServerConfig=
  124. function(){function d(b){console&&console.error(b)}var c=this;setTimeout(function(){try{c.options.imageUrl&&c.setOpt("serverUrl",c.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/,"$1controller$2"));var b=c.getActionUrl("config"),a=p.isCrossDomainUrl(b);c._serverConfigLoaded=!1;b&&UE.ajax.request(b,{method:"GET",dataType:a?"jsonp":"",onsuccess:function(b){try{var e=a?b:eval("("+b.responseText+")");p.extend(c.options,e);c.fireEvent("serverConfigLoaded");c._serverConfigLoaded=!0}catch(l){d(c.getLang("loadconfigFormatError"))}},
  125. onerror:function(){d(c.getLang("loadconfigHttpError"))}})}catch(e){d(c.getLang("loadconfigError"))}})};UE.Editor.prototype.isServerConfigLoaded=function(){return this._serverConfigLoaded||!1};UE.Editor.prototype.afterConfigReady=function(d){if(d&&p.isFunction(d)){var c=this,b=function(){d.apply(c,arguments);c.removeListener("serverConfigLoaded",b)};c.isServerConfigLoaded()?d.call(c,"serverConfigLoaded"):c.addListener("serverConfigLoaded",b)}}})();UE.ajax=function(){function d(a){var b=[],e;for(e in a)if("method"!=
  126. e&&"timeout"!=e&&"async"!=e&&"dataType"!=e&&"callback"!=e&&void 0!=a[e]&&null!=a[e])if("function"!=(typeof a[e]).toLowerCase()&&"object"!=(typeof a[e]).toLowerCase())b.push(encodeURIComponent(e)+"="+encodeURIComponent(a[e]));else if(p.isArray(a[e]))for(var c=0;c<a[e].length;c++)b.push(encodeURIComponent(e)+"[]="+encodeURIComponent(a[e][c]));return b.join("&")}function c(a,b){var e=g(),c=!1,h={method:"POST",timeout:5E3,async:!0,data:{},onsuccess:function(){},onerror:function(){}};"object"===typeof a&&
  127. (b=a,a=b.url);if(e&&a){var f=b?p.extend(h,b):h,h=d(f);p.isEmptyObject(f.data)||(h+=(h?"&":"")+d(f.data));var w=setTimeout(function(){4!=e.readyState&&(c=!0,e.abort(),clearTimeout(w))},f.timeout),y=f.method.toUpperCase(),u=a+(-1==a.indexOf("?")?"?":"&")+("POST"==y?"":h+"&noCache="+ +new Date);e.open(y,u,f.async);e.onreadystatechange=function(){if(4==e.readyState)if(c||200!=e.status)f.onerror(e);else f.onsuccess(e)};"POST"==y?(e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send(h)):
  128. e.send(null)}}function b(a,b){function e(a){return function(){try{if(a)h.onerror&&h.onerror();else try{clearTimeout(E),c.apply(window,arguments)}catch(b){}}catch(e){h.onerror&&h.onerror.call(window,e)}finally{h.oncomplete&&h.oncomplete.apply(window,arguments);g.parentNode&&g.parentNode.removeChild(g);window[u]=null;try{delete window[u]}catch(k){}}}}var c=b.onsuccess||function(){},g=document.createElement("SCRIPT"),h=b||{},f=h.charset,y=h.jsonp||"callback",u,C=h.timeOut||0,E,G=RegExp("(\\?|&)"+y+"=([^&]*)"),
  129. A;if(p.isFunction(c))u="bd__editor__"+Math.floor(2147483648*Math.random()).toString(36),window[u]=e(0);else if(p.isString(c))u=c;else if(A=G.exec(a))u=A[2];a=a.replace(G,"$1"+y+"="+u);0>a.search(G)&&(a+=(0>a.indexOf("?")?"?":"&")+y+"="+u);y=d(b);p.isEmptyObject(b.data)||(y+=(y?"&":"")+d(b.data));y&&(a=a.replace(/\?/,"?"+y+"&"));g.onerror=e(1);C&&(E=setTimeout(e(1),C));(function(a,b,e){a.setAttribute("type","text/javascript");a.setAttribute("defer","defer");e&&a.setAttribute("charset",e);a.setAttribute("src",
  130. b);document.getElementsByTagName("head")[0].appendChild(a)})(g,a,f)}var a="XMLHttpRequest()";try{new ActiveXObject("Msxml2.XMLHTTP"),a="ActiveXObject('Msxml2.XMLHTTP')"}catch(e){try{new ActiveXObject("Microsoft.XMLHTTP"),a="ActiveXObject('Microsoft.XMLHTTP')"}catch(h){}}var g=new Function("return new "+a);return{request:function(a,e){e&&"jsonp"==e.dataType?b(a,e):c(a,e)},getJSONP:function(a,e,c){b(a,{data:e,oncomplete:c})}}}();UE.filterWord=function(){function d(b){return b=b.replace(/[\d.]+\w+/g,
  131. function(a){return p.transUnitToPx(a)})}function c(b){return b.replace(/[\t\r\n]+/g," ").replace(/\x3c!--[\s\S]*?--\x3e/ig,"").replace(/<v:shape [^>]*>[\s\S]*?.<\/v:shape>/gi,function(a){if(r.opera)return"";try{if(/Bitmap/i.test(a))return"";var b=a.match(/width:([ \d.]*p[tx])/i)[1],c=a.match(/height:([ \d.]*p[tx])/i)[1],g=a.match(/src=\s*"([^"]*)"/i)[1];return'<img width="'+d(b)+'" height="'+d(c)+'" src="'+g+'" />'}catch(l){return""}}).replace(/<\/?div[^>]*>/g,"").replace(/v:\w+=(["']?)[^'"]+\1/g,
  132. "").replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|xml|meta|link|style|\w+:\w+)(?=[\s\/>]))[^>]*>/gi,"").replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>").replace(/\s+(class|lang|align)\s*=\s*(['"]?)([\w-]+)\2/ig,function(a,b,c,g){return"class"==b&&"MsoListParagraph"==g?a:""}).replace(/<(font|span)[^>]*>(\s*)<\/\1>/gi,function(a,b,c){return c.replace(/[\t\r\n ]+/g," ")}).replace(/(<[a-z][^>]*)\sstyle=(["'])([^\2]*?)\2/gi,function(a,b,c,g){a=[];
  133. g=g.replace(/^\s+|\s+$/,"").replace(/&#39;/g,"'").replace(/&quot;/gi,"'").replace(/[\d.]+(cm|pt)/g,function(a){return p.transUnitToPx(a)}).split(/;\s*/g);c=0;for(var l;l=g[c];c++){var k,f=l.split(":");if(2==f.length&&(l=f[0].toLowerCase(),k=f[1].toLowerCase(),!(/^(background)\w*/.test(l)&&0==k.replace(/(initial|\s)/g,"").length||/^(margin)\w*/.test(l)&&/^0\w+$/.test(k)))){switch(l){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":/<table/.test(b)||
  134. (a[c]=l.replace(/^mso-|-alt$/g,"")+":"+d(k));continue;case "horiz-align":a[c]="text-align:"+k;continue;case "vert-align":a[c]="vertical-align:"+k;continue;case "font-color":case "mso-foreground":a[c]="color:"+k;continue;case "mso-background":case "mso-highlight":a[c]="background:"+k;continue;case "mso-default-height":a[c]="min-height:"+d(k);continue;case "mso-default-width":a[c]="min-width:"+d(k);continue;case "mso-padding-between-alt":a[c]="border-collapse:separate;border-spacing:"+d(k);continue;
  135. case "text-line-through":if("single"==k||"double"==k)a[c]="text-decoration:line-through";continue;case "mso-zero-height":"yes"==k&&(a[c]="display:none");continue;case "margin":if(!/[1-9]/.test(k))continue}/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?:decor|trans)|top-bar|version|vnd|word-break)/.test(l)||/text\-indent|padding|margin/.test(l)&&/\-[\d.]+/.test(k)||(a[c]=l+":"+f[1])}}return b+(a.length?' style="'+a.join(";").replace(/;{2,}/g,
  136. ";")+'"':"")})}return function(b){return/(class="?Mso|style="[^"]*\bmso\-|w:WordDocument|<(v|o):|lang=)/ig.test(b)?c(b):b}}();(function(){function d(a,b,e){a.push(q);return b+(e?1:-1)}function c(a,b){for(var e=0;e<b;e++)a.push(n)}function b(e,g,h,k){switch(e.type){case "root":for(var l=0,n;n=e.children[l++];)h&&"element"==n.type&&!v.$inlineWithA[n.tagName]&&1<l&&(d(g,k,!0),c(g,k)),b(n,g,h,k);break;case "text":"pre"==e.parentNode.tagName?g.push(e.data):g.push(f[e.parentNode.tagName]?p.html(e.data):
  137. e.data.replace(/[ ]{2}/g," &nbsp;"));break;case "element":a(e,g,h,k);break;case "comment":g.push("\x3c!--"+e.data+"--\x3e")}return g}function a(a,e,g,h){var l="";if(a.attrs){var l=[],f=a.attrs,n;for(n in f)l.push(n+(void 0!==f[n]?'="'+(k[n]?p.html(f[n]).replace(/["]/g,function(a){return"&quot;"}):p.unhtml(f[n]))+'"':""));l=l.join(" ")}e.push("<"+a.tagName+(l?" "+l:"")+(v.$empty[a.tagName]?"/":"")+">");g&&!v.$inlineWithA[a.tagName]&&"pre"!=a.tagName&&a.children&&a.children.length&&(h=d(e,h,!0),c(e,
  138. h));if(a.children&&a.children.length)for(l=0;f=a.children[l++];)g&&"element"==f.type&&!v.$inlineWithA[f.tagName]&&1<l&&(d(e,h),c(e,h)),b(f,e,g,h);v.$empty[a.tagName]||(g&&!v.$inlineWithA[a.tagName]&&"pre"!=a.tagName&&a.children&&a.children.length&&(h=d(e,h),c(e,h)),e.push("</"+a.tagName+">"))}function e(a,b){var c;if("element"==a.type&&a.getAttr("id")==b)return a;if(a.children&&a.children.length)for(var g=0;c=a.children[g++];)if(c=e(c,b))return c}function h(a,b,e){"element"==a.type&&a.tagName==b&&
  139. e.push(a);if(a.children&&a.children.length)for(var c=0,g;g=a.children[c++];)h(g,b,e)}function g(a,b){if(a.children&&a.children.length)for(var e=0,c;c=a.children[e];)g(c,b),c.parentNode&&(c.children&&c.children.length&&b(c),c.parentNode&&e++);else b(a)}var l=UE.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},k={href:1,src:1,_src:1,_href:1,cdata_data:1},f={style:1,script:1},n="    ",q="\n";l.createElement=
  140. function(a){return/[<>]/.test(a)?UE.htmlparser(a).children[0]:new l({type:"element",children:[],tagName:a})};l.createText=function(a,b){return new UE.uNode({type:"text",data:b?a:p.unhtml(a||"")})};l.prototype={toHtml:function(a){var e=[];b(this,e,a,0);return e.join("")},innerHTML:function(a){if("element"!=this.type||v.$empty[this.tagName])return this;if(p.isString(a)){if(this.children)for(var b=0,e;e=this.children[b++];)e.parentNode=null;this.children=[];a=UE.htmlparser(a);for(b=0;e=a.children[b++];)this.children.push(e),
  141. e.parentNode=this;return this}a=new UE.uNode({type:"root",children:this.children});return a.toHtml()},innerText:function(a,b){if("element"!=this.type||v.$empty[this.tagName])return this;if(a){if(this.children)for(var e=0,c;c=this.children[e++];)c.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?
  142. this.children[this.children.length-1]:null},previousSibling:function(){for(var a=this.parentNode,b=0,e;e=a.children[b];b++)if(e===this)return 0==b?null:a.children[b-1]},nextSibling:function(){for(var a=this.parentNode,b=0,e;e=a.children[b++];)if(e===this)return a.children[b]},replaceChild:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var e=0,c;c=this.children[e];e++)if(c===b)return this.children.splice(e,1,a),b.parentNode=null,a.parentNode=this,a}},appendChild:function(a){if("root"==
  143. this.type||"element"==this.type&&!v.$empty[this.tagName]){this.children||(this.children=[]);a.parentNode&&a.parentNode.removeChild(a);for(var b=0,e;e=this.children[b];b++)if(e===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 e=0,c;c=this.children[e];e++)if(c===b)return this.children.splice(e,0,a),a.parentNode=this,a}},insertAfter:function(a,b){if(this.children){a.parentNode&&
  144. a.parentNode.removeChild(a);for(var e=0,c;c=this.children[e];e++)if(c===b)return this.children.splice(e+1,0,a),a.parentNode=this,a}},removeChild:function(a,b){if(this.children)for(var e=0,c;c=this.children[e];e++)if(c===a){this.children.splice(e,1);c.parentNode=null;if(b&&c.children&&c.children.length)for(var g=0,h;h=c.children[g];g++)this.children.splice(e+g,0,h),h.parentNode=this;return c}},getAttr:function(a){return this.attrs&&this.attrs[a.toLowerCase()]},setAttr:function(a,b){if(a)if(this.attrs||
  145. (this.attrs={}),p.isObject(a))for(var e in a)a[e]?this.attrs[e.toLowerCase()]=a[e]:delete this.attrs[e];else b?this.attrs[a.toLowerCase()]=b:delete this.attrs[a];else delete this.attrs},getIndex:function(){for(var a=this.parentNode,b=0,e;e=a.children[b];b++)if(e===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=e(b,a))return b},getNodesByTagName:function(a){a=p.trim(a).replace(/[ ]{2,}/g," ").split(" ");var b=[],e=
  146. this;p.each(a,function(a){if(e.children&&e.children.length)for(var c=0,g;g=e.children[c++];)h(g,a,b)});return b},getStyle:function(a){var b=this.getAttr("style");return b?(a=b.match(RegExp("(^|;)\\s*"+a+":([^;]+)","i")))&&a[0]?a[2]:"":""},setStyle:function(a,b){function e(a,b){c=c.replace(RegExp("(^|;)\\s*"+a+":([^;]+;?)","gi"),"$1");b&&(c=a+":"+p.unhtml(b)+";"+c)}var c=this.getAttr("style");c||(c="");if(p.isObject(a))for(var g in a)e(g,a[g]);else e(a,b);this.setAttr("style",p.trim(c))},traversal:function(a){this.children&&
  147. this.children.length&&g(this,a);return this}}})();UE.htmlparser=function(d,c){function b(a,b){if(n[a.tagName]){var e=k.createElement(n[a.tagName]);a.appendChild(e);e.appendChild(k.createText(b))}else a.appendChild(k.createText(b))}function a(b,e,c){var g;if(g=m[e]){for(var d=b,f;"root"!=d.type;){if(p.isArray(g)?-1!=p.indexOf(g,d.tagName):g==d.tagName){b=d;f=!0;break}d=d.parentNode}f||(b=a(b,p.isArray(g)?g[0]:g))}g=new k({parentNode:b,type:"element",tagName:e.toLowerCase(),children:v.$empty[e]?null:
  148. []});if(c){for(d={};f=h.exec(c);)d[f[1].toLowerCase()]=l[f[1].toLowerCase()]?f[2]||f[3]||f[4]:p.unhtml(f[2]||f[3]||f[4]);g.attrs=d}b.children.push(g);return v.$empty[e]?b:g}var e=/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g,h=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,g={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};
  149. d=d.replace(RegExp(f.fillChar,"g"),"");c||(d=d.replace(RegExp("[\\r\\t\\n"+(c?"":" ")+"]*</?(\\w+)\\s*(?:[^>]*)>[\\r\\t\\n"+(c?"":" ")+"]*","g"),function(a,b){return b&&g[b.toLowerCase()]?a.replace(/(^[\n\r]+)|([\n\r]+$)/g,""):a.replace(RegExp("^[\\r\\n"+(c?"":" ")+"]+"),"").replace(RegExp("[\\r\\n"+(c?"":" ")+"]+$"),"")}));for(var l={href:1,src:1},k=UE.uNode,m={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"},
  150. n={ol:"li",ul:"li"},q,t=0,w=0,y=new k({type:"root",children:[]}),u=y;q=e.exec(d);){t=q.index;try{if(t>w&&b(u,d.slice(w,t)),q[3])v.$cdata[u.tagName]?b(u,q[0]):u=a(u,q[3].toLowerCase(),q[4]);else if(q[1]){if("root"!=u.type)if(v.$cdata[u.tagName]&&!v.$cdata[q[1]])b(u,q[0]);else{for(t=u;"element"==u.type&&u.tagName!=q[1].toLowerCase();)if(u=u.parentNode,"root"==u.type)throw u=t,"break";u=u.parentNode}}else q[2]&&u.children.push(new k({type:"comment",data:q[2],parentNode:u}))}catch(C){}w=e.lastIndex}w<
  151. d.length&&b(u,d.slice(w));return y};UE.filterNode=function(){function d(c,b){switch(c.type){case "element":var a;if(a=b[c.tagName])if("-"===a)c.parentNode.removeChild(c);else if(p.isFunction(a)){var e=c.parentNode,h=c.getIndex();a(c);if(c.parentNode){if(c.children)for(a=0;h=c.children[a];)d(h,b),h.parentNode&&a++}else for(a=h;h=e.children[a];)d(h,b),h.parentNode&&a++}else{if((a=a.$)&&c.attrs){var h={},g;for(e in a){g=c.getAttr(e);if("style"==e&&p.isArray(a[e])){var l=[];p.each(a[e],function(a){var b;
  152. (b=c.getStyle(a))&&l.push(a+":"+b)});g=l.join(";")}g&&(h[e]=g)}c.attrs=h}if(c.children)for(a=0;h=c.children[a];)d(h,b),h.parentNode&&a++}else if(v.$cdata[c.tagName])c.parentNode.removeChild(c);else for(e=c.parentNode,h=c.getIndex(),c.parentNode.removeChild(c,!0),a=h;h=e.children[a];)d(h,b),h.parentNode&&a++;break;case "comment":c.parentNode.removeChild(c)}}return function(c,b){if(p.isEmptyObject(b))return c;var a;(a=b["-"])&&p.each(a.split(" "),function(a){b[a]="-"});a=0;for(var e;e=c.children[a];)d(e,
  153. b),e.parentNode&&a++;return c}}();UE.plugin=function(){var d={};return{register:function(c,b,a,e){a&&p.isFunction(a)&&(e=a,a=null);d[c]={optionName:a||c,execFn:b,afterDisabled:e}},load:function(c){p.each(d,function(b){var a=b.execFn.call(c);!1!==c.options[b.optionName]?a&&p.each(a,function(a,b){switch(b.toLowerCase()){case "shortcutkey":c.addshortcutkey(a);break;case "bindevents":p.each(a,function(a,b){c.addListener(b,a)});break;case "bindmultievents":p.each(p.isArray(a)?a:[a],function(a){var b=p.trim(a.type).split(/\s+/);
  154. p.each(b,function(b){c.addListener(b,a.handler)})});break;case "commands":p.each(a,function(a,b){c.commands[b]=a});break;case "outputrule":c.addOutputRule(a);break;case "inputrule":c.addInputRule(a);break;case "defaultoptions":c.setOpt(a)}}):b.afterDisabled&&b.afterDisabled.call(c)});p.each(UE.plugins,function(b){b.call(c)})},run:function(c,b){var a=d[c];a&&a.exeFn.call(b)}}}();var $=UE.keymap={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,
  155. End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Insert:45,Del:46,NumLock:144,Cmd:91,"=":187,"-":189,b:66,i:73,z:90,y:89,v:86,x:88,s:83,n:78},Y=UE.LocalStorage=function(){function d(){var a=document.createElement("div");a.style.display="none";if(!a.addBehavior)return null;a.addBehavior("#default#userdata");return{getItem:function(e){var c=null;try{document.body.appendChild(a),a.load(b),c=a.getAttribute(e),document.body.removeChild(a)}catch(g){}return c},setItem:function(e,c){document.body.appendChild(a);
  156. a.setAttribute(e,c);a.save(b);document.body.removeChild(a)},removeItem:function(e){document.body.appendChild(a);a.removeAttribute(e);a.save(b);document.body.removeChild(a)}}}var c=window.localStorage||d()||null,b="localStorage";return{saveLocalData:function(a,b){return c&&b?(c.setItem(a,b),!0):!1},getLocalData:function(a){return c?c.getItem(a):null},removeItem:function(a){c&&c.removeItem(a)}}}();(function(){UE.Editor.prototype.setPreferences=function(d,c){var b={};p.isString(d)?b[d]=c:b=d;var a=Y.getLocalData("ueditor_preference");
  157. a&&(a=p.str2json(a))?p.extend(a,b):a=b;a&&Y.saveLocalData("ueditor_preference",p.json2str(a))};UE.Editor.prototype.getPreferences=function(d){var c=Y.getLocalData("ueditor_preference");return c&&(c=p.str2json(c))?d?c[d]:c:null};UE.Editor.prototype.removePreferences=function(d){var c=Y.getLocalData("ueditor_preference");c&&(c=p.str2json(c))&&(c[d]=void 0,delete c[d]);c&&Y.saveLocalData("ueditor_preference",p.json2str(c))}})();UE.plugins.defaultfilter=function(){var d=this;d.setOpt({allowDivTransToP:!0,
  158. disabledTableInTable:!0});d.addInputRule(function(c){function b(a){for(;a&&"element"==a.type;){if("td"==a.tagName)return!0;a=a.parentNode}return!1}var a=this.options.allowDivTransToP,e;c.traversal(function(c){if("element"==c.type)if(v.$cdata[c.tagName]||!d.options.autoClearEmptyNode||!v.$inline[c.tagName]||v.$empty[c.tagName]||c.attrs&&!p.isEmptyObject(c.attrs))switch(c.tagName){case "style":case "script":c.setAttr({cdata_tag:c.tagName,cdata_data:c.innerHTML()||"",_ue_custom_node_:"true"});c.tagName=
  159. "div";c.innerHTML("");break;case "a":(e=c.getAttr("href"))&&c.setAttr("_href",e);break;case "img":if((e=c.getAttr("src"))&&/^data:/.test(e)){c.parentNode.removeChild(c);break}c.setAttr("_src",c.getAttr("src"));break;case "span":r.webkit&&(e=c.getStyle("white-space"))&&/nowrap|normal/.test(e)&&(c.setStyle("white-space",""),d.options.autoClearEmptyNode&&p.isEmptyObject(c.attrs)&&c.parentNode.removeChild(c,!0));(e=c.getAttr("id"))&&/^_baidu_bookmark_/i.test(e)&&c.parentNode.removeChild(c);break;case "p":if(e=
  160. c.getAttr("align"))c.setAttr("align"),c.setStyle("text-align",e);p.each(c.children,function(a){if("element"==a.type&&"p"==a.tagName){var b=a.nextSibling();for(c.parentNode.insertAfter(a,c);b;){var e=b.nextSibling();c.parentNode.insertAfter(b,a);a=b;b=e}return!1}});c.firstChild()||c.innerHTML(r.ie?"&nbsp;":"<br/>");break;case "div":if(c.getAttr("cdata_tag"))break;if((e=c.getAttr("class"))&&/^line number\d+/.test(e))break;if(!a)break;for(var g,l=UE.uNode.createElement("p");g=c.firstChild();)"text"!=
  161. g.type&&UE.dom.dtd.$block[g.tagName]?l.firstChild()?(c.parentNode.insertBefore(l,c),l=UE.uNode.createElement("p")):c.parentNode.insertBefore(g,c):l.appendChild(g);l.firstChild()&&c.parentNode.insertBefore(l,c);c.parentNode.removeChild(c);break;case "dl":c.tagName="ul";break;case "dt":case "dd":c.tagName="li";break;case "li":(g=c.getAttr("class"))&&/list\-/.test(g)||c.setAttr();g=c.getNodesByTagName("ol ul");UE.utils.each(g,function(a){c.parentNode.insertAfter(a,c)});break;case "td":case "th":case "caption":c.children&&
  162. c.children.length||c.appendChild(r.ie11below?UE.uNode.createText(" "):UE.uNode.createElement("br"));break;case "table":d.options.disabledTableInTable&&b(c)&&(c.parentNode.insertBefore(UE.uNode.createText(c.innerText()),c),c.parentNode.removeChild(c))}else c.firstChild()?"span"!=c.tagName||c.attrs&&!p.isEmptyObject(c.attrs)||c.parentNode.removeChild(c,!0):c.parentNode.removeChild(c)})});d.addOutputRule(function(c){var b;c.traversal(function(a){if("element"==a.type)if(!d.options.autoClearEmptyNode||
  163. !v.$inline[a.tagName]||v.$empty[a.tagName]||a.attrs&&!p.isEmptyObject(a.attrs))switch(a.tagName){case "div":if(b=a.getAttr("cdata_tag"))a.tagName=b,a.appendChild(UE.uNode.createText(a.getAttr("cdata_data"))),a.setAttr({cdata_tag:"",cdata_data:"",_ue_custom_node_:""});break;case "a":(b=a.getAttr("_href"))&&a.setAttr({href:p.html(b),_href:""});break;case "span":(b=a.getAttr("id"))&&/^_baidu_bookmark_/i.test(b)&&a.parentNode.removeChild(a);break;case "img":(b=a.getAttr("_src"))&&a.setAttr({src:a.getAttr("_src"),
  164. _src:""})}else a.firstChild()?"span"!=a.tagName||a.attrs&&!p.isEmptyObject(a.attrs)||a.parentNode.removeChild(a,!0):a.parentNode.removeChild(a)})})};UE.commands.inserthtml={execCommand:function(d,c,b){var a=this,e;if(c&&!0!==a.fireEvent("beforeinserthtml",c)){e=a.selection.getRange();d=e.document.createElement("div");d.style.display="inline";b||(b=UE.htmlparser(c),a.options.filterRules&&UE.filterNode(b,a.options.filterRules),a.filterInputRule(b),c=b.toHtml());d.innerHTML=p.trim(c);if(!e.collapsed&&
  165. (b=e.startContainer,f.isFillChar(b)&&e.setStartBefore(b),b=e.endContainer,f.isFillChar(b)&&e.setEndAfter(b),e.txtToElmBoundary(),e.endContainer&&1==e.endContainer.nodeType&&(b=e.endContainer.childNodes[e.endOffset])&&f.isBr(b)&&e.setEndAfter(b),0==e.startOffset&&(b=e.startContainer,f.isBoundaryNode(b,"firstChild")&&(b=e.endContainer,e.endOffset==(3==b.nodeType?b.nodeValue.length:b.childNodes.length)&&f.isBoundaryNode(b,"lastChild")&&(a.body.innerHTML="<p>"+(r.ie?"":"<br/>")+"</p>",e.setStart(a.body.firstChild,
  166. 0).collapse(!0)))),!e.collapsed&&e.deleteContents(),1==e.startContainer.nodeType)){b=e.startContainer.childNodes[e.startOffset];var h;if(b&&f.isBlockElm(b)&&(h=b.previousSibling)&&f.isBlockElm(h)){for(e.setEnd(h,h.childNodes.length).collapse();b.firstChild;)h.appendChild(b.firstChild);f.remove(b)}}var g,l,k=0,m;e.inFillChar()&&(b=e.startContainer,f.isFillChar(b)?(e.setStartBefore(b).collapse(!0),f.remove(b)):f.isFillChar(b,!0)&&(b.nodeValue=b.nodeValue.replace(P,""),e.startOffset--,e.collapsed&&e.collapse(!0)));
  167. var n=f.findParentByTagName(e.startContainer,"li",!0);if(n){for(var q;b=d.firstChild;){for(;b&&(3==b.nodeType||!f.isBlockElm(b)||"HR"==b.tagName);)q=b.nextSibling,e.insertNode(b).collapse(),g=b,b=q;if(b)if(/^(ol|ul)$/i.test(b.tagName)){for(;b.firstChild;)g=b.firstChild,f.insertAfter(n,b.firstChild),n=n.nextSibling;f.remove(b)}else q=b.nextSibling,h=a.document.createElement("li"),f.insertAfter(n,h),h.appendChild(b),g=b,b=q,n=h}n=f.findParentByTagName(e.startContainer,"li",!0);f.isEmptyBlock(n)&&f.remove(n);
  168. g&&e.setStartAfter(g).collapse(!0).select(!0)}else{for(;b=d.firstChild;){if(k){for(g=a.document.createElement("p");b&&(3==b.nodeType||!v.$block[b.tagName]);)m=b.nextSibling,g.appendChild(b),b=m;g.firstChild&&(b=g)}e.insertNode(b);m=b.nextSibling;if(!k&&b.nodeType==f.NODE_ELEMENT&&f.isBlockElm(b)&&(g=f.findParent(b,function(a){return f.isBlockElm(a)}))&&"body"!=g.tagName.toLowerCase()&&(!v[g.tagName][b.nodeName]||b.parentNode!==g)){if(v[g.tagName][b.nodeName])for(l=b.parentNode;l!==g;)h=l,l=l.parentNode;
  169. else h=g;f.breakParent(b,h||l);h=b.previousSibling;f.trimWhiteTextNode(h);h.childNodes.length||f.remove(h);!r.ie&&(q=b.nextSibling)&&f.isBlockElm(q)&&q.lastChild&&!f.isBr(q.lastChild)&&q.appendChild(a.document.createElement("br"));k=1}q=b.nextSibling;if(!d.firstChild&&q&&f.isBlockElm(q)){e.setStart(q,0).collapse(!0);break}e.setEndAfter(b).collapse()}b=e.startContainer;m&&f.isBr(m)&&f.remove(m);if(f.isBlockElm(b)&&f.isEmptyNode(b))if(m=b.nextSibling)f.remove(b),1==m.nodeType&&v.$block[m.tagName]&&
  170. e.setStart(m,0).collapse(!0).shrinkBoundary();else try{b.innerHTML=r.ie?f.fillChar:"<br/>"}catch(t){e.setStartBefore(b),f.remove(b)}try{e.select(!0)}catch(w){}}setTimeout(function(){e=a.selection.getRange();e.scrollToView(a.autoHeightEnabled,a.autoHeightEnabled?f.getXY(a.iframe).y:0);a.fireEvent("afterinserthtml",c)},200)}}};UE.plugins.autotypeset=function(){function d(a,b){if(!a||3==a.nodeType)return 0;if(f.isBr(a))return 1;if(a&&a.parentNode&&k[a.tagName.toLowerCase()])return m&&m.contains(a)||
  171. a.getAttribute("pagebreak")?0:b?!f.isEmptyBlock(a):f.isEmptyBlock(a,RegExp("[\\s"+f.fillChar+"]","g"))}function c(a){a.style.cssText||(f.removeAttributes(a,["style"]),"span"==a.tagName.toLowerCase()&&f.hasNoAttributes(a)&&f.remove(a,!0))}function b(a,b){var e;if(b){if(!h.pasteFilter)return;e=this.document.createElement("div");e.innerHTML=b.html}else e=this.document.body;for(var k=f.getElementsByTagName(e,"*"),y=0,u;u=k[y++];)if(!0!==this.fireEvent("excludeNodeinautotype",u)){h.clearFontSize&&u.style.fontSize&&
  172. (f.removeStyle(u,"font-size"),c(u));h.clearFontFamily&&u.style.fontFamily&&(f.removeStyle(u,"font-family"),c(u));if(d(u)){if(h.mergeEmptyline)for(var C=u.nextSibling,E,G=f.isBr(u);d(C);){E=C;C=E.nextSibling;if(G&&(!C||C&&!f.isBr(C)))break;f.remove(E)}if(h.removeEmptyline&&f.inDoc(u,e)&&!l[u.parentNode.tagName.toLowerCase()]){if(f.isBr(u)&&(C=u.nextSibling)&&!f.isBr(C))continue;f.remove(u);continue}}d(u,!0)&&"SPAN"!=u.tagName&&(h.indent&&(u.style.textIndent=h.indentValue),h.textAlign&&(u.style.textAlign=
  173. h.textAlign));if(h.removeClass&&u.className&&!g[u.className.toLowerCase()]){if(m&&m.contains(u))continue;f.removeAttributes(u,["class"])}if(h.imageBlockLine&&"img"==u.tagName.toLowerCase()&&!u.getAttribute("emotion"))if(b)switch(G=u,h.imageBlockLine){case "left":case "right":case "none":for(var C=G.parentNode,r;v.$inline[C.tagName]||"A"==C.tagName;)C=C.parentNode;E=C;if("P"==E.tagName&&"center"==f.getStyle(E,"text-align")&&!f.isBody(E)&&1==f.getChildCount(E,function(a){return!f.isBr(a)&&!f.isWhitespace(a)}))if(r=
  174. E.previousSibling,C=E.nextSibling,r&&C&&1==r.nodeType&&1==C.nodeType&&r.tagName==C.tagName&&f.isBlockElm(r)){for(r.appendChild(E.firstChild);C.firstChild;)r.appendChild(C.firstChild);f.remove(E);f.remove(C)}else f.setStyle(E,"text-align","");f.setStyle(G,"float",h.imageBlockLine);break;case "center":if("center"!=this.queryCommandValue("imagefloat")){C=G.parentNode;f.setStyle(G,"float","none");for(E=G;C&&1==f.getChildCount(C,function(a){return!f.isBr(a)&&!f.isWhitespace(a)})&&(v.$inline[C.tagName]||
  175. "A"==C.tagName);)E=C,C=C.parentNode;C=this.document.createElement("p");f.setAttributes(C,{style:"text-align:center"});E.parentNode.insertBefore(C,E);C.appendChild(E);f.setStyle(E,"float","")}}else this.selection.getRange().selectNode(u).select(),this.execCommand("imagefloat",h.imageBlockLine);h.removeEmptyNode&&h.removeTagNames[u.tagName.toLowerCase()]&&f.hasNoAttributes(u)&&f.isEmptyBlock(u)&&f.remove(u)}h.tobdc&&(k=UE.htmlparser(e.innerHTML),k.traversal(function(a){if("text"==a.type){for(var b=
  176. a.data,b=p.html(b),e="",c=0;c<b.length;c++)e=32==b.charCodeAt(c)?e+String.fromCharCode(12288):127>b.charCodeAt(c)?e+String.fromCharCode(b.charCodeAt(c)+65248):e+b.charAt(c);a.data=e}}),e.innerHTML=k.toHtml());h.bdc2sb&&(k=UE.htmlparser(e.innerHTML),k.traversal(function(a){if("text"==a.type){for(var b=a.data,e="",c=0;c<b.length;c++)var g=b.charCodeAt(c),e=65281<=g&&65373>=g?e+String.fromCharCode(b.charCodeAt(c)-65248):12288==g?e+String.fromCharCode(b.charCodeAt(c)-12288+32):e+b.charAt(c);a.data=e}}),
  177. e.innerHTML=k.toHtml());b&&(b.html=e.innerHTML)}function a(){var a=e.getPreferences("autotypeset");p.extend(e.options.autotypeset,a)}this.setOpt({autotypeset:{mergeEmptyline:!0,removeClass:!0,removeEmptyline:!1,textAlign:"left",imageBlockLine:"center",pasteFilter:!1,clearFontSize:!1,clearFontFamily:!1,removeEmptyNode:!1,removeTagNames:p.extend({div:1},v.$removeEmpty),indent:!1,indentValue:"2em",bdc2sb:!1,tobdc:!1}});var e=this,h=e.options.autotypeset,g={selectTdClass:1,pagebreak:1,anchorclass:1},
  178. l={li:1},k={div:1,p:1,blockquote:1,center:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,span:1},m;h&&(a(),h.pasteFilter&&e.addListener("beforepaste",b),e.commands.autotypeset={execCommand:function(){e.removeListener("beforepaste",b);h.pasteFilter&&e.addListener("beforepaste",b);b.call(e)}})};UE.plugin.register("autosubmit",function(){return{shortcutkey:{autosubmit:"ctrl+13"},commands:{autosubmit:{execCommand:function(){var d=f.findParentByTagName(this.iframe,"form",!1);d&&!1!==this.fireEvent("beforesubmit")&&(this.sync(),
  179. d.submit())}}}}});UE.plugin.register("background",function(){function d(a){var b={};a=a.split(";");p.each(a,function(a){var e=a.indexOf(":"),c=p.trim(a.substr(0,e)).toLowerCase();c&&(b[c]=p.trim(a.substr(e+1)||""))});return b}function c(e){if(e){var c=[],g;for(g in e)e.hasOwnProperty(g)&&c.push(g+":"+e[g]+"; ");p.cssRule(a,c.length?"body{"+c.join("")+"}":"",b.document)}else p.cssRule(a,"",b.document)}var b=this,a="editor_background",e,h=/body[\s]*\{(.+)\}/i,g=b.hasContents;b.hasContents=function(){return b.queryCommandValue("background")?
  180. !0:g.apply(b,arguments)};return{bindEvents:{getAllHtml:function(a,e){var c=this.body,g=f.getComputedStyle(c,"background-image"),h="",h=0<g.indexOf(b.options.imagePath)?g.substring(g.indexOf(b.options.imagePath),g.length-1).replace(/"|\(|\)/ig,""):"none"!=g?g.replace(/url\("?|"?\)/ig,""):"",g='<style type="text/css">body{',c={"background-color":f.getComputedStyle(c,"background-color")||"#ffffff","background-image":h?"url("+h+")":"","background-repeat":f.getComputedStyle(c,"background-repeat")||"",
  181. "background-position":r.ie?f.getComputedStyle(c,"background-position-x")+" "+f.getComputedStyle(c,"background-position-y"):f.getComputedStyle(c,"background-position"),height:f.getComputedStyle(c,"height")},d;for(d in c)c.hasOwnProperty(d)&&(g+=d+":"+c[d]+"; ");e.push(g+"}</style> ")},aftersetcontent:function(){!1==e&&c()}},inputRule:function(a){e=!1;p.each(a.getNodesByTagName("p"),function(a){var b=a.getAttr("data-background");b&&(e=!0,c(d(b)),a.parentNode.removeChild(a))})},outputRule:function(b){var e=
  182. (p.cssRule(a,this.document)||"").replace(/[\n\r]+/g,"").match(h);e&&b.appendChild(UE.uNode.createElement('<p style="display:none;" data-background="'+p.trim(e[1].replace(/"/g,"")