diff --git a/.gitignore b/.gitignore index c593b486..f88a10e6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,8 @@ bl-themes/editorial bl-themes/mediumish bl-themes/clean-blog bl-themes/grayscale +bl-themes/massively +bl-themes/hyperspace +bl-themes/striped +bl-themes/log +bl-themes/micro \ No newline at end of file diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index d3fb3a2c..46f5448f 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -5,6 +5,8 @@ // ============================================================================ function updateBludit() { global $site; + global $syslog; + // New installation if ($site->currentBuild()==0) { $site->set(array('currentBuild'=>BLUDIT_BUILD)); @@ -36,6 +38,12 @@ function updateBludit() { // Set the current build number $site->set(array('currentBuild'=>BLUDIT_BUILD)); Log::set('UPDATE SYSTEM - Finished.'); + + // Add to syslog + $syslog->add(array( + 'dictionaryKey'=>'system-updated', + 'notes'=>'Bludit v'.BLUDIT_VERSION + )); } } diff --git a/bl-kernel/admin/controllers/edit-user.php b/bl-kernel/admin/controllers/edit-user.php index 9e23f6b1..7caa38e4 100644 --- a/bl-kernel/admin/controllers/edit-user.php +++ b/bl-kernel/admin/controllers/edit-user.php @@ -19,20 +19,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { unset($_POST['role']); } - if (isset($_POST['deleteUserAndDeleteContent'])) { + if (isset($_POST['deleteUserAndDeleteContent']) && ($login->role()==='admin')) { $_POST['deleteContent'] = true; deleteUser($_POST); - } elseif (isset($_POST['deleteUserAndKeepContent'])) { + } elseif (isset($_POST['deleteUserAndKeepContent']) && ($login->role()==='admin')) { $_POST['deleteContent'] = false; deleteUser($_POST); - } elseif (isset($_POST['disableUser'])) { + } elseif (isset($_POST['disableUser']) && ($login->role()==='admin')) { disableUser(array('username'=>$_POST['username'])); } else { editUser($_POST); } Alert::set($L->g('The changes have been saved')); - Redirect::page('users'); + + if ($login->role()==='admin') { + Redirect::page('users'); + } + Redirect::page('edit-user/'.$login->username()); } // ============================================================================ diff --git a/bl-kernel/admin/controllers/install-theme.php b/bl-kernel/admin/controllers/install-theme.php index 1a3dabfa..f6b69bf2 100644 --- a/bl-kernel/admin/controllers/install-theme.php +++ b/bl-kernel/admin/controllers/install-theme.php @@ -21,20 +21,10 @@ checkRole(array('admin')); // ============================================================================ // Main after POST // ============================================================================ -$themeDirname = $layout['parameters']; +$themeDirectory = $layout['parameters']; -if (Sanitize::pathFile(PATH_THEMES.$themeDirname)) { - $site->set(array('theme'=>$themeDirname)); - - // Add to syslog - $syslog->add(array( - 'dictionaryKey'=>'new-theme-configured', - 'notes'=>$themeDirname - )); - - // Create an alert - Alert::set( $L->g('The changes have been saved') ); -} +// Activate theme +activateTheme($themeDirectory); // Redirect Redirect::page('themes'); diff --git a/bl-kernel/admin/controllers/new-category.php b/bl-kernel/admin/controllers/new-category.php index 22ac496f..c60220d6 100644 --- a/bl-kernel/admin/controllers/new-category.php +++ b/bl-kernel/admin/controllers/new-category.php @@ -19,7 +19,7 @@ checkRole(array('admin')); // ============================================================================ if ($_SERVER['REQUEST_METHOD'] == 'POST') { - if (createCategory($_POST['category'])) { + if (createCategory($_POST)) { Redirect::page('categories'); } } diff --git a/bl-kernel/admin/controllers/user-password.php b/bl-kernel/admin/controllers/user-password.php index bc92811b..491f4ae7 100644 --- a/bl-kernel/admin/controllers/user-password.php +++ b/bl-kernel/admin/controllers/user-password.php @@ -20,7 +20,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { 'newPassword'=>$_POST['newPassword'], 'confirmPassword'=>$_POST['confirmPassword'] ))) { - Redirect::page('users'); + if ($login->role()==='admin') { + Redirect::page('users'); + } + Redirect::page('edit-user/'.$login->username()); } } diff --git a/bl-kernel/admin/themes/booty/css/bludit.css b/bl-kernel/admin/themes/booty/css/bludit.css index e5f32e29..2b5f6ddb 100644 --- a/bl-kernel/admin/themes/booty/css/bludit.css +++ b/bl-kernel/admin/themes/booty/css/bludit.css @@ -81,9 +81,22 @@ code { cursor: pointer; } +.modal-body { + padding: 2rem; +} + +.modal-footer { + background-color: rgb(247, 247, 247); +} + +.modal-dialog .btn-link { + color: #000; +} + /* LOGIN */ + body.login { background: rgb(255,255,255); background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%); @@ -140,7 +153,6 @@ body.login { /* Create a dashed line with a pattern */ } -/* This selector overrides the points style on line charts. Points on line charts are actually just very short strokes. This allows you to customize even the point size in CSS */ .ct-series-a .ct-point { /* Colour of your points */ stroke: #4a90e2; @@ -151,6 +163,7 @@ body.login { /* ALERT */ + #alert { display: none; position: fixed; @@ -165,17 +178,20 @@ body.login { .alert-success { background-color: #4586d4; + border-left: 6px solid #abd1ff !important; color: #ffffff; } .alert-danger { background-color: #d44545; + border-left: 6px solid #ff9c9c !important; color: #ffffff; } /* SIDEBAR */ + div.sidebar .nav-item a { padding-left:0; padding-right:0; @@ -204,6 +220,7 @@ div.sidebar .nav-item span.oi { /* PLUGINS */ + .plugin-form label { display: block; margin-top: 1rem !important; @@ -256,3 +273,70 @@ td.child { line-height: 1.5em; } + +#jseditorSidebar { + display: none; + height: calc(100% - 45px); + width: 50%; + max-width: 350px; + position: absolute; + z-index: 50; + top: 45px; + right: 15px; + background-color: #fff; + overflow-x: hidden; + transition: 0.5s; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-top: 1px solid #ccc; +} + +@media (max-width: 575.98px) { + #jseditorSidebar { + width: 100%; + max-width: 100%; + right: 0; + } + #jseditorToolbarRight button { + font-size: 0px !important; + } + #jseditorToolbarRight button span { + font-size: 16px !important; + } +} + +#jseditorSidebar nav { + background: #f3f3f3; +} + +#jseditorSidebar nav a { + color: #000; +} + +#jseditorSidebar .nav-tabs .nav-link { + border: none; +} + +#jseditorSidebar .nav-link.active { + background: none; + border: none; + border-bottom: 3px solid #ccc; +} + +#jsshadow { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(255,255,255,0.7); + z-index: 10; + display: none; +} + +img.profilePicture { + width: 30px; + border-radius: 30px; + border: 1px solid #ccc; +} + diff --git a/bl-kernel/admin/themes/booty/html/sidebar.php b/bl-kernel/admin/themes/booty/html/sidebar.php index bca9461a..fad9080f 100644 --- a/bl-kernel/admin/themes/booty/html/sidebar.php +++ b/bl-kernel/admin/themes/booty/html/sidebar.php @@ -17,10 +17,13 @@ - + + diff --git a/bl-kernel/admin/themes/booty/index.php b/bl-kernel/admin/themes/booty/index.php index 18da30e4..1f1b48d9 100644 --- a/bl-kernel/admin/themes/booty/index.php +++ b/bl-kernel/admin/themes/booty/index.php @@ -51,6 +51,9 @@ echo ''.PHP_EOL; ?> + +
+ diff --git a/bl-kernel/admin/themes/booty/init.php b/bl-kernel/admin/themes/booty/init.php index e62be777..9ef973f1 100644 --- a/bl-kernel/admin/themes/booty/init.php +++ b/bl-kernel/admin/themes/booty/init.php @@ -24,8 +24,8 @@ return <<$modalText

@@ -96,37 +96,49 @@ EOF; { $title = $args['title']; return <<$title +
$title
EOF; } public static function formInputTextBlock($args) { - $id = 'js'.$args['name']; + $name = $args['name']; + $disabled = empty($args['disabled'])?'':'disabled'; + $placeholder = isset($args['placeholder'])?$args['placeholder']:''; + $value = isset($args['value'])?$args['value']:''; + + $id = 'js'.$name; if (isset($args['id'])) { $id = $args['id']; } + $tip = ''; + if (isset($args['tip'])) { + $tip = ''.$args['tip'].''; + } + + $label = ''; + if (isset($args['label'])) { + $label = ''; + } + $class = 'form-control'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } - $html = '
'; - - if (isset($args['label'])) { - $html .= ''; + $type = 'text'; + if (isset($args['type'])) { + $type = $args['type']; } - $html .= ''; - - if (isset($args['tip'])) { - $html .= ''.$args['tip'].''; - } - - $html .= '
'; - - return $html; +return << + $label + + $tip + +EOF; } public static function formInputFile($args) @@ -168,7 +180,7 @@ EOF; } $html .= '
'; - $html .= ''; + $html .= ''; if (isset($args['tip'])) { $html .= ''.$args['tip'].''; } @@ -190,9 +202,9 @@ EOF; $class = $class.' '.$args['class']; } - $html = '
'; + $html = '
'; if (!empty($args['label'])) { - $html .= ''; + $html .= ''; } $html .= ''; @@ -204,45 +216,27 @@ EOF; return $html; } - public static function formInputGroupText($args) - { - $label = $args['label']; - $labelInside = $args['labelInside']; - $tip = $args['tip']; - $value = $args['value']; - $name = $args['name']; - $id = 'js'.$name; - if (isset($args['id'])) { - $id = $args['id']; - } - $disabled = isset($args['disabled'])?'disabled':''; - -return << - -
-
- $labelInside -
- -
- $tip -
-EOF; - } - public static function formInputText($args) { - $label = isset($args['label'])?$args['label']:''; - $placeholder = isset($args['placeholder'])?$args['placeholder']:''; - $tip = isset($args['tip'])?$args['tip']:' '; - $value = isset($args['value'])?$args['value']:''; $name = $args['name']; + $disabled = empty($args['disabled'])?'':'disabled'; + $placeholder = isset($args['placeholder'])?$args['placeholder']:''; + $value = isset($args['value'])?$args['value']:''; + $id = 'js'.$name; if (isset($args['id'])) { $id = $args['id']; } - $disabled = empty($args['disabled'])?'':'disabled'; + + $tip = ''; + if (isset($args['tip'])) { + $tip = ''.$args['tip'].''; + } + + $label = ''; + if (isset($args['label'])) { + $label = ''; + } $class = 'form-control'; if (isset($args['class'])) { @@ -256,10 +250,10 @@ EOF; return << - + $label
- $tip + $tip
EOF; @@ -267,7 +261,6 @@ EOF; public static function formCheckbox($args) { - $label = isset($args['label'])?$args['label']:''; $labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:''; $placeholder = isset($args['placeholder'])?$args['placeholder']:''; $tip = isset($args['tip'])?$args['tip']:' '; @@ -279,7 +272,7 @@ EOF; } $disabled = isset($args['disabled'])?'disabled':''; - $class = 'form-group row'; + $class = 'form-group'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } @@ -289,17 +282,20 @@ EOF; $type = $args['type']; } + $label = ''; + if (!empty($args['label'])) { + $label = ''; + } + $checked = $args['checked']?'checked':''; return << - -
-
- - - $tip -
+ $label +
+ + + $tip
EOF; @@ -353,7 +349,7 @@ EOF; $html = '
'; if (!empty($args['label'])) { - $html .= ''; + $html .= ''; } $html .= ' +
+ + +
contentRaw(false) ?>
+ '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,i,r,o,s,a,l,u,c,d,f,h,m=this;e=m._minValue,t=m._maxValue,"v"===m.settings.orientation?(n="screenY",i="top",r="height",o="h"):(n="screenX",i="left",r="width",o="w"),m._super(),function(o,s){function t(e){var t,n,i,r;t=dr(t=(((t=m.value())+(r=n=o))/((i=s)-r)+.05*e)*(i-n)-n,o,s),m.value(t),m.fire("dragstart",{value:t}),m.fire("drag",{value:t}),m.fire("dragend",{value:t})}m.on("keydown",function(e){switch(e.keyCode){case 37:case 38:t(-1);break;case 39:case 40:t(1)}})}(e,t),s=e,a=t,l=m.getEl("handle"),m._dragHelper=new dt(m._id,{handle:m._id+"-handle",start:function(e){u=e[n],c=parseInt(m.getEl("handle").style[i],10),d=(m.layoutRect()[o]||100)-_e.getSize(l)[r],m.fire("dragstart",{value:h})},drag:function(e){var t=e[n]-u;f=dr(c+t,0,d),l.style[i]=f+"px",h=s+f/d*(a-s),m.value(h),m.tooltip().text(""+m.settings.previewFilter(h)).show().moveRel(l,"bc tc"),m.fire("drag",{value:h})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:h})}})},repaint:function(){this._super(),hr(this,this.value())},bindStates:function(){var t=this;return t.state.on("change:value",function(e){hr(t,e.value)}),t._super()}}),gr=Pt.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'
'}}),pr=ir.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),i=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,xe(e).css({width:i.w-_e.getSize(t).width,height:i.h-2}),xe(t).css({height:i.h-2}),this},activeMenu:function(e){xe(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a=n.settings,l="";return(e=a.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o=a.icon?r+"ico "+r+"i-"+o:"",s&&(n.classes.add("btn-has-text"),l=''+n.encode(s)+""),t="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",'
'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(e){var t=e.target;if(e.control===this)for(;t;){if(e.aria&&"down"!==e.aria.key||"BUTTON"===t.nodeName&&-1===t.className.indexOf("open"))return e.stopImmediatePropagation(),void(n&&n.call(this,e));t=t.parentNode}}),delete this.settings.onclick,this._super()}}),vr=wi.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),br=vt.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var e;this.activeTabId&&(e=this.getEl(this.activeTabId),xe(e).removeClass(this.classPrefix+"active"),e.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(e=this.getEl("t"+n)).setAttribute("aria-selected","true"),xe(e).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(e,t){n!==t&&e.hide()})},renderHtml:function(){var i=this,e=i._layout,r="",o=i.classPrefix;return i.preRender(),e.preRender(i),i.items().each(function(e,t){var n=i._id+"-t"+t;e.aria("role","tabpanel"),e.aria("labelledby",n),r+='"}),'
'+r+'
'+e.renderHtml(i)+"
"},postRender:function(){var i=this;i._super(),i.settings.activeTab=i.settings.activeTab||0,i.activateTab(i.settings.activeTab),this.on("click",function(e){var t=e.target.parentNode;if(t&&t.id===i._id+"-head")for(var n=t.childNodes.length;n--;)t.childNodes[n]===e.target&&i.activateTab(n)})},initLayoutRect:function(){var e,t,n,i=this;t=(t=_e.getSize(i.getEl("head")).width)<0?0:t,n=0,i.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),i.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=_e.getSize(i.getEl("head")).height;return i.settings.minWidth=t,i.settings.minHeight=n+r,(e=i._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}}),yr=Pt.extend({init:function(e){var n=this;n._super(e),n.classes.add("textbox"),e.multiline?n.classes.add("multiline"):(n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))}),n.on("keyup",function(e){n.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,i,r,o=this,s=0;e=o.getEl().style,t=o._layoutRect,r=o._lastRepaintRect||{};var a=document;return!o.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-s+"px"),i=(n=o.borderBox).left+n.right+8,s=n.top+n.bottom+(o.settings.multiline?8:0),t.x!==r.x&&(e.left=t.x+"px",r.x=t.x),t.y!==r.y&&(e.top=t.y+"px",r.y=t.y),t.w!==r.w&&(e.width=t.w-i+"px",r.w=t.w),t.h!==r.h&&(e.height=t.h-s+"px",r.h=t.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var t,e,n=this,i=n.settings;return t={id:n._id,hidefocus:"1"},w.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){t[e]=i[e]}),n.disabled()&&(t.disabled="disabled"),i.subtype&&(t.type=i.subtype),(e=_e.create(i.multiline?"textarea":"input",t)).value=n.state.get("value"),e.className=n.classes.toString(),e.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var t=this;t.getEl().value=t.state.get("value"),t._super(),t.$el.on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)})},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.getEl().value!==e.value&&(t.getEl().value=e.value)}),t.state.on("change:disabled",function(e){t.getEl().disabled=e.value}),t._super()},remove:function(){this.$el.off(),this._super()}}),xr=function(){return{Selector:Fe,Collection:Ye,ReflowQueue:Ze,Control:ot,Factory:b,KeyboardNavigation:at,Container:ut,DragHelper:dt,Scrollable:pt,Panel:vt,Movable:Se,Resizable:bt,FloatPanel:Et,Window:Ft,MessageBox:$t,Tooltip:Nt,Widget:Pt,Progress:Wt,Notification:Ot,Layout:Xt,AbsoluteLayout:jt,Button:Jt,ButtonGroup:Kt,Checkbox:Zt,ComboBox:en,ColorBox:tn,PanelButton:nn,ColorButton:on,ColorPicker:an,Path:un,ElementPath:cn,FormItem:dn,Form:fn,FieldSet:hn,FilePicker:bi,FitLayout:yi,FlexLayout:xi,FlowLayout:wi,FormatControls:Gi,GridLayout:Ki,Iframe:Zi,InfoBox:Qi,Label:er,Toolbar:tr,MenuBar:nr,MenuButton:ir,MenuItem:sr,Throbber:St,Menu:rr,ListBox:or,Radio:ar,ResizeHandle:lr,SelectBox:cr,Slider:mr,Spacer:gr,SplitButton:pr,StackLayout:vr,TabPanel:br,TextBox:yr,DropZone:ln,BrowseButton:Gt}},wr=function(n){n.ui?w.each(xr(),function(e,t){n.ui[t]=e}):n.ui=xr()};w.each(xr(),function(e,t){b.add(t,e)}),wr(window.tinymce?window.tinymce:{}),o.add("modern",function(e){return Gi.setup(e),qt(e)})}(); \ No newline at end of file diff --git a/bl-plugins/tinymce/tinymce/tinymce.min.js b/bl-plugins/tinymce/tinymce/tinymce.min.js index 6dc60cc3..3304e202 100755 --- a/bl-plugins/tinymce/tinymce/tinymce.min.js +++ b/bl-plugins/tinymce/tinymce/tinymce.min.js @@ -1,2 +1,2 @@ -// 4.8.3 (2018-09-13) -!function(){"use strict";var e,t,n,r,o,i,a,u,s,c,l,f,d,m,g,p,h,v=function(){for(var e=[],t=0;t+~]|"+ut+")"+ut+"*"),gt=new RegExp("="+ut+"*([^\\]'\"]*?)"+ut+"*\\]","g"),pt=new RegExp(lt),ht=new RegExp("^"+st+"$"),vt={ID:new RegExp("^#("+st+")"),CLASS:new RegExp("^\\.("+st+")"),TAG:new RegExp("^("+st+"|[*])"),ATTR:new RegExp("^"+ct),PSEUDO:new RegExp("^"+lt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ut+"*(even|odd|(([+-]|)(\\d*)n|)"+ut+"*(?:([+-]|)"+ut+"*(\\d+)|))"+ut+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+ut+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ut+"*((?:-\\d)?\\d*)"+ut+"*\\)|)(?=[^-]|$)","i")},bt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,Ct=/^[^{]+\{\s*\[native \w/,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/[+~]/,Nt=/'|\\/g,Et=new RegExp("\\\\([\\da-f]{1,6}"+ut+"?|("+ut+")|.)","ig"),St=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{ot.apply(tt=it.call(We.childNodes),We.childNodes),tt[We.childNodes.length].nodeType}catch(nN){ot={apply:tt.length?function(e,t){rt.apply(e,it.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Tt=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:We)!==Ee&&Ne(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Ee).nodeType)&&9!==u)return[];if(Te&&!r){if(o=xt.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&_e(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return ot.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&me.getElementsByClassName)return ot.apply(n,t.getElementsByClassName(a)),n}if(me.qsa&&(!ke||!ke.test(e))){if(f=l=$e,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=ve(e),(l=t.getAttribute("id"))?f=l.replace(Nt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Lt(c[s]);d=wt.test(e)&&Ot(t.parentNode)||t,m=c.join(",")}if(m)try{return ot.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return ye(e.replace(ft,"$1"),t,n,r)};function kt(){var r=[];return function e(t,n){return r.push(t+" ")>ge.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function At(e){return e[$e]=!0,e}function _t(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Rt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Dt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Bt(a){return At(function(i){return i=+i,At(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Ze&&e}for(de in me=Tt.support={},he=Tt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Ne=Tt.setDocument=function(e){var t,s=e?e.ownerDocument||e:We,n=s.defaultView;return s!==Ee&&9===s.nodeType&&s.documentElement?(Se=(Ee=s).documentElement,Te=!he(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Ne()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Ne()})),me.attributes=!0,me.getElementsByTagName=!0,me.getElementsByClassName=Ct.test(s.getElementsByClassName),me.getById=!0,ge.find.ID=function(e,t){if(typeof t.getElementById!==Ze&&Te){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},ge.filter.ID=function(e){var t=e.replace(Et,St);return function(e){return e.getAttribute("id")===t}},ge.find.TAG=me.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Ze)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},ge.find.CLASS=me.getElementsByClassName&&function(e,t){if(Te)return t.getElementsByClassName(e)},Ae=[],ke=[],me.disconnectedMatch=!0,ke=ke.length&&new RegExp(ke.join("|")),Ae=Ae.length&&new RegExp(Ae.join("|")),t=Ct.test(Se.compareDocumentPosition),_e=t||Ct.test(Se.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Qe=t?function(e,t){if(e===t)return we=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!me.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===We&&_e(We,e)?-1:t===s||t.ownerDocument===We&&_e(We,t)?1:xe?at.call(xe,e)-at.call(xe,t):0:4&n?-1:1)}:function(e,t){if(e===t)return we=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:xe?at.call(xe,e)-at.call(xe,t):0;if(o===i)return _t(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?_t(a[r],u[r]):a[r]===We?-1:u[r]===We?1:0},s):Ee},Tt.matches=function(e,t){return Tt(e,null,null,t)},Tt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ee&&Ne(e),t=t.replace(gt,"='$1']"),me.matchesSelector&&Te&&(!Ae||!Ae.test(t))&&(!ke||!ke.test(t)))try{var n=(void 0).call(e,t);if(n||me.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(nN){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Et,St),e[3]=(e[3]||e[4]||e[5]||"").replace(Et,St),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Tt.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Tt.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return vt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pt.test(n)&&(t=ve(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Et,St).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Ye[e+" "];return t||(t=new RegExp("(^|"+ut+")"+e+"("+ut+"|$)"))&&Ye(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Ze&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Tt.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,en=je.Event,tn=Yt.makeMap("children,contents,next,prev"),nn=function(e){return void 0!==e},rn=function(e){return"string"==typeof e},on=function(e,t){var n,r,o;for(o=(t=t||Gt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},an=function(e,t,n,r){var o;if(rn(t))t=on(t,Cn(e[0]));else if(t.length&&!t.nodeType){if(t=pn.makeArray(t),r)for(o=t.length-1;0<=o;o--)an(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Zt.exec(e)))return pn(t).find(e);if(n[1])for(r=on(e,Cn(t)).firstChild;r;)Jt.call(o,r),r=r.nextSibling;else{if(!(r=Cn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Yt.toArray(this)},add:function(e,t){var n,r,o=this;if(rn(e))return o.add(pn(e));if(!1!==t)for(n=pn.unique(o.toArray().concat(pn.makeArray(e))),o.length=n.length,r=0;r=a.length&&r(o)}))})})},eo=function(e){return Zr(e,Qr.nu)},to=function(n){return{is:function(e){return n===e},isValue:C,isError:y,getOr:H(n),getOrThunk:H(n),getOrDie:H(n),or:function(e){return to(n)},orThunk:function(e){return to(n)},fold:function(e,t){return t(n)},map:function(e){return to(e(n))},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return A.some(n)}}},no=function(n){return{is:y,isValue:y,isError:C,getOr:j,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return no(n)},each:v,bind:function(e){return no(n)},exists:y,forall:C,toOption:A.none}},ro={value:to,error:no};function oo(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var io,ao,uo,so=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mo=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fo=/[<>&\"\']/g,Uo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,zo={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};ao={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},uo={"<":"<",">":">","&":"&",""":'"',"'":"'"};var Vo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):zo[t]||String.fromCharCode(t):uo[e]||io[e]||(n=e,(r=er.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Wo={},Ko={},Xo=Yt.makeMap,Yo=Yt.each,Go=Yt.extend,Jo=Yt.explode,Qo=Yt.inArray,Zo=function(e,t){return(e=Yt.trim(e))?e.split(t||" "):[]},ei=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n
').css(n).appendTo(a)[0];return c.set(A.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&pn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:l,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each(function(e){var t=_c(a,e.element,e.before);pn(e.caret).css(t)})},destroy:function(){return Le.clearInterval(t)}}},Dc=function(e){return Ac(e)||Do.isTable(e)&&vc()},Bc=Do.isContentEditableFalse,Oc=Do.matchStyleValues("display","block table table-cell table-caption list-item"),Pc=Aa,Lc=Ta,Ic=ya.curry,Mc=Do.isElement,Fc=ja,Uc=function(e){return 0=o.data.length-1)return 1===e&&(r=s(o))?Xc(r):n;if(Oa(o)&&i<=1)return-1===e&&(r=u(o))?Yc(r):n;if(i===o.data.length)return(r=s(o))?Xc(r):n;if(0===i)return(r=u(o))?Yc(r):n}return n},Jc=function(e,t){var n=$c(e,t);return Bc(n)&&!Do.isBogusAll(n)},Qc=function(e,t){return Do.isTable($c(e,t))},Zc=function(e,t){return A.from($c(e?0:-1,t)).filter(Bc)},el=function(e,t,n){var r=Gc(e,t,n);return-1===e?wu.fromRangeStart(r):wu.fromRangeEnd(r)},tl=Ic(Jc,0),nl=Ic(Jc,-1),rl=Ic(Qc,0),ol=Ic(Qc,-1),il=function(e){return Su.isTextPosition(e)?0===e.offset():ja(e.getNode())},al=function(e){if(Su.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return ja(e.getNode(!0))},ul=function(e,t){return!Su.isTextPosition(e)&&!Su.isTextPosition(t)&&e.getNode()===t.getNode(!0)},sl=function(e,t,n){return e?!ul(t,n)&&(r=t,!(!Su.isTextPosition(r)&&Do.isBr(r.getNode())))&&al(t)&&il(n):!ul(n,t)&&il(t)&&al(n);var r},cl=function(e,t,n){var r=Ns(t);return A.from(e?r.next(n):r.prev(n))},ll=function(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return Do.isText(u)?A.some(Su(u,e?0:u.data.length)):u?ja(u)?A.some(e?Su.before(u):(a=u,Do.isBr(a)?Su.before(a):Su.after(a))):(r=t,o=u,i=(n=e)?Su.before(o):Su.after(o),cl(n,r,i)):A.none()},fl={fromPosition:cl,nextPosition:b(cl,!0),prevPosition:b(cl,!1),navigate:function(t,n,r){return cl(t,n,r).bind(function(e){return jc(r,e,n)&&sl(t,r,e)?cl(t,n,e):A.some(e)})},positionIn:ll,firstPositionIn:b(ll,!0),lastPositionIn:b(ll,!1)},dl=function(e,t){return!e.isBlock(t)||t.innerHTML||Re.ie||(t.innerHTML='
'),t},ml=function(e,t){return fl.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},gl=function(e,t,n){return!(!1!==t.hasChildNodes()||!Xu(e,t)||(o=n,i=(r=t).ownerDocument.createTextNode(wa),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),0));var r,o,i},pl=function(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,gl(c,i,r))return!0;if(s[o]>u.length-1)return!!gl(c,i,r)||ml(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},hl=function(e){return Do.isText(e)&&0=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&0h.length-1?p=h.length-1:p<0&&(p=0),d=h[p]||g),l===d)return o(v([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return C(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return C(d,n);if(a===n)break}r=y(l,n)||l,i=y(d,n)||d,C(l,r,!0),(s=b(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(s)),C(d,i)}},zl=(Es=sr.isText,Ss="text",Ts=function(e){return Es(e)?A.from(e.dom().nodeValue):A.none()},ks=Qn.detect().browser,{get:function(e){if(!Es(e))throw new Error("Can only get "+Ss+" value of a "+Ss+" node");return As(e).getOr("")},getOption:As=ks.isIE()&&10===ks.version.major?function(e){try{return Ts(e)}catch(nN){return A.none()}}:Ts,set:function(e,t){if(!Es(e))throw new Error("Can only set raw "+Ss+" value of a "+Ss+" node");e.dom().nodeValue=t}}),Vl=function(e){return zl.get(e)},ql=function(r,o,i,a){return $r.parent(o).fold(function(){return"skipping"},function(e){return"br"===a||(n=o,sr.isText(n)&&"\ufeff"===Vl(n))?"skipping":(t=o,sr.isElement(t)&&Wi.has(t,oa())?"existing":Ku(o)?"caret":Sl.isValid(r,i,a)&&Sl.isValid(r,sr.name(e),i)?"valid":"invalid-child");var t,n})},Hl=undefined&&undefined.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o'))},uf=function(n){$r.lastChild(n).each(function(t){$r.prevSibling(t).each(function(e){lo(n)&&mo(t)&&lo(e)&&Ri.remove(t)})})},sf=Yt.makeMap;function cf(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=sf(e.indent_before||""),c=sf(e.indent_after||""),l=$o.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0":" />",n&&u&&c[e]&&0"),u&&c[e]&&0")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push(""):d.push(""),u&&d.push("\n")},doctype:function(e){d.push("",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function lf(t,g){void 0===g&&(g=ni());var p=cf(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){p.text(e.value,e.raw)},8:function(e){p.comment(e.value)},7:function(e){p.pi(e.name,e.value)},10:function(e){p.doctype(e.value)},4:function(e){p.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},p.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1|)$/," "):o("nextSibling")||(e=e.replace(/( | )(
|)$/," "))),e}(e)),n=o.parser,g=t.merge,r=lf({validate:o.settings.validate},o.schema),m='​',s={content:e,format:"html",selection:!0,paste:t.paste},(s=o.fire("BeforeSetContent",s)).isDefaultPrevented())o.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:t.paste});else{-1===(e=s.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,m);var b,y,C,x,w=(l=h.getRng()).startContainer||(l.parentElement?l.parentElement():null),N=o.getBody();w===N&&h.isCollapsed()&&v.isBlock(N.firstChild)&&(b=N.firstChild)&&!o.schema.getShortEndedElements()[b.nodeName]&&v.isEmpty(N.firstChild)&&((l=v.createRng()).setStart(N.firstChild,0),l.setEnd(N.firstChild,0),h.setRng(l)),h.isCollapsed()||(o.selection.setRng(df(o.selection.getRng())),o.getDoc().execCommand("Delete",!1,null),C=(y=h.getRng()).startContainer,x=y.startOffset,3===C.nodeType&&y.collapsed&&("\xa0"===C.data[x]?(C.deleteData(x,1),/[\u00a0| ]$/.test(e)||(e+=" ")):"\xa0"===C.data[x-1]&&(C.deleteData(x-1,1),/[\u00a0| ]$/.test(e)||(e=" "+e))));var E,S,T,k={context:(i=h.getNode()).nodeName.toLowerCase(),data:t.data,insert:!0};if(u=n.parse(e,k),!0===t.paste&&Zl(o.schema,u)&&tf(v,i))return l=ef(r,v,o.selection.getRng(),u),o.selection.setRng(l),void o.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!v.isBlock(f.name)){o.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(o._selectionOverrides.showBlockCaretContainer(i),k.invalid){for(h.setContent(m),i=h.getNode(),a=o.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;e=i===a?a.innerHTML:v.getOuterHTML(i),e=r.serialize(n.parse(e.replace(//i,function(){return r.serialize(u)}))),i===a?v.setHTML(a,e):v.setOuterHTML(i,e)}else e=r.serialize(u),function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}}(o,e,i);!function(){if(g){var n=o.getBody(),r=new rf(v);Yt.each(v.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==n;t=t.parentNode)p[e.nodeName.toLowerCase()]&&r.compare(t,e)&&v.remove(e,!0)})}}(),function(e){var t,n,r;if(e){if(h.scrollIntoView(e),t=function(e){for(var t=o.getBody();e&&e!==t;e=e.parentNode)if("false"===o.dom.getContentEditable(e))return e;return null}(e))return v.remove(e),h.select(t);l=v.createRng(),(f=e.previousSibling)&&3===f.nodeType?(l.setStart(f,f.nodeValue.length),Re.ie||(d=e.nextSibling)&&3===d.nodeType&&(f.appendData(d.data),d.parentNode.removeChild(d))):(l.setStartBefore(e),l.setEndBefore(e)),n=v.getParent(e,v.isBlock),v.remove(e),n&&v.isEmpty(n)&&(o.$(n).empty(),l.setStart(n,0),l.setEnd(n,0),mf(n)||n.getAttribute("data-mce-fragment")||!(r=function(e){var t=Su.fromRangeStart(e);if(t=Ns(o.getBody()).next(t))return t.toRange()}(l))?v.add(n,v.create("br",{"data-mce-bogus":"1"})):(l=r,v.remove(n))),h.setRng(l)}}(v.get("mce_marker")),E=o.getBody(),Yt.each(E.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),S=o.dom,T=o.selection.getStart(),A.from(S.getParent(T,"td,th")).map(er.fromDom).each(uf),o.fire("SetContent",s),o.addVisual()}},pf=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Yt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};gf(e,o.content,o.details)},hf=kr("sections","settings"),vf=Qn.detect().deviceType.isTouch(),bf=["lists","autolink","autosave"],yf={theme:"mobile"},Cf=function(e){var t=R(e)?e.join(" "):e,n=$(k(t)?t.split(" "):[],$n);return U(n,function(e){return 0Su.before(r).offset()?Su(t.container(),t.offset()-1):t;var n,r,o,i},pd=function(e){return ja(e.previousSibling)?A.some((t=e.previousSibling,Do.isText(t)?Su(t,t.data.length):Su.after(t))):e.previousSibling?fl.lastPositionIn(e.previousSibling):A.none();var t},hd=function(e){return ja(e.nextSibling)?A.some((t=e.nextSibling,Do.isText(t)?Su(t,0):Su.before(t))):e.nextSibling?fl.firstPositionIn(e.nextSibling):A.none();var t},vd=function(r,o){return pd(o).orThunk(function(){return hd(o)}).orThunk(function(){return e=r,t=o,n=Su.before(t.previousSibling?t.previousSibling:t.parentNode),fl.prevPosition(e,n).fold(function(){return fl.nextPosition(e,Su.after(t))},A.some);var e,t,n})},bd=function(n,r){return hd(r).orThunk(function(){return pd(r)}).orThunk(function(){return e=n,t=r,fl.nextPosition(e,Su.after(t)).fold(function(){return fl.prevPosition(e,Su.before(t))},A.some);var e,t})},yd=function(e,t,n){return(r=e,o=t,i=n,r?bd(o,i):vd(o,i)).map(b(gd,n));var r,o,i},Cd=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},xd=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(sr.name(t))},wd=function(e){if(zf(e)){var t=er.fromHtml('
');return Ri.empty(e),Ti.append(e,t),A.some(Su.before(t.dom()))}return A.none()},Nd=function(t,n,e){var r,a,o,i=yd(n,t.getBody(),e.dom()),u=Zi.ancestor(e,b(xd,t),(r=t.getBody(),function(e){return e.dom()===r})),s=(a=e,o=i,ru([$r.prevSibling(a),$r.nextSibling(a),o],function(e,t,n){var r,o=e.dom(),i=t.dom();return Do.isText(o)&&Do.isText(i)?(r=o.data.length,o.appendData(i.data),Ri.remove(t),Ri.remove(a),n.container()===i?Su(o,r):n):(Ri.remove(a),n)}).orThunk(function(){return Ri.remove(a),o}));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(wd).fold(function(){Cd(t,n,s)},function(e){Cd(t,n,A.some(e))})},Ed=function(a,u){var e,t,n,r,o;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Gc(t?1:-1,e,n),o=Su.fromRangeStart(r),!1===t&&nl(o)?A.some(ld.remove(o.getNode(!0))):t&&tl(o)?A.some(ld.remove(o.getNode())):md(e,t,o)).map(function(e){return e.fold((o=a,i=u,function(e){return o._selectionOverrides.hideFakeCaret(),Nd(o,i,er.fromDom(e)),!0}),(n=a,r=u,function(e){var t=r?Su.before(e):Su.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},Sd=function(e,t){var n,r=e.selection.getNode();return!!Do.isContentEditableFalse(r)&&(n=er.fromDom(e.getBody()),F(Ki(n,".mce-offscreen-selection"),Ri.remove),Nd(e,t,er.fromDom(e.selection.getNode())),Bf(e),!0)},Td=function(e,t){return e.selection.isCollapsed()?Ed(e,t):Sd(e,t)},kd=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(Do.isContentEditableTrue(t)||Do.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return Do.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(Su.before(t).toRange())),!0},Ad=Do.isText,_d=function(e){return Ad(e)&&e.data[0]===wa},Rd=function(e){return Ad(e)&&e.data[e.data.length-1]===wa},Dd=function(e){return e.ownerDocument.createTextNode(wa)},Bd=function(e,t){return e?function(e){if(Ad(e.previousSibling))return Rd(e.previousSibling)||e.previousSibling.appendData(wa),e.previousSibling;if(Ad(e))return _d(e)||e.insertData(0,wa),e;var t=Dd(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(Ad(e.nextSibling))return _d(e.nextSibling)||e.nextSibling.insertData(0,wa),e.nextSibling;if(Ad(e))return Rd(e)||e.appendData(wa),e;var t=Dd(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},Od=b(Bd,!0),Pd=b(Bd,!1),Ld=function(e,t){return Do.isText(e.container())?Bd(t,e.container()):Bd(t,e.getNode())},Id=function(e,t){var n=t.get();return n&&e.container()===n&&ka(n)},Md=function(n,e){return e.fold(function(e){os.remove(n.get());var t=Od(e);return n.set(t),A.some(Su(t,t.length-1))},function(e){return fl.firstPositionIn(e).map(function(e){if(Id(e,n))return Su(n.get(),1);os.remove(n.get());var t=Ld(e,!0);return n.set(t),Su(t,1)})},function(e){return fl.lastPositionIn(e).map(function(e){if(Id(e,n))return Su(n.get(),n.get().length-1);os.remove(n.get());var t=Ld(e,!1);return n.set(t),Su(t,t.length-1)})},function(e){os.remove(n.get());var t=Pd(e);return n.set(t),A.some(Su(t,1))})},Fd=function(e,t){for(var n=0;no.childNodes.length-1&&(c=!1),Do.isDocument(o)&&(o=g,i=0),o===g){if(c&&(u=o.childNodes[0s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=t&&t.ctrlKey;"LI"!==d||m||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(e,t,n){for(var r,o=new oo(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0")},mceToggleVisualAid:function(){s.hasVisual=!s.hasVisual,s.addVisual()},mceReplaceContent:function(e,t,n){s.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=o.getParent(i.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||a.remove("link"),n.href&&a.apply("link",n,r)},selectAll:function(){var e=o.getParent(i.getStart(),Do.isContentEditableTrue);if(e){var t=o.createRng();t.selectNodeContents(e),i.setRng(t)}},"delete":function(){Zm(s)},forwardDelete:function(){eg(s)},mceNewDocument:function(){s.setContent("")},InsertLineBreak:function(e,t,n){return Ng(s,n),!0}});var p=function(n){return function(){var e=i.isCollapsed()?[o.getParent(i.getNode(),o.isBlock)]:i.getSelectedBlocks(),t=Kg(e,function(e){return!!a.matchNode(e,n)});return-1!==Xg(t,!0)}};e({JustifyLeft:p("alignleft"),JustifyCenter:p("aligncenter"),JustifyRight:p("alignright"),JustifyFull:p("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(n.inline_styles){if((e=o.getParent(i.getStart(),o.isBlock))&&0"),u))[o.length-1]=Yt.extend(o[o.length-1],{func:n,scope:r||i}),Yt.extend(o[0],{desc:i.translate(t),subpatterns:o.slice(1)})},o=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},c=function(e){return e.func?e.func.call(e.scope):null};i.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(hp(a,function(e){if(o(t,e))return r=e.subpatterns.slice(0),"keydown"===t.type&&c(e),!0}),o(t,r[0])&&(1===r.length&&"keydown"===t.type&&c(r[0]),r.shift()))}),this.add=function(e,n,r,o){var t;return"string"==typeof(t=r)?r=function(){i.execCommand(t,!1,null)}:Yt.isArray(t)&&(r=function(){i.execCommand(t[0],t[1],t[2])}),hp(vp(Yt.trim(e.toLowerCase())),function(e){var t=s(e,n,r,o);a[t.id]=t}),!0},this.remove=function(e){var t=s(e);return!!a[t.id]&&(delete a[t.id],!0)}}var xp=function(e){var t=e!==undefined?e.dom():document;return A.from(t.activeElement).map(er.fromDom)},wp=function(e){var t=$r.owner(e).dom();return e.dom()===t.activeElement},Np=function(t){return xp($r.owner(t)).filter(function(e){return t.dom().contains(e.dom())})},Ep=function(t,e){return(n=e,n.collapsed?A.from(eu(n.startContainer,n.startOffset)).map(er.fromDom):A.none()).bind(function(e){return bo(e)?A.some(e):!1===Fr.contains(t,e)?A.some(t):A.none()});var n},Sp=function(t,e){Ep(er.fromDom(t.getBody()),e).bind(function(e){return fl.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},Tp=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},kp=function(e){var t,n=e.getBody();return n&&(t=er.fromDom(n),wp(t)||Np(t).isSome())},Ap=function(e){return e.inline?kp(e):(t=e).iframeElement&&wp(er.fromDom(t.iframeElement));var t},_p=function(e){return e.editorManager.setActive(e)},Rp=function(e,t){e.removed||(t?_p(e):function(t){var e=t.selection,n=t.settings.content_editable,r=t.getBody(),o=e.getRng();t.quirks.refreshContentEditable();var i,a,u=(i=t,a=e.getNode(),i.dom.getParent(a,function(e){return"true"===i.dom.getContentEditable(e)}));if(t.$.contains(r,u))return Tp(u),Sp(t,o),_p(t);t.bookmark!==undefined&&!1===Ap(t)&&Hg(t).each(function(e){t.selection.setRng(e),o=e}),n||(Re.opera||Tp(r),t.getWin().focus()),(Re.gecko||n)&&(Tp(r),Sp(t,o)),_p(t)}(e))},Dp=Ap,Bp=function(e,t){return t.dom()[e]},Op=function(e,t){return parseInt(Sr(t,e),10)},Pp=b(Bp,"clientWidth"),Lp=b(Bp,"clientHeight"),Ip=b(Op,"margin-top"),Mp=b(Op,"margin-left"),Fp=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m=er.fromDom(e.getBody()),g=e.inline?m:$r.documentElement(m),p=(r=e.inline,i=t,a=n,u=(o=g).dom().getBoundingClientRect(),{x:i-(r?u.left+o.dom().clientLeft+Mp(o):0),y:a-(r?u.top+o.dom().clientTop+Ip(o):0)});return c=p.x,l=p.y,f=Pp(s=g),d=Lp(s),0<=c&&0<=l&&c<=f&&l<=d},Up=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,A.from(t).map(er.fromDom)).map(function(e){return Fr.contains($r.owner(e),e)}).getOr(!1)};function zp(n){var t,o=[],i=function(){var e,t=n.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},a=function(){0i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}},o=Bh(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Oh(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},Lh=function(e){var n;Ph(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Ah(t)||Ah(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},Ih=function(e){return jt.reduce(e,function(e,t){return e.concat(function(t){var e=function(e){return jt.map(e,function(e){return(e=Xa(e)).node=t,e})};if(Do.isElement(t))return e(t.getClientRects());if(Do.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])};(Sh=Eh||(Eh={}))[Sh.Up=-1]="Up",Sh[Sh.Down=1]="Down";var Mh=function(o,i,a,e,u,t){var n,s,c=0,l=[],r=function(e){var t,n,r;for(r=Ih([e]),-1===o&&(r=r.reverse()),t=0;tt;var t}},Vh=function(n){return function(e){return t=n,e.line===t;var t}},qh=Do.isContentEditableFalse,Hh=qc,jh=function(e,t){return Math.abs(e.left-t)},$h=function(e,t){return Math.abs(e.right-t)},Wh=function(e,t){return e>=t.left&&e<=t.right},Kh=function(e,o){return jt.reduce(e,function(e,t){var n,r;return n=Math.min(jh(e,o),$h(e,o)),r=Math.min(jh(t,o),$h(t,o)),Wh(o,t)?t:Wh(o,e)?e:r===n&&qh(t.node)?t:r=e.top&&n<=e.bottom});return(r=Kh(d,t))&&(r=Kh((u=e,l=function(t,e){var n;return n=jt.filter(Ih([e]),function(e){return!t(e,s)}),c=c.concat(n),0===n.length},(c=[]).push(s=r),Xh(Eh.Up,u,b(l,Ja),s.node),Xh(Eh.Down,u,b(l,Qa),s.node),c),t))&&Dc(r.node)?(a=t,{node:(i=r).node,before:jh(i,a)<$h(i,a)}):null},Gh=function(i,a,e){return!e.collapsed&&z(e.getClientRects(),function(e,t){return e||(o=a,(r=i)>=(n=t).left&&r<=n.right&&o>=n.top&&o<=n.bottom);var n,r,o},!1)},Jh=function(t){var e=Di(function(){if(!t.removed&&t.selection.getRng().collapsed){var e=ls(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Qh={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return Re.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Zh=Do.isContentEditableTrue,ev=Do.isContentEditableFalse,tv=nl,nv=tl,rv=function(e,t){for(var n=e.getBody();t&&t!==n;){if(Zh(t)||ev(t))return t;t=t.parentNode}return null},ov=function(g){var p,e,t,a=g.getBody(),o=Rc(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return Dp(g)}),h="sel-"+g.dom.uniqueId(),u=function(e){e&&g.selection.setRng(e)},s=function(){return g.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},b=function(e,t){return t=Gc(e,a,t),-1===e?Su.fromRangeStart(t):Su.fromRangeEnd(t)},n=function(e){return Aa(e)||Oa(e)||Pa(e)},y=function(e){return n(e.startContainer)||n(e.endContainer)},c=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!y(e))if(!1===t){if(c=b(-1,e),Dc(c.getNode(!0)))return v(-1,c.getNode(!0),!1,!1);if(Dc(c.getNode()))return v(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=b(1,e),Dc(c.getNode()))return v(1,c.getNode(),!c.isAtEnd(),!1);if(Dc(c.getNode(!0)))return v(1,c.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&ev(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(u===a+1&&(n=i.childNodes[a]),ev(n)?(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented()?null:(r=na(er.fromDom(g.getBody()),"#"+h).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('
').attr("id",h)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&Re.ie?(r.empty().append('

\xa0

').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e),F(Ki(er.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){hr.remove(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),p=n,C(),e)):null)},l=function(){p&&(p.removeAttribute("data-mce-selected"),na(er.fromDom(g.getBody()),"#"+h).each(Ri.remove),p=null),na(er.fromDom(g.getBody()),"#"+h).each(Ri.remove),p=null},C=function(){o.hide()};return Re.ceFalse&&(function(){g.on("mouseup",function(e){var t=s();t.collapsed&&Fp(g,e.clientX,e.clientY)&&u(cs(g,t,!1))}),g.on("click",function(e){var t;(t=rv(g,e.target))&&(ev(t)&&(e.preventDefault(),g.focus()),Zh(t)&&g.dom.isChildOf(t,g.selection.getNode())&&l())}),g.on("blur NewBlock",function(){l()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==ev(rv(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Ns(e);if(!e.firstChild)return!1;var n=Su.before(e.firstChild),r=t.next(n);return r&&!nv(r)&&!tv(r)}(o)};r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=rv(n,e.target);ev(t)&&(r||(e.preventDefault(),c(ss(n,t))))}),g.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||g.dom.isChildOf(n,a))&&!1!==Fp(g,e.clientX,e.clientY))if(t=rv(g,n))ev(t)?(e.preventDefault(),c(ss(g,t))):(l(),Zh(t)&&e.shiftKey||Gh(e.clientX,e.clientY,g.selection.getRng())||(C(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===Dc(n)){l(),C();var r=Yh(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);g.getBody().focus(),u(o)}}}),g.on("keypress",function(e){Qh.modifierPressed(e)||(e.keyCode,ev(g.selection.getNode())&&e.preventDefault())}),g.on("getSelectionRange",function(e){var t=e.range;if(p){if(!p.parentNode)return void(p=null);(t=t.cloneRange()).selectNode(p),e.range=t}}),g.on("setSelectionRange",function(e){var t;(t=c(e.range,e.forward))&&(e.range=t)}),g.on("AfterSetSelectionRange",function(e){var t,n=e.range;y(n)||"mcepastebin"===n.startContainer.parentNode.id||C(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||l()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!Re.ie){var r=(t=g.dom.get(h))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),Lh(g),Jh(g)}(),e=g.contentStyles,t=".mce-content-body",e.push(o.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(La(e),u(s()),g.selection.scrollIntoView(e[0]))},hideFakeCaret:C,destroy:function(){o.destroy(),p=null}}},iv=function(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r};function av(F,U){void 0===U&&(U=ni());var e=function(){};!1!==(F=F||{}).fix_self_closing&&(F.fix_self_closing=!0);var z=F.comment?F.comment:e,V=F.cdata?F.cdata:e,q=F.text?F.text:e,H=F.start?F.start:e,j=F.end?F.end:e,$=F.pi?F.pi:e,W=F.doctype?F.doctype:e;return{parse:function(e){var t,n,r,d,o,i,a,m,u,s,g,c,p,l,f,h,v,b,y,C,x,w,N,E,S,T,k,A,_,R=0,D=[],B=0,O=$o.decode,P=Yt.makeMap("src,href,data,background,formaction,poster,xlink:href"),L=/((java|vb)script|mhtml):/i,I=function(e){var t,n;for(t=D.length;t--&&D[t].name!==e;);if(0<=t){for(n=D.length-1;t<=n;n--)(e=D[n]).valid&&j(e.name);D.length=t}},M=function(e,t,n,r,o){var i,a,u,s,c;if(n=(t=t.toLowerCase())in g?t:O(n||r||o||""),p&&!m&&0==(0===(u=t).indexOf("data-")||0===u.indexOf("aria-"))){if(!(i=b[t])&&y){for(a=y.length;a--&&!(i=y[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(P[t]&&!F.allow_script_urls){var l=n.replace(/[\s\u0000-\u001F]+/g,"");try{l=decodeURIComponent(l)}catch(f){l=unescape(l)}if(L.test(l))return;if(c=l,!(s=F).allow_html_data_urls&&(/^data:image\//i.test(c)?!1===s.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(c):/^data:/i.test(c)))return}m&&(t in P||0===t.indexOf("on"))||(d.map[t]=n,d.push({name:t,value:n}))};for(S=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),T=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=U.getShortEndedElements(),E=F.self_closing_elements||U.getSelfClosingElements(),g=U.getBoolAttrs(),p=F.validate,u=F.remove_internals,_=F.fix_self_closing,k=U.getSpecialElements(),N=e+">";t=S.exec(N);){if(Re.length){q(O(e.substr(t.index))),R=t.index+t[0].length;continue}if(":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),c=n in s,_&&E[n]&&0"===n.charAt(0)&&(n=" "+n),F.allow_conditional_comments||"[if"!==n.substr(0,3).toLowerCase()||(n=" "+n),z(n)):(n=t[2])?V(n.replace(//g,"")):(n=t[3])?W(n):(n=t[4])&&$(n,t[5]);R=t.index+t[0].length}for(R]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=l,c=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),l=s.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:uv.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return Na(l)},cv={trimExternal:sv,trimInternal:sv},lv=0,fv=2,dv=1,mv=function(g,p){var e=g.length+p.length+2,h=new Array(e),v=new Array(e),c=function(e,t,n,r,o){var i=l(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a")?Nv(r):Ev(t)},Av=function(e,t,n){"fragmented"===t.type?vv(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},_v=function(e,t){return!(!e||!t)&&(r=t,Sv(e)===Sv(r)||(n=t,Tv(e)===Tv(n)));var n,r};function Rv(u){var s,r,o=this,c=0,l=[],t=0,f=function(){return 0===t},i=function(e){f()&&(o.typing=e)},d=function(e){u.setDirty(e)},a=function(e){i(!1),o.add({},e)},n=function(){o.typing&&(i(!1),o.add())};return u.on("init",function(){o.add()}),u.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),o.beforeChange())}),u.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),u.on("ObjectResizeStart Cut",function(){o.beforeChange()}),u.on("SaveContent ObjectResized blur",a),u.on("DragEnd",a),u.on("KeyUp",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),u.nodeChanged()),46!==t&&8!==t||u.nodeChanged(),r&&o.typing&&!1===_v(kv(u),l[0])&&(!1===u.isDirty()&&(d(!0),u.fire("change",{level:l[0],lastLevel:null})),u.fire("TypingUndo"),r=!1,u.nodeChanged()))}),u.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)o.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20i.custom_undo_redo_levels){for(n=0;n
").append(n.childNodes)}))},eb[Dv="pre"]||(eb[Dv]=[]),eb[Dv].push(Bv);var rb=function(e,t){nb(eb[e],function(e){e(t)})},ob=/^(src|href|style)$/,ib=Yt.each,ab=Sl.isEq,ub=function(e){return/^(TH|TD)$/.test(e.nodeName)},sb=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],Do.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i=r.nodeValue.length&&(r=new oo(r,e.getBody()).next()||r),Do.isText(r)&&!n&&0===o&&(r=new oo(r,e.getBody()).prev()||r),r},cb=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},lb=function(e,t,n,r){return!(t=Sl.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},fb=function(e,n,r,o,i){var t,a,u,s,c,l,f,d,m,g,p,h,v,b,y=e.dom;if(c=y,!(ab(l=o,(f=n).inline)||ab(l,f.block)||(f.selector?Do.isElement(l)&&c.is(l,f.selector):void 0)||(s=o,n.links&&"A"===s.tagName)))return!1;if("all"!==n.remove)for(ib(n.styles,function(e,t){e=Sl.normalizeStyleValue(y,Sl.replaceVars(e,r),t),"number"==typeof t&&(t=e,i=0),(n.remove_similar||!i||ab(Sl.getStyle(y,i,t),e))&&y.setStyle(o,t,""),u=1}),u&&""===y.getAttrib(o,"style")&&(o.removeAttribute("style"),o.removeAttribute("data-mce-style")),ib(n.attributes,function(e,t){var n;if(e=Sl.replaceVars(e,r),"number"==typeof t&&(t=e,i=0),!i||ab(y.getAttrib(i,t),e)){if("class"===t&&(e=y.getAttrib(o,t))&&(n="",ib(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void y.setAttrib(o,t,n);"class"===t&&o.removeAttribute("className"),ob.test(t)&&o.removeAttribute("data-mce-"+t),o.removeAttribute(t)}}),ib(n.classes,function(e){e=Sl.replaceVars(e,r),i&&!y.hasClass(i,e)||y.removeClass(o,e)}),a=y.getAttribs(o),t=0;t)\s*/g,"$1"),Yt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Yt.map(e.split(/(?:~\+|~|\+)/),Fb),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},zb=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var c=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",(i=Ub(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,r=Mb(i,n)):r=Mb([t],n),o=Ib.select(t,r)[0]||r.firstChild,Lb(e.styles,function(e,t){(e=c(e))&&Ib.setStyle(o,t,e)}),Lb(e.attributes,function(e,t){(e=c(e))&&Ib.setAttrib(o,t,e)}),Lb(e.classes,function(e){e=c(e),Ib.hasClass(o,e)||Ib.addClass(o,e)}),n.fire("PreviewFormats"),Ib.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Ib.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Lb(u.split(" "),function(e){var t=Ib.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Ib.getStyle(n.getBody(),e,!0),"#ffffff"===Ib.toHex(t).toLowerCase())||"color"===e&&"#000000"===Ib.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Ib.remove(r),s)},Vb=function(e,t,n,r,o){var i=t.get(n);!Uv.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?Db.applyFormat(e,n,r,o):mb(e,n,r,o)},qb=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])};function Hb(e){var t,n,r,o=(t=e,n={},(r=function(e,t){e&&("string"!=typeof e?Yt.each(e,function(e,t){r(t,e)}):(t=t.length?t:[t],Yt.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))})(Pb.get(t.dom)),r(t.settings.formats),{get:function(e){return e?n[e]:n},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}),i=Bi(null);return qb(e),Qv(e),{get:o.get,register:o.register,unregister:o.unregister,apply:b(Db.applyFormat,e),remove:b(mb,e),toggle:b(Vb,e,o),match:b(Uv.match,e),matchAll:b(Uv.matchAll,e),matchNode:b(Uv.matchNode,e),canApply:b(Uv.canApply,e),formatChanged:b(Ob,e,i),getCssText:b(zb,e)}}var jb,$b=Object.prototype.hasOwnProperty,Wb=(jb=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0")):"xhtml"===s.element_format&&0k(n)?(C=A(y*b),y=A(C/b)):(y=A(C/b),C=A(y*b))),N.setStyles(D(s),{width:y,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,N.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=y+" × "+C,f[2]<0&&s.clientWidth<=y&&N.setStyle(s,"left",g+(h-y)),f[3]<0&&s.clientHeight<=C&&N.setStyle(s,"top",p+(v-C)),(t=_.scrollWidth-x)+(n=_.scrollHeight-w)!=0&&N.setStyles(c,{left:r-t,top:o-n}),i||(ip(a,u,h,v),i=!0)},P=function(){i=!1;var e=function(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?N.setStyle(D(u),e,t):N.setAttrib(D(u),e,t))};e("width",y),e("height",C),N.unbind(S,"mousemove",O),N.unbind(S,"mouseup",P),T!==S&&(N.unbind(T,"mousemove",O),N.unbind(T,"mouseup",P)),N.remove(s),N.remove(c),o(u),ap(a,u,y,C),N.setAttrib(u,"style",N.getAttrib(u,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;L(),F(),t=N.getPos(e,_),g=t.x,p=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,y=C=0),n=a.fire("ObjectSelected",{target:e}),B(e)&&!n.isDefaultPrevented()?E(l,function(n,e){var t;(t=N.get("mceResizeHandle"+e))&&N.remove(t),t=N.add(_,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Re.ie&&(t.contentEditable=!1),N.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,m=t.screenY,h=D(u).clientWidth,v=D(u).clientHeight,b=v/h,(f=n).startPos={x:r*n[0]+g,y:o*n[1]+p},x=_.scrollWidth,w=_.scrollHeight,s=u.cloneNode(!0),N.addClass(s,"mce-clonedresizable"),N.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,N.setStyles(s,{left:g,top:p,margin:0}),s.removeAttribute("data-mce-selected"),_.appendChild(s),N.bind(S,"mousemove",O),N.bind(S,"mouseup",P),T!==S&&(N.bind(T,"mousemove",O),N.bind(T,"mouseup",P)),c=N.add(_,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},h+" × "+v)}),n.elm=t,N.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+p-t.offsetHeight/2})}):L(),u.setAttribute("data-mce-selected","1")},L=function(){var e,t;for(e in F(),u&&u.removeAttribute("data-mce-selected"),l)(t=N.get("mceResizeHandle"+e))&&(N.unbind(t),N.remove(t))},I=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(E(N.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=N.$(t).closest("table,img,figure.image,hr")[0],_)&&(U(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):L())},M=function(e){return Cy(function(e,t){for(;t&&t!==e;){if(xy(t)||Cy(t))return t;t=t.parentNode}return null}(a.getBody(),e))},F=function(){for(var e in l){var t=l[e];t.elm&&(N.unbind(t.elm),delete t.elm)}},U=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){U(),Re.ie&&11<=Re.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||M(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(_,"mscontrolselect",function(e){var t=function(e){Le.setEditorTimeout(a,function(){a.selection.select(e)})};if(M(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=Le.throttle(function(e){a.composing||I(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",L),a.on("contextmenu",n)}),a.on("remove",F),{isResizable:B,showResizeRect:o,hideResizeRect:L,updateResizeRect:I,destroy:function(){u=s=null}}},Ny=function(e){return Do.isContentEditableTrue(e)||Do.isContentEditableFalse(e)},Ey=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Yt.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,Do.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Ny))?null:i}return r},Sy=function(n,e){return $(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Ty=function(e,t){var n=(t||document).createDocumentFragment();return F(e,function(e){n.appendChild(e.dom())}),er.fromDom(n)},ky=kr("element","width","rows"),Ay=kr("element","cells"),_y=kr("x","y"),Ry=function(e,t){var n=parseInt(hr.get(e,t),10);return isNaN(n)?1:n},Dy=function(e){return z(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},By=function(e,t){for(var n=e.rows(),r=0;r"+(r.item?r.item(0).outerHTML:r.htmlText),o.removeChild(o.firstChild)):o.innerHTML=r.toString(),t.getInner=!0;var u=e.selection.serializer.serialize(o,t);return"tree"===t.format?u:(t.content=e.selection.isCollapsed()?"":u,e.fire("GetContent",t),t.content)},jy=function(e,t,n){var r,o,i,a=e.selection.getRng(),u=e.getDoc();if((n=n||{format:"html"}).set=!0,n.selection=!0,n.content=t,n.no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){if(t=n.content,a.insertNode){t+='_',a.startContainer===u&&a.endContainer===u?u.body.innerHTML=t:(a.deleteContents(),0===u.body.childNodes.length?u.body.innerHTML=t:a.createContextualFragment?a.insertNode(a.createContextualFragment(t)):(o=u.createDocumentFragment(),i=u.createElement("div"),o.appendChild(i),i.outerHTML=t,a.insertNode(o))),r=e.dom.get("__caret"),(a=u.createRange()).setStartBefore(r),a.setEndBefore(r),e.selection.setRng(a),e.dom.remove("__caret");try{e.selection.setRng(a)}catch(s){}}else a.item&&(u.execCommand("Delete",!1,null),a=e.getRng()),/^\s+/.test(t)?(a.pasteHTML('_'+t),e.dom.remove("__mce_tmp")):a.pasteHTML(t);n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)},$y=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return A.from(i).map(er.fromDom).map(function(e){return r&&t.collapsed?e:$r.child(e,o(e,a)).getOr(e)}).bind(function(e){return sr.isElement(e)?A.some(e):$r.parent(e)}).map(function(e){return e.dom()}).getOr(e)},Wy=function(e,t,n){return $y(e,t,!0,n,function(e,t){return Math.min($r.childNodesCount(e),t)})},Ky=function(e,t,n){return $y(e,t,!1,n,function(e,t){return 0t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return js(c,e,t)},placeCaretAt:function(e,t){return i(Ey(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?Su.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=yy(p),t=wy(p,c),p.bookmarkManager=n,p.controlSelection=t,p},Zy=Do.isContentEditableFalse,eC=Za,tC=nl,nC=tl,rC=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},oC=function(e,t,n,r){var o,i,a,u,s,c,l=e===Nu.Forwards,f=l?nC:tC;return!r.collapsed&&(o=eC(r),Zy(o))?us(e,t,o,e===Nu.Backwards,!0):(u=Ta(r.startContainer),f(i=el(e,t.getBody(),r))?ss(t,i.getNode(!l)):(i=n(i))?f(i)?us(e,t,i.getNode(!l),l,!0):f(a=n(i))&&(!(c=jc(s=i,a))&&Do.isBr(s.getNode())||c)?us(e,t,a.getNode(!l),l,!0):u?ls(t,i.toRange(),!0):null:u?r:null)},iC=function(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=eC(r),o=el(e,t.getBody(),r),i=n(t.getBody(),zh(1),o),a=jt.filter(i,Vh(1)),s=jt.last(o.getClientRects()),(nC(o)||rl(o))&&(d=o.getNode()),(tC(o)||ol(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=Kh(a,c))&&Zy(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),us(e,t,u.node,l'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},uC=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Ns((e=l).getBody()),o=ya.curry(rC,r.next),i=ya.curry(rC,r.prev),a=t?Nu.Forwards:Nu.Backwards,u=t?o:i,s=e.selection.getRng(),(n=oC(a,e,u,s))?n:(n=aC(e,a,s))||null);return!!c&&(l.selection.setRng(c),!0)}},sC=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?Uh:Fh,i=(e=u).selection.getRng(),(n=iC(r,e,o,i))?n:(n=aC(e,r,i))||null);return!!a&&(u.selection.setRng(a),!0)}},cC=function(e,r){return G($(e,function(e){return Wb({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:v},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},lC=function(e){for(var t=[],n=1;n'},RC=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},DC=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},BC=function(e,t,n){return!1===Do.isText(t)?n:e?1===n&&t.data.charAt(n-1)===wa?0:n:n===t.data.length-1&&t.data.charAt(n)===wa?t.data.length:n},OC=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},PC=function(e,t){var n=ec(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,tc(e))},LC=function(a,e){var t,u,s,i,c,n,r,o,l,f,d,m,g,p,h,v,b,y,C=a.dom,x=a.schema,w=x.getNonEmptyElements(),N=a.selection.getRng(),E=function(e){var t,n,r,o=s,i=x.getTextInlineElements();if(e||"TABLE"===f||"HR"===f?(t=C.create(e||m),PC(a,t)):t=c.cloneNode(!1),r=t,!1===oc(a))C.setAttrib(t,"style",null),C.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(Ku(o))continue;n=o.cloneNode(!1),C.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return _C(r),t},S=function(e){var t,n,r,o;if(o=BC(e,s,i),Do.isText(s)&&(e?0s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=g&&Do.isText(s)?s.nodeValue.length:0),(u=OC(C,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,g=OC(m,r);if(!(a=m.getParent(r,m.isBlock))||!DC(m,a)){if(l=(a=a||g)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),PC(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),PC(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,N,s,i)),c=C.getParent(s,C.isBlock),l=c?C.getParent(c.parentNode,C.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||e.ctrlKey||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&C.isEmpty(c)?AC(a,E,l,c,m):m&&c===a.getBody()||(m=m||"P",Ta(c)?(r=La(c),C.isEmpty(c)&&_C(c),yC(a,r)):S()?T():S(!0)?(r=c.parentNode.insertBefore(E(),c),yC(a,RC(c,"HR")?r:c)):((t=(b=N,y=b.cloneRange(),y.setStart(b.startContainer,BC(!0,b.startContainer,b.startOffset)),y.setEnd(b.endContainer,BC(!1,b.endContainer,b.endOffset)),y).cloneRange()).setEndAfter(c),function(e){for(;Do.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o=t.extractContents()),r=o.firstChild,C.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Do.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=o)&&"A"===a.nodeName&&0===Yt.trim(Na(a.innerText||a.textContent)).length&&e.remove(o);var a}}(C,w,r),p=C,(h=c).normalize(),(v=h.lastChild)&&!/^(left|right)$/gi.test(p.getStyle(v,"float",!0))||p.add(h,"br"),C.isEmpty(c)&&_C(c),r.normalize(),C.isEmpty(r)?(C.remove(r),T()):yC(a,r)),C.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},IC=function(e,t){return xC(e).filter(function(e){return 0",Ys(f)!==f.documentBaseUrl&&(g+=''),g+='',d=Gs(f),m=Js(f),Qs(f)&&(g+=''),g+='
'),gx.add(t.iframeContainer,l),p},hx=function(e,t){var n=px(e,t);t.editorContainer&&(gx.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=gx.isHidden(t.editorContainer)),e.getElement().style.display="none",gx.setAttrib(e.id,"aria-hidden","true"),n||mx(e)},vx=pi.DOM,bx=function(t,n,e){var r,o,i=Gp.get(e);if(r=Gp.urls[e]||t.documentBaseUrl.replace(/\/$/,""),e=Yt.trim(e),i&&-1===Yt.inArray(n,e)){if(Yt.each(Gp.dependencies(e),function(e){bx(t,n,e)}),t.plugins[e])return;o=new i(t,r,t.$),(t.plugins[e]=o).init&&(o.init(t,r),n.push(e))}},yx=function(e){return e.replace(/^\-/,"")},Cx=function(e){return{editorContainer:e,iframeContainer:e}},xx=function(e){var t,n,r=e.getElement();return e.inline?Cx(null):(t=r,n=vx.create("div"),vx.insertAfter(n,t),Cx(n))},wx=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.getElement();return e.orgDisplay=m.style.display,k(d.theme)?(l=(o=e).settings,f=o.getElement(),i=l.width||vx.getStyle(f,"width")||"100%",a=l.height||vx.getStyle(f,"height")||f.offsetHeight,u=l.min_height||100,(s=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),s.test(""+a)&&(a=Math.max(parseInt(a,10),u)),c=o.theme.renderUI({targetNode:f,width:i,height:a,deltaWidth:l.delta_width,deltaHeight:l.delta_height}),l.content_editable||(a=(c.iframeHeight||a)+("number"==typeof a?c.deltaHeight||0:""))=n.length)for(r=0,o=e.length;r=n.length||e[r]!==n[r]){i=r+1;break}if(e.length=e.length||e[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=e.length-(i-1);r]*>( | |\\s|\xa0|
|)<\\/"+a+">[\r\n]*|
[\r\n]*)$"),r=i.replace(u,"")}return"text"===t.format||Co(er.fromDom(n))?t.content=r:t.content=Yt.trim(r),t.no_events||e.fire("GetContent",t),t.content},Lx=function(e,t){t(e),e.firstChild&&Lx(e.firstChild,t),e.next&&Lx(e.next,t)},Ix=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&Lx(t.firstChild,function(t){F(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),F(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);F(r,function(t){F(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Mx=function(e){return e instanceof ty},Fx=function(e,t){var r;e.dom.setHTML(e.getBody(),t),Dp(r=e)&&fl.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=Do.isTable(t)?fl.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},Ux=function(u,s,c){return void 0===c&&(c={}),c.format=c.format?c.format:"html",c.set=!0,c.content=Mx(s)?"":s,Mx(s)||c.no_events||(u.fire("BeforeSetContent",c),s=c.content),A.from(u.getBody()).fold(H(s),function(e){return Mx(s)?function(e,t,n,r){Ix(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=lf({validate:e.validate},e.schema).serialize(n);return r.content=Co(er.fromDom(t))?o:Yt.trim(o),Fx(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,c):(t=u,n=e,o=c,0===(r=s).length||/^\s+$/.test(r)?(a='
',"TABLE"===n.nodeName?r=""+a+"":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),(i=ec(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='
    '),Fx(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=lf({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Co(er.fromDom(n))?r:Yt.trim(r),Fx(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},zx=pi.DOM,Vx=function(e){return A.from(e).each(function(e){return e.destroy()})},qx=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&zx.remove(o.nextSibling),!e.inline&&r&&(i=e,zx.setStyle(i.id,"display",i.orgDisplay)),rp(e),e.editorManager.remove(e),zx.remove(e.getContainer()),Vx(t),Vx(n),e.destroy()}var i},Hx=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Vx(i),Vx(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),zx.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},jx=pi.DOM,$x=Yt.extend,Wx=Yt.each,Kx=Yt.resolve,Xx=Re.ie,Yx=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=Ef(vf,c,a,u),l.settings=t,Ni.language=t.language||"en",Ni.languageLoad=t.language_load,Ni.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new Ox(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new Cp(l),l.loadedCSS={},l.editorCommands=new Yg(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(Re.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(Re.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=pn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};$x(Yx.prototype={render:function(){kx(this)},focus:function(e){Rp(this,e)},hasFocus:function(){return Dp(this)},execCallback:function(e){for(var t=[],n=1;n=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=_w(e.x,t.x),r=_w(e.y,t.y),o=Aw(e.x+e.w,t.x+t.w),i=Aw(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:Bw(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=_w(0,t.x-u),o=_w(0,t.y-s),i=_w(0,c-f),a=_w(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),Bw(u,s,(c-=i)-u,(l-=a)-s)},create:Bw,fromClientRect:function(e){return Bw(e.left,e.top,e.width,e.height)}},Pw={},Lw={add:function(e,t){Pw[e.toLowerCase()]=t},has:function(e){return!!Pw[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=Pw.hasOwnProperty(t)?Pw[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=Pw[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},Iw=Yt.each,Mw=Yt.extend,Fw=function(){};Fw.extend=Sw=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!Tw&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in Tw=!0,e=new this,Tw=!1,n.Mixins&&(Iw(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&Iw(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&Iw(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&Iw(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=Mw({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=Sw,i};var Uw=Math.min,zw=Math.max,Vw=Math.round,qw=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r+~]|"+at+")"+at+"*"),mt=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),gt=new RegExp(ct),pt=new RegExp("^"+ut+"$"),ht={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,bt=/^h\d$/i,yt=/^[^{]+\{\s*\[native \w/,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,wt=/'|\\/g,Nt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Et=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{rt.apply(et=ot.call($e.childNodes),$e.childNodes),et[$e.childNodes.length].nodeType}catch(Hw){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var St=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:$e)!==Fe&&Me(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Fe).nodeType)&&9!==u)return[];if(Ue&&!r){if(o=Ct.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&je(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Te.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(Te.qsa&&(!Ve||!Ve.test(e))){if(f=l=qe,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=De(e),(l=t.getAttribute("id"))?f=l.replace(wt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Pt(c[s]);d=xt.test(e)&&Bt(t.parentNode)||t,m=c.join(",")}if(m)try{return rt.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return Oe(e.replace(lt,"$1"),t,n,r)};function kt(){var r=[];return function e(t,n){return r.push(t+" ")>Ae.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function Tt(e){return e[qe]=!0,e}function At(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function _t(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Rt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Dt(a){return Tt(function(i){return i=+i,Tt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Bt(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(ke in Te=St.support={},Re=St.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Me=St.setDocument=function(e){var t,s=e?e.ownerDocument||e:$e,n=s.defaultView;return s!==Fe&&9===s.nodeType&&s.documentElement?(ze=(Fe=s).documentElement,Ue=!Re(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Me()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Me()})),Te.attributes=!0,Te.getElementsByTagName=!0,Te.getElementsByClassName=yt.test(s.getElementsByClassName),Te.getById=!0,Ae.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ue){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},Ae.filter.ID=function(e){var t=e.replace(Nt,Et);return function(e){return e.getAttribute("id")===t}},Ae.find.TAG=Te.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},Ae.find.CLASS=Te.getElementsByClassName&&function(e,t){if(Ue)return t.getElementsByClassName(e)},He=[],Ve=[],Te.disconnectedMatch=!0,Ve=Ve.length&&new RegExp(Ve.join("|")),He=He.length&&new RegExp(He.join("|")),t=yt.test(ze.compareDocumentPosition),je=t||yt.test(ze.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Je=t?function(e,t){if(e===t)return Ie=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Te.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===$e&&je($e,e)?-1:t===s||t.ownerDocument===$e&&je($e,t)?1:Le?it.call(Le,e)-it.call(Le,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Ie=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Le?it.call(Le,e)-it.call(Le,t):0;if(o===i)return At(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?At(a[r],u[r]):a[r]===$e?-1:u[r]===$e?1:0},s):Fe},St.matches=function(e,t){return St(e,null,null,t)},St.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Fe&&Me(e),t=t.replace(mt,"='$1']"),Te.matchesSelector&&Ue&&(!He||!He.test(t))&&(!Ve||!Ve.test(t)))try{var n=(void 0).call(e,t);if(n||Te.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(Hw){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Nt,Et),e[3]=(e[3]||e[4]||e[5]||"").replace(Nt,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||St.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&St.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&>.test(n)&&(t=De(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Nt,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Xe[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Xe(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=St.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,Zt=Se.Event,en=Xt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Yt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,yn(e[0]));else if(t.length&&!t.nodeType){if(t=gn.makeArray(t),r)for(o=t.length-1;0<=o;o--)on(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return gn(t).find(e);if(n[1])for(r=rn(e,yn(t)).firstChild;r;)Gt.call(o,r),r=r.nextSibling;else{if(!(r=yn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Xt.toArray(this)},add:function(e,t){var n,r,o=this;if(nn(e))return o.add(gn(e));if(!1!==t)for(n=gn.unique(o.toArray().concat(gn.makeArray(e))),o.length=n.length,r=0;r=a.length&&r(o)}))})})},Jr=function(e){return Gr(e,Yr.nu)},Qr=function(n){return{is:function(e){return n===e},isValue:C,isError:y,getOr:j(n),getOrThunk:j(n),getOrDie:j(n),or:function(e){return Qr(n)},orThunk:function(e){return Qr(n)},fold:function(e,t){return t(n)},map:function(e){return Qr(e(n))},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return A.some(n)}}},Zr=function(n){return{is:y,isValue:y,isError:C,getOr:q,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Zr(n)},each:v,bind:function(e){return Zr(n)},exists:y,forall:C,toOption:A.none}},eo={value:Qr,error:Zr};function to(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var no,ro,oo,io=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Po=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lo=/[<>&\"\']/g,Io=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Mo={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};ro={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},oo={"<":"<",">":">","&":"&",""":'"',"'":"'"};var Fo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):Mo[t]||String.fromCharCode(t):oo[e]||no[e]||(n=e,(r=nr.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},jo={},qo={},$o=Xt.makeMap,Wo=Xt.each,Ko=Xt.extend,Xo=Xt.explode,Yo=Xt.inArray,Go=function(e,t){return(e=Xt.trim(e))?e.split(t||" "):[]},Jo=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n