text: /* SCEditor v2.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */
  
  !function(t){"use strict";function e(t,e){return t.replace(/\{([^}]+)\}/g,function(t,n){var r=!0;return"!"===n.charAt(0)&&(r=!1,n=n.substring(1)),"0"===n&&(r=!1),void 0===e[n]?t:r?f(e[n],!0):e[n]})}function n(t){var e,n,r,i=document.createElement("div");return r=function(t,e){if(!d.hasStyling(t)){if(k||1!==t.childNodes.length||!b(t.firstChild,"br"))for(;n=t.firstChild;)i.insertBefore(n,t);if(e){var r=i.lastChild;t!==r&&b(r,"div")&&t.nextSibling===r&&i.insertBefore(document.createElement("br"),t)}i.removeChild(t)}},p(i,"display","none"),i.innerHTML=t.replace(/<\/div>\n/g,"</div>"),(e=i.firstChild)&&b(e,"div")&&r(e,!0),(e=i.lastChild)&&b(e,"div")&&r(e),i.innerHTML}function r(t){return"function"==typeof t}function i(t){return t?t.replace(/\\(.)/g,"$1").replace(/^(["'])(.*?)\1$/,"$2"):t}function l(){var t=arguments;return t[0].replace(/\{(\d+)\}/g,function(e,n){return void 0!==t[n-0+1]?t[n-0+1]:"{"+n+"}"})}function o(t,e,n,r,i,l){var o=this;o.type=t,o.name=e,o.val=n,o.attrs=r||{},o.children=i||[],o.closing=l||null}function a(t){function n(t,e){var n,r,i,a=/\[([^\]\s=]+)(?:([^\]]+))?\]/,s=/\[\/([^\[\]]+)\]/;return t===T&&(n=e.match(a))&&(i=x(n[1]),n[2]&&(n[2]=n[2].trim())&&(r=l(n[2]))),t===L&&(n=e.match(s))&&(i=x(n[1])),t===q&&(i="#newline"),i&&(t!==T&&t!==L||I[i])||(t=S,i="#"),new o(t,i,e,r)}function l(t){var e,n=/([^\s=]+)=(?:(?:(["'])((?:\\\2|[^\2])*?)\2)|((?:.(?!\s\S+=))*.))/g,r={};if("="===t.charAt(0)&&t.indexOf("=",1)<0)r.defaultattr=i(t.substr(1));else for("="===t.charAt(0)&&(t="defaultattr"+t);e=n.exec(t);)r[x(e[1])]=i(e[3])||e[4];return r}function s(t,e,n){for(var r=n.length;r--;)if(n[r].type===e&&n[r].name===t)return!0;return!1}function u(t,e){var n=(t?I[t.name]:{}).allowedChildren;return!w.opts.fixInvalidChildren||!n||n.indexOf(e.name||"#")>-1}function c(t){for(var e,n,r,i,l,o,a=[],c=[],f=[],h=function(){return y(f)},d=function(t){h()?h().children.push(t):c.push(t)},m=function(t){return h()&&(n=I[h().name])&&n.closedBy&&n.closedBy.indexOf(t)>-1};e=t.shift();)switch(o=t[0],u(h(),e)||e.type===L&&h()&&e.name===h().name||(e.name="#",e.type=S),e.type){case T:m(e.name)&&f.pop(),d(e),(n=I[e.name])&&!n.isSelfClosing&&(n.closedBy||s(e.name,L,t))?f.push(e):n&&n.isSelfClosing||(e.type=S);break;case L:if(h()&&e.name!==h().name&&m("/"+e.name)&&f.pop(),h()&&e.name===h().name)h().closing=e,f.pop();else if(s(e.name,T,f)){for(;r=f.pop();){if(r.name===e.name){r.closing=e;break}i=r.clone(),a.length&&i.children.push(y(a)),a.push(i)}for(o&&o.type===q&&(n=I[e.name])&&!1===n.isInline&&(d(o),t.shift()),d(y(a)),l=a.length;l--;)f.push(a[l]);a.length=0}else e.type=S,d(e);break;case q:h()&&o&&m((o.type===L?"/":"")+o.name)&&(o.type===L&&o.name===h().name||((n=I[h().name])&&n.breakAfter?f.pop():n&&!1===n.isInline&&w.opts.breakAfterBlock&&!1!==n.breakAfter&&f.pop())),d(e);break;default:d(e)}return c}function h(t,e,n){var r,i,l,o,a,s,u,c,f=t.length;e&&(o=I[e.name]);for(var d=f;d--;)if(r=t[d])if(r.type===q){if(i=d>0?t[d-1]:null,l=d<f-1?t[d+1]:null,c=!1,!n&&o&&!0!==o.isSelfClosing&&(i?s||l||(!1===o.isInline&&w.opts.breakEndBlock&&!1!==o.breakEnd&&(c=!0),o.breakEnd&&(c=!0),s=c):(!1===o.isInline&&w.opts.breakStartBlock&&!1!==o.breakStart&&(c=!0),o.breakStart&&(c=!0))),i&&i.type===T&&(a=I[i.name])&&(n?!1===a.isInline&&(c=!0):(!1===a.isInline&&w.opts.breakAfterBlock&&!1!==a.breakAfter&&(c=!0),a.breakAfter&&(c=!0))),!n&&!u&&l&&l.type===T&&(a=I[l.name])&&(!1===a.isInline&&w.opts.breakBeforeBlock&&!1!==a.breakBefore&&(c=!0),a.breakBefore&&(c=!0),u=c,c)){t.splice(d,1);continue}c&&t.splice(d,1),u=!1}else r.type===T&&h(r.children,r,n)}function d(t,e,n,r){var i,l,o,a,s,c,f=function(t){var e=I[t.name];return!e||!1!==e.isInline};for(e=e||[],r=r||t,l=0;l<t.length;l++)if((i=t[l])&&i.type===T){if(n&&!f(i)){if(o=y(e),c=o.splitAt(i),s=e.length>1?e[e.length-2].children:r,u(i,o)){var h=o.clone();h.children=i.children,i.children=[h]}if((a=s.indexOf(o))>-1){c.children.splice(0,1),s.splice(a+1,0,i,c);var m=c.children[0];return void(m&&m.type===q&&(f(i)||(c.children.splice(0,1),s.splice(a+2,0,m))))}}e.push(i),d(i.children,e,n||f(i),r),e.pop(i)}}function m(t){for(var e,n,r=t.length;r--;)(e=t[r])&&e.type===T&&(n=I[e.name],m(e.children),function(t){for(var e=t.length;e--;){var n=t[e].type;if(n===T||n===L)return!1;if(n===S&&/\S|\u00A0/.test(t[e].val))return!1}return!0}(e.children)&&n&&!n.isSelfClosing&&!n.allowsEmpty&&t.splice.apply(t,[r,1].concat(e.children)))}function p(t,n){var i,l,o,a,s,u,c,h,d=[];for(c=function(t){return!1!==(!t||(void 0!==t.isHtmlInline?t.isHtmlInline:t.isInline))};t.length>0;)if(i=t.shift()){if(i.type===T)h=i.children[i.children.length-1]||{},l=I[i.name],s=n&&c(l),o=p(i.children,!1),l&&l.html?(c(l)||!c(I[h.name])||l.isPreFormatted||l.skipLastLineBreak||k||(o+="<br />"),r(l.html)?a=l.html.call(w,i,i.attrs,o):(i.attrs[0]=o,a=e(l.html,i.attrs))):a=i.val+o+(i.closing?i.closing.val:"");else{if(i.type===q){if(!n){d.push("<br />");continue}u||d.push("<div>"),k||d.push("<br />"),t.length||d.push("<br />"),d.push("</div>\n"),u=!1;continue}s=n,a=f(i.val,!0)}s&&!u?(d.push("<div>"),u=!0):!s&&u&&(d.push("</div>\n"),u=!1),d.push(a)}return u&&d.push("</div>\n"),d.join("")}function g(t){for(var e,n,r,i,l,o,a,s,u,c,f=[];t.length>0;)if(e=t.shift())if(r=I[e.name],i=!(!r||!1!==r.isInline),l=r&&r.isSelfClosing,a=i&&w.opts.breakBeforeBlock&&!1!==r.breakBefore||r&&r.breakBefore,s=i&&!l&&w.opts.breakStartBlock&&!1!==r.breakStart||r&&r.breakStart,u=i&&w.opts.breakEndBlock&&!1!==r.breakEnd||r&&r.breakEnd,c=i&&w.opts.breakAfterBlock&&!1!==r.breakAfter||r&&r.breakAfter,o=(r?r.quoteType:null)||w.opts.quoteType||E.auto,r||e.type!==T)if(e.type===T){if(a&&f.push("\n"),f.push("["+e.name),e.attrs){e.attrs.defaultattr&&(f.push("=",b(e.attrs.defaultattr,o,"defaultattr")),delete e.attrs.defaultattr);for(n in e.attrs)e.attrs.hasOwnProperty(n)&&f.push(" ",n,"=",b(e.attrs[n],o,n))}f.push("]"),s&&f.push("\n"),e.children&&f.push(g(e.children)),l||r.excludeClosing||(u&&f.push("\n"),f.push("[/"+e.name+"]")),c&&f.push("\n"),e.closing&&l&&f.push(e.closing.val)}else f.push(e.val);else f.push(e.val),e.children&&f.push(g(e.children)),e.closing&&f.push(e.closing.val);return f.join("")}function b(t,e,n){var i=/\s|=/.test(t);return r(e)?e(t,n):e===E.never||e===E.auto&&!i?t:'"'+t.replace("\\","\\\\").replace('"','\\"')+'"'}function y(t){return t.length?t[t.length-1]:null}function x(t){return t.toLowerCase()}var w=this;w.opts=v({},a.defaults,t),w.tokenize=function(t){var e,r,i,l=[],o=[{type:L,regex:/^\[\/[^\[\]]+\]/},{type:T,regex:/^\[[^\[\]]+\]/},{type:q,regex:/^(\r\n|\r|\n)/},{type:S,regex:/^([^\[\r\n]+|\[)/}];o.reverse();t:for(;t.length;){for(i=o.length;i--;)if(r=o[i].type,(e=t.match(o[i].regex))&&e[0]){l.push(n(r,e[0])),t=t.substr(e[0].length);continue t}t.length&&l.push(n(S,t)),t=""}return l},w.parse=function(t,e){var n=c(w.tokenize(t)),r=w.opts;return r.fixInvalidNesting&&d(n),h(n,null,e),r.removeEmptyTags&&m(n),n},w.toHTML=function(t,e){return p(w.parse(t,e),!0)},w.toBBCode=function(t,e){return g(w.parse(t,e))}}function s(t){return t=parseInt(t,10),isNaN(t)?"00":(t=Math.max(0,Math.min(t,255)).toString(16)).length<2?"0"+t:t}function u(t){var e;return t=t||"#000",(e=t.match(/rgb\((\d{1,3}),\s*?(\d{1,3}),\s*?(\d{1,3})\)/i))?"#"+s(e[1])+s(e[2]-0)+s(e[3]-0):(e=t.match(/#([0-f])([0-f])([0-f])\s*?$/i))?"#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]:t}function c(){function t(){y(I,function(t){var e,n=I[t].tags,r=I[t].styles;n&&y(n,function(n,r){e=!1===I[t].isInline,h[n]=h[n]||{},h[n][e]=h[n][e]||{},h[n][e][t]=r}),r&&y(r,function(n,r){e=!1===I[t].isInline,m[e]=m[e]||{},m[e][n]=m[e][n]||{},m[e][n][t]=r})})}function e(t,e,n){var i,o,a=d.getStyle;return n=!!n,m[n]?(y(m[n],function(n,s){(i=a(t,n))&&a(t.parentNode,n)!==i&&y(s,function(n,a){(!a||a.indexOf(i.toString())>-1)&&(o=I[n].format,e=r(o)?o.call(f,t,e):l(o,e))})}),e):e}function o(t,e,n){var i,o,a=t.nodeName.toLowerCase();n=!!n,h[a]&&h[a][n]&&y(h[a][n],function(n,a){a&&(i=!1,y(a,function(e,n){if(g(t,e)&&!(n&&n.indexOf(g(t,e))<0))return i=!0,!1}),!i)||(o=I[n].format,e=r(o)?o.call(f,t,e):l(o,e))});var s=d.isInline;if(n&&(!s(t,!0)||"br"===a)){for(var u,c,m=t.previousSibling;m&&1===m.nodeType&&!b(m,"br")&&s(m,!0)&&!m.firstChild;)m=m.previousSibling;do{u=((c=t.parentNode)&&c.lastChild)===t,t=c}while(c&&u&&s(c,!0));(!u||"li"===a||"br"===a&&k)&&(e+="\n"),"br"!==a&&m&&!b(m,"br")&&s(m,!0)&&(e="\n"+e)}return e}function s(t){var n=function(t,r){var i="";return d.traverse(t,function(t){var l="",a=t.nodeType,s=t.nodeName.toLowerCase(),u=x[s],c=t.firstChild,f=!0;if("object"==typeof r&&(f=r.indexOf(s)>-1,b(t,"img")&&g(t,w)&&(f=!0),f||(u=r)),3===a||1===a)if(1===a){if(b(t,".sceditor-nlf")&&(!c||!k&&1===t.childNodes.length&&/br/i.test(c.nodeName)))return;"iframe"!==s&&(l=n(t,u)),f?("code"!==s&&(l=e(t,l=o(t,l=e(t,l)),!0)),i+=o(t,l,!0)):i+=l}else i+=t.nodeValue},!1,!0),i};return n(t)}function u(t,e,r){var i=new a(f.opts.parserOptions).toHTML(f.opts.bbcodeTrim?e.trim():e);return t||r?n(i):i}function c(t,e,n,r){var i,l,o=(n=n||document).createElement("div"),u=n.createElement("div"),c=new a(f.opts.parserOptions);for(u.innerHTML=e,p(o,"visibility","hidden"),o.appendChild(u),n.body.appendChild(o),t&&(o.insertBefore(n.createTextNode("#"),o.firstChild),o.appendChild(n.createTextNode("#"))),r&&p(u,"whiteSpace",p(r,"whiteSpace")),l=u.getElementsByClassName("sceditor-ignore");l.length;)l[0].parentNode.removeChild(l[0]);return d.removeWhiteSpace(o),i=s(u),n.body.removeChild(o),i=c.toBBCode(i,!0),f.opts.bbcodeTrim&&(i=i.trim()),i}var f=this;f.stripQuotes=i;var h={},m={},x={ul:["li","ol","ul"],ol:["li","ol","ul"],table:["tr"],tr:["td","th"],code:["br","p","div"]};f.init=function(){f.opts=this.opts,f.elementToBbcode=s,t(),this.commands=v(!0,{},C,this.commands),this.toBBCode=f.toSource,this.fromBBCode=f.toHtml},f.toHtml=u.bind(null,!1),f.fragmentToHtml=u.bind(null,!0),f.toSource=c.bind(null,!1),f.fragmentToSource=c.bind(null,!0)}var f=t.escapeEntities,h=t.escapeUriScheme,d=t.dom,m=t.utils,p=d.css,g=d.attr,b=d.is,v=m.extend,y=m.each,x=t.ie,k=x&&x<11,w="data-sceditor-emoticon",B=t.command.get,E={always:1,never:2,auto:3},C={bold:{txtExec:["[b]","[/b]"]},italic:{txtExec:["[i]","[/i]"]},underline:{txtExec:["[u]","[/u]"]},strike:{txtExec:["[s]","[/s]"]},subscript:{txtExec:["[sub]","[/sub]"]},superscript:{txtExec:["[sup]","[/sup]"]},left:{txtExec:["[left]","[/left]"]},center:{txtExec:["[center]","[/center]"]},right:{txtExec:["[right]","[/right]"]},justify:{txtExec:["[justify]","[/justify]"]},font:{txtExec:function(t){var e=this;B("font")._dropDown(e,t,function(t){e.insertText("[font="+t+"]","[/font]")})}},size:{txtExec:function(t){var e=this;B("size")._dropDown(e,t,function(t){e.insertText("[size="+t+"]","[/size]")})}},color:{txtExec:function(t){var e=this;B("color")._dropDown(e,t,function(t){e.insertText("[color="+t+"]","[/color]")})}},bulletlist:{txtExec:function(t,e){var n="";y(e.split(/\r?\n/),function(){n+=(n?"\n":"")+"[li]"+this+"[/li]"}),this.insertText("[ul]\n"+n+"\n[/ul]")}},orderedlist:{txtExec:function(t,e){var n="";y(e.split(/\r?\n/),function(){n+=(n?"\n":"")+"[li]"+this+"[/li]"}),this.insertText("[ol]\n"+n+"\n[/ol]")}},table:{txtExec:["[table][tr][td]","[/td][/tr][/table]"]},horizontalrule:{txtExec:["[hr]"]},code:{txtExec:["[code]","[/code]"]},image:{txtExec:function(t,e){var n=this;B("image")._dropDown(n,t,e,function(t,e,r){var i="";e&&(i+=" width="+e),r&&(i+=" height="+r),n.insertText("[img"+i+"]"+t+"[/img]")})}},email:{txtExec:function(t,e){var n=this;B("email")._dropDown(n,t,function(t,r){n.insertText("[email="+t+"]"+(r||e||t)+"[/email]")})}},link:{txtExec:function(t,e){var n=this;B("link")._dropDown(n,t,function(t,r){n.insertText("[url="+t+"]"+(r||e||t)+"[/url]")})}},quote:{txtExec:["[quote]","[/quote]"]},youtube:{txtExec:function(t){var e=this;B("youtube")._dropDown(e,t,function(t){e.insertText("[youtube]"+t+"[/youtube]")})}},rtl:{txtExec:["[rtl]","[/rtl]"]},ltr:{txtExec:["[ltr]","[/ltr]"]}},I={b:{tags:{b:null,strong:null},styles:{"font-weight":["bold","bolder","401","700","800","900"]},format:"[b]{0}[/b]",html:"<strong>{0}</strong>"},i:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"<em>{0}</em>"},u:{tags:{u:null},styles:{"text-decoration":["underline"]},format:"[u]{0}[/u]",html:"<u>{0}</u>"},s:{tags:{s:null,strike:null},styles:{"text-decoration":["line-through"]},format:"[s]{0}[/s]",html:"<s>{0}</s>"},sub:{tags:{sub:null},format:"[sub]{0}[/sub]",html:"<sub>{0}</sub>"},sup:{tags:{sup:null},format:"[sup]{0}[/sup]",html:"<sup>{0}</sup>"},font:{tags:{font:{face:null}},styles:{"font-family":null},quoteType:E.never,format:function(t,e){var n;return b(t,"font")&&(n=g(t,"face"))||(n=p(t,"font-family")),"[font="+i(n)+"]"+e+"[/font]"},html:'<font face="{defaultattr}">{0}</font>'},size:{tags:{font:{size:null}},styles:{"font-size":null},format:function(t,e){var n=g(t,"size"),r=2;return n||(n=p(t,"fontSize")),n.indexOf("px")>-1?((n=n.replace("px","")-0)<12&&(r=1),n>15&&(r=3),n>17&&(r=4),n>23&&(r=5),n>31&&(r=6),n>47&&(r=7)):r=n,"[size="+r+"]"+e+"[/size]"},html:'<font size="{defaultattr}">{!0}</font>'},color:{tags:{font:{color:null}},styles:{color:null},quoteType:E.never,format:function(t,e){var n;return b(t,"font")&&(n=g(t,"color"))||(n=t.style.color||p(t,"color")),"[color="+u(n)+"]"+e+"[/color]"},html:function(t,e,n){return'<font color="'+f(u(e.defaultattr),!0)+'">'+n+"</font>"}},ul:{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ul]{0}[/ul]",html:"<ul>{0}</ul>"},list:{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:"<ul>{0}</ul>"},ol:{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ol]{0}[/ol]",html:"<ol>{0}</ol>"},li:{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],format:"[li]{0}[/li]",html:"<li>{0}</li>"},"*":{isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:"<li>{0}</li>"},table:{tags:{table:null},isInline:!1,isHtmlInline:!0,skipLastLineBreak:!0,format:"[table]{0}[/table]",html:"<table>{0}</table>"},tr:{tags:{tr:null},isInline:!1,skipLastLineBreak:!0,format:"[tr]{0}[/tr]",html:"<tr>{0}</tr>"},th:{tags:{th:null},allowsEmpty:!0,isInline:!1,format:"[th]{0}[/th]",html:"<th>{0}</th>"},td:{tags:{td:null},allowsEmpty:!0,isInline:!1,format:"[td]{0}[/td]",html:"<td>{0}</td>"},emoticon:{allowsEmpty:!0,tags:{img:{src:null,"data-sceditor-emoticon":null}},format:function(t,e){return g(t,w)+e},html:"{0}"},hr:{tags:{hr:null},allowsEmpty:!0,isSelfClosing:!0,isInline:!1,format:"[hr]{0}",html:"<hr />"},img:{allowsEmpty:!0,tags:{img:{src:null}},allowedChildren:["#"],quoteType:E.never,format:function(t,e){var n,r,i="",l=function(e){return t.style?t.style[e]:null};return g(t,w)?e:(n=g(t,"width")||l("width"),r=g(t,"height")||l("height"),(t.complete&&(n||r)||n&&r)&&(i="="+d.width(t)+"x"+d.height(t)),"[img"+i+"]"+g(t,"src")+"[/img]")},html:function(t,e,n){var r,i,l,o="";return r=e.width,i=e.height,e.defaultattr&&(r=(l=e.defaultattr.split(/x/i))[0],i=2===l.length?l[1]:l[0]),void 0!==r&&(o+=' width="'+f(r,!0)+'"'),void 0!==i&&(o+=' height="'+f(i,!0)+'"'),"<img"+o+' src="'+h(n)+'" />'}},url:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:E.never,format:function(t,e){var n=g(t,"href");return"mailto:"===n.substr(0,7)?'[email="'+n.substr(7)+'"]'+e+"[/email]":"[url="+n+"]"+e+"[/url]"},html:function(t,e,n){return e.defaultattr=f(e.defaultattr,!0)||n,'<a href="'+h(e.defaultattr)+'">'+n+"</a>"}},email:{quoteType:E.never,html:function(t,e,n){return'<a href="mailto:'+(f(e.defaultattr,!0)||n)+'">'+n+"</a>"}},quote:{tags:{blockquote:null},isInline:!1,quoteType:E.never,format:function(t,e){for(var n,r="",i=t.children,l=0;!n&&l<i.length;l++)b(i[l],"cite")&&(n=i[l]);return(n||g(t,"data-author"))&&(r=n&&n.textContent||g(t,"data-author"),g(t,"data-author",r),n&&t.removeChild(n),e=this.elementToBbcode(t),r="="+r.replace(/(^\s+|\s+$)/g,""),n&&t.insertBefore(n,t.firstChild)),"[quote"+r+"]"+e+"[/quote]"},html:function(t,e,n){return e.defaultattr&&(n="<cite>"+f(e.defaultattr)+"</cite>"+n),"<blockquote>"+n+"</blockquote>"}},code:{tags:{code:null},isInline:!1,allowedChildren:["#","#newline"],format:"[code]{0}[/code]",html:"<code>{0}</code>"},left:{styles:{"text-align":["left","-webkit-left","-moz-left","-khtml-left"]},isInline:!1,format:"[left]{0}[/left]",html:'<div align="left">{0}</div>'},center:{styles:{"text-align":["center","-webkit-center","-moz-center","-khtml-center"]},isInline:!1,format:"[center]{0}[/center]",html:'<div align="center">{0}</div>'},right:{styles:{"text-align":["right","-webkit-right","-moz-right","-khtml-right"]},isInline:!1,format:"[right]{0}[/right]",html:'<div align="right">{0}</div>'},justify:{styles:{"text-align":["justify","-webkit-justify","-moz-justify","-khtml-justify"]},isInline:!1,format:"[justify]{0}[/justify]",html:'<div align="justify">{0}</div>'},youtube:{allowsEmpty:!0,tags:{iframe:{"data-youtube-id":null}},format:function(t,e){return(t=g(t,"data-youtube-id"))?"[youtube]"+t+"[/youtube]":e},html:'<iframe width="560" height="315" frameborder="0" src="https://www.youtube.com/embed/{0}?wmode=opaque" data-youtube-id="{0}" allowfullscreen></iframe>'},rtl:{styles:{direction:["rtl"]},format:"[rtl]{0}[/rtl]",html:'<div style="direction: rtl">{0}</div>'},ltr:{styles:{direction:["ltr"]},format:"[ltr]{0}[/ltr]",html:'<div style="direction: ltr">{0}</div>'},ignore:{}},T="open",S="content",q="newline",L="close";o.prototype={clone:function(){var t=this;return new o(t.type,t.name,t.val,v({},t.attrs),[],t.closing?t.closing.clone():null)},splitAt:function(t){var e,n=this,r=n.clone(),i=n.children.indexOf(t);return i>-1&&(e=n.children.length-i,r.children=n.children.splice(i,e)),r}},a.QuoteType=E,a.defaults={breakBeforeBlock:!1,breakStartBlock:!1,breakEndBlock:!1,breakAfterBlock:!0,removeEmptyTags:!0,fixInvalidNesting:!0,fixInvalidChildren:!0,quoteType:E.auto},c.get=function(t){return I[t]||null},c.set=function(t,e){return t&&e&&((e=v(I[t]||{},e)).remove=function(){delete I[t]},I[t]=e),this},c.rename=function(t,e){return t in I&&(I[e]=I[t],delete I[t]),this},c.remove=function(t){return t in I&&delete I[t],this},c.formatBBCodeString=e,t.formats.bbcode=c,t.BBCodeParser=a}(sceditor);