").appendTo(document.body).append(b(u[0].childNodes).clone());return f.fixNesting(d[0]),c=d.html(),a!==!1&&C.hasHandler("toSource")&&(c=C.callOnlyFirst("toSource",c,d)),d.remove(),c},ua.getBody=function(){return u},ua.getContentAreaContainer=function(){return s},ua.getSourceEditorValue=function(a){var b=w.val();return a!==!1&&C.hasHandler("toWysiwyg")&&(b=C.callOnlyFirst("toWysiwyg",b)),b},ua.setWysiwygEditorValue=function(a){a||(a="
"+(n?"":" ")+"
"),u[0].innerHTML=a,L(u[0]),ja(),qa()},ua.setSourceEditorValue=function(a){w.val(a),qa()},ua.updateOriginal=function(){wa.val(ua.val())},L=function(a){if(c.emoticonsEnabled&&!b(a).parents("code").length){var d=a.ownerDocument,e="\\s| | | | | ",h=[],j=[],k=b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden);b.each(k,function(a){c.emoticonsCompat&&(j[a]=new RegExp("(>|^|"+e+")"+g.regex(a)+"($|<|"+e+")")),h.push(a)});var l=function(a){for(a=a.firstChild;a;){var e,g,m,n,o,p,q,r=a.parentNode,s=a.nodeValue;if(3!==a.nodeType)b(a).is("code")||l(a);else if(s)for(o=h.length;o--;)g=h[o],q=c.emoticonsCompat?s.search(j[g]):s.indexOf(g),q>-1&&(p=a.nextSibling,m=k[g],e=s.substr(q).split(g),s=s.substr(0,q)+e.shift(),a.nodeValue=s,n=f.parseHTML(i("emoticon",{key:g,url:m.url||m,tooltip:m.tooltip||g}),d),r.insertBefore(n[0],p),r.insertBefore(d.createTextNode(e.join(g)),p));a=a.nextSibling}};l(a),c.emoticonsCompat&&(Ba=u.find("img[data-sceditor-emoticon]"))}},ua.inSourceMode=function(){return q.hasClass("sourceMode")},ua.sourceMode=function(a){var b=ua.inSourceMode();return"boolean"!=typeof a?b:((b&&!a||!b&&a)&&ua.toggleSourceMode(),ua)},ua.toggleSourceMode=function(){var a=ua.inSourceMode();!h.isWysiwygSupported&&a||(a||(B.saveRange(),B.clear()),ua.blur(),a?ua.setWysiwygEditorValue(ua.getSourceEditorValue()):ua.setSourceEditorValue(ua.getWysiwygEditorValue()),z=null,w.toggle(),s.toggle(),q.toggleClass("wysiwygMode",a).toggleClass("sourceMode",!a),ga(),ha())},ia=function(){return x.focus(),"undefined"!=typeof x.selectionStart?x.value.substring(x.selectionStart,x.selectionEnd):k.selection.createRange().text},M=function(a,c){ua.inSourceMode()?c.txtExec&&(b.isArray(c.txtExec)?ua.sourceEditorInsertText.apply(ua,c.txtExec):c.txtExec.call(ua,a,ia())):c.exec&&(b.isFunction(c.exec)?c.exec.call(ua,a):ua.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null))},N=function(){n&&(z=B.selectedRange())},ua.execCommand=function(a,c){var d=!1,e=ua.commands[a],f=b(B.parentNode());if(ua.focus(),!f.is("code")&&0===f.parents("code").length){try{d=v[0].execCommand(a,!1,c)}catch(a){}!d&&e&&e.errorMessage&&alert(ua._(e.errorMessage)),ha()}},ka=function(){function a(){B&&!B.compare(F)&&(F=B.cloneSelected(),q.trigger(b.Event("selectionchanged"))),G=!1}G||(G=!0,n?a():setTimeout(a,100))},la=function(){var a,c=B.parentNode();D!==c&&(a=D,D=c,E=B.getFirstBlockParent(c),q.trigger(b.Event("nodechanged",{oldNode:a,newNode:D})))},ua.currentNode=function(){return D},ua.currentBlockNode=function(){return E},ha=function(a){var b,c,d="active",e=v[0],f=ua.sourceMode();if(ua.readOnly())return void r.find(d).removeClass(d);f||(c=a?a.newNode:B.parentNode(),b=B.getFirstBlockParent(c));for(var g=0;g
-1&&(h=e.queryCommandState(j)?1:0)}catch(a){}}else k||(h=j.call(ua,c,b));i.toggleClass("disabled",k||h<0).toggleClass(d,h>0)}},aa=function(a){var c,d,e,g,h="code,blockquote,pre",i="li,ul,ol";if(!a.originalEvent.defaultPrevented)return ua.closeDropDown(),c=b(E).closest(h+","+i).first(),13===a.which&&c.length&&!c.is(i)?(z=null,d=v[0].createElement("br"),B.insertNode(d),o||(e=d.parentNode,g=e.lastChild,g&&3===g.nodeType&&""===g.nodeValue&&(e.removeChild(g),g=e.lastChild),!f.isInline(e,!0)&&g===d&&f.isInline(d.previousSibling)&&B.insertHTML(" ")),!1):void 0},ja=function(){var a,c,d,e=u[0];f.rTraverse(e,function(g){if(a=g.nodeName.toLowerCase(),b.inArray(a,ya)>-1&&(c=!0),3===g.nodeType&&!/^\s*$/.test(g.nodeValue)||"br"===a||o&&!g.firstChild&&!f.isInline(g,!1))return c&&(d=v[0].createElement("p"),d.className="sceditor-nlf",d.innerHTML=o?"":" ",e.appendChild(d)),!1})},ba=function(){ua.val(wa.val())},ca=function(){ua.closeDropDown(),z=null},fa=function(){var a=c.height,b=c.width;ua.maximize()?ua.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1||b&&b.toString().indexOf("%")>-1)&&ua.dimensions(b,a)},ua._=function(){var a,b=arguments;return A&&A[b[0]]&&(b[0]=A[b[0]]),b[0].replace(/\{(\d+)\}/g,function(c,d){return b[d-0+1]!==a?b[d-0+1]:"{"+d+"}"})},da=function(a){C.call(a.type+"Event",a,ua);var c=a.target===x?"scesrc":"scewys",d=b.Event(a);d.type=c+a.type,q.trigger(d,ua)},ua.bind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.on("scewys"+a[f],c),e||q.on("scesrc"+a[f],c),"valuechanged"===a[f]&&(qa.hasHandler=!0));return ua},ua.unbind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.off("scewys"+a[f],c),e||q.off("scesrc"+a[f],c));return ua},ua.blur=function(a,c,d){return b.isFunction(a)?ua.bind("blur",a,c,d):ua.sourceMode()?w.blur():u.blur(),ua},ua.focus=function(a,c,d){if(b.isFunction(a))ua.bind("focus",a,c,d);else if(ua.inSourceMode())x.focus();else{var e,f=B.selectedRange();F||B.hasSelection()||ma(),!o&&f&&1===f.endOffset&&f.collapsed&&(e=f.endContainer,e&&1===e.childNodes.length&&b(e.firstChild).is("br")&&(f.setStartBefore(e.firstChild),f.collapse(!0),B.selectRange(f))),t.contentWindow.focus(),u[0].focus(),z&&(B.selectRange(z),z=null)}return ha(),ua},ua.keyDown=function(a,b,c){return ua.bind("keydown",a,b,c)},ua.keyPress=function(a,b,c){return ua.bind("keypress",a,b,c)},ua.keyUp=function(a,b,c){return ua.bind("keyup",a,b,c)},ua.nodeChanged=function(a){return ua.bind("nodechanged",a,!1,!0)},ua.selectionChanged=function(a){return ua.bind("selectionchanged",a,!1,!0)},ua.valueChanged=function(a,b,c){return ua.bind("valuechanged",a,b,c)},na=function(a){var d,e=0,f=ua.emoticonsCache,g=String.fromCharCode(a.which);if(!b(E).is("code")&&!b(E).parents("code").length)return f||(f=[],b.each(b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden),function(a,b){f[e++]=[a,i("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),f.sort(function(a,b){return a[0].length-b[0].length}),ua.emoticonsCache=f,ua.longestEmoticonCode=f[f.length-1][0].length),d=B.replaceKeyword(ua.emoticonsCache,!0,!0,ua.longestEmoticonCode,c.emoticonsCompat,g),d&&c.emoticonsCompat?(Ba=u.find("img[data-sceditor-emoticon]"),/^\s$/.test(g)):!d},oa=function(){if(Ba.length){var a,c,d,e,f,g,h=ua.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009\u00a0]+/;Ba=b.map(Ba,function(k){return k&&k.parentNode?b.contains(h,k)?(a=k.previousSibling,c=k.nextSibling,f=a.nodeValue,null===f&&(f=a.innerText||""),a&&j.test(a.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=B.cloneSelected(),g=e.startContainer,f+=b(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===a&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(a),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),B.selectRange(e)),null):k):k:null})}},ua.emoticons=function(a){return a||a===!1?(c.emoticonsEnabled=a,a?(u.keypress(na),ua.sourceMode()||(B.saveRange(),L(u[0]),Ba=u.find("img[data-sceditor-emoticon]"),qa(!1),B.restoreRange())):(u.find("img[data-sceditor-emoticon]").replaceWith(function(){return b(this).data("sceditor-emoticon")}),Ba=[],u.off("keypress",na),qa()),ua):c.emoticonsEnabled},ua.css=function(a){return I||(I=b('',v[0]).appendTo(v.find("head"))[0]),"string"!=typeof a?I.styleSheet?I.styleSheet.cssText:I.innerHTML:(I.styleSheet?I.styleSheet.cssText=a:I.innerHTML=a,ua)},$=function(a){var b=[],c={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|","[":"{","]":"}"},d={8:"backspace",9:"tab",13:"enter",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"win",92:"win",93:"select",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},e={109:"-",110:"del",111:"/",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},f=a.which,g=d[f]||String.fromCharCode(f).toLowerCase();if((a.ctrlKey||a.metaKey)&&b.push("ctrl"),a.altKey&&b.push("alt"),a.shiftKey&&(b.push("shift"),e[f]?g=e[f]:c[g]&&(g=c[g])),g&&(f<16||f>18)&&b.push(g),b=b.join("+"),Aa[b])return Aa[b].call(ua)},ua.addShortcut=function(a,b){return a=a.toLowerCase(),"string"==typeof b?Aa[a]=function(){return M(Ca[b],ua.commands[b]),!1}:Aa[a]=b,ua},ua.removeShortcut=function(a){return delete Aa[a.toLowerCase()],ua},_=function(a){var d,e,f,g,h;if(!c.disableBlockRemove&&8===a.which&&(g=B.selectedRange())&&(j.getSelection?(d=g.startContainer,e=g.startOffset):(d=g.parentElement(),f=v[0].selection.createRange(),f.moveToElementText(d),f.setEndPoint("EndToStart",g),e=f.text.length),0===e&&(h=pa()))){for(;d!==h;){for(;d.previousSibling;)if(d=d.previousSibling,3!==d.nodeType||d.nodeValue)return;if(!(d=d.parentNode))return}if(h&&!b(h).is("body"))return ua.clearBlockFormatting(h),!1}},pa=function(){for(var a=E;!f.hasStyling(a)||f.isInline(a,!0);)if(!(a=a.parentNode)||b(a).is("body"))return;return a},ua.clearBlockFormatting=function(a){return a=a||pa(),!a||b(a).is("body")?ua:(B.saveRange(),a.className="",z=null,b(a).attr("style",""),b(a).is("p,div,td")||f.convertElement(a,"p"),B.restoreRange(),ua)},qa=function(a){if(C&&(C.hasHandler("valuechangedEvent")||qa.hasHandler)){var c,d=ua.sourceMode(),e=!d&&B.hasSelection();a=a!==!1&&!v[0].getElementById("sceditor-start-marker"),sa.timer&&(clearTimeout(sa.timer),sa.timer=!1),e&&a&&B.saveRange(),c=d?w.val():u.html(),c!==qa.lastHtmlValue&&(qa.lastHtmlValue=c,q.trigger(b.Event("valuechanged",{rawValue:d?ua.val():c}))),e&&a&&B.removeMarkers()}},ra=function(){sa.timer&&qa()},sa=function(a){var b=a.which,c=sa.lastChar,d=13===c||32===c,e=8===c||46===c;sa.lastChar=b,13===b||32===b?d?sa.triggerNextChar=!0:qa():8===b||46===b?e?sa.triggerNextChar=!0:qa():sa.triggerNextChar&&(qa(),sa.triggerNextChar=!1),sa.timer&&clearTimeout(sa.timer),sa.timer=setTimeout(function(){qa()},1500)},ta=function(){J||ua.updateOriginal(),J=!1},K()};return p.locale={},p.command={get:function(a){return p.commands[a]||null},set:function(a,c){return!(!a||!c)&&(c=b.extend(p.commands[a]||{},c),c.remove=function(){p.command.remove(a)},p.commands[a]=c,this)},remove:function(a){return p.commands[a]&&delete p.commands[a],this}},p}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(){"use strict";var a={},b=function(b){var c=this,d=[],e=function(a){return"signal"+a.charAt(0).toUpperCase()+a.slice(1)},f=function(a,c){a=[].slice.call(a);var f,g,h=e(a.shift());for(f=0;f",a.ownerDocument).append(a).html()},j=function(a,b,c){var d,e,f,g,h,i="",j=a.startContainer,k=a.startOffset;for(j&&3!==j.nodeType&&(j=j.childNodes[k],k=0),f=g=k;c>i.length&&j&&3===j.nodeType;)d=j.nodeValue,e=c-i.length,h&&(g=d.length,f=0),h=j,b?(f=Math.max(g-e,0),k=f,i=d.substr(f,g-f)+i,j=h.previousSibling):(g=Math.min(e,d.length),k=f+g,i+=d.substr(f,g),j=h.nextSibling);return{node:h||j,offset:k,text:i}},k=function(a,c){var f,k,l,m=c||a.contentDocument||a.document,n=a,o=!!a.getSelection,p="sceditor-start-marker",q="sceditor-end-marker",r="character",s=this;s.insertHTML=function(a,b){var c,d,e=s.selectedRange();if(!e)return!1;if(o){for(b&&(a+=s.selectedHtml()+b),d=m.createElement("p"),c=m.createDocumentFragment(),d.innerHTML=a;d.firstChild;)c.appendChild(d.firstChild);s.insertNode(c)}else e.pasteHTML(l(a,b,!0)),s.restoreRange()},l=function(a,c,e){var h,i,j=m.createElement("div"),k=b(j);if("string"==typeof a?(c&&(a+=s.selectedHtml()+c),k.html(a)):(k.append(a),c&&k.append(s.selectedRange().extractContents()).append(c)),h=j.lastChild){for(;!d.isInline(h.lastChild,!0);)h=h.lastChild;return d.canHaveChildren(h)&&(i=b(h),h.lastChild||i.append("")),g&&g<9&&b(h).is("img")&&k.append(""),s.removeMarkers(),(i||k).append(f(p)).append(f(q)),e?k.html():b(m.createDocumentFragment()).append(k.contents())[0]}},s.insertNode=function(a,b){if(o){var c=l(a,b),e=s.selectedRange(),f=e.commonAncestorContainer;if(!c)return!1;e.deleteContents(),f&&3!==f.nodeType&&!d.canHaveChildren(f)?f.parentNode.insertBefore(c,f):e.insertNode(c),s.restoreRange()}else s.insertHTML(i(a),b?i(b):null)},s.cloneSelected=function(){var a=s.selectedRange();if(a)return o?a.cloneRange():a.duplicate()},s.selectedRange=function(){var a,b,c=o?n.getSelection():m.selection;if(c){if(c.getRangeAt&&c.rangeCount<=0){for(b=m.body;b.firstChild;)b=b.firstChild;a=m.createRange(),a.setStartBefore(b),c.addRange(a)}return o&&c.rangeCount>0&&(a=c.getRangeAt(0)),o||"Control"===c.type||(a=c.createRange()),k(a)?a:null}},k=function(a){var b;return a&&!o&&(b=a.parentElement()),!b||b.ownerDocument===m},s.hasSelection=function(){var a=o?n.getSelection():m.selection;return o||!a?a&&a.rangeCount>0:"None"!==a.type&&k(a.createRange())},s.selectedHtml=function(){var a,b=s.selectedRange();if(b){if(o)return a=m.createElement("p"),a.appendChild(b.cloneContents()),a.innerHTML;if(""!==b.text&&b.htmlText)return b.htmlText}return""},s.parentNode=function(){var a=s.selectedRange();if(a)return a.parentElement?a.parentElement():a.commonAncestorContainer},s.getFirstBlockParent=function(a){var b=function(a){return d.isInline(a,!0)?(a=a?a.parentNode:null,a?b(a):a):a};return b(a||s.parentNode())},s.insertNodeAt=function(a,b){var c=s.selectedRange(),d=s.cloneSelected();return!!d&&(d.collapse(a),o?d.insertNode(b):d.pasteHTML(i(b)),void s.selectRange(c))},f=function(a){s.removeMarker(a);var b=m.createElement("span");return b.id=a,b.style.lineHeight="0",b.style.display="none",b.className="sceditor-selection sceditor-ignore",b.innerHTML=" ",b},s.insertMarkers=function(){s.insertNodeAt(!0,f(p)),s.insertNodeAt(!1,f(q))},s.getMarker=function(a){return m.getElementById(a)},s.removeMarker=function(a){var b=s.getMarker(a);b&&b.parentNode.removeChild(b)},s.removeMarkers=function(){s.removeMarker(p),s.removeMarker(q)},s.saveRange=function(){s.insertMarkers()},s.selectRange=function(a){if(o){var c,e=n.getSelection(),f=a.endContainer;if(!h&&a.collapsed&&f&&!d.isInline(f,!0)){for(c=f.lastChild;c&&b(c).is(".sceditor-ignore");)c=c.previousSibling;if(b(c).is("br")){var g=m.createRange();g.setEndAfter(c),g.collapse(!1),s.compare(a,g)&&(a.setStartBefore(c),a.collapse(!0))}}e&&(s.clear(),e.addRange(a))}else a.select()},s.restoreRange=function(){var a,c,e,f=s.selectedRange(),g=s.getMarker(p),h=s.getMarker(q);return!!(g&&h&&f)&&(c=g.nextSibling===h,o?(f=m.createRange(),f.setStartBefore(g),f.setEndAfter(h)):(f=m.body.createTextRange(),a=m.body.createTextRange(),e=g.previousSibling,g.nextSibling!==h||e&&d.isInline(e,!0)&&!b(e).is("br")||b(g).before(""),a.moveToElementText(g),f.setEndPoint("StartToStart",a),f.moveStart(r,0),a.moveToElementText(h),f.setEndPoint("EndToStart",a),f.moveEnd(r,0)),c&&f.collapse(!0),s.selectRange(f),void s.removeMarkers())},s.selectOuterText=function(a,b){var c,d,e=s.cloneSelected();return!!e&&(e.collapse(!1),o?(c=j(e,!0,a),d=j(e,!1,b),e.setStart(c.node,c.offset),e.setEnd(d.node,d.offset)):(e.moveStart(r,0-a),e.moveEnd(r,b)),void s.selectRange(e))},s.getOuterText=function(a,b){var c=s.cloneSelected();return c?(c.collapse(!a),o?j(c,a,b).text:(a?c.moveStart(r,0-b):c.moveEnd(r,b),c.text)):""},s.replaceKeyword=function(a,b,c,d,f,g){c||a.sort(function(a,b){return a[0].length-b[0].length});var h,i,j,k,l,m,n,p="[\\s ]",q=a.length,r=f?1:0,t=d||a[q-1][0].length;if(f){if(!o)return!1;t++}for(g=g||"",h=s.getOuterText(!0,t),k=h.length,h+=g,b&&(h+=s.getOuterText(!1,t));q--;)if(m=a[q][0],n=m.length,j=Math.max(0,k-n-r),i=f?h.substr(j).search(new RegExp("(?:"+p+")"+e.regex(m)+"(?="+p+")")):h.indexOf(m,j),i>-1&&(f&&(i+=j+1),i<=k&&i+n+r>=k))return l=k-i,s.selectOuterText(l,n-l-(/^\S/.test(g)?1:0)),s.insertHTML(a[q][1]),!0;return!1},s.compare=function(a,b){var c=o?Range.END_TO_END:"EndToEnd",d=o?Range.START_TO_START:"StartToStart",e=o?"compareBoundaryPoints":"compareEndPoints";return b||(b=s.selectedRange()),a&&b?k(a)&&k(b)&&0===a[e](c,b)&&0===a[e](d,b):!a&&!b},s.clear=function(){var a=o?n.getSelection():m.selection;a&&(a.removeAllRanges?a.removeAllRanges():a.empty&&a.empty())}};return k}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(6),e={},f={traverse:function(a,b,c,d,e){if(a)for(a=e?a.lastChild:a.firstChild;a;){var g=e?a.previousSibling:a.nextSibling;if(!c&&b(a)===!1||!d&&f.traverse(a,b,c,d,e)===!1||c&&b(a)===!1)return!1;a=g}},rTraverse:function(a,b,c,d){this.traverse(a,b,c,d,!0)},parseHTML:function(a,c){var d=[],e=(c||document).createElement("div");return e.innerHTML=a,b.merge(d,e.childNodes),d},hasStyling:function(a){var c=b(a);return a&&(!c.is("p,div")||a.className||c.attr("style")||!b.isEmptyObject(c.data()))},convertElement:function(a,b){for(var c,e,g=a.attributes,h=g.length,i=a.ownerDocument.createElement(b);h--;)if(e=g[h],!d.ie||e.specified)if(d.ie<8&&/style/i.test(e.name))f.copyCSS(a,i);else try{
i.setAttribute(e.name,e.value)}catch(a){}for(;c=a.firstChild;)i.appendChild(c);return a.parentNode.replaceChild(i,a),i},blockLevelList:"|body|hr|p|div|h1|h2|h3|h4|h5|h6|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|blockquote|center|",canHaveChildren:function(a){return!!/11?|9/.test(a.nodeType)&&"|iframe|area|base|basefont|br|col|frame|hr|img|input|wbr|isindex|link|meta|param|command|embed|keygen|source|track|object|".indexOf("|"+a.nodeName.toLowerCase()+"|")<0},isInline:function(a,b){var c,d=(a||{}).nodeType||3;return 1!==d?3===d:(c=a.tagName.toLowerCase(),"code"===c?!b:f.blockLevelList.indexOf("|"+c+"|")<0)},copyCSS:function(a,b){b.style.cssText=a.style.cssText+b.style.cssText},fixNesting:function(a){var b=function(a){for(;f.isInline(a.parentNode,!0);)a=a.parentNode;return a};f.traverse(a,function(a){if(1===a.nodeType&&!f.isInline(a,!0)&&f.isInline(a.parentNode,!0)){var c=b(a),d=c.parentNode,e=f.extractContents(c,a),g=a;f.copyCSS(c,g),d.insertBefore(e,c),d.insertBefore(g,c)}})},findCommonAncestor:function(a,c){return b(a).parents().has(b(c)).first()},getSibling:function(a,b){return a?(b?a.previousSibling:a.nextSibling)||f.getSibling(a.parentNode,b):null},removeWhiteSpace:function(a,c){for(var d,e,g,h,i,j,k,l,m=f.getSibling,n=f.isInline,o=a.firstChild;o;){if(k=o.nextSibling,d=o.nodeValue,e=o.nodeType,1===e&&o.firstChild&&(j=b(o).css("whiteSpace"),/pre(\-wrap)?$/i.test(j)||f.removeWhiteSpace(o,/line$/i.test(j))),3===e&&d){for(g=m(o),h=m(o,!0),l=!1;b(h).hasClass("sceditor-ignore");)h=m(h,!0);if(n(o)&&h){for(i=h;i.lastChild;)i=i.lastChild;l=3===i.nodeType?/[\t\n\r ]$/.test(i.nodeValue):!n(i)}d=d.replace(/\u200B/g,""),h&&n(h)&&!l||(d=d.replace(c?/^[\t ]+/:/^[\t\n\r ]+/,"")),g&&n(g)||(d=d.replace(c?/[\t ]+$/:/[\t\n\r ]+$/,"")),d.length?o.nodeValue=d.replace(c?/[\t ]+/g:/[\t\n\r ]+/g," "):a.removeChild(o)}o=k}},extractContents:function(a,c){var d,e=f.findCommonAncestor(a,c).get(0),g=!1,h=!1;return(d=function(e){var i,j=a.ownerDocument.createDocumentFragment();return f.traverse(e,function(e){return h||e===c?(h=!0,!1):(e===a&&(g=!0),void(b.contains(e,a)||g&&b.contains(e,c)?(i=e.cloneNode(!1),i.appendChild(d(e)),j.appendChild(i)):g&&!b.contains(j,e)&&j.appendChild(e)))},!1),j})(e)},getOffset:function(a){for(var b=0,c=0;a;)b+=a.offsetLeft,c+=a.offsetTop,a=a.offsetParent;return{left:b,top:c}},getStyle:function(a,c){var d,f,g,h=a.style;if(!h)return"";if(e[c]||(e[c]=b.camelCase(c)),c=e[c],g=h[c],"textAlign"===c){if(d=b(a),f=h.direction,g=g||d.css(c),d.parent().css(c)===g||"block"!==d.css("display")||d.is("hr")||d.is("th"))return"";if(/right/i.test(g)&&"rtl"===f||/left/i.test(g)&&"ltr"===f)return""}return g},hasStyle:function(a,c,d){var e=f.getStyle(a,c);return!!e&&(!d||e===d||b.isArray(d)&&b.inArray(e,d)>-1)}};return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a,b){"use strict";var d=c(1),e=navigator.userAgent;b.ie=function(){var a,b=3,c=document,d=c.createElement("div"),e=d.getElementsByTagName("i");do d.innerHTML="";while(e[0]);return c.documentMode&&c.all&&window.atob&&(b=10),4===b&&c.documentMode&&(b=11),b>4?b:a}(),b.ios=/iPhone|iPod|iPad| wosbrowser\//i.test(e),b.isWysiwygSupported=function(){var a,c,f,g=d('')[0].contentEditable;return g!==f&&"inherit"!==g&&(c=/Opera Mobi|Opera Mini/i.test(e),/Android/i.test(e)&&(c=!0,/Safari/.test(e)&&(a=/Safari\/(\d+)/.exec(e),c=!a||!a[1]||a[1]<534)),/ Silk\//i.test(e)&&(a=/AppleWebKit\/(\d+)/.exec(e),c=!a||!a[1]||a[1]<534),b.ios&&(c=/OS [0-4](_\d)+ like Mac/i.test(e)),/Firefox/i.test(e)&&(c=!1),/OneBrowser/i.test(e)&&(c=!1),"UCWEB"===navigator.vendor&&(c=!1),!c)}()}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a,b){"use strict";var c=/^(?:https?|s?ftp|mailto|spotify|skype|ssh|teamspeak|tel):|(?:\/\/)/i;b.regex=function(a){return a.replace(/([\-.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")},b.entities=function(a,b){if(!a)return a;var c={"&":"&","<":"<",">":">"," ":" ","\r\n":"\n","\r":"\n","\n":" "};return b!==!1&&(c['"']=""",c["'"]="'",c["`"]="`"),a=a.replace(/ {2}|\r\n|[&<>\r\n'"`]/g,function(a){return c[a]||a})},b.uriScheme=function(a){var b,d=/^[^\/]*:/i,e=window.location;return a&&d.test(a)&&!c.test(a)?(b=e.pathname.split("/"),b.pop(),e.protocol+"//"+e.host+b.join("/")+"/"+a):a}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(){"use strict";var a={html:'
',toolbarButton:'{dispName}
',emoticon:' ',fontOpt:'{font} ',sizeOpt:'{size} ',pastetext:'{label}
',table:'{rows}
{cols}
',image:'{url}
{width}
{height}
',email:'{label}
{desc}
',link:'{url}
{desc}
',youtubeMenu:'{label}
',youtube:'VIDEO '};return function(b,c,d){var e=a[b];return $.each(c,function(a,b){e=e.replace(new RegExp("\\{"+a+"\\}","g"),b)}),d&&(e=$(e)),e}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(6).ie,e=c(8),f=d&&d<11,g={bold:{exec:"bold",tooltip:"Bold",shortcut:"Ctrl+B"},italic:{exec:"italic",tooltip:"Italic",shortcut:"Ctrl+I"},underline:{exec:"underline",tooltip:"Underline",shortcut:"Ctrl+U"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(a,c,d){for(var f=0,g=a.opts.fonts.split(","),h=b("
"),i=function(){return d(b(this).data("font")),a.closeDropDown(!0),!1};f "),g=function(c){d(b(this).data("size")),a.closeDropDown(!0),c.preventDefault()},h=1;h<=7;h++)f.append(e("sizeOpt",{size:h},!0).click(g));a.createDropDown(c,"fontsize-picker",f)},exec:function(a){var b=this;g.size._dropDown(b,a,function(a){b.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(a,c,d){var e,f,h,i,j={r:255,g:255,b:255},k=b("
"),l=a.opts.colors?a.opts.colors.split("|"):new Array(21),m=[],n=g.color;if(!n._htmlCache){for(e=0;e'),f=0;f'),f%5===0?(j.g-=51,j.b=255):j.b-=51;m.push(" "),e%5===0?(j.r-=51,j.g=255,j.b=255):(j.g=255,j.b=255)}n._htmlCache=m.join("")}k.append(n._htmlCache).find("a").click(function(c){d(b(this).attr("data-color")),a.closeDropDown(!0),c.preventDefault()}),a.createDropDown(c,"color-picker",k)},exec:function(a){var b=this;g.color._dropDown(b,a,function(a){b.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c,d=this;c=e("pastetext",{label:d._("Paste your text inside the following box:"),insert:d._("Insert")},!0),c.find(".button").click(function(a){b=c.find("#txt").val(),b&&d.wysiwygEditorInsertText(b),d.closeDropDown(!0),a.preventDefault()}),d.createDropDown(a,"pastetext",c)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},indent:{state:function(a,c){var d,e,f,g=b(c),h=g.parents("ul,ol,menu"),i=h.first();if(h.length>1||i.children().length>1)return 0;if(g.is("ul,ol,menu")){if(d=this.getRangeHelper().selectedRange(),!(window.Range&&d instanceof Range))return g.is("li,ul,ol,menu")?0:-1;if(e=d.startContainer.parentNode,f=d.endContainer.parentNode,e!==e.parentNode.firstElementChild||b(f).is("li")&&f!==f.parentNode.lastElementChild)return 0}return-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());a.focus(),c.parents("ul,ol,menu")&&a.execCommand("indent")},tooltip:"Add indent"},outdent:{state:function(a,c){return b(c).is("ul,ol,menu")||b(c).parents("ul,ol,menu").length>0?0:-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());c.parents("ul,ol,menu")&&a.execCommand("outdent")},tooltip:"Remove one indent"},table:{forceNewLineAfter:["table"],exec:function(a){var b=this,c=e("table",{rows:b._("Rows:"),cols:b._("Cols:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d,e,g=c.find("#rows").val()-0,h=c.find("#cols").val()-0,i="