function initTinyMce(n){tinymce.baseURL=window.GLOBAL.sitePrefix+"/Scripts/lib/tinymce";tinymce.remove(n);tinymce.init({selector:n,plugins:"tabfocus link lists",theme:"silver",suffix:".min",menubar:!1,resize:!1,statusbar:!1,toolbar:"bold italic underline | undo redo | bullist numlist outdent indent",toolbar_location:"bottom",convert_urls:!0,inline:!1,extended_valid_elements:"ol[type]",skin:"oxide",content_css:window.GLOBAL.sitePrefix+"/Content/custom/tiny-mce.css",content_style:"body { font-size:10px; }",invalid_elements:"div",formats:{underline:{inline:"u",exact:!0}},valid_styles:{"*":"padding-left,color"}})}function editHelpLink_OnClick(n,t){var i=$(n),u=i.data("href"),r;r=t==="new"?{page:i.data("currentPage"),field:i.data("field")}:{id:i.data("identifier")};showDialog(t,r,u)}function showDialog(n,t,i){function r(){initTinyMce("#helpForm #form-Description");$("#helpForm .selectpicker").selectpicker("render");u()}$.ajax({type:"GET",url:i+getCacheBuster(),data:t}).done(function(i,u,f){var e,o;f.getResponseHeader("content-type")==="application/json; charset=utf-8"?i.Authorised||(e=window.location.href,e+=e.indexOf("?")===-1?"?":"&",e+="editHelp=true",e+="&mode="+n,n==="new"?(e+="&page="+t.page,e+="&field="+t.field):e+="&id="+t.id,window.location.href=i.AuthorisationUri+"?applicationReturnUrl="+encodeURIComponent(e)):(o=$("#popup").modal("show"),o.find(".modal-body").html(i),r())});var u=function(){$("#btnSave").bind("click",function(){$("#form-Description").html(tinymce.get("form-Description").getContent());$.ajax({type:"POST",url:$("#helpForm").attr("action")+getCacheBuster(),data:$("#helpForm").serialize()}).done(function(n){$("#getCode").html(n);u();r()})})}}var activeSelect,retiredSelect;!function(){"use strict";function sst(n){if(null===n)return"null";if(void 0===n)return"undefined";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}function hst(n){return cl(function(t,i){if(t.length!==i.length)return!1;for(var u=t.length,r=0;r<u;r++)if(!n.eq(t[r],i[r]))return!1;return!0})}function cst(n){return cl(function(t,i){var h,o,u,f=Object.keys(t),c=Object.keys(i),s,r,e;if(o=hst(vhi),u=function(n){return t=h,Array.prototype.slice.call(n).sort(t);var t},!cl(function(n,t){return o.eq(u(n),u(t))}).eq(f,c))return!1;for(s=f.length,r=0;r<s;r++)if(e=f[r],!n.eq(t[e],i[e]))return!1;return!0})}function bd(n){return function(t){return r=typeof(i=t),(null===i?"null":"object"==r&&(Array.prototype.isPrototypeOf(i)||i.constructor&&"Array"===i.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(i)||i.constructor&&"String"===i.constructor.name)?"string":r)===n;var i,r}}function kd(n){return function(t){return typeof t===n}}function lst(n){return function(t){return n===t}}function wu(n){return null==n}function tt(n){return!wu(n)}function y(){}function ao(n,t){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n(t.apply(null,r))}}function ast(n,t){return function(i){return n(t(i))}}function f(n){return function(){return n}}function bi(n){return n}function ahi(n,t){return n===t}function u(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return function(){for(var u,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return u=i.concat(r),n.apply(null,u)}}function gd(n){return function(t){return!n(t)}}function yhi(n){return n()}function phi(n){n()}function ng(){return ny}function yst(n){return n()}function pst(n,t){return whi.call(n,t)}function dt(n,t){return-1<pst(n,t)}function ki(n,t){for(var i=0,r=n.length;i<r;i++)if(t(n[i],i))return!0;return!1}function ut(n,t){for(var f,r=n.length,u=new Array(r),i=0;i<r;i++)f=n[i],u[i]=t(f,i);return u}function e(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i],i)}function wst(n,t){for(var i=n.length-1;0<=i;i--)t(n[i],i)}function bst(n,t){for(var r,u=[],f=[],i=0,e=n.length;i<e;i++)r=n[i],(t(r,i)?u:f).push(r);return{pass:u,fail:f}}function p(n,t){for(var r,u=[],i=0,f=n.length;i<f;i++)r=n[i],t(r,i)&&u.push(r);return u}function kst(n,t,i){return wst(n,function(n,r){i=t(i,n,r)}),i}function fu(n,t,i){return e(n,function(n,r){i=t(i,n,r)}),i}function dst(t,i,r){for(var f,u=0,e=t.length;u<e;u++){if(f=t[u],i(f,u))return n.some(f);if(r(f,u))break}return n.none()}function gt(n,t){return dst(n,t,it)}function ty(t,i){for(var r=0,u=t.length;r<u;r++)if(i(t[r],r))return n.some(r);return n.none()}function oh(n,t){return function(n){for(var i=[],t=0,r=n.length;t<r;++t){if(!br(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);bhi.apply(i,n[t])}return i}(ut(n,t))}function al(n,t){for(var i=0,r=n.length;i<r;++i)if(!0!==t(n[i],i))return!1;return!0}function iy(n){var t=eg.call(n,0);return t.reverse(),t}function gst(n,t){return p(n,function(n){return!dt(t,n)})}function tg(n,t){var i=eg.call(n,0);return i.sort(t),i}function ig(t,i){return 0<=i&&i<t.length?n.some(t[i]):n.none()}function or(n){return ig(n,0)}function vo(n){return ig(n,n.length-1)}function nht(t,i){for(var u,r=0;r<t.length;r++)if(u=i(t[r],r),u.isSome())return u;return n.none()}function et(n,t){for(var r,u=ch(n),i=0,f=u.length;i<f;i++)r=u[i],t(n[r],r)}function tht(n,t){return dhi(n,function(n,i){return{k:i,v:t(n,i)}})}function rg(n){return function(t,i){n[i]=t}}function iht(n,t,i,r){return et(n,function(n,u){(t(n,u)?i:r)(n,u)}),1}function vl(n,t){var i={};return iht(n,t,rg(i),y),i}function at(t,i){return w(t,i)?n.from(t[i]):n.none()}function sh(n,t){return w(n,t)&&void 0!==n[t]&&null!==n[t]}function yl(n,t,i){var r,u;if(!n)return!1;if(i=i||n,void 0!==n.length){for(r=0,u=n.length;r<u;r++)if(!1===t.call(i,n[r],r,n))return!1}else for(r in n)if(w(n,r)&&!1===t.call(i,n[r],r,n))return!1;return!0}function ug(n,t){var i=[];return yl(n,function(r,u){i.push(t(r,u,n))}),i}function hh(n,t){var i=[];return yl(n,function(r,u){t&&!t(r,u,n)||i.push(r)}),i}function rht(n,t){if(n)for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1}function ry(n,t,i,r){for(var f=tr(i)?n[0]:i,u=0;u<n.length;u++)f=t.call(r,f,n[u],u);return f}function uht(n,t,i){for(var r=0,u=n.length;r<u;r++)if(t.call(i,n[r],r,n))return r;return-1}function yo(n){return n[n.length-1]}function fe(n,t,i){if(i||2===arguments.length)for(var u,r=0,f=t.length;r<f;r++)!u&&r in t||((u=u||Array.prototype.slice.call(t,0,r))[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))}function fht(n){var t,i=!1;return function(){for(var u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];return i||(i=!0,t=n.apply(null,u)),t}}function eht(n,t){var i=String(t).toLowerCase();return gt(n,function(n){return n.search(i)})}function vi(n,t){return-1!==n.indexOf(t)}function sg(n){return function(t){return t.replace(n,"")}}function uy(n){return 0<n.length}function oht(n){return!uy(n)}function pf(n){return function(t){return vi(t,n)}}function ghi(n){return window.matchMedia(n).matches}function sht(n){return null==n?"":(""+n).replace(sci,"")}function hht(n,t){return t?!("array"!==t||!og(n))||typeof n===t:void 0!==n}function cht(n,t){for(var i=[],u=function(n){return i.push(n),t(n)},r=t(n);(r=r.bind(u)).isSome(););return i}function lh(n,t){var r=n.dom,i;if(1!==r.nodeType)return!1;if(i=r,void 0!==i.matches)return i.matches(t);if(void 0!==i.msMatchesSelector)return i.msMatchesSelector(t);if(void 0!==i.webkitMatchesSelector)return i.webkitMatchesSelector(t);if(void 0!==i.mozMatchesSelector)return i.mozMatchesSelector(t);throw new Error("Browser lacks native selectors");}function lht(n){return 1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount}function g(n,t){return n.dom===t.dom}function ee(n,t){return kr().browser.isIE()?(i=n.dom,r=t.dom,u=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(i.compareDocumentPosition(r)&u)):(f=n.dom)!==(e=t.dom)&&f.contains(e);var i,r,u,f,e}function aht(){return hg(0,0)}function vht(n){function t(n){return function(){return i===n}}var i=n.current,r=n.version;return{current:i,version:r,isEdge:t("Edge"),isChrome:t("Chrome"),isIE:t("IE"),isOpera:t("Opera"),isFirefox:t(bht),isSafari:t("Safari")}}function yht(n){function t(n){return function(){return i===n}}var i=n.current,r=n.version;return{current:i,version:r,isWindows:t(kht),isiOS:t("iOS"),isAndroid:t(dht),isOSX:t("OSX"),isLinux:t("Linux"),isSolaris:t(ght),isFreeBSD:t(nct),isChromeOS:t(tct)}}function pl(n){if(null==n)throw new Error("Node cannot be null or undefined");return{dom:n}}function vt(n){return n.dom.nodeName.toLowerCase()}function uct(n){return n.dom.nodeType}function fy(n){return function(t){return uct(t)===n}}function fct(n){return t.fromDom(n.dom.ownerDocument)}function ah(n){return lci(n)?n:fct(n)}function ect(n){return t.fromDom(ah(n).dom.defaultView)}function eu(i){return n.from(i.dom.parentNode).map(t.fromDom)}function wo(i){return n.from(i.dom.previousSibling).map(t.fromDom)}function bl(i){return n.from(i.dom.nextSibling).map(t.fromDom)}function oct(n){return iy(cht(n,wo))}function sct(n){return cht(n,bl)}function ey(i,r){var u=i.dom.childNodes;return n.from(u[r]).map(t.fromDom)}function hct(n){return ey(n,0)}function vg(n){return ey(n,n.dom.childNodes.length-1)}function cct(n){return n.dom.childNodes.length}function lct(n){return aci(n)&&tt(n.dom.host)}function yg(n){return lct(n)?n:function(){var i=ah(n).dom.head;if(null==i)throw new Error("Head is not available yet");return t.fromDom(i)}()}function hci(n){return t.fromDom(n.dom.host)}function ou(n,t){eu(n).each(function(i){i.dom.insertBefore(t.dom,n.dom)})}function kl(n,t){bl(n).fold(function(){eu(n).each(function(n){ii(n,t)})},function(n){ou(n,t)})}function act(n,t){hct(n).fold(function(){ii(n,t)},function(i){n.dom.insertBefore(t.dom,i.dom)})}function oy(n,t){e(t,function(t){ii(n,t)})}function pg(n){n.dom.textContent="";e(nu(n),function(n){ni(n)})}function vct(n){var t,i=nu(n);0<i.length&&(t=n,e(i,function(n){ou(t,n)}));ni(n)}function sy(n,t){return void 0!==n?n:void 0!==t?t:0}function wg(n){var t=void 0!==n?n.dom:document,i=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return yh(i,r)}function yct(n,t,i){var r=(void 0!==i?i.dom:document).defaultView;r&&r.scrollTo(n,t)}function pct(n,t){kr().browser.isSafari()&&ft(n.dom.scrollIntoViewIfNeeded)?n.dom.scrollIntoViewIfNeeded(!1):n.dom.scrollIntoView(t)}function wct(n,t,i,r){return{x:n,y:t,width:i,height:r,right:n+i,bottom:t+r}}function bct(i){var r=void 0===i?window:i,f=r.document,u=wg(t.fromDom(f)),e=void 0===r?window:r;return(kr().browser.isFirefox()?n.none():n.from(e.visualViewport)).fold(function(){var n=r.document.documentElement,t=n.clientWidth,i=n.clientHeight;return wct(u.left,u.top,t,i)},function(n){return wct(Math.max(n.pageLeft,u.left),Math.max(n.pageTop,u.top),n.width,n.height)})}function dl(n){return function(t){return!!t&&t.nodeType===n}}function hy(n){return n&&!Object.getPrototypeOf(n)}function dr(n){var t=n.map(function(n){return n.toLowerCase()});return function(n){if(n&&n.nodeName){var i=n.nodeName.toLowerCase();return dt(t,i)}return!1}}function cy(n,t){var i=t.toLowerCase().split(" ");return function(t){var r,u;if(h(t))for(r=0;r<i.length;r++)if(u=t.ownerDocument.defaultView.getComputedStyle(t,null),(u?u.getPropertyValue(n):null)===i[r])return!0;return!1}}function kct(n){return function(t){return h(t)&&t.hasAttribute(n)}}function bo(n){return h(n)&&n.hasAttribute("data-mce-bogus")}function vh(n){return h(n)&&"TABLE"===n.tagName}function dct(n){return function(t){return h(t)&&(t.contentEditable===n||t.getAttribute("data-mce-contenteditable")===n)?!0:!1}}function ly(n,t,i){return void 0===i&&(i=ahi),n.exists(function(n){return i(n,t)})}function di(t,i,r){return t.isSome()&&i.isSome()?n.some(r(t.getOrDie(),i.getOrDie())):n.none()}function ay(n){return void 0!==n.style&&ft(n.style.getPropertyValue)}function gct(n,t,i){if(!(ht(i)||vst(i)||eh(i)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",i,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,i+"")}function du(n,t,i){gct(n.dom,t,i)}function oe(n,t){var i=n.dom;et(t,function(n,t){gct(i,t,n)})}function gl(n,t){var i=n.dom.getAttribute(t);if(null!==i)return i}function nlt(t,i){return n.from(gl(t,i))}function se(n,t){n.dom.removeAttribute(t)}function cci(n,t){var i=n.dom;et(t,function(n,t){!function(n,t,i){if(!ht(i))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",i,":: Element ",n),new Error("CSS value must be a string: "+i);ay(n)&&n.style.setProperty(t,i)}(i,t,n)})}function wf(n,t){var i=n.dom,r=window.getComputedStyle(i).getPropertyValue(t);return""!==r||na(n)?r:elt(i,t)}function bg(t,i){var r=t.dom,u=elt(r,i);return n.from(u).filter(function(n){return 0<n.length})}function tlt(n){var u={},t=n.dom,i,r;if(ay(t))for(i=0;i<t.style.length;i++)r=t.style.item(i),u[r]=t.style[r];return u}function ilt(n){return gt(n,su)}function rlt(n,t){return n.children&&dt(n.children,t)}function bci(n){setTimeout(function(){throw n;},0)}function slt(n){return ta(function(){return new hlt(n)})}function he(n){if(!br(n))throw new Error("cases must be an array");if(0===n.length)throw new Error("there must be at least one case");var t=[],i={};return e(n,function(r,u){var o=ch(r),f,e;if(1!==o.length)throw new Error("one and only one name per case");if(f=o[0],e=r[f],void 0!==i[f])throw new Error("duplicate key detected:"+f);if("cata"===f)throw new Error("cannot have a case named cata (sorry)");if(!br(e))throw new Error("case arguments must be an array");t.push(f);i[f]=function(){for(var o,i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];if(o=i.length,o!==e.length)throw new Error("Wrong number of arguments to case "+f+". Expected "+e.length+" ("+e+"), got "+o);return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==n.length)throw new Error("Wrong number of arguments to fold. Expected "+n.length+", got "+t.length);return t[u].apply(null,i)},match:function(n){var r=ch(n);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));if(!al(t,function(n){return dt(r,n)}))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return n[f].apply(null,i)},log:function(n){console.log(n,{constructors:t,constructor:f,params:i})}}}}),i}function llt(n){return n.fold(bi,bi)}function alt(t,i,r,u,f){return t(r,u)?n.some(r):ft(f)&&f(r)?n.none():i(r,u,f)}function ra(i,r,u){for(var e,f=i.dom,o=ft(u)?u:it;f.parentNode;){if(f=f.parentNode,e=t.fromDom(f),r(e))return n.some(e);if(o(e))break}return n.none()}function yy(n,t,i){return alt(function(n,t){return t(n)},ra,n,t,i)}function py(n,t,i){return ra(n,function(n){return lh(n,t)},i)}function wy(i,r){return u=r,lht(f=void 0===i?document:i.dom)?n.none():n.from(f.querySelector(u)).map(t.fromDom);var u,f}function un(n,t,i){return alt(lh,py,n,t,i)}function fn(n,t){return"number"!=typeof t&&(t=0),setTimeout(n,t)}function vlt(n,t){return"number"!=typeof t&&(t=1),setInterval(n,t)}function ylt(n,t){function r(){for(var u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];clearTimeout(i);i=fn(function(){n.apply(this,u)},t)}var i;return r.stop=function(){clearTimeout(i)},r}function plt(n,i){function s(f,e,s){function k(n,t){for(var i=n.length;i--;)n[i]();h.status=t;h.passed=[];h.failed=[];c&&(c.onload=null,c.onerror=null,c=null)}function d(){return k(h.passed,2),0}function w(){return k(h.failed,3)}var c,p=r._addCacheSuffix(f),h=at(u,p).getOrThunk(function(){return{id:"mce-u"+l++,passed:[],failed:[],count:0}}),y,g,nt,b;(u[p]=h).count++;b=function(){var t=b;(function(){for(var r,t=n.styleSheets,i=t.length;i--;)if(r=t[i].ownerNode,r&&r.id===c.id)return d(),1})()||(Date.now()-g<v?ui.setTimeout(t):w())};e&&h.passed.push(e);s&&h.failed.push(s);1!==h.status&&(2!==h.status?3!==h.status?(h.status=1,oe(y=t.fromTag("link",a.dom),{rel:"stylesheet",type:"text/css",id:h.id}),g=Date.now(),i.contentCssCors&&du(y,"crossOrigin","anonymous"),i.referrerPolicy&&du(y,"referrerpolicy",i.referrerPolicy),(c=y.dom).onload=b,c.onerror=w,nt=y,ii(yg(o),nt),du(y,"href",p)):w():d())}function c(n){return slt(function(t){s(n,ao(t,f(clt.value(n))),ao(t,f(clt.error(n))))})}function h(n){var t=r._addCacheSuffix(n);at(u,t).each(function(n){var i;0==--n.count&&(delete u[t],i=n.id,wy(yg(o),"#"+i).each(ni))})}void 0===i&&(i={});var l=0,u={},o=t.fromDom(n),a=ah(o),v=i.maxLoadTime||5e3;return{load:s,loadAll:function(n,t,i){var r,u=ut(n,c);r=u;slt(function(n){var t=[],i=0;0===r.length?n([]):e(r,function(u,f){var e;u.get((e=f,function(u){t[e]=u;++i>=r.length&&n(t)}))})}).get(function(n){var r=bst(n,function(n){return n.isValue()});0<r.fail.length?i(r.fail.map(llt)):t(r.pass.map(llt))})},unload:h,unloadAll:function(n){e(n,function(n){h(n)})},_setReferrerPolicy:function(n){i.referrerPolicy=n}}}function go(n,t){this.node=n;this.rootNode=t;this.current=this.current.bind(this);this.next=this.next.bind(this);this.prev=this.prev.bind(this);this.prev2=this.prev2.bind(this)}function ce(n){var t;return function(i){return t=t||function(n,t){for(var r,u={},i=0,f=n.length;i<f;i++)r=n[i],u[String(r)]=t(r,i);return u}(n,lt),w(t,vt(i))}}function sn(n){return su(n)&&!tf(n)}function wh(n){return su(n)&&"br"===vt(n)}function bh(n){return gh(n)&&(n=n.parentNode),tli(n)&&n.hasAttribute("data-mce-caret")}function kh(n){return gh(n)&&tp(n.data)}function hr(n){return bh(n)||kh(n)}function blt(n){return n.firstChild!==n.lastChild||!st(n.firstChild)}function hn(n){var t=n.container();return!!o(t)&&(t.data.charAt(n.offset())===fi||n.isAtStart()&&kh(t.previousSibling))}function cn(n){var t=n.container();return!!o(t)&&(t.data.charAt(n.offset()-1)===fi||n.isAtEnd()&&kh(t.nextSibling))}function ln(n){return n&&n.hasAttribute("data-mce-caret")?(bo(t=(i=n.getElementsByTagName("br"))[i.length-1])&&t.parentNode.removeChild(t),n.removeAttribute("data-mce-caret"),n.removeAttribute("data-mce-bogus"),n.removeAttribute("style"),n.removeAttribute("_moz_abspos"),n):null;var i,t}function klt(n){return bh(n.startContainer)}function nf(n){return!oli(n)&&(uli(n)?!fli(n.parentNode):oat(n)||rli(n)||eli(n)||dn(n))}function by(n,t){return nf(n)&&function(n,t){for(n=n.parentNode;n&&n!==t;n=n.parentNode){if(dn(n))return!1;if(eat(n))return!0}return!0}(n,t)}function ns(n){return sli.test(n)}function ky(n,i){return nf(n)&&!1===(c=i,o(f=n)&&ns(f.data)&&!1===(e=f,s=t.fromDom(c),py(t.fromDom(e),"pre,code",u(g,s)).isSome()))||h(r=n)&&"A"===r.nodeName&&!r.hasAttribute("href")&&(r.hasAttribute("name")||r.hasAttribute("id"))||hli(n);var e,s,r,f,c}function pt(n,t){return function(n,t){var u=0,i,r;if(ky(n,n))return!1;if(i=n.firstChild,!i)return!0;r=new yt(i,n);do{if(t){if(lli(i)){i=r.next(!0);continue}if(cli(i)){i=r.next();continue}}if(st(i))u++,i=r.next();else{if(ky(i,n))return!1;i=r.next()}}while(i);return u<=1}(n.dom,t=void 0===t||t)}function dlt(n,i){return tt(n)&&(ky(n,i)||sn(t.fromDom(n)))}function glt(n){return"span"===n.nodeName.toLowerCase()&&"bookmark"===n.getAttribute("data-mce-type")}function nat(n,t){var i,r,u,f={};if(n){for(n=n.split(","),t=t||10,i=0;i<n.length;i+=2)r=String.fromCharCode(parseInt(n[i],t)),ts[r]||(u="&"+n[i+1]+";",f[r]=u,f[u]=r);return f}}function tat(n,t){return n.replace(t?up:fp,function(n){return ts[n]||n})}function iat(n,t){return n.replace(t?up:fp,function(n){return 1<n.length?"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";":ts[n]||"&#"+n.charCodeAt(0)+";"})}function an(n,t,i){return i=i||ntt,n.replace(t?up:fp,function(n){return ts[n]||i[n]||n})}function ti(n,t){return(n=r.trim(n))?n.split(t||" "):[]}function vn(n,t){var i;return n&&(i={},si(n="string"==typeof n?{"*":n}:n,function(n,r){i[r]=i[r.toUpperCase()]=("map"===t?nc:sat)(n,/[, ]/)})),i}function le(n){function h(t,i,r){var u=n[t];return u?u=nc(u,/[, ]/,nc(u.toUpperCase(),/[, ]/)):(u=is[t])||(u=nc(i," ",nc(i.toUpperCase()," ")),u=ttt(u,r),is[t]=u),u}function t(n,t,i){function f(n,t){for(var r={},i=0,u=n.length;i<u;i++)r[n[i]]=t||{};return r}var e,o,r,u;for(t=t||"","string"==typeof(i=i||[])&&(i=ti(i)),r=ti(n),u=r.length;u--;)o={attributes:f(e=ti([a,t].join(" "))),attributesOrder:e,children:f(i,bli)},c[r[u]]=o}function i(n,t){for(var r,i,f,e=ti(n),o=e.length,u=ti(t);o--;)for(r=c[e[o]],i=0,f=u.length;i<f;i++)r.attributes[u[i]]={},r.attributesOrder.push(u[i])}function ft(n){return new RegExp("^"+n.replace(/([?+*])/g,".$1")+"$")}function y(n){var y,g,p,nt,i,t,f,l,s,r,w,h,o,e,b,a,k,c,tt=/[*?+]/,d;if(n)for(d=ti(n,","),u["@"]&&(a=u["@"].attributes,k=u["@"].attributesOrder),y=0,g=d.length;y<g;y++)if(i=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/.exec(d[y])){if(e=i[1],s=i[2],b=i[3],l=i[5],t={attributes:h={},attributesOrder:o=[]},"#"===e&&(t.paddEmpty=!0),"-"===e&&(t.removeEmpty=!0),"!"===i[4]&&(t.removeEmptyAttrs=!0),a&&(et(a,function(n,t){h[t]=n}),o.push.apply(o,k)),l)for(p=0,nt=(l=ti(l,"|")).length;p<nt;p++)(i=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/.exec(l[p]))&&(f={},w=i[1],r=i[2].replace(/[\\:]:/g,":"),e=i[3],c=i[4],"!"===w&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(r),f.required=!0),"-"!==w?(e&&("="===e&&(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:r,value:c}),f.defaultValue=c),":"===e&&(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:r,value:c}),f.forcedValue=c),"<"===e&&(f.validValues=nc(c,"?"))),tt.test(r)?(t.attributePatterns=t.attributePatterns||[],f.pattern=ft(r),t.attributePatterns.push(f)):(h[r]||o.push(r),h[r]=f)):(delete h[r],o.splice(kli(o,r),1)));a||"@"!==s||(a=h,k=o);b&&(t.outputName=s,u[b]=t);tt.test(s)?(t.pattern=ft(s),v.push(t)):u[s]=t}}function ot(n){u={};v=[];y(n);si(it,function(n,t){o[t]=n.children})}function st(n){var t=/^(~)?(.+)$/;n&&(is.text_block_elements=is.block_elements=null,si(ti(n,","),function(n){var r,e=t.exec(n),s="~"===e[1],f=s?"span":"div",i=e[2];o[i]=o[f];nt[i]=f;s||(w[i.toUpperCase()]={},w[i]={});u[i]||(r=u[f],delete(r=ttt({},r)).removeEmptyAttrs,delete r.removeEmpty,u[i]=r);si(o,function(n,t){n[f]&&(o[t]=n=ttt({},o[t]),n[i]=n[f])})}))}function b(t){var i=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;is[n.schema]=null;t&&si(ti(t,","),function(n){var r,u,t=i.exec(n);t&&(u=t[1],r=u?o[t[2]]:o[t[2]]={"#comment":{}},r=o[t[2]],si(ti(t[3],"|"),function(n){"-"===u?delete r[n]:r[n]={}}))})}function k(n){var i,t=u[n];if(t)return t;for(i=v.length;i--;)if((t=v[i]).pattern.test(n))return t}var s,a,l,e,r,d,g,c,u={},o={},v=[],nt={},tt={},it=(s=(n=n||{}).schema,c={},is[s]||(a="id accesskey class dir lang style tabindex title role",l="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",e="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==s&&(a+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",l+=" article aside details dialog figure main header footer hgroup section nav",e+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==s&&(a+=" xml:lang",e=[e,g="acronym applet basefont big font strike tt"].join(" "),si(ti(g),function(n){t(n,"",e)}),l=[l,d="center dir isindex noframes"].join(" "),r=[l,e].join(" "),si(ti(d),function(n){t(n,"",r)})),r=r||[l,e].join(" "),t("html","manifest","head body"),t("head","","base command link meta noscript script style title"),t("title hr noscript br"),t("base","href target"),t("link","href rel media hreflang type sizes hreflang"),t("meta","name http-equiv content charset"),t("style","media type scoped"),t("script","src async defer type charset"),t("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),t("address dt dd div caption","",r),t("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",e),t("blockquote","cite",r),t("ol","reversed start type","li"),t("ul","","li"),t("li","value",r),t("dl","","dt dd"),t("a","href target rel media hreflang type",e),t("q","cite",e),t("ins del","cite datetime",r),t("img","src sizes srcset alt usemap ismap width height"),t("iframe","src name width height",r),t("embed","src type width height"),t("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),t("param","name value"),t("map","name",[r,"area"].join(" ")),t("area","alt coords shape href target rel media hreflang type"),t("table","border","caption colgroup thead tfoot tbody tr"+("html4"===s?" col":"")),t("colgroup","span","col"),t("col","span"),t("tbody thead tfoot","","tr"),t("tr","","td th"),t("td","colspan rowspan headers",r),t("th","colspan rowspan headers scope abbr",r),t("form","accept-charset action autocomplete enctype method name novalidate target",r),t("fieldset","disabled form name",[r,"legend"].join(" ")),t("label","form for",e),t("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),t("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===s?r:e),t("select","disabled form multiple name required size","option optgroup"),t("optgroup","disabled label","option"),t("option","disabled label selected value"),t("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),t("menu","type label",[r,"li"].join(" ")),t("noscript","",r),"html4"!==s&&(t("wbr"),t("ruby","",[e,"rt rp"].join(" ")),t("figcaption","",r),t("mark rt rp summary bdi","",e),t("canvas","width height",r),t("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),t("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),t("picture","","img source"),t("source","src srcset type media sizes"),t("track","kind src srclang label default"),t("datalist","",[e,"option"].join(" ")),t("article section nav aside main header footer","",r),t("hgroup","","h1 h2 h3 h4 h5 h6"),t("figure","",[r,"figcaption"].join(" ")),t("time","datetime",e),t("dialog","open",r),t("command","type label icon disabled checked radiogroup command"),t("output","for form name",e),t("progress","value max",e),t("meter","value min max low high optimum",e),t("details","open",[r,"summary"].join(" ")),t("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==s&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid code codebase codetype archive standby align border hspace vspace"),i("embed","align name hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!==s&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("img","loading"),i("iframe","sandbox seamless allowfullscreen loading")),si(ti("a form meter progress dfn"),function(n){c[n]&&delete c[n].children[n]}),delete c.caption.children.table,delete c.script,is[s]=c));!1===n.verify_html&&(n.valid_elements="*[*]");var ht=vn(n.valid_styles),ct=vn(n.invalid_styles,"map"),lt=vn(n.valid_classes,"map"),at=h("whitespace_elements","pre script noscript style textarea video audio iframe object code"),vt=h("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),p=h("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),yt=h("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),rt="td th iframe video audio object script code",pt=h("non_empty_elements",rt+" pre",p),wt=h("move_caret_before_on_enter_elements",rt+" table",p),ut=h("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),w=h("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",ut),bt=h("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp");si((n.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(n){tt[n]=new RegExp("<\/"+n+"[^>]*>","gi")});n.valid_elements?ot(n.valid_elements):(si(it,function(n,t){u[t]={attributes:n.attributes,attributesOrder:n.attributesOrder};o[t]=n.children}),"html5"!==n.schema&&si(ti("strong/b em/i"),function(n){var t=ti(n,"/");u[t[1]].outputName=t[0]}),si(ti("ol ul sub sup blockquote span font a table tbody strong em b i"),function(n){u[n]&&(u[n].removeEmpty=!0)}),si(ti("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(n){u[n].paddEmpty=!0}),si(ti("span"),function(n){u[n].removeEmptyAttrs=!0}));st(n.custom_elements);b(n.valid_children);y(n.extended_valid_elements);b("+ol[ul|ol],+ul[ul|ol]");si({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(n,t){u[t]&&(u[t].parentsRequired=ti(n))});n.invalid_elements&&si(sat(n.invalid_elements),function(n){u[n]&&delete u[n]});k("span")||y("span[!data-mce-type|*]");var kt=f(ht),dt=f(ct),gt=f(lt),ni=f(yt),ii=f(w),ri=f(ut),ui=f(bt),fi=f(p),ei=f(vt),oi=f(pt),hi=f(wt),ci=f(at),li=f(tt),ai=f(nt);return{children:o,elements:u,getValidStyles:kt,getValidClasses:gt,getBlockElements:ii,getInvalidStyles:dt,getShortEndedElements:fi,getTextBlockElements:ri,getTextInlineElements:ui,getBoolAttrs:ni,getElementRule:k,getSelfClosingElements:ei,getNonEmptyElements:oi,getMoveCaretBeforeOnEnterElements:hi,getWhiteSpaceElements:ci,getSpecialElements:li,isValidChild:function(n,t){var i=o[n.toLowerCase()];return!(!i||!i[t.toLowerCase()])},isValid:function(n,t){var i,r,u=k(n);if(u){if(!t||u.attributes[t])return!0;if(i=u.attributePatterns)for(r=i.length;r--;)if(i[r].pattern.test(n))return!0}return!1},getCustomElements:ai,addValidElements:y,setValidElements:ot,addCustomElements:st,addValidChildren:b}}function rat(n,t,i,r){function u(n){return 1<(n=parseInt(n,10).toString(16)).length?n:"0"+n}return"#"+u(t)+u(i)+u(r)}function yn(n,t){var o,r,l=this,s=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,h=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,u={},f=kn,e,i;for(n=n||{},t&&(o=t.getValidStyles(),r=t.getInvalidStyles()),e=("\\\" \\' \\; \\: ; : "+f).split(" "),i=0;i<e.length;i++)u[e[i]]=f+i,u[f+i]=e[i];return{toHex:function(n){return n.replace(s,rat)},parse:function(t){function v(n,t,u){var h=r[n+"-top"+t],e,o,s,f;if(h&&(e=r[n+"-right"+t],e&&(o=r[n+"-bottom"+t],o&&(s=r[n+"-left"+t],s)))){for(f=[h,e,o,s],i=f.length-1;i--&&f[i]===f[i+1];);-1<i&&u||(r[n+t]=-1===i?f[0]:f.join(" "),delete r[n+"-top"+t],delete r[n+"-right"+t],delete r[n+"-bottom"+t],delete r[n+"-left"+t])}}function b(n){var i,t=r[n];if(t){for(i=(t=t.split(" ")).length;i--;)if(t[i]!==t[0])return;return r[n]=t[0],1}}function nt(n){return d=!0,u[n]}function k(n,t){return d&&(n=n.replace(/\uFEFF[0-9]/g,function(n){return u[n]})),t?n:n.replace(/\\([\'\";:])/g,"$1")}function rt(n){return String.fromCharCode(parseInt(n.slice(1),16))}function tt(n){return n.replace(/\\[0-9a-f]+/gi,rt)}function ut(t,i,r,u,f,e){if(f=f||e)return"'"+(f=k(f)).replace(/\'/g,"\\'")+"'";if(i=k(i||r||u),!n.allow_script_urls){var o=i.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(o)||!n.allow_svg_data_urls&&/^data:image\/svg/i.test(o))return""}return"url('"+(i=it?it.call(ft,i,"style"):i).replace(/\'/g,"\\'")+"')"}var y,o,e,d,g,p,w,r={},it=n.url_converter,ft=n.url_converter_scope||l;if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,nt).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(n){return n.replace(/[;:]/g,nt)});y=h.exec(t);)h.lastIndex=y.index+y[0].length,o=y[1].replace(c,"").toLowerCase(),e=y[2].replace(c,""),o&&e&&(o=tt(o),e=tt(e),-1===o.indexOf(f)&&-1===o.indexOf('"')&&(n.allow_script_urls||"behavior"!==o&&!/expression\s*\(|\/\*|\*\//.test(e))&&("font-weight"===o&&"700"===e?e="bold":"color"!==o&&"background-color"!==o||(e=e.toLowerCase()),e=(e=e.replace(s,rat)).replace(a,ut),r[o]=d?k(e,!0):e));v("border","",!0);v("border","-width");v("border","-color");v("border","-style");v("padding","");v("margin","");p="border-style";w="border-color";b(g="border-width")&&b(p)&&b(w)&&(r.border=r[g]+" "+r[p]+" "+r[w],delete r[g],delete r[p],delete r[w]);"medium none"===r.border&&delete r.border;"none"===r["border-image"]&&delete r["border-image"]}return r},serialize:function(n,t){function u(t){var f,u=o[t],r,e;if(u)for(r=0,e=u.length;r<e;r++)t=u[r],(f=n[t])&&(i+=(0<i.length?" ":"")+t+": "+f+";")}var i="";return t&&o?(u("*"),u(t)):et(n,function(n,u){var f;!n||r&&((f=r["*"])&&f[u]||(f=r[t])&&f[u])||(i+=(0<i.length?" ":"")+u+": "+n+";")}),i}}}function pn(n){return n instanceof Event||ft(n.initEvent)}function uat(n,t,i,r){var f,e,u=function(n){var t,i=null!=r?r:{};for(t in n)w(dli,t)||(i[t]=n[t]);return tt(i.composedPath)&&(i.composedPath=function(){return n.composedPath()}),i}(t);return u.type=n,wu(u.target)&&(u.target=null!==(f=u.srcElement)&&void 0!==f?f:i),(wu((e=t).preventDefault)||pn(e))&&(u.preventDefault=function(){u.defaultPrevented=!0;u.isDefaultPrevented=lt;ft(t.preventDefault)?t.preventDefault():pn(t)&&(t.returnValue=!1)},u.stopPropagation=function(){u.cancelBubble=!0;u.isPropagationStopped=lt;ft(t.stopPropagation)?t.stopPropagation():pn(t)&&(t.cancelBubble=!0)},u.stopImmediatePropagation=function(){u.isImmediatePropagationStopped=lt;u.stopPropagation()},u.isDefaultPrevented!==lt&&u.isDefaultPrevented!==it&&(u.isDefaultPrevented=!0===u.defaultPrevented?lt:it,u.isPropagationStopped=!0===u.cancelBubble?lt:it,u.isImmediatePropagationStopped=it)),u}function wn(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent&&n.attachEvent("on"+t,i)}function dy(n,t,i,r){n.removeEventListener?n.removeEventListener(t,i,r||!1):n.detachEvent&&n.detachEvent("on"+t,i)}function dh(n,t){var f,i,r,e,u=uat(n.type,n,document,t);return tt(e=n)&&gli.test(e.type)&&tr(n.pageX)&&!tr(n.clientX)&&(i=(f=u.target.ownerDocument||document).documentElement,r=f.body,u.pageX=n.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),u.pageY=n.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),tr(u.metaKey)&&(u.metaKey=!1),u}function rf(){this.domLoaded=!1;this.events={};this.count=1;this.expando="mce-data-"+(+new Date).toString(32);this.hasMouseEnterLeave="onmouseenter"in document.documentElement;this.hasFocusIn="onfocusin"in document.documentElement;this.count=1}function ye(n,t,i){var r="0x"+t-65536;return r!=r||i?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function ett(){function n(i,r){return t.push(i+" ")>nt.cacheLength&&delete n[t.shift()],n[i+" "]=r}var t=[];return n}function cu(n){return n[ei]=!0,n}function bat(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||-2147483648)-(~n.sourceIndex||-2147483648);if(r)return r;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return n?1:-1}function fs(n){return cu(function(t){return t=+t,cu(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ott(n){return n&&typeof n.getElementsByTagName!=hp&&n}function kat(){}function ap(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function stt(n,t,i){var r=t.dir,u=i&&"parentNode"===r,f=nai++;return t.first?function(t,i,f){for(;t=t[r];)if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,e){var o,s,h=[ff,f];if(e){for(;t=t[r];)if((1===t.nodeType||u)&&n(t,i,e))return!0}else for(;t=t[r];)if(1===t.nodeType||u){if((o=(s=t[ei]||(t[ei]={}))[r])&&o[0]===ff&&o[1]===f)return h[2]=o[2];if((s[r]=h)[2]=n(t,i,e))return!0}}}function htt(n){return 1<n.length?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function vp(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;f<s;f++)(e=n[f])&&(i&&!i(e,r,u)||(o.push(e),h&&t.push(f)));return o}function oa(n){return void 0!==n}function ctt(n){return"string"==typeof n}function dat(n,t){var i,r=(t=t||rvt).createElement("div"),u=t.createDocumentFragment();for(r.innerHTML=n;i=r.firstChild;)u.appendChild(i);return u}function gat(n,t){return n&&t&&-1!==(" "+n.className+" ").indexOf(" "+t+" ")}function nvt(n,t,i){var u,r;return t=a(t)[0],n.each(function(){i&&u===this.parentNode||(u=this.parentNode,r=t.cloneNode(!1),this.parentNode.insertBefore(r,this));r.appendChild(this)}),n}function lr(n,t){return new a.fn.init(n,t)}function tvt(n){return null==n?"":(""+n).replace(gai,"")}function bf(n,t){var f,u,r,i;if(n)if(void 0===(f=n.length)){for(u in n)if(n.hasOwnProperty(u)&&(i=n[u],!1===t.call(i,u,i)))break}else for(r=0;r<f&&(i=n[r],!1!==t.call(i,r,i));r++);return n}function ivt(n,t){var i=[];return bf(n,function(n,r){t(r,n)&&i.push(r)}),i}function uvt(n,t,i){var u=[],r=n[t];for("string"!=typeof i&&i instanceof a&&(i=i[0]);r&&9!==r.nodeType;){if(void 0!==i){if(r===i)break;if("string"==typeof i&&a(r).is(i))break}1===r.nodeType&&u.push(r);r=r[t]}return u}function ptt(n,t,i,r){var u=[];for(r instanceof a&&(r=r[0]);n;n=n[t])if(!i||n.nodeType===i){if(void 0!==r){if(n===r)break;if("string"==typeof r&&a(n).is(r))break}u.push(n)}return u}function fvt(n,t,i){for(n=n[t];n;n=n[t])if(n.nodeType===i)return n;return null}function evt(n,t){var i=t.attr("style"),r=n.serialize(n.parse(i),t[0].nodeName)||null;t.attr("data-mce-style",r)}function fc(n,t){var r,i,u=0;if(n)for(r=n.nodeType,n=n.previousSibling;n;n=n.previousSibling)i=n.nodeType,(!t||3!==i||i!==r&&n.nodeValue.length)&&(u++,r=i);return u}function iu(n){void 0===n&&(n={});this.states={};this.queue=[];this.scriptLoadedCallbacks={};this.queueLoadedCallbacks=[];this.loading=0;this.settings=n}function hi(n){var t=n;return{get:function(){return t},set:function(n){t=n}}}function ovt(){return at(ca,ktt.get())}function ec(){function u(){return t.get().each(i)}var i,t,r=(i=y,t=hi(n.none()),{clear:function(){u();t.set(n.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(i){u();t.set(n.some(i))}});return c(c({},r),{on:function(n){return r.get().each(n)}})}function dtt(n,t){var i=null;return{cancel:function(){ll(i)||(clearTimeout(i),i=null)},throttle:function(){for(var u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];ll(i)&&(i=setTimeout(function(){i=null;n.apply(null,u)},t))}}}function svt(n,t){function r(){ll(i)||(clearTimeout(i),i=null)}var i=null;return{cancel:r,throttle:function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];r();i=setTimeout(function(){i=null;n.apply(null,f)},t)}}}function gtt(n,t){var i=gl(n,t);return void 0===i||""===i?[]:i.split(" ")}function yp(n){return void 0!==n.dom.classList}function pp(n,t){var i,r,u;yp(n)?n.dom.classList.add(t):(r=t,u=gtt(i=n,"class").concat([r]),du(i,"class",u.join(" ")))}function hvt(n,t){return yp(n)&&n.dom.classList.contains(t)}function gi(n,i){return lht(r=void 0===n?document:n.dom)?[]:ut(r.querySelectorAll(i),t.fromDom);var r}function cvt(i,r){function u(t,i){return(r=t.dom)&&r.hasAttribute&&r.hasAttribute(i)?n.some(gl(t,i)):n.none();var r}var f=i.selection.getRng(),e=t.fromDom(f.startContainer),o=t.fromDom(i.getBody()),s=r.fold(function(){return"."+rit()},function(n){return"["+la()+'="'+n+'"]'});return un(ey(e,f.startOffset).getOr(e),s,function(n){return g(n,o)}).bind(function(n){return u(n,""+bp()).bind(function(t){return u(n,""+la()).map(function(n){var r=fvi(i,t);return{uid:t,name:n,elements:r}})})})}function uvi(t){function o(){return{listeners:[],previous:ec()}}function u(n,t){i(n,function(n){return t(n),n})}function i(n,t){var i=r.get(),u=t(at(i,n).getOrThunk(o));i[n]=u;r.set(i)}var r=hi({}),f=svt(function(){var f=r.get();e(tg(ch(f)),function(r){i(r,function(i){var f=i.previous.get();return cvt(t,n.some(r)).fold(function(){var n;f.isSome()&&(u(n=r,function(t){e(t.listeners,function(t){return t(!1,n)})}),i.previous.clear())},function(n){var r,o,s,t=n.uid,h=n.name,c=n.elements;ly(f,t)||(o=t,s=c,u(r=h,function(n){e(n.listeners,function(n){return n(!0,r,{uid:o,nodes:ut(s,function(n){return n.dom})})})}),i.previous.set(t))}),{previous:i.previous,listeners:i.listeners}})})},30);return t.on("remove",function(){f.cancel()}),t.on("NodeChange",function(){f.throttle()}),{addListener:function(n,t){i(n,function(n){return{previous:n.previous,listeners:n.listeners.concat([t])}})}}}function lvt(n){var t=(new Date).getTime();return n+"_"+Math.floor(1e9*Math.random())+ ++evi+String(t)}function avt(n,i){var r,u,f=fct(n).dom,e=t.fromDom(f.createDocumentFragment());oy(e,(r=i,(u=(f||document).createElement("div")).innerHTML=r,nu(t.fromDom(u))));pg(n);ii(n,e)}function vvt(n,i){return t.fromDom(n.dom.cloneNode(i))}function oc(n){return vvt(n,!1)}function yvt(n){return vvt(n,!0)}function pvt(t,i,r){function u(t){for(var i;(i=f[t]())&&!o(i)&&!r(i););return n.from(i).filter(o)}void 0===r&&(r=it);var f=new yt(t,i);return{current:function(){return n.from(f.current()).filter(o)},next:function(){return u("next")},prev:function(){return u("prev")},prev2:function(){return u("prev2")}}}function wvt(t,i){var u=i||function(n){return t.isBlock(n)||st(n)||rt(n)},r=function(t,i,u,f){if(o(t)){var e=f(t,i,t.data);if(-1!==e)return n.some({container:t,offset:e})}return u().bind(function(n){return r(n.container,n.offset,u,f)})};return{backwards:function(n,t,i,f){var e=pvt(n,f,u);return r(n,t,function(){return e.prev().map(function(n){return{container:n,offset:n.length}})},i).getOrNull()},forwards:function(n,t,i,f){var e=pvt(n,f,u);return r(n,t,function(){return e.next().map(function(n){return{container:n,offset:0}})},i).getOrNull()}}}function es(n){return n?{left:cc(n.left),top:cc(n.top),bottom:cc(n.bottom),right:cc(n.right),width:cc(n.width),height:cc(n.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function bvt(n,t){return n=es(n),t||(n.left=n.left+n.width),n.right=n.left,n.width=0,n}function kvt(n,t,i){return 0<=n&&n<=Math.min(t.height,i.height)/2}function sc(n,t){var i=Math.min(t.height/2,n.height/2);return n.bottom-i<t.top||!(n.top>t.bottom)&&kvt(t.top-n.bottom,n,t)}function hc(n,t){return n.top>t.bottom||!(n.bottom<t.top)&&kvt(t.bottom-n.top,n,t)}function dvt(n,t,i){return t>=n.left&&t<=n.right&&i>=n.top&&i<=n.bottom}function wp(n){var t=n.startContainer,i=n.startOffset;return t.hasChildNodes()&&n.endOffset===i+1?t.childNodes[i]:null}function no(n,t){var i,r;return h(n)&&n.hasChildNodes()?(i=n.childNodes,i[(r=i.length-1,Math.min(Math.max(t,0),r))]):n}function gvt(n){return"string"==typeof n&&768<=n.charCodeAt(0)&&ovi.test(n)}function nit(n){return"createRange"in n?n.createRange():d.DOM.createRng()}function tit(n){return n&&/[\r\n\t ]/.test(n)}function nyt(n){return n.setStart&&n.setEnd}function iit(n){var t=n.startContainer,r=n.startOffset,i;if(tit(n.toString())&&cvi(t.parentNode)&&o(t))return i=t.data,tit(i[r-1])||tit(i[r+1])?1:void 0}function tyt(n){return 0===n.left&&0===n.right&&0===n.top&&0===n.bottom}function os(n,t){var i=bvt(n,t);return i.width=1,i.right=i.left+1,i}function dp(n,t){o(t)&&0===t.data.length&&n.remove(t)}function fit(t,i,r){var u,f,e,s,o,h,c;nn(r)?(e=t,s=i,h=n.from((o=r).firstChild),c=n.from(o.lastChild),s.insertNode(o),h.each(function(n){return dp(e,n.previousSibling)}),c.each(function(n){return dp(e,n.nextSibling)})):(u=t,i.insertNode(f=r),dp(u,f.previousSibling),dp(u,f.nextSibling))}function eyt(n){return function(t){return n===t}}function oyt(n){var i,t,r,u;return(au(n)?"text()":n.nodeName.toLowerCase())+"["+(t=lit(bpt(i=n)),r=uht(t,eyt(i),i),u=ry(t=t.slice(0,r+1),function(n,i,r){return au(i)&&au(t[r-1])&&n++,n},0),uht(t=hh(t,dr([i.nodeName])),eyt(i),i)-u)+"]"}function syt(n,t){var r,f,o,e=[],i=t.container(),u=t.offset();return au(i)?r=function(n,t){for(;(n=n.previousSibling)&&au(n);)t+=n.data.length;return t}(i,u):(u>=(f=i.childNodes).length?(r="after",u=f.length-1):r="before",i=f[u]),e.push(oyt(i)),o=hh(function(n,t){var i=[];for(t=t.parentNode;t!==n;t=t.parentNode)i.push(t);return i}(n,i),gd(bo)),(e=e.concat(ug(o,oyt))).reverse().join("/")+","+r}function hyt(n,t){if(!t)return null;var f=t.split(","),e=f[0].split("/"),u=1<f.length?f[1]:"before",r=ry(e,function(n,t){var u,f,e,i,r=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return r?("text()"===r[1]&&(r[1]="#text"),u=n,f=r[1],e=parseInt(r[2],10),i=hh(i=lit(u),function(n,t){return!au(n)||!au(i[t-1])}),(i=hh(i,dr([f])))[e]):null},n);return r?au(r)?function(n,t){for(var u,r=n,f=0;au(r);){if(u=r.data.length,f<=t&&t<=f+u){n=r;t-=f;break}if(!au(r.nextSibling)){n=r;t=u;break}f+=u;r=r.nextSibling}return au(n)&&t>n.data.length&&(t=n.data.length),i(n,t)}(r,parseInt(u,10)):(u="after"===u?wpt(r)+1:wpt(r),i(r.parentNode,u)):null}function cyt(n,t,i,r,u){var s,f=r[u?"startContainer":"endContainer"],e=r[u?"startOffset":"endOffset"],h=[],c=0,l=n.getRoot();for(o(f)?h.push(i?function(n,t,i){for(var u=n(t.data.slice(0,i)).length,r=t.previousSibling;r&&o(r);r=r.previousSibling)u+=n(r.data).length;return u}(t,f,e):e):(e>=(s=f.childNodes).length&&s.length&&(c=1,e=Math.max(0,s.length-1)),h.push(n.nodeIndex(s[e],i)+c));f&&f!==l;f=f.parentNode)h.push(n.nodeIndex(f,i));return h}function eit(n,t,i){var u=0;return r.each(n.select(t),function(n){if("all"!==n.getAttribute("data-mce-bogus"))return n!==i&&void u++}),u}function lyt(n,t){var u,f=t?"start":"end",i=n[f+"Container"],r=n[f+"Offset"];h(i)&&"TR"===i.nodeName&&(i=(u=i.childNodes)[Math.min(t?r:r-1,u.length-1)])&&(r=t?0:i.childNodes.length,n["set"+(t?"Start":"End")](i,r))}function ayt(n){return lyt(n,!0),lyt(n,!1),n}function vyt(n,t){var i;return h(n)&&(n=no(n,t),rw(n))?n:hr(n)?(i=(n=o(n)&&bh(n)?n.parentNode:n).previousSibling,rw(i)?i:(i=n.nextSibling,rw(i)?i:void 0)):void 0}function yyt(n,t,i){var u=i.getNode(),r=u?u.nodeName:null,c=i.getRng(),f,l,a,v,s,h,e,o;return rw(u)||"IMG"===r?{name:r,index:eit(i.dom,r,u)}:(o=vyt((f=c).startContainer,f.startOffset)||vyt(f.endContainer,f.endOffset),o?{name:r=o.tagName,index:eit(i.dom,r,o)}:(h=(a=i).dom,(e={}).start=cyt(h,l=n,v=t,s=c,!0),a.isCollapsed()||(e.end=cyt(h,l,v,s,!1)),klt(s)&&(e.isFakeCaret=!0),e))}function pyt(n,t,i){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return i?n.create("span",r,"&#xFEFF;"):n.create("span",r)}function wyt(n,t){var i=n.dom,r=n.getRng(),u=i.uniqueId(),s=n.isCollapsed(),o=n.getNode(),f=o.nodeName,e;return"IMG"===f?{name:f,index:eit(i,f,o)}:(e=ayt(r.cloneRange()),s||(e.collapse(!1),fit(i,e,pyt(i,u+"_end",t))),(r=ayt(r)).collapse(!0),fit(i,r,pyt(i,u+"_start",t)),n.moveToBookmark({id:u,keep:!0}),{id:u})}function byt(n,t,i){var r=n.getParam(t,i);return-1===r.indexOf("=")?r:at(n.getParam(t,"","hash"),n.id).getOr(i)}function kyt(n){return n.getParam("content_security_policy","")}function oi(n){if(n.getParam("force_p_newlines",!1))return"p";var t=n.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t}function ya(n){return n.getParam("forced_root_block_attrs",{})}function dyt(n){return n.getParam("automatic_uploads",!0,"boolean")}function gyt(n){return n.getParam("icons","","string")}function npt(n){return n.getParam("referrer_policy","","string")}function tpt(n){return n.getParam("language","en","string")}function ipt(n){return n.getParam("indent_use_margin",!1)}function rpt(n){var t=n.getParam("font_css",[]);return br(t)?t:ut(t.split(","),cg)}function upt(n){var t=n.getParam("object_resizing");return!1!==t&&!l.iOS&&(ht(t)?t:"table,img,figure.image,div,video,iframe")}function fpt(n){return n.getParam("event_root")}function pa(n){return n.getParam("theme")}function wa(n){return!1!==n.getParam("inline_boundaries")}function oit(n){return n.getParam("plugins","","string")}function ept(n){var t=n.parentNode;t&&t.removeChild(n)}function opt(n){var t=ae(n);return{count:n.length-t.length,text:t}}function spt(n){for(var t;-1!==(t=n.data.lastIndexOf(fi));)n.deleteData(t,1)}function hpt(n,t){return hs(n),t}function lvi(t,r){var u,f=r.container(),e=(-1===(u=pst(bu(f.childNodes),t))?n.none():n.some(u)).map(function(n){return n<r.offset()?i(f,r.offset()-1):r}).getOr(r);return hs(t),e}function avi(n,t){return i.isTextPosition(t)?(u=t,dpt(r=n)&&u.container()===r?(o=opt((f=r).data.substr(0,(e=u).offset())),h=opt(f.data.substr(e.offset())),0<(o.text+h.text).length?(spt(f),i(f,e.offset()-o.count)):e):hpt(r,u)):(s=n,((c=t).container()===s.parentNode?lvi:hpt)(s,c));var r,u,f,e,o,h,s,c}function cpt(n,t,i){var e,f,o,r=bvt(t.getBoundingClientRect(),i),s="BODY"===n.tagName?(e=n.ownerDocument.documentElement,f=n.scrollLeft||e.scrollLeft,n.scrollTop||e.scrollTop):(o=n.getBoundingClientRect(),f=n.scrollLeft-o.left,n.scrollTop-o.top),u;return r.left+=f,r.right+=f,r.top+=s,r.bottom+=s,r.width=1,u=t.offsetWidth-t.clientWidth,0<u&&(i&&(u*=-1),r.left+=u,r.right+=u),r}function vvi(n,i,r,u){function s(){!function(){for(var f,e,n,u=gi(t.fromDom(i),"*[contentEditable=false],video,audio,embed,object"),r=0;r<u.length;r++)e=u[r].dom,n=e.previousSibling,rp(n)&&(1===(f=n.data).length?n.parentNode.removeChild(n):n.deleteData(f.length-1,1)),n=e.nextSibling,ip(n)&&(1===(f=n.data).length?n.parentNode.removeChild(n):n.deleteData(0,1))}();f&&(hs(f),f=null);o.on(function(n){a(n.caret).remove();o.clear()});e&&(ui.clearInterval(e),e=void 0)}var e,f,o=ec(),h=oi(n),l=0<h.length?h:"p";return{show:function(n,t){var h,v,y;return(s(),kvi(t))?null:r(t)?(f=function(n,t,i){var f,r=t.ownerDocument.createElement(n),u;return r.setAttribute("data-mce-caret",i?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((f=document.createElement("br")).setAttribute("data-mce-bogus","1"),f)),u=t.parentNode,i?u.insertBefore(r,t):t.nextSibling?u.insertBefore(r,t.nextSibling):u.appendChild(r),r}(l,t,n),v=cpt(i,t,n),a(f).css("top",v.top),y=a('<div class="mce-visual-caret" data-mce-bogus="all"><\/div>').css(c({},v)).appendTo(i)[0],o.set({caret:y,element:t,before:n}),n&&a(y).addClass("mce-visual-caret-before"),e=ui.setInterval(function(){u()?a("div.mce-visual-caret",i).toggleClass("mce-visual-caret-hidden"):a("div.mce-visual-caret",i).addClass("mce-visual-caret-hidden")},500),(h=t.ownerDocument.createRange()).setStart(f,0),h.setEnd(f,0),h):(f=function(n,t){var r=n.ownerDocument.createTextNode(fi),u=n.parentNode,i;if(t){if(i=n.previousSibling,gh(i)){if(hr(i))return i;if(rp(i))return i.splitText(i.data.length-1)}u.insertBefore(r,n)}else{if(i=n.nextSibling,gh(i)){if(hr(i))return i;if(ip(i))return i.splitText(1),i}n.nextSibling?u.insertBefore(r,n.nextSibling):u.appendChild(r)}return r}(t,n),h=t.ownerDocument.createRange(),ka(f.nextSibling)?(h.setStart(f,0),h.setEnd(f,0)):(h.setStart(f,1),h.setEnd(f,1)),h)},hide:s,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(){o.on(function(n){var t=cpt(i,n.element,n.before);a(n.caret).css(c({},t))})},destroy:function(){return ui.clearInterval(e)}}}function lpt(){return ait.isIE()||ait.isEdge()||ait.isFirefox()}function ss(n){return ka(n)||vh(n)&&lpt()}function gp(n,t){for(var i;i=n(t);)if(!nwt(i))return i;return null}function lc(n,t,i,r,u){var f=new yt(n,r),e=vit(n)||nwt(n);if(t<0){if(e&&i(n=gp(f.prev.bind(f),!0)))return n;for(;n=gp(f.prev.bind(f),u);)if(i(n))return n}if(0<t){if(e&&i(n=gp(f.next.bind(f),!0)))return n;for(;n=gp(f.next.bind(f),u);)if(i(n))return n}return null}function io(n,t){for(;n&&n!==t;){if(gvi(n))return n;n=n.parentNode}return null}function ef(n,t,i){return io(n.container(),i)===io(t.container(),i)}function sit(n,t){if(!t)return null;var i=t.container(),r=t.offset();return twt(i)?i.childNodes[r+n]:null}function apt(n,t){var i=t.ownerDocument.createRange();return n?(i.setStartBefore(t),i.setEndBefore(t)):(i.setStartAfter(t),i.setEndAfter(t)),i}function vpt(n,t,i){for(var f,e,r,u=n?"previousSibling":"nextSibling";i&&i!==t;){if(r=i[u],gpt(r)&&(r=r[u]),vit(r)||dvi(r)){if(e=i,io(r,f=t)===io(e,f))return r;break}if(nyi(r))break;i=i.parentNode}return null}function hit(n,t,i){var f,e=u(vpt,!0,t),s=u(vpt,!1,t),r=i.startContainer,h=i.startOffset,c;if(bh(r)){if(c=(r=twt(r)?r:r.parentNode).getAttribute("data-mce-caret"),"before"===c&&ss(f=r.nextSibling))return da(f);if("after"===c&&ss(f=r.previousSibling))return ga(f)}if(!i.collapsed)return i;if(o(r)){if(gpt(r)){if(1===n){if(f=s(r))return da(f);if(f=e(r))return ga(f)}if(-1===n){if(f=e(r))return ga(f);if(f=s(r))return da(f)}return i}if(rp(r)&&h>=r.data.length-1)return 1===n&&(f=s(r))?da(f):i;if(ip(r)&&h<=1)return-1===n&&(f=e(r))?ga(f):i;if(h===r.data.length)return(f=s(r))?da(f):i;if(0===h)return(f=e(r))?ga(f):i}return i}function ypt(t,i){return n.from(sit(t?0:-1,i)).filter(vit)}function ba(n,t,r){var u=hit(n,t,r);return-1===n?i.fromRangeStart(u):i.fromRangeEnd(u)}function nw(i){return n.from(i.getNode()).map(t.fromDom)}function cit(n,t){for(;t=n(t);)if(t.isVisible())return t;return t}function tw(n,t){var i=ef(n,t);return!(i||!st(n.getNode()))||i}function iwt(n,t){return n.hasChildNodes()&&t<n.childNodes.length?n.childNodes[t]:null}function rwt(n,t){if(0<n){if(bc(t.previousSibling)&&!hf(t.previousSibling))return i.before(t);if(hf(t))return i(t,0)}if(n<0){if(bc(t.nextSibling)&&!hf(t.nextSibling))return i.after(t);if(hf(t))return i(t,t.data.length)}return n<0&&!ert(t)?i.after(t):i.before(t)}function vu(n){return{next:function(t){return ort(bt.Forwards,t,n)},prev:function(t){return ort(bt.Backwards,t,n)}}}function uwt(n){return i.isTextPosition(n)?0===n.offset():nf(n.getNode())}function fwt(n){if(i.isTextPosition(n)){var t=n.container();return n.offset()===t.data.length}return nf(n.getNode(!0))}function ewt(n,t){return!i.isTextPosition(n)&&!i.isTextPosition(t)&&n.getNode()===t.getNode(!0)}function uw(t,r,u){return vr(t,r,u).bind(function(f){return ef(u,f,r)&&(e=u,o=f,t?!ewt(e,o)&&(i.isTextPosition(s=e)||!st(s.getNode()))&&fwt(e)&&uwt(o):!ewt(o,e)&&uwt(e)&&fwt(o))?vr(t,r,f):n.some(f);var e,o,s})}function ac(t,r){var s,h,f,c,e,u=t?r.firstChild:r.lastChild;return o(u)?n.some(i(u,t?0:u.data.length)):u?nf(u)?n.some(t?i.before(u):st(e=u)?i.before(e):i.after(e)):(h=r,f=u,c=(s=t)?i.before(f):i.after(f),vr(s,h,c)):n.none()}function of(n){return h(n)&&n.id===obt}function cs(n,t){for(;t&&t!==n;){if(t.id===obt)return t;t=t.parentNode}return null}function owt(n){return r.isArray(n.start)}function swt(n,t){return h(t)&&n.isBlock(t)&&!t.innerHTML&&!l.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t}function hwt(n,t,i){return!1===t.hasChildNodes()&&cs(n,t)&&(u=i,r=(f=t).ownerDocument.createTextNode(fi),f.appendChild(r),u.setStart(r,0),u.setEnd(r,0),1);var f,u,r}function cwt(n,t,i,r){var e,u,o,s,f=i[t?"start":"end"],h=n.getRoot();if(f){for(o=f[0],u=h,e=f.length-1;1<=e;e--){if(s=u.childNodes,hwt(h,u,r))return 1;if(f[e]>s.length-1)return hwt(h,u,r)||function(n){return lf(u).fold(it,function(t){return n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),!0})}(r);u=s[f[e]]}3===u.nodeType&&(o=Math.min(f[0],u.nodeValue.length));1===u.nodeType&&(o=Math.min(f[0],u.childNodes.length));t?r.setStart(u,o):r.setEnd(u,o)}return 1}function yit(n){return o(n)&&0<n.data.length}function lwt(t,u,f){var s,a,c,h,v,y,e=t.get(f.id+"_"+u),p=f.keep;if(e){if(s=e.parentNode,a="start"===u?p?e.hasChildNodes()?(s=e.firstChild,1):yit(e.nextSibling)?(s=e.nextSibling,0):yit(e.previousSibling)?(s=e.previousSibling,e.previousSibling.data.length):(s=e.parentNode,t.nodeIndex(e)+1):t.nodeIndex(e):p?e.hasChildNodes()?(s=e.firstChild,1):yit(e.previousSibling)?(s=e.previousSibling,e.previousSibling.data.length):(s=e.parentNode,t.nodeIndex(e)):t.nodeIndex(e),v=s,y=a,!p){for(h=e.previousSibling,c=e.nextSibling,r.each(r.grep(e.childNodes),function(n){o(n)&&(n.nodeValue=n.nodeValue.replace(/\uFEFF/g,""))});e=t.get(f.id+"_"+u);)t.remove(e,!0);h&&c&&h.nodeType===c.nodeType&&o(h)&&!l.opera&&(a=h.nodeValue.length,h.appendData(c.nodeValue),t.remove(c),v=h,y=a)}return n.some(i(v,y))}return n.none()}function tyi(t,i){!function(t,i){var s,v,u,y,p,h,c,f,r,l,a,e,o=t.dom;if(i){if(owt(i))return a=i,e=(l=o).createRng(),cwt(l,!0,a,e)&&cwt(l,!1,a,e)?n.some(e):n.none();if(ht(i.start))return n.some((c=i,f=(h=o).createRng(),r=hyt(h.getRoot(),c.start),f.setStart(r.container(),r.offset()),r=hyt(h.getRoot(),c.end),f.setEnd(r.container(),r.offset()),f));if(w(i,"id"))return di(p=lwt(u=o,"start",y=i),lwt(u,"end",y).or(p),function(n,t){var i=u.createRng();return i.setStart(swt(u,n.container()),n.offset()),i.setEnd(swt(u,t.container()),t.offset()),i});if(w(i,"name"))return s=o,n.from(s.select((v=i).name)[v.index]).map(function(n){var t=s.createRng();return t.selectNode(n),t});if(w(i,"rng"))return n.some(i.rng)}return n.none()}(t,i).each(function(n){t.setRng(n)})}function ar(n){return h(n)&&"SPAN"===n.tagName&&"bookmark"===n.getAttribute("data-mce-type")}function vc(n){return""!==n&&-1!==" \f\n\r\t\v".indexOf(n)}function pit(n){return!vc(n)&&!rv(n)}function fw(n){return n.nodeType}function awt(n,t,i){var c,s=i.startOffset,r=i.startContainer,f,e,u;if((r!==i.endContainer||!(c=r.childNodes[s])||!/^(IMG)$/.test(c.nodeName))&&h(r))for(f=r.childNodes,e=void 0,s<f.length?(r=f[s],e=new yt(r,n.getParent(r,n.isBlock))):(r=f[f.length-1],(e=new yt(r,n.getParent(r,n.isBlock))).next(!0)),u=e.current();u;u=e.next())if(o(u)&&!srt(u))return i.setStart(u,0),t.setRng(i),0}function wit(n,t,i){if(n){var r=t?"nextSibling":"previousSibling";for(n=i?n:n[r];n;n=n[r])if(h(n)||!srt(n))return n}}function bit(n,t){return fw(t)&&(t=t.nodeName),!!n.schema.getTextBlockElements()[t.toLowerCase()]}function yc(n,t,i){return n.schema.isValidChild(t,i)}function df(n,t){return ft(n)?n=n(t):tt(t)&&(n=n.replace(/%(\w+)/g,function(n,i){return t[i]||n})),n}function kit(n,t){return n=""+((n=n||"").nodeName||n),t=""+((t=t||"").nodeName||t),n.toLowerCase()===t.toLowerCase()}function dit(n,t,i){return"color"!==i&&"backgroundColor"!==i||(t=n.toHex(t)),"fontWeight"===i&&700===t&&(t="bold"),""+("fontFamily"===i?t.replace(/[\'\"]/g,"").replace(/,\s+/g,","):t)}function ew(n,t,i){return dit(n,n.getStyle(t,i),i)}function vwt(n,t){var i;return n.getParent(t,function(t){return(i=n.getStyle(t,"text-decoration"))&&"none"!==i}),i}function ow(n,t,i){return n.getParents(t,i,n.getRoot())}function iyi(n,t){return ki(n.formatter.get(t),function(n){function t(n){return 1<n.length&&"%"===n.charAt(0)}return ki(["styles","attributes"],function(i){return at(n,i).exists(function(n){var r,i;return ki(br(n)?n:(r=bi,i=[],et(n,function(n,t){i.push(r(n,t))}),i),t)})})})}function sf(n){return sh(n,"block")}function ur(n){return sh(n,"selector")}function kt(n){return sh(n,"inline")}function git(n){return ur(n)&&!1!==n.expand&&!kt(n)}function ywt(n,t){for(var i=t;i;){if(h(i)&&n.getContentEditable(i))return"false"===n.getContentEditable(i)?i:t;i=i.parentNode}return t}function pwt(n,t,i,r){for(var f=t.data,u=i;n?0<=u:u<f.length;n?u--:u++)if(r(f.charAt(u)))return n?u+1:u;return-1}function ryi(n,t,i){return pwt(n,t,i,function(n){return rv(n)||vc(n)})}function uyi(n,t,i){return pwt(n,t,i,pit)}function wwt(t,i,r,u,f,e){function s(i,r,u){var e=wvt(t),s=f?e.backwards:e.forwards;return n.from(s(i,r,function(n,t){return kc(n.parentNode)?-1:u(f,o=n,t)},h))}var o,h=t.getParent(r,t.isBlock)||i;return s(r,u,ryi).bind(function(t){return e?s(t.container,t.offset+(f?-1:0),uyi):n.some(t)}).orThunk(function(){return o?n.some({container:o,offset:f?0:o.length}):n.none()})}function bwt(n,t,i,r,u){var s,f,h,e;for(o(r)&&oht(r.data)&&r[u]&&(r=r[u]),s=sbt(n,r),f=0;f<s.length;f++)for(h=0;h<t.length;h++)if(e=t[h],(!tt(e.collapsed)||e.collapsed===i.collapsed)&&ur(e)&&n.is(s[f],e.selector))return s[f];return r}function kwt(n,t,i,r){var s,u=i,f=n.dom,h=f.getRoot(),e=t[0];if((u=sf(e)?e.wrapper?null:f.getParent(i,e.block,h):u)||(s=f.getParent(i,"LI,TD,TH"),u=f.getParent(o(i)?i.parentNode:i,function(t){return t!==h&&syi(n,t)},s)),!(u=u&&sf(e)&&e.wrapper&&sbt(f,u,"ul,ol").reverse()[0]||u))for(u=i;u[r]&&!f.isBlock(u[r])&&!kit(u=u[r],"br"););return u||i}function sw(n,t,i,r,u){var s,f=i,h=u?"previousSibling":"nextSibling",c=n.getRoot(),e,l;if(o(i)&&!hbt(i)&&(u?0<r:r<i.data.length))return i;for(;;){if(!t[0].block_expand&&n.isBlock(f))return f;for(e=f[h];e;e=e[h])if(l=o(e)&&!cbt(n,c,e,h),!kc(e)&&(!st(s=e)||!s.getAttribute("data-mce-bogus")||s.nextSibling)&&!hbt(e,l))return f;if(f===c||f.parentNode===c){i=f;break}f=f.parentNode}return i}function dwt(n){return kc(n.parentNode)||kc(n)}function pc(n,t,i,r){void 0===r&&(r=!1);var f=t.startContainer,c=t.startOffset,u=t.endContainer,s=t.endOffset,e=n.dom,l=i[0];return h(f)&&f.hasChildNodes()&&(f=no(f,c),o(f)&&(c=0)),h(u)&&u.hasChildNodes()&&(u=no(u,t.collapsed?s:s-1),o(u)&&(s=u.nodeValue.length)),f=ywt(e,f),u=ywt(e,u),dwt(f)&&(f=kc(f)?f:f.parentNode,f=t.collapsed?f.previousSibling||f:f.nextSibling||f,o(f)&&(c=t.collapsed?f.length:0)),dwt(u)&&(u=kc(u)?u:u.parentNode,u=t.collapsed?u.nextSibling||u:u.previousSibling||u,o(u)&&(s=t.collapsed?0:u.length)),t.collapsed&&(wwt(e,n.getBody(),f,c,!0,r).each(function(n){var t=n.container,i=n.offset;f=t;c=i}),wwt(e,n.getBody(),u,s,!1,r).each(function(n){var t=n.container,i=n.offset;u=t;s=i})),(kt(l)||l.block_expand)&&(kt(l)&&o(f)&&0!==c||(f=sw(e,i,f,c,!0)),kt(l)&&o(u)&&s!==u.nodeValue.length||(u=sw(e,i,u,s,!1))),git(l)&&(f=bwt(e,i,t,f,"previousSibling"),u=bwt(e,i,t,u,"nextSibling")),(sf(l)||ur(l))&&(f=kwt(n,i,f,"previousSibling"),u=kwt(n,i,u,"nextSibling"),sf(l)&&(e.isBlock(f)||(f=sw(e,i,f,c,!0)),e.isBlock(u)||(u=sw(e,i,u,s,!1)))),h(f)&&(c=e.nodeIndex(f),f=f.parentNode),h(u)&&(s=e.nodeIndex(u)+1,u=u.parentNode),{startContainer:f,startOffset:c,endContainer:u,endOffset:s}}function nv(n,t,i){function c(n){var t=n[0],i;return o(t)&&t===r&&y>=t.data.length&&n.splice(0,1),i=n[n.length-1],0===p&&0<n.length&&i===u&&o(i)&&n.splice(n.length-1,1),n}function a(n,t,i){for(var r=[];n&&n!==i;n=n[t])r.push(n);return r}function v(t,i){return n.getParent(t,function(n){return n.parentNode===i},i)}function h(n,t,r){var e=r?"nextSibling":"previousSibling",u=n,o,f;for(u.parentNode;u&&u!==t;u=o)o=u.parentNode,f=a(u===n?u:u[e],e),f.length&&(r||f.reverse(),i(c(f)))}var y=t.startOffset,r=no(t.startContainer,y),p=t.endOffset,u=no(t.endContainer,p-1),f,e,s,l;if(r===u)return i(c([r]));if(f=n.findCommonAncestor(r,u),n.isChildOf(r,u))return h(r,f,!0);if(n.isChildOf(u,r))return h(u,f);e=v(r,f)||r;s=v(u,f)||u;h(r,e,!0);l=a(e===r?e:e.nextSibling,"nextSibling",s===u?s.nextSibling:s);l.length&&i(c(l));h(u,s)}function nrt(n){var i=[],t;if(n)for(t=0;t<n.rangeCount;t++)i.push(n.getRangeAt(t));return i}function gwt(n,i){var r=gi(i,"td[data-mce-selected],th[data-mce-selected]");return 0<r.length?r:p(oh(n,function(n){var i=wp(n);return i?[t.fromDom(i)]:[]}),gy)}function wc(n){return gwt(nrt(n.selection.getSel()),t.fromDom(n.getBody()))}function tv(n,t){return py(n,"table",t)}function trt(i,r){return di((e=r.startContainer,h=r.startOffset,o(e)?0===h?n.some(t.fromDom(e)):n.none():n.from(e.childNodes[h]).map(t.fromDom)),(f=r.endContainer,s=r.endOffset,o(f)?s===f.data.length?n.some(t.fromDom(f)):n.none():n.from(f.childNodes[s-1]).map(t.fromDom)),function(n,t){var r=gt(lbt(i),u(g,n)),f=gt(hrt(i),u(g,t));return r.isSome()&&f.isSome()}).getOr(!1);var f,s,e,h}function irt(n,t,i,u){var f=i,e=new yt(i,f),s=vl(n.schema.getMoveCaretBeforeOnEnterElements(),function(n,t){return!dt(["td","th","table"],t.toLowerCase())});do{if(o(i)&&0!==r.trim(i.nodeValue).length)return u?t.setStart(i,0):t.setEnd(i,i.nodeValue.length),0;if(s[i.nodeName])return u?t.setStartBefore(i):"BR"===i.nodeName?t.setEndBefore(i):t.setEndAfter(i),0}while(i=u?e.next():e.prev());"BODY"===f.nodeName&&(u?t.setStart(f,0):t.setEnd(f,f.childNodes.length))}function hw(n){var t=n.selection.getSel();return t&&0<t.rangeCount}function rrt(n,t){var i=wc(n);0<i.length?e(i,function(i){var u=i.dom,r=n.dom.createRng();r.setStartBefore(u);r.setEndAfter(u);t(r,!0)}):t(n.selection.getRng(),!1)}function urt(n,t,i){var r=wyt(n,t);i(r);n.moveToBookmark(r)}function frt(n){return hyi.get(n)}function nbt(n,i,r,u){var o=i.uid,s=void 0===o?lvt("mce-annotation"):o,v=function(n,t){var u={},r;for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(u[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(u[i[r]]=n[i[r]]);return u}(i,["uid"]),f=t.fromTag("span",n);pp(f,rit());du(f,""+bp(),s);du(f,""+la(),r);var h,c=u(s,v),l=c.attributes,a=c.classes,y=void 0===a?[]:a;return oe(f,void 0===l?{}:l),h=f,e(y,function(n){pp(h,n)}),f}function fyi(n,i,r,u,f){function o(){s.clear()}function h(n){e(n,a)}var c=[],l=nbt(n.getDoc(),f,r,u),s=ec(),a=function(t){var e,a,r,i,u,f;switch(r=n,u="span",f=vt(i=t),eu(i).fold(function(){return"skipping"},function(n){return"br"===f||gr(e=i)&&frt(e)===fi?"valid":su(t=i)&&hvt(t,rit())?"existing":of(i.dom)?"caret":yc(r,u,f)&&yc(r,vt(n),u)?"valid":"invalid-child";var t,e})){case"invalid-child":o();h(nu(t));o();break;case"valid":ou(e=t,a=s.get().getOrThunk(function(){var n=oc(l);return c.push(n),s.set(n),n}));ii(a,e)}};return nv(n.dom,i,function(n){o();h(ut(n,t.fromDom))}),c}function tbt(i){var r,f,o,u=(r={},{register:function(n,t){r[n]={name:n,settings:t}},lookup:function(n){return at(r,n).map(function(n){return n.settings})}}),s;return o=u,(f=i).on("init",function(){f.serializer.addNodeFilter("span",function(t){e(t,function(t){n.from(t.attr(la())).bind(o.lookup).each(function(n){!1===n.persistent&&t.unwrap()})})})}),s=uvi(i),{register:function(n,t){u.register(n,t)},annotate:function(n,t){u.lookup(n).each(function(r){var u,f,e,o;f=n;e=r;o=t;(u=i).undoManager.transact(function(){var s,i,n,r,t=u.selection,h=t.getRng(),c=0<wc(u).length;h.collapsed&&!c&&(n=pc(s=u,i=h,[{inline:"span"}]),i.setStart(n.startContainer,n.startOffset),i.setEnd(n.endContainer,n.endOffset),s.selection.setRng(i));t.getRng().collapsed&&!c?(avt(r=nbt(u.getDoc(),o,f,e.decorate),ir),t.getRng().insertNode(r.dom),t.select(r.dom)):urt(t,!1,function(){rrt(u,function(n){fyi(u,n,f,e.decorate,o)})})})})},annotationChanged:function(n,t){s.addListener(n,t)},remove:function(t){cvt(i,n.some(t)).each(function(n){e(n.elements,vct)})},getAll:function(n){var u,f,r;return tht((u=n,f=gi(t.fromDom(i.getBody()),"["+la()+'="'+u+'"]'),r={},e(f,function(n){var t=gl(n,bp()),i=at(r,t).getOr([]);r[t]=i.concat([n])}),r),function(n){return ut(n,function(n){return n.dom})})}}}function iv(n){return{getBookmark:u(oyi,n),moveToBookmark:u(tyi,n)}}function ibt(n){return oat(n)||!!dn(t=n)&&!0!==fu(bu(t.getElementsByTagName("*")),function(n,t){return n||eat(t)},!1);var t}function dc(n,t){for(;t&&t!==n;){if(gu(t)||rt(t))return t;t=t.parentNode}return null}function crt(n,t,i){if(!i.collapsed){if(l.browser.isIE()&&i.startOffset===i.endOffset-1&&i.startContainer===i.endContainer){var r=i.startContainer.childNodes[i.startOffset];if(h(r))return ki(r.getClientRects(),function(i){return dvt(i,n,t)})}return ki(i.getClientRects(),function(i){return dvt(i,n,t)})}}function abt(n,t,i){return n.fire(t,i)}function vbt(n,t,i,r){return n.fire("FormatApply",{format:t,node:i,vars:r})}function lrt(n,t,i,r){return n.fire("FormatRemove",{format:t,node:i,vars:r})}function ybt(n,i){function ht(n){return n&&("IMG"===n.nodeName||i.dom.is(n,"figure.image"))}function vt(n){return tu(n)||u.hasClass(n,"mce-preview-object")}function ei(n){var t=n.target;!function(n,t){if("longpress"!==n.type&&0!==n.type.indexOf("touch"))return ht(n.target)&&!crt(n.clientX,n.clientY,t);var i=n.touches[0];return ht(n.target)&&!crt(i.clientX,i.clientY,t)}(n,i.selection.getRng())||n.isDefaultPrevented()||i.selection.select(t)}function yt(n){return u.is(n,"figure.image")?[n.querySelector("img")]:u.hasClass(n,"mce-preview-object")&&tt(n.firstElementChild)?[n,n.firstElementChild]:[n]}function pt(n){var r=upt(i);return!!r&&"false"!==n.getAttribute("data-mce-resize")&&n!==i.getBody()&&(u.hasClass(n,"mce-preview-object")?lh(t.fromDom(n.firstElementChild),r):lh(t.fromDom(n),r))}function rt(n,t,r){tt(r)&&e(yt(n),function(n){n.style[t]||!i.schema.isValid(n.nodeName.toLowerCase(),t)?u.setStyle(n,t,r):u.setAttrib(n,t,""+r)})}function wt(n,t,i){rt(n,"width",t);rt(n,"height",i)}function ut(n){var t,r,b,k,d,tt,e=n.screenX-gt,l=n.screenY-ni;h=e*v[2]+y;c=l*v[3]+p;h=h<5?5:h;c=c<5?5:c;((ht(f)||vt(f))&&!1!==i.getParam("resize_img_proportional",!0,"boolean")?!s.modifierPressed(n):s.modifierPressed(n))&&(fi(e)>fi(l)?(c=ot(h*nt),h=ot(c/nt)):(h=ot(c/nt),c=ot(h*nt)));wt(o,h,c);t=v.startPos.x+e;r=v.startPos.y+l;u.setStyles(g,{left:t=0<t?t:0,top:r=0<r?r:0,display:"block"});g.innerHTML=h+" &times; "+c;v[2]<0&&o.clientWidth<=h&&u.setStyle(o,"left",void 0+(y-h));v[3]<0&&o.clientHeight<=c&&u.setStyle(o,"top",void 0+(p-c));(e=a.scrollWidth-ti)+(l=a.scrollHeight-ii)!=0&&u.setStyles(g,{left:t-e,top:r-l});w||(b=f,k=y,d=p,tt="corner-"+v.name,i.fire("ObjectResizeStart",{target:b,width:k,height:d,origin:tt}),w=!0)}function bt(t){function f(n,t){if(n)do if(n===t)return 1;while(n=n.parentNode)}var r;w||i.removed||(ri(u.select("img[data-mce-selected],hr[data-mce-selected]"),function(n){n.removeAttribute(b)}),r="mousedown"===t.type?t.target:n.getNode(),f(r=u.$(r).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],a)&&(dt(),f(n.getStart(!0),r)&&f(n.getEnd(!0),r))?lt(r):it())}function kt(n){return kbt(dc(i.getBody(),n))}function dt(){try{i.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(n){}}var f,o,g,v,ft,gt,ni,y,p,nt,w,h,c,ti,ii,b="data-mce-selected",u=i.dom,ri=r.each,k=i.getDoc(),d=document,fi=Math.abs,ot=Math.round,a=i.getBody(),ct={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},st=function(){var n,t,r,e,s=w;w=!1;s&&(rt(f,"width",h),rt(f,"height",c));u.unbind(k,"mousemove",ut);u.unbind(k,"mouseup",st);d!==k&&(u.unbind(d,"mousemove",ut),u.unbind(d,"mouseup",st));u.remove(o);u.remove(g);u.remove(ft);lt(f);s&&(n=f,t=h,r=c,e="corner-"+v.name,i.fire("ObjectResized",{target:n,width:t,height:r,origin:e}),u.setAttrib(f,"style",u.getAttrib(f,"style")));i.nodeChanged()},lt=function(n){var rt,et;at();var tt=u.getPos(n,a),r=tt.x,e=tt.y,t=n.getBoundingClientRect(),s=t.width||t.right-t.left,w=t.height||t.bottom-t.top;f!==n&&(it(),f=n,h=c=0);rt=i.fire("ObjectSelected",{target:n});et=u.getAttrib(f,b,"1");pt(n)&&!rt.isDefaultPrevented()?ri(ct,function(n,t){var i=u.get("mceResizeHandle"+t);i&&u.remove(i);i=u.add(a,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"});11===l.ie&&(i.contentEditable=!1);u.bind(i,"mousedown",function(i){var h,tt,c;i.stopImmediatePropagation();i.preventDefault();h=i;c=yt(f)[0];gt=h.screenX;ni=h.screenY;y=c.clientWidth;p=c.clientHeight;nt=p/y;(v=n).name=t;v.startPos={x:s*n[0]+r,y:w*n[1]+e};ti=a.scrollWidth;ii=a.scrollHeight;ft=u.add(a,"div",{"class":"mce-resize-backdrop","data-mce-bogus":"all"});u.setStyles(ft,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"});o=vt(tt=f)?u.create("img",{src:l.transparentSrc}):tt.cloneNode(!0);u.addClass(o,"mce-clonedresizable");u.setAttrib(o,"data-mce-bogus","all");o.contentEditable="false";u.setStyles(o,{left:r,top:e,margin:0});wt(o,s,w);o.removeAttribute(b);a.appendChild(o);u.bind(k,"mousemove",ut);u.bind(k,"mouseup",st);d!==k&&(u.bind(d,"mousemove",ut),u.bind(d,"mouseup",st));g=u.add(a,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},y+" &times; "+p)});n.elm=i;u.setStyles(i,{left:s*n[0]+r-i.offsetWidth/2,top:w*n[1]+e-i.offsetHeight/2})}):it();u.getAttrib(f,b)||f.setAttribute(b,et)},it=function(){at();f&&f.removeAttribute(b);et(ct,function(n,t){var i=u.get("mceResizeHandle"+t);i&&(u.unbind(i),u.remove(i))})},at=function(){et(ct,function(n){n.elm&&(u.unbind(n.elm),delete n.elm)})};return i.on("init",function(){var t,n;dt();(l.browser.isIE()||l.browser.isEdge())&&(i.on("mousedown click",function(n){var t=n.target,r=t.nodeName;w||!/^(TABLE|IMG|HR)$/.test(r)||kt(t)||(2!==n.button&&i.selection.select(t,"TABLE"===r),"mousedown"===n.type&&i.nodeChanged())}),u.bind(a,"mscontrolselect",t=function(n){function t(n){ui.setEditorTimeout(i,function(){return i.selection.select(n)})}if(kt(n.target)||tu(n.target))return n.preventDefault(),void t(n.target);/^(TABLE|IMG|HR)$/.test(n.target.nodeName)&&(n.preventDefault(),"IMG"===n.target.tagName&&t(n.target))}),i.on("remove",function(){return u.unbind(a,"mscontrolselect",t)}));n=ui.throttle(function(n){i.composing||bt(n)});i.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",n);i.on("keyup compositionend",function(t){f&&"TABLE"===f.nodeName&&n(t)});i.on("hide blur",it);i.on("contextmenu longpress",ei,!0)}),i.on("remove",at),{isResizable:pt,showResizeRect:lt,hideResizeRect:it,updateResizeRect:bt,destroy:function(){f=o=ft=null}}}function cyi(n){return gu(n)||rt(n)}function art(n,t,i){var u,o,e,s,h,f=i;if(f.caretPositionFromPoint)(o=f.caretPositionFromPoint(n,t))&&((u=i.createRange()).setStart(o.offsetNode,o.offset),u.collapse(!0));else if(f.caretRangeFromPoint)u=f.caretRangeFromPoint(n,t);else if(f.body.createTextRange){u=f.body.createTextRange();try{u.moveToPoint(n,t);u.collapse(!0)}catch(o){u=function(n,t,i){var f,e=i.elementFromPoint(n,t),u=i.body.createTextRange();if(e&&"HTML"!==e.tagName||(e=i.body),u.moveToElementText(e),0<(f=(f=r.toArray(u.getClientRects())).sort(function(n,i){return(n=Math.abs(Math.max(n.top-t,n.bottom-t)))-Math.abs(Math.max(i.top-t,i.bottom-t))})).length){t=(f[0].bottom+f[0].top)/2;try{return u.moveToPoint(n,t),u.collapse(!0),u}catch(n){}}return null}(n,t,i)}return e=u,s=i.body,h=e&&e.parentElement?e.parentElement():null,rt(function(n,t,i){for(;n&&n!==t;){if(i(n))return n;n=n.parentNode}return null}(h,s,cyi))?null:e}return u}function vrt(n,t){return n&&t&&n.startContainer===t.startContainer&&n.startOffset===t.startOffset&&n.endContainer===t.endContainer&&n.endOffset===t.endOffset}function pbt(n,t,i){return null!==function(n,t,i){for(;n&&n!==t;){if(i(n))return n;n=n.parentNode}return null}(n,t,i)}function yrt(n){return n&&"TABLE"===n.nodeName}function wbt(n,t,i){for(var r=new yt(t,n.getParent(t.parentNode,n.isBlock)||n.getRoot());t=r[i?"prev":"next"]();)if(st(t))return 1}function prt(t,r,u,f,e){var h,s,c=t.getRoot(),p=t.schema.getNonEmptyElements(),l=t.getParent(e.parentNode,t.isBlock)||c,a,v,y;if(f&&st(e)&&r&&t.isEmpty(l))return n.some(i(e.parentNode,t.nodeIndex(e)));for(y=new yt(e,l);s=y[f?"prev":"next"]();){if("false"===t.getContentEditableParent(s)||(v=c,hr(a=s)&&!1===pbt(a,v,of)))return n.none();if(o(s)&&0<s.nodeValue.length)return!1===pbt(s,c,function(n){return"A"===n.nodeName})?n.some(i(s,f?s.nodeValue.length:0)):n.none();if(t.isBlock(s)||p[s.nodeName.toLowerCase()])return n.none();h=s}return u&&h?n.some(i(h,0)):n.none()}function bbt(t,r,u,f){var w,v=t.getRoot(),l=!1,e=f[(u?"start":"end")+"Container"],c=f[(u?"start":"end")+"Offset"],y=h(e)&&c===e.childNodes.length,b=t.schema.getNonEmptyElements(),a=u,s,p;if(hr(e))return n.none();if(h(e)&&c>e.childNodes.length-1&&(a=!1),gg(e)&&(e=v,c=0),e===v){if(a&&(s=e.childNodes[0<c?c-1:0])&&(hr(s)||b[s.nodeName]||yrt(s)))return n.none();if(e.hasChildNodes()){if((c=Math.min(!a&&0<c?c-1:c,e.childNodes.length-1),e=e.childNodes[c],c=o(e)&&y?e.data.length:0,!r&&e===v.lastChild&&yrt(e))||function(n,t){for(;t&&t!==n;){if(rt(t))return 1;t=t.parentNode}}(v,e)||hr(e))return n.none();if(e.hasChildNodes()&&!1===yrt(e)){s=e;p=new yt(e,v);do{if(rt(s)||hr(s)){l=!1;break}if(o(s)&&0<s.nodeValue.length){c=a?0:s.nodeValue.length;e=s;l=!0;break}if(b[s.nodeName.toLowerCase()]&&(!(w=s)||!/^(TD|TH|CAPTION)$/.test(w.nodeName))){c=t.nodeIndex(s);e=s.parentNode;a||c++;l=!0;break}}while(s=a?p.next():p.prev())}}}return r&&(o(e)&&0===c&&prt(t,y,r,!0,e).each(function(n){e=n.container();c=n.offset();l=!0}),h(e)&&(!(s=(s=e.childNodes[c])||e.childNodes[c-1])||!st(s)||s.previousSibling&&"A"===s.previousSibling.nodeName||wbt(t,s,!1)||wbt(t,s,!0)||prt(t,y,r,!0,s).each(function(n){e=n.container();c=n.offset();l=!0}))),a&&!r&&o(e)&&c===e.nodeValue.length&&prt(t,y,r,!1,e).each(function(n){e=n.container();c=n.offset();l=!0}),l?n.some(i(e,c)):n.none()}function aw(t,r){var f=r.collapsed,u=r.cloneRange(),e=i.fromRangeStart(r);return bbt(t,f,!0,u).each(function(n){f&&i.isAbove(e,n)||u.setStart(n.container(),n.offset())}),f||bbt(t,f,!1,u).each(function(n){u.setEnd(n.container(),n.offset())}),f&&u.collapse(!0),vrt(r,u)?n.none():n.some(u)}function vw(n,t){return n.splitText(t)}function yw(n){var t=n.startContainer,i=n.startOffset,r=n.endContainer,u=n.endOffset;return t===r&&o(t)?0<i&&i<t.nodeValue.length&&(t=(r=vw(t,i)).previousSibling,i<u?(t=r=vw(r,u-=i).previousSibling,u=r.nodeValue.length,i=0):u=0):(o(t)&&0<i&&i<t.nodeValue.length&&(t=vw(t,i),i=0),o(r)&&0<u&&u<r.nodeValue.length&&(u=(r=vw(r,u).previousSibling).nodeValue.length)),{startContainer:t,startOffset:i,endContainer:r,endOffset:u}}function uv(n){return{walk:function(t,i){return nv(n,t,i)},split:yw,normalize:function(t){return aw(n,t).fold(it,function(n){return t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),!0})}}}function nkt(n){var t=dbt(n),i;return t<=0||null===t?(i=wf(n,pw),parseFloat(i)||0):t}function tkt(n,t){return fu(t,function(t,i){var r=wf(n,i),u=void 0===r?0:parseInt(r,10);return isNaN(u)?t:t+u},0)}function wrt(n){return"textarea"===vt(n)}function ikt(n,t){var i=function(n){var u=n.dom.ownerDocument,t=u.body,i=u.defaultView,r=u.documentElement;if(t===n.dom)return yh(t.offsetLeft,t.offsetTop);var f=sy(null==i?void 0:i.pageYOffset,r.scrollTop),e=sy(null==i?void 0:i.pageXOffset,r.scrollLeft),o=sy(r.clientTop,t.clientTop),s=sy(r.clientLeft,t.clientLeft);return kg(n).translate(e-s,f-o)}(n),r=gbt.get(n);return{element:n,bottom:i.top+r,height:r,pos:i,cleanup:t}}function rkt(n,t,i,r){tpi(n,function(){return npi(n,t,i,r)},i)}function ukt(n,t,i,r,u){var f={elm:r.element.dom,alignToTop:u};n.fire("ScrollIntoView",f).isDefaultPrevented()||(i(t,wg(t).top,r,u),n.fire("AfterScrollIntoView",f))}function fkt(n,i,r,u){var f=t.fromDom(n.getDoc());ukt(n,f,r,ikt(t.fromDom(i),y),u)}function brt(n,t,i,r){var f,u=n.pos;i?yct(u.left,u.top,r):(f=u.top-t+n.height,yct(u.left,f,r))}function ekt(n,t,i,r,u){var e=i+t,f=r.pos.top,o=r.bottom,s=i<=o-f;f<t?brt(r,i,!1!==u,n):e<f?brt(r,i,s?!1!==u:!0===u,n):e<o&&!s&&brt(r,i,!0===u,n)}function okt(n,t,i,r){ekt(n,t,n.dom.defaultView.innerHeight,i,r)}function skt(n,i,r,u){ekt(n,i,n.dom.defaultView.innerHeight,r,u);var f,h,c,e,l,o,s,a=(f=r.element,e=wg(t.fromDom(document)),c=(h=gyi).owner(f),l=gkt(h,c),o=kg(f),s=kst(l,function(n,t){var i=kg(t);return{left:n.left+i.left,top:n.top+i.top}},{left:0,top:0}),yh(s.left+o.left+e.left,s.top+o.top+e.top)),v=bct(window);a.top<v.y?pct(r.element,!1!==u):a.top>v.bottom&&pct(r.element,!0===u)}function lyi(n,t,i){return rkt(n,okt,t,i)}function ayi(n,t,i){return fkt(n,t,okt,i)}function vyi(n,t,i){return rkt(n,skt,t,i)}function yyi(n,t,i){return fkt(n,t,skt,i)}function fv(n,t,i){(n.inline?lyi:vyi)(n,t,i)}function hkt(n){var t=ko(n).dom;return n.dom===t.activeElement}function krt(i){return void 0===i&&(i=t.fromDom(document)),n.from(i.dom.activeElement).map(t.fromDom)}function ckt(n,t){var i=gr(t)?frt(t).length:nu(t).length+1;return i<n?i:n<0?0:n}function pyi(n){return ndt.range(n.start,ckt(n.soffset,n.start),n.finish,ckt(n.foffset,n.finish))}function lkt(n,t){return!hy(t.dom)&&(ee(n,t)||g(n,t))}function drt(n){return function(t){return lkt(n,t.start)&&lkt(n,t.finish)}}function akt(n){return!0===n.inline||rpi.isIE()}function vkt(n){return ndt.range(t.fromDom(n.startContainer),n.startOffset,t.fromDom(n.endContainer),n.endOffset)}function wyi(t){var i=document.createRange();try{return i.setStart(t.start.dom,t.soffset),i.setEnd(t.finish.dom,t.foffset),n.some(i)}catch(t){return n.none()}}function ww(i){var r,u,f=akt(i)?(r=t.fromDom(i.getBody()),((u=ect(r).dom.getSelection())&&0!==u.rangeCount?n.from(u.getRangeAt(0)):n.none()).map(vkt).filter(drt(r))):n.none();i.bookmark=f.isSome()?f:i.bookmark}function grt(i){return(i.bookmark||n.none()).bind(function(r){return u=t.fromDom(i.getBody()),n.from(r).filter(drt(u)).map(pyi);var u}).bind(wyi)}function byi(n){var t=dtt(function(){ww(n)},0);n.on("init",function(){function r(){f.throttle()}var u,f,i,e,o,s;n.inline&&(u=n,f=t,d.DOM.bind(document,"mouseup",r),u.on("remove",function(){d.DOM.unbind(document,"mouseup",r)}));i=n;e=t;kr().browser.isIE()?(s=i).on("focusout",function(){ww(s)}):(o=e,i.on("mouseup touchend",function(){o.throttle()}));i.on("keyup NodeChange",function(n){"nodechange"===n.type&&n.selectionChange||ww(i)})});n.on("remove",function(){t.cancel()})}function bw(n,t){var i=n.getParam("custom_ui_selector","","string");return null!==rut.getParent(t,function(t){return tdt.isEditorUIElement(t)||!!i&&n.dom.is(t,i)})}function kyi(i,r){var u=r.editor;byi(u);u.on("focusin",function(){var n=i.focusedEditor;n!==u&&(n&&n.fire("blur",{focusedEditor:u}),i.setActive(u),(i.focusedEditor=u).fire("focus",{blurredEditor:n}),u.focus(!0))});u.on("focusout",function(){ui.setEditorTimeout(u,function(){var n=i.focusedEditor;bw(u,function(n){try{return krt(ko(t.fromDom(n.getElement()))).fold(function(){return document.body},function(n){return n.dom})}catch(n){return document.body}}(u))||n!==u||(u.fire("blur",{focusedEditor:null}),i.focusedEditor=null)})});ev||(ev=function(r){var u=i.activeEditor;u&&!function(i){var r,u;return vci()&&tt(i.target)&&(r=t.fromDom(i.target),su(r)&&tt(r.dom.shadowRoot)&&i.composed&&i.composedPath&&(u=i.composedPath(),u))?or(u):n.from(i.target)}(r).each(function(n){n.ownerDocument===document&&(n===document.body||bw(u,n)||i.focusedEditor!==u||(u.fire("blur",{focusedEditor:null}),i.focusedEditor=null))})},rut.bind(document,"focusin",ev))}function dyi(n,t){n.focusedEditor===t.editor&&(n.focusedEditor=null);n.activeEditor||(rut.unbind(document,"focusin",ev),ev=null)}function ykt(i,r){var u,f;u=t.fromDom(i.getBody());((f=r).collapsed?n.from(no(f.startContainer,f.startOffset)).map(t.fromDom):n.none()).bind(function(t){return nli(t)?n.some(t):!1===ee(u,t)?n.some(u):n.none()}).bind(function(n){return pi(n.dom)}).fold(function(){i.selection.normalize()},function(n){return i.selection.setRng(n.toRange())})}function nut(n){if(n.setActive)try{n.setActive()}catch(t){n.focus()}else n.focus()}function ls(n){return n.inline?(u=n.getBody())&&(hkt(i=t.fromDom(u))||krt(ko(r=i)).filter(function(n){return r.dom.contains(n.dom)}).isSome()):n.iframeElement&&hkt(t.fromDom(n.iframeElement));var i,r,u}function pkt(i,r,u,f,e){var o=u?r.startContainer:r.endContainer,s=u?r.startOffset:r.endOffset;return n.from(o).map(t.fromDom).map(function(n){return f&&r.collapsed?n:ey(n,e(n,s)).getOr(n)}).bind(function(t){return su(t)?n.some(t):eu(t).filter(su)}).map(function(n){return n.dom}).getOr(i)}function wkt(n,t,i){return pkt(n,t,!0,i,function(n,t){return Math.min(cct(n),t)})}function bkt(n,t,i){return pkt(n,t,!1,i,function(n,t){return 0<t?t-1:t})}function kkt(n,t){for(var i=n;n&&o(n)&&0===n.length;)n=t?n.nextSibling:n.previousSibling;return n||i}function tut(n,t){return ut(t,function(t){var i=n.fire("GetSelectionRange",{range:t});return i.range!==t?i.range:t})}function kw(n,t,i){var f=i?"lastChild":"firstChild",e=i?"prev":"next",u,r;if(n[f])return n[f];if(n!==t){if(u=n[e],u)return u;for(r=n.parent;r&&r!==t;r=r.parent)if(u=r[e])return u}}function dkt(n){var t="a"===n.name&&!n.attr("href")&&n.attr("id");return n.attr("name")||n.attr("id")&&!n.firstChild||n.attr("data-mce-bookmark")||t}function ci(n,t){this.name=n;1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}function fut(n,t){return n.replace(t.re,function(n){return at(t.uris,n).getOr(n)})}function fr(n,t){n=fpi(n);this.settings=t||{};var u,f,e,o,r=this.settings.base_uri,i=this;/^([\w\-]+):([^\/]{2})/i.test(n)||/^\s*#/.test(n)?i.source=n:(u=0===n.indexOf("//"),0!==n.indexOf("/")||u||(n=(r&&r.protocol||"http")+"://mce_host"+n),/^[\w\-]*:?\/\//.test(n)||(f=this.settings.base_uri?this.settings.base_uri.path:new fr(document.location.href).directory,n=this.settings.base_uri&&""==this.settings.base_uri.protocol?"//mce_host"+i.toAbsPath(f,n):(e=/([^#?]*)([#?]?.*)/.exec(n),(r&&r.protocol||"http")+"://mce_host"+i.toAbsPath(f,e[1])+e[2])),n=n.replace(/@@/g,"(mce_at)"),o=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(n),idt(epi,function(n,t){var r=(r=o[t])&&r.replace(/\(mce_at\)/g,"@@");i[n]=r}),r&&(i.protocol||(i.protocol=r.protocol),i.userInfo||(i.userInfo=r.userInfo),i.port||"mce_host"!==i.host||(i.port=r.port),i.host&&"mce_host"!==i.host||(i.host=r.host),i.source=""),u&&(i.protocol=""))}function eut(n,t,i){for(var r,e,u=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,s=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,h=n.getShortEndedElements(),o=1,f=i;0!==o;)for(u.lastIndex=f;;){if(r=u.exec(t),null===r)return f;if("!"===r[1]){f=po(r[2],"--")?nb(t,!1,r.index+3):nb(t,!0,r.index+1);break}if(s.lastIndex=u.lastIndex,e=s.exec(t),!ll(e)&&e.index===u.lastIndex){"/"===r[1]?--o:w(h,r[2])||(o+=1);f=u.lastIndex+e[0].length;break}}return f}function gw(n,t){function o(u,o){var ut,gt;void 0===o&&(o="html");for(var p,y,bt,g,b,st,ft,ht,kt,rt,nt,et,ot,ni,ct,lt,at,vt,it,k=u.html,w=0,d=[],ti=0,yt=ve.decode,ii=r.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),ri="html"===o?0:1,ui=function(n){for(var r,t=d.length;t--&&d[t].name!==n;);if(0<=t){for(r=d.length-1;t<=r;r--)(n=d[r]).valid&&i(n.name);d.length=t}},pt=function(n,t){return c(fut(n,u),t)},fi=function(t){""!==t&&(">"===t.charAt(0)&&(t=" "+t),n.allow_conditional_comments||"[if"!==t.substr(0,3).toLowerCase()||(t=" "+t),s(fut(t,u)))},dt=function(n,t){var i=n||"",r=!po(i,"--"),u=nb(k,r,t);return n=k.substr(t,u-t),fi(r?i+n:n),u+1},tt=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),ei=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,oi=t.getShortEndedElements(),si=n.self_closing_elements||t.getSelfClosingElements(),hi=t.getBoolAttrs(),wt=n.validate,ci=n.remove_internals,li=n.fix_self_closing,ai=t.getSpecialElements(),vi=k+">";p=tt.exec(vi);){if(ut=p[0],w<p.index&&pt(yt(k.substr(w,p.index-w))),y=p[7])ui(y=":"===(y=y.toLowerCase()).charAt(0)?y.substr(1):y);else if(y=p[8]){if(p.index+ut.length>k.length){pt(yt(k.substr(p.index)));w=p.index+ut.length;continue}if(kt=(y=":"===(y=y.toLowerCase()).charAt(0)?y.substr(1):y)in oi,li&&si[y]&&0<d.length&&d[d.length-1].name===y&&ui(y),gt=function(n,t){var i=n.exec(t),r,u;return i?(r=i[1],u=i[2],"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?u:null):null}(ei,p[9]),null!==gt){if("all"===gt){w=eut(t,k,tt.lastIndex);tt.lastIndex=w;continue}nt=!1}if(!wt||(rt=t.getElementRule(y))){if(nt=!0,wt&&(ni=rt.attributes,ct=rt.attributePatterns),(ot=p[9])?((ht=-1!==ot.indexOf("data-mce-type"))&&ci&&(nt=!1),(g=[]).map={},ot.replace(ei,function(t,i,r,o,s){return function(t,i,r,o,s){var l,h,c;if(r=fut((i=i.toLowerCase())in hi?i:yt(r||o||s||""),u),wt&&!ht&&0==(0===(l=i).indexOf("data-")||0===l.indexOf("aria-"))){if(h=ni[i],!h&&ct){for(c=ct.length;c--&&!(h=ct[c]).pattern.test(i););-1===c&&(h=null)}if(!h)return;if(h.validValues&&!(r in h.validValues))return}("name"===i||"id"===i)&&t in rdt&&(r in f||r in e)||ii[i]&&!ro.isDomSafe(r,t,n)||ht&&(i in ii||0===i.indexOf("on"))||(g.map[i]=r,g.push({name:i,value:r}))}(y,i,r,o,s),""})):(g=[]).map={},wt&&!ht){if(lt=rt.attributesRequired,at=rt.attributesDefault,vt=rt.attributesForced,rt.removeEmptyAttrs&&!g.length&&(nt=!1),vt)for(b=vt.length;b--;)ft=(et=vt[b]).name,"{$uid}"===(it=et.value)&&(it="mce_"+ti++),g.map[ft]=it,g.push({name:ft,value:it});if(at)for(b=at.length;b--;)(ft=(et=at[b]).name)in g.map||("{$uid}"===(it=et.value)&&(it="mce_"+ti++),g.map[ft]=it,g.push({name:ft,value:it}));if(lt){for(b=lt.length;b--&&!(lt[b]in g.map););-1===b&&(nt=!1)}if(et=g.map["data-mce-bogus"]){if("all"===et){w=eut(t,k,tt.lastIndex);tt.lastIndex=w;continue}nt=!1}}nt&&l(y,g,kt)}else nt=!1;if(bt=ai[y]){bt.lastIndex=w=p.index+ut.length;w=(p=bt.exec(k))?(nt&&(st=k.substr(w,p.index-w)),p.index+p[0].length):(st=k.substr(w),k.length);nt&&(0<st.length&&pt(st,!0),i(y));tt.lastIndex=w;continue}kt||(ot&&ot.indexOf("/")===ot.length-1?nt&&i(y):d.push({name:y,valid:nt}))}else if(y=p[1])fi(y);else if(y=p[2]){if(!(1==ri||n.preserve_cdata||0<d.length&&t.isValidChild(d[d.length-1].name,"#cdata"))){w=dt("",p.index+2);tt.lastIndex=w;continue}h(y)}else if(y=p[3])v(y);else{if((y=p[4])||"<!"===ut){w=dt(y,p.index+ut.length);tt.lastIndex=w;continue}if(y=p[5]){if(1!=ri){w=dt("?",p.index+2);tt.lastIndex=w;continue}a(y,p[6])}}w=p.index+ut.length}for(w<k.length&&pt(yt(k.substr(w))),b=d.length-1;0<=b;b--)(y=d[b]).valid&&i(y.name)}var u,f,e;void 0===t&&(t=le());f=null!==(u=(n=n||{}).document)&&void 0!==u?u:document;e=f.createElement("form");!1!==n.fix_self_closing&&(n.fix_self_closing=!0);var s=n.comment||y,h=n.cdata||y,c=n.text||y,l=n.start||y,i=n.end||y,a=n.pi||y,v=n.doctype||y;return{parse:function(n,t){void 0===t&&(t="html");o(function(n){for(var e,o,s,i,h=/data:[^;]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],f={},u=lvt("img"),t=0,c=0;i=h.exec(n);)e=i[0],o=u+"_"+c++,f[o]=e,t<i.index&&r.push(n.substr(t,i.index-t)),r.push(o),t=i.index+e.length;return s=new RegExp(u+"_[0-9]+","g"),0===t?{prefix:u,uris:f,html:n,re:s}:(t<n.length&&r.push(n.substr(t)),{prefix:u,uris:f,html:r.join(""),re:s})}(n),t)}}}function udt(n,t){for(var e,o,s,u,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,h=n.schema,i=(e=n.getTempAttrs(),o=t,s=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi"),o.replace(s,"")),l=h.getShortEndedElements();u=f.exec(i);){var r=f.lastIndex,c=u[0].length,a=l[u[1]]?r:gw.findEndTag(h,i,r),i=i.substring(0,r-c)+i.substring(a);f.lastIndex=r-c}return ae(i)}function fdt(n){return{compare:function(t,i){function r(t){var i={};return cpi(n.getAttribs(t),function(r){var u=r.nodeName.toLowerCase();0!==u.indexOf("_")&&"style"!==u&&0!==u.indexOf("data-")&&(i[u]=n.getAttrib(t,u))}),i}function u(n,t){var r;for(var i in n)if(w(n,i)){if(void 0===(r=t[i]))return;if(n[i]!==r)return;delete t[i]}for(i in t)if(w(t,i))return;return 1}return t.nodeName===i.nodeName&&!(!u(r(t),r(i))||!u(n.parseStyle(n.getAttrib(t,"style")),n.parseStyle(n.getAttrib(i,"style")))||ar(t)||ar(i))}}}function edt(n){var t=[],i=(n=n||{}).indent,f=odt(n.indent_before||""),u=odt(n.indent_after||""),r=ve.getEncodeFunc(n.entity_encoding||"raw",n.entities),e="html"===n.element_format;return{start:function(n,o,s){var h,a,l,c;if(i&&f[n]&&0<t.length&&0<(c=t[t.length-1]).length&&"\n"!==c&&t.push("\n"),t.push("<",n),o)for(h=0,a=o.length;h<a;h++)l=o[h],t.push(" ",l.name,'="',r(l.value,!0),'"');t[t.length]=!s||e?">":" />";s&&i&&u[n]&&0<t.length&&0<(c=t[t.length-1]).length&&"\n"!==c&&t.push("\n")},end:function(n){var r;t.push("<\/",n,">");i&&u[n]&&0<t.length&&0<(r=t[t.length-1]).length&&"\n"!==r&&t.push("\n")},text:function(n,i){0<n.length&&(t[t.length]=i?n:r(n))},cdata:function(n){t.push("<![CDATA[",n,"]\]>")},comment:function(n){t.push("<!--",n,"-->")},pi:function(n,u){u?t.push("<?",n," ",r(u),"?>"):t.push("<?",n,"?>");i&&t.push("\n")},doctype:function(n){t.push("<!DOCTYPE",n,">",i?"\n":"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}}function gc(n,t){void 0===t&&(t=le());var i=edt(n);return(n=n||{}).validate=!("validate"in n)||n.validate,{serialize:function(r){var e=n.validate,f={3:function(n){i.text(n.value,n.raw)},8:function(n){i.comment(n.value)},7:function(n){i.pi(n.name,n.value)},10:function(n){i.doctype(n.value)},4:function(n){i.cdata(n.value)},11:function(n){if(n=n.firstChild)for(;u(n),n=n.next;);}},u;return i.reset(),u=function(n){var v=f[n.type],o,l,h,c,s,a;if(v)v(n);else{var p=n.name,y=n.shortEnded,r=n.attributes;if(e&&r&&1<r.length&&(o=[],o.map={},l=t.getElementRule(n.name),l)){for(s=0,a=l.attributesOrder.length;s<a;s++)(h=l.attributesOrder[s])in r.map&&(c=r.map[h],o.map[h]=c,o.push({name:h,value:c}));for(s=0,a=r.length;s<a;s++)(h=r[s].name)in o.map||(c=r.map[h],o.map[h]=c,o.push({name:h,value:c}));r=o}if(i.start(n.name,r,y),!y){if(n=n.firstChild)for(;u(n),n=n.next;);i.end(p)}}},1!==r.type||n.inner?f[11](r):u(r),i.getContent()}}}function out(n,t){return ch(n.parseStyle(n.getAttrib(t,"style")))}function hdt(t,i,r){return n.from(r.container()).filter(o).exists(function(n){var u=t?0:-1;return i(n.data.charAt(r.offset()+u))})}function lpi(n){var t=n.container();return o(t)&&(0===t.data.length||tp(t.data)&&iv.isBookmarkNode(t.parentNode))}function uo(t,i){return function(r){return n.from(sit(t?0:-1,r)).filter(i).isSome()}}function cdt(n){return pci(n)&&"block"===wf(t.fromDom(n),"display")}function ldt(n){return rt(n)&&!(h(t=n)&&"all"===t.getAttribute("data-mce-bogus"));var t}function as(n){pg(n);ii(n,t.fromHtml('<br data-mce-bogus="1">'))}function api(n){vg(n).each(function(t){wo(t).each(function(i){tf(n)&&wh(t)&&tf(i)&&ni(t)})})}function adt(n,i){return f=it,ee(u=i,r=n)?function(n,i){for(var u,f,o=ft(i)?i:it,r=n.dom,e=[];null!==r.parentNode&&void 0!==r.parentNode;){if(u=r.parentNode,f=t.fromDom(u),e.push(f),!0===o(f))break;r=u}return e}(r,function(n){return f(n)||g(n,u)}).slice(0,-1):[];var r,u,f}function gf(n,t){return[n].concat(adt(n,t))}function sut(n,t,i){return ebt(n,t,i,lpi)}function vdt(n,i){return gt(gf(t.fromDom(i.container()),n),tf)}function ydt(n,i,r){return sut(n,i.dom,r).forall(function(n){return vdt(i,r).fold(function(){return!1===ef(n,r,i.dom)},function(u){return!1===ef(n,r,i.dom)&&ee(u,t.fromDom(n.container()))})})}function pdt(n,t,i){return vdt(t,i).fold(function(){return sut(n,t.dom,i).forall(function(n){return!1===ef(n,i,t.dom)})},function(t){return sut(n,t.dom,i).isNone()})}function vpi(n){return nw(n).exists(wh)}function tb(n,i,r){var u=or(p(gf(t.fromDom(r.container()),i),tf)).getOr(i);return vr(n,u.dom,r).filter(vpi)}function hut(n,t){return nw(t).exists(wh)||tb(!0,n,t).isSome()}function cut(i,r){return n.from(r.getNode(!0)).map(t.fromDom).exists(wh)||tb(!1,i,r).isSome()}function wdt(n){return i.isTextPosition(n)&&!n.isAtStart()&&!n.isAtEnd()}function bdt(n,i){return or(p(gf(t.fromDom(i.container()),n),tf)).getOr(n)}function kdt(n,t){return wdt(t)?hft(t):hft(t)||cf(bdt(n,t).dom,t).exists(hft)}function ddt(n,t){return wdt(t)?sft(t):sft(t)||yu(bdt(n,t).dom,t).exists(sft)}function lut(n){return nw(n).bind(function(n){return yy(n,su)}).exists(function(n){return dt(["pre","pre-wrap"],wf(n,"white-space"))})}function ib(n,t){return!lut(t)&&(cft(n,t)||ywi(n,t)||cut(n,t)||kdt(n,t))}function rb(n,t){return!lut(t)&&(snt(n,t)||pwi(n,t)||hut(n,t)||ddt(n,t))}function gdt(n,t){return ib(n,t)||rb(n,(r=(u=t).container(),f=u.offset(),o(r)&&f<r.data.length?i(r,f+1):u));var u,r,f}function ngt(n,t){return rv(n.charAt(t))}function ypi(n){var t=n.container();return o(t)&&vi(t.data,ir)}function ppi(t,r){return n.some(r).filter(ypi).bind(function(r){var c,e,u,l,o,a,f,s,v,h=r.container(),p=t,y=(o=h).data,w=i(o,0);return(!ngt(y,0)||gdt(p,w)?(s=(a=h).data,(v=ut(f=s.split(""),function(n,t){return rv(n)&&0<t&&t<f.length-1&&pit(f[t-1])&&pit(f[t+1])?" ":n}).join(""))!==s&&(a.data=v,1)):(o.data=" "+y.slice(1),1))||(c=t,u=(e=h).data,l=i(e,u.length-1),ngt(u,u.length-1)&&!gdt(c,l)&&(e.data=u.slice(0,-1)+" ",1))?n.some(r):n.none()})}function tgt(n){var r=t.fromDom(n.getBody());n.selection.isCollapsed()&&ppi(r,i.fromRangeStart(n.selection.getRng())).each(function(t){n.selection.setRng(t.toRange())})}function igt(n,r,u){var e,f,o,s,h,c,l,a;0!==u&&(f=ra(e=t.fromDom(n),tf).getOr(e),o=n.data.slice(r,r+u),s=r+u>=n.data.length&&rb(f,i(n,n.data.length)),h=0===r&&ib(f,i(n,0)),n.replaceData(r,u,(l=h,a=s,fu(c=o,function(n,t){return vc(t)||rv(t)?n.previousCharIsSpace||""===n.str&&l||n.str.length===c.length-1&&a?{previousCharIsSpace:!1,str:n.str+ir}:{previousCharIsSpace:!0,str:n.str+" "}:{previousCharIsSpace:!1,str:n.str+t}},{previousCharIsSpace:!1,str:""}).str)))}function ub(n,t){var i=n.data.slice(t);igt(n,t,i.length-nci(i).length)}function aut(n,t){var i=n.data.slice(0,t),r=i.length-pht(i).length;igt(n,t-r,r)}function vut(n,i,r,u){void 0===u&&(u=!0);var o=pht(n.data).length,f=u?n:i,e=u?i:n;return u?f.appendData(e.data):f.insertData(0,e.data),ni(t.fromDom(e)),r&&ub(f,o),f}function wpi(n,t){return u=n,f=(r=t).container(),e=r.offset(),!1===i.isTextPosition(r)&&f===u.parentNode&&e>i.before(u).offset()?i(t.container(),t.offset()-1):t;var r,u,f,e}function rgt(t){return nf(t.previousSibling)?n.some((r=t.previousSibling,o(r)?i(r,r.data.length):i.after(r))):t.previousSibling?lf(t.previousSibling):n.none();var r}function ugt(t){return nf(t.nextSibling)?n.some((r=t.nextSibling,o(r)?i(r,0):i.before(r))):t.nextSibling?pi(t.nextSibling):n.none();var r}function bpi(t,r){return rgt(r).orThunk(function(){return ugt(r)}).orThunk(function(){return u=t,e=i.before((f=r).previousSibling||f.parentNode),cf(u,e).fold(function(){return yu(u,i.after(f))},n.some);var u,f,e})}function kpi(t,r){return ugt(r).orThunk(function(){return rgt(r)}).orThunk(function(){return yu(u=t,i.after(f=r)).fold(function(){return cf(u,i.before(f))},n.some);var u,f})}function fgt(n,t,i){i.fold(function(){n.focus()},function(i){n.selection.setRng(i.toRange(),t)})}function dpi(n,t){return t&&w(n.schema.getBlockElements(),vt(t))}function gpi(r){if(pt(r)){var u=t.fromHtml('<br data-mce-bogus="1">');return pg(r),ii(r,u),n.some(i.before(u.dom))}return n.none()}function vs(t,r,f,e){void 0===e&&(e=!0);var p,b,o,s,h,k,c,l,d,a,v,g,nt,y,tt=(g=r,nt=t.getBody(),y=f.dom,(g?kpi:bpi)(nt,y).map(u(wpi,y))),it=ra(f,u(dpi,t),(p=t.getBody(),function(n){return n.dom===p})),rt=(s=tt,b=o=f,h=w(t.schema.getTextInlineElements(),vt(b)),a=wo(o).filter(gr),v=bl(o).filter(gr),ni(o),c=v,l=s,d=function(n,t,r){var u=n.dom,f=t.dom,e=u.data.length;return vut(u,f,h),r.container()===f?i(u,e):r},((k=a).isSome()&&c.isSome()&&l.isSome()?n.some(d(k.getOrDie(),c.getOrDie(),l.getOrDie())):n.none()).orThunk(function(){return h&&(a.each(function(n){return aut(n.dom,n.dom.length)}),v.each(function(n){return ub(n.dom,0)})),s}));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):it.bind(gpi).fold(function(){e&&fgt(t,r,rt)},function(i){e&&fgt(t,r,n.some(i))})}function yut(n){return gi(n,"td,th")}function put(n,t){return{start:n,end:t}}function fb(n,i){return un(t.fromDom(n),"td,th",i)}function egt(n){return!g(n.start,n.end)}function ogt(t,i){return tv(t.start,i).bind(function(r){return tv(t.end,i).bind(function(t){return g(r,t)?n.some(r):n.none()})})}function wut(n){return function(t){return ogt(t,n).map(function(n){return{rng:t,table:n,cells:yut(n)}})}}function sgt(t,i,r,u){var f;if(r.collapsed||!t.forall(egt))return n.none();if(i.isSameTable)return f=t.bind(wut(u)),n.some({start:f,end:f});var e,o,s=fb(r.startContainer,u),h=fb(r.endContainer,u),c=s.bind((o=u,function(n){return tv(n,o).bind(function(t){return vo(yut(t)).map(function(t){return put(n,t)})})})).bind(wut(u)),l=h.bind((e=u,function(n){return tv(n,e).bind(function(t){return or(yut(t)).map(function(t){return put(t,n)})})})).bind(wut(u));return n.some({start:c,end:l})}function hgt(n,t){return ty(n,function(n){return g(n,t)})}function but(n){return di(hgt(n.cells,n.rng.start),hgt(n.cells,n.rng.end),function(t,i){return n.cells.slice(t,i+1)})}function cgt(n,t){var r=t.startTable,u=t.endTable,i=n.cloneRange();return r.each(function(n){return i.setStartAfter(n.dom)}),u.each(function(n){return i.setEndBefore(n.dom)}),i}function nwi(i,r){function ut(n){return tv(t.fromDom(n),tt)}var y,p,w,f,b,k,d,nt,tt,e,o,h,l,a,it,rt,u=(y=i,function(n){return g(y,n)}),s=di(fb((p=r).startContainer,w=u),fb(p.endContainer,w),put),v=(tt=u,e=ut((nt=r).startContainer),o=ut(nt.endContainer),h=e.isSome(),l=o.isSome(),a=di(e,o,g).getOr(!1),{startTable:e,endTable:o,isStartInTable:h,isEndInTable:l,isSameTable:a,isMultiTable:!a&&h&&l});return it=r,rt=u,s.exists(function(n){return!egt(t=n)&&ogt(t,rt).exists(function(n){var t=n.dom.rows;return 1===t.length&&1===t[0].cells.length})&&trt(n.start,it);var t})?s.map(function(n){return ov.singleCellTable(r,n.start)}):v.isMultiTable?sgt(s,k=v,d=r,u).bind(function(t){var f=t.start,e=t.end,i=f.bind(but).getOr([]),r=e.bind(but).getOr([]),u;return 0<i.length&&0<r.length?(u=cgt(d,k),n.some(ov.multiTable(i,r,u))):n.none()}):sgt(s,f=v,b=r,u).bind(function(n){var t=n.start,i=n.end;return t.or(i)}).bind(function(t){var r=f.isSameTable,i=but(t).getOr([]),u;return r&&t.cells.length===i.length?n.some(ov.fullTable(t.table)):0<i.length?r?n.some(ov.partialTable(i,n.none())):(u=cgt(b,f),n.some(ov.partialTable(i,n.some(c(c({},f),{rng:u}))))):n.none()})}function lgt(n){return e(n,function(n){se(n,"contenteditable");as(n)}),0}function kut(n,t,i,r){var u=i.cloneRange();r?(u.setStart(i.startContainer,i.startOffset),u.setEndAfter(t.dom.lastChild)):(u.setStartBefore(t.dom.firstChild),u.setEnd(i.endContainer,i.endOffset));lft(n,u,t,!1)}function agt(n){var r=wc(n),i=t.fromDom(n.selection.getNode());vy(i.dom)&&pt(i)?n.selection.setCursorLocation(i.dom,0):n.selection.collapse(!0);1<r.length&&ki(r,function(n){return g(n,i)})&&du(i,"data-mce-selected","1")}function vgt(i,r,u){var f=i.selection.getRng();return lgt(u.bind(function(u){var h,c,l,o=u.rng,e=u.isStartInTable,a=(h=e?o.endContainer:o.startContainer,n.from(i.dom.getParent(h,i.dom.isBlock)).map(t.fromDom)),s;return o.deleteContents(),c=i,l=e,a.filter(pt).each(function(n){l?ni(n):(as(n),c.selection.setCursorLocation(n.dom,0))}),s=e?r[0]:r[r.length-1],kut(i,s,f,e),pt(s)?n.none():n.some(e?r.slice(1):r.slice(0,-1))}).getOr(r)),agt(i),!0}function twi(n,t,i,r){var u=n.selection.getRng(),f=t[0],e=i[i.length-1],o,s;return kut(n,f,u,!0),kut(n,e,u,!1),o=pt(f)?t:t.slice(1),s=pt(e)?i:i.slice(0,-1),lgt(o.concat(s)),r.deleteContents(),agt(n),!0}function iwi(n,t){return vs(n,!1,t),!0}function ygt(n,t){return gt(gf(t,n),gy)}function pgt(n,t){return(n?ent:ont)(t)}function rwi(r,u,f){var e=t.fromDom(r.getBody());return aft(e,f).fold(function(){return n=r,c=u,s=e,l=f,a=i.fromRangeStart(n.selection.getRng()),ygt(s,l).bind(function(i){return pt(i)?ob(n,i):(r=s,u=i,f=a,uw(c,n.getBody(),f).bind(function(n){return ygt(r,t.fromDom(n.getNode())).map(function(n){return!1===g(n,u)})}));var r,u,f}).getOr(!1)||(o=u,h=i.fromRangeStart((v=r).selection.getRng()),pgt(o,h)||vr(o,v.getBody(),h).exists(function(n){return pgt(o,n)}));var n,c,s,l,a,v,o,h},function(f){return y=u,p=e,s=f,w=i.fromRangeStart((c=r).selection.getRng()),(pt(s)?ob(c,s):(a=p,o=s,h=w,uw(v=y,(l=c).getBody(),h).bind(function(n){return e=v,i=h,r=n,pi((f=o).dom).bind(function(n){return lf(f.dom).map(function(t){return e?i.isEqual(n)&&r.isEqual(t):i.isEqual(t)&&r.isEqual(n)})}).getOr(!0)?ob(l,o):(u=o,aft(a,t.fromDom(n.getNode())).map(function(n){return!1===g(n,u)}));var u,f,e,i,r}).or(n.some(!0)))).getOr(!1);var l,a,v,o,h,c,y,p,s,w})}function eb(i,r){var f,s,e,h,c,o,l,a,v=t.fromDom(i.selection.getStart(!0)),y=wc(i);return i.selection.isCollapsed()&&0===y.length?rwi(i,r,v):(s=v,e=y,h=t.fromDom((f=i).getBody()),c=f.selection.getRng(),0!==e.length?vgt(f,e,n.none()):(o=f,a=c,aft(l=h,s).fold(function(){return n=o,nwi(l,a).map(function(t){return t.fold(u(lft,n),u(iwi,n),u(vgt,n),u(twi,n))});var n},function(n){return ob(o,n)}).getOr(!1)))}function dut(n){return n.collapsed?n:(t=n,r=i.fromRangeStart(t),f=i.fromRangeEnd(t),u=t.commonAncestorContainer,vr(!1,u,f).map(function(n){return!ef(r,f,u)&&ef(r,n,u)?(e=r.container(),o=r.offset(),s=n.container(),h=n.offset(),(i=document.createRange()).setStart(e,o),i.setEnd(s,h),i):t;var e,o,s,h,i}).getOr(t));var t,r,f,u}function uwi(n,t){var e,f,o,u,s,i=t.firstChild,r=t.lastChild;return i&&"meta"===i.name&&(i=i.next),f=r=r&&"mce_marker"===r.attr("id")?r.prev:r,o=(e=n).getNonEmptyElements(),f&&(f.isEmpty(o)||(u=f,e.getBlockElements()[u.name]&&u.firstChild&&u.firstChild===u.lastChild&&("br"===(s=u.firstChild).name||s.value===ir)))&&(r=r.prev),i&&i===r&&("ul"===i.name||"ol"===i.name)}function fwi(n){return 0<n.length&&(!(r=n[n.length-1]).firstChild||(t=r)&&t.firstChild&&t.firstChild===t.lastChild&&((i=t.firstChild).data===ir||st(i)))?n.slice(0,-1):n;var t,i,r}function gut(n,t){var i=n.getParent(t,n.isBlock);return i&&"LI"===i.nodeName?i:null}function wgt(n,t){var u=i.after(n),r=vu(t).prev(u);return r?r.toRange():null}function ewi(n,t,u,f){function nt(n){var r=i.fromRangeStart(u),f=vu(t.getRoot()),e=1===n?f.prev(r):f.next(r);return!e||gut(t,e.getNode())!==l}var tt,a,o,s,it,rt,ut,ft,e,h,et,v,ot,y,w,b,c,k,st,ht,ct,lt,at,vt=(tt=t,it=n.serialize(f),o=(a=tt.createFragment(it)).firstChild,s=a.lastChild,o&&"META"===o.nodeName&&o.parentNode.removeChild(o),s&&"mce_marker"===s.id&&s.parentNode.removeChild(s),a),l=gut(t,u.startContainer),d=fwi(p(vt.firstChild.childNodes,function(n){return"LI"===n.nodeName})),g=t.getRoot();return nt(1)?(st=g,at=(k=l).parentNode,r.each(d,function(n){at.insertBefore(n,k)}),ht=st,ct=i.before(k),(lt=vu(ht).next(ct))?lt.toRange():null):nt(2)?(rt=l,ft=g,t.insertAfter((ut=d).reverse(),rt),wgt(ut[0],ft)):(h=d,et=g,v=e=l,y=(ot=u).cloneRange(),w=ot.cloneRange(),y.setStartBefore(v),w.setEndAfter(v),b=[y.cloneContents(),w.cloneContents()],(c=e.parentNode).insertBefore(b[0],e),r.each(h,function(n){c.insertBefore(n,e)}),c.insertBefore(b[1],e),c.removeChild(e),wgt(h[h.length-1],et))}function owi(u,f,e){var ht,et,y,ct,a=u.selection,c=u.dom,v,vt,yt,w,rt,ut,d,ft,pt,ot,wt,bt,kt,dt,g,gt,ni,ti,st,b,ii,s,h,k;/^ | $/.test(f)&&(ht=c,et=a.getRng(),y=f,y=ib(ct=t.fromDom(ht.getRoot()),i.fromRangeStart(et))?y.replace(/^ /,"&nbsp;"):y.replace(/^&nbsp;/," "),f=y=rb(ct,i.fromRangeEnd(et))?y.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):y.replace(/&nbsp;(<br( \/)?>)?$/," "));var lt=u.parser,ri=e.merge,it=gc({validate:u.getParam("validate")},u.schema),at='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;<\/span>',nt=u.fire("BeforeSetContent",{content:f,format:"html",selection:!0,paste:e.paste});if(nt.isDefaultPrevented())u.fire("SetContent",{content:nt.content,format:"html",selection:!0,paste:e.paste});else{if(-1===(f=nt.content).indexOf("{$caret}")&&(f+="{$caret}"),f=f.replace(/\{\$caret\}/,at),yt=(v=a.getRng()).startContainer||(v.parentElement?v.parentElement():null),w=u.getBody(),yt===w&&a.isCollapsed()&&c.isBlock(w.firstChild)&&(vt=w.firstChild)&&!u.schema.getShortEndedElements()[vt.nodeName]&&c.isEmpty(w.firstChild)&&((v=c.createRng()).setStart(w.firstChild,0),v.setEnd(w.firstChild,0),a.setRng(v)),a.isCollapsed()||function(n){var e=n.dom,i=dut(n.selection.getRng()),r,u,f;n.selection.setRng(i);u=e.getParent(i.startContainer,vft);f=i;null!==(r=u)&&r===e.getParent(f.endContainer,vft)&&trt(t.fromDom(r),f)?lft(n,i,t.fromDom(u)):n.getDoc().execCommand("Delete",!1,null)}(u),st={context:(h=a.getNode()).nodeName.toLowerCase(),data:e.data,insert:!0},b=lt.parse(f,st),!0===e.paste&&uwi(u.schema,b)&&gut(c,h))return v=ewi(it,c,a.getRng(),b),a.setRng(v),void u.fire("SetContent",nt);if(function(){for(var n=b;n=n.walk();)1===n.type&&n.attr("data-mce-fragment","1")}(),"mce_marker"===(s=b.lastChild).attr("id"))for(ii=s,s=s.prev;s;s=s.walk(!0))if(3===s.type||!c.isBlock(s.name)){u.schema.isValidChild(s.parent.name,"span")&&s.parent.insert(ii,s,"br"===s.name);break}if(u._selectionOverrides.showBlockCaretContainer(h),st.invalid){for(u.selection.setContent(at),h=a.getNode(),k=u.getBody(),9===h.nodeType?h=s=k:s=h;s!==k;)s=(h=s).parentNode;f=h===k?k.innerHTML:c.getOuterHTML(h);f=it.serialize(lt.parse(f.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return it.serialize(b)})));h===k?c.setHTML(k,f):c.setOuterHTML(h,f)}else rt=u,ut=f=it.serialize(b),"all"===(d=h).getAttribute("data-mce-bogus")?d.parentNode.insertBefore(rt.dom.createFragment(ut),d):(ft=d.firstChild,pt=d.lastChild,!ft||ft===pt&&"BR"===ft.nodeName?rt.dom.setHTML(d,ut):rt.selection.setContent(ut));wt=ri;dt=(ot=u).schema.getTextInlineElements();g=ot.dom;wt&&(bt=ot.getBody(),kt=fdt(g),r.each(g.select("*[data-mce-fragment]"),function(n){if(tt(dt[n.nodeName.toLowerCase()])&&al(out(g,n),function(n){return!sdt.has(n)}))for(var t=n.parentNode;tt(t)&&t!==bt&&!function(n,t,i){function r(r){var u=n.getStyle(t,r),f=n.getStyle(i,r);return uy(u)&&uy(f)&&u!==f}var f=out(n,t),u=out(n,i);return ki(f,function(n){function t(t){return ki(t,function(t){return t===n})}if(t(u)||!t(fnt))return r(n);var i=p(u,function(n){return ki(fnt,function(t){return po(n,t)})});return ki(i,r)})}(g,n,t);t=t.parentNode)if(kt.compare(t,n)){g.remove(n,!0);break}})),function(n,t){var a,r=n.dom,h=n.selection,c,e,f,s,u;if(t){if(h.scrollIntoView(t),c=dc(n.getBody(),t),"false"===r.getContentEditable(c))return r.remove(t),h.select(c);f=r.createRng();s=t.previousSibling;o(s)?(f.setStart(s,s.nodeValue.length),l.ie||(e=t.nextSibling,o(e)&&(s.appendData(e.data),e.parentNode.removeChild(e)))):(f.setStartBefore(t),f.setEndBefore(t));u=r.getParent(t,r.isBlock);r.remove(t);u&&r.isEmpty(u)&&(n.$(u).empty(),f.setStart(u,0),f.setEnd(u,0),vft(u)||u.getAttribute("data-mce-fragment")||!(a=function(t){var r=i.fromRangeStart(t);if(r=vu(n.getBody()).next(r))return r.toRange()}(f))?r.add(u,r.create("br",{"data-mce-bogus":"1"})):(f=a,r.remove(u)));h.setRng(f)}}(u,c.get("mce_marker"));gt=u.getBody();r.each(gt.getElementsByTagName("*"),function(n){n.removeAttribute("data-mce-fragment")});ni=c;ti=a.getStart();n.from(ni.getParent(ti,"td,th")).map(t.fromDom).each(api);u.fire("SetContent",nt);u.addVisual()}}function nft(n){return n instanceof ru}function tft(n,t,i){var r;n.dom.setHTML(n.getBody(),t);!0!==i&&ls(r=n)&&pi(r.getBody()).each(function(n){var t=n.getNode(),i=vh(t)?pi(t).getOr(n):n;r.selection.setRng(i.toRange())})}function swi(i,u,o){var s,l=(s=u,c(c({format:"html"},o),{set:!0,content:nft(s)?"":s})),h=o.no_events?l:i.fire("BeforeSetContent",l);return nft(u)||(u=h.content),n.from(i.getBody()).fold(f(u),function(n){return nft(u)?function(n,i,u,f){var h,c,o,l,s;return h=n.parser.getNodeFilters(),c=n.parser.getAttributeFilters(),o=u,l=function(n,t){var u,f,i={},r={},s=[];for(u in o.firstChild&&yft(o.firstChild,function(u){e(n,function(n){n.name===u.name&&(i[n.name]?i[n.name].nodes.push(u):i[n.name]={filter:n,nodes:[u]})});e(t,function(n){"string"==typeof u.attr(n.name)&&(r[n.name]?r[n.name].nodes.push(u):r[n.name]={filter:n,nodes:[u]})})}),i)w(i,u)&&s.push(i[u]);for(f in r)w(r,f)&&s.push(r[f]);return s}(h,c),e(l,function(n){e(n.filter.callbacks,function(t){t(n.nodes,n.filter.name,{})})}),s=gc({validate:n.validate},n.schema).serialize(u),f.content=np(t.fromDom(i))?s:r.trim(s),tft(n,f.content,f.no_selection),f.no_events||n.fire("SetContent",f),u}(i,n,u,h):(o=i,c=n,s=h,0===(f=u).length||/^\s+$/.test(f)?(l='<br data-mce-bogus="1">',"TABLE"===c.nodeName?f="<tr><td>"+l+"<\/td><\/tr>":/^(UL|OL)$/.test(c.nodeName)&&(f="<li>"+l+"<\/li>"),f=(a=oi(o))&&o.schema.isValidChild(c.nodeName.toLowerCase(),a.toLowerCase())?(f=l,o.dom.createHTML(a,ya(o),f)):f||'<br data-mce-bogus="1">',tft(o,f,s.no_selection),o.fire("SetContent",s)):("raw"!==s.format&&(f=gc({validate:o.validate},o.schema).serialize(o.parser.parse(f,{isRootContent:!0,insert:!0}))),s.content=np(t.fromDom(c))?f:r.trim(f),tft(o,s.content,s.no_selection),s.no_events||o.fire("SetContent",s)),s.content);var o,c,f,s,l,a})}function bgt(n){return ft(n)?n:it}function ift(i,r,u){var e=r(i),f=bgt(u);return e.orThunk(function(){return f(i)?n.none():function(r){for(var u=i.dom,e=bgt(f);u.parentNode;){var u=u.parentNode,o=t.fromDom(u),s=r(o);if(s.isSome())return s;if(e(o))break}return n.none()}(r)})}function kgt(n,t,i){var f=n.formatter.get(i),r,u;if(f)for(r=0;r<f.length;r++)if(u=f[r],ur(u)&&!1===u.inherit&&n.dom.is(t,u.selector))return 1}function rft(n,t,i,r,u){var f=n.dom.getRoot();return t!==f&&(t=n.dom.getParent(t,function(t){return!!kgt(n,t,i)||t.parentNode===f||!!af(n,t,i,r,!0)}),!!af(n,t,i,r,u))}function dgt(n,t,i){return!!pft(t,i.inline)||!!pft(t,i.block)||(i.selector?1===t.nodeType&&n.is(t,i.selector):void 0)}function ggt(n,t,i,r,u,f){var e=i[r],o,s;if(ft(i.onmatch))return i.onmatch(t,i,r);if(e)if(tr(e.length)){for(o in e)if(w(e,o)){var h="attributes"===r?n.getAttrib(t,o):ew(n,t,o),c=df(e[o],f),l=wu(h)||oht(h);if(!l||!wu(c)){if(u&&l&&!i.exact)return;if((!u||i.exact)&&!pft(h,dit(n,c,o)))return}}}else for(s=0;s<e.length;s++)if("attributes"===r?n.getAttrib(t,e[s]):ew(n,t,e[s]))return 1;return 1}function uft(n,t,i,r,u){if(r)return rft(n,r,t,i,u);if(r=n.selection.getNode(),rft(n,r,t,i,u))return!0;var f=n.selection.getStart();return!(f===r||!rft(n,f,t,i,u))}function nnt(n){return 0<function(n){for(var t=[];n;){if(3===n.nodeType&&n.nodeValue!==il||1<n.childNodes.length)return[];1===n.nodeType&&t.push(n);n=n.firstChild}return t}(n).length}function tnt(n){if(n){var t=new yt(n,n);for(n=t.current();n;n=t.next())if(o(n))return n}return null}function fft(n){var i=t.fromTag("span");return oe(i,{id:cnt,"data-mce-bogus":"1","data-mce-type":"format-caret"}),n&&ii(i,t.fromText(il)),i}function eft(n,i,r){void 0===r&&(r=!0);var u,e,l,h,a,c,f,o,s=n.dom,v=n.selection;nnt(i)?vs(n,!1,t.fromDom(i),r):(u=v.getRng(),e=s.getParent(i,s.isBlock),l=u.startContainer,h=u.startOffset,a=u.endContainer,c=u.endOffset,(o=tnt(i))&&o.nodeValue.charAt(0)===il&&o.deleteData(0,1),f=o,s.remove(i,!0),l===f&&0<h&&u.setStart(f,h-1),a===f&&0<c&&u.setEnd(f,c-1),e&&s.isEmpty(e)&&as(t.fromDom(e)),v.setRng(u))}function oft(n,t,i){void 0===i&&(i=!0);var r=n.dom,u=n.selection;if(t)eft(n,t,i);else if(!(t=cs(n.getBody(),u.getStart())))for(;t=r.get(cnt);)eft(n,t,!1)}function int(n,t){return n.appendChild(t),t}function rnt(n,t){var i=kst(n,function(n,t){return int(n,t.cloneNode(!1))},t);return int(i,i.ownerDocument.createTextNode(il))}function hwi(t,i,r,u,f,e){var s,h,c=t.formatter,l=t.dom,a=p(ch(c.get()),function(n){return n!==u&&!vi(n,"removeformat")}),o;return 0<p((s=t,h=r,fu(a,function(n,t){var i=iyi(s,t);return s.formatter.matchNode(h,t,{},i)?n.concat([t]):n},[])),function(n){function i(n){return vl(n,function(n,t){return ki(e,function(n){return n===t})})}return f=u,e=["inline","block","selector","attributes","styles","classes"],!ki((r=t).formatter.get(n),function(n){var t=i(n);return ki(r.formatter.get(f),function(n){var r,u=i(n),f=t,e=u;return cst(r=void 0===r?dd:r).eq(f,e)})});var r,f,e}).length?(o=r.cloneNode(!1),l.add(i,o),c.remove(u,f,o,e),l.remove(o),n.some(o)):n.none()}function cwi(n,i,r,f){var w,h,nt,tt,c,b,it,rt,l,s,a,ut,k,ft,d,et=n.dom,v=n.selection,ot=[],y=v.getRng(),g=y.startContainer,st=y.startOffset,o=g;for(3===g.nodeType&&(st!==g.nodeValue.length&&(w=!0),o=o.parentNode);o;){if(af(n,o,i,r,f)){h=o;break}o.nextSibling&&(w=!0);ot.push(o);o=o.parentNode}h&&(w?(nt=v.getBookmark(),y.collapse(!0),tt=yw(pc(n,y,n.formatter.get(i),!0)),n.formatter.remove(i,r,tt,f),v.moveToBookmark(nt)):(c=cs(n.getBody(),h),l=b=fft(!1).dom,(ut=(a=n.dom).getParent(s=null!==c?c:h,u(bit,n)))&&a.isEmpty(ut)?s.parentNode.replaceChild(l,s):(k=t.fromDom(s),ft=gi(k,"br"),d=p(function(){for(var i=[],n=k.dom;n;)i.push(t.fromDom(n)),n=n.lastChild;return i}().slice(-1),wh),ft.length===d.length&&e(d,ni),a.isEmpty(s)?s.parentNode.replaceChild(l,s):a.insertAfter(l,s)),it=hwi(n,b,h,i,r,f),rt=rnt(ot.concat(it.toArray()),b),eft(n,c,!1),v.setCursorLocation(rt,1),et.isEmpty(h)&&et.remove(h)))}function lwi(n,t){var i=n.schema.getTextInlineElements();return w(i,vt(t))&&!of(t.dom)&&!bo(t.dom)}function wft(n){return h(n)&&!ar(n)&&!of(n)&&!bo(n)}function vnt(n,t){for(var i=n;i;i=i[t]){if(o(i)&&uy(i.data))return n;if(h(i)&&!ar(i))return i}return n}function ynt(n,t,i){var e=fdt(n),f,u;if(t&&i&&(t=vnt(t,"previousSibling"),i=vnt(i,"nextSibling"),e.compare(t,i))){for(u=t.nextSibling;u&&u!==i;)f=u,u=u.nextSibling,t.appendChild(f);return n.remove(i),r.each(r.grep(i.childNodes),function(n){t.appendChild(n)}),t}return i}function pnt(n,t,i,r){var u;r&&!1!==t.merge_siblings&&(u=ynt(n,wit(r),r),ynt(n,u,wit(u,!0)))}function wnt(n,t){return function(i){return!(!i||!ew(n,i,t))}}function bnt(n,t,i){return function(r){var u,f;n.setStyle(r,t,i);""===r.getAttribute("style")&&r.removeAttribute("style");u=n;"SPAN"===(f=r).nodeName&&0===u.getAttribs(f).length&&u.remove(f,!0)}}function knt(n,t,i){return n.isChildOf(t,i)&&t!==i&&!n.isBlock(i)}function dnt(n,t,i){var f,r=t[i?"startContainer":"endContainer"],u=t[i?"startOffset":"endOffset"];return h(r)&&(f=r.childNodes.length-1,!i&&u&&u--,r=r.childNodes[f<u?f:u]),o(r)&&i&&u>=r.nodeValue.length&&(r=new yt(r,n.getBody()).next()||r),o(r)&&!i&&0===u&&new yt(r,n.getBody()).prev()||r}function gnt(n,t){var i=t?"firstChild":"lastChild",r;return/^(TR|TH|TD)$/.test(n.nodeName)&&n[i]?(r=n[i],"TR"===n.nodeName&&r[i]||r):n}function bft(n,t,i,r){var u=n.create(i,r);return t.parentNode.insertBefore(u,t),u.appendChild(t),u}function nti(n,i,r,u,f){var o=t.fromDom(i),e=t.fromDom(n.create(u,f));return oy(e,(r?sct:oct)(o)),r?(ou(o,e),act(e,o)):(kl(o,e),ii(e,o)),e.dom}function hb(n,t,i,r){var u=wit(t,i,r);return wu(u)||"BR"===u.nodeName||n.isBlock(u)}function tti(n,t,i,r,u){var rt,l,o=n.dom,ut=o,w=r,v,s,a,y,d,g,c,b,f,nt,tt,k,it;if(!(kt(l=t)&&ul(w,l.inline)||sf(l)&&ul(w,l.block)||ur(l)&&h(w)&&ut.is(w,l.selector)||t.links&&"A"===r.nodeName))return sv.keep();if(f=r,kt(t)&&"all"===t.remove&&br(t.preserve_attributes)&&(nt=p(o.getAttribs(f),function(n){return dt(t.preserve_attributes,n.name.toLowerCase())}),o.removeAllAttribs(f),e(nt,function(n){return o.setAttrib(f,n.name,n.value)}),0<nt.length))return sv.rename("span");if("all"!==t.remove)for(eet(t.styles,function(n,r){n=dit(o,df(n,i),r+"");eh(r)&&(r=n,u=null);!t.remove_similar&&u&&!ul(ew(o,u,r),n)||o.setStyle(f,r,"");rt=!0}),rt&&""===o.getAttrib(f,"style")&&(f.removeAttribute("style"),f.removeAttribute("data-mce-style")),eet(t.attributes,function(n,r){var s;if(n=df(n,i),eh(r)&&(r=n,u=null),t.remove_similar||!u||ul(o.getAttrib(u,r),n))if("class"===r&&(n=o.getAttrib(f,r))&&(s="",e(n.split(/\s+/),function(n){/mce\-\w+/.test(n)&&(s+=(s?" ":"")+n)}),s))o.setAttrib(f,r,s);else{if(ebi.test(r)&&f.removeAttribute("data-mce-"+r),"style"===r&&dr(["li"])(f)&&"none"===o.getStyle(f,"list-style-type"))return f.removeAttribute(r),void o.setStyle(f,"list-style-type","none");"class"===r&&f.removeAttribute("className");f.removeAttribute(r)}}),eet(t.classes,function(n){n=df(n,i);u&&!o.hasClass(u,n)||o.removeClass(f,n)}),tt=o.getAttribs(f),k=0;k<tt.length;k++)if(it=tt[k].nodeName,0!==it.indexOf("_")&&0!==it.indexOf("data-"))return sv.keep();return"none"!==t.remove?(v=n,a=t,g=(s=f).parentNode,c=v.dom,b=oi(v),sf(a)&&(b?g===c.getRoot()&&(a.list_block&&ul(s,a.list_block)||e(bu(s.childNodes),function(n){yc(v,b,n.nodeName.toLowerCase())?y?y.appendChild(n):(y=bft(c,n,b),c.setAttribs(y,v.settings.forced_root_block_attrs)):y=null})):c.isBlock(s)&&!c.isBlock(g)&&(hb(c,s,!1)||hb(c,s.firstChild,!0,!0)||s.insertBefore(c.create("br"),s.firstChild),hb(c,s,!0)||hb(c,s.lastChild,!1,!0)||s.appendChild(c.create("br")))),ur(d=a)&&kt(d)&&ly(at(d,"mixed"),!0)&&!ul(a.inline,s)||c.remove(s,!0),sv.removed()):sv.keep()}function rl(n,t,i,r,u){return tti(n,t,i,r,u).fold(it,function(t){return n.dom.rename(r,t),!0},lt)}function iti(t,i,r,u,s){function v(n){var o,h,c,a,u,v=(h=i,c=r,a=s,e(ow((o=t).dom,n.parentNode).reverse(),function(n){var t;u||"_start"===n.id||"_end"===n.id||(t=af(o,n,h,c,a))&&!1!==t.split&&(u=n)}),u);return function(n,t,i,r,u,e,o,s){var c,y,a=n.dom,p,l,h,v;if(i){for(p=i.parentNode,l=r.parentNode;l&&l!==p;l=l.parentNode){for(h=a.clone(l,!1),v=0;v<t.length&&null!==(h=function(n,t,i){return tti(n,t,s,i,i).fold(f(i),function(t){return n.dom.createFragment().appendChild(i),n.dom.rename(i,t)},f(null))}(n,t[v],h));v++);h&&(c&&h.appendChild(c),y=y||h,c=h)}!e||o.mixed&&a.isBlock(i)||(r=a.split(i,r));c&&(u.parentNode.insertBefore(c,u),y.appendChild(u),kt(o)&&pnt(a,o,0,c))}return r}(t,l,v,n,n,!0,y,r)}function g(n){return ki(l,function(i){return rl(t,i,r,n,n)})}function w(n){var r,i=c.get(n?"_start":"_end"),t=i[n?"firstChild":"lastChild"];return ar(r=t)&&h(r)&&("_start"===r.id||"_end"===r.id)&&(t=t[n?"firstChild":"lastChild"]),o(t)&&0===t.data.length&&(t=n?i.previousSibling||i.nextSibling:i.nextSibling||i.previousSibling),c.remove(i,!0),t}function k(i){var f=pc(t,i,l,i.collapsed),o;if(y.split){if(f=yw(f),(r=dnt(t,f,!0))!==(u=dnt(t,f))){if(r=gnt(r,!0),u=gnt(u,!1),knt(c,r,u))return o=n.from(r.firstChild).getOr(r),v(nti(c,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void w(!0);if(knt(c,u,r))return o=n.from(u.lastChild).getOr(u),v(nti(c,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void w(!1);var r=bft(c,r,"span",{id:"_start","data-mce-type":"bookmark"}),u=bft(c,u,"span",{id:"_end","data-mce-type":"bookmark"}),s=c.createRng();s.setStartAfter(r);s.setEndBefore(u);nv(c,s,function(n){e(n,function(n){ar(n)||ar(n.parentNode)||v(n)})});v(r);v(u);r=w(!0);u=w()}else r=u=v(r);f.startContainer=r.parentNode||r;f.startOffset=c.nodeIndex(r);f.endContainer=u.parentNode||u;f.endOffset=c.nodeIndex(u)+1}nv(c,f,function(n){e(n,nt)})}var d,l=t.formatter.get(i),y=l[0],b=!0,c=t.dom,a=t.selection,nt=function(n){var o=!0,u=!1,s,f,i,r;if(h(n)&&c.getContentEditable(n)&&(o=b,b="true"===c.getContentEditable(n),u=!0),i=bu(n.childNodes),b&&!u&&(s=g(n),f=n.parentNode,!s&&tt(f)&&git(y)&&g(f)),y.deep&&i.length){for(r=0;r<i.length;r++)nt(i[r]);u&&(b=o)}e(["underline","line-through","overline"],function(i){h(n)&&t.dom.getStyle(n,"text-decoration")===i&&n.parentNode&&vwt(c,n.parentNode)===i&&rl(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:i}},null,n)})},p;if(u)return fw(u)?((d=c.createRng()).setStartBefore(u),d.setEndAfter(u),k(d)):k(u),void lrt(t,i,u,r);if("false"!==c.getContentEditable(a.getNode()))a.isCollapsed()&&kt(y)&&!wc(t).length?cwi(t,i,r,s):(urt(a,!0,function(){rrt(t,k)}),kt(y)&&uft(t,i,r,a.getStart())&&awt(c,a,a.getRng()),t.nodeChanged()),lrt(t,i,u,r);else{for(u=a.getNode(),p=0;p<l.length&&(!l[p].ceFalseOverride||!rl(t,l[p],r,u,u));p++);lrt(t,i,u,r)}}function kwi(n){return h(n)&&!ar(n)&&!of(n)&&!bo(n)}function rti(n){return w(n,"vars")}function uti(n,t,i,r,u){return dst(t,function(t){var f=n.formatter.matchNode(t,i,null!=u?u:{},r);return!tr(f)},function(t){return kgt(n,t,i)||!r&&tt(n.formatter.matchNode(t,i,u,!0))})}function fti(n,t){var i=null!=t?t:nii(n);return p(ow(n.dom,i),function(n){return h(n)&&!bo(n)})}function dwi(t,i,r,u,f,o){var y,s,w,k,d,b,l,a,v;return null===i.get()&&(s=t,(y=i).set({}),s.on("NodeChange",function(n){tii(s,n.element,y.get())}),s.on("FormatApply FormatRemove",function(t){var i=n.from(t.node).map(function(n){return fw(n)?n:n.startContainer}).bind(function(t){return h(t)?n.some(t):n.from(t.parentElement)}).getOrThunk(function(){return nii(s)});tii(s,i,y.get())})),w=t,d=r,b=u,l=f,a=o,v=(k=i).get(),e(d.split(","),function(n){function r(){var t=fti(w);return uti(w,t,n,l,a).isSome()}var t,i=at(v,n).getOrThunk(function(){var t={withSimilar:{state:hi(!1),similar:!0,callbacks:[]},withoutSimilar:{state:hi(!1),similar:!1,callbacks:[]},withVars:[]};return v[n]=t});tr(a)?((t=l?i.withSimilar:i.withoutSimilar).callbacks.push(b),1===t.callbacks.length&&t.state.set(r())):i.withVars.push({state:hi(r()),similar:l,vars:a,callback:b})}),k.set(v),{unbind:function(){var f,o=r,n=u,t=(f=i).get();e(o.split(","),function(i){return at(t,i).each(function(r){t[i]={withSimilar:c(c({},r.withSimilar),{callbacks:p(r.withSimilar.callbacks,function(t){return t!==n})}),withoutSimilar:c(c({},r.withoutSimilar),{callbacks:p(r.withoutSimilar.callbacks,function(t){return t!==n})}),withVars:p(r.withVars,function(t){return t.callback!==n})}})});f.set(t)}}}function kft(n,i){var r=(i||document).createDocumentFragment();return e(n,function(n){r.appendChild(n.dom)}),t.fromDom(r)}function dft(n,t,i){return{element:n,width:t,rows:i}}function eti(n,t){return{element:n,cells:t}}function oti(n,t){var i=parseInt(gl(n,t),10);return isNaN(i)?1:i}function sti(n){return fu(n,function(n,t){return t.cells.length>n?t.cells.length:n},0)}function hti(t,i){for(var e,u,f=t.rows,r=0;r<f.length;r++)for(e=f[r].cells,u=0;u<e.length;u++)if(g(e[u],i))return n.some({x:u,y:r});return n.none()}function cti(n,t,i,r,u){for(var e,h,o=[],s=n.rows,f=i;f<=u;f++)e=s[f].cells,h=t<r?e.slice(t,r+1):e.slice(r,t+1),o.push(eti(s[f].element,h));return o}function gwi(n){var t=dft(oc(n),0,[]);return e(gi(n,"tr"),function(n,i){e(gi(n,"td,th"),function(r,u){!function(n,t,i,r,u){for(var e,s=oti(u,"rowspan"),h=oti(u,"colspan"),o=n.rows,f=i;f<i+s;f++)for(o[f]||(o[f]=eti(yvt(r),[])),e=t;e<t+h;e++)o[f].cells[e]=f===i&&e===t?u:oc(u)}(t,function(n,t,i){for(;r=t,((u=n.rows)[i]?u[i].cells:[])[r];)t++;var r,u;return t}(t,u,i),i,n,r)})}),dft(t.element,sti(t.rows),t.rows)}function nbi(n,i){var r,u,e,o=t.fromDom(i.commonAncestorContainer),s=gf(o,n),c=p(s,function(n){return sn(n)||gci(n)}),h=(e=i,gt(u=s,function(n){return"li"===vt(n)&&trt(n,e)}).fold(f([]),function(){return gt(u,function(n){return"ul"===vt(n)||"ol"===vt(n)}).map(function(n){var i=t.fromTag(vt(n));return cci(i,vl(tlt(n),function(n,t){return po(t,"list-style")})),[t.fromTag("li"),i]}).getOr([])}));return ut(c.concat(h.length?h:ua(r=o)?eu(r).filter(bn).fold(f([]),function(n){return[r,n]}):bn(r)?[r]:[]),oc)}function lti(){return kft([])}function tbi(n,i){return py(i[0],"table",u(g,n)).bind(function(n){var r,u,f=i[0],e=i[i.length-1],o=gwi(n);return u=e,hti(r=o,f).bind(function(n){return hti(r,u).map(function(t){return i=r,f=n.x,u=n.y,e=t.x,s=u<(o=t.y)?cti(i,f,u,e,o):cti(i,f,o,e,u),dft(i.element,sti(s),s);var i,f,u,e,o,s})}).map(function(n){return kft([(u=ut((r=n).rows,function(n){var i=ut(n.cells,function(n){var t=yvt(n);return se(t,"colspan"),se(t,"rowspan"),t}),t=oc(n.element);return oy(t,i),t}),i=oc(r.element),oy(f=t.fromTag("tbody"),u),ii(i,f),i)]);var r,u,i,f})}).getOrThunk(lti)}function ibi(n,i){var e,r,o,u,s,h,f,c=gwt(i,n);return 0<c.length?tbi(n,c):(e=n,0<(r=i).length&&r[0].collapsed?lti():(o=e,u=r[0],s=t.fromDom(u.cloneContents()),f=fu(h=nbi(o,u),function(n,t){return ii(t,n),t},s),0<h.length?kft([f]):f))}function cb(n,t){return 0<=t&&t<n.length&&vc(n.charAt(t))}function ati(n,t){var i=ae(n.innerText);return t?i.replace(/^[ \f\n\r\t\v]+/,""):i}function vti(n){return h(n)?n.outerHTML:o(n)?ve.encodeRaw(n.data,!1):yci(n)?"<!--"+n.data+"-->":""}function rbi(n,t){var i=0;e(n,function(n){var u,f,s,r,h,e,c,o;0===n[0]?i++:1===n[0]?(r=t,h=n[1],e=i,o=function(n){var t,i=document.createElement("div"),r=document.createDocumentFragment();for(n&&(i.innerHTML=n);t=i.firstChild;)r.appendChild(t);return r}(h),r.hasChildNodes()&&e<r.childNodes.length?(c=r.childNodes[e]).parentNode.insertBefore(o,c):r.appendChild(o),i++):2===n[0]&&(f=i,(u=t).hasChildNodes()&&f<u.childNodes.length&&(s=u.childNodes[f]).parentNode.removeChild(s))})}function gft(n){var t,i=oh((t=n.getBody(),p(ut(bu(t.childNodes),vti),function(n){return 0<n.length})),function(t){var i=udt(n.serializer,t);return 0<i.length?[i]:[]}),r=i.join("");return-1!==r.indexOf("<\/iframe>")?{type:"fragmented",fragments:i,content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:r,bookmark:null,beforeBookmark:null}}function net(n,t,i){function p(n,t,i,r){for(var u=n;u-t<r&&u<i&&f[u]===e[u-t];)++u;return{start:n,end:u,diag:t}}var a,h,v,f,e,c,u,r,o,y,l,s=i?t.beforeBookmark:t.bookmark;"fragmented"===t.type?(a=t.fragments,h=n.getBody(),v=ut(bu(h.childNodes),vti),rbi((e=a,c=(f=v).length+e.length+2,u=new Array(c),r=new Array(c),o=function(n,t,i,r,u){var s=y(n,t,i,r),h,c,l;if(null===s||s.start===t&&s.diag===t-r||s.end===n&&s.diag===n-i)for(h=n,c=i;h<t||c<r;)h<t&&c<r&&f[h]===e[c]?(u.push([0,f[h]]),++h,++c):r-i<t-n?(u.push([2,f[h]]),++h):(u.push([1,e[c]]),++c);else{for(o(n,s.start,i,s.start-s.diag,u),l=s.start;l<s.end;++l)u.push([0,f[l]]);o(s.end,t,s.end-s.diag,r,u)}},y=function(n,t,i,o){var w=t-n,b=o-i;if(0==w||0==b)return null;var c,h,s,a,v,l=w-b,k=b+w,y=(k%2==0?k:1+k)/2;for(u[1+y]=n,r[1+y]=t+1,c=0;c<=y;++c){for(h=-c;h<=c;h+=2){for(s=h+y,u[s]=h===-c||h!==c&&u[s-1]<u[s+1]?u[s+1]:u[s-1]+1,v=(a=u[s])-n+i-h;a<t&&v<o&&f[a]===e[v];)u[s]=++a,++v;if(l%2!=0&&l-c<=h&&h<=l+c&&r[s-l]<=u[s])return p(r[s-l],h+n-i,t,o)}for(h=l-c;h<=l+c;h+=2){for(s=h+y-l,r[s]=h===l-c||h!==l+c&&r[s+1]<=r[s-1]?r[s+1]-1:r[s-1],v=(a=r[s]-1)-n+i-h;n<=a&&i<=v&&f[a]===e[v];)r[s]=a--,v--;if(l%2==0&&-c<=h&&h<=c&&r[s]<=u[s+l])return p(r[s],h+n-i,t,o)}}},l=[],o(0,f.length,0,e.length,l),l),h)):n.setContent(t.content,{format:"raw",no_selection:!tt(s)||!owt(s)||!s.isFakeCaret});n.selection.moveToBookmark(s)}function tet(n){return"fragmented"===n.type?n.fragments.join(""):n.content}function yti(n){var i=t.fromTag("body",obi());return avt(i,tet(n)),e(gi(i,"*[data-mce-bogus]"),vct),i.dom.innerHTML}function lb(n,t){return!(!n||!t)&&(r=t,tet(n)===tet(r)||(i=t,yti(n)===yti(i)));var i,r}function iet(n){return 0===n.get()}function ab(n,t,i){iet(i)&&(n.typing=t)}function pti(n,t){n.typing&&(ab(n,!1,t),n.add())}function wti(i){return{undoManager:{beforeChange:function(n,t){var r=i,u=t;iet(n)&&u.set(kpt(r.selection))},add:function(n,t,u,f,e,o){return function(n,t,i,u,f,e,o){var a=gft(n),s,l,h,c;if((e=r.extend(e=e||{},a),!1===iet(u)||n.removed)||(s=t.data[i.get()],n.fire("BeforeAddUndo",{level:e,lastLevel:s,originalEvent:o}).isDefaultPrevented())||s&&lb(s,e))return null;if(t.data[i.get()]&&f.get().each(function(n){t.data[i.get()].beforeBookmark=n}),l=n.getParam("custom_undo_redo_levels",0,"number"),l&&t.data.length>l){for(h=0;h<t.data.length-1;h++)t.data[h]=t.data[h+1];t.data.length--;i.set(t.data.length)}return e.bookmark=kpt(n.selection),i.get()<t.data.length-1&&(t.data.length=i.get()+1),t.data.push(e),i.set(t.data.length-1),c={level:e,lastLevel:s,originalEvent:o},0<i.get()?(n.setDirty(!0),n.fire("AddUndo",c),n.fire("change",c)):n.fire("AddUndo",c),e}(i,n,t,u,f,e,o)},undo:function(n,t,r){return e=i,s=t,f=r,(u=n).typing&&(u.add(),u.typing=!1,ab(u,!1,s)),0<f.get()&&(f.set(f.get()-1),net(e,o=u.data[f.get()],!0),e.setDirty(!0),e.fire("Undo",{level:o})),o;var e,u,s,f,o},redo:function(n,t){return r=i,f=t,(u=n).get()<f.length-1&&(u.set(u.get()+1),net(r,e=f[u.get()],!1),r.setDirty(!0),r.fire("Redo",{level:e})),e;var r,u,f,e},clear:function(n,t){var r,u=i,f=t;(r=n).data=[];f.set(0);r.typing=!1;u.fire("ClearUndos")},reset:function(n){var t;(t=n).clear();t.add()},hasUndo:function(n,t){return u=i,r=n,0<t.get()||r.typing&&r.data[0]&&!lb(gft(u),r.data[0]);var u,r},hasRedo:function(n,t){return i=n,t.get()<i.data.length-1&&!i.typing;var i},transact:function(n,t,i){return u=i,pti(r=n,t),r.beforeChange(),r.ignore(u),r.add();var r,u},ignore:function(n,t){try{n.set(n.get()+1);t()}finally{n.set(n.get()-1)}},extra:function(n,t,r,u){var f,o,s=i,e=t,h=u;(f=n).transact(r)&&(o=f.data[e.get()].bookmark,net(s,f.data[e.get()-1],!0),f.transact(h)&&(f.data[e.get()-1].beforeBookmark=o))}},formatter:{match:function(n,t,r,u){return uft(i,n,t,r,u)},matchAll:function(n,t){return u=n,o=t,f=[],e={},s=(r=i).selection.getStart(),r.dom.getParent(s,function(n){for(var t,i=0;i<u.length;i++)t=u[i],!e[t]&&af(r,n,t,o)&&(e[t]=!0,f.push(t))},r.dom.getRoot()),f;var r,u,o,f,e,s},matchNode:function(n,t,r,u){return af(i,n,t,r,u)},canApply:function(n){return function(t){var f=t.formatter.get(n),o=t.dom,e,i,r,u;if(f)for(e=ow(o,t.selection.getStart()),i=f.length-1;0<=i;i--){if(r=f[i],!ur(r)||tt(r.defaultBlock))return!0;for(u=e.length-1;0<=u;u--)if(o.is(e[u],r.selector))return!0}return!1}(i)},closest:function(r){function e(n){return g(n,t.fromDom(u.getBody()))}return u=i,f=r,n.from(u.selection.getStart(!0)).bind(function(i){return ift(t.fromDom(i),function(t){return nht(f,function(i){return af(u,t.dom,r=i)?n.some(r):n.none();var r})},e)}).getOrNull();var u,f},apply:function(n,t,r){return oet(i,n,t,r)},remove:function(n,t,r,u){return iti(i,n,t,r,u)},toggle:function(n,t,r){var u,f=n,e=t,o=r,s=(u=i).formatter.get(f);(!uft(u,f,e,o)||"toggle"in s[0]&&!s[0].toggle?oet:iti)(u,f,e,o)},formatChanged:function(n,t,r,u,f){return dwi(i,n,t,r,u,f)}},editor:{getContent:function(u,e){return o=i,s=u,h=e,n.from(o.getBody()).fold(f("tree"===s.format?new ru("body",11):""),function(n){return f=o,u=n,y=h,l=c(c({},v=s),{format:y,get:!0,getInner:!0}),i=v.no_events?l:f.fire("BeforeGetContent",l),a="raw"===i.format?r.trim(hpi(f.serializer,u.innerHTML)):"text"===i.format?f.dom.isEmpty(u)?"":ae(u.innerText||u.textContent):"tree"===i.format?f.serializer.serialize(u,i):(w=(p=f).serializer.serialize(u,i),e=oi(p),b=new RegExp("^(<"+e+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+e+">[\r\n]*|<br \\/>[\r\n]*)$"),w.replace(b,"")),i.content=dt(["text","tree"],i.format)||np(t.fromDom(u))?a:r.trim(a),(i.no_events?i:f.fire("GetContent",i)).content;var f,v,u,y,p,w,e,b,l,i,a});var o,s,h},setContent:function(n,t){return swi(i,n,t)},insertContent:function(n,t){return owi(i,n,t)},addVisual:function(n){var t,u=n,r=(t=i).dom,f=tt(u)?u:t.getBody();tr(t.hasVisual)&&(t.hasVisual=t.getParam("visual",!0,"boolean"));e(r.select("table,a",f),function(n){var i,u,e,f;switch(n.nodeName){case"TABLE":i=t.getParam("visual_table_class","mce-item-table","string");u=r.getAttrib(n,"border");u&&"0"!==u||!t.hasVisual?r.removeClass(n,i):r.addClass(n,i);break;case"A":r.getAttrib(n,"href")||(e=r.getAttrib(n,"name")||n.id,f=t.getParam("visual_anchor_class","mce-item-anchor","string"),e&&t.hasVisual?r.addClass(n,f):r.removeClass(n,f))}});t.fire("VisualAid",{element:u,hasVisual:t.hasVisual})}},selection:{getContent:function(r,u){return function(i,r,u){var v,k=(v=r,c(c({},u=void 0===u?{}:u),{format:v,get:!0,selection:!0})),f=i.fire("BeforeGetContent",k),o,s,y,h,p,w,b,e,a;return f.isDefaultPrevented()?(i.fire("GetContent",f),f.content):"text"===f.format?(e=i,n.from(e.selection.getRng()).map(function(t){var s=n.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),h=e.getBody(),c=s.map(function(n){return n.nodeName}).getOr("div").toLowerCase(),a=l.browser.isIE()&&"pre"!==c,f=e.dom.add(h,c,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents()),i=ati(f,a),o=ae(f.textContent),r,u;return(e.dom.remove(f),cb(o,0)||cb(o,o.length-1))?(r=ati(s.getOr(h),a),u=r.indexOf(i),-1===u?i:(cb(r,u-1)?" ":"")+i+(cb(r,u+i.length)?" ":"")):i}).getOr("")):(f.getInner=!0,a=(s=f,y=(o=i).selection.getRng(),h=o.dom.create("body"),p=o.selection.getSel(),w=tut(o,nrt(p)),(b=s.contextual?ibi(t.fromDom(o.getBody()),w).dom:y.cloneContents())&&h.appendChild(b),o.selection.serializer.serialize(h,s)),"tree"===f.format?a:(f.content=i.selection.isCollapsed()?"":a,i.fire("GetContent",f),f.content))}(i,r,u)}},raw:{getModel:function(){return n.none()}}}}function ne(n){return w(n.plugins,"rtc")}function ubi(t){var i=t;return at(t.plugins,"rtc").bind(function(t){return n.from(t.setup)}).fold(function(){return i.rtcInstance=wti(t),n.none()},function(t){var r,u;return i.rtcInstance=(r=f(null),u=f(""),{undoManager:{beforeChange:y,add:r,undo:r,redo:r,clear:y,reset:y,hasUndo:it,hasRedo:it,transact:r,ignore:y,extra:y},formatter:{match:it,matchAll:f([]),matchNode:f(void 0),canApply:it,closest:u,apply:y,remove:y,toggle:y,formatChanged:f({unbind:y})},editor:{getContent:u,setContent:u,insertContent:y,addVisual:y},selection:{getContent:u},raw:{getModel:f(n.none())}}),n.some(function(){return t().then(function(t){function e(n){return fh(n)?n:{}}return i.rtcInstance=(r=t.undoManager,u=t.formatter,f=t.editor,o=t.selection,s=t.raw,{undoManager:{beforeChange:r.beforeChange,add:r.add,undo:r.undo,redo:r.redo,clear:r.clear,reset:r.reset,hasUndo:r.hasUndo,hasRedo:r.hasRedo,transact:function(n,t,i){return r.transact(i)},ignore:function(n,t){return r.ignore(t)},extra:function(n,t,i,u){return r.extra(i,u)}},formatter:{match:function(n,t,i,r){return u.match(n,e(t),r)},matchAll:u.matchAll,matchNode:u.matchNode,canApply:function(n){return u.canApply(n)},closest:function(n){return u.closest(n)},apply:function(n,t){return u.apply(n,e(t))},remove:function(n,t){return u.remove(n,e(t))},toggle:function(n,t){return u.toggle(n,e(t))},formatChanged:function(n,t,i,r,f){return u.formatChanged(t,i,r,f)}},editor:{getContent:function(n){return f.getContent(n)},setContent:function(n,t){return f.setContent(n,t)},insertContent:function(n){return f.insertContent(n)},addVisual:f.addVisual},selection:{getContent:function(n,t){return o.getContent(t)}},raw:{getModel:function(){return n.some(s.getRawModel())}}}),t.rtc.isRemote;var r,u,f,o,s})})})}function ret(n){return n.rtcInstance||wti(n)}function ct(n){var t=n.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.");}function bti(t){return 0===t.dom.length?(ni(t),n.none()):n.some(t)}function kti(n,t,r,u){n.bind(function(n){return(u?aut:ub)(n.dom,u?n.dom.length:0),t.filter(gr).map(function(t){var o=r,f=u,e=n.dom,i=t.dom,s=(f?e:i).length;f?(vut(e,i,!1,!f),o.setStart(i,s)):(vut(i,e,!1,!f),o.setEnd(i,s))})}).orThunk(function(){var n=u;return t.filter(function(n){return iv.isBookmarkNode(n.dom)}).bind(n?bl:wo).or(t).filter(gr).map(function(n){var t,r=u;eu(t=n).each(function(n){var u=t.dom;r&&ib(n,i(u,0))?ub(u,0):!r&&rb(n,i(u,u.length))&&aut(u,u.length)})})})}function fbi(i,r,u){var h,s=(h=r,c(c({format:"html"},u=void 0===u?{}:u),{set:!0,selection:!0,content:h})),f=s,o,e;if(!s.no_events){if(o=i.fire("BeforeSetContent",s),o.isDefaultPrevented())return void i.fire("SetContent",o);f=o}f.content=function(n,t){if("raw"===t.format)return t.content;var r=n.selection.getRng(),i=n.dom.getParent(r.commonAncestorContainer,n.dom.isBlock),u=i?{context:i.nodeName.toLowerCase()}:{},f=n.parser.parse(t.content,c(c({isRootContent:!0,forced_root_block:!1},u),t));return gc({validate:n.validate},n.schema).serialize(f)}(i,f);e=i.selection.getRng();!function(i,r){var u=n.from(r.firstChild).map(t.fromDom),f=n.from(r.lastChild).map(t.fromDom),e,o;i.deleteContents();i.insertNode(r);e=u.bind(wo).filter(gr).bind(bti);o=f.bind(bl).filter(gr).bind(bti);kti(e,u,i,!0);kti(o,f,i,!1);i.collapse(!1)}(e,e.createContextualFragment(f.content));i.selection.setRng(e);fv(i,e);f.no_events||i.fire("SetContent",f)}function dti(n,t,i){var r;n&&w(n,t)&&(0===(r=p(n[t],function(n){return n!==i})).length?delete n[t]:n[t]=r)}function iii(n){return n.select}function rii(n){return n&&n.ownerDocument&&ee(t.fromDom(n.ownerDocument),t.fromDom(n))}function uii(t,u,f,o){function g(n,t){return fbi(o,n,t)}function nt(){var n=v(),u=null==n?void 0:n.anchorNode,f=null==n?void 0:n.focusNode,i,r;return!n||!u||!f||hy(u)||hy(f)?!0:(i=t.createRng(),i.setStart(u,n.anchorOffset),i.collapse(!0),r=t.createRng(),r.setStart(f,n.focusOffset),r.collapse(!0),i.compareBoundaryPoints(i.START_TO_START,r)<=0)}function it(n){var t=s();t.collapse(!!n);a(t)}function v(){return u.getSelection?u.getSelection():u.document.selection}function ft(n,t){return gt(t,function(t){return b.is(t,n)})}function et(n){return b.getParents(n,null,b.getRoot())}var y,p,b,k,h,c,rt=function(n,t){return h||(h={},c={},k.on("NodeChange",function(n){var i=n.element,t=et(i),u={};r.each(h,function(n,i){ft(i,t).each(function(r){c[i]||(e(n,function(n){n(!0,{node:r,selector:i,parents:t})}),c[i]=n);u[i]=n})});r.each(c,function(n,f){u[f]||(delete c[f],r.each(n,function(n){n(!1,{node:i,selector:f,parents:t})}))})})),h[n]||(h[n]=[]),h[n].push(t),ft(n,et(k.selection.getStart())).each(function(){c[n]=h[n]}),{unbind:function(){dti(h,n,t);dti(c,n,t)}}},s=function(){function s(n,t,i){try{return t.compareBoundaryPoints(n,i)}catch(n){return-1}}var i,n,f,r=u.document,e;if(void 0!==o.bookmark&&!1===ls(o)&&(e=grt(o),e.isSome()))return e.map(function(n){return tut(o,[n])[0]}).getOr(r.createRange());try{(i=v())&&!hy(i.anchorNode)&&(n=0<i.rangeCount?i.getRangeAt(0):(i.createRange?i:r).createRange(),n=tut(o,[n])[0])}catch(s){}return(n=n||(r.createRange?r.createRange():r.body.createTextRange())).setStart&&9===n.startContainer.nodeType&&n.collapsed&&(f=t.getRoot(),n.setStart(f,0),n.setEnd(f,0)),y&&p&&(0===s(n.START_TO_START,n,y)&&0===s(n.END_TO_END,n,y)?n=p:p=y=null),n},a=function(n,t){var r,u,f,i;if((u=n)&&(iii(u)||rii(u.startContainer)&&rii(u.endContainer)))if(f=iii(n)?n:null,f){p=null;try{f.select()}catch(n){}}else{if(i=v(),n=o.fire("SetSelectionRange",{range:n,forward:t}).range,i){p=n;try{i.removeAllRanges();i.addRange(n)}catch(n){}!1===t&&i.extend&&(i.collapse(n.endContainer,n.endOffset),i.extend(n.startContainer,n.startOffset));y=0<i.rangeCount?i.getRangeAt(0):null}n.collapsed||n.startContainer!==n.endContainer||!i.setBaseAndExtent||l.ie||n.endOffset-n.startOffset<2&&n.startContainer.hasChildNodes()&&(r=n.startContainer.childNodes[n.startOffset])&&"IMG"===r.tagName&&(i.setBaseAndExtent(n.startContainer,n.startOffset,n.endContainer,n.endOffset),i.anchorNode===n.startContainer&&i.focusNode===n.endContainer||i.setBaseAndExtent(r,0,r,1));o.fire("AfterSetSelectionRange",{range:n,forward:t})}},w={bookmarkManager:null,controlSelection:null,dom:b=t,win:u,serializer:f,editor:k=o,collapse:it,setCursorLocation:function(n,i){var r=t.createRng();tt(n)&&tt(i)?(r.setStart(n,i),r.setEnd(n,i),a(r),it(!1)):(irt(t,r,o.getBody(),!0),a(r))},getContent:function(n){return i=(t=void 0===(t=n)?{}:t).format||"html",r=t,ct(o).selection.getContent(i,r);var t,i,r},setContent:g,getBookmark:function(n,t){return d.getBookmark(n,t)},moveToBookmark:function(n){return d.moveToBookmark(n)},select:function(i,r){var u=t,f=r;return n.from(i).map(function(n){var i=u.nodeIndex(n),t=u.createRng();return t.setStart(n.parentNode,i),t.setEnd(n.parentNode,i+1),f&&(irt(u,t,n,!0),irt(u,t,n,!1)),t}).each(a),i},isCollapsed:function(){var n=s(),t=v();return!(!n||n.item)&&(n.compareEndPoints?0===n.compareEndPoints("StartToEnd",n):!t||n.collapsed)},isForward:nt,setNode:function(n){return g(t.getOuterHTML(n)),n},getNode:function(){return function(n,t){if(!t)return n;var i=t.startContainer,r=t.endContainer,f=t.startOffset,e=t.endOffset,u=t.commonAncestorContainer;return!t.collapsed&&(i===r&&e-f<2&&i.hasChildNodes()&&(u=i.childNodes[f]),3===i.nodeType&&3===r.nodeType&&(i=i.length===f?kkt(i.nextSibling,!0):i.parentNode,r=0===e?kkt(r.previousSibling,!1):r.parentNode,i&&i===r))?i:u&&3===u.nodeType?u.parentNode:u}(o.getBody(),s())},getSel:v,setRng:a,getRng:s,getStart:function(n){return wkt(o.getBody(),s(),n)},getEnd:function(n){return bkt(o.getBody(),s(),n)},getSelectedBlocks:function(n,i){return function(n,t,i,r){var f=[],u=n.getRoot(),e,o;if(i=n.getParent(i||wkt(u,t,t.collapsed),n.isBlock),r=n.getParent(r||bkt(u,t,t.collapsed),n.isBlock),i&&i!==u&&f.push(i),i&&r&&i!==r)for(o=new yt(i,u);(e=o.next())&&e!==r;)n.isBlock(e)&&f.push(e);return r&&i!==r&&r!==u&&f.push(r),f}(t,s(),n,i)},normalize:function(){var n=s(),i;return 1<nrt(v()).length||!hw(o)?n:(i=aw(t,n),i.each(function(n){a(n,nt())}),i.getOr(n))},selectorChanged:function(n,t){return rt(n,t),w},selectorChangedWithUnbind:rt,getScrollContainer:function(){for(var i,n=t.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){i=n;break}n=n.parentNode}return i},scrollIntoView:function(n,t){tt(n)?(o.inline?ayi:yyi)(o,n,t):fv(o,s(),t)},placeCaretAt:function(n,t){return a(art(n,t,o.getDoc()))},getBoundingClientRect:function(){var n=s();return n.collapsed?i.fromRangeStart(n).getClientRects()[0]:n.getBoundingClientRect()},destroy:function(){u=y=p=null;ut.destroy()}},d=iv(w),ut=ybt(w,o);return w.bookmarkManager=d,w.controlSelection=ut,w}function sbi(n,t){var i,f,u,o,s=yn();t.convert_fonts_to_spans&&(f=n,u=s,o=r.explode(t.font_size_legacy_values),f.addNodeFilter("font",function(n){e(n,function(n){var i,t=u.parse(n.attr("style")),r=n.attr("color"),f=n.attr("face"),s=n.attr("size");r&&(t.color=r);f&&(t["font-family"]=f);s&&(t["font-size"]=o[parseInt(n.attr("size"),10)-1]);n.name="span";n.attr("style",u.serialize(t));i=n;e(["color","face","size"],function(n){i.attr(n,null)})})}));i=s;n.addNodeFilter("strike",function(n){e(n,function(n){var t=i.parse(n.attr("style"));t["text-decoration"]="line-through";n.name="span";n.attr("style",i.serialize(t))})})}function set(n){var t,i=decodeURIComponent(n).split(","),r=/data:([^;]+)/.exec(i[0]);return{type:t=r?r[1]:t,data:i[1]}}function fii(t,i){var f,u,r;try{f=atob(i)}catch(t){return n.none()}for(u=new Uint8Array(f.length),r=0;r<u.length;r++)u[r]=f.charCodeAt(r);return n.some(new Blob([u],{type:t}))}function eii(n){return 0===n.indexOf("blob:")?(t=n,new ri(function(n,i){function u(){i("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")}try{var r=new XMLHttpRequest;r.open("GET",t,!0);r.responseType="blob";r.onload=function(){200===r.status?n(r.response):u()};r.onerror=u;r.send()}catch(n){u()}})):0===n.indexOf("data:")?(i=n,new ri(function(n){var t=set(i);fii(t.type,t.data).fold(function(){return n(new Blob([]))},n)})):null;var t,i}function het(n){return(n||"blobid")+wbi++}function hbi(n,t){var i={};return{findAll:function(r,u){u=u||lt;var f=ut(p(r?bu(r.getElementsByTagName("img")):[],function(t){var i=t.src;return l.fileApi&&!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&i&&i!==l.transparentSrc&&(0===i.indexOf("blob:")?!n.isUploaded(i)&&u(t):0===i.indexOf("data:")&&u(t))}),function(n){if(void 0!==i[n.src])return new ri(function(t){i[n.src].then(function(i){return"string"==typeof i?i:void t({image:n,blobInfo:i.blobInfo})})});var r=new ri(function(i,r){var e,f,o,h,c,l,a,s,u;e=t;o=i;h=r;0!==(f=n).src.indexOf("blob:")?(l=(c=set(f.src)).data,a=c.type,s=l,(u=e.getByData(s,a))?o({image:f,blobInfo:u}):eii(f.src).then(function(n){u=e.create(het(),n,s);e.add(u);o({image:f,blobInfo:u})},function(n){h(n)})):(u=e.getByUri(f.src))?o({image:f,blobInfo:u}):eii(f.src).then(function(n){var t=n;new ri(function(n){var i=new FileReader;i.onloadend=function(){n(i.result)};i.readAsDataURL(t)}).then(function(t){s=set(t).data;u=e.create(het(),n,s);e.add(u);o({image:f,blobInfo:u})})},function(n){h(n)})}).then(function(n){return delete i[n.image.src],n}).catch(function(t){return delete i[n.src],t});return i[n.src]=r});return ri.all(f)}}}function oii(n,t,i,r){(n.padd_empty_with_br||t.insert)&&i[r.name]?r.empty().append(new ru("br",1)).shortEnded=!0:r.empty().append(new ru("#text",3)).value=ir}function hv(n,t,i,r){return r.isEmpty(t,i,function(t){return(i=n.getElementRule(t.name))&&i.paddEmpty;var i})}function cbi(t,i){function h(t){var r,i,u=t.attr("src");(r=t).attr("src")===l.transparentSrc||tt(r.attr("data-mce-placeholder"))||tt(t.attr("data-mce-bogus"))||((i=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(u))?n.some({type:i[1],data:decodeURIComponent(i[2])}):n.none()).filter(function(){return function(n,t){if(t.images_dataimg_filter){var i=new Image;return i.src=n.attr("src"),et(n.attributes.map,function(n,t){i.setAttribute(t,n)}),t.images_dataimg_filter(i)}return!0}(t,s)}).bind(function(t){var r=t.type,i=t.data;return n.from(f.getByData(i,r)).orThunk(function(){return fii(r,i).map(function(n){var t=f.create(het(),n,i);return f.add(t),t})})}).each(function(n){t.attr("src",n.blobUri())})}var o,s,f,u=t.schema;i.remove_trailing_brs&&t.addNodeFilter("br",function(n,t,f){var c,o,e,h,s,v,a,y,p=n.length,l=r.extend({},u.getBlockElements()),w=u.getNonEmptyElements(),b=u.getWhiteSpaceElements();for(l.body=1,c=0;c<p;c++)if(e=(o=n[c]).parent,l[o.parent.name]&&o===e.lastChild){for(s=o.prev;s;){if("span"!==(v=s.name)||"bookmark"!==s.attr("data-mce-type")){"br"===v&&(o=null);break}s=s.prev}o&&(o.remove(),hv(u,w,b,e)&&(a=u.getElementRule(e.name))&&(a.removeEmpty?e.remove():a.paddEmpty&&oii(i,f,l,e)))}else{for(h=o;e&&e.firstChild===h&&e.lastChild===h&&!l[(h=e).name];)e=e.parent;h===e&&!0!==i.padd_empty_with_br&&((y=new ru("#text",3)).value=ir,o.replace(y))}});t.addAttributeFilter("href",function(n){var f,t,e=n.length,u;if(!i.allow_unsafe_link_target)for(;e--;)u=n[e],"a"===u.name&&"_blank"===u.attr("target")&&u.attr("rel",(t=void 0,t=(f=u.attr("rel"))?r.trim(f):"",/\b(noopener)\b/g.test(t)?t:t.split(" ").filter(function(n){return 0<n.length}).concat(["noopener"]).sort().join(" ")))});i.allow_html_in_named_anchor||t.addAttributeFilter("id,name",function(n){for(var i,r,u,t,f=n.length;f--;)if("a"===(t=n[f]).name&&t.firstChild&&!t.attr("href"))for(u=t.parent,i=t.lastChild;r=i.prev,u.insert(i,t),i=r;);});i.fix_list_elements&&t.addNodeFilter("ul,ol",function(n){for(var i,t,r,u=n.length;u--;)"ul"!==(r=(t=n[u]).parent).name&&"ol"!==r.name||(t.prev&&"li"===t.prev.name?t.prev.append(t):((i=new ru("li",1)).attr("style","list-style-type: none"),t.wrap(i)))});i.validate&&u.getValidClasses()&&t.addAttributeFilter("class",function(n){for(var f=u.getValidClasses(),e=n.length;e--;){for(var o=n[e],c=o.attr("class").split(" "),t="",s=0;s<c.length;s++){var h=c[s],r=!1,i=f["*"];i&&i[h]&&(r=!0);i=f[o.name];(r=!(r||!i||!i[h])||r)&&(t&&(t+=" "),t+=h)}t.length||(t=null);o.attr("class",t)}});o=t;(f=(s=i).blob_cache)&&o.addAttributeFilter("src",function(n){return e(n,h)})}function cet(n,t){function e(n){var o=n.name,s,t,e;for((o in r)&&((t=u[o])?t.push(n):u[o]=[n]),s=i.length;s--;)e=i[s].name,e in n.attributes.map&&((t=f[e])?t.push(n):f[e]=[n]);return n}var o;void 0===t&&(t=le());var r={},i=[],u={},f={};return(n=n||{}).validate=!("validate"in n)||n.validate,n.root_name=n.root_name||"body",o={schema:t,addAttributeFilter:function(n,t){bii(kii(n),function(n){for(var r=0;r<i.length;r++)if(i[r].name===n)return void i[r].callbacks.push(t);i.push({name:n,callbacks:[t]})})},getAttributeFilters:function(){return[].concat(i)},addNodeFilter:function(n,t){bii(kii(n),function(n){var i=r[n];i||(r[n]=i=[]);i.push(t)})},getNodeFilters:function(){var n,t=[];for(n in r)w(r,n)&&t.push({name:n,callbacks:r[n]});return t},filterNode:e,parse:function(o,s){function rt(n){for(var u,r,e,f=t.getBlockElements(),i=n.prev;i&&3===i.type;){if(u=i.value.replace(ot,""),0<u.length)return i.value=u,0;if(r=i.next,r){if(3===r.type&&r.value.length){i=i.prev;continue}if(!f[r.name]&&"script"!==r.name&&"style"!==r.name){i=i.prev;continue}}e=i.prev;i.remove();i=e}}function y(n,t){var f,i=new ru(n,t);return n in r&&((f=u[n])?f.push(i):u[n]=[i]),i}var a,v,nt,c,st,l,d,h,it=[];s=s||{};u={};f={};var p=bbi(wii("script,style,head,html,body,title,meta,param"),t.getBlockElements()),ht=t.getNonEmptyElements(),ct=t.children,tt=n.validate,ut=("forced_root_block"in s?s:n).forced_root_block,ft=!1===ut?"":!0===ut?"p":ut,b=t.getWhiteSpaceElements(),et=/^[ \t\r\n]+/,ot=/[ \t\r\n]+$/,at=/[ \t\r\n]+/g,lt=/^[ \t\r\n]+$/,k=w(b,s.context)||w(b,n.root_name),vt=gw({validate:tt,document:n.document,allow_html_data_urls:n.allow_html_data_urls,allow_svg_data_urls:n.allow_svg_data_urls,allow_script_urls:n.allow_script_urls,allow_conditional_comments:n.allow_conditional_comments,preserve_cdata:n.preserve_cdata,self_closing_elements:function(n){var t,i={};for(t in n)"li"!==t&&"p"!==t&&(i[t]=n[t]);return i}(t.getSelfClosingElements()),cdata:function(n){h.append(y("#cdata",4)).value=n},text:function(n,t){var r,i;k||(n=n.replace(at," "),(i=h.lastChild)&&(w(p,i.name)||"br"===i.name)&&(n=n.replace(et,"")));0!==n.length&&((r=y("#text",3)).raw=!!t,h.append(r).value=n)},comment:function(n){h.append(y("#comment",8)).value=n},pi:function(n,t){h.append(y(n,7)).value=t;rt(h)},doctype:function(n){h.append(y("#doctype",10)).value=n;rt(h)},start:function(n,r,u){var a=tt?t.getElementRule(n):{},e,s,c,o;if(a){for(e=y(a.outputName||n,1),e.attributes=r,e.shortEnded=u,h.append(e),s=ct[h.name],s&&ct[e.name]&&!s[e.name]&&it.push(e),c=i.length;c--;)o=i[c].name,o in r.map&&((l=f[o])?l.push(e):f[o]=[e]);p[n]&&rt(e);u||(h=e);!k&&b[n]&&(k=!0)}},end:function(i){var r,u,f,o,c,e=tt?t.getElementRule(i):{};if(e){if(p[i]&&!k){if((r=h.firstChild)&&3===r.type)if(0<(u=r.value.replace(et,"")).length)r.value=u,r=r.next;else for(f=r.next,r.remove(),r=f;r&&3===r.type;)u=r.value,f=r.next,0!==u.length&&!lt.test(u)||(r.remove(),r=f),r=f;if((r=h.lastChild)&&3===r.type)if(0<(u=r.value.replace(ot,"")).length)r.value=u,r=r.prev;else for(f=r.prev,r.remove(),r=f;r&&3===r.type;)u=r.value,f=r.prev,0!==u.length&&!lt.test(u)||(r.remove(),r=f),r=f}if(k&&b[i]&&(k=!1),e.removeEmpty&&hv(t,ht,b,h))return o=h.parent,p[h.name]?h.empty().remove():h.unwrap(),void(h=o);e.paddEmpty&&(pii(c=h,"#text")&&c.firstChild.value===ir||hv(t,ht,b,h))&&oii(n,s,p,h);h=h.parent}}},t),g=h=new ru(s.context||n.root_name,11);if(vt.parse(o,s.format),tt&&it.length&&(s.context?s.invalid=!0:function(n){for(var r,f,u,c,o,s,b,k=wii("tr,td,th,tbody,thead,tfoot,table"),y=t.getNonEmptyElements(),p=t.getWhiteSpaceElements(),w=t.getTextBlockElements(),d=t.getSpecialElements(),a=function(n,i){var r,u,f;if(void 0===i&&(i=n.parent),d[n.name])n.empty().remove();else{for(r=0,u=n.children();r<u.length;r++)f=u[r],t.isValidChild(i.name,f.name)||a(f,i);n.unwrap()}},v=0;v<n.length;v++){var l,i=n[v],u=void 0,h=void 0;if(i.parent&&!i.fixed)if(w[i.name]&&"li"===i.parent.name){for(r=i.next;r&&w[r.name];)r.name="li",r.fixed=!0,i.parent.insert(r,i.parent),r=r.next;i.unwrap()}else{for(f=[i],u=i.parent;u&&!t.isValidChild(u.name,i.name)&&!k[u.name];u=u.parent)f.push(u);if(u&&1<f.length)if(t.isValidChild(u.name,i.name)){for(f.reverse(),c=l=e(f[0].clone()),o=0;o<f.length-1;o++){for(t.isValidChild(c.name,f[o].name)?(h=e(f[o].clone()),c.append(h)):h=c,s=f[o].firstChild;s&&s!==f[o+1];)b=s.next,h.append(s),s=b;c=h}hv(t,y,p,l)?u.insert(i,f[0],!0):(u.insert(l,f[0],!0),u.insert(i,l));u=f[0];(hv(t,y,p,u)||pii(u,"br"))&&u.empty().remove()}else a(i);else i.parent&&("li"!==i.name?t.isValidChild(i.parent.name,"div")&&t.isValidChild("div",i.name)?i.wrap(e(new ru("div",1))):a(i):!(r=i.prev)||"ul"!==r.name&&"ol"!==r.name?!(r=i.next)||"ul"!==r.name&&"ol"!==r.name?i.wrap(e(new ru("ul",1))):r.insert(i,r.firstChild,!0):r.append(i))}}}(it)),ft&&("body"===g.name||s.isRootContent)&&function(){function u(n){n&&((i=n.firstChild)&&3===i.type&&(i.value=i.value.replace(et,"")),(i=n.lastChild)&&3===i.type&&(i.value=i.value.replace(ot,"")))}var i=g.firstChild,r=null,f;if(t.isValidChild(g.name,ft.toLowerCase())){for(;i;)f=i.next,3===i.type||1===i.type&&"p"!==i.name&&!p[i.name]&&!i.attr("data-mce-type")?(r||((r=y(ft,1)).attr(n.forced_root_block_attrs),g.insert(r,i)),r.append(i)):(u(r),r=null),i=f;u(r)}}(),!s.invalid){for(d in u)if(w(u,d)){for(l=r[d],c=(a=u[d]).length;c--;)a[c].parent||a.splice(c,1);for(v=0,nt=l.length;v<nt;v++)l[v](a,d,s)}for(v=0,nt=i.length;v<nt;v++)if((l=i[v]).name in f){for(c=(a=f[l.name]).length;c--;)a[c].parent||a.splice(c,1);for(c=0,st=l.callbacks.length;c<st;c++)l.callbacks[c](a,l.name,s)}}return g}},cbi(o,n),n.inline_styles&&sbi(o,n),o}function lbi(n,t,i){-1===r.inArray(t,i)&&(n.addAttributeFilter(i,function(n,t){for(var i=n.length;i--;)n[i].attr(t,null)}),t.push(i))}function abi(i,o){var y=["data-mce-selected"],p=o&&o.dom?o.dom:d.DOM,l=o&&o.schema?o.schema:le(i);i.entity_encoding=i.entity_encoding||"named";i.remove_trailing_brs=!("remove_trailing_brs"in i)||i.remove_trailing_brs;var s,h=cet(i,l),a=i,v=p;return(s=h).addAttributeFilter("data-mce-tabindex",function(n,t){for(var i,r=n.length;r--;)i=n[r],i.attr("tabindex",i.attr("data-mce-tabindex")),i.attr(t,null)}),s.addAttributeFilter("src,href,style",function(n,t){for(var r,i,u="data-mce-"+t,f=a.url_converter,o=a.url_converter_scope,e=n.length;e--;)r=n[e],i=r.attr(u),void 0!==i?(r.attr(t,0<i.length?i:null),r.attr(u,null)):(i=r.attr(t),"style"===t?i=v.serializeStyle(v.parseStyle(i),r.name):f&&(i=f.call(o,i,t,r.name)),r.attr(t,0<i.length?i:null))}),s.addAttributeFilter("class",function(n){for(var r,t,i=n.length;i--;)t=n[i],t.attr("class")&&(r=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<r.length?r:null))}),s.addAttributeFilter("data-mce-type",function(t,i,r){for(var u,f=t.length;f--;)u=t[f],"bookmark"!==u.attr("data-mce-type")||r.cleanup||(n.from(u.firstChild).exists(function(n){return!tp(n.value)})?u.unwrap():u.remove())}),s.addNodeFilter("noscript",function(n){for(var t,i=n.length;i--;)t=n[i].firstChild,t&&(t.value=ve.decode(t.value))}),s.addNodeFilter("script,style",function(n,t){for(var e,i,r,u=function(n){return n.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},f=n.length;f--;)i=n[f],r=i.firstChild?i.firstChild.value:"","script"===t?((e=i.attr("type"))&&i.attr("type","mce-no/type"===e?null:e.replace(/^mce\-/,"")),"xhtml"===a.element_format&&0<r.length&&(i.firstChild.value="// <![CDATA[\n"+u(r)+"\n// ]\]>")):"xhtml"===a.element_format&&0<r.length&&(i.firstChild.value="<!--\n"+u(r)+"\n-->")}),s.addNodeFilter("#comment",function(n){for(var t,i=n.length;i--;)t=n[i],a.preserve_cdata&&0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=v.decode(t.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),s.addNodeFilter("xml:namespace,input",function(n,t){for(var i,r=n.length;r--;)i=n[r],7===i.type?i.remove():1===i.type&&("input"!==t||i.attr("type")||i.attr("type","text"))}),s.addAttributeFilter("data-mce-type",function(n){e(n,function(n){"format-caret"===n.attr("data-mce-type")&&(n.isEmpty(s.schema.getNonEmptyElements())?n.remove():n.unwrap())})}),s.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",function(n,t){for(var i=n.length;i--;)n[i].attr(t,null)}),{schema:l,addNodeFilter:h.addNodeFilter,addAttributeFilter:h.addAttributeFilter,serialize:function(n,u){function gt(n){return n&&"br"===n.name}var a,ut,y,ft,et,w,ot,b,st,k,d,g,ht,ct,lt,nt,e,at,vt,v,f,yt,pt,tt,it,wt,bt,kt,rt,s=c({format:"html"},u=void 0===u?{}:u),ni=(a=(g=n,pt=ht=s,(d=o)&&d.hasEventListeners("PreProcess")&&!pt.no_events?(lt=ht,v=(ct=d).dom,f=g.cloneNode(!0),(yt=document.implementation).createHTMLDocument&&(e=yt.createHTMLDocument(""),r.each("BODY"===f.nodeName?f.childNodes:[f],function(n){e.body.appendChild(e.importNode(n,!0))}),f="BODY"!==f.nodeName?e.body.firstChild:e.body,nt=v.doc,v.doc=e),at=ct,vt=c(c({},lt),{node:f}),at.fire("PreProcess",vt),nt&&(v.doc=nt),f):g),y=ae((ut=s).getInner?a.innerHTML:p.getOuterHTML(a)),ut.selection||np(t.fromDom(a))?y:r.trim(y)),dt=(ft=h,et=ni,ot=(w=s).selection?c({forced_root_block:!1},w):w,b=ft.parse(et,ot),!gt(k=b.lastChild)||gt(st=k.prev)&&(k.remove(),st.remove()),b);return"tree"===s.format?dt:(tt=o,it=s,wt=dt,rt=gc(i,l).serialize(wt),it.no_events||!tt?rt:(bt=tt,kt=c(c({},it),{content:rt}),bt.fire("PostProcess",kt).content))},addRules:l.addValidElements,setRules:l.setValidElements,addTempAttr:u(lbi,h,y),getTempAttrs:f(y),getNodeFilters:h.getNodeFilters,getAttributeFilters:h.getAttributeFilters}}function sii(n,t){var i=abi(n,t);return{schema:i.schema,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:i.serialize,addRules:i.addRules,setRules:i.setRules,addTempAttr:i.addTempAttr,getTempAttrs:i.getTempAttrs,getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}}function aet(n,t,i){return r=i=void 0===i?{}:i,ret(n).editor.setContent(t,r);var r}function yb(t){return n.from(t).each(function(n){return n.destroy()})}function vbi(n,t){function b(n){return w(h,n)}var i,u,f,e,o,s,h,c=(i=n,u=p(kbi,function(n){return w(i,n)}),!1!==(f=i.forced_root_block)&&""!==f||u.push("forced_root_block (false only)"),tg(u)),l=(h=r.makeMap(t.plugins," "),tg(fe(fe([],p(dbi,b),!0),oh(gbi,function(n){return b(n)?[n+" (moving to premium)"]:[]}),!0))),a=0<l.length,v=0<c.length,y="mobile"===t.theme;(a||v||y)&&(e=y?"\n\nThemes:\n- mobile":"",o=a?"\n\nPlugins:\n- "+l.join("\n- "):"",s=v?"\n\nSettings:\n- "+c.join("\n- "):"",console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+e+o+s))}function cv(n){var t=br(n)?n.join(" "):n;return p(ut(ht(t)?t.split(" "):[],cg),function(n){return 0<n.length})}function pb(n,t){return w(n.sections(),t)}function hii(n,t){return at(n,"toolbar_mode").orThunk(function(){return at(n,"toolbar_drawer").map(function(n){return!1===n?"wrap":n})}).getOr(t)}function ybi(n,t,i,f){var s,h,c,e,a,o,v,y,d=cv(i.forced_plugins),w=cv(f.plugins),b=pb(s=t,"mobile")?s.sections().mobile:{},g=b.plugins?cv(b.plugins):w,k=(h=(e=t,a=w,o=g,(c=n)&&(y=(v=e).sections(),pb(v,"mobile")&&"mobile"===y.mobile.theme)?p(o,u(dt,iki)):c&&pb(e,"mobile")?o:a),[].concat(cv(d)).concat(cv(h)));if(l.browser.isIE()&&dt(k,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return r.extend(f,{plugins:k.join(" ")})}function pbi(n,t,i,u,e){var l,a,s,h,v,y,p,w,b=n?{mobile:(l=t,a={resize:!1,toolbar_mode:hii(e.mobile||{},"scrolling"),toolbar_sticky:!1},c(c(c({},nri),a),l?{menubar:!1}:{}))}:{},o=(v=["mobile"],iht(dii(b,e),function(n,t){return dt(v,t)},rg(y={}),rg(p={})),{sections:f((w={t:y,f:p}).t),settings:f(w.f)}),k=r.extend(i,u,o.settings(),n&&pb(o,"mobile")?function(n){void 0===n&&(n={});var t=at(o.sections(),"mobile").getOr({});return r.extend({},n,t)}():{},{validate:!0,external_plugins:(s=u,h=o.settings().external_plugins||{},s&&s.external_plugins?r.extend({},s.external_plugins,h):h)});return ybi(n,o,u,k)}function ys(t,i,r){return n.from(i.settings[r]).filter(t)}function cii(n,t){return t.dom[n]}function lii(n,t){return parseInt(wf(t,n),10)}function aii(n,i,r){var f,u,o,s,e,h,c=t.fromDom(n.getBody()),l=n.inline?c:t.fromDom(ah(c).dom.documentElement),a=(f=n.inline,o=i,s=r,e=(u=l).dom.getBoundingClientRect(),{x:o-(f?e.left+u.dom.clientLeft+eki(u):0),y:s-(f?e.top+u.dom.clientTop+fki(u):0)}),v=a.x,y=a.y,p=rki(h=l),w=uki(h);return 0<=v&&0<=y&&v<=p&&y<=w}function vii(i){function u(){function n(){throw new Error("Theme did not provide a NotificationManager implementation.");}var t=i.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:n,close:n,reposition:n,getArgs:n}}function h(){return n.from(r[0])}function o(){0<r.length&&u().reposition(r)}function l(n){ty(r,function(t){return t===n}).each(function(n){r.splice(n,1)})}function a(f,e){if(void 0===e&&(e=!0),!i.removed&&(a=(s=i).inline?s.getBody():s.getContentAreaContainer(),n.from(a).map(t.fromDom).map(na).getOr(!1)))return e&&i.fire("BeforeOpenNotification",{notification:f}),gt(r,function(n){return!((t=u().getArgs(n)).type!==f.type||t.text!==f.text||t.progressBar||t.timeout||f.progressBar||f.timeout);var t}).getOrThunk(function(){i.editorManager.setActive(i);var n=u().open(f,function(){l(n);o();h().fold(function(){return i.focus()},function(n){return t.fromDom(n.getEl()).dom.focus()})});return r.push(n),o(),i.fire("OpenNotification",{notification:c({},n)}),n});var s,a}var s,r=[],v=f(r);return(s=i).on("SkinLoaded",function(){var n=s.getParam("service_message");n&&a({text:n,type:"warning",timeout:0},!1);o()}),s.on("show ResizeEditor ResizeWindow NodeChange",function(){ui.requestAnimationFrame(o)}),s.on("remove",function(){e(r.slice(),function(n){u().close(n)})}),{open:a,close:function(){h().each(function(n){u().close(n);l(n);o()})},getNotifications:v}}function tri(t){function i(){function n(){throw new Error("Theme did not provide a WindowManager implementation.");}var i=t.theme;return i&&i.getWindowManagerImpl?i.getWindowManagerImpl():{open:n,openUrl:n,alert:n,confirm:n,close:n,getParams:n,setParams:n}}function f(n,t){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t)return t.apply(n,r)}}function u(n){t.fire("CloseWindow",{dialog:n});0===(r=p(r,function(t){return t!==n})).length&&t.focus()}function o(n){t.editorManager.setActive(t);ww(t);var i,u=n();return i=u,r.push(i),t.fire("OpenWindow",{dialog:i}),u}var r=[];return t.on("remove",function(){e(r,function(n){i().close(n)})}),{open:function(n,t){return o(function(){return i().open(n,t,u)})},openUrl:function(n){return o(function(){return i().openUrl(n,u)})},alert:function(n,t,r){var u=i();u.alert(n,f(r||u,t))},confirm:function(n,t,r){var u=i();u.confirm(n,f(r||u,t))},close:function(){n.from(r[r.length-1]).each(function(n){i().close(n);u(n)})}}}function iri(n,t){n.notificationManager.open({type:"error",text:t})}function db(n,t){n._skinLoaded?iri(n,t):n.on("SkinLoaded",function(){iri(n,t)})}function yet(n,t,i){abt(n,t,{message:i});console.error(i)}function pet(n,t,i){return i?"Failed to load "+n+": "+i+" from url "+t:"Failed to load "+n+" url: "+t}function wet(n,t,i){yet(n,"PluginLoadError",pet("plugin",t,i))}function oki(n){var i,t;n.contentCSS=n.contentCSS.concat(yui(n,(t=(i=n).getParam("content_css"),ht(t)?ut(t.split(","),cg):br(t)?t:!1===t||i.inline?[]:["default"])),yui(n,rpt(n)))}function rri(){function i(n,t){return{status:n,resultUri:t}}function t(t){return t in n}var n={};return{hasBlobUri:t,getResultUri:function(t){var i=n[t];return i?i.resultUri:null},isPending:function(i){return!!t(i)&&1===n[i].status},isUploaded:function(i){return!!t(i)&&2===n[i].status},markPending:function(t){n[t]=i(1,null)},markUploaded:function(t,r){n[t]=i(2,r)},removeFailed:function(t){delete n[t]},destroy:function(){n={}}}}function uri(n){function t(){return Math.round(4294967295*Math.random()).toString(36)}return n+hdi+++("s"+(new Date).getTime().toString(36)+t()+t()+t())}function ski(){function t(t){return gt(n,t).getOrUndefined()}function i(n){if(!n.blob||!n.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var i=n.id||uri("blobid"),r=n.name||i,t=n.blob;return{id:f(i),name:f(r),filename:f(n.filename||r+"."+({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[t.type.toLowerCase()]||"dat")),blob:f(t),base64:f(n.base64),blobUri:f(n.blobUri||URL.createObjectURL(t)),uri:f(n.uri)}}function r(n){return t(function(t){return t.id()===n})}var n=[];return{create:function(n,t,r,u,f){if(ht(n))return i({id:n,name:u,filename:f,blob:t,base64:r});if(fh(n))return i(n);throw new Error("Unknown input type");},add:function(t){r(t.id())||n.push(t)},get:r,getByUri:function(n){return t(function(t){return t.blobUri()===n})},getByData:function(n,i){return t(function(t){return t.base64()===n&&t.blob().type===i})},findFirst:t,removeByUri:function(t){n=p(n,function(n){return n.blobUri()!==t||void URL.revokeObjectURL(n.blobUri())})},destroy:function(){e(n,function(n){URL.revokeObjectURL(n.blobUri())});n=[]}}}function hki(t,i){function e(n,t,r,u){var f=new XMLHttpRequest,e;f.open("POST",i.url);f.withCredentials=i.credentials;f.upload.onprogress=function(n){u(n.loaded/n.total*100)};f.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+f.status)};f.onload=function(){var n,u,e;f.status<200||300<=f.status?r("HTTP Error: "+f.status):(n=JSON.parse(f.responseText))&&"string"==typeof n.location?t((u=i.basePath,e=n.location,u?u.replace(/\/$/,"")+"/"+e.replace(/^\//,""):e)):r("Invalid JSON: "+f.responseText)};e=new FormData;e.append("file",n.blob(),n.filename());f.send(e)}function o(n,t){return{url:t,blobInfo:n,status:!0}}function f(n,t,i){return{url:"",blobInfo:n,status:!1,error:{message:t,options:i}}}function s(n,t){r.each(u[n],function(n){n(t)});delete u[n]}var u={};return!1===ft(i.handler)&&(i.handler=e),{upload:function(h,c){return i.url||i.handler!==e?(l=h,a=c,l=r.grep(h,function(n){return!t.isUploaded(n.blobUri())}),ri.all(r.map(l,function(r){return t.isPending(r.blobUri())?(h=r.blobUri(),new ri(function(n){u[h]=u[h]||[];u[h].push(n)})):(e=r,c=i.handler,l=a,t.markPending(e.blobUri()),new ri(function(i){var r,u;try{u=function(){r&&r.close()};c(e,function(n){u();t.markUploaded(e.blobUri(),n);s(e.blobUri(),o(e,n));i(o(e,n))},function(n,r){var o=r||{};u();t.removeFailed(e.blobUri());s(e.blobUri(),f(e,n,o));i(f(e,n,o))},function(t){t<0||100<t||n.from(r).orThunk(function(){return n.from(l).map(yhi)}).each(function(n){(r=n).progressBar.value(t)})})}catch(h){i(f(e,h.message,{}))}}));var e,c,l,h}))):new ri(function(n){n([])});var l,a}}}function fri(n){return function(){return n.notificationManager.open({text:n.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}}function eri(n,t){return hki(t,{url:n.getParam("images_upload_url","","string"),basePath:n.getParam("images_upload_base_path","","string"),credentials:n.getParam("images_upload_credentials",!1,"boolean"),handler:n.getParam("images_upload_handler",null,"function")})}function cki(n){function f(t){return function(i){return n.selection?t(i):[]}}function v(n,t,i){for(var r=0;-1!==(r=n.indexOf(t,r))&&(n=n.substring(0,r)+i+n.substr(r+t.length),r+=i.length-t.length+1),-1!==r;);return n}function y(n,t,i){return n=v(n,'src="'+t+'"','src="'+i+'"'+(i===l.transparentSrc?' data-mce-placeholder="1"':"")),v(n,'data-mce-src="'+t+'"','data-mce-src="'+i+'"')}function o(t,i){e(n.undoManager.data,function(n){"fragmented"===n.type?n.fragments=ut(n.fragments,function(n){return y(n,t,i)}):n.content=y(n.content,t,i)})}function w(u){return r=r||eri(n,i),a().then(f(function(i){var s=ut(i,function(n){return n.blobInfo});return r.upload(s,fri(n)).then(f(function(r){var f=[],s=ut(r,function(r,u){var c,h,e,a,v=i[u].blobInfo,s=i[u].image;return r.status&&n.getParam("images_replace_blob_uris",!0,"boolean")?(t.removeByUri(s.src),ne(n)||(h=s,e=r.url,a=n.convertURL(e,"src"),o(h.src,e),n.$(h).attr({src:n.getParam("images_reuse_filename",!1,"boolean")?e+(-1===e.indexOf("?")?"?":"&")+(new Date).getTime():e,"data-mce-src":a}))):r.error&&(r.error.options.remove&&(o(s.getAttribute("src"),l.transparentSrc),f.push(s)),c=r.error.message,db(n,lu.translate(["Failed to upload image: {0}",c]))),{element:s,status:r.status,uploadUri:r.url,blobInfo:v}});return 0<s.length&&nt.fireIfChanged(),0<f.length&&(ne(n)?console.error("Removing images on failed uploads is currently unsupported for RTC"):n.undoManager.transact(function(){e(f,function(i){n.dom.remove(i);t.removeByUri(i.src)})})),u&&u(s),s}))}))}function b(t){if(dyt(n))return w(t)}function g(t){return!1!==al(d,function(n){return n(t)})&&(0!==t.getAttribute("src").indexOf("data:")||n.getParam("images_dataimg_filter",lt,"function")(t))}function k(r){return r.replace(/src="(blob:[^"]+)"/g,function(r,u){var e=i.getResultUri(u),f;return e?'src="'+e+'"':(f=(f=t.getByUri(u))||fu(n.editorManager.get(),function(n,t){return n||t.editorUpload&&t.editorUpload.blobCache.getByUri(u)},null),f?'src="data:'+f.blob().type+";base64,"+f.base64()+'"':r)})}var r,s,u,h,t=ski(),i=rri(),d=[],nt=(h=hi(null),(u=n).on("change AddUndo",function(n){h.set(c({},n.level))}),{fireIfChanged:function(){var n=u.undoManager.data;vo(n).filter(function(n){return!lb(h.get(),n)}).each(function(t){u.setDirty(!0);u.fire("change",{level:t,lastLevel:ig(n,n.length-2).getOrNull()})})}}),a=function(){return(s=s||hbi(i,t)).findAll(n.getBody(),g).then(f(function(t){return t=p(t,function(t){return"string"!=typeof t||void db(n,t)}),ne(n)||e(t,function(n){o(n.image.src,n.blobInfo.blobUri());n.image.src=n.blobInfo.blobUri();n.image.removeAttribute("data-mce-src")}),t}))};return n.on("SetContent",function(){(dyt(n)?b:a)()}),n.on("RawSaveContent",function(n){n.content=k(n.content)}),n.on("GetContent",function(n){n.source_view||"raw"===n.format||"tree"===n.format||(n.content=k(n.content))}),n.on("PostRender",function(){n.parser.addNodeFilter("img",function(n){e(n,function(n){var r,u=n.attr("src");t.getByUri(u)||(r=i.getResultUri(u))&&n.attr("src",r)})})}),{blobCache:t,addFilter:function(n){d.push(n)},uploadImages:w,uploadImagesAuto:b,scanForImages:a,destroy:function(){t.destroy();i.destroy();s=r=null}}}function ori(n,t){function u(n){i="string"==typeof n?{name:n,classes:[],attrs:{}}:n;var t,r=li.create(i.name),u=r;return(t=i).classes.length&&li.addClass(u,t.classes.join(" ")),li.setAttribs(u,t.attrs),r}var f,i,e,s=t&&t.schema||le({}),o=function(n,t,i){var e,f,l,h,y,p,c,a=0<t.length&&t[0],w=a&&a.name,v=(h=w,y="string"!=typeof(l=n)?l.nodeName.toLowerCase():l,!(!(c=(p=s.getElementRule(y))&&p.parentsRequired)||!c.length)&&(h&&-1!==r.inArray(c,h)?h:c[0]));if(v)w===v?(f=t[0],t=t.slice(1)):f=v;else if(a)f=t[0],t=t.slice(1);else if(!i)return n;return f&&(e=u(f)).appendChild(n),i&&(e||(e=li.create("div")).appendChild(n),r.each(i,function(t){var i=u(t);e.insertBefore(i,n)})),o(e,t,f&&f.siblings)};return n&&n.length?(f=u(i=n[0]),(e=li.create("div")).appendChild(o(f,n.slice(1),i.siblings)),e):""}function lki(n){var i,t={classes:[],attrs:{}};return"*"!==(n=t.selector=r.trim(n))&&(i=n.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(n,i,u,f,e){switch(i){case"#":t.attrs.id=u;break;case".":t.classes.push(u);break;case":":-1!==r.inArray("checked disabled enabled read-only required".split(" "),u)&&(t.attrs[u]=u)}var o;return"["!==f||(o=e.match(/([\w\-]+)(?:\=\"([^\"]+))?/))&&(t.attrs[o[1]]=o[2]),""})),t.name=i||"div",t}function aki(n,t){function a(n){return n.replace(/%(\w+)/g,"")}var i,c,l="",o=(c=n.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),ht(c)?c:""),v;if(""===o)return"";if("string"==typeof t){if(!(t=n.formatter.get(t)))return;t=t[0]}if("preview"in t){if(v=at(t,"preview"),ly(v,!1))return"";o=v.getOr(o)}var u,s=t.block||t.inline||"span",h=(u=t.selector)&&"string"==typeof u?(u=(u=u.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),r.map(u.split(/(?:>|\s+(?![^\[\]]+\]))/),function(n){var t=r.map(n.split(/(?:~\+|~|\+)/),lki),i=t.pop();return t.length&&(i.siblings=t),i}).reverse()):[],f=h.length?(h[0].name||(h[0].name=s),s=t.selector,ori(h,n)):ori([s],n),e=li.select(s,f)[0]||f.firstChild;return sk(t.styles,function(n,t){var i=a(n);i&&li.setStyle(e,t,i)}),sk(t.attributes,function(n,t){var i=a(n);i&&li.setAttrib(e,t,i)}),sk(t.classes,function(n){var t=a(n);li.hasClass(e,t)||li.addClass(e,t)}),n.fire("PreviewFormats"),li.setStyles(f,{position:"absolute",left:-65535}),n.getBody().appendChild(f),i=li.getStyle(n.getBody(),"fontSize",!0),i=/px$/.test(i)?parseInt(i,10):0,sk(o.split(" "),function(t){var r=li.getStyle(e,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(r)&&(r=li.getStyle(n.getBody(),t,!0),"#ffffff"===li.toHex(r).toLowerCase())||"color"===t&&"#000000"===li.toHex(r).toLowerCase())){if("font-size"===t&&/em|%$/.test(r)){if(0===i)return;r=parseFloat(r)/(/%$/.test(r)?100:1)*i+"px"}"border"===t&&r&&(l+="padding:0 2px;");l+=t+":"+r+";"}}),n.fire("AfterPreviewFormats"),li.remove(f),l}function sri(n){var s,c,o,t,i,l,f=(t={},(i=function(n,r){n&&(ht(n)?(e(r=br(r)?r:[r],function(n){tr(n.deep)&&(n.deep=!ur(n));tr(n.split)&&(n.split=!ur(n)||kt(n));tr(n.remove)&&ur(n)&&!kt(n)&&(n.remove="none");ur(n)&&kt(n)&&(n.mixed=!0,n.block_expand=!0);ht(n.classes)&&(n.classes=n.classes.split(/\s+/))}),t[n]=r):et(n,function(n,t){i(t,n)}))})((c=(s=n).dom,o={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(n){return h(n)&&n.hasAttribute("href")},onformat:function(n,t,i){r.each(i,function(t,i){c.setAttrib(n,i,t)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(n){var t;return null!==(t=null==n?void 0:n.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]},r.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),function(n){o[n]={block:n,remove:"all"}}),o)),i(s.getParam("formats")),{get:function(n){return tt(n)?t[n]:t},has:function(n){return w(t,n)},register:i,unregister:function(n){return n&&t[n]&&delete t[n],t}}),a=hi(null);return function(n){n.addShortcut("meta+b","","Bold");n.addShortcut("meta+i","","Italic");n.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)n.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);n.addShortcut("access+7","",["FormatBlock",!1,"p"]);n.addShortcut("access+8","",["FormatBlock",!1,"div"]);n.addShortcut("access+9","",["FormatBlock",!1,"address"])}(n),(l=n).on("mouseup keydown",function(n){var t=l,i=n.keyCode,r=t.selection,u=t.getBody();oft(t,null,!1);8!==i&&46!==i||!r.isCollapsed()||r.getStart().innerHTML!==il||oft(t,cs(u,r.getStart()));37!==i&&39!==i||oft(t,cs(u,r.getStart()))}),{get:f.get,has:f.has,register:f.register,unregister:f.unregister,apply:function(t,i,r){var u=t,f=i,e=r;ct(n).formatter.apply(u,f,e)},remove:function(t,i,r,u){var f=t,e=i,o=r,s=u;ct(n).formatter.remove(f,e,o,s)},toggle:function(t,i,r){var u=t,f=i,e=r;ct(n).formatter.toggle(u,f,e)},match:function(t,i,r,u){return f=t,e=i,o=r,s=u,ct(n).formatter.match(f,e,o,s);var f,e,o,s},closest:function(t){return i=t,ct(n).formatter.closest(i);var i},matchAll:function(t,i){return r=t,u=i,ct(n).formatter.matchAll(r,u);var r,u},matchNode:function(t,i,r,u){return f=t,e=i,o=r,s=u,ct(n).formatter.matchNode(f,e,o,s);var f,e,o,s},canApply:function(t){return i=t,ct(n).formatter.canApply(i);var i},formatChanged:function(t,i,r,u){return f=a,e=t,o=i,s=r,h=u,ct(n).formatter.formatChanged(f,e,o,s,h);var f,e,o,s,h},getCssText:u(aki,n)}}function hri(n){switch(n.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return 1;default:return}}function cri(n){function f(n){ab(i,!1,o);i.add({},n)}var h,t,i,o,s,c=ec(),e=hi(0),u=hi(0),r={data:[],typing:!1,beforeChange:function(){var t=e,i=c;ct(n).undoManager.beforeChange(t,i)},add:function(t,i){return f=r,o=u,s=e,h=c,l=t,a=i,ct(n).undoManager.add(f,o,s,h,l,a);var f,o,s,h,l,a},undo:function(){return t=r,i=e,f=u,ct(n).undoManager.undo(t,i,f);var t,i,f},redo:function(){return t=u,i=r.data,ct(n).undoManager.redo(t,i);var t,i},clear:function(){var t=r,i=u;ct(n).undoManager.clear(t,i)},reset:function(){var t=r;ct(n).undoManager.reset(t)},hasUndo:function(){return t=r,i=u,ct(n).undoManager.hasUndo(t,i);var t,i},hasRedo:function(){return t=r,i=u,ct(n).undoManager.hasRedo(t,i);var t,i},transact:function(t){return i=r,u=e,f=t,ct(n).undoManager.transact(i,u,f);var i,u,f},ignore:function(t){var i=e,r=t;ct(n).undoManager.ignore(i,r)},extra:function(t,i){var f=r,e=u,o=t,s=i;ct(n).undoManager.extra(f,e,o,s)}};return ne(n)||(i=r,o=e,s=hi(!1),(t=n).on("init",function(){i.add()}),t.on("BeforeExecCommand",function(n){hri(n.command)||(pti(i,o),i.beforeChange())}),t.on("ExecCommand",function(n){hri(n.command)||f(n)}),t.on("ObjectResizeStart cut",function(){i.beforeChange()}),t.on("SaveContent ObjectResized blur",f),t.on("dragend",f),t.on("keyup",function(n){var r=n.keyCode;n.isDefaultPrevented()||((33<=r&&r<=36||37<=r&&r<=40||45===r||n.ctrlKey)&&(f(),t.nodeChanged()),46!==r&&8!==r||t.nodeChanged(),s.get()&&i.typing&&!1===lb(gft(t),i.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:i.data[0],lastLevel:null})),t.fire("TypingUndo"),s.set(!1),t.nodeChanged()))}),t.on("keydown",function(n){var r,t=n.keyCode;n.isDefaultPrevented()||(33<=t&&t<=36||37<=t&&t<=40||45===t?i.typing&&f(n):(r=n.ctrlKey&&!n.altKey||n.metaKey,!(t<16||20<t)||224===t||91===t||i.typing||r||(i.beforeChange(),ab(i,!0,o),i.add({},n),s.set(!0))))}),t.on("mousedown",function(n){i.typing&&f(n)}),t.on("input",function(n){n.inputType&&("insertReplacementText"===n.inputType||"insertText"===n.inputType&&null===n.data||"insertFromPaste"===n.inputType||"insertFromDrop"===n.inputType)&&f(n)}),t.on("AddUndo Undo Redo ClearUndos",function(n){n.isDefaultPrevented()||t.nodeChanged()})),(h=n).addShortcut("meta+z","","Undo"),h.addShortcut("meta+y,meta+shift+z","","Redo"),r}function lri(n){return"keydown"===n.type||"keyup"===n.type}function ari(n){var t=n.keyCode;return t===s.BACKSPACE||t===s.DELETE}function ps(n,i){return lh(t.fromDom(i),n.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string"))}function so(t,i,r){var u,f,e=(u=t,f=i,p(d.DOM.getParents(r.container(),"*",f),u));return n.from(e[e.length-1])}function yr(n,t){if(!t)return t;var r=t.container(),u=t.offset();return n?kh(r)?o(r.nextSibling)?i(r.nextSibling,0):i.after(r):hn(t)?i(r,u+1):t:kh(r)?o(r.previousSibling)?i(r.previousSibling,r.previousSibling.data.length):i.before(r):cn(t)?i(r,u-1):t}function vki(n){return fat(n)||ua(n)}function gb(i,r){return ee(i,r)?yy(r,vki,(u=i,function(n){return g(u,t.fromDom(n.dom.parentNode))})):n.none();var u}function vri(n){var i,t,r;n.dom.isEmpty(n.getBody())&&(n.setContent(""),r=(t=(i=n).getBody()).firstChild&&i.dom.isBlock(t.firstChild)?t.firstChild:t,i.selection.setCursorLocation(r,0))}function yki(n,t){return{from:n,to:t}}function bet(n,i){return gb(t.fromDom(n),t.fromDom(i.container())).map(function(n){return{block:n,position:i}})}function yri(n){var t,i=ty(t=nu(n),tf).fold(f(t),function(n){return t.slice(0,n)});return e(i,ni),i}function pri(n,t){return gt(gf(t,n).reverse(),function(n){return pt(n)}).each(ni)}function pki(n,r,u,f){if(pt(u))return as(u),pi(u.dom);0===p(oct(f),function(n){return!pt(n)}).length&&pt(r)&&ou(f,t.fromTag("br"));var o=cf(u.dom,i.before(f.dom));return e(yri(r),function(n){ou(f,n)}),pri(n,r),o}function wki(n,t,i){if(pt(i))return ni(i),pt(t)&&as(t),pi(t.dom);var r=lf(i.dom);return e(yri(t),function(n){ii(i,n)}),pri(n,t),r}function wri(n,i){ac(n,i.dom).map(function(n){return n.getNode()}).map(t.fromDom).filter(wh).each(ni)}function bri(t,i,r){return wri(!0,i),wri(!1,r),(ee(o=r,e=i)?(f=gf(e,o),n.from(f[f.length-1])):n.none()).fold(u(wki,t,i,r),u(pki,t,i,r));var e,o,f}function kri(n,t,i,r){return t?bri(n,r,i):bri(n,i,r)}function nk(r,u){var s,h,c,f,e,o,l,a=t.fromDom(r.getBody()),v=(s=a.dom,h=u,((c=r.selection.getRng()).collapsed?(e=h,o=bet(f=s,i.fromRangeStart(c)),l=o.bind(function(t){return vr(e,f,t.position).bind(function(t){return bet(f,t).map(function(t){return r=f,u=e,st((i=t).position.getNode())&&!1===pt(i.block)?ac(!1,i.block.dom).bind(function(t){return t.isEqual(i.position)?vr(u,r,t).bind(function(n){return bet(r,n)}):n.some(i)}).getOr(i):i;var r,u,i})})}),di(o,l,yki).filter(function(n){return!1===g(n.from.block,n.to.block)&&eu((i=n).from.block).bind(function(n){return eu(i.to.block).filter(function(t){return g(n,t)})}).isSome()&&!1===rt((t=n).from.block.dom)&&!1===rt(t.to.block.dom);var t,i})):n.none()).bind(function(n){return kri(a,u,n.from.block,n.to.block)}));return v.each(function(n){r.selection.setRng(n.toRange())}),v.isSome()}function dri(n,i){var r=t.fromDom(i),f=u(g,n);return ra(r,gy,f).isSome()}function bki(n){var r,e,u,s,o,f,h,c,l,a,v=t.fromDom(n.getBody()),y=n.selection.getRng();return f=y,l=cf((o=v).dom,i.fromRangeStart(f)).isNone(),a=yu(o.dom,i.fromRangeEnd(f)).isNone(),!dri(h=o,(c=f).startContainer)&&!dri(h,c.endContainer)&&l&&a?((s=n).setContent(""),s.selection.setCursorLocation(),!0):(r=v,e=n.selection,u=e.getRng(),di(gb(r,t.fromDom(u.startContainer)),gb(r,t.fromDom(u.endContainer)),function(n,t){return!1===g(n,t)&&(u.deleteContents(),kri(r,!0,n,t).each(function(n){e.setRng(n.toRange())}),!0)}).getOr(!1))}function tk(n){return!n.selection.isCollapsed()&&bki(n)}function te(t,i,r,u,f){return n.from(i._selectionOverrides.showCaret(t,r,u,f))}function fl(t,i){var r,u;return t.fire("BeforeObjectSelected",{target:i}).isDefaultPrevented()?n.none():n.some(((u=(r=i).ownerDocument.createRange()).selectNode(r),u))}function gri(t,r,u){var h=hit(1,t.getBody(),r),f=i.fromRangeStart(h),s=f.getNode(),e,o;return ka(s)?te(1,t,s,!f.isAtEnd(),!1):(e=f.getNode(!0),ka(e))?te(1,t,e,!1,!1):(o=t.dom.getParent(f.getNode(),function(n){return vdi(n)||adi(n)}),ka(o)?te(1,t,o,!1,u):n.none())}function ket(n,t,i){return t.collapsed?gri(n,t,i).getOr(t):t}function kki(n){return fo(n)||nl(n)}function dki(n){return eo(n)||tl(n)}function nui(n,t,i,r,u,f){var s,e;return te(r,n,f.getNode(!u),u,!0).each(function(i){var r;t.collapsed?(r=t.cloneRange(),u?r.setEnd(i.startContainer,i.startOffset):r.setStart(i.endContainer,i.endOffset),r.deleteContents()):t.deleteContents();n.selection.setRng(i)}),s=n.dom,o(e=i)&&0===e.data.length&&s.remove(e),!0}function ik(n,t){var f=n.selection.getRng(),r;if(!o(f.commonAncestorContainer))return!1;var s=t?bt.Forwards:bt.Backwards,h=vu(n.getBody()),c=u(cit,t?h.next:h.prev),l=t?kki:dki,e=ba(s,n.getBody(),f),i=yr(t,c(e));return!i||!tw(e,i)?!1:l(i)?nui(n,f,e.getNode(),s,t,i):(r=c(i),!!(r&&l(r)&&tw(i,r))&&nui(n,f,e.getNode(),s,t,r))}function tui(i,r,u){return vr(r,i,u).bind(function(f){function y(n){return sn(t.fromDom(n))&&!ef(v,o,l)}return s=f.getNode(),gy(t.fromDom(s))||ua(t.fromDom(s))||(l=i,o=f,ypt(!(a=r),v=u).fold(function(){return ypt(a,o).fold(it,y)},y))?n.none():r&&rt(f.getNode())||!1===r&&rt(f.getNode(!0))?(h=i,c=u,e=f.getNode(!1===r),gb(t.fromDom(h),t.fromDom(c.getNode())).map(function(n){return pt(n)?pr.remove(n.dom):pr.moveToElement(e)}).orThunk(function(){return n.some(pr.moveToElement(e))})):r&&eo(u)||!1===r&&fo(u)?n.some(pr.moveToPosition(f)):n.none();var h,c,e,l,a,v,o,s})}function iui(t,i){return n.from(dc(t.getBody(),i))}function gki(r,u){var f=r.selection.getNode();return iui(r,f).filter(rt).fold(function(){return v=r.getBody(),k=hit((e=u)?1:-1,v,r.selection.getRng()),f=i.fromRangeStart(k),l=t.fromDom(v),(!1===e&&eo(f)?n.some(pr.remove(f.getNode(!0))):e&&fo(f)?n.some(pr.remove(f.getNode())):!1===e&&fo(f)&&cut(l,f)?wwi(l,f).map(function(n){return pr.remove(n.getNode())}):e&&eo(f)&&hut(l,f)?bwi(l,f).map(function(n){return pr.remove(n.getNode())}):(a=v,o=e,p=(s=f).getNode(!1===(w=o)),b=w?"after":"before",h(p)&&p.getAttribute("data-mce-caret")===b?(c=s.getNode(!1===(y=o)),(y&&rt(c.nextSibling)?n.some(pr.moveToElement(c.nextSibling)):!1===y&&rt(c.previousSibling)?n.some(pr.moveToElement(c.previousSibling)):n.none()).fold(function(){return tui(a,o,s)},n.some)):tui(a,o,s).bind(function(t){return i=a,r=s,t.fold(function(t){return n.some(pr.remove(t))},function(t){return n.some(pr.moveToElement(t))},function(t){return ef(r,t,i)?n.none():n.some(pr.moveToPosition(t))});var i,r}))).exists(function(n){return n.fold(function(n){return f._selectionOverrides.hideFakeCaret(),vs(f,h,t.fromDom(n)),!0},(s=h=u,function(n){var t=s?i.before(n):i.after(n);return o.selection.setRng(t.toRange()),!0}),(e=o=f=r,function(n){return e.selection.setRng(n.toRange()),!0}));var e,o,s,f,h});var a,o,s,y,c,w,p,b,v,e,k,f,l},lt)}function ndi(n,i){var r=n.selection.getNode();return!(!rt(r)||vy(r))&&iui(n,r.parentNode).filter(rt).fold(function(){return e(gi(t.fromDom(n.getBody()),".mce-offscreen-selection"),ni),vs(n,i,t.fromDom(n.selection.getNode())),vri(n),!0},lt)}function rui(n){var u,r=n.dom,f=n.selection,t=dc(n.getBody(),f.getNode());return gu(t)&&r.isBlock(t)&&r.isEmpty(t)&&(u=r.create("br",{"data-mce-bogus":"1"}),r.setHTML(t,""),t.appendChild(u),f.setRng(i.before(u).toRange())),!0}function rk(n,t){return(n.selection.isCollapsed()?gki:ndi)(n,t)}function uk(t,r){return!!t.selection.isCollapsed()&&(u=t,f=r,e=i.fromRangeStart(u.selection.getRng()),vr(f,u.getBody(),e).filter(function(n){return(f?awi:vwi)(n)}).bind(function(t){return n.from(sit(f?0:-1,t))}).exists(function(n){return u.selection.select(n),!0}));var u,f,e}function uui(n){return el(n)&&n.data[0]===fi}function fui(n){return el(n)&&n.data[n.data.length-1]===fi}function eui(n){return n.ownerDocument.createTextNode(fi)}function fk(n,t){return(n?function(n){if(el(n.previousSibling))return fui(n.previousSibling)||n.previousSibling.appendData(fi),n.previousSibling;if(el(n))return uui(n)||n.insertData(0,fi),n;var t=eui(n);return n.parentNode.insertBefore(t,n),t}:function(n){if(el(n.nextSibling))return uui(n.nextSibling)||n.nextSibling.insertData(0,fi),n.nextSibling;if(el(n))return fui(n)||n.appendData(fi),n;var t=eui(n);return n.nextSibling?n.parentNode.insertBefore(t,n.nextSibling):n.parentNode.appendChild(t),t})(t)}function oui(n,t){return o(n.container())?fk(t,n.container()):fk(t,n.getNode())}function sui(n,t){var i=t.get();return i&&n.container()===i&&kh(i)}function det(t,r){return r.fold(function(r){hs(t.get());var u=ydi(r);return t.set(u),n.some(i(u,u.length-1))},function(n){return pi(n).map(function(n){if(sui(n,t))return i(t.get(),1);hs(t.get());var r=oui(n,!0);return t.set(r),i(r,1)})},function(n){return lf(n).map(function(n){if(sui(n,t))return i(t.get(),t.get().length-1);hs(t.get());var r=oui(n,!1);return t.set(r),i(r,r.length-1)})},function(r){hs(t.get());var u=pdi(r);return t.set(u),n.some(i(u,1))})}function hui(t,i){for(var u,r=0;r<t.length;r++)if(u=t[r].apply(null,i),u.isSome())return u;return n.none()}function cui(n,t){return io(t,n)||n}function tdi(t,i,r){var f=wui(r),e=cui(i,f.container());return so(t,e,f).fold(function(){return yu(e,f).bind(u(so,t,e)).map(function(n){return ai.before(n)})},n.none)}function idi(n,t){return null===cs(n,t)}function lui(n,t,i){return so(n,t,i).filter(u(idi,t))}function rdi(t,i,r){var u=bui(r);return lui(t,i,u).bind(function(t){return cf(t,u).isNone()?n.some(ai.start(t)):n.none()})}function udi(t,i,r){var u=wui(r);return lui(t,i,u).bind(function(t){return yu(t,u).isNone()?n.some(ai.end(t)):n.none()})}function fdi(t,i,r){var f=bui(r),e=cui(i,f.container());return so(t,e,f).fold(function(){return cf(e,f).bind(u(so,t,e)).map(function(n){return ai.after(n)})},n.none)}function aui(n){return!1===(t=tot(n),"rtl"===d.DOM.getStyle(t,"direction",!0)||(i=t.textContent,ldi.test(i)));var t,i}function vf(n,t,i){return hui([tdi,rdi,udi,fdi],[n,t,i]).filter(aui)}function vui(n){return n.fold(f("before"),f("start"),f("end"),f("after"))}function ek(n){return n.fold(ai.before,ai.before,ai.after,ai.after)}function get(n){return n.fold(ai.start,ai.start,ai.end,ai.end)}function edi(n,t,i,r,u,f){return di(so(t,i,r),so(t,i,u),function(t,r){return t!==r&&(o=r,u=io(t,e=i),s=io(o,e),u&&u===s)?ai.after(n?t:r):f;var e,o,u,s}).getOr(f)}function odi(n,t){return n.fold(lt,function(n){return i=t,!(vui(r=n)===vui(i)&&tot(r)===tot(i));var r,i})}function sdi(t,i){return t?i.fold(ao(n.some,ai.start),n.none,ao(n.some,ai.after),n.none):i.fold(n.none,ao(n.some,ai.before),n.none,ao(n.some,ai.end))}function not(n,t,i,r){var f=yr(n,r),e=vf(t,i,f);return vf(t,i,f).bind(u(sdi,n)).orThunk(function(){return s=t,o=i,h=e,c=yr(f=n,r),vr(f,o,c).map(u(yr,f)).fold(function(){return h.map(ek)},function(n){return vf(s,o,n).map(u(edi,f,s,o,c,n)).filter(u(odi,h))}).filter(aui);var f,s,o,h,c})}function ok(n){for(var i,r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];i=window.console;i&&(i.error||i.log).apply(i,fe([n],r,!1))}function kui(n,t,r){var u=n?1:-1;return t.setRng(i(r.container(),r.offset()+u).toRange()),t.getSel().modify("move",n?"forward":"backward","word"),!0}function hk(n,t){return n===bt.Backwards?iy(t):t}function dui(t,i,r,u){for(var f,a,c,l,s,h,v=vu(r),e=u,o=[];e;){if(f=(s=v,h=e,i===bt.Forwards?s.next(h):s.prev(h)),!f)break;if(st(f.getNode(!1)))return i===bt.Forwards?{positions:hk(i,o).concat([f]),breakType:ie.Br,breakAt:n.some(f)}:{positions:hk(i,o),breakType:ie.Br,breakAt:n.some(f)};if(f.isVisible()){if(t(e,f))return a=(c=e,st((l=f).getNode(i===bt.Forwards))?ie.Br:!1===ef(c,l)?ie.Block:ie.Wrap),{positions:hk(i,o),breakType:a,breakAt:n.some(f)};o.push(f);e=f}else e=f}return{positions:hk(i,o),breakType:ie.Eol,breakAt:n.none()}}function gui(n,t,i,r){return t(i,r).breakAt.map(function(r){var u=t(i,r).positions;return n===bt.Backwards?u.concat(r):[r].concat(u)}).getOr([])}function iot(t,i){return fu(t,function(t,r){return t.fold(function(){return n.some(r)},function(n){return di(or(n.getClientRects()),or(r.getClientRects()),function(t,u){var f=Math.abs(i-t.left);return Math.abs(i-u.left)<=f?r:n}).or(t)})},n.none())}function nfi(n,t){return or(t.getClientRects()).bind(function(t){return iot(n,t.left)})}function wdi(n){function i(t){return ut(t,function(t){var i=es(t);return i.node=n,i})}if(h(n))return i(n.getClientRects());if(o(n)){var t=n.ownerDocument.createRange();return t.setStart(n,0),t.setEnd(n,n.data.length),i(t.getClientRects())}}function rot(n){return oh(n,wdi)}function tfi(n,t,i,r,u,f){function s(r){var o=rot([r]),s,f;for(-1===n&&(o=o.reverse()),s=0;s<o.length;s++)if(f=o[s],!i(f,c)){if(0<e.length&&t(f,yo(e))&&h++,f.line=h,u(f))return!0;e.push(f)}}var h=0,e=[],c=yo(f.getClientRects()),o;return c?(o=f.getNode(),s(o),function(n,t,i,r){for(;r=lc(r,n,by,t);)if(i(r))return}(n,r,s,o),e):e}function ifi(n){return function(t){return t.line>n}}function uot(n){return function(t){return t.line===n}}function fot(n,t){return Math.abs(n.left-t)}function eot(n,t){return Math.abs(n.right-t)}function rfi(n,t){return n>=t.left&&n<=t.right}function ddi(n,t){return n>=t.top&&n<=t.bottom}function lk(n,t,i){return void 0===i&&(i=lt),ry(n,function(n,r){if(rfi(t,r))return i(r)?r:n;if(rfi(t,n))return i(n)?n:r;var u=Math.min(fot(n,t),eot(n,t)),f=Math.min(fot(r,t),eot(r,t));return f===u&&sh(r,"node")&&nni(r.node)||f<u?r:n})}function ufi(n,t,i,r,u){var f=aoi(r,n,by,t,!u);do if(!f||i(f))return;while(f=aoi(f,n,by,t))}function gdi(n,t,i){function f(n){return!vh(n.node)&&!tu(n.node)}var e,o,r,s=rot(p(bu(n.getElementsByTagName("*")),ss)),h=p(s,u(ddi,i));return(r=lk(h,t,f))&&(r=lk(function(n,t,i){function f(n,i){var u=p(rot([i]),function(i){return!n(i,t)});return r=r.concat(u),0===u.length}void 0===i&&(i=!0);var r=[];return r.push(t),ufi(ws.Up,n,u(f,sc),t.node,i),ufi(ws.Down,n,u(f,hc),t.node,i),r}(n,r,f(r)),t,f))&&ss(r.node)?{node:(e=r).node,before:fot(e,o=t)<eot(e,o)}:null}function re(n,t){n.selection.setRng(t);fv(n,n.selection.getRng())}function oot(t,i,r){return n.some(ket(t,i,r))}function ffi(t,i,r,f,e,o){var s=i===bt.Forwards,p=vu(t.getBody()),w=u(cit,s?p.next:p.prev),a=s?f:e,v,l,h,y,c;return!r.collapsed&&(v=wp(r),o(v))?te(i,t,v,i===bt.Backwards,!1):(l=ba(i,t.getBody(),r),a(l))?fl(t,l.getNode(!s)):(h=yr(s,w(l)),y=klt(r),!h)?y?n.some(r):n.none():a(h)?te(i,t,h.getNode(!s),s,!1):(c=w(h),c&&a(c)&&tw(h,c)?te(i,t,c.getNode(!s),s,!1):y?oot(t,h.toRange(),!1):n.none())}function efi(t,r,u,f,e,o){var s=ba(r,t.getBody(),u),y=yo(s.getClientRects()),a=r===ws.Down,k,d,v,l;if(!y)return n.none();var w,b=p((a?ggi:dgi)(t.getBody(),ifi(1),s),uot(1)),c=y.left,h=lk(b,c);return h&&o(h.node)?(k=Math.abs(c-h.left),d=Math.abs(c-h.right),te(r,t,h.node,k<d,!1)):(w=f(s)?s.getNode():e(s)?s.getNode(!0):wp(u))&&((v=function(n,t,r,u){function a(n){return yo(n.getClientRects())}var h,c,l,v=vu(t),e=[],y=0,f=1===n?(h=v.next,c=hc,l=sc,i.after(u)):(h=v.prev,c=sc,l=hc,i.before(u)),p=a(f),s,o;do if(f.isVisible()&&(s=a(f),!l(s,p))){if(0<e.length&&c(s,yo(e))&&y++,o=es(s),o.position=f,o.line=y,r(o))return e;e.push(o)}while(f=h(f));return e}(r,t.getBody(),ifi(1),w),l=lk(p(v,uot(1)),c),l)||(l=yo(p(v,uot(0)))))?oot(t,l.position.toRange(),!1):0===b.length?wot(t,a).filter(a?e:f).map(function(n){return ket(t,n.toRange(),!1)}):n.none()}function ofi(n,t,i){return wot(n,t).filter(i).exists(function(t){return n.selection.setRng(t.toRange()),!0})}function ak(n,t){var i=n.dom.createRng();i.setStart(t.container(),t.offset());i.setEnd(t.container(),t.offset());n.selection.setRng(i)}function sfi(n,t){n?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")}function hfi(n,t,i){return det(t,i).map(function(t){return ak(n,t),i})}function cfi(n,t,r){return!!wa(n)&&(e=t,o=r,s=(f=n).getBody(),h=i.fromRangeStart(f.selection.getRng()),not(o,u(ps,f),s,h).bind(function(n){return hfi(f,e,n)}).isSome());var f,e,o,s,h}function lfi(n,t){return!!wa(t)&&(u=n,e=(f=t).selection.getRng(),r=u?i.fromRangeEnd(e):i.fromRangeStart(e),!!ft(f.selection.getSel().modify)&&(u&&hn(r)?kui(!0,f.selection,r):!(u||!cn(r))&&kui(!1,f.selection,r)));var u,f,e,r}function ngi(n){var r=hi(null),f=u(ps,n);return n.on("NodeChange",function(o){var v,s,w,b,y,k,d,g,nt,h,c,a,tt;!wa(n)||l.browser.isIE()&&o.initial||(y=f,k=n.dom,d=o.parents,e(gst(g=p(ut(gi(t.fromDom(k.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(n){return n.dom}),y),nt=p(d,y)),u(sfi,!1)),e(gst(nt,g),u(sfi,!0)),c=r,(h=n).selection.isCollapsed()&&!0!==h.composing&&c.get()&&(a=i.fromRangeStart(h.selection.getRng()),i.isTextPosition(a)&&!1===(hn(tt=a)||cn(tt))&&(ak(h,avi(c.get(),a)),c.set(null))),v=f,s=n,w=r,b=o.parents,s.selection.isCollapsed()&&e(p(b,v),function(){var n=i.fromRangeStart(s.selection.getRng());vf(v,s.getBody(),n).bind(function(n){return hfi(s,w,n)})}))}),r}function vk(n,t,r){if(wa(n)){var f=wot(n,t).getOrThunk(function(){var r=n.selection.getRng();return t?i.fromRangeEnd(r):i.fromRangeStart(r)});return vf(u(ps,n),n.getBody(),f).exists(function(t){var i=ek(t);return det(r,i).exists(function(t){return ak(n,t),!0})})}return!1}function afi(n,t){return function(i){return det(t,i).exists(function(t){return ak(n,t),!0})}}function vfi(n,t,r,f){var e=n.getBody(),o=u(ps,n);n.undoManager.ignore(function(){var u,s,h;n.selection.setRng((u=r,s=f,(h=document.createRange()).setStart(u.container(),u.offset()),h.setEnd(s.container(),s.offset()),h));n.execCommand("Delete");vf(o,e,i.fromRangeStart(n.selection.getRng())).map(get).map(afi(n,t))});n.nodeChanged()}function yk(r,e,o){var p,h,a,c,s,y,l,v,w;return r.selection.isCollapsed()&&wa(r)?(p=i.fromRangeStart(r.selection.getRng()),a=e,c=o,s=p,y=(h=r).getBody(),l=io(s.container(),y)||y,v=u(ps,h),(w=vf(v,l,s)).bind(function(t){return c?t.fold(f(n.some(get(t))),n.none,f(n.some(ek(t))),n.none):t.fold(n.none,f(n.some(ek(t))),n.none,f(n.some(get(t))))}).map(afi(h,a)).getOrThunk(function(){var n=uw(c,l,s),i=n.bind(function(n){return vf(v,l,n)});return di(w,i,function(){return so(v,l,s).exists(function(n){return!!di(pi(i=n),lf(i),function(n,t){var r=yr(!0,n),u=yr(!1,t);return yu(i,r).forall(function(n){return n.isEqual(u)})}).getOr(!0)&&(vs(h,c,t.fromDom(n)),!0);var i})}).orThunk(function(){return i.bind(function(){return n.map(function(n){return c?vfi(h,a,s,n):vfi(h,a,n,s),!0})})}).getOr(!1)})):!1}function tgi(n){return 1===cct(n)}function igi(n,r){var e,s=t.fromDom(n.getBody()),h=t.fromDom(n.selection.getStart()),o=p(ty(e=gf(h,s),tf).fold(f(e),function(n){return e.slice(0,n)}),tgi);return vo(o).exists(function(f){var a,v,s,h,y,c,w,b,k,d=i.fromRangeStart(n.selection.getRng()),g=r,l=d,e=f.dom;return!(!di(pi(e),lf(e),function(n,t){var i=yr(!0,n),r=yr(!1,t),u=yr(!1,l);return g?yu(e,u).exists(function(n){return n.isEqual(r)&&l.isEqual(i)}):cf(e,u).exists(function(n){return n.isEqual(i)&&l.isEqual(r)})}).getOr(!0)||of((a=f).dom)&&nnt(a.dom)||(v=r,h=f,0===(k=ut(p(o,u(lwi,s=n)),function(n){return n.dom})).length?vs(s,v,h):(c=h.dom,b=rnt(k,(w=fft(!1)).dom),ou(t.fromDom(c),w),ni(t.fromDom(c)),y=i(b,0),s.selection.setRng(y.toRange())),0))})}function pk(n,t){return!!n.selection.isCollapsed()&&igi(n,t)}function sot(n,i,r){return n._selectionOverrides.hideFakeCaret(),vs(n,i,t.fromDom(r)),!0}function wk(t,i){return t.selection.isCollapsed()?(u=t,o=(r=i)?nl:tl,c=r?bt.Forwards:bt.Backwards,f=ba(c,u.getBody(),u.selection.getRng()),o(f)?sot(u,r,f.getNode(!r)):n.from(yr(r,f)).filter(function(n){return o(n)&&tw(f,n)}).exists(function(n){return sot(u,r,n.getNode(!r))})):(h=i,e=(s=t).selection.getNode(),!!tu(e)&&sot(s,h,e));var s,h,e,u,r,o,c,f}function hot(n){var t=parseInt(n,10);return isNaN(t)?0:t}function yfi(n,t){return(n||"table"===vt(t)?"margin":"padding")+("rtl"===wf(t,"direction")?"-right":"-left")}function pfi(n){var t,i=voi(n);return!n.mode.isReadOnly()&&(1<i.length||(t=n,al(i,function(n){var i=bg(n,yfi(ipt(t),n)).map(hot).getOr(0);return"false"!==t.dom.getContentEditable(n.dom)&&0<i})))}function wfi(n){return bn(n)||ua(n)}function bfi(n,i){var r=n.dom,f=n.selection,o=n.formatter,u=n.getParam("indentation","40px","string"),s=/[a-z%]+$/i.exec(u)[0],h=parseInt(u,10),c=ipt(n),l=oi(n);n.queryCommandState("InsertUnorderedList")||n.queryCommandState("InsertOrderedList")||""!==l||r.getParent(f.getNode(),r.isBlock)||o.apply("div");e(voi(n),function(n){var u,o=r,v=i,l=h,a=s,f=n.dom,e=yfi(c,t.fromDom(f));"outdent"===v?(u=Math.max(0,hot(f.style[e])-l),o.setStyle(f,e,u?u+a:"")):(u=hot(f.style[e])+l+a,o.setStyle(f,e,u))})}function kfi(n){if(n.selection.isCollapsed()&&pfi(n)){var r=n.dom,u=n.selection.getRng(),e=i.fromRangeStart(u),f=r.getParent(u.startContainer,r.isBlock);if(null!==f&&cft(t.fromDom(f),e))return bfi(n,"outdent"),!0}return!1}function dfi(n,t){n.getDoc().execCommand(t,!1,null)}function gfi(t){return void 0===t.touches||1!==t.touches.length?n.none():n.some(t.touches[0])}function cot(n,t){return w(n,t.nodeName)}function rgi(n){var u,f,v,y=n.dom,s=n.selection,p=n.schema,c=p.getBlockElements(),i=s.getStart(),l=n.getBody(),a=oi(n),w;if(i&&h(i)&&a&&(w=l.nodeName.toLowerCase(),p.isValidChild(w,a.toLowerCase())&&(b=c,k=l,d=i,!ki(adt(t.fromDom(d),t.fromDom(k)),function(n){return cot(b,n.dom)})))){for(var b,k,d,g,e,r=s.getRng(),nt=r.startContainer,tt=r.startOffset,it=r.endContainer,rt=r.endOffset,ut=ls(n),i=l.firstChild;i;)g=c,o(e=i)||h(e)&&!cot(g,e)&&!ar(e)?function(n,t){if(o(t)&&(0===t.nodeValue.length||/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||cot(n,t.nextSibling))))return 1}(c,i)?(i=(f=i).nextSibling,y.remove(f)):(u||(u=y.create(a,ya(n)),i.parentNode.insertBefore(u,i),v=!0),i=(f=i).nextSibling,u.appendChild(f)):(u=null,i=i.nextSibling);v&&ut&&(r.setStart(nt,tt),r.setEnd(it,rt),s.setRng(r),n.nodeChanged())}}function nei(n,t){t.hasAttribute("data-mce-caret")&&(ln(t),n.selection.setRng(n.selection.getRng()),n.selection.scrollIntoView(t))}function ugi(n,i){var r=wy(t.fromDom(n.getBody()),"*[data-mce-caret]").map(function(n){return n.dom}).getOrNull();if(r)return"compositionstart"===i.type?(i.preventDefault(),i.stopPropagation(),void nei(n,r)):void(blt(r)&&(nei(n,r),n.undoManager.add()))}function tei(n,t,r){var e,f,o,s=vu(n.getBody()),h=u(cit,1===t?s.next:s.prev);r.collapsed&&""!==oi(n)&&(e=n.dom.getParent(r.startContainer,"PRE"))&&(h(i.fromRangeStart(r))||(o=n.dom.create(oi(n)),(!l.ie||11<=l.ie)&&(o.innerHTML='<br data-mce-bogus="1">'),f=o,1===t?n.$(e).after(f):n.$(e).before(f),n.selection.select(f,!0),n.selection.collapse()))}function iei(t,i){return r=t,u=i?bt.Forwards:bt.Backwards,f=r.selection.getRng(),ffi(r,u,f,fo,eo,yoi).orThunk(function(){return tei(r,u,f),n.none()}).exists(function(n){return re(t,n),!0});var r,u,f}function rei(t,i){return u=i?1:-1,f=(r=t).selection.getRng(),efi(r,u,f,function(n){return fo(n)||ent(n)},function(n){return eo(n)||ont(n)},yoi).orThunk(function(){return tei(r,u,f),n.none()}).exists(function(n){return re(t,n),!0});var r,u,f}function uei(n,t){return ofi(n,t,t?eo:fo)}function fgi(n){return dt(["figcaption"],vt(n))}function fei(n){var t=document.createRange();return t.setStartBefore(n.dom),t.setEndBefore(n.dom),t}function eei(n,t,i){(i?ii:act)(n,t)}function egi(n,r){var f=t.fromDom(n.getBody()),e=i.fromRangeStart(n.selection.getRng()),o=oi(n),s=ya(n),h=e,c=u(g,f);return yy(t.fromDom(h.container()),tf,c).filter(fgi).exists(function(){var v,u,y,p,h,w,b,k,i,c,d,g,l,a,nt,tt;return(l=f,a=e,r?(tt=l.dom,av(tt,a).breakAt.isNone()):(nt=l.dom,lv(nt,a).breakAt.isNone()))?(v=(u=f,p=s,h=r,""===(y=o)?(d=h,eei(u,g=t.fromTag("br"),d),fei(g)):(w=u,b=h,k=p,i=t.fromTag(y),c=t.fromTag("br"),oe(i,k),ii(i,c),eei(w,i,b),fei(c))),n.selection.setRng(v),!0):!1})}function oei(n,t){return!!n.selection.isCollapsed()&&egi(n,t)}function v(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return function(){return n.apply(null,i)}}function ol(n,t){return gt((i=t,oh(ut(n,function(n){return c({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:y},n)}),function(n){return i.keyCode===n.keyCode&&i.shiftKey===n.shiftKey&&i.altKey===n.altKey&&i.ctrlKey===n.ctrlKey&&i.metaKey===n.metaKey?[n]:[]})),function(n){return n.action()});var i}function sei(n,t){var i=t?bt.Forwards:bt.Backwards,r=n.selection.getRng();return ffi(n,i,r,nl,tl,tu).exists(function(t){return re(n,t),!0})}function hei(n,t){var i=t?1:-1,r=n.selection.getRng();return efi(n,i,r,nl,tl,tu).exists(function(t){return re(n,t),!0})}function cei(n,t){return ofi(n,t,t?tl:nl)}function lei(i,r,u,f,e){var o,c=gi(t.fromDom(u),"td,th,caption").map(function(n){return n.dom}),l=p((o=i,oh(c,function(n){var t,i={left:(t=es(n.getBoundingClientRect())).left- -1,top:t.top- -1,right:t.right+-2,bottom:t.bottom+-2,width:t.width+-1,height:t.height+-1};return[{x:i.left,y:o(i),cell:n},{x:i.right,y:o(i),cell:n}]})),function(n){return r(n,e)}),s=f,h=e;return fu(l,function(t,i){return t.fold(function(){return n.some(i)},function(t){var r=Math.sqrt(Math.abs(t.x-s)+Math.abs(t.y-h)),u=Math.sqrt(Math.abs(i.x-s)+Math.abs(i.y-h));return n.some(u<r?i:t)})},n.none()).map(function(n){return n.cell})}function aei(n,t,i){var u,f,r=n(t,i);return r.breakType===ie.Wrap&&0===r.positions.length||!st(i.getNode())&&r.breakType===ie.Br&&1===r.positions.length?(u=n,f=t,!r.breakAt.exists(function(n){return u(f,n).breakAt.isSome()})):r.breakAt.isNone()}function ogi(n,t,r){var u,f,e,o=n.selection.getRng(),s=t?1:-1;return!(!lpt()||(u=t,f=r,e=i.fromRangeStart(o),!ac(!u,f).exists(function(n){return n.isEqual(e)}))||(te(s,n,r,!t,!1).each(function(t){re(n,t)}),0))}function vei(i,r,u){var e,f,o=(e=!!r,f=u.getNode(e),h(f)&&"TABLE"===f.nodeName?n.some(f):n.none()),s=!1===r;o.fold(function(){return re(i,u.toRange())},function(n){return ac(s,i.getBody()).filter(function(n){return n.isEqual(u)}).fold(function(){return re(i,u.toRange())},function(){var f,e,o=r,s=n,h=u;(e=oi(f=i))?f.undoManager.transact(function(){var n=t.fromTag(e),i;oe(n,ya(f));ii(n,t.fromTag("br"));(o?kl:ou)(t.fromDom(s),n);i=f.dom.createRng();i.setStart(n.dom,0);i.setEnd(n.dom,0);re(f,i)}):re(f,h.toRange())})})}function sgi(n,t,r,u){var h,e,c,l,o,a,v,y,p,w,k=n.selection.getRng(),f=i.fromRangeStart(k),b=n.getBody(),s;return t||!fni(u,f)?!(!t||!eni(u,f))&&(h=b,p=e=r,vei(n,t,s=vo((w=c=f).getClientRects()).bind(function(n){return uni(p,n.left,n.top)}).bind(function(n){return nfi(pi(t=n).map(function(n){return[n].concat(av(t,n).positions)}).getOr([]),w);var t}).orThunk(function(){return or(c.getClientRects()).bind(function(n){return iot(kdi(h,i.after(e)),n.left)})}).getOr(i.after(e))),!0):(s=(l=b,v=o=r,or((y=a=f).getClientRects()).bind(function(n){return rni(v,n.left,n.top)}).bind(function(n){return nfi(lf(t=n).map(function(n){return lv(t,n).positions.concat(n)}).getOr([]),y);var t}).orThunk(function(){return or(a.getClientRects()).bind(function(n){return iot(bdi(l,i.before(o)),n.left)})}).getOr(i.before(o))),vei(n,t,s),!0)}function yei(t,i,r){return n.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(u){return n.from(t.dom.getParent(u,"table")).map(function(n){return r(t,i,n,u)})}).getOr(!1)}function pei(n,t){return yei(n,t,ogi)}function wei(n,t){return yei(n,t,sgi)}function vv(n,t){var r,s,u=t,f=n.dom,h=n.schema.getMoveCaretBeforeOnEnterElements(),i,e;if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)&&(s=function(n){for(;n;){if(1===n.nodeType||3===n.nodeType&&n.data&&/[\r\n\s]/.test(n.data))return n;n=n.nextSibling}}(t.firstChild))&&/^(UL|OL|DL)$/.test(s.nodeName)&&t.insertBefore(f.doc.createTextNode(ir),t.firstChild),i=f.createRng(),t.normalize(),t.hasChildNodes()){for(e=new yt(t,t);r=e.current();){if(o(r)){i.setStart(r,0);i.setEnd(r,0);break}if(h[r.nodeName.toLowerCase()]){i.setStartBefore(r);i.setEndBefore(r);break}u=r;r=e.next()}r||(i.setStart(u,0),i.setEnd(u,0))}else st(t)?t.nextSibling&&f.isBlock(t.nextSibling)?(i.setStartBefore(t),i.setEndBefore(t)):(i.setStartAfter(t),i.setEndAfter(t)):(i.setStart(t,0),i.setEnd(t,0));n.selection.setRng(i);fv(n,i)}}function lot(t){return n.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))}function bei(n,t){return n&&n.parentNode&&n.parentNode.nodeName===t}function kei(n){return n&&/^(OL|UL|LI)$/.test(n.nodeName)}function bk(n){var t=n.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:n}function kk(n,t,i){for(var r=n[i?"firstChild":"lastChild"];r&&!h(r);)r=r[i?"nextSibling":"previousSibling"];return r===t}function aot(n){n.innerHTML='<br data-mce-bogus="1">'}function vot(n,t){return n.nodeName===t||n.previousSibling&&n.previousSibling.nodeName===t}function dei(n,t){return t&&n.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==n.getContentEditable(t)}function yot(n,t,i){return!1===o(t)?i:n?1===i&&t.data.charAt(i-1)===fi?0:i:i===t.data.length-1&&t.data.charAt(i)===fi?t.data.length:i}function gei(n,t){for(var u,r=n.getRoot(),i=t;i!==r&&"false"!==n.getContentEditable(i);)"true"===n.getContentEditable(i)&&(u=i),i=i.parentNode;return i!==r?u:r}function yv(i,r){var u=oi(i);u&&u.toLowerCase()===r.tagName.toLowerCase()&&function(i,r,u){var f=i.dom,e,o;n.from(u.style).map(f.parseStyle).each(function(n){var i=tlt(t.fromDom(r)),u=c(c({},i),n);f.setStyles(r,u)});di(n.from(u.class).map(function(n){return n.split(/\s+/)}),n.from(r.className).map(function(n){return p(n.split(/\s+/),function(n){return""!==n})}),function(n,t){var i=p(t,function(t){return!dt(n,t)}),u=fe(fe([],n,!0),i,!0);f.setAttrib(r,"class",u.join(" "))});e=["style","class"];o=vl(u,function(n,t){return!dt(e,t)});f.setAttribs(r,o)}(i,r,ya(i))}function hgi(n,i){function rt(t){var e,f=u,h=pt.getTextInlineElements(),i=t||"TABLE"===k||"HR"===k?s.create(t||v):r.cloneNode(!1),o=i;if(!1===n.getParam("keep_styles",!0))s.setAttrib(i,"style",null),s.setAttrib(i,"class",null);else for(;h[f.nodeName]&&(of(f)||ar(f)||(e=f.cloneNode(!1),s.setAttrib(e,"id",""),i.hasChildNodes()?e.appendChild(i.firstChild):o=e,i.appendChild(e))),(f=f.parentNode)&&f!==ct;);return yv(n,i),aot(o),i}function lt(n){var t,e,f=yot(n,u,tt),i;if(!o(u)||!(n?0<f:f<u.nodeValue.length)){if(u.parentNode===r&&nt&&!n||n&&h(u)&&u===r.firstChild)return 1;if(vot(u,"TABLE")||vot(u,"HR"))return nt&&!n||!nt&&n;for(i=new yt(u,r),o(u)&&(n&&0===f?i.prev():n||f!==u.nodeValue.length||i.next());t=i.current();){if(h(t)){if(!t.getAttribute("data-mce-bogus")&&(e=t.nodeName.toLowerCase(),wt[e]&&"br"!==e))return}else if(o(t)&&!ns(t.nodeValue))return;n?i.prev():i.next()}return 1}}function at(){c=/^(H[1-6]|PRE|FIGURE)$/.test(k)&&"HGROUP"!==ft?rt(v):rt();n.getParam("end_container_on_empty_block",!1)&&dei(s,y)&&s.isEmpty(r)?c=s.split(y,r):s.insertAfter(c,r);vv(n,c)}var vt,c,g,nt,s=n.dom,pt=n.schema,wt=pt.getNonEmptyElements(),p=n.selection.getRng(),r,y,k,ft,w,et,v,ut,kt,f,b,it,dt,a,ot,st,d,gt,ht,l,ni,ct;aw(s,p).each(function(n){p.setStart(n.startContainer,n.startOffset);p.setEnd(n.endContainer,n.endOffset)});var u=p.startContainer,tt=p.startOffset,v=oi(n),bt=!(!i||!i.shiftKey),ti=!(!i||!i.ctrlKey);h(u)&&u.hasChildNodes()&&(nt=tt>u.childNodes.length-1,u=u.childNodes[Math.min(tt,u.childNodes.length-1)]||u,tt=nt&&o(u)?u.nodeValue.length:0);ct=gei(s,u);ct&&((v&&!bt||!v&&bt)&&(u=function(n,t,i,r){var e,s,u,c,l,a,h=v||"P",o=n.dom,y=gei(o,i),f=o.getParent(i,o.isBlock);if(!f||!dei(o,f)){if(l=((f=f||y)===n.getBody()||(a=f)&&/^(TD|TH|CAPTION)$/.test(a.nodeName)?f:f.parentNode).nodeName.toLowerCase(),!f.hasChildNodes())return yv(n,e=o.create(h)),f.appendChild(e),t.setStart(e,0),t.setEnd(e,0),e;for(u=i;u.parentNode!==f;)u=u.parentNode;for(;u&&!o.isBlock(u);)u=(s=u).previousSibling;if(s&&n.schema.isValidChild(l,h.toLowerCase())){for(yv(n,e=o.create(h)),s.parentNode.insertBefore(e,s),u=s;u&&!o.isBlock(u);)c=u.nextSibling,e.appendChild(u),u=c;t.setStart(i,r);t.setEnd(i,r)}}return i}(n,p,u,tt)),y=(r=s.getParent(u,s.isBlock))?s.getParent(r.parentNode,s.isBlock):null,k=r?r.nodeName.toUpperCase():"","LI"!==(ft=y?y.nodeName.toUpperCase():"")||ti||(y=(r=y).parentNode,k=ft),/^(LI|DT|DD)$/.test(k)&&s.isEmpty(r)?(kt=rt,f=y,b=r,it=v,l=(ut=n).dom,ni=ut.selection.getRng(),f!==ut.getBody()&&(a=(it=kei(dt=f)&&kei(dt.parentNode)?"LI":it)?kt(it):l.create("BR"),kk(f,b,!0)&&kk(f,b,!1)?bei(f,"LI")?(ot=bk(f),l.insertAfter(a,ot),(null===(ht=(gt=f).parentNode)||void 0===ht?void 0:ht.firstChild)===gt?l.remove(ot):l.remove(f)):l.replace(a,f):(kk(f,b,!0)?bei(f,"LI")?(l.insertAfter(a,bk(f)),a.appendChild(l.doc.createTextNode(" ")),a.appendChild(f)):f.parentNode.insertBefore(a,f):kk(f,b,!1)?l.insertAfter(a,bk(f)):(f=bk(f),(st=ni.cloneRange()).setStartAfter(b),st.setEndAfter(f),d=st.extractContents(),"LI"===it&&d.firstChild&&"LI"===d.firstChild.nodeName?(a=d.firstChild,l.insertAfter(d,f)):(l.insertAfter(d,f),l.insertAfter(a,f))),l.remove(b)),vv(ut,a))):v&&r===n.getBody()||(v=v||"P",bh(r)?(c=ln(r),s.isEmpty(r)&&aot(r),yv(n,c),vv(n,c)):lt()?at():lt(!0)?(c=r.parentNode.insertBefore(rt(),r),vv(n,vot(r,"HR")?c:r)):((et=(w=p).cloneRange()).setStart(w.startContainer,yot(!0,w.startContainer,w.startOffset)),et.setEnd(w.endContainer,yot(!1,w.endContainer,w.endOffset)),(vt=et.cloneRange()).setEndAfter(r),g=vt.extractContents(),e(iyt(t.fromDom(g),gr),function(n){var t=n.dom;t.nodeValue=ae(t.nodeValue)}),function(n){for(;o(n)&&(n.nodeValue=n.nodeValue.replace(/^[\r\n]+/,"")),n=n.firstChild;);}(g),c=g.firstChild,s.insertAfter(g,r),function(n,t){var r,u,i=c,f=[];if(i){for(;i=i.firstChild;){if(n.isBlock(i))return;h(i)&&!t[i.nodeName.toLowerCase()]&&f.push(i)}for(r=f.length;r--;)!(i=f[r]).hasChildNodes()||i.firstChild===i.lastChild&&""===i.firstChild.nodeValue?n.remove(i):(u=i)&&"A"===u.nodeName&&n.isEmpty(u)&&n.remove(i)}}(s,wt),function(n,t){t.normalize();var i=t.lastChild;i&&!/^(left|right)$/gi.test(n.getStyle(i,"float",!0))||n.add(t,"br")}(s,r),s.isEmpty(r)&&aot(r),c.normalize(),s.isEmpty(c)?(s.remove(c),at()):(yv(n,c),vv(n,c))),s.setAttrib(c,"id",""),n.fire("NewBlock",{newBlock:c})))}function noi(n,t,i){var r=n.dom.createRng();i?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t));n.selection.setRng(r);fv(n,r)}function cgi(n,i){var r=t.fromTag("br");ou(t.fromDom(i),r);n.undoManager.add()}function lgi(n,i){oni(n.getBody(),i)||kl(t.fromDom(i),t.fromTag("br"));var r=t.fromTag("br");kl(t.fromDom(i),r);noi(n,r.dom,!1);n.undoManager.add()}function toi(n){return n&&"A"===n.nodeName&&"href"in n}function agi(n){return n.fold(it,toi,toi,it)}function vgi(n,t){t.fold(y,u(cgi,n),u(lgi,n),y)}function ioi(n,t){var r,f,e,o=(f=u(ps,r=n),e=i.fromRangeStart(r.selection.getRng()),vf(f,r.getBody(),e).filter(agi));o.isSome()?o.each(u(vgi,n)):function(n,t){var f,h,l=n.selection,u=n.dom,r=l.getRng(),c,e,i;aw(u,r).each(function(n){r.setStart(n.startContainer,n.startOffset);r.setEnd(n.endContainer,n.endOffset)});e=r.startOffset;i=r.startContainer;1===i.nodeType&&i.hasChildNodes()&&(c=e>i.childNodes.length-1,i=i.childNodes[Math.min(e,i.childNodes.length-1)]||i,e=c&&3===i.nodeType?i.nodeValue.length:0);var o=u.getParent(i,u.isBlock),s=o?u.getParent(o.parentNode,u.isBlock):null,a=s?s.nodeName.toUpperCase():"",v=!(!t||!t.ctrlKey);"LI"!==a||v||(o=s);i&&3===i.nodeType&&e>=i.nodeValue.length&&!function(n){for(var t,r=new yt(i,o),u=n.getNonEmptyElements();t=r.next();)if(u[t.nodeName.toLowerCase()]||0<t.length)return 1}(n.schema)&&(f=u.create("br"),r.insertNode(f),r.setStartAfter(f),r.setEndAfter(f),h=!0);f=u.create("br");fit(u,r,f);noi(n,f,h);n.undoManager.add()}(n,t)}function roi(n,i){return lot(n).filter(function(n){return 0<i.length&&lh(t.fromDom(n),i)}).isSome()}function ygi(n){return roi(n,n.getParam("no_newline_selector",""))}function pot(n){return function(t){return""===oi(t)===n}}function uoi(n){return function(i){return lot(i).filter(function(n){return ua(t.fromDom(n))}).isSome()===n}}function foi(n,t){return function(i){return lot(i).fold(f(""),function(n){return n.nodeName.toUpperCase()})===n.toUpperCase()===t}}function dk(n){return foi("pre",n)}function gk(n){return function(t){return t.getParam("br_in_pre",!0)===n}}function pgi(n){return roi(n,n.getParam("br_newline_selector",".mce-toc h2,figcaption,caption"))}function pv(n,t){return t}function eoi(n){var i=oi(n),t=function(n,t){for(var u,r=n.getRoot(),i=t;i!==r&&"false"!==n.getContentEditable(i);)"true"===n.getContentEditable(i)&&(u=i),i=i.parentNode;return i!==r?u:r}(n.dom,n.selection.getStart());return t&&n.schema.isValidChild(t.nodeName,i||"P")}function wr(t,i){return function(r,u){return fu(t,function(n,t){return n&&t(r,u)},!0)?n.some(i):n.none()}}function ooi(n,t){var r,i;r=n;i=t;hui([wr([ygi],er.none()),wr([foi("summary",!0)],er.br()),wr([dk(!0),gk(!1),pv],er.br()),wr([dk(!0),gk(!1)],er.block()),wr([dk(!0),gk(!0),pv],er.block()),wr([dk(!0),gk(!0)],er.br()),wr([uoi(!0),pv],er.br()),wr([uoi(!0)],er.block()),wr([pot(!0),pv,eoi],er.block()),wr([pot(!0)],er.br()),wr([pgi],er.br()),wr([pot(!1),pv],er.br()),wr([eoi],er.block())],[r,!(!i||!i.shiftKey)]).getOr(er.none()).fold(function(){ioi(n,t)},function(){hgi(n,t)},y)}function soi(n){return n.stopImmediatePropagation()}function hoi(n){return n.keyCode===s.PAGE_UP||n.keyCode===s.PAGE_DOWN}function coi(n,t,i){i&&!n.get()?t.on("NodeChange",soi,!0):!i&&n.get()&&t.off("NodeChange",soi);n.set(i)}function loi(r,u){var f=u.container(),e=u.offset();return o(f)?(f.insertData(e,r),n.some(i(f,e+r.length))):nw(u).map(function(n){var f=t.fromText(r);return(u.isAtEnd()?kl:ou)(n,f),i(f.dom,r.length)})}function wgi(n,t){return function(i){return f=n,(!lut(e=i)&&(r=e,cf((u=f).dom,r).isNone()||yu(u.dom,r).isNone()||cft(u,r)||snt(u,r)||cut(u,r)||hut(u,r)||kdt(f,e)||ddt(f,e))?cni:lni)(t);var u,r,f,e}}function bgi(n){var r,f,h=i.fromRangeStart(n.selection.getRng()),e=t.fromDom(n.getBody()),o,s;return n.selection.isCollapsed()?(o=u(ps,n),s=i.fromRangeStart(n.selection.getRng()),vf(o,n.getBody(),s).bind((f=e,function(n){return n.fold(function(n){return cf(f.dom,i.before(n))},function(n){return pi(n)},function(n){return lf(n)},function(n){return yu(f.dom,i.after(n))})})).bind(wgi(e,h)).exists((r=n,function(n){return r.selection.setRng(n.toRange()),r.nodeChanged(),!0}))):!1}function kgi(n){var t,c,f,l,a,o,i,h,y,p,e,w,b,k,r=ngi(n);return n.on("keyup compositionstart",u(ugi,n)),k=r,(b=n).on("keydown",function(n){var t,i,u,r;!1===n.isDefaultPrevented()&&(t=b,i=k,u=n,r=kr().os,ol([{keyCode:s.RIGHT,action:v(iei,t,!0)},{keyCode:s.LEFT,action:v(iei,t,!1)},{keyCode:s.UP,action:v(rei,t,!1)},{keyCode:s.DOWN,action:v(rei,t,!0)},{keyCode:s.RIGHT,action:v(pei,t,!0)},{keyCode:s.LEFT,action:v(pei,t,!1)},{keyCode:s.UP,action:v(wei,t,!1)},{keyCode:s.DOWN,action:v(wei,t,!0)},{keyCode:s.RIGHT,action:v(sei,t,!0)},{keyCode:s.LEFT,action:v(sei,t,!1)},{keyCode:s.UP,action:v(hei,t,!1)},{keyCode:s.DOWN,action:v(hei,t,!0)},{keyCode:s.RIGHT,action:v(cfi,t,i,!0)},{keyCode:s.LEFT,action:v(cfi,t,i,!1)},{keyCode:s.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:v(tni,t,i)},{keyCode:s.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:v(ini,t,i)},{keyCode:s.UP,action:v(oei,t,!1)},{keyCode:s.DOWN,action:v(oei,t,!0)}],u).each(function(){u.preventDefault()}))}),w=r,(e=n).on("keydown",function(n){var t,i,r;!1===n.isDefaultPrevented()&&(i=w,r=n,ol([{keyCode:s.BACKSPACE,action:v(kfi,t=e,!1)},{keyCode:s.BACKSPACE,action:v(rk,t,!1)},{keyCode:s.DELETE,action:v(rk,t,!0)},{keyCode:s.BACKSPACE,action:v(ik,t,!1)},{keyCode:s.DELETE,action:v(ik,t,!0)},{keyCode:s.BACKSPACE,action:v(yk,t,i,!1)},{keyCode:s.DELETE,action:v(yk,t,i,!0)},{keyCode:s.BACKSPACE,action:v(eb,t,!1)},{keyCode:s.DELETE,action:v(eb,t,!0)},{keyCode:s.BACKSPACE,action:v(uk,t,!1)},{keyCode:s.DELETE,action:v(uk,t,!0)},{keyCode:s.BACKSPACE,action:v(wk,t,!1)},{keyCode:s.DELETE,action:v(wk,t,!0)},{keyCode:s.BACKSPACE,action:v(tk,t,!1)},{keyCode:s.DELETE,action:v(tk,t,!0)},{keyCode:s.BACKSPACE,action:v(nk,t,!1)},{keyCode:s.DELETE,action:v(nk,t,!0)},{keyCode:s.BACKSPACE,action:v(pk,t,!1)},{keyCode:s.DELETE,action:v(pk,t,!0)}],r).each(function(){r.preventDefault()}))}),e.on("keyup",function(n){var t,i;!1===n.isDefaultPrevented()&&(i=n,ol([{keyCode:s.BACKSPACE,action:v(rui,t=e)},{keyCode:s.DELETE,action:v(rui,t)}],i))}),(p=n).on("keydown",function(n){var t,i,r;n.keyCode===s.ENTER&&(t=p,(i=n).isDefaultPrevented()||(i.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete");ooi(t,i)})))}),(y=n).on("keydown",function(n){var t;!1===n.isDefaultPrevented()&&(t=n,ol([{keyCode:s.SPACEBAR,action:v(bgi,y)}],t).each(function(){t.preventDefault()}))}),i=o=n,h=dtt(function(){i.composing||tgt(i)},0),sni.isIE()&&(i.on("keypress",function(){h.throttle()}),i.on("remove",function(){h.cancel()})),o.on("input",function(n){!1===n.isComposing&&tgt(o)}),a=r,(l=n).on("keydown",function(n){var t,i,r;!1===n.isDefaultPrevented()&&(i=a,r=n,ol([{keyCode:s.END,action:v(uei,t=l,!0)},{keyCode:s.HOME,action:v(uei,t,!1)},{keyCode:s.END,action:v(cei,t,!0)},{keyCode:s.HOME,action:v(cei,t,!1)},{keyCode:s.END,action:v(vk,t,!0,i)},{keyCode:s.HOME,action:v(vk,t,!1,i)}],r).each(function(){r.preventDefault()}))}),t=n,c=r,hni.os.isOSX()||(f=hi(!1),t.on("keydown",function(n){hoi(n)&&coi(f,t,!0)}),t.on("keyup",function(n){var i,r,u;!1===n.isDefaultPrevented()&&(u=n,ol([{keyCode:s.PAGE_UP,action:v(vk,i=t,!1,r=c)},{keyCode:s.PAGE_DOWN,action:v(vk,i,!0,r)}],u));hoi(n)&&f.get()&&(coi(f,t,!1),t.nodeChanged())})),r}function bot(n){var t,i;this.lastPath=[];this.editor=n;i=this;"onselectionchange"in n.getDoc()||n.on("NodeChange click mouseup keyup focus",function(i){var r=n.selection.getRng(),u={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==i.type&&vrt(u,t)||n.fire("SelectionChange");t=u});n.on("contextmenu",function(){n.fire("SelectionChange")});n.on("SelectionChange",function(){var t=n.selection.getStart(!0);t&&(l.range||!n.selection.isCollapsed())&&hw(n)&&!i.isSameElementPath(t)&&n.dom.isChildOf(t,n.getBody())&&n.nodeChanged({selectionChange:!0})});n.on("mouseup",function(t){!t.isDefaultPrevented()&&hw(n)&&("IMG"===n.selection.getNode().nodeName?ui.setEditorTimeout(n,function(){n.nodeChanged()}):n.nodeChanged())})}function poi(n){return h(n)&&fat(t.fromDom(n))}function woi(n){var t=n.getBoundingClientRect(),i=n.ownerDocument,r=i.documentElement,u=i.defaultView;return{top:t.top+u.pageYOffset-r.clientTop,left:t.left+u.pageXOffset-r.clientLeft}}function boi(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function vni(n,t){var i=ui.throttle(function(n,i){t._selectionOverrides.hideFakeCaret();t.selection.placeCaretAt(n,i)},0);return t.on("remove",i.stop),function(r){return n.on(function(n){var k,f,u,e,o,h,c,l,a,v,y,d,g,s,nt,p,w,tt,it,b,rt=Math.max(Math.abs(r.screenX-n.screenX),Math.abs(r.screenY-n.screenY));if(!n.dragging&&10<rt){if(t.fire("dragstart",{target:n.element}).isDefaultPrevented())return;n.dragging=!0;t.focus()}n.dragging&&(d=n,k={pageX:(nt=r,p=(s=t).inline?woi(s.getBody()):{left:0,top:0},b=(it=s).getBody(),w=it.inline?{left:b.scrollLeft,top:b.scrollTop}:{left:0,top:0},(g={pageX:(tt=function(n,t){if(t.target.ownerDocument===n.getDoc())return{left:t.pageX,top:t.pageY};var r,i,u,f,e,o=woi(n.getContentAreaContainer()),s=(i=(r=n).getBody(),u=r.getDoc().documentElement,f={left:i.scrollLeft,top:i.scrollTop},e={left:i.scrollLeft||u.scrollLeft,top:i.scrollTop||u.scrollTop},r.inline?f:e);return{left:t.pageX-o.left+s.left,top:t.pageY-o.top+s.top}}(s,nt)).left-p.left+w.left,pageY:tt.top-p.top+w.top}).pageX-d.relX),pageY:g.pageY+5},v=n.ghost,y=t.getBody(),v.parentNode!==y&&y.appendChild(v),f=n.ghost,e=n.width,o=n.height,h=n.maxX,c=n.maxY,a=l=0,f.style.left=(u=k).pageX+"px",f.style.top=u.pageY+"px",c<u.pageY+o&&(a=u.pageY+o-c),f.style.width=e-(l=h<u.pageX+e?u.pageX+e-h:l)+"px",f.style.height=o-a+"px",i(r.clientX,r.clientY))})}}function yni(n){function v(n){var i,r,u,f,e,o;0===n.button&&(i=gt(t.dom.getParents(n.target),function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(n){for(var i=0;i<t.length;i++)if(t[i](n))return!0;return!1}}(td,itr)).getOr(null),e=t.getBody(),td(o=i)&&o!==e&&(r=t.dom.getPos(i),u=t.getBody(),f=t.getDoc().documentElement,l.set({element:i,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?u.scrollWidth:f.offsetWidth)-2,maxY:(t.inline?u.scrollHeight:f.offsetHeight)-2,relX:n.pageX-r.x,relY:n.pageY-r.y,width:i.offsetWidth,height:i.offsetHeight,ghost:function(n,i,r){var u=t.dom,f=n.cloneNode(!0),e;return u.setStyles(f,{width:i,height:r}),u.setAttrib(f,"data-mce-selected",null),e=u.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}),u.setStyles(e,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:i,height:r}),u.setStyles(f,{margin:0,boxSizing:"border-box"}),e.appendChild(f),e}(i,i.offsetWidth,i.offsetHeight)})))}function y(n){e.on(function(t){var f,e,o,r,s,u;t.dragging&&((r=3===(u=(o=i).selection.getSel().getRangeAt(0).startContainer).nodeType?u.parentNode:u)===(s=t.element)||o.dom.isChildOf(r,s)||td(r)||((e=t.element.cloneNode(!0)).removeAttribute("data-mce-selected"),f=e,i.fire("drop",{clientX:n.clientX,clientY:n.clientY}).isDefaultPrevented()||i.undoManager.transact(function(){boi(t.element);i.insertContent(i.dom.getOuterHTML(f));i._selectionOverrides.hideFakeCaret()})),i.fire("dragend"))});ssi(e)}var f,c,e,i,l,t,a=ec(),r=d.DOM,u=document,o=vni(l=a,t=n),h=(f=e=a,function(){f.on(function(n){n.dragging&&c.fire("dragend")});ssi(f)});(c=i=n).on("mousedown",v);n.on("mousemove",o);n.on("mouseup",y);r.bind(u,"mousemove",o);r.bind(u,"mouseup",h);n.on("remove",function(){r.unbind(u,"mousemove",o);r.unbind(u,"mouseup",h)});n.on("keydown",function(n){n.keyCode===s.ESC&&h()})}function pni(n){function r(n){var i;n.isDefaultPrevented()||(i=n.dataTransfer)&&(dt(i.types,"Files")||0<i.files.length)&&(n.preventDefault(),"drop"===n.type&&db(t,"Dropped file type is not supported"))}function u(n){bw(t,n.target)&&r(n)}function f(){var n=d.DOM,i=t.dom,f=document,o=t.inline?t.getBody():t.getDoc(),s=["drop","dragover"];e(s,function(t){n.bind(f,t,u);i.bind(o,t,r)});t.on("remove",function(){e(s,function(t){n.unbind(f,t,u);i.unbind(o,t,r)})})}var i,t;yni(n);(i=n).on("drop",function(n){var t=void 0!==n.clientX?i.getDoc().elementFromPoint(n.clientX,n.clientY):null;(td(t)||"false"===i.dom.getContentEditableParent(t))&&n.preventDefault()});n.getParam("block_unsupported_drop",!0,"boolean")&&(t=n).on("init",function(){ui.setEditorTimeout(t,f,0)})}function nd(n,t){return dc(n.getBody(),t)}function wni(n){function tt(n){return n!==h&&(bs(n)||tu(n))&&r.isChildOf(n,h)}function ft(n){return fo(n)||eo(n)||nl(n)||tl(n)}function it(n){n&&f.setRng(n)}function b(t,i,r,u){return void 0===u&&(u=!0),n.fire("ShowCaret",{target:i,direction:t,before:r}).isDefaultPrevented()?null:(u&&f.scrollIntoView(i,-1===t),k.show(r,i))}function et(n){return hr(n)||ip(n)||rp(n)}function ot(n){return et(n.startContainer)||et(n.endContainer)}function a(i,o){var y,w;if(!i)return null;if(i.collapsed){if(!ot(i)){var v=o?1:-1,c=ba(v,h,i),k=c.getNode(!o);if(ss(k))return b(v,k,!!o&&!c.isAtEnd(),!1);if(y=c.getNode(o),ss(y))return b(v,y,!o&&!c.isAtEnd(),!1)}return null}var s=i.startContainer,a=i.startOffset,it=i.endOffset;return(3===s.nodeType&&0===a&&bs(s.parentNode)&&(s=s.parentNode,a=r.nodeIndex(s),s=s.parentNode),1!==s.nodeType)?null:it===a+1&&s===i.endContainer&&(w=s.childNodes[a],tt(w))?function(i){var o=i.cloneNode(!0),s=n.fire("ObjectSelected",{target:i,targetClone:o}),h,c;return s.isDefaultPrevented()?null:(h=function(i,u,e){var h=n.$,o=wy(t.fromDom(n.getBody()),"#"+d).fold(function(){return h([])},function(n){return h([n.dom])}),s,c;return 0===o.length&&(o=h('<div data-mce-bogus="all" class="mce-offscreen-selection"><\/div>').attr("id",d)).appendTo(n.getBody()),s=r.createRng(),u===e&&l.ie?(o.empty().append('<p style="font-size: 0" data-mce-bogus="all"> <\/p>').append(u),s.setStartAfter(o[0].firstChild.firstChild),s.setEndAfter(u)):(o.empty().append(ir).append(u).append(ir),s.setStart(o[0].firstChild,1),s.setEnd(o[0].lastChild,0)),o.css({top:r.getPos(i,n.getBody()).y}),o[0].focus(),c=f.getSel(),c.removeAllRanges(),c.addRange(s),s}(i,s.targetClone,o),c=t.fromDom(i),e(gi(t.fromDom(n.getBody()),"*[data-mce-selected]"),function(n){g(c,n)||se(n,nt)}),r.getAttrib(i,nt)||i.setAttribute(nt,"1"),u=i,p(),h)}(w):null}function v(){u&&u.removeAttribute(nt);wy(t.fromDom(n.getBody()),"#"+d).each(ni);u=null}var u,o,ut,c,f=n.selection,r=n.dom,y=r.isBlock,h=n.getBody(),k=vvi(n,h,y,function(){return ls(n)}),d="sel-"+r.uniqueId(),nt="data-mce-selected",ht=f.getRng,p=function(){k.hide()};return l.ceFalse&&!ne(n)&&(n.on("mouseup",function(t){var i=ht();i.collapsed&&aii(n,t.clientX,t.clientY)&&gri(n,i,!1).each(it)}),n.on("click",function(t){var i=nd(n,t.target);i&&(bs(i)&&(t.preventDefault(),n.focus()),hsi(i)&&r.isChildOf(i,f.getNode())&&v())}),n.on("blur NewBlock",v),n.on("ResizeWindow FullscreenStateChanged",k.reposition),n.on("tap",function(t){var i=t.target,r=nd(n,i);bs(r)?(t.preventDefault(),fl(n,r).each(a)):tt(i)&&fl(n,i).each(a)},!0),n.on("mousedown",function(t){var s,c,l,w,k,e,o,u=t.target;(u===h||"HTML"===u.nodeName||r.isChildOf(u,h))&&!1!==aii(n,t.clientX,t.clientY)&&((s=nd(n,u))?bs(s)?(t.preventDefault(),fl(n,s).each(a)):(v(),hsi(s)&&t.shiftKey||crt(t.clientX,t.clientY,f.getRng())||(p(),f.placeCaretAt(t.clientX,t.clientY))):tt(u)?fl(n,u).each(a):!1===ss(u)&&(v(),p(),(c=gdi(h,t.clientX,t.clientY))&&(l=u,w=c.node,e=r.getParent(l,y),o=r.getParent(w,y),!wu(e)&&(l!==o&&r.isChildOf(e,o)&&!1===bs(nd(n,e))||!r.isChildOf(o,e)&&(k=o,r.getParent(e,y)!==r.getParent(k,y))&&function(n){var u=n.firstChild,t,r;if(!wu(u))return(t=i.before(u),st(t.getNode())&&1===n.childNodes.length)?!ft(t):(r=vu(n).next(t),r&&!ft(r))}(e))||(t.preventDefault(),it(b(1,c.node,c.before,!1)),n.getBody().focus()))))}),n.on("keypress",function(n){s.modifierPressed(n)||bs(f.getNode())&&n.preventDefault()}),n.on("GetSelectionRange",function(n){var t=n.range;u&&(u.parentNode?((t=t.cloneRange()).selectNode(u),n.range=t):u=null)}),n.on("SetSelectionRange",function(t){var u,o,i,f,s,e,h,c;t.range=(u=t.range,o=n.schema.getShortEndedElements(),i=r.createRng(),f=u.startContainer,s=u.startOffset,e=u.endContainer,h=u.endOffset,w(o,f.nodeName.toLowerCase())?0===s?i.setStartBefore(f):i.setStartAfter(f):i.setStart(f,s),w(o,e.nodeName.toLowerCase())?0===h?i.setEndBefore(e):i.setEndAfter(e):i.setEnd(e,h),i);c=a(t.range,t.forward);c&&(t.range=c)}),n.on("AfterSetSelectionRange",function(n){var t=n.range,i=t.startContainer.parentNode;ot(t)||"mcepastebin"===i.id||p();r.hasClass(i,"mce-offscreen-selection")||v()}),n.on("copy",function(n){var t,u,i=n.clipboardData;n.isDefaultPrevented()||!n.clipboardData||l.ie||(t=(u=r.get(d))&&u.getElementsByTagName("*")[0])&&(n.preventDefault(),i.clearData(),i.setData("text/html",t.outerHTML),i.setData("text/plain",t.outerText||t.innerText))}),pni(n),ut=dtt(function(){var n,t;o.removed||!o.getBody().contains(document.activeElement)||(n=o.selection.getRng()).collapsed&&(t=ket(o,n,!1),o.selection.setRng(t))},0),(o=n).on("focus",function(){ut.throttle()}),o.on("blur",function(){ut.cancel()}),(c=n).on("init",function(){c.on("focusin",function(n){var t,i,r=n.target;tu(r)&&(t=dc(c.getBody(),r),i=rt(t)?t:r,c.selection.getNode()!==i&&fl(c,i).each(function(n){return c.selection.setRng(n)}))})})),{showCaret:b,showBlockCaretContainer:function(n){n.hasAttribute("data-mce-caret")&&(ln(n),it(ht()),f.scrollIntoView(n))},hideFakeCaret:p,destroy:function(){k.destroy();u=null}}}function bni(n){function f(t,i){try{n.getDoc().execCommand(t,!1,i)}catch(t){}}function u(n){return n.isDefaultPrevented()}function e(){n.shortcuts.add("meta+a",null,"SelectAll")}function p(){n.inline||t.bind(n.getDoc(),"mousedown mouseup",function(t){var r;t.target===n.getDoc().documentElement&&(r=i.getRng(),n.getBody().focus(),"mousedown"===t.type?hr(r.startContainer)||i.placeCaretAt(t.clientX,t.clientY):i.setRng(r))})}function w(){Range.prototype.getClientRects||n.on("mousedown",function(t){var i;u(t)||"HTML"!==t.target.nodeName||((i=n.getBody()).blur(),ui.setEditorTimeout(n,function(){i.focus()}))})}function b(){n.on("click",function(r){var u=r.target;/^(IMG|HR)$/.test(u.nodeName)&&"false"!==t.getContentEditableParent(u)&&(r.preventDefault(),n.selection.select(u),n.nodeChanged());"A"===u.nodeName&&t.hasClass(u,"mce-item-anchor")&&(r.preventDefault(),i.select(u))})}function o(){n.on("keydown",function(n){if(!u(n)&&n.keyCode===c&&i.isCollapsed()&&0===i.getRng().startOffset){var t=i.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return n.preventDefault(),!1}})}function k(){n.getParam("readonly")||n.on("BeforeExecCommand mousedown",function(){f("StyleWithCSS",!1);f("enableInlineTableEditing",!1);upt(n)||f("enableObjectResizing",!1)})}function d(){n.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function g(){n.inline||n.on("keydown",function(){document.activeElement===document.body&&n.getWin().focus()})}function h(){n.inline||(n.contentStyles.push("body {min-height: 150px}"),n.on("click",function(t){var i;"HTML"===t.target.nodeName&&(11<l.ie?n.getBody().focus():(i=n.selection.getRng(),n.getBody().focus(),n.selection.setRng(i),n.selection.normalize(),n.nodeChanged()))}))}function nt(){l.mac&&n.on("keydown",function(t){!s.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),n.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))})}function tt(){n.on("click",function(n){var t=n.target;do if("A"===t.tagName)return void n.preventDefault();while(t=t.parentNode)});n.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function it(){n.on("init",function(){n.dom.bind(n.getBody(),"submit",function(n){n.preventDefault()})})}function et(){var r=t.getAttribs(i.getStart().cloneNode(!1));return function(){var u=i.getStart();u!==n.getBody()&&(t.setAttrib(u,"style",null),rt(r,function(n){u.setAttributeNode(n.cloneNode(!0))}))}}function ot(){return!i.isCollapsed()&&t.getParent(i.getStart(),t.isBlock)!==t.getParent(i.getEnd(),t.isBlock)}function st(n){var r=t.create("body"),u=n.cloneContents();return r.appendChild(u),i.serializer.serialize(r,{format:"html"})}var rt=r.each,c=s.BACKSPACE,ht=s.DELETE,t=n.dom,i=n.selection,ct=n.parser,a=l.gecko,lt=l.ie,ut=l.webkit,v="data:text/mce-internal,",ft=lt?"Text":"URL",at=y;return ne(n)?(ut&&(p(),b(),it(),e(),l.iOS&&(g(),h(),tt())),a&&(w(),k(),d(),nt())):(n.on("keydown",function(r){if(!u(r)&&r.keyCode===s.BACKSPACE){var e,o=(e=i.getRng()).startContainer,h=e.startOffset,c=t.getRoot(),f=o;if(e.collapsed&&0===h){for(;f&&f.parentNode&&f.parentNode.firstChild===f&&f.parentNode!==c;)f=f.parentNode;"BLOCKQUOTE"===f.tagName&&(n.formatter.toggle("blockquote",null,f),(e=t.createRng()).setStart(o,0),e.setEnd(o,0),i.setRng(e))}}}),n.on("keydown",function(i){var f,r,e,o,s=i.keyCode;u(i)||s!==ht&&s!==c||(f=n.selection.isCollapsed(),r=n.getBody(),f&&!t.isEmpty(r)||!f&&(e=st(n.selection.getRng()),(o=t.createRng()).selectNode(n.getBody()),e!==st(o))||(i.preventDefault(),n.setContent(""),r.firstChild&&t.isBlock(r.firstChild)?n.selection.setCursorLocation(r.firstChild,0):n.selection.setCursorLocation(r,0),n.nodeChanged()))}),l.windowsPhone||n.on("keyup focusin mouseup",function(n){s.modifierPressed(n)||i.normalize()},!0),ut&&(p(),b(),oi(n)&&n.on("init",function(){f("DefaultParagraphSeparator",oi(n))}),it(),o(),ct.addNodeFilter("br",function(n){for(var t=n.length;t--;)"Apple-interchange-newline"===n[t].attr("class")&&n[t].remove()}),l.iOS?(g(),h(),tt()):e()),11<=l.ie&&(h(),o()),l.ie&&(e(),f("AutoUrlDetect",!1),n.on("dragstart",function(t){var r,u,f;(r=t).dataTransfer&&(n.selection.isCollapsed()&&"IMG"===r.target.tagName&&i.select(r.target),0<(u=n.selection.getContent()).length&&(f=v+escape(n.id)+","+escape(u),r.dataTransfer.setData(ft,f)))}),n.on("drop",function(t){var f,o,e,r;u(t)||(f=t.dataTransfer&&(r=t.dataTransfer.getData(ft))&&0<=r.indexOf(v)?(r=r.substr(v.length).split(","),{id:unescape(r[0]),html:unescape(r[1])}):null)&&f.id!==n.id&&(t.preventDefault(),o=art(t.x,t.y,n.getDoc()),i.setRng(o),e=f.html,n.queryCommandSupported("mceInsertClipboardContent")?n.execCommand("mceInsertClipboardContent",!1,{content:e,internal:!0}):n.execCommand("mceInsertContent",!1,e))})),a&&(n.on("keydown",function(r){if(!u(r)&&r.keyCode===c&&n.getBody().getElementsByTagName("hr").length&&i.isCollapsed()&&0===i.getRng().startOffset){var e=i.getNode(),f=e.previousSibling;if("HR"===e.nodeName)return t.remove(e),void r.preventDefault();f&&f.nodeName&&"hr"===f.nodeName.toLowerCase()&&(t.remove(f),r.preventDefault())}}),w(),n.on("keypress",function(t){var i;if(!u(t)&&(8===t.keyCode||46===t.keyCode)&&ot())return i=et(),n.getDoc().execCommand("delete",!1,null),i(),t.preventDefault(),!1}),t.bind(n.getDoc(),"cut",function(t){var i;!u(t)&&ot()&&(i=et(),ui.setEditorTimeout(n,function(){i()}))}),k(),n.on("SetContent ExecCommand",function(n){"setcontent"!==n.type&&"mceInsertLink"!==n.command||rt(t.select("a"),function(n){var i=n.parentNode,r=t.getRoot();if(i.lastChild===n){for(;i&&!t.isBlock(i);){if(i.parentNode.lastChild!==i||i===r)return;i=i.parentNode}t.add(i,"br",{"data-mce-bogus":1})}})}),d(),nt(),o())),{refreshContentEditable:at,isHidden:function(){if(!a||n.removed)return!1;var t=n.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}}function koi(n){return vl(n,function(n){return!1===tr(n)})}function doi(n){var t=n.settings,i=n.editorUpload.blobCache;return koi({allow_conditional_comments:t.allow_conditional_comments,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_html_in_named_anchor:t.allow_html_in_named_anchor,allow_script_urls:t.allow_script_urls,allow_unsafe_link_target:t.allow_unsafe_link_target,convert_fonts_to_spans:t.convert_fonts_to_spans,fix_list_elements:t.fix_list_elements,font_size_legacy_values:t.font_size_legacy_values,forced_root_block:t.forced_root_block,forced_root_block_attrs:t.forced_root_block_attrs,padd_empty_with_br:t.padd_empty_with_br,preserve_cdata:t.preserve_cdata,remove_trailing_brs:t.remove_trailing_brs,inline_styles:t.inline_styles,root_name:n.inline?n.getElement().nodeName.toLowerCase():void 0,validate:!0,blob_cache:i,document:n.getDoc(),images_dataimg_filter:t.images_dataimg_filter})}function kni(i){var r,u,f;i.bindPendingEventDelegates();i.initialized=!0;i.fire("Init");i.focus(!0);f=(u=i).dom.getRoot();u.inline||hw(u)&&u.selection.getStart(!0)!==f||pi(f).each(function(i){var r,e,o,f,s=i.getNode(),h=vh(s)?pi(s).getOr(i):i;l.browser.isIE()?(r=u,e=h.toRange(),o=t.fromDom(r.getBody()),f=(akt(r)?n.from(e):n.none()).map(vkt).filter(drt(o)),r.bookmark=f.isSome()?f:r.bookmark):u.selection.setRng(h.toRange())});i.nodeChanged({initial:!0});i.execCallback("init_instance_callback",i);(r=i).settings.auto_focus&&ui.setEditorTimeout(r,function(){var n=!0===r.settings.auto_focus?r:r.editorManager.get(r.settings.auto_focus);n.destroyed||n.focus()},100)}function goi(n){return(n.inline?n.ui:n.dom).styleSheetLoader}function nsi(n){function s(){k.unloadAll(l);n.inline||n.ui.styleSheetLoader.unloadAll(c)}function h(){n.removed?s():n.on("remove",s)}var f,k=goi(n),c=rpt(n),l=n.contentCSS,i,a,v,e,o,y,p,w,u,b;return 0<n.contentStyles.length&&(f="",r.each(n.contentStyles,function(n){f+=n+"\r\n"}),n.dom.addStyle(f)),b=ri.all((i=n,a=l,v=c,e=[new ri(function(n,t){return goi(i).loadAll(a,n,t)})],i.inline?e:e.concat([new ri(function(n,t){return i.ui.styleSheetLoader.loadAll(v,n,t)})]))).then(h).catch(h),n.settings.content_style&&(y=(o=n).settings.content_style,p=t.fromDom(o.getBody()),w=yg(ko(p)),du(u=t.fromTag("style"),"type","text/css"),ii(u,t.fromText(y)),ii(w,u),o.on("remove",function(){ni(u)})),b}function kot(n){var t;!0!==n.removed&&(ne(t=n)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),kni(n))}function dot(n,f){var tt=n.settings,ut=n.getElement(),p=n.getDoc(),l,w,o,ot,st,ct,lt,a,b,k,g,v,at,ft,h,nt,vt,it,y,rt,et,yt,wt;tt.inline||(n.getElement().style.visibility=n.orgVisibility);f||n.inline||(p.open(),p.write(n.iframeHTML),p.close());n.inline&&(nst.addClass(ut,"mce-content-body"),n.contentDocument=p=document,n.contentWindow=window,n.bodyElement=ut,n.contentAreaContainer=ut);v=n.getBody();v.disabled=!0;n.readonly=!!tt.readonly;n.readonly||(n.inline&&"static"===nst.getStyle(v,"position",!0)&&(v.style.position="relative"),v.contentEditable=n.getParam("content_editable_state",!0));v.disabled=!1;n.editorUpload=cki(n);n.schema=le(tt);n.dom=d(p,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:tt.force_hex_style_colors,update_styles:!0,root_element:n.inline?n.getBody():null,collect:function(){return n.inline},schema:n.schema,contentCssCors:n.getParam("content_css_cors",!1,"boolean"),referrerPolicy:npt(n),onSetAttrib:function(t){n.fire("SetAttrib",t)}});n.parser=((w=cet(doi(l=n),l.schema)).addAttributeFilter("src,href,style,tabindex",function(n,t){for(var r,i,f=n.length,e=l.dom,u="data-mce-"+t;f--;)(i=(r=n[f]).attr(t))&&!r.attr(u)&&0!==i.indexOf("data:")&&0!==i.indexOf("blob:")&&("style"===t?((i=e.serializeStyle(e.parseStyle(i),r.name)).length||(i=null),r.attr(u,i),r.attr(t,i)):"tabindex"===t?(r.attr(u,i),r.attr(t,null)):r.attr(u,l.convertURL(i,t,r.name)))}),w.addNodeFilter("script",function(n){for(var i,r,t=n.length;t--;)i=n[t],r=i.attr("type")||"no/type",0!==r.indexOf("mce-")&&i.attr("type","mce-"+r)}),l.settings.preserve_cdata&&w.addNodeFilter("#cdata",function(n){for(var t,i=n.length;i--;)t=n[i],t.type=8,t.name="#comment",t.value="[CDATA["+l.dom.encode(t.value)+"]]"}),w.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(n){for(var t,i=n.length,r=l.schema.getNonEmptyElements();i--;)t=n[i],t.isEmpty(r)&&0===t.getAll("br").length&&(t.append(new ru("br",1)).shortEnded=!0)}),w);n.serializer=sii((o=n.settings,c(c({},doi(n)),koi({url_converter:o.url_converter,url_converter_scope:o.url_converter_scope,element_format:o.element_format,entities:o.entities,entity_encoding:o.entity_encoding,indent:o.indent,indent_after:o.indent_after,indent_before:o.indent_before,block_elements:o.block_elements,boolean_attributes:o.boolean_attributes,custom_elements:o.custom_elements,extended_valid_elements:o.extended_valid_elements,invalid_elements:o.invalid_elements,invalid_styles:o.invalid_styles,move_caret_before_on_enter_elements:o.move_caret_before_on_enter_elements,non_empty_elements:o.non_empty_elements,schema:o.schema,self_closing_elements:o.self_closing_elements,short_ended_elements:o.short_ended_elements,special:o.special,text_block_elements:o.text_block_elements,text_inline_elements:o.text_inline_elements,valid_children:o.valid_children,valid_classes:o.valid_classes,valid_elements:o.valid_elements,valid_styles:o.valid_styles,verify_html:o.verify_html,whitespace_elements:o.whitespace_elements}))),n);n.selection=uii(n.dom,n.getWin(),n.serializer,n);n.annotator=tbt(n);n.formatter=sri(n);n.undoManager=cri(n);n._nodeChangeDispatcher=new ani(n);n._selectionOverrides=wni(n);a=n;b=ec();k=hi(!1);g=svt(function(n){a.fire("longpress",c(c({},n),{type:"longpress"}));k.set(!0)},400);a.on("touchstart",function(n){gfi(n).each(function(t){g.cancel();var i={x:t.clientX,y:t.clientY,target:n.target};g.throttle(n);k.set(!1);b.set(i)})},!0);a.on("touchmove",function(n){g.cancel();gfi(n).each(function(n){b.on(function(t){var i=n,r=t,u=Math.abs(i.clientX-r.x),f=Math.abs(i.clientY-r.y);(5<u||5<f)&&(b.clear(),k.set(!1),a.fire("longpresscancel"))})})},!0);a.on("touchend touchcancel",function(n){g.cancel();"touchcancel"!==n.type&&b.get().filter(function(t){return t.target.isEqualNode(n.target)}).each(function(){k.get()?n.preventDefault():a.fire("tap",c(c({},n),{type:"tap"}))})},!0);(ct=st=n).on("click",function(n){ct.dom.getParent(n.target,"details")&&n.preventDefault()});(lt=st).parser.addNodeFilter("details",function(n){e(n,function(n){n.attr("data-mce-open",n.attr("open"));n.attr("open","open")})});lt.serializer.addNodeFilter("details",function(n){e(n,function(n){var t=n.attr("data-mce-open");n.attr("open",ht(t)?t:null);n.attr("data-mce-open",null)})});ne(n)||(ot=n).on("click",function(n){var f,r,t,u,e;3<=n.detail&&(t=(f=ot).selection.getRng(),u=i.fromRangeStart(t),e=i.fromRangeEnd(t),!i.isElementPosition(u)||poi(r=u.container())&&pi(r).each(function(n){return t.setStart(n.container(),n.offset())}),!i.isElementPosition(e)||poi(r=u.container())&&lf(r).each(function(n){return t.setEnd(n.container(),n.offset())}),f.selection.setRng(dut(t)))});yt=ne(at=n)?hi(null):kgi(at);et=yt;(rt=n).addCommand("delete",function(){var n,t=et;kfi(n=rt)||rk(n,!1)||ik(n,!1)||yk(n,t,!1)||nk(n,!1)||eb(n)||uk(n,!1)||wk(n,!1)||tk(n)||pk(n,!1)||(dfi(n,"Delete"),vri(n))});rt.addCommand("forwardDelete",function(){var n,t=et;rk(n=rt,!0)||ik(n,!0)||yk(n,t,!0)||nk(n,!0)||eb(n)||uk(n,!0)||wk(n,!0)||tk(n)||pk(n,!0)||dfi(n,"ForwardDelete")});oi(ft=n)&&ft.on("NodeChange",u(rgi,ft));nt=(h=n).dom;vt=oi(h);it=h.getParam("placeholder",yvi.getAttrib(h.getElement(),"placeholder"),"string");y=function(n,i){var u,r,f;(function(n){if(lri(n)){var t=n.keyCode;return!ari(n)&&(s.metaKeyPressed(n)||n.altKey||112<=t&&t<=123||dt(cdi,t))}})(n)||(u=h.getBody(),r=!(lri(f=n)&&!(ari(f)||"keyup"===f.type&&229===f.keyCode))&&function(n,i,r){if(pt(t.fromDom(i),!1)){var f=""===r,u=i.firstElementChild;return!u||!n.getStyle(i.firstElementChild,"padding-left")&&!n.getStyle(i.firstElementChild,"padding-right")&&(f?!n.isBlock(u):r===u.nodeName.toLowerCase())}return!1}(nt,u,vt),""!==nt.getAttrib(u,pui)===r&&!i||(nt.setAttrib(u,pui,r?it:null),nt.setAttrib(u,"aria-placeholder",r?it:null),h.fire("PlaceholderToggle",{state:r}),h.on(r?"keydown":"keyup",y),h.off(r?"keyup":"keydown",y)))};it&&h.on("init",function(n){y(n,!0);h.on("change SetContent ExecCommand",y);h.on("paste",function(n){return ui.setEditorTimeout(h,function(){return y(n)})})});wt=ubi(n),function(n){var t=n.settings,f=n.getDoc(),u=n.getBody(),i;n.fire("PreInit");t.browser_spellcheck||t.gecko_spellcheck||(f.body.spellcheck=!1,nst.setAttrib(u,"spellcheck","false"));n.quirks=bni(n);n.fire("PostRender");i=n.getParam("directionality",lu.isRtl()?"rtl":void 0);void 0!==i&&(u.dir=i);t.protect&&n.on("BeforeSetContent",function(n){r.each(t.protect,function(t){n.content=n.content.replace(t,function(n){return"<!--mce:protected "+escape(n)+"-->"})})});n.on("SetContent",function(){n.addVisual(n.getBody())});n.on("compositionstart compositionend",function(t){n.composing="compositionstart"===t.type})}(n);wt.fold(function(){nsi(n).then(function(){return kot(n)})},function(t){n.setProgressState(!0);nsi(n).then(function(){t().then(function(){n.setProgressState(!1);kot(n)},function(t){n.notificationManager.open({type:"error",text:String(t)});kot(n)})})})}function dni(n,i){var f,e,o,u,h=n.translate("Rich Text Area"),r=(f=n.id,e=h,i.height,o=n.getParam("iframe_attrs",{}),oe(u=t.fromTag("iframe"),o),oe(u,{id:f+"_ifr",frameBorder:"0",allowTransparency:"true",title:e}),pp(u,"tox-edit-area__iframe"),u.dom),s;return r.onload=function(){r.onload=null;n.fire("load")},s=function(n,t){var i,r;return document.domain!==window.location.hostname&&l.browser.isIE()?(i=uri("mce"),n[i]=function(){dot(n)},r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+n.id+'");document.write(ed.iframeHTML);document.close();ed.'+i+"(true);})()",wv.setAttrib(t,"src",r),!0):!1}(n,r),n.contentAreaContainer=i.iframeContainer,n.iframeElement=r,n.iframeHTML=function(n){var t=n.getParam("doctype","<!DOCTYPE html>")+"<html><head>";n.getParam("document_base_url","")!==n.documentBaseUrl&&(t+='<base href="'+n.documentBaseURI.getURI()+'" />');t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var i=byt(n,"body_id","tinymce"),r=byt(n,"body_class",""),u=n.translate(n.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string"));return kyt(n)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+kyt(n)+'" />'),t+('<\/head><body id="'+i+'" class="mce-content-body '+r+'" data-id="'+n.id)+'" aria-label="'+u+'"><br><\/body><\/html>'}(n),wv.add(i.iframeContainer,r),s}function tsi(n){return n.replace(/^\-/,"")}function isi(n){return{editorContainer:n,iframeContainer:n,api:{}}}function gni(n){var i,r,t,f,e,u,o,s=n.getElement();return n.orgDisplay=s.style.display,ht(pa(n))?n.theme.renderUI():ft(pa(n))?(r=(i=n).getElement(),(t=pa(i)(i,r)).editorContainer.nodeType&&(t.editorContainer.id=t.editorContainer.id||i.id+"_parent"),t.iframeContainer&&t.iframeContainer.nodeType&&(t.iframeContainer.id=t.iframeContainer.id||i.id+"_iframecontainer"),t.height=t.iframeHeight||r.offsetHeight,t):(o=(f=n).getElement(),f.inline?isi(null):(e=o,u=csi.create("div"),csi.insertAfter(u,e),isi(u)))}function rsi(t){var o,v,p,i,b,u,k,d,f,s,g,a;t.fire("ScriptsLoaded");o=t;v=r.trim(gyt(o));p=o.ui.registry.getAll().icons;et(c(c({},kb.get("default").icons),kb.get(v).icons),function(n,t){w(p,t)||o.ui.registry.addIcon(t,n)});u=pa(i=t);ht(u)?(i.settings.theme=tsi(u),b=oo.get(u),i.theme=new b(i,oo.urls[u]),i.theme.init&&i.theme.init(i,oo.urls[u]||i.documentBaseUrl.replace(/\/$/,""),i.$)):i.theme={};d=[];r.each(oit(k=t).split(/[ ,]/),function(n){lsi(k,d,tsi(n))});var h=gni(t),l=t,e=n.from(h.api).getOr({}),nt={show:n.from(e.show).getOr(y),hide:n.from(e.hide).getOr(y),disable:n.from(e.disable).getOr(y),isDisabled:n.from(e.isDisabled).getOr(it),enable:function(){l.mode.isReadOnly()||n.from(e.enable).map(phi)}};return l.ui=c(c({},l.ui),nt),a={editorContainer:h.editorContainer,iframeContainer:h.iframeContainer},t.editorContainer=a.editorContainer||null,oki(t),t.inline?dot(t):(g=dni(f=t,s=a),s.editorContainer&&(wv.get(s.editorContainer).style.display=f.orgDisplay,f.hidden=wv.isHidden(s.editorContainer)),f.getElement().style.display="none",wv.setAttrib(f.id,"aria-hidden","true"),void(g||dot(f)))}function usi(n){return"-"===n.charAt(0)}function fsi(t,i,r){return n.from(i).filter(function(n){return 0<n.length&&!kb.has(n)}).map(function(i){return{url:t.editorManager.baseURL+"/icons/"+i+"/icons"+r+".js",name:n.some(i)}})}function ntr(t,i){var o,s,f=kf.ScriptLoader,c=f,l=i,h=function(){var u,c,v,o,p,h,l,s,a;p=f;s=tpt(h=t);a=h.getParam("language_url","","string");!1===lu.hasCode(s)&&"en"!==s&&(l=""!==a?a:h.editorManager.baseURL+"/langs/"+s+".js",p.add(l,y,void 0,function(){yet(h,"LanguageLoadError",pet("language",l,s))}));v=f;e(function(n){for(var i=[],r=function(n){i.push(n)},t=0;t<n.length;t++)n[t].each(r);return i}([fsi(o=t,"default",i),n.from(o.getParam("icons_url","","string")).filter(function(n){return 0<n.length}).map(function(t){return{url:t,name:n.none()}}).orThunk(function(){return fsi(o,gyt(o),"")})]),function(n){v.add(n.url,y,void 0,function(){yet(o,"IconsLoadError",pet("icons",n.url,n.name.getOrUndefined()))})});u=t;c=i;r.each(u.getParam("external_plugins"),function(n,t){pu.load(t,n,y,void 0,function(){wet(u,n,t)});u.settings.plugins+=" "+t});r.each(oit(u).split(/[ ,]/),function(n){var i,t;(n=r.trim(n))&&!pu.urls[n]&&(usi(n)?(n=n.substr(1,n.length),i=pu.dependencies(n),r.each(i,function(n){var t=pu.createUrl({prefix:"plugins/",resource:n,suffix:"/plugin"+c+".js"},n);pu.load(t.resource,t,y,void 0,function(){wet(u,t.prefix+t.resource+t.suffix,t.resource)})})):(t={prefix:"plugins/",resource:n,suffix:"/plugin"+c+".js"},pu.load(n,t,y,void 0,function(){wet(u,t.prefix+t.resource+t.suffix,n)})))});f.loadQueue(function(){t.removed||rsi(t)},t,function(){t.removed||rsi(t)})},u=pa(o=t);ht(u)?(usi(u)||w(oo.urls,u)||((s=o.getParam("theme_url"))?oo.load(u,o.documentBaseURI.toAbsolute(s)):oo.load(u,"themes/"+u+"/theme"+l+".js")),c.loadQueue(function(){oo.waitFor(u,h)})):h()}function esi(i){return function(r,u){return n.from(u).map(t.fromDom).filter(su).bind(function(u){return f=i,e=r,o=u.dom,ift(t.fromDom(o),function(t){return bg(i=t,f).orThunk(function(){return"font"===vt(i)?at(rtr,f).bind(function(n){return nlt(i,n)}):n.none()});var i},function(n){return g(t.fromDom(e),n)}).or((s=u.dom,n.from(d.DOM.getStyle(s,i,!0))));var f,e,o,s}).getOr("")}}function ttr(n){return pi(n.getBody()).map(function(n){var t=n.container();return o(t)?t.parentNode:t})}function got(i,r){return e=i,o=ast(n.some,r),f=e,n.from(f.selection.getRng()).bind(function(t){var i=f.getBody();return t.startContainer===i&&0===t.startOffset?n.none():n.from(f.selection.getStart(!0))}).orThunk(u(ttr,e)).map(t.fromDom).filter(su).bind(o);var e,o,f}function osi(n,t){var i,f,u;return/^[0-9.]+$/.test(t)?(i=parseInt(t,10),1<=i&&i<=7)?(f=r.explode(n.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),u=r.explode(n.getParam("font_size_classes","")),u?u[i-1]||t:f[i-1]||t):t:t}function wi(n){this.commands={state:{},exec:{},value:{}};this.editor=n;this.setupCommands(n)}function str(n,t,i){var r,f,u,e,o,s;hvt(n,t)&&!1===i?(f=t,yp(r=n)?r.dom.classList.remove(f):(o=f,0<(s=p(gtt(e=r,"class"),function(n){return n!==o})).length?du(e,"class",s.join(" ")):se(e,"class")),0===(yp(u=r)?u.dom.classList:gtt(u,"class")).length&&se(u,"class")):i&&pp(n,t)}function tst(n,t,i){try{n.getDoc().execCommand(t,!1,String(i))}catch(n){}}function rd(n,t){n.dom.contentEditable=t?"true":"false"}function htr(i,r){var o,f,u=t.fromDom(i.getBody());str(u,"mce-content-readonly",r);r?(i.selection.controlSelection.hideResizeRect(),i._selectionOverrides.hideFakeCaret(),n.from(i.selection.getNode()).each(function(n){n.removeAttribute("data-mce-selected")}),rd(u,!(i.readonly=!0)),e(gi(u,'*[contenteditable="true"]'),function(n){du(n,gs,"true");rd(n,!1)})):(rd(u,!(i.readonly=!1)),e(gi(u,"*["+gs+'="true"]'),function(n){se(n,gs);rd(n,!0)}),tst(i,"StyleWithCSS",!1),tst(i,"enableInlineTableEditing",!1),tst(i,"enableObjectResizing",!1),(ls(o=i)||(f=o,krt(ko(t.fromDom(f.getElement()))).filter(function(n){return!(void 0!==(t=n.dom.classList)&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body")))&&bw(f,n.dom);var t}).isSome()))&&i.focus(),i.selection.setRng(i.selection.getRng()),i.nodeChanged())}function ds(n){return n.readonly}function vsi(n){n.parser.addAttributeFilter("contenteditable",function(t){ds(n)&&e(t,function(n){n.attr(gs,n.attr("contenteditable"));n.attr("contenteditable","false")})});n.serializer.addAttributeFilter(gs,function(t){ds(n)&&e(t,function(n){n.attr("contenteditable",n.attr(gs))})});n.serializer.addTempAttr(gs)}function nh(n){this.bindings={};this.settings=n||{};this.scope=this.settings.scope||this;this.toggleEvent=this.settings.toggleEvent||it}function bv(n){return n._eventDispatcher||(n._eventDispatcher=new ist({scope:n,toggleEvent:function(t,i){ist.isNative(t)&&n.toggleNativeEvent&&n.toggleNativeEvent(t,i)}})),n._eventDispatcher}function ud(n,t){if("selectionchange"===t)return n.getDoc();if(!n.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t))return n.getDoc().documentElement;var i=fpt(n);return i?(n.eventRoot||(n.eventRoot=ed.select(i)[0]),n.eventRoot):n.getBody()}function ysi(n,i,r){var u,f,e,o;n.hidden||ds(n)?ds(n)&&(u=n,"click"!==(f=r).type||s.metaKeyPressed(f)||(e=t.fromDom(f.target),o=u,un(e,"a",function(n){return g(n,t.fromDom(o.getBody()))}).bind(function(n){return nlt(n,"href")}).each(function(n){var i,t;f.preventDefault();/^#/.test(n)?(i=u.dom.select(n+',[name="'+(po(t=n,"#")?t.substring(1):t)+'"]')).length&&u.selection.scrollIntoView(i[0],!0):window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))):n.fire(i,r)}function psi(n,t){var i,r;n.delegates||(n.delegates={});n.delegates[t]||n.removed||(r=ud(n,t),fpt(n)?(th||(th={},n.editorManager.on("removeEditor",function(){n.editorManager.activeEditor||th&&(et(th,function(t,i){n.dom.unbind(ud(n,i))}),th=null)})),th[t]||(th[t]=i=function(i){for(var f,e=i.target,r=n.editorManager.get(),u=r.length;u--;)f=r[u].getBody(),(f===e||ed.isChildOf(e,f))&&ysi(r[u],t,i)},ed.bind(r,t,i))):(ed.bind(r,t,i=function(i){ysi(n,t,i)}),n.delegates[t]=i))}function wsi(n,t,i,r){var f=i[t.get()],u=i[r];try{u.activate()}catch(n){return void console.error("problem while activating editor mode "+r+":",n)}f.deactivate();f.editorReadOnly!==u.editorReadOnly&&htr(n,u.editorReadOnly);t.set(r);n.fire("SwitchMode",{mode:r})}function ltr(n){var i,t={},r;rst(ust(n.toLowerCase(),"+"),function(n){n in ksi?t[n]=!0:/^[0-9]{2,}$/.test(n)?t.keyCode=parseInt(n,10):(t.charCode=n.charCodeAt(0),t.keyCode=vtr[n]||n.toUpperCase().charCodeAt(0))});r=[t.keyCode];for(i in ksi)t[i]?r.push(i):t[i]=!1;return t.id=r.join(","),t.access&&(t.alt=!0,l.mac?t.ctrl=!0:t.shift=!0),t.meta&&(l.mac?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t}function ue(n){this.shortcuts={};this.pendingPatterns=[];this.editor=n;var t=this;n.on("keyup keypress keydown",function(n){(t.hasModifier(n)||t.isFunctionKey(n))&&!n.isDefaultPrevented()&&(rst(t.shortcuts,function(i){if(t.matchShortcut(n,i))return t.pendingPatterns=i.subpatterns.slice(0),"keydown"===n.type&&t.executeShortcutAction(i),!0}),t.matchShortcut(n,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===n.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))})}function b(n,t,i){function u(n,t){return function(i,r){return n[i.toLowerCase()]=c(c({},r),{type:t})}}var r,f,e,ft,b,et,k,ot,st,ht,ct,g,lt,at,nt,vt,yt,tt,o=this,s,h,v,rt,p,ut;this.plugins={};this.contentCSS=[];this.contentStyles=[];this.loadedCSS={};this.isNotDirty=!1;this.editorManager=i;this.documentBaseUrl=i.documentBaseURL;gsi(this,bsi);this.settings=(ht=(st=this).documentBaseUrl,ct=i.defaultSettings,lt=ht,at=nki,nt=st,vt={id:n,theme:"silver",toolbar_mode:hii(g=t,"floating"),plugins:"",document_base_url:lt,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:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,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:nt.convertURL,url_converter_scope:nt},yt=c(c({},vt),at?nri:{}),!1!==(tt=pbi(gii||tki,gii,yt,ct,g)).deprecation_warnings&&vbi(g,tt),tt);this.settings.suffix&&(i.suffix=this.settings.suffix);this.suffix=i.suffix;this.settings.base_url&&i._setBaseUrl(this.settings.base_url);this.baseUri=i.baseURI;this.settings.referrer_policy&&(kf.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),d.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy));rr.languageLoad=this.settings.language_load;rr.baseURL=i.baseURL;this.id=n;this.setDirty(!1);this.documentBaseURI=new ro(this.settings.document_base_url,{base_uri:this.baseUri});this.baseURI=this.baseUri;this.inline=!!this.settings.inline;this.shortcuts=new dsi(this);this.editorCommands=new asi(this);this.settings.cache_suffix&&(l.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,""));this.ui={registry:{addAutocompleter:(b={},(r={addButton:u(f={},"button"),addGroupToolbarButton:u(f,"grouptoolbarbutton"),addToggleButton:u(f,"togglebutton"),addMenuButton:u(f,"menubutton"),addSplitButton:u(f,"splitbutton"),addMenuItem:u(e={},"menuitem"),addNestedMenuItem:u(e,"nestedmenuitem"),addToggleMenuItem:u(e,"togglemenuitem"),addAutocompleter:u(ft={},"autocompleter"),addContextMenu:u(et={},"contextmenu"),addContextToolbar:u(k={},"contexttoolbar"),addContextForm:u(k,"contextform"),addSidebar:u(ot={},"sidebar"),addIcon:function(n,t){return b[n.toLowerCase()]=t},getAll:function(){return{buttons:f,menuItems:e,icons:b,popups:ft,contextMenus:et,contextToolbars:k,sidebars:ot}}}).addAutocompleter),addButton:r.addButton,addContextForm:r.addContextForm,addContextMenu:r.addContextMenu,addContextToolbar:r.addContextToolbar,addIcon:r.addIcon,addMenuButton:r.addMenuButton,addMenuItem:r.addMenuItem,addNestedMenuItem:r.addNestedMenuItem,addSidebar:r.addSidebar,addSplitButton:r.addSplitButton,addToggleButton:r.addToggleButton,addGroupToolbarButton:r.addGroupToolbarButton,addToggleMenuItem:r.addToggleMenuItem,getAll:r.getAll},styleSheetLoader:void 0,show:y,hide:y,enable:y,disable:y,isDisabled:it};ut=(rt=hi("design"),p=hi({design:{activate:y,deactivate:y,editorReadOnly:!1},readonly:{activate:y,deactivate:y,editorReadOnly:!0}}),(h=s=this).serializer?vsi(h):h.on("PreInit",function(){vsi(h)}),(v=s).on("ShowCaret",function(n){ds(v)&&n.preventDefault()}),v.on("ObjectSelected",function(n){ds(v)&&n.preventDefault()}),{isReadOnly:function(){return ds(s)},set:function(n){return function(n,t,i,r){if(r!==i.get()){if(!w(t,r))throw new Error("Editor mode '"+r+"' is invalid");n.initialized?wsi(n,i,t,r):n.on("init",function(){return wsi(n,i,t,r)})}}(s,p.get(),rt,n)},get:function(){return rt.get()},register:function(n,t){p.set(function(n,t,i){var r;if(dt(atr,t))throw new Error("Cannot override default mode "+t);return c(c({},n),((r={})[t]=c(c({},i),{deactivate:function(){try{i.deactivate()}catch(n){console.error("problem while deactivating editor mode "+t+":",n)}}}),r))}(p.get(),n,t))}});this.mode=ut;this.setMode=ut.set;i.fire("SetupEditor",{editor:this});this.execCallback("setup",this);this.$=a.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}function thi(n){var t=n.type;yf(lo.get(),function(i){switch(t){case"scroll":i.fire("ScrollWindow",n);break;case"resize":i.fire("ResizeWindow",n)}})}function ihi(n){n!==uhi&&(n?a(window).on("resize scroll",thi):a(window).off("resize scroll",thi),uhi=n)}function rhi(n){var i=nr,t;for(delete co[n.id],t=0;t<co.length;t++)if(co[t]===n){co.splice(t,1);break}return nr=p(nr,function(t){return n!==t}),lo.activeEditor===n&&(lo.activeEditor=0<nr.length?nr[0]:null),lo.focusedEditor===n&&(lo.focusedEditor=null),i.length!==nr.length}function fhi(n,t,i){var u=t.x,f=t.y,e=n.w,o=n.h,s=t.w,h=t.h,r=(i||"").split("");return"b"===r[0]&&(f+=h),"r"===r[1]&&(u+=s),"c"===r[0]&&(f+=hd(h/2)),"c"===r[1]&&(u+=hd(s/2)),"b"===r[3]&&(f-=o),"r"===r[4]&&(u-=e),"c"===r[3]&&(f-=hd(o/2)),"c"===r[4]&&(u-=hd(e/2)),sl(u,f,e,o)}function ehi(){}function sl(n,t,i,r){return{x:n,y:t,w:i,h:r}}function yd(n){this.settings=hhi({},n);this.count=0}var cl=function(n){return{eq:n}},vhi=cl(function(n,t){return n===t}),dd=cl(function(n,t){if(n===t)return!0;var i=sst(n);return i===sst(t)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(i)?n===t:"array"===i?hst(dd).eq(n,t):"object"===i&&cst(dd).eq(n,t))}),ht=bd("string"),fh=bd("object"),br=bd("array"),ll=lst(null),vst=kd("boolean"),tr=lst(void 0),ft=kd("function"),eh=kd("number"),it=f(!1),lt=f(!0),ny={fold:function(n){return n()},isSome:it,isNone:lt,getOr:bi,getOrThunk:yst,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.");},getOrNull:f(null),getOrUndefined:f(void 0),or:bi,orThunk:yst,map:ng,each:y,bind:ng,exists:it,forall:lt,filter:function(){return ny},toArray:function(){return[]},toString:f("none()")},fg=function(n){function u(){return r}function i(t){return t(n)}var t=f(n),r={fold:function(t,i){return i(n)},isSome:lt,isNone:it,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:u,orThunk:u,map:function(t){return fg(t(n))},each:function(t){t(n)},bind:i,exists:i,forall:i,filter:function(t){return t(n)?r:ny},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return r},n={some:fg,none:ng,from:function(n){return null==n?ny:fg(n)}},eg=Array.prototype.slice,whi=Array.prototype.indexOf,bhi=Array.prototype.push,bu=ft(Array.from)?Array.from:function(n){return eg.call(n)},ch=Object.keys,khi=Object.hasOwnProperty,dhi=function(n,t){var i={};return et(n,function(n,r){var u=t(n,r);i[u.k]=u.v}),i},w=function(n,t){return khi.call(n,t)},og=Array.isArray,c=function(){return(c=Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t<u;t++)for(i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n}).apply(this,arguments)},hg=function(n,t){return{major:n,minor:t}},wl={nu:hg,detect:function(n,t){function u(n){return Number(i.replace(r,"$"+n))}var i,r,f=String(t).toLowerCase();return 0===n.length?aht():(r=function(n,t){for(var r,i=0;i<n.length;i++)if(r=n[i],r.test(t))return r}(n,i=f))?hg(u(1),u(2)):{major:0,minor:0}},unknown:aht},po=function(n,t){return""===(i=t)||n.length>=i.length&&n.substr(0,0+i.length)===i;var i},cg=sg(/^\s+|\s+$/g),nci=sg(/^\s+/g),pht=sg(/\s+$/g),lg=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,wht={browsers:f([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return vi(n,"edge/")&&vi(n,"chrome")&&vi(n,"safari")&&vi(n,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,lg],search:function(n){return vi(n,"chrome")&&!vi(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return vi(n,"msie")||vi(n,"trident")}},{name:"Opera",versionRegexes:[lg,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:pf("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:pf("firefox")},{name:"Safari",versionRegexes:[lg,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(vi(n,"safari")||vi(n,"mobile/"))&&vi(n,"applewebkit")}}]),oses:f([{name:"Windows",search:pf("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return vi(n,"iphone")||vi(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:pf("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:pf("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:pf("linux"),versionRegexes:[]},{name:"Solaris",search:pf("sunos"),versionRegexes:[]},{name:"FreeBSD",search:pf("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:pf("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},bht="Firefox",tci=function(){return vht({current:void 0,version:wl.unknown()})},ici=vht,kht=(f("Edge"),f("Chrome"),f("IE"),f("Opera"),f(bht),f("Safari"),"Windows"),dht="Android",ght="Solaris",nct="FreeBSD",tct="ChromeOS",rci=function(){return yht({current:void 0,version:wl.unknown()})},uci=yht,kr=(f(kht),f("iOS"),f(dht),f("Linux"),f("OSX"),f(ght),f(nct),f(tct),fht(function(){return i=navigator.userAgent,p=n.from(navigator.userAgentData),w=ghi,a=wht.browsers(),g=wht.oses(),v=p.bind(function(n){return t=a,nht(n.brands,function(n){var i=n.brand.toLowerCase();return gt(t,function(n){var t;return i===(null===(t=n.brand)||void 0===t?void 0:t.toLowerCase())}).map(function(t){return{current:t.name,version:wl.nu(parseInt(n.version,10),0)}})});var t}).orThunk(function(){return eht(a,n=i).map(function(t){var i=wl.detect(t.versionRegexes,n);return{current:t.name,version:i}});var n}).fold(tci,ici),y=eht(g,b=i).map(function(n){var t=wl.detect(n.versionRegexes,b);return{current:n.name,version:t}}).fold(rci,uci),{browser:v,os:y,deviceType:(k=v,o=i,s=w,r=(t=y).isiOS()&&!0===/ipad/i.test(o),u=t.isiOS()&&!r,d=(h=t.isiOS()||t.isAndroid())||s("(pointer:coarse)"),e=r||!u&&h&&s("(min-device-width:768px)"),c=u||h&&!e,l=k.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),{isiPad:f(r),isiPhone:f(u),isTablet:f(e),isPhone:f(c),isTouch:f(d),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:f(l),isDesktop:f(!c&&!e&&!l)})};var i,p,w,b,t,k,o,s,r,u,h,d,e,c,l,a,g,v,y})),ict=navigator.userAgent,ag=kr(),yi=ag.browser,sr=ag.os,ku=ag.deviceType,fci=/WebKit/.test(ict)&&!yi.isEdge(),eci="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,oci=-1!==ict.indexOf("Windows Phone"),l={opera:yi.isOpera(),webkit:fci,ie:!(!yi.isIE()&&!yi.isEdge())&&yi.version.major,gecko:yi.isFirefox(),mac:sr.isOSX()||sr.isiOS(),iOS:ku.isiPad()||ku.isiPhone(),android:sr.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:yi.isIE()?document.documentMode||7:10,fileApi:eci,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!yi.isIE(),desktop:ku.isDesktop(),windowsPhone:oci,browser:{current:yi.current,version:yi.version,isChrome:yi.isChrome,isEdge:yi.isEdge,isFirefox:yi.isFirefox,isIE:yi.isIE,isOpera:yi.isOpera,isSafari:yi.isSafari},os:{current:sr.current,version:sr.version,isAndroid:sr.isAndroid,isChromeOS:sr.isChromeOS,isFreeBSD:sr.isFreeBSD,isiOS:sr.isiOS,isLinux:sr.isLinux,isOSX:sr.isOSX,isSolaris:sr.isSolaris,isWindows:sr.isWindows},deviceType:{isDesktop:ku.isDesktop,isiPad:ku.isiPad,isiPhone:ku.isiPhone,isPhone:ku.isPhone,isTablet:ku.isTablet,isTouch:ku.isTouch,isWebView:ku.isWebView}},sci=/^\s*|\s*$/g,rct=function(n,t,i,r){r=r||this;n&&yl(n=i?n[i]:n,function(n,u){return!1!==t.call(r,n,u,i)&&void rct(n,t,i,r)})},r={trim:sht,isArray:og,is:hht,toArray:function(n){if(og(n))return n;for(var i=[],t=0,r=n.length;t<r;t++)i[t]=n[t];return i},makeMap:function(n,t,i){var r;for(t=t||",",i=i||{},r=(n="string"==typeof(n=n||[])?n.split(t):n).length;r--;)i[n[r]]={};return i},each:yl,map:ug,grep:hh,inArray:rht,hasOwn:w,extend:function(n){for(var r,u,e,f,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];for(r=0;r<i.length;r++){f=i[r];for(u in f)w(f,u)&&void 0!==(e=f[u])&&(n[u]=e)}return n},create:function(n,t,i){var f,o,s,e=this,h=0,r=(n=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(n))[3].match(/(^|\.)(\w+)$/i)[2],u=e.createNS(n[3].replace(/\.\w+$/,""),i);if(!u[r]){if("static"===n[2])return u[r]=t,void(this.onCreate&&this.onCreate(n[2],n[3],u[r]));t[r]||(t[r]=function(){},h=1);u[r]=t[r];e.extend(u[r].prototype,t);n[5]&&(f=e.resolve(n[5]).prototype,o=n[5].match(/\.(\w+)$/i)[1],s=u[r],u[r]=h?function(){return f[o].apply(this,arguments)}:function(){return this.parent=f[o],s.apply(this,arguments)},u[r].prototype[r]=u[r],e.each(f,function(n,t){u[r].prototype[t]=f[t]}),e.each(t,function(n,t){f[t]?u[r].prototype[t]=function(){return this.parent=f[t],n.apply(this,arguments)}:t!==r&&(u[r].prototype[t]=n)}));e.each(t.static,function(n,t){u[r][t]=n})}},walk:rct,createNS:function(n,t){var i,r;for(t=t||window,n=n.split("."),i=0;i<n.length;i++)t[r=n[i]]||(t[r]={}),t=t[r];return t},resolve:function(n,t){var i,r;for(t=t||window,i=0,r=(n=n.split(".")).length;i<r&&(t=t[n[i]]);i++);return t},explode:function(n,t){return!n||hht(n,"array")?n:ug(n.split(t||","),sht)},_addCacheSuffix:function(n){var t=l.cacheSuffix;return t&&(n+=(-1===n.indexOf("?")?"?":"&")+t),n}},t={fromHtml:function(n,t){var i=(t||document).createElement("div");if(i.innerHTML=n,!i.hasChildNodes()||1<i.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return pl(i.childNodes[0])},fromTag:function(n,t){var i=(t||document).createElement(n);return pl(i)},fromText:function(n,t){var i=(t||document).createTextNode(n);return pl(i)},fromDom:pl,fromPoint:function(t,i,r){return n.from(t.dom.elementFromPoint(i,r)).map(pl)}},k,s,kbt,pw,dbt,gbt,rdt,nb,pd,wd;"undefined"!=typeof window||Function("return this;")();var su=fy(1),gr=fy(3),lci=fy(9),aci=fy(11),nu=function(n){return ut(n.dom.childNodes,t.fromDom)},ult=ft(Element.prototype.attachShadow)&&ft(Node.prototype.getRootNode),vci=f(ult),ko=ult?function(n){return t.fromDom(n.dom.getRootNode())}:ah,ii=function(n,t){n.dom.appendChild(t.dom)},ni=function(n){var t=n.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},na=function(i){var r=gr(i)?i.dom.parentNode:i.dom;if(null==r||null===r.ownerDocument)return!1;var f=r.ownerDocument,e=t.fromDom(r),u=ko(e);return(lct(u)?n.some(u):n.none()).fold(function(){return f.body.contains(r)},ast(na,hci))},flt=function(n,t){return{left:n,top:t,translate:function(i,r){return flt(n+i,t+r)}}},yh=flt,kg=function(n){var t,i=n.dom,r=i.ownerDocument.body;return r===i?yh(r.offsetLeft,r.offsetTop):na(n)?(t=i.getBoundingClientRect(),yh(t.left,t.top)):yh(0,0)},h=dl(1),dg=dr(["textarea","input"]),o=dl(3),yci=dl(8),gg=dl(9),nn=dl(11),st=dr(["br"]),pci=dr(["img"]),gu=dct("true"),rt=dct("false"),vy=dr(["td","th"]),tu=dr(["video","audio","object","embed"]),elt=function(n,t){return ay(n)?n.style.getPropertyValue(t):""},wci=kr().browser,olt={},tn={exports:olt};!function(){var n=this,t=function(){function l(){}function n(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0;this._handled=!1;this._value=void 0;this._deferreds=[];h(n,this)}function s(i,r){for(;3===i._state;)i=i._value;0!==i._state?(i._handled=!0,n._immediateFn(function(){var n,f=1===i._state?r.onFulfilled:r.onRejected;if(null!==f){try{n=f(i._value)}catch(n){return void t(r.promise,n)}u(r.promise,n)}else(1===i._state?u:t)(r.promise,i._value)})):i._deferreds.push(r)}function u(i,r){var u,e,o;try{if(r===i)throw new TypeError("A promise cannot be resolved with itself.");if(r&&("object"==typeof r||"function"==typeof r)){if(u=r.then,r instanceof n)return i._state=3,i._value=r,void f(i);if("function"==typeof u)return void h((e=u,o=r,function(){e.apply(o,arguments)}),i)}i._state=1;i._value=r;f(i)}catch(r){t(i,r)}}function t(n,t){n._state=2;n._value=t;f(n)}function f(t){2===t._state&&0===t._deferreds.length&&n._immediateFn(function(){t._handled||n._unhandledRejectionFn(t._value)});for(var i=0,r=t._deferreds.length;i<r;i++)s(t,t._deferreds[i]);t._deferreds=null}function a(n,t,i){this.onFulfilled="function"==typeof n?n:null;this.onRejected="function"==typeof t?t:null;this.promise=i}function h(n,i){var r=!1;try{n(function(n){r||(r=!0,u(i,n))},function(n){r||(r=!0,t(i,n))})}catch(n){if(r)return;r=!0;t(i,n)}}var i,r,e,o={exports:{}},c;return i=o,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=setTimeout,n.prototype.catch=function(n){return this.then(null,n)},n.prototype.then=function(n,t){var i=new this.constructor(l);return s(this,new a(n,t,i)),i},n.all=function(t){var i=Array.prototype.slice.call(t);return new n(function(n,t){if(0===i.length)return n([]);for(var u=i.length,r=0;r<i.length;r++)!function f(r,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var o=e.then;if("function"==typeof o)return o.call(e,function(n){f(r,n)},t),0}i[r]=e;0==--u&&n(i)}catch(e){t(e)}}(r,i[r])})},n.resolve=function(t){return t&&"object"==typeof t&&t.constructor===n?t:new n(function(n){n(t)})},n.reject=function(t){return new n(function(n,i){i(t)})},n.race=function(t){return new n(function(n,i){for(var r=0,u=t.length;r<u;r++)t[r].then(n,i)})},n._immediateFn="function"==typeof setImmediate?function(n){setImmediate(n)}:function(n){e(n,0)},n._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},n._setImmediateFn=function(t){n._immediateFn=t},n._setUnhandledRejectionFn=function(t){n._unhandledRejectionFn=t},i.exports?i.exports=n:r.Promise||(r.Promise=n),c=o.exports,{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||c}};"object"==typeof olt&&void 0!==tn?tn.exports=t():(n="undefined"!=typeof globalThis?globalThis:n||self).EphoxContactWrapper=t()}();var hlt=tn.exports.boltExport,rn=function(t){function f(n){u()?o(n):r.push(n)}var i=n.none(),r=[],u=function(){return i.isSome()},o=function(n){i.each(function(t){setTimeout(function(){n(t)},0)})};return t(function(t){u()||(i=n.some(t),e(r,o),r=[])}),{get:f,map:function(n){return rn(function(t){f(function(i){t(n(i))})})},isReady:u}},kci={nu:rn,pure:function(n){return rn(function(t){t(n)})}},ta=function(n){function t(t){n().then(t,bci)}return{map:function(t){return ta(function(){return n().then(t)})},bind:function(t){return ta(function(){return n().then(function(n){return t(n).toPromise()})})},anonBind:function(t){return ta(function(){return n().then(function(){return t.toPromise()})})},toLazy:function(){return kci.nu(t)},toCached:function(){var t=null;return ta(function(){return t=null===t?n():t})},toPromise:n,get:t}},ph=function(t){return{isValue:lt,isError:it,getOr:f(t),getOrThunk:f(t),getOrDie:f(t),or:function(){return ph(t)},orThunk:function(){return ph(t)},fold:function(n,i){return i(t)},map:function(n){return ph(n(t))},mapError:function(){return ph(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOptional:function(){return n.some(t)}}},ia=function(t){return{isValue:it,isError:lt,getOr:bi,getOrThunk:function(n){return n()},getOrDie:function(){return n=String(t),function(){throw new Error(n);}();var n},or:bi,orThunk:function(n){return n()},fold:function(n){return n(t)},map:function(){return ia(t)},mapError:function(n){return ia(n(t))},each:y,bind:function(){return ia(t)},exists:it,forall:lt,toOptional:n.none}},clt={value:ph,error:ia,fromOption:function(n,t){return n.fold(function(){return ia(t)},ph)}};he([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var en,on,dci=function(n,i){return gt(n.dom.childNodes,function(n){return i(t.fromDom(n))}).map(t.fromDom)},ri=window.Promise||hlt,ui={requestAnimationFrame:function(n,t){en?en.then(n):en=new ri(function(n){(function(n,t){for(var i=window.requestAnimationFrame,u=["ms","moz","webkit"],r=0;r<u.length&&!i;r++)i=window[u[r]+"RequestAnimationFrame"];(i=i||function(n){window.setTimeout(n,0)})(n,t)})(n,t=t||document.body)}).then(n)},setTimeout:fn,setInterval:vlt,setEditorTimeout:function(n,t,i){return fn(function(){n.removed||t()},i)},setEditorInterval:function(n,t,i){var r=vlt(function(){n.removed?clearInterval(r):t()},i);return r},debounce:ylt,throttle:ylt,clearInterval:function(n){return clearInterval(n)},clearTimeout:function(n){return clearTimeout(n)}},wlt=(on=new WeakMap,{forElement:function(t,i){var r=ko(t).dom;return n.from(on.get(r)).getOrThunk(function(){var n=plt(r,i);return on.set(r,n),n})}}),yt=(go.prototype.current=function(){return this.node},go.prototype.next=function(n){return this.node=this.findSibling(this.node,"firstChild","nextSibling",n),this.node},go.prototype.prev=function(n){return this.node=this.findSibling(this.node,"lastChild","previousSibling",n),this.node},go.prototype.prev2=function(n){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",n),this.node},go.prototype.findSibling=function(n,t,i,r){var f,u;if(n){if(!r&&n[t])return n[t];if(n!==this.rootNode){if(f=n[i])return f;for(u=n.parentNode;u&&u!==this.rootNode;u=u.parentNode)if(f=u[i])return f}}},go.prototype.findPreviousNode=function(n,t,i,r){var f,e,u;if(n&&(f=n[i],!this.rootNode||f!==this.rootNode)){if(f){if(!r)for(u=f[t];u;u=u[t])if(!u[t])return u;return f}return(e=n.parentNode)&&e!==this.rootNode?e:void 0}},go);var gci=ce(["h1","h2","h3","h4","h5","h6"]),tf=ce(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),fat=ce(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),bn=ce(["ul","ol","dl"]),ua=ce(["li","dd","dt"]),nli=ce(["thead","tbody","tfoot"]),gy=ce(["td","th"]),np=ce(["pre","script","textarea","style"]),kn="﻿",ir=" ",fi=kn,tp=function(n){return n===kn},ae=function(n){return n.replace(/\uFEFF/g,"")},tli=h,gh=o,ip=function(n){return gh(n)&&n.data[0]===fi},rp=function(n){return gh(n)&&n.data[n.data.length-1]===fi},eat=gu,ili=rt,rli=st,uli=o,fli=dr(["script","style","textarea"]),oat=dr(["img","input","textarea","hr","iframe","video","audio","object","embed"]),eli=dr(["table"]),oli=hr,dn=function(n){return!1===(h(t=n)&&"true"===t.getAttribute("unselectable"))&&ili(n);var t},sli=/^[ \t\r\n]*$/,hli=kct("data-mce-bookmark"),cli=kct("data-mce-bogus"),lli=function(n){return h(n)&&"all"===n.getAttribute("data-mce-bogus")},gn=function(n,t,i){var f=i||t,e,v,y,s,p,w,r,c,l,b,k,a,u;if(h(t)&&glt(t))return t;for(a=t.childNodes,u=a.length-1;0<=u;u--)gn(n,a[u],f);return!h(t)||1===(e=t.childNodes).length&&glt(e[0])&&t.parentNode.insertBefore(e[0],t),nn(y=t)||gg(y)||ky(t,f)||h(v=t)&&0<v.childNodes.length||(p=f,o(s=t)&&0<s.data.length&&(c=new yt(w=s,r=p).prev(!1),l=new yt(w,r).next(!1),b=tr(c)||dlt(c,r),k=tr(l)||dlt(l,r),b&&k))||n.remove(t),t},ali=r.makeMap,up=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fp=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vli=/[<>&\"\']/g,yli=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,pli={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},ts={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},wli={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},ntt=nat("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),ve={encodeRaw:tat,encodeAllRaw:function(n){return(""+n).replace(vli,function(n){return ts[n]||n})},encodeNumeric:iat,encodeNamed:an,getEncodeFunc:function(n,t){var r=nat(t)||ntt,i=ali(n.replace(/\+/g,","));return i.named&&i.numeric?function(n,t){return n.replace(t?up:fp,function(n){return void 0!==ts[n]?ts[n]:void 0!==r[n]?r[n]:1<n.length?"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";":"&#"+n.charCodeAt(0)+";"})}:i.named?t?function(n,t){return an(n,t,r)}:an:i.numeric?iat:tat},decode:function(n){return n.replace(yli,function(n,i){return i?65535<(i="x"===i.charAt(0).toLowerCase()?parseInt(i.substr(1),16):parseInt(i,10))?(i-=65536,String.fromCharCode(55296+(i>>10),56320+(1023&i))):pli[i]||String.fromCharCode(i):wli[n]||ntt[n]||(r=n,(u=t.fromTag("div").dom).innerHTML=r,u.textContent||u.innerText||r);var r,u})}},is={},bli={},nc=r.makeMap,si=r.each,ttt=r.extend,sat=r.explode,kli=r.inArray,dli={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},gli=/^(?:mouse|contextmenu)|click/,tc=(rf.prototype.bind=function(n,t,i,r){function y(n){u.executeHandlers(dh(n||l.event),e)}var e,o,f,h,s,c,u=this,l=window,a,v;if(n&&3!==n.nodeType&&8!==n.nodeType){for(n[u.expando]?e=n[u.expando]:(e=u.count++,n[u.expando]=e,u.events[e]={}),r=r||n,a=t.split(" "),v=a.length;v--;)s=y,h=c=!1,"DOMContentLoaded"===(f=a[v])&&(f="ready"),u.domLoaded&&"ready"===f&&"complete"===n.readyState?i.call(r,dh({type:f})):(u.hasMouseEnterLeave||(h=u.mouseEnterLeave[f])&&(s=function(n){var i=n.currentTarget,t=n.relatedTarget;if(t&&i.contains)t=i.contains(t);else for(;t&&t!==i;)t=t.parentNode;t||((n=dh(n||l.event)).type="mouseout"===n.type?"mouseleave":"mouseenter",n.target=i,u.executeHandlers(n,e))}),u.hasFocusIn||"focusin"!==f&&"focusout"!==f||(c=!0,h="focusin"===f?"focus":"blur",s=function(n){(n=dh(n||l.event)).type="focus"===n.type?"focusin":"focusout";u.executeHandlers(n,e)}),(o=u.events[e][f])?"ready"===f&&u.domLoaded?i(dh({type:f})):o.push({func:i,scope:r}):(u.events[e][f]=o=[{func:i,scope:r}],o.fakeName=h,o.capture=c,o.nativeHandler=s,"ready"===f?function(n,t,i){var r,u=n.document,f={type:"ready"};i.domLoaded?t(f):(r=function(){dy(n,"DOMContentLoaded",r);dy(n,"load",r);i.domLoaded||(i.domLoaded=!0,t(f));n=null},"complete"===u.readyState||"interactive"===u.readyState&&u.body?r():wn(n,"DOMContentLoaded",r),i.domLoaded||wn(n,"load",r))}(n,s,u):wn(n,h||f,s,c)));return n=o=null,i}},rf.prototype.unbind=function(n,t,i){var e,f,u,o,c,l,a,r,s,h;if(!n||3===n.nodeType||8===n.nodeType)return this;if(o=n[this.expando],o){if(u=this.events[o],t){for(s=t.split(" "),h=s.length;h--;)if(r=u[f=s[h]]){if(i)for(e=r.length;e--;)r[e].func===i&&(c=r.nativeHandler,l=r.fakeName,a=r.capture,(r=r.slice(0,e).concat(r.slice(e+1))).nativeHandler=c,r.fakeName=l,r.capture=a,u[f]=r);i&&0!==r.length||(delete u[f],dy(n,r.fakeName||f,r.nativeHandler,r.capture))}}else et(u,function(t,i){dy(n,t.fakeName||i,t.nativeHandler,t.capture)}),u={};for(f in u)if(w(u,f))return this;delete this.events[o];try{delete n[this.expando]}catch(t){n[this.expando]=null}}return this},rf.prototype.fire=function(n,t,i){var u,r;if(!n||3===n.nodeType||8===n.nodeType)return this;for(r=dh({type:t,target:n},i);(u=n[this.expando])&&this.executeHandlers(r,u),(n=n.parentNode||n.ownerDocument||n.defaultView||n.parentWindow)&&!r.isPropagationStopped(););return this},rf.prototype.clean=function(n){var t,i;if(!n||3===n.nodeType||8===n.nodeType)return this;if(n[this.expando]&&this.unbind(n),(n=n.getElementsByTagName?n:n.document)&&n.getElementsByTagName)for(this.unbind(n),t=(i=n.getElementsByTagName("*")).length;t--;)(n=i[t])[this.expando]&&this.unbind(n);return this},rf.prototype.destroy=function(){this.events={}},rf.prototype.cancel=function(n){return n&&(n.preventDefault(),n.stopImmediatePropagation()),!1},rf.prototype.executeHandlers=function(n,t){var f=this.events[t],u=f&&f[n.type],i,e,r;if(u)for(i=0,e=u.length;i<e;i++)if(r=u[i],r&&!1===r.func.call(r.scope,n)&&n.preventDefault(),n.isImmediatePropagationStopped())return},rf.Event=new rf,rf);var wt,nt,ep,hat,fa,itt,cat,op,pe,ic,we,cr,sp,uf,be,rc,ea,ei="sizzle"+-new Date,hu=window.document,ff=0,nai=0,lat=ett(),aat=ett(),vat=ett(),rtt=function(n,t){return n===t&&(ic=!0),0},hp="undefined",tai={}.hasOwnProperty,ke=[],iai=ke.pop,rai=ke.push,de=ke.push,yat=ke.slice,rs=ke.indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]===n)return t;return-1},ot="[\\x20\\t\\r\\n\\f]",us="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",pat="\\["+ot+"*("+us+")(?:"+ot+"*([*^$|!~]?=)"+ot+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+us+"))|)"+ot+"*\\]",wat=":("+us+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+pat+")*)|.*)\\)|)",cp=new RegExp("^"+ot+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ot+"+$","g"),uai=new RegExp("^"+ot+"*,"+ot+"*"),fai=new RegExp("^"+ot+"*([>+~]|"+ot+")"+ot+"*"),eai=new RegExp("="+ot+"*([^\\]'\"]*?)"+ot+"*\\]","g"),oai=new RegExp(wat),sai=new RegExp("^"+us+"$"),lp={ID:new RegExp("^#("+us+")"),CLASS:new RegExp("^\\.("+us+")"),TAG:new RegExp("^("+us+"|[*])"),ATTR:new RegExp("^"+pat),PSEUDO:new RegExp("^"+wat),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ot+"*(even|odd|(([+-]|)(\\d*)n|)"+ot+"*(?:([+-]|)"+ot+"*(\\d+)|))"+ot+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+ot+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ot+"*((?:-\\d)?\\d*)"+ot+"*\\)|)(?=[^-]|$)","i")},hai=/^(?:input|select|textarea|button)$/i,cai=/^h\d$/i,utt=/^[^{]+\{\s*\[native \w/,lai=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ftt=/[+~]/,aai=/'|\\/g,ge=new RegExp("\\\\([\\da-f]{1,6}"+ot+"?|("+ot+")|.)","ig");try{de.apply(ke=yat.call(hu.childNodes),hu.childNodes);ke[hu.childNodes.length].nodeType}catch(bd){de={apply:ke.length?function(n,t){rai.apply(n,yat.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}k=function(n,t,i,r){var h,u,f,o,c,s,l,e,v,a;if((t?t.ownerDocument||t:hu)!==cr&&we(t),i=i||[],!n||"string"!=typeof n)return i;if(1!==(o=(t=t||cr).nodeType)&&9!==o)return[];if(uf&&!r){if(h=lai.exec(n))if(f=h[1]){if(9===o){if(!(u=t.getElementById(f))||!u.parentNode)return i;if(u.id===f)return i.push(u),i}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&ea(t,u)&&u.id===f)return i.push(u),i}else{if(h[2])return de.apply(i,t.getElementsByTagName(n)),i;if((f=h[3])&&wt.getElementsByClassName)return de.apply(i,t.getElementsByClassName(f)),i}if(wt.qsa&&(!be||!be.test(n))){if(e=l=ei,v=t,a=9===o&&n,1===o&&"object"!==t.nodeName.toLowerCase()){for(s=fa(n),(l=t.getAttribute("id"))?e=l.replace(aai,"\\$&"):t.setAttribute("id",e),e="[id='"+e+"'] ",c=s.length;c--;)s[c]=e+ap(s[c]);v=ftt.test(n)&&ott(t.parentNode)||t;a=s.join(",")}if(a)try{return de.apply(i,v.querySelectorAll(a)),i}catch(n){}finally{l||t.removeAttribute("id")}}}return cat(n.replace(cp,"$1"),t,i,r)};wt=k.support={};hat=k.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return!!t&&"HTML"!==t.nodeName};we=k.setDocument=function(n){var r,t=n?n.ownerDocument||n:hu,i=t.defaultView;return t!==cr&&9===t.nodeType&&t.documentElement?(sp=(cr=t).documentElement,uf=!hat(t),i&&i!==function(n){try{return n.top}catch(n){}return null}(i)&&(i.addEventListener?i.addEventListener("unload",function(){we()},!1):i.attachEvent&&i.attachEvent("onunload",function(){we()})),wt.attributes=!0,wt.getElementsByTagName=!0,wt.getElementsByClassName=utt.test(t.getElementsByClassName),wt.getById=!0,nt.find.ID=function(n,t){if(typeof t.getElementById!=hp&&uf){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},nt.filter.ID=function(n){var t=n.replace(ge,ye);return function(n){return n.getAttribute("id")===t}},nt.find.TAG=wt.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!=hp)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"!==n)return u;for(;i=u[f++];)1===i.nodeType&&r.push(i);return r},nt.find.CLASS=wt.getElementsByClassName&&function(n,t){if(uf)return t.getElementsByClassName(n)},rc=[],be=[],wt.disconnectedMatch=!0,be=be.length&&new RegExp(be.join("|")),rc=rc.length&&new RegExp(rc.join("|")),r=utt.test(sp.compareDocumentPosition),ea=r||utt.test(sp.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)for(;t=t.parentNode;)if(t===n)return!0;return!1},rtt=r?function(n,i){return n===i?(ic=!0,0):(r=!n.compareDocumentPosition-!i.compareDocumentPosition)||(1&(r=(n.ownerDocument||n)===(i.ownerDocument||i)?n.compareDocumentPosition(i):1)||!wt.sortDetached&&i.compareDocumentPosition(n)===r?n===t||n.ownerDocument===hu&&ea(hu,n)?-1:i===t||i.ownerDocument===hu&&ea(hu,i)?1:pe?rs.call(pe,n)-rs.call(pe,i):0:4&r?-1:1);var r}:function(n,i){if(n===i)return ic=!0,0;var r,u=0,o=n.parentNode,s=i.parentNode,f=[n],e=[i];if(!o||!s)return n===t?-1:i===t?1:o?-1:s?1:pe?rs.call(pe,n)-rs.call(pe,i):0;if(o===s)return bat(n,i);for(r=n;r=r.parentNode;)f.unshift(r);for(r=i;r=r.parentNode;)e.unshift(r);for(;f[u]===e[u];)u++;return u?bat(f[u],e[u]):f[u]===hu?-1:e[u]===hu?1:0},t):cr};k.matches=function(n,t){return k(n,null,null,t)};k.matchesSelector=function(n,t){if((n.ownerDocument||n)!==cr&&we(n),t=t.replace(eai,"='$1']"),wt.matchesSelector&&uf&&(!rc||!rc.test(t))&&(!be||!be.test(t)))try{var i=(void 0).call(n,t);if(i||wt.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(n){}return 0<k(t,cr,null,[n]).length};k.contains=function(n,t){return(n.ownerDocument||n)!==cr&&we(n),ea(n,t)};k.attr=function(n,t){(n.ownerDocument||n)!==cr&&we(n);var r=nt.attrHandle[t.toLowerCase()],i=r&&tai.call(nt.attrHandle,t.toLowerCase())?r(n,t,!uf):void 0;return void 0!==i?i:wt.attributes||!uf?n.getAttribute(t):(i=n.getAttributeNode(t))&&i.specified?i.value:null};k.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};k.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ic=!wt.detectDuplicates,pe=!wt.sortStable&&n.slice(0),n.sort(rtt),ic){for(;r=n[i++];)r===n[i]&&(t=u.push(i));for(;t--;)n.splice(u[t],1)}return pe=null,n};ep=k.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ep(n)}else if(3===t||4===t)return n.nodeValue}else for(;r=n[u++];)i+=ep(r);return i};(nt=k.selectors={cacheLength:50,createPseudo:cu,match:lp,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(ge,ye),n[3]=(n[3]||n[4]||n[5]||"").replace(ge,ye),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||k.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&k.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return lp.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&oai.test(t)&&(i=fa(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(ge,ye).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=lat[n+" "];return t||(t=new RegExp("(^|"+ot+")"+n+"("+ot+"|$)"))&&lat(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!=hp&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var u=k.attr(r,n);return null==u?"!="===t:!t||(u+="","="===t?u===i:"!="===t?u!==i:"^="===t?i&&0===u.indexOf(i):"*="===t?i&&-1<u.indexOf(i):"$="===t?i&&u.slice(-i.length)===i:"~="===t?-1<(" "+u+" ").indexOf(i):"|="===t&&(u===i||u.slice(0,i.length+1)===i+"-"))}},CHILD:function(n,t,i,r,u){var o="nth"!==n.slice(0,3),e="last"!==n.slice(-4),f="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,s){var a,b,h,c,l,y,p=o!=e?"nextSibling":"previousSibling",v=t.parentNode,k=f&&t.nodeName.toLowerCase(),w=!s&&!f;if(v){if(o){for(;p;){for(h=t;h=h[p];)if(f?h.nodeName.toLowerCase()===k:1===h.nodeType)return!1;y=p="only"===n&&!y&&"nextSibling"}return!0}if(y=[e?v.firstChild:v.lastChild],e&&w){for(l=(a=(b=v[ei]||(v[ei]={}))[n]||[])[0]===ff&&a[1],c=a[0]===ff&&a[2],h=l&&v.childNodes[l];h=++l&&h&&h[p]||(c=l=0)||y.pop();)if(1===h.nodeType&&++c&&h===t){b[n]=[ff,l,c];break}}else if(w&&(a=(t[ei]||(t[ei]={}))[n])&&a[0]===ff)c=a[1];else for(;(h=++l&&h&&h[p]||(c=l=0)||y.pop())&&((f?h.nodeName.toLowerCase()!==k:1!==h.nodeType)||!++c||(w&&((h[ei]||(h[ei]={}))[n]=[ff,c]),h!==t)););return(c-=u)===r||c%r==0&&0<=c/r}}},PSEUDO:function(n,t){var r,i=nt.pseudos[n]||nt.setFilters[n.toLowerCase()]||k.error("unsupported pseudo: "+n);return i[ei]?i(t):1<i.length?(r=[n,n,"",t],nt.setFilters.hasOwnProperty(n.toLowerCase())?cu(function(n,r){for(var e,u=i(n,t),f=u.length;f--;)n[e=rs.call(n,u[f])]=!(r[e]=u[f])}):function(n){return i(n,0,r)}):i}},pseudos:{not:cu(function(n){var t=[],r=[],i=itt(n.replace(cp,"$1"));return i[ei]?cu(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:cu(function(n){return function(t){return 0<k(n,t).length}}),contains:cu(function(n){return n=n.replace(ge,ye),function(t){return-1<(t.textContent||t.innerText||ep(t)).indexOf(n)}}),lang:cu(function(n){return sai.test(n||"")||k.error("unsupported lang: "+n),n=n.replace(ge,ye).toLowerCase(),function(t){var i;do if(i=uf?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(n){var t=window.location&&window.location.hash;return t&&t.slice(1)===n.id},root:function(n){return n===sp},focus:function(n){return n===cr.activeElement&&(!cr.hasFocus||cr.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return!1===n.disabled},disabled:function(n){return!0===n.disabled},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,!0===n.selected},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!nt.pseudos.empty(n)},header:function(n){return cai.test(n.nodeName)},input:function(n){return hai.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:fs(function(){return[0]}),last:fs(function(n,t){return[t-1]}),eq:fs(function(n,t,i){return[i<0?i+t:i]}),even:fs(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:fs(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:fs(function(n,t,i){for(var r=i<0?i+t:i;0<=--r;)n.push(r);return n}),gt:fs(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}}).pseudos.nth=nt.pseudos.eq;e(["radio","checkbox","file","password","image"],function(n){var t;nt.pseudos[n]=(t=n,function(n){return"input"===n.nodeName.toLowerCase()&&n.type===t})});e(["submit","reset"],function(n){var t;nt.pseudos[n]=(t=n,function(n){var i=n.nodeName.toLowerCase();return("input"===i||"button"===i)&&n.type===t})});kat.prototype=nt.filters=nt.pseudos;nt.setFilters=new kat;fa=k.tokenize=function(n,t){var u,r,e,f,i,o,s,h=aat[n+" "];if(h)return t?0:h.slice(0);for(i=n,o=[],s=nt.preFilter;i;){for(f in u&&!(r=uai.exec(i))||(r&&(i=i.slice(r[0].length)||i),o.push(e=[])),u=!1,(r=fai.exec(i))&&(u=r.shift(),e.push({value:u,type:r[0].replace(cp," ")}),i=i.slice(u.length)),nt.filter)nt.filter.hasOwnProperty(f)&&(!(r=lp[f].exec(i))||s[f]&&!(r=s[f](r))||(u=r.shift(),e.push({value:u,type:f,matches:r}),i=i.slice(u.length)));if(!u)break}return t?i.length:i?k.error(n):aat(n,o).slice(0)};itt=k.compile=function(n,t){function c(n,t,i,u,s){var c,y,a,v=0,h="0",p=n&&[],l=[],w=op,b=n||o&&nt.find.TAG("*",s),d=ff+=null==w?1:Math.random()||.1,g=b.length;for(s&&(op=t!==cr&&t);h!==g&&null!=(c=b[h]);h++){if(o&&c){for(y=0;a=f[y++];)if(a(c,t,i)){u.push(c);break}s&&(ff=d)}r&&((c=!a&&c)&&v--,n&&p.push(c))}if(v+=h,r&&h!==v){for(y=0;a=e[y++];)a(p,l,t,i);if(n){if(0<v)for(;h--;)p[h]||l[h]||(l[h]=iai.call(u));l=vp(l)}de.apply(u,l);s&&!n&&0<l.length&&1<v+e.length&&k.uniqueSort(u)}return s&&(ff=d,op=w),p}var u,f,e,r,o,s=[],h=[],i=vat[n+" "];if(!i){for(u=(t=t||fa(n)).length;u--;)((i=function n(t){for(var e,u,r,o=t.length,s=nt.relative[t[0].type],h=s||nt.relative[" "],i=s?1:0,c=stt(function(n){return n===e},h,!0),l=stt(function(n){return-1<rs.call(e,n)},h,!0),f=[function(n,t,i){var r=!s&&(i||t!==op)||((e=t).nodeType?c:l)(n,t,i);return e=null,r}];i<o;i++)if(u=nt.relative[t[i].type])f=[stt(htt(f),u)];else{if((u=nt.filter[t[i].type].apply(null,t[i].matches))[ei]){for(r=++i;r<o&&!nt.relative[t[r].type];r++);return function n(t,i,r,u,f,e){return u&&!u[ei]&&(u=n(u)),f&&!f[ei]&&(f=n(f,e)),cu(function(n,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=n||function(n,t,i){for(var r=0,u=t.length;r<u;r++)k(n,t[r],i);return i}(i||"*",o.nodeType?[o]:o,[]),v=!t||!n&&i?b:vp(b,p,t,o,s),h=r?f||(n?t:w||u)?[]:e:v;if(r&&r(v,h,o,s),u)for(l=vp(h,y),u(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(n){if(f||t){if(f){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);f(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&-1<(l=f?rs.call(n,a):p[c])&&(n[l]=!(e[l]=a))}}else h=vp(h===e?h.splice(w,h.length):h),f?f(null,e,h,s):de.apply(e,h)})}(1<i&&htt(f),1<i&&ap(t.slice(0,i-1).concat({value:" "===t[i-2].type?"*":""})).replace(cp,"$1"),u,i<r&&n(t.slice(i,r)),r<o&&n(t=t.slice(r)),r<o&&ap(t))}f.push(u)}return htt(f)}(t[u]))[ei]?s:h).push(i);(i=vat(n,(f=h,r=0<(e=s).length,o=0<f.length,r?cu(c):c))).selector=n}return i};cat=k.select=function(n,t,i,r){var e,u,f,h,c,s="function"==typeof n&&n,o=!r&&fa(n=s.selector||n);if(i=i||[],1===o.length){if(2<(u=o[0]=o[0].slice(0)).length&&"ID"===(f=u[0]).type&&wt.getById&&9===t.nodeType&&uf&&nt.relative[u[1].type]){if(!(t=(nt.find.ID(f.matches[0].replace(ge,ye),t)||[])[0]))return i;s&&(t=t.parentNode);n=n.slice(u.shift().value.length)}for(e=lp.needsContext.test(n)?0:u.length;e--&&(f=u[e],!nt.relative[h=f.type]);)if((c=nt.find[h])&&(r=c(f.matches[0].replace(ge,ye),ftt.test(u[0].type)&&ott(t.parentNode)||t))){if(u.splice(e,1),!(n=r.length&&ap(u)))return de.apply(i,r),i;break}}return(s||itt(n,o))(r,t,!uf,i,ftt.test(n)&&ott(t.parentNode)||t),i};wt.sortStable=ei.split("").sort(rtt).join("")===ei;wt.detectDuplicates=!!ic;we();wt.sortDetached=!0;var rvt=document,ltt=Array.prototype.push,vai=Array.prototype.slice,yai=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,sa=tc.Event,pai=r.makeMap("children,contents,next,prev"),uc=function(n,t,i,r){var u;if(ctt(t))t=dat(t,ytt(n[0]));else if(t.length&&!t.nodeType){if(t=a.makeArray(t),r)for(u=t.length-1;0<=u;u--)uc(n,t[u],i,r);else for(u=0;u<t.length;u++)uc(n,t[u],i,r);return n}if(t.nodeType)for(u=n.length;u--;)i.call(n[u],t);return n},wai=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),bai=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),kai={"for":"htmlFor","class":"className",readonly:"readOnly"},dai={float:"cssFloat"},att={},vtt={},gai=/^\s*|\s*$/g,ytt=function(n){return n?9===n.nodeType?n:n.ownerDocument:rvt};lr.fn=lr.prototype={constructor:lr,selector:"",context:null,length:0,init:function(n,t){var u,r,i=this;if(!n)return i;if(n.nodeType)return i.context=i[0]=n,i.length=1,i;if(t&&t.nodeType)i.context=t;else{if(t)return a(n).attr(t);i.context=t=document}if(ctt(n)){if(!(u="<"===(i.selector=n).charAt(0)&&">"===n.charAt(n.length-1)&&3<=n.length?[null,n,null]:yai.exec(n)))return a(t).find(n);if(u[1])for(r=dat(n,ytt(t)).firstChild;r;)ltt.call(i,r),r=r.nextSibling;else{if(!(r=ytt(t).getElementById(u[2])))return i;if(r.id!==u[2])return i.find(n);i.length=1;i[0]=r}}else this.add(n,!1);return i},toArray:function(){return r.toArray(this)},add:function(n,t){var r,i;if(ctt(n))return this.add(a(n));if(!1!==t)for(r=a.unique(this.toArray().concat(a.makeArray(n))),this.length=r.length,i=0;i<r.length;i++)this[i]=r[i];else ltt.apply(this,a.makeArray(n));return this},attr:function(n,t){var r,i=this;if("object"==typeof n)bf(n,function(n,t){i.attr(n,t)});else{if(!oa(t)){if(i[0]&&1===i[0].nodeType){if((r=att[n])&&r.get)return r.get(i[0],n);if(bai[n])return i.prop(n)?n:void 0;null===(t=i[0].getAttribute(n,2))&&(t=void 0)}return t}this.each(function(){var i;1===this.nodeType&&((i=att[n])&&i.set?i.set(this,t):null===t?this.removeAttribute(n,2):this.setAttribute(n,t,2))})}return i},removeAttr:function(n){return this.attr(n,null)},prop:function(n,t){var i=this;if("object"==typeof(n=kai[n]||n))bf(n,function(n,t){i.prop(n,t)});else{if(!oa(t))return i[0]&&i[0].nodeType&&n in i[0]?i[0][n]:t;this.each(function(){1===this.nodeType&&(this[n]=t)})}return i},css:function(n,t){function f(n){return n.replace(/-(\D)/g,function(n,t){return t.toUpperCase()})}function e(n){return n.replace(/[A-Z]/g,function(n){return"-"+n})}var i,r,u=this;if("object"==typeof n)bf(n,function(n,t){u.css(n,t)});else if(oa(t))n=f(n),"number"!=typeof t||wai[n]||(t=t.toString()+"px"),u.each(function(){var i=this.style;if((r=vtt[n])&&r.set)r.set(this,t);else{try{this.style[dai[n]||n]=t}catch(i){}null!==t&&""!==t||(i.removeProperty?i.removeProperty(e(n)):i.removeAttribute(n))}});else{if(i=u[0],(r=vtt[n])&&r.get)return r.get(i);if(!i.ownerDocument.defaultView)return i.currentStyle?i.currentStyle[f(n)]:"";try{return i.ownerDocument.defaultView.getComputedStyle(i,null).getPropertyValue(e(n))}catch(f){return}}return u},remove:function(){for(var n,t=this.length;t--;)n=this[t],sa.clean(n),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){for(var n,t=this.length;t--;)for(n=this[t];n.firstChild;)n.removeChild(n.firstChild);return this},html:function(n){var t;if(oa(n)){t=this.length;try{for(;t--;)this[t].innerHTML=n}catch(i){a(this[t]).empty().append(n)}return this}return this[0]?this[0].innerHTML:""},text:function(n){var t;if(oa(n)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=n:this[0].textContent=n;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return uc(this,arguments,function(n){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(n)})},prepend:function(){return uc(this,arguments,function(n){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(n,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?uc(this,arguments,function(n){this.parentNode.insertBefore(n,this)}):this},after:function(){return this[0]&&this[0].parentNode?uc(this,arguments,function(n){this.parentNode.insertBefore(n,this.nextSibling)},!0):this},appendTo:function(n){return a(n).append(this),this},prependTo:function(n){return a(n).prepend(this),this},replaceWith:function(n){return this.before(n).remove()},wrap:function(n){return nvt(this,n)},wrapAll:function(n){return nvt(this,n,!0)},wrapInner:function(n){return this.each(function(){a(this).contents().wrapAll(n)}),this},unwrap:function(){return this.parent().each(function(){a(this).replaceWith(this.childNodes)})},clone:function(){var n=[];return this.each(function(){n.push(this.cloneNode(!0))}),a(n)},addClass:function(n){return this.toggleClass(n,!0)},removeClass:function(n){return this.toggleClass(n,!1)},toggleClass:function(n,t){var i=this;return"string"!=typeof n||(-1!==n.indexOf(" ")?bf(n.split(" "),function(){i.toggleClass(this,t)}):i.each(function(i,r){var u,f=gat(r,n);f!==t&&(u=r.className,f?r.className=tvt((" "+u+" ").replace(" "+n+" "," ")):r.className+=u?" "+n:n)})),i},hasClass:function(n){return gat(this[0],n)},each:function(n){return bf(this,n)},on:function(n,t){return this.each(function(){sa.bind(this,n,t)})},off:function(n,t){return this.each(function(){sa.unbind(this,n,t)})},trigger:function(n){return this.each(function(){"object"==typeof n?sa.fire(this,n.type,n):sa.fire(this,n)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return a(vai.apply(this,arguments))},eq:function(n){return-1===n?this.slice(n):this.slice(n,+n+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(n){for(var i=[],t=0,r=this.length;t<r;t++)a.find(n,this[t],i);return a(i)},filter:function(n){return a("function"==typeof n?ivt(this.toArray(),function(t,i){return n(i,t)}):a.filter(n,this.toArray()))},closest:function(n){var t=[];return n instanceof a&&(n=n[0]),this.each(function(i,r){for(;r;){if("string"==typeof n&&a(r).is(n)){t.push(r);break}if(r===n){t.push(r);break}r=r.parentNode}}),a(t)},offset:function(n){var i,r,t,u,f=0,e=0;return n?this.css(n):((i=this[0])&&(t=(r=i.ownerDocument).documentElement,i.getBoundingClientRect&&(f=(u=i.getBoundingClientRect()).left+(t.scrollLeft||r.body.scrollLeft)-t.clientLeft,e=u.top+(t.scrollTop||r.body.scrollTop)-t.clientTop)),{left:f,top:e})},push:ltt,sort:Array.prototype.sort,splice:Array.prototype.splice};r.extend(lr,{extend:r.extend,makeArray:function(n){return n&&n===n.window||n.nodeType?[n]:r.toArray(n)},inArray:function(n,t){var i;if(t.indexOf)return t.indexOf(n);for(i=t.length;i--;)if(t[i]===n)return i;return-1},isArray:r.isArray,each:bf,trim:tvt,grep:ivt,find:k,expr:k.selectors,unique:k.uniqueSort,text:k.getText,contains:k.contains,filter:function(n,t,i){var r=t.length;for(i&&(n=":not("+n+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return 1===t.length?a.find.matchesSelector(t[0],n)?[t[0]]:[]:a.find.matches(n,t)}});bf({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return uvt(n,"parentNode")},next:function(n){return fvt(n,"nextSibling",1)},prev:function(n){return fvt(n,"previousSibling",1)},children:function(n){return ptt(n.firstChild,"nextSibling",1)},contents:function(n){return r.toArray(("iframe"===n.nodeName?n.contentDocument||n.contentWindow.document:n).childNodes)}},function(n,t){lr.fn[n]=function(i){var r=[],u;return this.each(function(){var n=t.call(r,this,i,r);n&&(a.isArray(n)?r.push.apply(r,n):r.push(n))}),1<this.length&&(pai[n]||(r=a.unique(r)),0===n.indexOf("parents")&&(r=r.reverse())),u=a(r),i?u.filter(i):u}});bf({parentsUntil:function(n,t){return uvt(n,"parentNode",t)},nextUntil:function(n,t){return ptt(n,"nextSibling",1,t).slice(1)},prevUntil:function(n,t){return ptt(n,"previousSibling",1,t).slice(1)}},function(n,t){lr.fn[n]=function(i,r){var u=[],f;return this.each(function(){var n=t.call(u,this,i,u);n&&(a.isArray(n)?u.push.apply(u,n):u.push(n))}),1<this.length&&(u=a.unique(u),0!==n.indexOf("parents")&&"prevUntil"!==n||(u=u.reverse())),f=a(u),r?f.filter(r):f}});lr.fn.is=function(n){return!!n&&0<this.filter(n).length};lr.fn.init.prototype=lr.fn;lr.overrideDefaults=function(n){var t,i=function(r,u){return t=t||n(),0===arguments.length&&(r=t.element),u=u||t.context,new i.fn.init(r,u)};return a.extend(i,this),i};lr.attrHooks=att;lr.cssHooks=vtt;var a=lr,ha=r.each,nvi=r.grep,wtt=l.ie,tvi=/^([a-z0-9],?)+$/i,d=function(n,i){function o(t){return t&&n&&ht(t)?n.getElementById(t):t}function u(n){return vi("string"==typeof n?o(n):n)}function c(n,t,i){var r,f,e=u(n);return void 0===(f=e.length?(r=bi[t])&&r.get?r.get(e,t):e.attr(t):f)?i||"":f}function ot(n){var t=o(n);return t?t.attributes:[]}function nt(n,t,r){""===r&&(r=null);var e,f=u(n),o=f.attr(t);f.length&&((e=bi[t])&&e.set?e.set(f,r,t):f.attr(t,r),o!==r&&i.onSetAttrib&&i.onSetAttrib({attrElm:f,attrName:t,attrValue:r}))}function tt(){return i.root_element||n.body}function bt(i,r){return function(n,i,r){var h,e=0,f=0,o=n.ownerDocument,c,u,s;if(r=r||n,i){if(r===n&&i.getBoundingClientRect&&"static"===wf(t.fromDom(n),"position"))return c=i.getBoundingClientRect(),{x:e=c.left+(o.documentElement.scrollLeft||n.scrollLeft)-o.documentElement.clientLeft,y:f=c.top+(o.documentElement.scrollTop||n.scrollTop)-o.documentElement.clientTop};for(u=i;u&&u!==r&&u.nodeType&&!rlt(u,r);)s=u,e+=s.offsetLeft||0,f+=s.offsetTop||0,u=s.offsetParent;for(u=i.parentNode;u&&u!==r&&u.nodeType&&!rlt(u,r);)e-=u.scrollLeft||0,f-=u.scrollTop||0,u=u.parentNode;f+=(h=t.fromDom(i),wci.isFirefox()&&"table"===vt(h)?ilt(nu(h)).filter(function(n){return"caption"===vt(n)}).bind(function(n){return ilt(sct(n)).map(function(t){var i=t.dom.offsetTop,r=n.dom.offsetTop,u=n.dom.offsetHeight;return i<=r?-u:0})}).getOr(0):0)}return{x:e,y:f}}(n.body,o(i),r)}function st(n,t,i){var r=u(n);return i?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(n,t){return t.toUpperCase()}))&&(t=l.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:void 0)}function kt(n){var t=st(n=o(n),"width"),i=st(n,"height");return-1===t.indexOf("px")&&(t=0),-1===i.indexOf("px")&&(i=0),{w:parseInt(t,10)||n.offsetWidth||n.clientWidth,h:parseInt(i,10)||n.offsetHeight||n.clientHeight}}function ct(n,t){var i;if(!n)return!1;if(!Array.isArray(n)){if("*"===t)return 1===n.nodeType;if(tvi.test(t)){for(var u=t.toLowerCase().split(/,/),f=n.nodeName.toLowerCase(),r=u.length-1;0<=r;r--)if(u[r]===f)return!0;return!1}if(n.nodeType&&1!==n.nodeType)return!1}return i=Array.isArray(n)?n:[n],0<k(t,i[0].ownerDocument||i[0],null,i).length}function dt(n,t,i,u){var e,s=[],f=o(n);for(u=void 0===u,i=i||("BODY"!==tt().nodeName?tt().parentNode:null),r.is(t,"string")&&(t="*"===(e=t)?function(n){return 1===n.nodeType}:function(n){return ct(n,e)});f&&!(f===i||wu(f.nodeType)||gg(f)||nn(f));){if(!t||"function"==typeof t&&t(f)){if(!u)return[f];s.push(f)}f=f.parentNode}return u?s:null}function gt(n,t,i){var r=t;if(n)for("string"==typeof t&&(r=function(n){return ct(n,t)}),n=n[i];n;n=n[i])if("function"==typeof r&&r(n))return n;return null}function g(n,t,i){var f,u="string"==typeof n?o(n):n;return!!u&&(r.isArray(u)&&(u.length||0===u.length)?(f=[],ha(u,function(n,r){n&&f.push(t.call(i,"string"==typeof n?o(n):n,r))}),f):t.call(i||this,u))}function ni(n,t){u(n).each(function(n,i){ha(t,function(n,t){nt(i,t,n)})})}function ti(n,t){var i=u(n);wtt?i.each(function(n,i){if(!1!==i.canHaveHTML){for(;i.firstChild;)i.removeChild(i.firstChild);try{i.innerHTML="<br>"+t;i.removeChild(i.firstChild)}catch(n){a("<div><\/div>").html("<br>"+t).contents().slice(1).appendTo(i)}return t}}):i.html(t)}function ii(t,i,r,u,f){return g(t,function(t){var e="string"==typeof i?n.createElement(i):i;return ni(e,r),u&&("string"!=typeof u&&u.nodeType?e.appendChild(u):"string"==typeof u&&ti(e,u)),f?e:t.appendChild(e)})}function ri(t,i,r){return ii(n.createElement(t),t,i,r,!0)}function lt(n,t){var i=u(n);return(t?i.each(function(){for(var n;n=this.firstChild;)3===n.nodeType&&0===n.data.length?this.removeChild(n):this.parentNode.insertBefore(n,this)}):i).remove(),1<i.length?i.toArray():i[0]}function ui(n,t,i){u(n).toggleClass(t,i).each(function(){""===this.className&&a(this).attr("class",null)})}function fi(n,t,i){return g(t,function(t){return r.is(t,"array")&&(n=n.cloneNode(!0)),i&&ha(nvi(t.childNodes),function(t){n.appendChild(t)}),t.parentNode.replaceChild(n,t)})}function ei(n){if(h(n)){var t="a"===n.nodeName.toLowerCase()&&!c(n,"href")&&c(n,"id");return c(n,"name")||c(n,"data-mce-bookmark")||t?1:void 0}}function at(){return n.createRange()}function oi(n){if(n&&h(n)){var t=n.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==n.contentEditable?n.contentEditable:null}return null}void 0===i&&(i={});var it,rt,si,hi,ci,ut,li={},pt=window,ft={},ki=0,wt=wlt.forElement(t.fromDom(n),{contentCssCors:i.contentCssCors,referrerPolicy:i.referrerPolicy}),s=[],w=i.schema||le({}),v=yn({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope},i.schema),b=i.ownEvents?new tc:tc.Event,ai=w.getBlockElements(),vi=a.overrideDefaults(function(){return{context:n,element:p.getRoot()}}),yi=ve.encodeAllRaw,pi=function(t,u,f,e){if(r.isArray(t)){for(var o=t.length,h=[];o--;)h[o]=pi(t[o],u,f,e);return h}return!i.collect||t!==n&&t!==pt||s.push([t,u,f,e]),b.bind(t,u,f,e||p)},wi=function(t,i,u){var f,o,e;if(r.isArray(t)){for(f=t.length,o=[];f--;)o[f]=wi(t[f],i,u);return o}if(0<s.length&&(t===n||t===pt))for(f=s.length;f--;)e=s[f],t!==e[0]||i&&i!==e[1]||u&&u!==e[2]||b.unbind(e[0],e[1],e[2]);return b.unbind(t,i,u)},p={doc:n,settings:i,win:pt,files:ft,stdMode:!0,boxModel:!0,styleSheetLoader:wt,boundEvents:s,styles:v,schema:w,events:b,isBlock:function(n){if("string"==typeof n)return!!ai[n];if(n){var t=n.nodeType;if(t)return!(1!==t||!ai[n.nodeName])}return!1},$:vi,$$:u,root:null,clone:function(t,i){if(!wtt||1!==t.nodeType||i)return t.cloneNode(i);var r=n.createElement(t.nodeName);return ha(ot(t),function(n){nt(r,n.nodeName,c(t,n.nodeName))}),r},getRoot:tt,getViewPort:function(n){var t=bct(n);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:function(n){var t=bt(n=o(n)),i=kt(n);return{x:t.x,y:t.y,w:i.w,h:i.h}},getSize:kt,getParent:function(n,t,i){var r=dt(n,t,i,!1);return r&&0<r.length?r[0]:null},getParents:dt,get:o,getNext:function(n,t){return gt(n,t,"nextSibling")},getPrev:function(n,t){return gt(n,t,"previousSibling")},select:function(t,r){return k(t,o(r)||i.root_element||n,[])},is:ct,add:ii,create:ri,createHTML:function(n,t,i){var r,u="";for(r in u+="<"+n,t)sh(t,r)&&(u+=" "+r+'="'+yi(t[r])+'"');return void 0!==i?u+">"+i+"<\/"+n+">":u+" />"},createFragment:function(t){var u,i=n.createElement("div"),r=n.createDocumentFragment();for(r.appendChild(i),t&&(i.innerHTML=t);u=i.firstChild;)r.appendChild(u);return r.removeChild(i),r},remove:lt,setStyle:function(n,t,r){var f=ht(t)?u(n).css(t,r):u(n).css(t);i.update_styles&&evt(v,f)},getStyle:st,setStyles:function(n,t){var r=u(n).css(t);i.update_styles&&evt(v,r)},removeAllAttribs:function(n){return g(n,function(n){for(var i=n.attributes,t=i.length-1;0<=t;t--)n.removeAttributeNode(i.item(t))})},setAttrib:nt,setAttribs:ni,getAttrib:c,getPos:bt,parseStyle:function(n){return v.parse(n)},serializeStyle:function(n,t){return v.serialize(n,t)},addStyle:function(t){var r,i;if(p!==d.DOM&&n===document){if(li[t])return;li[t]=!0}(i=n.getElementById("mceDefaultStyles"))||((i=n.createElement("style")).id="mceDefaultStyles",i.type="text/css",(r=n.getElementsByTagName("head")[0]).firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i));i.styleSheet?i.styleSheet.cssText+=t:i.appendChild(n.createTextNode(t))},loadCSS:function(n){e((n=n||"").split(","),function(n){ft[n]=!0;wt.load(n,y)})},addClass:function(n,t){u(n).addClass(t)},removeClass:function(n,t){ui(n,t,!1)},hasClass:function(n,t){return u(n).hasClass(t)},toggleClass:ui,show:function(n){u(n).show()},hide:function(n){u(n).hide()},isHidden:function(n){return"none"===u(n).css("display")},uniqueId:function(n){return(n||"mce_")+ki++},setHTML:ti,getOuterHTML:function(n){var t="string"==typeof n?o(n):n;return h(t)?t.outerHTML:a("<div><\/div>").append(a(t).clone()).html()},setOuterHTML:function(n,t){u(n).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(n){}lt(a(this).html(t),!0)})},decode:ve.decode,encode:yi,insertAfter:function(n,t){var i=o(t);return g(n,function(n){var t=i.parentNode,r=i.nextSibling;return r?t.insertBefore(n,r):t.appendChild(n),n})},replace:fi,rename:function(n,t){var i;return n.nodeName!==t.toUpperCase()&&(i=ri(t),ha(ot(n),function(t){nt(i,t.nodeName,c(n,t.nodeName))}),fi(i,n,!0)),i||n},findCommonAncestor:function(n,t){for(var r,i=n;i;){for(r=t;r&&i!==r;)r=r.parentNode;if(i===r)break;i=i.parentNode}return!i&&n.ownerDocument?n.ownerDocument.documentElement:i},toHex:function(n){return v.toHex(r.trim(n))},run:g,getAttribs:ot,isEmpty:function(n,t){var i,u,e=0,r,o,f;if(ei(n))return!1;if(n=n.firstChild){r=new yt(n,n.parentNode);o=w?w.getWhiteSpaceElements():{};t=t||(w?w.getNonEmptyElements():null);do{if(i=n.nodeType,h(n)){if(f=n.getAttribute("data-mce-bogus"),f){n=r.next("all"===f);continue}if(u=n.nodeName.toLowerCase(),t&&t[u]){if("br"!==u)return!1;e++;n=r.next();continue}if(ei(n))return!1}if(8===i||3===i&&!ns(n.nodeValue)||3===i&&n.parentNode&&o[n.parentNode.nodeName]&&ns(n.nodeValue))return!1;n=r.next()}while(n)}return e<=1},createRng:at,nodeIndex:fc,split:function(n,t,i){var f,e,u,r=at();if(n&&t)return r.setStart(n.parentNode,fc(n)),r.setEnd(t.parentNode,fc(t)),f=r.extractContents(),(r=at()).setStart(t.parentNode,fc(t)+1),r.setEnd(n.parentNode,fc(n)+1),e=r.extractContents(),(u=n.parentNode).insertBefore(gn(p,f),n),i?u.insertBefore(i,n):u.insertBefore(t,n),u.insertBefore(gn(p,e),n),lt(n),i||t},bind:pi,unbind:wi,fire:function(n,t,i){return b.fire(n,t,i)},getContentEditable:oi,getContentEditableParent:function(n){for(var i=tt(),t=null;n&&n!==i&&null===(t=oi(n));n=n.parentNode);return t},destroy:function(){var t,n;if(0<s.length)for(t=s.length;t--;)n=s[t],b.unbind(n[0],n[1],n[2]);et(ft,function(n,t){wt.unload(t);delete ft[t]});k.setDocument&&k.setDocument()},isChildOf:function(n,t){if(wtt){for(;n;){if(t===n)return!0;n=n.parentNode}return!1}return n===t||t.contains(n)},dumpRng:function(n){return"startContainer: "+n.startContainer.nodeName+", startOffset: "+n.startOffset+", endContainer: "+n.endContainer.nodeName+", endOffset: "+n.endOffset}},bi=(it=v,si=f(p),ci={set:function(n,t,i){rt.url_converter&&null!==t&&(t=rt.url_converter.call(rt.url_converter_scope||si(),t,i,n[0]));n.attr("data-mce-"+i,t).attr(i,t)},get:function(n,t){return n.attr("data-mce-"+t)||n.attr(t)}},ut={style:{set:function(n,t){null===t||"object"!=typeof t?(hi&&n.attr("data-mce-style",t),null!==t&&"string"==typeof t?(n.removeAttr("style"),n.css(it.parse(t))):n.attr("style",t)):n.css(t)},get:function(n){var t=n.attr("data-mce-style")||n.attr("style");return it.serialize(it.parse(t),n[0].nodeName)}}},(hi=(rt=i).keep_values)&&(ut.href=ut.src=ci),ut);return p};d.DOM=d(document);d.nodeIndex=fc;var ivi=d.DOM,btt=r.each,rvi=r.grep,kf=(iu.prototype._setReferrerPolicy=function(n){this.settings.referrerPolicy=n},iu.prototype.loadScript=function(n,t,i){function e(){f.remove(o);u&&(u.onerror=u.onload=u=null)}var f=ivi,o=f.uniqueId(),u=document.createElement("script");u.id=o;u.type="text/javascript";u.src=r._addCacheSuffix(n);this.settings.referrerPolicy&&f.setAttrib(u,"referrerpolicy",this.settings.referrerPolicy);u.onload=function(){e();t()};u.onerror=function(){e();ft(i)?i():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+n)};(document.getElementsByTagName("head")[0]||document.body).appendChild(u)},iu.prototype.isDone=function(n){return 2===this.states[n]},iu.prototype.markDone=function(n){this.states[n]=2},iu.prototype.add=function(n,t,i,r){var u=this.states[n];this.queue.push(n);void 0===u&&(this.states[n]=0);t&&(this.scriptLoadedCallbacks[n]||(this.scriptLoadedCallbacks[n]=[]),this.scriptLoadedCallbacks[n].push({success:t,failure:r,scope:i||this}))},iu.prototype.load=function(n,t,i,r){return this.add(n,t,i,r)},iu.prototype.remove=function(n){delete this.states[n];delete this.scriptLoadedCallbacks[n]},iu.prototype.loadQueue=function(n,t,i){this.loadScripts(this.queue,n,t,i)},iu.prototype.loadScripts=function(n,t,i,r){function f(n,t){btt(u.scriptLoadedCallbacks[t],function(t){ft(t[n])&&t[n].call(t.scope)});u.scriptLoadedCallbacks[t]=void 0}var u=this,o=[],e;u.queueLoadedCallbacks.push({success:t,failure:r,scope:i||this});e=function(){var t,i=rvi(n);n.length=0;btt(i,function(n){2!==u.states[n]?3!==u.states[n]?1!==u.states[n]&&(u.states[n]=1,u.loading++,u.loadScript(n,function(){u.states[n]=2;u.loading--;f("success",n);e()},function(){u.states[n]=3;u.loading--;o.push(n);f("failure",n);e()})):f("failure",n):f("success",n)});u.loading||(t=u.queueLoadedCallbacks.slice(0),u.queueLoadedCallbacks.length=0,btt(t,function(n){0===o.length?ft(n.success)&&n.success.call(n.scope):ft(n.failure)&&n.failure.call(n.scope,o)}))};e()},iu.ScriptLoader=new iu,iu);var ca={},ktt=hi("en"),lu={getData:function(){return tht(ca,function(n){return c({},n)})},setCode:function(n){n&&ktt.set(n)},getCode:function(){return ktt.get()},add:function(n,t){var i=ca[n];i||(ca[n]=i={});et(t,function(n,t){i[t.toLowerCase()]=n})},translate:function(n){function t(n){return ft(n)?Object.prototype.toString.call(n):o(n)?"":""+n}function r(n){var i=t(n);return at(s,i.toLowerCase()).map(t).getOr(i)}function u(n){return n.replace(/{context:\w+}$/,"")}var f,e,s=ovt().getOr({}),o=function(n){return""===n||null==n},i;return o(n)?"":fh(f=n)&&w(f,"raw")?t(n.raw):br(e=n)&&1<e.length?(i=n.slice(1),u(r(n[0]).replace(/\{([0-9]+)\}/g,function(n,r){return w(i,r)?t(i[r]):n}))):u(r(n))},isRtl:function(){return ovt().bind(function(n){return at(n,"_dir")}).exists(function(n){return"rtl"===n})},hasCode:function(n){return w(ca,n)}},rr=function(){function r(n,t){e(p(i,function(i){return i.name===n&&i.state===t}),function(n){return n.callback()})}function u(t){var i;return(n[t]?n[t].dependencies:i)||[]}function f(n,t){return"object"==typeof t?t:"string"==typeof n?{prefix:"",resource:t,suffix:""}:{prefix:n.prefix,resource:t,suffix:n.suffix}}function o(r,u,f){void 0===f&&(f="added");w(n,r)&&"added"===f||w(t,r)&&"loaded"===f?u():i.push({name:r,state:f,callback:u})}var s=[],t={},n={},i=[],h=function(i,o,s,c,l){var a,v;t[i]||(0!==(a="string"==typeof o?o:o.prefix+o.resource+o.suffix).indexOf("/")&&-1===a.indexOf("://")&&(a=rr.baseURL+"/"+a),t[i]=a.substring(0,a.lastIndexOf("/")),v=function(){var l,n,t;r(i,"loaded");l=o;n=s;t=c;e(u(i),function(n){var t=f(l,n);h(t.resource,t,void 0,void 0)});n&&(t?n.call(t):n.call(kf))},n[i]?v():kf.ScriptLoader.add(a,v,c,l))};return{items:s,urls:t,lookup:n,_listeners:i,get:function(t){if(n[t])return n[t].instance},dependencies:u,requireLangPack:function(n,i){!1!==rr.languageLoad&&o(n,function(){var r=lu.getCode();!r||i&&-1===(","+(i||"")+",").indexOf(","+r+",")||kf.ScriptLoader.add(t[n]+"/langs/"+r+".js")},"loaded")},add:function(t,i,u){var f=i;return s.push(f),n[t]={instance:f,dependencies:u},r(t,"added"),f},remove:function(i){delete t[i];delete n[i]},createUrl:f,addComponents:function(n,i){var r=t[n];e(i,function(n){kf.ScriptLoader.add(r+"/"+n)})},load:h,waitFor:o}};rr.languageLoad=!0;rr.baseURL="";rr.PluginManager=rr();rr.ThemeManager=rr();var iyt=function(n,t){var i=[];return e(nu(n),function(n){i=(i=t(n)?i.concat([n]):i).concat(iyt(n,t))}),i},rit=f("mce-annotation"),la=f("data-mce-annotation"),bp=f("data-mce-annotation-uid"),fvi=function(n,i){return gi(t.fromDom(n.getBody()),"["+bp()+'="'+i+'"]')},evi=0,cc=Math.round,ovi=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯ﾞ-ﾟ]"),ryt=h,svi=nf,uyt=cy("display","block table"),hvi=cy("float","left right"),aa=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(n){for(var i=0;i<t.length;i++)if(!t[i](n))return!1;return!0}}(ryt,svi,gd(hvi)),cvi=gd(cy("white-space","pre pre-line pre-wrap")),va=o,uit=st,fyt=d.nodeIndex,kp=function(n,t){if(!(t<0&&h(n)&&n.hasChildNodes()))return no(n,t)},to=function(n){var i=n.getClientRects(),t=0<i.length?es(i[0]):es(n.getBoundingClientRect());return!nyt(n)&&uit(n)&&tyt(t)?function(n){var r=n.ownerDocument,i=nit(r),t=r.createTextNode(ir),u=n.parentNode,f;return u.insertBefore(t,n),i.setStart(t,0),i.setEnd(t,1),f=es(i.getBoundingClientRect()),u.removeChild(t),f}(n):tyt(t)&&nyt(n)?function(n){var r=n.startContainer,t=n.endContainer,u=n.startOffset,f=n.endOffset,i;return r===t&&o(t)&&0===u&&1===f?(i=n.cloneRange(),i.setEndAfter(t),to(i)):null}(n):t},i=function(n,t,r){function u(){return r=r||function(n){function r(n){var t;0!==n.height&&(0<i.length&&(t=i[i.length-1],n.left===t.left&&n.top===t.top&&n.bottom===t.bottom&&n.right===t.right)||i.push(n))}function e(n,t){var u=nit(n.ownerDocument);if(t<n.data.length){if(gvt(n.data[t]))return i;if(gvt(n.data[t-1])&&(u.setStart(n,t),u.setEnd(n,t+1),!iit(u)))return r(os(to(u),!1)),i}0<t&&(u.setStart(n,t-1),u.setEnd(n,t),iit(u)||r(os(to(u),!1)));t<n.data.length&&(u.setStart(n,t),u.setEnd(n,t+1),iit(u)||r(os(to(u),!0)))}var i=[],u=n.container(),o=n.offset(),t,f;if(va(u))return e(u,o),i;if(ryt(u))if(n.isAtEnd())t=kp(u,o),va(t)&&e(t,t.data.length),aa(t)&&!uit(t)&&r(os(to(t),!1));else{if(t=kp(u,o),va(t)&&e(t,0),aa(t)&&n.isAtEnd())return r(os(to(t),!1)),i;f=kp(n.container(),n.offset()-1);aa(f)&&!uit(f)&&(!uyt(f)&&!uyt(t)&&aa(t)||r(os(to(f),!1)));aa(t)&&r(os(to(t),!0))}return i}(i(n,t))}return{container:f(n),offset:f(t),toRange:function(){var i=nit(n.ownerDocument);return i.setStart(n,t),i.setEnd(n,t),i},getClientRects:u,isVisible:function(){return 0<u().length},isAtStart:function(){return va(n),0===t},isAtEnd:function(){return va(n)?t>=n.data.length:t>=n.childNodes.length},isEqual:function(i){return i&&n===i.container()&&t===i.offset()},getNode:function(i){return kp(n,i?t-1:t)}}};i.fromRangeStart=function(n){return i(n.startContainer,n.startOffset)};i.fromRangeEnd=function(n){return i(n.endContainer,n.endOffset)};i.after=function(n){return i(n.parentNode,fyt(n)+1)};i.before=function(n){return i(n.parentNode,fyt(n))};i.isAbove=function(n,t){return di(or(t.getClientRects()),vo(n.getClientRects()),sc).getOr(!1)};i.isBelow=function(n,t){return di(vo(t.getClientRects()),or(n.getClientRects()),hc).getOr(!1)};i.isAtStart=function(n){return!!n&&n.isAtStart()};i.isAtEnd=function(n){return!!n&&n.isAtEnd()};i.isTextPosition=function(n){return!!n&&o(n.container())};i.isElementPosition=function(n){return!1===i.isTextPosition(n)};var bt,iw,au=o,ppt=bo,wpt=d.nodeIndex,bpt=function(n){var t=n.parentNode;return ppt(t)?bpt(t):t},lit=function(n){return n?ry(n.childNodes,function(n,t){return ppt(t)&&"BR"!==t.nodeName?n=n.concat(lit(t)):n.push(t),n},[]):[]},rw=rt,kpt=u(yyt,bi,!0),yvi=d.DOM,pvi=h,dpt=o,hs=function(n){pvi(n)&&hr(n)&&(blt(n)?n.removeAttribute("data-mce-caret"):ept(n));dpt(n)&&(spt(n),0===n.data.length&&ept(n))},ait=kr().browser,wvi=rt,bvi=tu,kvi=vy,ka=function(n){return wvi(n)||bvi(n)},vit=rt,dvi=tu,gvi=cy("display","block table table-cell table-caption list-item"),gpt=hr,nwt=bh,twt=h,nyi=nf,da=u(apt,!0),ga=u(apt,!1);(iw=bt=bt||{})[iw.Backwards=-1]="Backwards";iw[iw.Forwards=1]="Forwards";var rbt,cw,ubt,eyi=rt,hf=o,fbt=h,ert=st,bc=nf,lw=by,ort=function(n,t,r){var h,e,s,a,v,c,f,o,u,l;if(!fbt(r)||!t)return null;if(t.isEqual(i.after(r))&&r.lastChild){if(s=i.after(r.lastChild),n<0&&bc(r.lastChild)&&fbt(r.lastChild))return ert(r.lastChild)?i.before(r.lastChild):s}else s=t;if(f=s.container(),o=s.offset(),hf(f)){if(n<0&&0<o)return i(f,--o);if(0<n&&o<f.length)return i(f,++o);h=f}else{if(n<0&&0<o&&(u=iwt(f,o-1),bc(u)))return!ibt(u)&&(e=lc(u,n,lw,u))?hf(e)?i(e,e.data.length):i.after(e):hf(u)?i(u,u.data.length):i.before(u);if(0<n&&o<f.childNodes.length&&(u=iwt(f,o),bc(u)))return ert(u)?(a=r,(c=(v=u).nextSibling)&&bc(c)?hf(c)?i(c,0):i.before(c):ort(bt.Forwards,i.after(v),a)):!ibt(u)&&(e=lc(u,n,lw,u))?hf(e)?i(e,0):i.before(e):hf(u)?i(u,0):i.after(u);h=u||s.getNode()}return(0<n&&s.isAtEnd()||n<0&&s.isAtStart())&&(h=lc(h,n,lt,r,!0),lw(h,r))?rwt(n,h):(u=lc(h,n,lw,r),l=yo(p(function(n,t){for(var i=[];n&&n!==t;)i.push(n),n=n.parentNode;return i}(f,r),eyi)),!l||u&&l.contains(u)?u?rwt(n,u):null:0<n?i.after(l):i.before(l))},vr=function(t,i,r){var u=vu(i);return n.from(t?u.next(r):u.prev(r))},ebt=function(t,i,r,u){return uw(t,i,r).bind(function(r){return u(r)?ebt(t,i,r,u):n.some(r)})},yu=u(vr,!0),cf=u(vr,!1),pi=u(ac,!0),lf=u(ac,!1),obt="_mce_caret",oyi=function(n,t,r){return 2===t?yyt(ae,r,n):3===t?(f=(u=n).getRng(),{start:syt(u.dom.getRoot(),i.fromRangeStart(f)),end:syt(u.dom.getRoot(),i.fromRangeEnd(f))}):t?{rng:n.getRng()}:wyt(n,!1);var u,f},rv=(rbt=ir,function(n){return rbt===n}),srt=function(n,t){return void 0===t&&(t=!1),!(!tt(n)||!o(n))&&ns(t?n.data.replace(/ /g," "):n.data)},kc=ar,sbt=ow,hbt=srt,syi=bit,cbt=function(n,t,i,r){var u=i.parentNode;return!tt(i[r])&&(!(u!==t&&!wu(u)&&!n.isBlock(u))||cbt(n,t,u,r))},lbt=function(n){return hct(n).fold(f([n]),function(t){return[n].concat(lbt(t))})},hrt=function(n){return vg(n).fold(f([n]),function(t){return"br"===vt(t)?wo(t).map(function(t){return[n].concat(hrt(t))}).getOr([]):[n].concat(hrt(t))})},hyi=(cw=gr,{get:function(n){if(!cw(n))throw new Error("Can only get text value of a text node");return ubt(n).getOr("")},getOption:ubt=function(t){return cw(t)?n.from(t.dom.nodeValue):n.none()},set:function(n,t){if(!cw(n))throw new Error("Can only set raw text value of a text node");n.dom.nodeValue=t}});iv.isBookmarkNode=ar;s={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(n){return n.shiftKey||n.ctrlKey||n.altKey||s.metaKeyPressed(n)},metaKeyPressed:function(n){return l.mac?n.metaKey:n.ctrlKey&&!n.altKey}};kbt=rt;uv.compareRanges=vrt;uv.getCaretRangeFromPoint=art;uv.getSelectedNode=wp;uv.getNode=no;gbt=(pw="height",dbt=function(n){var t=n.dom;return na(n)?t.getBoundingClientRect().height:t.offsetHeight},{set:function(n,t){if(!eh(t)&&!t.match(/^[0-9]+$/))throw new Error(pw+".set accepts only positive integer values. Value was "+t);var i=n.dom;ay(i)&&(i.style[pw]=t+"px")},get:nkt,getOuter:nkt,aggregate:tkt,max:function(n,t,i){var r=tkt(n,i);return r<t?t-r:0}});var ev,gkt=function(n,t){return n.view(t).fold(f([]),function(t){var i=n.owner(t),r=gkt(n,i);return[t].concat(r)})},gyi=Object.freeze({__proto__:null,view:function(i){var r;return(i.dom===document?n.none():n.from(null===(r=i.dom.defaultView)||void 0===r?void 0:r.frameElement)).map(t.fromDom)},owner:ah}),npi=function(n,i,r,u){var c=t.fromDom(n.getBody()),l=t.fromDom(n.getDoc()),o,s,h,f,e;c.dom.offsetWidth;e=(o=t.fromDom(r.startContainer),s=r.startOffset,h=function(n,t){var r=nu(n),i;return 0===r.length||wrt(n)?{element:n,offset:t}:t<r.length&&!wrt(r[t])?{element:r[t],offset:0}:(i=r[r.length-1],wrt(i)?{element:n,offset:t}:"img"===vt(i)?{element:i,offset:1}:gr(i)?{element:i,offset:frt(i).length}:{element:i,offset:nu(i).length})}(o,s),f=t.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">﻿<\/span>'),ou(h.element,f),ikt(f,function(){return ni(f)}));ukt(n,l,i,e,u);e.cleanup()},tpi=function(n,i,r){var f=r.startContainer,o=r.startOffset,e=r.endContainer,s=r.endOffset,u;i(t.fromDom(f),t.fromDom(e));u=n.dom.createRng();u.setStart(f,o);u.setEnd(e,s);n.selection.setRng(r)},iut=he([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ipi=(iut.before,iut.on,iut.after,function(n){return n.fold(bi,bi,bi)}),dw=he([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ndt={domRange:dw.domRange,relative:dw.relative,exact:dw.exact,exactFromRange:function(n){return dw.exact(n.start,n.soffset,n.finish,n.foffset)},getWin:function(n){return ect(n.match({domRange:function(n){return t.fromDom(n.startContainer)},relative:function(n){return ipi(n)},exact:function(n){return n}}))},range:function(n,t,i,r){return{start:n,soffset:t,finish:i,foffset:r}}},rpi=kr().browser,tdt={isEditorUIElement:function(n){var t=n.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},rut=d.DOM,uut=function(n){return n.editorManager.setActive(n)},upi={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ru=(ci.create=function(n,t){var i=new ci(n,upi[n]||1);return t&&et(t,function(n,t){i.attr(t,n)}),i},ci.prototype.replace=function(n){return n.parent&&n.remove(),this.insert(n,this),this.remove(),this},ci.prototype.attr=function(n,t){var i,u=this,r;if("string"!=typeof n)return null!=n&&et(n,function(n,t){u.attr(t,n)}),u;if(i=u.attributes){if(void 0===t)return i.map[n];if(null===t){if(n in i.map)for(delete i.map[n],r=i.length;r--;)if(i[r].name===n)return i.splice(r,1),u;return u}if(n in i.map){for(r=i.length;r--;)if(i[r].name===n){i[r].value=t;break}}else i.push({name:n,value:t});return i.map[n]=t,u}},ci.prototype.clone=function(){var u,i=new ci(this.name,this.type),n,r,f,t;if(u=this.attributes){for(n=[],n.map={},r=0,f=u.length;r<f;r++)t=u[r],"id"!==t.name&&(n[n.length]={name:t.name,value:t.value},n.map[t.name]=t.value);i.attributes=n}return i.value=this.value,i.shortEnded=this.shortEnded,i},ci.prototype.wrap=function(n){return this.parent.insert(n,this),n.append(this),this},ci.prototype.unwrap=function(){for(var t,n=this.firstChild;n;)t=n.next,this.insert(n,this,!0),n=t;this.remove()},ci.prototype.remove=function(){var n=this.parent,t=this.next,i=this.prev;return n&&(n.firstChild===this?(n.firstChild=t)&&(t.prev=null):i.next=t,n.lastChild===this?(n.lastChild=i)&&(i.next=null):t.prev=i,this.parent=this.next=this.prev=null),this},ci.prototype.append=function(n){n.parent&&n.remove();var t=this.lastChild;return t?((t.next=n).prev=t,this.lastChild=n):this.lastChild=this.firstChild=n,n.parent=this,n},ci.prototype.insert=function(n,t,i){n.parent&&n.remove();var r=t.parent||this;return i?(t===r.firstChild?r.firstChild=n:t.prev.next=n,n.prev=t.prev,(n.next=t).prev=n):(t===r.lastChild?r.lastChild=n:t.next.prev=n,n.next=t.next,(n.prev=t).next=n),n.parent=r,n},ci.prototype.getAll=function(n){for(var i=[],t=this.firstChild;t;t=kw(t,this))t.name===n&&i.push(t);return i},ci.prototype.children=function(){for(var t=[],n=this.firstChild;n;n=n.next)t.push(n);return t},ci.prototype.empty=function(){var t,n,i;if(this.firstChild){for(t=[],n=this.firstChild;n;n=kw(n,this))t.push(n);for(i=t.length;i--;)(n=t[i]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},ci.prototype.isEmpty=function(n,t,i){void 0===t&&(t={});var r=this.firstChild;if(dkt(this))return!1;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(n[r.name]||dkt(r))return!1}if(8===r.type||3===r.type&&!function(n){if(ns(n.value)){var t=n.parent;return!t||"span"===t.name&&!t.attr("style")||!/^[ ]+$/.test(n.value)}}(r)||3===r.type&&r.parent&&t[r.parent.name]&&ns(r.value)||i&&i(r))return!1}while(r=kw(r,this));return!0},ci.prototype.walk=function(n){return kw(this,null,n)},ci);var idt=r.each,fpi=r.trim,epi="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),opi={ftp:21,http:80,https:443,mailto:25},spi=["img","video"],ro=(fr.parseDataUri=function(n){var t,i=decodeURIComponent(n).split(","),r=/data:([^;]+)/.exec(i[0]);return{type:t=r?r[1]:t,data:i[1]}},fr.isDomSafe=function(n,t,i){if((i=void 0===i?{}:i).allow_script_urls)return!0;var e,u,f,o,r=ve.decode(n).replace(/[\s\u0000-\u001F]+/g,"");try{r=decodeURIComponent(r)}catch(n){r=unescape(r)}return!(/((java|vb)script|mhtml):/i.test(r)||(u=r,f=t,!(e=i).allow_html_data_urls&&(/^data:image\//i.test(u)?(tt(o=e.allow_svg_data_urls)?!o:!tt(f)||!dt(spi,f))&&/^data:image\/svg\+xml/i.test(u):/^data:/i.test(u))))},fr.getDocumentBaseUrl=function(n){var t=0!==n.protocol.indexOf("http")&&"file:"!==n.protocol?n.href:n.protocol+"//"+n.host+n.pathname;return/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},fr.prototype.setPath=function(n){var t=/^(.*?)\/?(\w+)?$/.exec(n);this.path=t[0];this.directory=t[1];this.file=t[2];this.source="";this.getURI()},fr.prototype.toRelative=function(n){var r,t,i,u;return"./"===n?n:(t=new fr(n,{base_uri:this}),"mce_host"!==t.host&&this.host!==t.host&&t.host||this.port!==t.port||this.protocol!==t.protocol&&""!==t.protocol)?t.getURI():(i=this.getURI(),u=t.getURI(),i===u||"/"===i.charAt(i.length-1)&&i.substr(0,i.length-1)===u?i:(r=this.toRelPath(this.path,t.path),t.query&&(r+="?"+t.query),t.anchor&&(r+="#"+t.anchor),r))},fr.prototype.toAbsolute=function(n,t){var i=new fr(n,{base_uri:this});return i.getURI(t&&this.isSameOrigin(i))},fr.prototype.isSameOrigin=function(n){if(this.host==n.host&&this.protocol==n.protocol){if(this.port==n.port)return!0;var t=opi[this.protocol];if(t&&(this.port||t)==(n.port||t))return!0}return!1},fr.prototype.toRelPath=function(n,t){var i,u,e=0,o="",f=n.substring(0,n.lastIndexOf("/")).split("/"),r=t.split("/");if(f.length>=r.length)for(i=0,u=f.length;i<u;i++)if(i>=r.length||f[i]!==r[i]){e=i+1;break}if(f.length<r.length)for(i=0,u=r.length;i<u;i++)if(i>=f.length||f[i]!==r[i]){e=i+1;break}if(1===e)return t;for(i=0,u=f.length-(e-1);i<u;i++)o+="../";for(i=e-1,u=r.length;i<u;i++)o+=i!==e-1?"/"+r[i]:r[i];return o},fr.prototype.toAbsPath=function(n,t){var i,r,e=0,u=[],s=/\/$/.test(t)?"/":"",o=n.split("/"),f=t.split("/");for(idt(o,function(n){n&&u.push(n)}),o=u,i=f.length-1,u=[];0<=i;i--)0!==f[i].length&&"."!==f[i]&&(".."!==f[i]?0<e?e--:u.push(f[i]):e++);return 0!==(r=(i=o.length-e)<=0?iy(u).join("/"):o.slice(0,i).join("/")+"/"+iy(u).join("/")).indexOf("/")&&(r="/"+r),s&&r.lastIndexOf("/")!==r.length-1&&(r+=s),r},fr.prototype.getURI=function(n){var t;return void 0===n&&(n=!1),this.source&&!n||(t="",n||(t+=this.protocol?this.protocol+"://":"//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},fr);rdt=r.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea");nb=function(n,t,i){var r,o,f,e,s,u;return(void 0===i&&(i=0),r=n.toLowerCase(),-1!==r.indexOf("[if ",i)&&(s=i,/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(r.substr(s))))?(o=r.indexOf("[endif]",i),r.indexOf(">",o)):t?(f=r.indexOf(">",i),-1!==f?f:r.length):(e=/--!?>/g,e.lastIndex=i,u=e.exec(n),u?u.index+u[0].length:r.length)};gw.findEndTag=eut;var hpi=udt,cpi=r.each,odt=r.makeMap,sdt=new Set;e(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],function(n){sdt.add(n)});var unt,fnt=["font","text-decoration","text-emphasis"],sft=u(hdt,!0,vc),hft=u(hdt,!1,vc),awi=uo(!0,cdt),vwi=uo(!1,cdt),nl=uo(!0,tu),tl=uo(!1,tu),ent=uo(!0,vh),ont=uo(!1,vh),fo=uo(!0,ldt),eo=uo(!1,ldt),cft=u(pdt,!1),snt=u(pdt,!0),ywi=u(ydt,!1),pwi=u(ydt,!0),wwi=u(tb,!1),bwi=u(tb,!0),ov=he([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),hnt=function(t){var i;return(8===uct(i=t)||"#comment"===vt(i)?wo:vg)(t).bind(hnt).orThunk(function(){return n.some(t)})},lft=function(n,i,r,u){void 0===u&&(u=!0);i.deleteContents();var o,s=hnt(r).getOr(r),f=t.fromDom(n.dom.getParent(s.dom,n.dom.isBlock));return pt(f)&&(as(f),u&&n.selection.setCursorLocation(f.dom,0)),g(r,f)||e((ly(eu(f),r)?[]:eu(o=f).map(nu).map(function(n){return p(n,function(n){return!g(o,n)})}).getOr([])).concat(nu(r)),function(n){g(n,f)||ee(n,f)||!pt(n)||ni(n)}),!0},aft=function(n,t){return gt(gf(t,n),function(n){return su(n)&&"caption"===vt(n)})},ob=function(t,i){return as(i),t.selection.setCursorLocation(i.dom,0),n.some(!0)},vft=vy,yft=function(n,t){t(n);n.firstChild&&yft(n.firstChild,t);n.next&&yft(n.next,t)},pft=kit,af=function(n,t,i,r,u){var h=n.formatter.get(i),c=n.dom,e,f,o,s;if(h&&t)for(e=0;e<h.length;e++)if(f=h[e],dgt(n.dom,t,f)&&ggt(c,t,f,"attributes",u,r)&&ggt(c,t,f,"styles",u,r)){if(o=f.classes,o)for(s=0;s<o.length;s++)if(!n.dom.hasClass(t,df(o[s],r)))return;return f}},il=fi,cnt="_mce_caret",sb={},lnt=hh,ant=yl;unt=function(n){var t,r=n.selection.getRng(),i=dr(["pre"]);r.collapsed||(t=n.selection.getSelectedBlocks(),ant(lnt(lnt(t,i),function(n){return i(n.previousSibling)&&-1!==rht(t,n.previousSibling)}),function(n){var t,i=n.previousSibling;a(t=n).remove();a(i).append("<br><br>").append(t.childNodes)}))};sb.pre||(sb.pre=[]);sb.pre.push(unt);var uet=r.each,fet=function(n,t,i){uet(n.childNodes,function(n){wft(n)&&(t(n)&&i(n),n.hasChildNodes()&&fet(n,t,i))})},sv=he([{keep:[]},{rename:["name"]},{removed:[]}]),ebi=/^(src|href|style)$/,eet=r.each,ul=kit,gti=r.each,vb=r.each,oet=function(i,u,f,s){function p(n,t){var i;ft((t=void 0===t?l:t).onformat)&&t.onformat(n,t,f,s);vb(t.styles,function(t,i){a.setStyle(n,i,df(t,f))});!t.styles||(i=a.getAttrib(n,"style"))&&a.setAttrib(n,"data-mce-style",i);vb(t.attributes,function(t,i){a.setAttrib(n,i,df(t,f))});vb(t.classes,function(t){t=df(t,f);a.hasClass(n,t)||a.addClass(n,t)})}function k(n,t){var i=!1;return vb(n,function(n){return!!ur(n)&&(tt(n.collapsed)&&n.collapsed!==et||!a.is(t,n.selector)||of(t)?void 0:(p(t,n),!(i=!0)))}),i}function d(s,y,w){var d=[],b=!0,nt=l.inline||l.block,it=function(n){if(ht(n)){var t=a.create(n);return p(t),t}return null}(nt);nv(s,y,function(r){var a,y=function(r){var rt=!1,ht=b,ct=r.nodeName.toLowerCase(),ft=r.parentNode,et=ft.nodeName.toLowerCase(),ot,ut;if(h(r)&&s.getContentEditable(r)&&(ht=b,b="true"===s.getContentEditable(r),rt=!0),st(r)&&!function(i,r,u,f){var e,o,s,h,l,a;if(i.getParam("format_empty_lines",!1,"boolean")&&kt(r))return e=c(c({},i.schema.getTextBlockElements()),{td:{},th:{},li:{},dt:{},dd:{},figcaption:{},caption:{},details:{},summary:{}}),o=(s=t.fromDom(u),l=function(n){return of(n.dom)},((a=(h=s).dom).parentNode?dci(t.fromDom(a.parentNode),function(n){return!g(h,n)&&l(n)}):n.none()).isSome()),sh(e,f)&&pt(t.fromDom(u.parentNode),!1)&&!o}(i,l,r,et))return a=null,void(sf(l)&&s.remove(r));if(sf(l)&&l.wrapper&&af(i,r,u,f))a=null;else{if(b&&!rt&&sf(l)&&!l.wrapper&&bit(i,ct)&&yc(i,et,nt))return ot=s.rename(r,nt),p(ot),d.push(ot),void(a=null);if(ur(l)&&(ut=k(v,r),!ut&&tt(ft)&&git(l)&&(ut=k(v,ft)),!kt(l)||ut))return void(a=null);!b||rt||!yc(i,nt,ct)||!yc(i,et,nt)||!w&&o(r)&&tp(r.data)||of(r)||kt(l)&&s.isBlock(r)?(a=null,e(bu(r.childNodes),y),rt&&(b=ht),a=null):(a||(a=s.clone(it,!1),r.parentNode.insertBefore(a,r),d.push(a)),a.appendChild(r))}};e(r,y)});!0===l.links&&e(d,function(n){var t=function(n){"A"===n.nodeName&&p(n,l);e(bu(n.childNodes),t)};t(n)});e(d,function(n){function lt(n){var i;1===n.nodeType&&n.parentNode&&1===n.parentNode.nodeType&&(i=vwt(t,n.parentNode),t.getStyle(n,"color")&&i?t.setStyle(n,"text-decoration",i):t.getStyle(n,"text-decoration")===i&&t.setStyle(n,"text-decoration",null))}var g,h,a,nt,it,ot,c,y,st,w,b,rt,t,ut,ft,k,ht,et,ct=(g=0,e(n.childNodes,function(n){var t;tt(t=n)&&o(t)&&0===t.length||ar(n)||g++}),g);!(1<d.length)&&s.isBlock(n)||0!==ct?(kt(l)||sf(l)&&l.wrapper)&&(l.exact||1!==ct||(n=gt((rt=n).childNodes,kwi).filter(function(n){return dgt(s,n,l)}).map(function(n){var t=s.clone(n,!1);return p(t),s.replace(t,rt,!0),s.remove(n,!0),t}).getOr(rt)),k=i,ht=f,et=n,gti(v,function(n){var t,i,r;kt(n)&&gti(k.dom.select(n.inline,et),function(t){wft(t)&&rl(k,n,ht,t,n.exact?t:null)});t=k.dom;(i=n).clear_child_styles&&(r=i.links?"*:not(a)":"*",uet(t.select(r,et),function(n){wft(n)&&uet(i.styles,function(i,r){t.setStyle(n,r,"")})}))}),y=l,af(c=i,(b=n).parentNode,st=u,w=f)&&rl(c,y,w,b)||y.merge_with_parents&&c.dom.getParent(b.parentNode,function(n){if(af(c,n,st,w))return rl(c,y,w,b),!0}),ot=n,(it=l).styles&&it.styles.backgroundColor&&fet(ot,wnt(s,"fontSize"),bnt(s,"backgroundColor",df(it.styles.backgroundColor,f))),t=s,ft=n,(ut=l).styles&&(ut.styles.color||ut.styles.textDecoration)&&(r.walk(ft,lt,"childNodes"),lt(ft)),h=s,nt=n,!kt(a=l)||"sub"!==a.inline&&"sup"!==a.inline||(fet(nt,wnt(h,"fontSize"),bnt(h,"fontSize","")),h.remove(h.select("sup"===a.inline?"sub":"sup",nt),!0)),pnt(s,l,0,n)):s.remove(n,!0)})}var nt,rt,it,ut,v=i.formatter.get(u),l=v[0],et=!s&&i.selection.isCollapsed(),a=i.dom,y=i.selection,b,ot,w;if("false"!==a.getContentEditable(y.getNode()))l&&(s?fw(s)?k(v,s)||((nt=a.createRng()).setStartBefore(s),nt.setEndAfter(s),d(a,pc(i,nt,v),!0)):d(a,s,!0):et&&kt(l)&&!wc(i).length?function(n,t,i){var o,f=n.selection,e=f.getRng(),r=e.startOffset,s=e.startContainer.nodeValue,u=cs(n.getBody(),f.getStart()),c,l,a,v,h;u&&(o=tnt(u));h=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&0<r&&r<s.length&&h.test(s.charAt(r))&&h.test(s.charAt(r-1))?(c=f.getBookmark(),e.collapse(!0),l=yw(pc(n,e,n.formatter.get(t))),n.formatter.apply(t,i,l),f.moveToBookmark(c)):(u&&o.nodeValue===il||(a=n.getDoc(),v=fft(!0).dom,o=(u=a.importNode(v,!0)).firstChild,e.insertNode(u),r=1),n.formatter.apply(t,i,u),f.setCursorLocation(o,r))}(i,u,f):(rt=y.getNode(),it=v[0],i.settings.forced_root_block||!it.defaultBlock||a.getParent(rt,a.isBlock)||oet(i,it.defaultBlock),y.setRng(dut(y.getRng())),urt(y,!0,function(){rrt(i,function(n,t){var r=t?n:pc(i,n,v);d(a,r,!1)})}),awt(a,y,y.getRng()),i.nodeChanged()),ut=i,ant(sb[u],function(n){n(ut)})),vbt(i,u,s,f);else{for(s=y.getNode(),b=0,ot=v.length;b<ot;b++)if(w=v[b],w.ceFalseOverride&&ur(w)&&a.is(s,w.selector)){p(s,w);break}vbt(i,u,s,f)}},nii=function(n){return n.selection.getStart()},tii=function(n,t,i){var r=fti(n,t);et(i,function(i,u){function f(i){var o,s=uti(n,r,u,i.similar,rti(i)?i.vars:void 0),f=s.isSome();i.state.get()!==f&&(i.state.set(f),o=s.getOr(t),rti(i)?i.callback(f,{node:o,format:u,parents:r}):e(i.callbacks,function(n){return n(f,{node:o,format:u,parents:r})}))}e([i.withSimilar,i.withoutSimilar],f);e(i.withVars,f)})},obi=fht(function(){return document.implementation.createHTMLDocument("undo")});var yii,wb,wbi=0,pii=function(n,t){return n&&n.firstChild&&n.firstChild===n.lastChild&&n.firstChild.name===t},wii=r.makeMap,bii=r.each,kii=r.explode,bbi=r.extend,bb=d.DOM,dii=(yii=function(n,t){return fh(n)&&fh(t)?dii(n,t):t},function(){for(var r,u,i,f,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(r={},u=0;u<n.length;u++){f=n[u];for(i in f)w(f,i)&&(r[i]=yii(r[i],f[i]))}return r}),kbi="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),dbi="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),gbi="imagetools,toc".split(","),vet=kr().deviceType,nki=vet.isTouch(),gii=vet.isPhone(),tki=vet.isTablet(),iki=["lists","autolink","autosave"],nri={table_grid:!1,object_resizing:!1,resize:!1},kb=(wb={},{add:function(n,t){wb[n]=t},get:function(n){return wb[n]||{icons:{}}},has:function(n){return w(wb,n)}}),rki=u(cii,"clientWidth"),uki=u(cii,"clientHeight"),fki=u(lii,"margin-top"),eki=u(lii,"margin-left"),pu=rr.PluginManager,oo=rr.ThemeManager;var ie,ho,yui=function(n,t){var i=n.editorManager.baseURL+"/skins/content",r="content"+n.editorManager.suffix+".css",u=!0===n.inline;return ut(t,function(t){return/^[a-z0-9\-]+$/i.test(t)&&!u?i+"/"+t+"/"+r:n.documentBaseURI.toAbsolute(t)})},hdi=0,sk=r.each,li=d.DOM,cdi=[9,27,s.HOME,s.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,s.DOWN,s.UP,s.LEFT,s.RIGHT].concat(l.browser.isFirefox()?[224]:[]),pui="data-mce-placeholder",ldi=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,wui=u(yr,!0),bui=u(yr,!1),adi=gu,vdi=rt,pr=he([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),el=o,ydi=u(fk,!0),pdi=u(fk,!1),ai=he([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),tot=function(n){return n.fold(bi,bi,bi,bi)};u(not,!1);u(not,!0);(ho=ie={})[ho.Br=0]="Br";ho[ho.Block=1]="Block";ho[ho.Wrap=2]="Wrap";ho[ho.Eol=3]="Eol";var ws,ck,lv=u(dui,i.isAbove,-1),av=u(dui,i.isBelow,1),bdi=u(gui,-1,lv),kdi=u(gui,1,av);(ck=ws=ws||{})[ck.Up=-1]="Up";ck[ck.Down=1]="Down";var dgi=u(tfi,ws.Up,sc,hc),ggi=u(tfi,ws.Down,hc,sc),nni=rt,aoi=lc,wot=function(n,t){var f=n.selection.getRng(),e=n.getBody(),r,u;return t?(r=i.fromRangeEnd(f),u=av(e,r),vo(u.positions)):(r=i.fromRangeStart(f),or((u=lv(e,r)).positions))},tni=u(lfi,!0),ini=u(lfi,!1),voi=function(n){return p(ut(n.selection.getSelectedBlocks(),t.fromDom),function(n){return!wfi(n)&&!eu(n).exists(wfi)&&yy(n,function(n){return gu(n.dom)||rt(n.dom)}).exists(function(n){return gu(n.dom)})})},yoi=rt,rni=u(lei,function(n){return n.bottom},function(n,t){return n.y<t}),uni=u(lei,function(n){return n.top},function(n,t){return n.y>t}),fni=u(aei,lv),eni=u(aei,av),oni=function(n,t){return r=i.after(t),!!st(r.getNode())||yu(n,i.after(t)).map(function(n){return st(n.getNode())}).getOr(!1);var r},er=he([{br:[]},{block:[]},{none:[]}]),sni=kr().browser,hni=kr(),cni=u(loi,ir),lni=u(loi," "),ani=(bot.prototype.nodeChanged=function(n){var t,r,i,u=this.editor.selection;this.editor.initialized&&u&&!this.editor.getParam("disable_nodechange")&&!this.editor.mode.isReadOnly()&&(i=this.editor.getBody(),(t=u.getStart(!0)||i).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,i)||(t=i),r=[],this.editor.dom.getParent(t,function(n){return n===i||void r.push(n)}),(n=n||{}).element=t,n.parents=r,this.editor.fire("NodeChange",n))},bot.prototype.isSameElementPath=function(n){var t,i=this.editor.$(n).parentsUntil(this.editor.getBody()).add(n);if(i.length===this.lastPath.length){for(t=i.length;0<=t&&i[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=i,!0}return this.lastPath=i,!1},bot);var td=rt,itr=gu,ssi=function(n){n.on(function(n){boi(n.ghost)});n.clear()},hsi=gu,bs=rt,nst=d.DOM,wv=d.DOM,csi=d.DOM,lsi=function(n,t,i){var o,s,h,u,f=pu.get(i),c=pu.urls[i]||n.documentBaseUrl.replace(/\/$/,""),e;if(i=r.trim(i),f&&-1===r.inArray(t,i)&&(r.each(pu.dependencies(i),function(i){lsi(n,t,i)}),!n.plugins[i]))try{e=new f(n,c,n.$);(n.plugins[i]=e).init&&(e.init(n,c),t.push(i))}catch(f){s=i;h=f;abt(o=n,"PluginLoadError",{message:u=lu.translate(["Failed to initialize plugin: {0}",s])});ok(u,h);db(o,u)}},ks=d.DOM,rtr={"font-size":"size","font-family":"face"},utr=esi("font-size"),ftr=ao(function(n){return n.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},esi("font-family")),id=r.each,etr=r.map,otr=r.inArray,asi=(wi.prototype.execCommand=function(n,t,i,r){var o,s,f=!1,u=this,e;if(!u.editor.removed){if("mcefocus"!==n.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(n)||r&&r.skip_focus?grt(s=u.editor).each(function(n){return s.selection.setRng(n)}):u.editor.focus()),(r=u.editor.fire("BeforeExecCommand",{command:n,ui:t,value:i})).isDefaultPrevented())return!1;if(e=n.toLowerCase(),o=u.commands.exec[e])return o(e,t,i),u.editor.fire("ExecCommand",{command:n,ui:t,value:i}),!0;if(id(this.editor.plugins,function(r){if(r.execCommand&&r.execCommand(n,t,i))return u.editor.fire("ExecCommand",{command:n,ui:t,value:i}),!(f=!0)}),f)return f;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(n,t,i))return u.editor.fire("ExecCommand",{command:n,ui:t,value:i}),!0;try{f=u.editor.getDoc().execCommand(n,t,i)}catch(r){}return!!f&&(u.editor.fire("ExecCommand",{command:n,ui:t,value:i}),!0)}},wi.prototype.queryCommandState=function(n){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(n=n.toLowerCase(),t=this.commands.state[n])return t(n);try{return this.editor.getDoc().queryCommandState(n)}catch(n){}return!1}},wi.prototype.queryCommandValue=function(n){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(n=n.toLowerCase(),t=this.commands.value[n])return t(n);try{return this.editor.getDoc().queryCommandValue(n)}catch(n){}}},wi.prototype.addCommands=function(n,t){void 0===t&&(t="exec");var i=this;id(n,function(n,r){id(r.toLowerCase().split(","),function(r){i.commands[t][r]=n})})},wi.prototype.addCommand=function(n,t,i){var r=this;n=n.toLowerCase();this.commands.exec[n]=function(n,u,f,e){return t.call(i||r.editor,u,f,e)}},wi.prototype.queryCommandSupported=function(n){if(n=n.toLowerCase(),this.commands.exec[n])return!0;try{return this.editor.getDoc().queryCommandSupported(n)}catch(n){}return!1},wi.prototype.addQueryStateHandler=function(n,t,i){var r=this;n=n.toLowerCase();this.commands.state[n]=function(){return t.call(i||r.editor)}},wi.prototype.addQueryValueHandler=function(n,t,i){var r=this;n=n.toLowerCase();this.commands.value[n]=function(){return t.call(i||r.editor)}},wi.prototype.hasCustomCommand=function(n){return n=n.toLowerCase(),!!this.commands.exec[n]},wi.prototype.execNativeCommand=function(n,t,i){return void 0===t&&(t=!1),void 0===i&&(i=null),this.editor.getDoc().execCommand(n,t,i)},wi.prototype.isFormatMatch=function(n){return this.editor.formatter.match(n)},wi.prototype.toggleFormat=function(n,t){this.editor.formatter.toggle(n,t);this.editor.nodeChanged()},wi.prototype.storeSelection=function(n){this.selectionBookmark=this.editor.selection.getBookmark(n)},wi.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},wi.prototype.setupCommands=function(n){function f(t){return function(){var i=n.selection,r=i.isCollapsed()?[n.dom.getParent(i.getNode(),n.dom.isBlock)]:i.getSelectedBlocks(),u=etr(r,function(i){return!!n.formatter.matchNode(i,t)});return-1!==otr(u,!0)}}var i=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":y,"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},mceFocus:function(t,i,r){var u,f;f=r;(u=n).removed||(f?uut:function(n){var f=n.selection,t=n.getBody(),i=f.getRng(),r,e,u;if(n.quirks.refreshContentEditable(),void 0!==n.bookmark&&!1===ls(n)&&grt(n).each(function(t){n.selection.setRng(t);i=t}),u=(r=n,e=f.getNode(),r.dom.getParent(e,function(n){return"true"===r.dom.getContentEditable(n)})),n.$.contains(t,u))return nut(u),ykt(n,i),uut(n);n.inline||(l.opera||nut(t),n.getWin().focus());(l.gecko||n.inline)&&(nut(t),ykt(n,i));uut(n)})(u)},"Cut,Copy,Paste":function(t){var u,r,f=n.getDoc();try{i.execNativeCommand(t)}catch(t){u=!0}((u="paste"===t&&!f.queryCommandEnabled(t)||u)||!f.queryCommandSupported(t))&&(r=n.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead."),l.mac&&(r=r.replace(/Ctrl\+/g,"⌘+")),n.notificationManager.open({text:r,type:"error"}))},unlink:function(){var t;n.selection.isCollapsed()?(t=n.dom.getParent(n.selection.getStart(),"a"))&&n.dom.remove(t,!0):n.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(t){var r=t.substring(7);"full"===r&&(r="justify");id("left,center,right,justify".split(","),function(t){r!==t&&n.formatter.remove("align"+t)});"none"!==r&&i.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(t){var u,r;i.execNativeCommand(t);r=n.dom.getParent(n.selection.getNode(),"ol,ul");r&&(u=r.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(u.nodeName)&&(i.storeSelection(),n.dom.split(u,r),i.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(n){i.toggleFormat(n)},"ForeColor,HiliteColor":function(n,t,r){i.toggleFormat(n,{value:r})},FontName:function(t,i,r){var u,f;f=osi(u=n,r);u.formatter.toggle("fontname",{value:ut(f.split(/\s*,\s*/),function(n){return-1===n.indexOf(" ")||po(n,'"')||po(n,"'")?n:"'"+n+"'"}).join(",")});u.nodeChanged()},FontSize:function(t,i,r){var u;(u=n).formatter.toggle("fontsize",{value:osi(u,r)});u.nodeChanged()},LineHeight:function(t,i,r){var u;(u=n).formatter.toggle("lineheight",{value:String(r)});u.nodeChanged()},Lang:function(n,t,r){i.toggleFormat(n,{value:r.code,customValue:r.customCode})},RemoveFormat:function(t){n.formatter.remove(t)},mceBlockQuote:function(){i.toggleFormat("blockquote")},FormatBlock:function(n,t,r){return i.toggleFormat(r||"p")},mceCleanup:function(){var t=n.selection.getBookmark();n.setContent(n.getContent());n.selection.moveToBookmark(t)},mceRemoveNode:function(t,r,u){var f=u||n.selection.getNode();f!==n.getBody()&&(i.storeSelection(),n.dom.remove(f,!0),i.restoreSelection())},mceSelectNodeDepth:function(t,i,r){var u=0;n.dom.getParent(n.selection.getNode(),function(t){if(1===t.nodeType&&u++===r)return n.selection.select(t),!1},n.getBody())},mceSelectNode:function(t,i,r){n.selection.select(r)},mceInsertContent:function(t,i,u){var e,f,o,s;e=n;f=function(n){if("string"==typeof n)return{content:n,details:{}};var t=r.extend({paste:n.paste,data:{paste:n.paste}},n);return{content:n.content,details:t}}(u);o=f.content;s=f.details;ret(e).editor.insertContent(o,s)},mceInsertRawHTML:function(t,i,r){n.selection.setContent("tiny_mce_marker");var u=n.getContent();n.setContent(u.replace(/tiny_mce_marker/g,function(){return r}))},mceInsertNewLine:function(t,i,r){ooi(n,r)},mceToggleFormat:function(n,t,r){i.toggleFormat(r)},mceSetContent:function(t,i,r){n.setContent(r)},"Indent,Outdent":function(t){bfi(n,t)},mceRepaint:y,InsertHorizontalRule:function(){n.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(t,i,r){n.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,n.selection.getContent({format:"text"})))},mceInsertLink:function(t,i,r){"string"==typeof r&&(r={href:r});var u=n.dom.getParent(n.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20");u&&r.href||n.formatter.remove("link");r.href&&n.formatter.apply("link",r,u)},selectAll:function(){var t,i=n.dom.getParent(n.selection.getStart(),gu);i&&((t=n.dom.createRng()).selectNodeContents(i),n.selection.setRng(t))},mceNewDocument:function(){n.setContent("")},InsertLineBreak:function(t,i,r){return ioi(n,r),!0}});i.addCommands({JustifyLeft:f("alignleft"),JustifyCenter:f("aligncenter"),JustifyRight:f("alignright"),JustifyFull:f("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(n){return i.isFormatMatch(n)},mceBlockQuote:function(){return i.isFormatMatch("blockquote")},Outdent:function(){return pfi(n)},"InsertUnorderedList,InsertOrderedList":function(t){var i=n.dom.getParent(n.selection.getNode(),"ul,ol");return i&&("insertunorderedlist"===t&&"UL"===i.tagName||"insertorderedlist"===t&&"OL"===i.tagName)}},"state");i.addCommands({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}});i.addQueryValueHandler("FontName",function(){return got(t=n,function(n){return ftr(t.getBody(),n.dom)}).getOr("");var t},this);i.addQueryValueHandler("FontSize",function(){return got(t=n,function(n){return utr(t.getBody(),n.dom)}).getOr("");var t},this);i.addQueryValueHandler("LineHeight",function(){return got(i=n,function(n){var r=t.fromDom(i.getBody());return ift(n,function(n){return bg(n,"line-height")},u(g,r)).getOrThunk(function(){var t=parseFloat(wf(n,"line-height")),i=parseFloat(wf(n,"font-size"));return String(t/i)})}).getOr("");var i},this)},wi);var gs="data-mce-contenteditable",ctr=r.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),ist=(nh.isNative=function(n){return!!ctr[n.toLowerCase()]},nh.prototype.fire=function(n,t){var e=n.toLowerCase(),i=uat(e,t||{},this.scope),u,f,o,r;if(this.settings.beforeFire&&this.settings.beforeFire(i),u=this.bindings[e],u)for(f=0,o=u.length;f<o;f++)if(r=u[f],!r.removed){if(r.once&&this.off(e,r.func),i.isImmediatePropagationStopped())return i;if(!1===r.func.call(this.scope,i))return i.preventDefault(),i}return i},nh.prototype.on=function(n,t,i,u){var e,s,h,o,f;if(t=!1===t?it:t)for(e={func:t,removed:!1},u&&r.extend(e,u),s=n.toLowerCase().split(" "),h=s.length;h--;)o=s[h],f=this.bindings[o],f||(f=[],this.toggleEvent(o,!0)),f=i?fe([e],f,!0):fe(fe([],f,!0),[e],!1),this.bindings[o]=f;return this},nh.prototype.off=function(n,t){var u=this,f,o,s,r,i;if(n)for(f=n.toLowerCase().split(" "),o=f.length;o--;){if(r=f[o],i=this.bindings[r],!r)return et(this.bindings,function(n,t){u.toggleEvent(t,!1);delete u.bindings[t]}),this;i&&(t?(i=(s=bst(i,function(n){return n.func===t})).fail,this.bindings[r]=i,e(s.pass,function(n){n.removed=!0})):i.length=0,i.length||(this.toggleEvent(n,!1),delete this.bindings[r]))}else et(this.bindings,function(n,t){u.toggleEvent(t,!1)}),this.bindings={};return this},nh.prototype.once=function(n,t,i){return this.on(n,t,i,{once:!0})},nh.prototype.has=function(n){return n=n.toLowerCase(),!(!this.bindings[n]||0===this.bindings[n].length)},nh);var th,fd={fire:function(n,t,i){var u,r;if(this.removed&&"remove"!==n&&"detach"!==n)return t;if(u=bv(this).fire(n,t),!1!==i&&this.parent)for(r=this.parent();r&&!u.isPropagationStopped();)r.fire(n,u,!1),r=r.parent();return u},on:function(n,t,i){return bv(this).on(n,t,i)},off:function(n,t){return bv(this).off(n,t)},once:function(n,t){return bv(this).once(n,t)},hasEventListeners:function(n){return bv(this).has(n)}},ed=d.DOM,bsi=c(c({},fd),{bindPendingEventDelegates:function(){var n=this;r.each(n._pendingNativeEvents,function(t){psi(n,t)})},toggleNativeEvent:function(n,t){var i=this;"focus"!==n&&"blur"!==n&&(i.removed||(t?i.initialized?psi(i,n):i._pendingNativeEvents?i._pendingNativeEvents.push(n):i._pendingNativeEvents=[n]:i.initialized&&(i.dom.unbind(ud(i,n),n,i.delegates[n]),delete i.delegates[n])))},unbindAllNativeEvents:function(){var n=this,i=n.getBody(),t=n.dom;n.delegates&&(et(n.delegates,function(t,i){n.dom.unbind(ud(n,i),i,t)}),delete n.delegates);!n.inline&&i&&t&&(i.onload=null,t.unbind(n.getWin()),t.unbind(n.getDoc()));t&&(t.unbind(i),t.unbind(n.getContainer()))}}),atr=["design","readonly"],rst=r.each,ust=r.explode,vtr={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},ksi=r.makeMap("alt,ctrl,shift,meta,access"),dsi=(ue.prototype.add=function(n,t,i,u){var f=this,e=f.normalizeCommandFunc(i);return rst(ust(r.trim(n)),function(n){var i=f.createShortcut(n,t,e,u);f.shortcuts[i.id]=i}),!0},ue.prototype.remove=function(n){var t=this.createShortcut(n);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},ue.prototype.normalizeCommandFunc=function(n){var i=this,t=n;return"string"==typeof t?function(){i.editor.execCommand(t,!1,null)}:r.isArray(t)?function(){i.editor.execCommand(t[0],t[1],t[2])}:t},ue.prototype.createShortcut=function(n,t,i,u){var f=r.map(ust(n,">"),ltr);return f[f.length-1]=r.extend(f[f.length-1],{func:i,scope:u||this.editor}),r.extend(f[0],{desc:this.editor.translate(t),subpatterns:f.slice(1)})},ue.prototype.hasModifier=function(n){return n.altKey||n.ctrlKey||n.metaKey},ue.prototype.isFunctionKey=function(n){return"keydown"===n.type&&112<=n.keyCode&&n.keyCode<=123},ue.prototype.matchShortcut=function(n,t){return!!t&&t.ctrl===n.ctrlKey&&t.meta===n.metaKey&&t.alt===n.altKey&&t.shift===n.shiftKey&&!!(n.keyCode===t.keyCode||n.charCode&&n.charCode===t.charCode)&&(n.preventDefault(),!0)},ue.prototype.executeShortcutAction=function(n){return n.func?n.func.call(n.scope):null},ue);var ih=d.DOM,gsi=r.extend,ytr=r.each,nhi=r.resolve,ptr=l.ie,od=(b.prototype.render=function(){!function(n){var u=n.id,r,e,o,i,f;lu.setCode(tpt(n));f=function(){ks.unbind(window,"ready",f);n.render()};tc.Event.domLoaded?n.getElement()&&l.contentEditable&&(r=t.fromDom(n.getElement()),e=fu(r.dom.attributes,function(n,t){return n[t.name]=t.value,n},{}),n.on("remove",function(){wst(r.dom.attributes,function(n){return se(r,n.name),0});oe(r,e)}),n.ui.styleSheetLoader=wlt.forElement(r,{contentCssCors:(o=n).getParam("content_css_cors"),referrerPolicy:npt(o)}),n.getParam("inline")?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden"),(i=n.getElement().form||ks.getParent(u,"form"))&&(n.formElement=i,n.getParam("hidden_input")&&!dg(n.getElement())&&(ks.insertAfter(ks.create("input",{type:"hidden",name:u}),u),n.hasHiddenInput=!0),n.formEventDelegate=function(t){n.fire(t.type,t)},ks.bind(i,"submit reset",n.formEventDelegate),n.on("reset",function(){n.resetContent()}),!n.getParam("submit_patch")||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),i._mceOldSubmit(i)})),n.windowManager=tri(n),n.notificationManager=vii(n),"xml"===n.getParam("encoding")&&n.on("GetContent",function(n){n.save&&(n.content=ks.encode(n.content))}),n.getParam("add_form_submit_trigger")&&n.on("submit",function(){n.initialized&&n.save()}),n.getParam("add_unload_trigger")&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),ntr(n,n.suffix)):ks.bind(window,"ready",f)}(this)},b.prototype.focus=function(n){this.execCommand("mceFocus",!1,n)},b.prototype.hasFocus=function(){return ls(this)},b.prototype.execCallback=function(n){for(var t,i,u=[],r=1;r<arguments.length;r++)u[r-1]=arguments[r];return i=this.settings[n],i?(this.callbackLookup&&(t=this.callbackLookup[n])&&(i=t.func,t=t.scope),"string"==typeof i&&(t=(t=i.replace(/\.\w+$/,""))?nhi(t):0,i=nhi(i),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[n]={func:i,scope:t}),i.apply(t||this,u)):void 0},b.prototype.translate=function(n){return lu.translate(n)},b.prototype.getParam=function(n,t,i){return o=t,s=i,l=(f=n)in(u=this).settings?u.settings[f]:o,"hash"===s?(c={},"string"==typeof(h=l)?e(0<h.indexOf("=")?h.split(/[;,](?![^=;,]*(?:[;,]|$))/):h.split(","),function(n){var t=n.split("=");c[r.trim(t[0])]=1<t.length?r.trim(t[1]):r.trim(t[0])}):c=h,c):"string"===s?ys(ht,u,f).getOr(o):"number"===s?ys(eh,u,f).getOr(o):"boolean"===s?ys(vst,u,f).getOr(o):"object"===s?ys(fh,u,f).getOr(o):"array"===s?ys(br,u,f).getOr(o):"string[]"===s?ys((a=ht,function(n){return br(n)&&al(n,a)}),u,f).getOr(o):"function"===s?ys(ft,u,f).getOr(o):l;var u,f,o,s,a,h,c,l},b.prototype.hasPlugin=function(n,t){return!(!dt(oit(this).split(/[ ,]/),n)||t&&void 0===pu.get(n))},b.prototype.nodeChanged=function(n){this._nodeChangeDispatcher.nodeChanged(n)},b.prototype.addCommand=function(n,t,i){this.editorCommands.addCommand(n,t,i)},b.prototype.addQueryStateHandler=function(n,t,i){this.editorCommands.addQueryStateHandler(n,t,i)},b.prototype.addQueryValueHandler=function(n,t,i){this.editorCommands.addQueryValueHandler(n,t,i)},b.prototype.addShortcut=function(n,t,i,r){this.shortcuts.add(n,t,i,r)},b.prototype.execCommand=function(n,t,i,r){return this.editorCommands.execCommand(n,t,i,r)},b.prototype.queryCommandState=function(n){return this.editorCommands.queryCommandState(n)},b.prototype.queryCommandValue=function(n){return this.editorCommands.queryCommandValue(n)},b.prototype.queryCommandSupported=function(n){return this.editorCommands.queryCommandSupported(n)},b.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(ih.show(this.getContainer()),ih.hide(this.id)),this.load(),this.fire("show"))},b.prototype.hide=function(){var n=this,t=n.getDoc();n.hidden||(ptr&&t&&!n.inline&&t.execCommand("SelectAll"),n.save(),n.inline?(n.getBody().contentEditable="false",n===n.editorManager.focusedEditor&&(n.editorManager.focusedEditor=null)):(ih.hide(n.getContainer()),ih.setStyle(n.id,"display",n.orgDisplay)),n.hidden=!0,n.fire("hide"))},b.prototype.isHidden=function(){return!!this.hidden},b.prototype.setProgressState=function(n,t){this.fire("ProgressState",{state:n,time:t})},b.prototype.load=function(n){var t=this.getElement(),i,r;return this.removed?"":t?((n=n||{}).load=!0,i=dg(t)?t.value:t.innerHTML,r=this.setContent(i,n),n.element=t,n.no_events||this.fire("LoadContent",n),n.element=t=null,r):void 0},b.prototype.save=function(n){var r,u,t=this,i=t.getElement();if(i&&t.initialized&&!t.removed)return(n=n||{}).save=!0,n.element=i,n.content=t.getContent(n),n.no_events||t.fire("SaveContent",n),"raw"===n.format&&t.fire("RawSaveContent",n),r=n.content,dg(i)?i.value=r:(!n.is_removing&&t.inline||(i.innerHTML=r),(u=ih.getParent(t.id,"form"))&&ytr(u.elements,function(n){if(n.name===t.id)return n.value=r,!1})),n.element=i=null,!1!==n.set_dirty&&t.setDirty(!1),r},b.prototype.setContent=function(n,t){return aet(this,n,t)},b.prototype.getContent=function(n){return i=this,r=(t=void 0===(t=n)?{}:t).format||"html",u=t,ret(i).editor.getContent(u,r);var i,t,r,u},b.prototype.insertContent=function(n,t){t&&(n=gsi({content:n},t));this.execCommand("mceInsertContent",!1,n)},b.prototype.resetContent=function(n){void 0===n?aet(this,this.startContent,{format:"raw"}):aet(this,n);this.undoManager.reset();this.setDirty(!1);this.nodeChanged()},b.prototype.isDirty=function(){return!this.isNotDirty},b.prototype.setDirty=function(n){var t=!this.isNotDirty;this.isNotDirty=!n;n&&n!==t&&this.fire("dirty")},b.prototype.getContainer=function(){return this.container||(this.container=ih.get(this.editorContainer||this.id+"_parent")),this.container},b.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},b.prototype.getElement=function(){return this.targetElm||(this.targetElm=ih.get(this.id)),this.targetElm},b.prototype.getWin=function(){var n;return this.contentWindow||(n=this.iframeElement)&&(this.contentWindow=n.contentWindow),this.contentWindow},b.prototype.getDoc=function(){var n;return this.contentDocument||(n=this.getWin())&&(this.contentDocument=n.document),this.contentDocument},b.prototype.getBody=function(){var n=this.getDoc();return this.bodyElement||(n?n.body:null)},b.prototype.convertURL=function(n,t,i){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",n,i,!0,t):!r.convert_urls||i&&"LINK"===i.nodeName||0===n.indexOf("file:")||0===n.length?n:r.relative_urls?this.documentBaseURI.toRelative(n):this.documentBaseURI.toAbsolute(n,r.remove_script_host)},b.prototype.addVisual=function(n){var t;t=n;ct(this).editor.addVisual(t)},b.prototype.remove=function(){var n,r,u,t,i;(n=this).removed||(r=n._selectionOverrides,u=n.editorUpload,t=n.getBody(),i=n.getElement(),t&&n.save({is_removing:!0}),n.removed=!0,n.unbindAllNativeEvents(),n.hasHiddenInput&&i&&bb.remove(i.nextSibling),n.fire("remove"),n.editorManager.remove(n),!n.inline&&t&&bb.setStyle(n.id,"display",n.orgDisplay),n.fire("detach"),bb.remove(n.getContainer()),yb(r),yb(u),n.destroy())},b.prototype.destroy=function(n){var i,u,f,r,t,e,o;u=n;e=(i=this).selection;o=i.dom;i.destroyed||(u||i.removed?(u||(i.editorManager.off("beforeunload",i._beforeUnload),i.theme&&i.theme.destroy&&i.theme.destroy(),yb(e),yb(o)),(r=(f=i).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),bb.unbind(r,"submit reset",f.formEventDelegate)),(t=i).contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),i.destroyed=!0):i.remove())},b.prototype.uploadImages=function(n){return this.editorUpload.uploadImages(n)},b.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},b.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead");},b.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead");},b.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead");},b.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead");},b);var sd,uu=d.DOM,wtr=r.explode,yf=r.each,btr=r.extend,ktr=0,uhi=!1,co=[],nr=[],dtr="CSS1Compat"!==document.compatMode,lo=c(c({},fd),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:a,majorVersion:"5",minorVersion:"10.2",releaseDate:"2021-11-17",editors:co,i18n:lu,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var i,f="",t=ro.getDocumentBaseUrl(document.location),r,n,o,e,s;if(/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),r=window.tinymce||window.tinyMCEPreInit,r)i=r.base||r.baseURL,f=r.suffix;else{for(o=document.getElementsByTagName("script"),e=0;e<o.length;e++)if(""!==(n=o[e].src||"")&&(s=n.substring(n.lastIndexOf("/")),/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(n))){-1!==s.indexOf(".min")&&(f=".min");i=n.substring(0,n.lastIndexOf("/"));break}!i&&document.currentScript&&(-1!==(n=document.currentScript.src).indexOf(".min")&&(f=".min"),i=n.substring(0,n.lastIndexOf("/")))}this.baseURL=new ro(t).toAbsolute(i);this.documentBaseURL=t;this.baseURI=new ro(this.baseURL);this.suffix=f;this.on("AddEditor",u(kyi,this));this.on("RemoveEditor",u(dyi,this))},overrideDefaults:function(n){var i=n.base_url,r,t;i&&this._setBaseUrl(i);r=n.suffix;n.suffix&&(this.suffix=r);t=(this.defaultSettings=n).plugin_base_urls;void 0!==t&&et(t,function(n,t){rr.PluginManager.urls[t]=n})},init:function(n){function f(n){var t=n.id;return t||(t=at(n,"name").filter(function(n){return!uu.get(n)}).getOrThunk(uu.uniqueId),n.setAttribute("id",t)),t}function e(n,t){return t.constructor===RegExp?t.test(n.className):uu.hasClass(n,t)}var i,t=this,s=r.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),u=function(n){i=n},o=function(){function h(n,r,f){var e=new od(n,r,t);v.push(e);e.on("init",function(){++y===i.length&&u(v)});e.targetElm=e.targetElm||f;e.render()}var i,c,y=0,v=[];uu.unbind(window,"ready",o);(c=n.onpageload)&&c.apply(t,[]);i=a.unique(function(n){var t=[],i;if(l.browser.isIE()&&l.browser.version.major<11)return ok("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(dtr)return ok("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(n.types)return yf(n.types,function(n){t=t.concat(uu.select(n.selector))}),t;if(n.selector)return uu.select(n.selector);if(n.target)return[n.target];switch(n.mode){case"exact":i=n.elements||"";0<i.length&&yf(wtr(i),function(n){var i=uu.get(n);i?t.push(i):yf(document.forms,function(i){yf(i.elements,function(i){i.name===n&&(n="mce_editor_"+ktr++,uu.setAttrib(i,"id",n),t.push(i))})})});break;case"textareas":case"specific_textareas":yf(uu.select("textarea"),function(i){n.editor_deselector&&e(i,n.editor_deselector)||n.editor_selector&&!e(i,n.editor_selector)||t.push(i)})}return t}(n));n.types?yf(n.types,function(t){r.each(i,function(i){return!uu.is(i,t.selector)||(h(f(i),btr({},n,t),i),!1)})}):(r.each(i,function(n){var i;(i=t.get(n.id))&&i.initialized&&!(i.getContainer()||i.getBody()).parentNode&&(rhi(i),i.unbindAllNativeEvents(),i.destroy(!0),i.removed=!0)}),0===(i=r.grep(i,function(n){return!t.get(n.id)})).length?u([]):yf(i,function(t){var i=t;n.inline&&i.tagName.toLowerCase()in s?ok("Could not initialize inline editor on invalid inline target element",t):h(f(t),n,t)}))};return t.settings=n,uu.bind(window,"ready",o),new ri(function(n){i?n(i):u=function(t){n(t)}})},get:function(n){return 0===arguments.length?nr.slice(0):ht(n)?gt(nr,function(t){return t.id===n}).getOr(null):eh(n)&&nr[n]||null},add:function(n){var t=this;return co[n.id]===n||(null===t.get(n.id)&&("length"!==n.id&&(co[n.id]=n),co.push(n),nr.push(n)),ihi(!0),t.activeEditor=n,t.fire("AddEditor",{editor:n}),sd||(sd=function(n){var i=t.fire("BeforeUnload");if(i.returnValue)return n.preventDefault(),n.returnValue=i.returnValue,i.returnValue},window.addEventListener("beforeunload",sd))),n},createEditor:function(n,t){return this.add(new od(n,t,this))},remove:function(n){var r,t,i=this;if(n){if(!ht(n))return t=n,ll(i.get(t.id))?null:(rhi(t)&&i.fire("RemoveEditor",{editor:t}),0===nr.length&&window.removeEventListener("beforeunload",sd),t.remove(),ihi(0<nr.length),t);yf(uu.select(n),function(n){(t=i.get(n.id))&&i.remove(t)})}else for(r=nr.length-1;0<=r;r--)i.remove(nr[r])},execCommand:function(n,t,i){var r=this.get(i);switch(n){case"mceAddEditor":return this.get(i)||new od(i,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",!1,i),!0}return!!this.activeEditor&&this.activeEditor.execCommand(n,t,i)},triggerSave:function(){yf(nr,function(n){n.save()})},addI18n:function(n,t){lu.add(n,t)},translate:function(n){return lu.translate(n)},setActive:function(n){var t=this.activeEditor;this.activeEditor!==n&&(t&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t}));this.activeEditor=n},_setBaseUrl:function(n){this.baseURL=new ro(this.documentBaseURL).toAbsolute(n.replace(/\/+$/,""));this.baseURI=new ro(this.baseURL)}});lo.setup();var kv,dv,ohi,fst,shi=Math.min,hl=Math.max,hd=Math.round,gtr={inflate:function(n,t,i){return sl(n.x-t,n.y-i,n.w+2*t,n.h+2*i)},relativePosition:fhi,findBestRelativePosition:function(n,t,i,r){for(var u,f=0;f<r.length;f++)if((u=fhi(n,t,r[f])).x>=i.x&&u.x+u.w<=i.w+i.x&&u.y>=i.y&&u.y+u.h<=i.h+i.y)return r[f];return null},intersect:function(n,t){var i=hl(n.x,t.x),r=hl(n.y,t.y),u=shi(n.x+n.w,t.x+t.w),f=shi(n.y+n.h,t.y+t.h);return u-i<0||f-r<0?null:sl(i,r,u-i,f-r)},clamp:function(n,t,i){var r=n.x,u=n.y,f=n.x+n.w,e=n.y+n.h,l=t.x+t.w,a=t.y+t.h,o=hl(0,t.x-r),s=hl(0,t.y-u),h=hl(0,f-l),c=hl(0,e-a);return r+=o,u+=s,i&&(f+=o,e+=s,r-=h,u-=c),sl(r,u,(f-=h)-r,(e-=c)-u)},create:sl,fromClientRect:function(n){return sl(n.left,n.top,n.width,n.height)}},nir=(kv={},dv={},{load:function(n,t){var r='Script at URL "'+t+'" failed to load',u='Script at URL "'+t+"\" did not call `tinymce.Resource.add('"+n+"', data)` within 1 second",i;return void 0!==kv[n]?kv[n]:(i=new ri(function(i,f){var e=function(n,t,i){function f(n){return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];u||(u=!0,null!==r&&(clearTimeout(r),r=null),n.apply(null,i))}}void 0===i&&(i=1e3);var u=!1,r=null,o=f(n),e=f(t);return{start:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];u||null!==r||(r=setTimeout(function(){return e.apply(null,t)},i))},resolve:o,reject:e}}(i,f);dv[n]=e.resolve;kf.ScriptLoader.loadScript(t,function(){return e.start(u)},function(){return e.reject(r)})}),kv[n]=i)},add:function(n,t){void 0!==dv[n]&&(dv[n](t),delete dv[n]);kv[n]=ri.resolve(t)}}),cd=r.each,tir=r.extend;ehi.extend=ohi=function(n){function i(){var n,t,i;if(!fst&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(n=t.length;n--;)(i=t[n]).init&&i.init.apply(this,arguments)}function u(){return this}var t=this.prototype,r;return fst=!0,r=new this,fst=!1,n.Mixins&&(cd(n.Mixins,function(t){for(var i in t)"init"!==i&&(n[i]=t[i])}),t.Mixins&&(n.Mixins=t.Mixins.concat(n.Mixins))),n.Methods&&cd(n.Methods.split(","),function(t){n[t]=u}),n.Properties&&cd(n.Properties.split(","),function(t){var i="_"+t;n[t]=function(n){return void 0!==n?(this[i]=n,this):this[i]}}),n.Statics&&cd(n.Statics,function(n,t){i[t]=n}),n.Defaults&&t.Defaults&&(n.Defaults=tir({},t.Defaults,n.Defaults)),et(n,function(n,i){var u,f;r[i]="function"==typeof n&&t[i]?(u=i,f=n,function(){var i=this._super,n;return this._super=t[u],n=f.apply(this,arguments),this._super=i,n}):n}),i.prototype=r,(i.constructor=i).extend=ohi,i};var gv,rh,est,ld=Math.min,ad=Math.max,uh=Math.round,ost={serialize:function(n){var t=JSON.stringify(n);return ht(t)?t.replace(/[\u0080-\uFFFF]/g,function(n){var t=n.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(n){try{return JSON.parse(n)}catch(n){}}},iir={callbacks:{},count:0,send:function(n){var t=this,i=d.DOM,r=(void 0!==n.count?n:t).count,u="tinymce_jsonp_"+r;t.callbacks[r]=function(f){i.remove(u);delete t.callbacks[r];n.callback(f)};i.add(i.doc.body,"script",{id:u,src:n.url,type:"text/javascript"});t.count++}},vd=c(c({},fd),{send:function(n){var t,i=0,u=function(){!n.async||4===t.readyState||1e4<i++?(n.success&&i<1e4&&200===t.status?n.success.call(n.success_scope,""+t.responseText,t,n):n.error&&n.error.call(n.error_scope,1e4<i?"TIMED_OUT":"GENERAL",t,n),t=null):ui.setTimeout(u,10)};if(n.scope=n.scope||this,n.success_scope=n.success_scope||n.scope,n.error_scope=n.error_scope||n.scope,n.async=!1!==n.async,n.data=n.data||"",vd.fire("beforeInitialize",{settings:n}),(t=new XMLHttpRequest).overrideMimeType&&t.overrideMimeType(n.content_type),t.open(n.type||(n.data?"POST":"GET"),n.url,n.async),n.crossDomain&&(t.withCredentials=!0),n.content_type&&t.setRequestHeader("Content-Type",n.content_type),n.requestheaders&&r.each(n.requestheaders,function(n){t.setRequestHeader(n.key,n.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=vd.fire("beforeSend",{xhr:t,settings:n}).xhr).send(n.data),!n.async)return u();ui.setTimeout(u,10)}}),hhi=r.extend,rir=(yd.sendRPC=function(n){return(new yd).send(n)},yd.prototype.send=function(n){var i=n.error,r=n.success,t=hhi(this.settings,n);t.success=function(n,u){(n=void 0===(n=ost.parse(n))?{error:"JSON Parse error."}:n).error?i.call(t.error_scope||t.scope,n.error,u):r.call(t.success_scope||t.scope,n.result)};t.error=function(n,r){i&&i.call(t.error_scope||t.scope,n,r)};t.data=ost.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params});t.content_type="application/json";vd.send(t)},yd);try{wd="__storage_test__";(pd=window.localStorage).setItem(wd,wd);pd.removeItem(wd)}catch(bd){gv={};rh=[];est={getItem:function(n){return gv[n]||null},setItem:function(n,t){rh.push(n);gv[n]=String(t)},key:function(n){return rh[n]},removeItem:function(n){rh=rh.filter(function(t){return t===n});delete gv[n]},clear:function(){rh=[];gv={}},length:0};Object.defineProperty(est,"length",{get:function(){return rh.length},configurable:!1,enumerable:!1});pd=est}var uir={geom:{Rect:gtr},util:{Promise:ri,Delay:ui,Tools:r,VK:s,URI:ro,Class:ehi,EventDispatcher:ist,Observable:fd,I18n:lu,XHR:vd,JSON:ost,JSONRequest:rir,JSONP:iir,LocalStorage:pd,Color:function(n){function f(n){var f;return"object"==typeof n?"r"in n?(t=n.r,i=n.g,r=n.b):"v"in n&&function(n,u,f){if(n=(parseInt(n,10)||0)%360,u=parseInt(u,10)/100,f=parseInt(f,10)/100,u=ad(0,ld(u,1)),f=ad(0,ld(f,1)),0!==u){var h=n/60,e=f*u,o=e*(1-Math.abs(h%2-1)),s=f-e;switch(Math.floor(h)){case 0:t=e;i=o;r=0;break;case 1:t=o;i=e;r=0;break;case 2:t=0;i=e;r=o;break;case 3:t=0;i=o;r=e;break;case 4:t=o;i=0;r=e;break;case 5:t=e;i=0;r=o;break;default:t=i=r=0}t=uh(255*(t+s));i=uh(255*(i+s));r=uh(255*(r+s))}else t=i=r=uh(255*f)}(n.h,n.s,n.v):(f=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(n))?(t=parseInt(f[1],10),i=parseInt(f[2],10),r=parseInt(f[3],10)):(f=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(n))?(t=parseInt(f[1],16),i=parseInt(f[2],16),r=parseInt(f[3],16)):(f=/#([0-F])([0-F])([0-F])/gi.exec(n))&&(t=parseInt(f[1]+f[1],16),i=parseInt(f[2]+f[2],16),r=parseInt(f[3]+f[3],16)),t=t<0?0:255<t?255:t,i=i<0?0:255<i?255:i,r=r<0?0:255<r?255:r,u}var u={},t=0,i=0,r=0;return n&&f(n),u.toRgb=function(){return{r:t,g:i,b:r}},u.toHsv=function(){return u=t,e=i,f=r,o=0,(n=ld(u/=255,ld(e/=255,f/=255)))===(s=ad(u,ad(e,f)))?{h:0,s:0,v:100*(o=n)}:(h=(s-n)/s,{h:uh(60*((u===n?3:f===n?1:5)-(u===n?e-f:f===n?u-e:f-u)/((o=s)-n))),s:uh(100*h),v:uh(100*o)});var u,e,f,h,o,n,s},u.toHex=function(){function n(n){return 1<(n=parseInt(n,10).toString(16)).length?n:"0"+n}return"#"+n(t)+n(i)+n(r)},u.parse=f,u},ImageUploader:function(n){var t=rri(),i=eri(n,t);return{upload:function(t,r){return i.upload(t,(r=void 0===r||r)?fri(n):void 0)}}}},dom:{EventUtils:tc,Sizzle:k,DomQuery:a,TreeWalker:yt,TextSeeker:wvt,DOMUtils:d,ScriptLoader:kf,RangeUtils:uv,Serializer:sii,StyleSheetLoader:plt,ControlSelection:ybt,BookmarkManager:iv,Selection:uii,Event:tc.Event},html:{Styles:yn,Entities:ve,Node:ru,Schema:le,SaxParser:gw,DomParser:cet,Writer:edt,Serializer:gc},Env:l,AddOnManager:rr,Annotator:tbt,Formatter:sri,UndoManager:cri,EditorCommands:asi,WindowManager:tri,NotificationManager:vii,EditorObservable:bsi,Shortcuts:dsi,Editor:od,FocusManager:tdt,EditorManager:lo,DOM:d.DOM,ScriptLoader:kf.ScriptLoader,PluginManager:pu,ThemeManager:oo,IconManager:kb,Resource:nir,trim:r.trim,isArray:r.isArray,is:r.is,toArray:r.toArray,makeMap:r.makeMap,each:r.each,map:r.map,grep:r.grep,inArray:r.inArray,extend:r.extend,create:r.create,walk:r.walk,createNS:r.createNS,resolve:r.resolve,explode:r.explode,_addCacheSuffix:r._addCacheSuffix,isOpera:l.opera,isWebKit:l.webkit,isIE:l.ie,isGecko:l.gecko,isMac:l.mac},chi=r.extend(lo,uir),lhi=chi;window.tinymce=lhi;window.tinyMCE=lhi,function(n){if("object"==typeof module)try{module.exports=n}catch(n){}}(chi)}();var searchPanel=$("#searchPanel"),loginPanel=$(".user-panel .loginPanel"),loggedInPanel=$(".user-panel .loggedInPanel"),loggedInMenu=$(".user-panel .loggedInMenu"),loginPanel_pc=$(".header .loginPanel"),loggedInPanel_pc=$(".header .loggedInPanel"),loggedInMenu_pc=$(".header .loggedInMenu"),topbarMenu=$("#smenu .dropdown"),topbarDropdown=$("#smenu .dropdown .dropdown-menu"),navLink=$(".pushmenu .nav-link"),wrap=$("html");(function(n){n("#nav-pc ul li a").focus(function(){n(this).closest("#nav-pc ul li").siblings().each(function(){n(this).removeClass("open")});n(".menu-reg a").on("focus",function(){n("#nav-pc ul li").removeClass("open")})});n(".header .menu-login").on("click",function(t){t.stopPropagation();loginPanel_pc.is(":visible")?(loginPanel_pc.slideUp(),n(".header .menu-login a").attr("aria-expanded",!1)):(loginPanel_pc.slideDown(),n(".header .menu-login a").attr("aria-expanded",!0))});loginPanel_pc.click(function(n){n.stopPropagation()});n(".goLogIn").on("click",function(){loggedInPanel_pc.fadeIn();n(this).closest(".loginPanel").hide();n("#s2menu").hide()});n(".header .loginIcon").on("click",function(){loggedInMenu_pc.is(":visible")?(loggedInMenu_pc.slideUp(),n(this).removeClass("expand")):(loggedInMenu_pc.slideDown(),n(this).addClass("expand"));n(this).attr("aria-expanded",n(this).hasClass("expand"))});loggedInPanel_pc.click(function(n){n.stopPropagation()});n("#logout").on("click",function(){n("#login-out-form").submit();n(".loginPanel").show()});n("#mobile-logout").on("click",function(){n("#mobile-login-out-form").submit();n(".loginPanel").show()});n(document).on("click touchend",function(t){loginPanel_pc.is(t.target)||n(t.target).parents(".header .loginPanel").length!==0||loginPanel_pc.slideUp()});n(document).on("click touchend",function(t){loggedInPanel_pc.is(t.target)||n(t.target).parents(".header .loggedInMenu").length!==0||(loggedInMenu_pc.slideUp(),n(".header .loginIcon").removeClass("expand"))});loginPanel_pc.keydown(function(t){var i=t.keyCode||t.which;if(t.shiftKey)n("#smenu a").on("focus",function(){loginPanel_pc.slideUp()});if(i===9)n(".menu-reg a").on("focus",function(){loginPanel_pc.slideUp()})});loggedInMenu_pc.keydown(function(t){var i=t.keyCode||t.which;if(t.shiftKey)n("#smenu a").on("focus",function(){loggedInMenu_pc.slideUp();n(".header .loginIcon").removeClass("expand")});if(i===9)n(".nav a").on("focus",function(){loggedInMenu_pc.slideUp();n(".header .loginIcon").removeClass("expand")})});navLink.on("click",function(){return n(this).siblings().slideToggle(),n(this).toggleClass("active"),!1});n(".search").on("click",function(){n(this).toggleClass("active");searchPanel.slideToggle();n(".search").focus();n(this).attr("aria-expanded",n(this).hasClass("active"));loginPanel.is(":visible")?(loginPanel.hide(),n("#user").removeClass("open")):loggedInMenu.is(":visible")?(loggedInMenu.hide(),n("#user").removeClass("open")):topbarDropdown.is(":visible")&&(topbarDropdown.hide(),topbarMenu.removeClass("open"))});n(".searchPanel .btn-close").on("click",function(){n(this).parents(".searchPanel").slideUp()});n("#user").click(function(){loginPanel.slideToggle();n(this).toggleClass("open");n(this).attr("aria-expanded",n(this).hasClass("open"));n("#user").focus();searchPanel.is(":visible")&&searchPanel.hide();loggedInPanel.is(":visible")&&(loginPanel.hide(),loggedInMenu.slideToggle())});n("#nav-sp .goLogIn").click(function(){loggedInPanel.show();n("#user").removeClass("open");loginPanel.slideUp()});loggedInPanel.click(function(){mobileUserMenu()})})(jQuery);var mobileUserMenu=function(){loggedInMenu.slideToggle();loggedInPanel.parent().siblings("#user").toggleClass("open");loggedInPanel.attr("aria-expanded",loggedInPanel.parent().siblings("#user").hasClass("open"));searchPanel.is(":visible")&&searchPanel.hide()},$menuLeft=$(".pushmenu-left"),$nav_list=$("#nav_list"),mobileMenu=function(){wrap.toggleClass("stick");var n=$(".pushmenu-push").height(),t=$(window).height();n>=t?($(".stick").children("body").css("height","auto"),$(".pushmenu").height(n)):$(".pushmenu").height(t);$(".pushmenu-push").toggleClass("pushmenu-push-toright");$(".footer").toggleClass("footer-push-toright");$menuLeft.toggleClass("pushmenu-open");$nav_list.hasClass("open")?$(".pushmenu-left a").each(function(){$(this).css("display","block");$(this).attr("aria-hidden","false")}):$(".pushmenu-left a").each(function(){$(this).css("display","none");$(this).attr("aria-hidden","true")});$("#user").focus(function(){$(".pushmenu-push").removeClass("pushmenu-push-toright");$("html").removeClass("stick");$menuLeft.removeClass("pushmenu-open");$nav_list.removeClass("open");$(".pushmenu-left a").each(function(){$(this).css("display","none");$(this).attr("aria-hidden","true")})});(searchPanel.is(":visible")||loginPanel.is(":visible")||loggedInMenu.is(":visible"))&&(searchPanel.hide(),loginPanel.hide(),loggedInMenu.hide(),$("#user").removeClass("open"))};if(function(n){n("#timeZoneLink").click(function(){var t=n(this).attr("href");n.get(t,function(t){n("#timeZone-content").html(t);n("#timeZone").modal("show")})});n("body").on("click",".close",function(){n("#timeZone").modal("hide")});n("#timeZone").on("hidden.bs.modal",function(){n(this).removeData("bs.modal")})}(jQuery),$(document).ready(function(){document.body.addEventListener("touchstart",function(){},!1);$(".pushmenu-left a").each(function(){$(this).css("display","none");$(this).attr("aria-hidden","true")});$nav_list.click(function(){$(this).toggleClass("open");$(this).attr("aria-expanded",$(this).hasClass("open"));$nav_list.focus();mobileMenu()});$nav_list.keypress(function(n){n.keyCode===13&&(n.preventDefault(),$(this).toggleClass("open"),$(this).attr("aria-expanded",$(this).hasClass("open")),wrap.toggleClass("stick"),$nav_list.focus(),mobileMenu())});$(".return").length&&$(".return").click(function(){return $("html, body").animate({scrollTop:0},800),!1});$(".panel-title").length&&$(".panel-title > a").click(function(n){n.preventDefault()});$("#error-message").length&&window.setTimeout(function(){$("#error-message").focus()},1600)}),$(document).ready(function(){$("#form-sort-1").click(function(){$("#sortForm").submit()})}),jQuery.keyFocus={},jQuery.keyFocus.conf={keyFocusClass:"keyboard-focus",mouseFocusClass:"mouse-focus",focusClass:"focus",mouseTimeout:50},function(n){n(document).ready(function(){n("body").trackFocus()});n.fn.trackFocus=function(){n(this).data("last-device-used","");n(this).bind("mousedown",function(){n(this).data("last-device-used","mouse");n(this).data("last-device-used-when",(new Date).getTime())}).bind("keydown",function(){n(this).data("last-device-used","keyboard")}).bind("focusin",function(t){n(this).data("last-device-used")!="mouse"?n(t.target).addClass(n.keyFocus.conf.keyFocusClass):n(t.target).addClass(n.keyFocus.conf.mouseFocusClass);n(t.target).addClass(n.keyFocus.conf.focusClass)}).bind("focusout",function(t){n("."+n.keyFocus.conf.keyFocusClass+", ."+n.keyFocus.conf.mouseFocusClass).removeClass(n.keyFocus.conf.keyFocusClass+" "+n.keyFocus.conf.mouseFocusClass);n(t.target).removeClass(n.keyFocus.conf.focusClass)})}}(jQuery),$(document).ready(function(){$(".inputfile").each(function(){var n=this,t=$(n).next(),i=t[0].innerHTML;if($(n).not(":disabled"))$(n).on("change",function(n){var r="";r=this.files&&this.files.length>1?(this.getAttribute("data-multiple-caption")||"").replace("{count}",this.files.length):n.target.value.split("\\").pop();r?$(t).find("span").html(r):$(t).html(i)})})}),function(n,t){typeof define=="function"&&define.amd?define(["jquery"],function(n){return t(n)}):typeof exports=="object"?module.exports=t(require("jquery")):t(jQuery)}(this,function(n){(function(n){"use strict";function i(t){return n.each([{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}],function(){t=t.replace(this.re,this.ch)}),t}function r(n){var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(i).join("|")+")",u=new RegExp(r),f=new RegExp(r,"g"),t=n==null?"":""+n;return u.test(t)?t.replace(f,function(n){return i[n]}):t}function u(i,r){var e=arguments,u=i,s=r,f,o;return[].shift.apply(e),o=this.each(function(){var o=n(this),i,r,c,h;if(o.is("select")){if(i=o.data("selectpicker"),r=typeof u=="object"&&u,i){if(r)for(h in r)r.hasOwnProperty(h)&&(i.options[h]=r[h])}else c=n.extend({},t.DEFAULTS,n.fn.selectpicker.defaults||{},o.data(),r),c.template=n.extend({},t.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},o.data().template,r.template),o.data("selectpicker",i=new t(this,c,s));typeof u=="string"&&(f=i[u]instanceof Function?i[u].apply(i,e):i.options[u])}}),typeof f!="undefined"?f:o}var t,f;String.prototype.includes||function(){var i={}.toString,n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(r){}return i}(),r="".indexOf,t=function(n){var u,s;if(this==null)throw new TypeError;if(u=String(this),n&&i.call(n)=="[object RegExp]")throw new TypeError;var f=u.length,e=String(n),h=e.length,o=arguments.length>1?arguments[1]:undefined,t=o?Number(o):0;return(t!=t&&(t=0),s=Math.min(Math.max(t,0),f),h+s>f)?!1:r.call(u,e,t)!=-1};n?n(String.prototype,"includes",{value:t,configurable:!0,writable:!0}):String.prototype.includes=t}();String.prototype.startsWith||function(){var n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(r){}return i}(),i={}.toString,t=function(n){var u,f,r;if(this==null)throw new TypeError;if(u=String(this),n&&i.call(n)=="[object RegExp]")throw new TypeError;var e=u.length,o=String(n),s=o.length,h=arguments.length>1?arguments[1]:undefined,t=h?Number(h):0;if(t!=t&&(t=0),f=Math.min(Math.max(t,0),e),s+f>e)return!1;for(r=-1;++r<s;)if(u.charCodeAt(f+r)!=o.charCodeAt(r))return!1;return!0};n?n(String.prototype,"startsWith",{value:t,configurable:!0,writable:!0}):String.prototype.startsWith=t}();Object.keys||(Object.keys=function(n,t,i){i=[];for(t in n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});n.fn.triggerNative=function(n){var i=this[0],t;i.dispatchEvent?(typeof Event=="function"?t=new Event(n,{bubbles:!0}):(t=document.createEvent("Event"),t.initEvent(n,!0,!1)),i.dispatchEvent(t)):(i.fireEvent&&(t=document.createEventObject(),t.eventType=n,i.fireEvent("on"+n,t)),this.trigger(n))};n.expr[":"].icontains=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.text()).toUpperCase();return f.includes(r[3].toUpperCase())};n.expr[":"].ibegins=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.text()).toUpperCase();return f.startsWith(r[3].toUpperCase())};n.expr[":"].aicontains=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toUpperCase();return f.includes(r[3].toUpperCase())};n.expr[":"].aibegins=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toUpperCase();return f.startsWith(r[3].toUpperCase())};t=function(i,r,u){u&&(u.stopPropagation(),u.preventDefault());this.$element=n(i);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=r;this.options.title===null&&(this.options.title=this.$element.attr("title"));this.val=t.prototype.val;this.render=t.prototype.render;this.refresh=t.prototype.refresh;this.setStyle=t.prototype.setStyle;this.selectAll=t.prototype.selectAll;this.deselectAll=t.prototype.deselectAll;this.destroy=t.prototype.destroy;this.remove=t.prototype.remove;this.show=t.prototype.show;this.hide=t.prototype.hide;this.init()};t.VERSION="1.9.4";t.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(n){return n==1?"{0} item selected":"{0} items selected"},maxOptionsText:function(n,t){return[n==1?"Limit reached ({n} item max)":"Limit reached ({n} items max)",t==1?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Clear Selection",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!0,dropdownAlignRight:!1};t.prototype={constructor:t,init:function(){var t=this,i=this.$element.attr("id"),r=this.$element.attr("aria-required");this.liObj={};this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement).appendTo(this.$newElement);this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(".dropdown-menu");this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");this.$menuInner.find("li:odd").addClass("even");this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right");typeof i!="undefined"&&(this.$button.attr("data-id",i),n('label[for="'+i+'"]').click(function(n){n.preventDefault()}));typeof r!="undefined"&&this.$button.attr("aria-required",r);this.checkDisabled();this.clickListener();this.options.liveSearch&&this.liveSearchListener();this.render();this.setStyle();this.setWidth();this.options.container&&this.selectPosition();this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on({"hide.bs.dropdown":function(n){t.$element.trigger("hide.bs.select",n)},"hidden.bs.dropdown":function(n){t.$element.trigger("hidden.bs.select",n)},"show.bs.dropdown":function(n){t.$element.trigger("show.bs.select",n)},"shown.bs.dropdown":function(n){t.$element.trigger("shown.bs.select",n)}});if(t.$element[0].hasAttribute("required"))this.$element.on("invalid",function(){t.$button.addClass("bs-invalid").focus();t.$element.on({"focus.bs.select":function(){t.$button.focus();t.$element.off("focus.bs.select")},"shown.bs.select":function(){t.$element.val(t.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&t.$button.removeClass("bs-invalid");t.$element.off("rendered.bs.select")}})});setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var i=this.$element.attr("id"),t=i+"-1",u=this.multiple?" show-tick":"",f=this.$element.parent().hasClass("input-group")?" input-group-btn":"",e=this.autofocus?" autofocus":"",o=this.options.header?'<div class="popover-title" tabindex="-1"><button type="button" class="close" aria-hidden="true">Done<\/button>'+this.options.header+"<\/div>":"",s=this.options.liveSearch?'<div tabindex="-1" aria-hidden="true" class="bs-searchbox"><i class="ico-search"><\/i><label class="sr-only" for="'+t+'">input box, type text to filter items<\/label><input role="search" type="text" class="form-control" autocomplete="off" id="'+t+'"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+r(this.options.liveSearchPlaceholder)+'"')+"><\/div>":"",h=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox" tabindex="0"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"<\/button><\/div><\/div>":"",c=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"<\/button><\/div><\/div>":"",l='<div class="btn-group bootstrap-select show-tick'+u+f+'"><button aria-haspopup="listbox" tabindex="0" type="button" aria-describedby="SRinstructions" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+e+'><span class="filter-option pull-left"><\/span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'<\/span><\/button><div class="dropdown-menu open" tabindex="-1">'+o+s+h+'<ul class="dropdown-menu inner" tabindex="0" role="listbox"'+(this.multiple?' aria-multiselectable="true"':"")+"><\/ul>"+c+"<\/div><\/div>";return n(l)},createView:function(){var n=this.createDropdown(),t=this.createLi();return n.find("ul")[0].innerHTML=t,n},reloadLi:function(){this.destroyLi();var n=this.createLi();this.$menuInner[0].innerHTML=n},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var e=this,t=[],o=0,s=document.createElement("option"),u=-1,f=function(n,t,i,r){return'<li role="option" tabindex="0" aria-selected="false"'+(typeof i!="undefined"&""!==i?' class="'+i+'"':"")+(typeof t!="undefined"&null!==t?' data-original-index="'+t+'"':"")+(typeof r!="undefined"&null!==r?'data-optgroup="'+r+'"':"")+">"+n+"<\/li>"},c=function(n,t,u,f){return'<a tabindex="0"'+(typeof t!="undefined"?' class="'+t+'"':"")+(typeof u!="undefined"?' style="'+u+'"':"")+(e.options.liveSearchNormalize?' data-normalized-text="'+i(r(n))+'"':"")+(typeof f!="undefined"||f!==null?' data-tokens="'+f+'"':"")+">"+n+'<span aria-label="checked" class="check-mark"><\/span><\/a>'},h;return this.options.title&&!this.multiple&&(u--,this.$element.find(".bs-title-option").length||(h=this.$element[0],s.className="bs-title-option",s.appendChild(document.createTextNode(this.options.title)),s.value="",h.insertBefore(s,h.firstChild),n(h.options[h.selectedIndex]).attr("selected")===undefined&&(s.selected=!0))),this.$element.find("option").each(function(i){var r=n(this),w;if(u++,!r.hasClass("bs-title-option")){var l=this.className||"",a=this.style.cssText,s=r.data("content")?r.data("content"):r.html(),v=r.data("tokens")?r.data("tokens"):null,k=typeof r.data("subtext")!="undefined"?'<small class="text-muted">'+r.data("subtext")+"<\/small>":"",h=typeof r.data("icon")!="undefined"?'<span class="'+e.options.iconBase+" "+r.data("icon")+'"><\/span> ':"",y=this.parentNode.tagName==="OPTGROUP",p=this.disabled||y&&this.parentNode.disabled;if(h!==""&&p&&(h="<span>"+h+"<\/span>"),e.options.hideDisabled&&p&&!y){u--;return}if(r.data("content")||(s=h+'<span class="text">'+s+k+"<\/span>"),y&&r.data("divider")!==!0){if(w=" "+this.parentNode.className||"",r.index()===0){o+=1;var b=this.parentNode.label,d=typeof r.parent().data("subtext")!="undefined"?'<small class="text-muted">'+r.parent().data("subtext")+"<\/small>":"",g=r.parent().data("icon")?'<span class="'+e.options.iconBase+" "+r.parent().data("icon")+'"><\/span> ':"";b=g+'<span class="text">'+b+d+"<\/span>";i!==0&&t.length>0&&(u++,t.push(f("",null,"divider",o+"div")));u++;t.push(f(b,null,"dropdown-header"+w,o))}if(e.options.hideDisabled&&p){u--;return}t.push(f(c(s,"opt "+l+w,a,v),i,"",o))}else r.data("divider")===!0?t.push(f("",i,"divider")):r.data("hidden")===!0?t.push(f(c(s,l,a,v),i,"hidden is-hidden")):(this.previousElementSibling&&this.previousElementSibling.tagName==="OPTGROUP"&&(u++,t.push(f("",null,"divider",o+"div"))),t.push(f(c(s,l,a,v),i)));e.liObj[i]=u}}),this.multiple||this.$element.find("option:selected").length!==0||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),t.join("")},findLis:function(){return this.$lis==null&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(t){var i=this,o,r,u,f,e,s;t!==!1&&this.$element.find("option").each(function(n){var t=i.findLis().eq(i.liObj[n]);i.setDisabled(n,this.disabled||this.parentNode.tagName==="OPTGROUP"&&this.parentNode.disabled,t);i.setSelected(n,this.selected,t)});this.tabIndex();r=this.$element.find("option").map(function(){if(this.selected){if(i.options.hideDisabled&&(this.disabled||this.parentNode.tagName==="OPTGROUP"&&this.parentNode.disabled))return;var t=n(this),u=t.data("icon")&&i.options.showIcon?'<i class="'+i.options.iconBase+" "+t.data("icon")+'"><\/i> ':"",r;return r=i.options.showSubtext&&t.data("subtext")&&!i.multiple?' <small class="text-muted">'+t.data("subtext")+"<\/small>":"",typeof t.attr("title")!="undefined"?t.attr("title"):t.data("content")&&i.options.showContent?t.data("content"):u+t.html()+r}}).toArray();u=this.multiple?r.join(this.options.multipleSeparator):r[0];this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1&&(f=this.options.selectedTextFormat.split(">"),(f.length>1&&r.length>f[1]||f.length==1&&r.length>=2)&&(o=this.options.hideDisabled?", [disabled]":"",e=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+o).length,s=typeof this.options.countSelectedText=="function"?this.options.countSelectedText(r.length,e):this.options.countSelectedText,u=s.replace("{0}",r.length.toString()).replace("{1}",e.toString())));this.multiple&&r.length>0&&(u=r.length+" selected");this.options.title==undefined&&(this.options.title=this.$element.attr("title"));this.options.selectedTextFormat=="static"&&(u=this.options.title);u||(u=typeof this.options.title!="undefined"?this.options.title:this.options.noneSelectedText);this.$button.attr("title",n.trim(u.replace(/<[^>]*>?/g,"")));this.$button.children(".filter-option").html(u);this.$element.trigger("rendered.bs.select")},setStyle:function(n,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=n?n:this.options.style;t=="add"?this.$button.addClass(i):t=="remove"?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(t){var y;if(t||this.options.size!==!1&&!this.sizeInfo){var e=document.createElement("div"),r=document.createElement("div"),o=document.createElement("ul"),l=document.createElement("li"),p=document.createElement("li"),a=document.createElement("a"),v=document.createElement("span"),s=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,u=this.options.liveSearch?document.createElement("div"):null,h=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,c=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;v.className="text";e.className=this.$menu[0].parentNode.className+" open";r.className="dropdown-menu open";o.className="dropdown-menu inner";l.className="divider";v.appendChild(document.createTextNode("Inner text"));a.appendChild(v);p.appendChild(a);o.appendChild(p);o.appendChild(l);s&&r.appendChild(s);u&&(y=document.createElement("span"),u.className="bs-searchbox",y.className="form-control",u.appendChild(y),r.appendChild(u));h&&r.appendChild(h);r.appendChild(o);c&&r.appendChild(c);e.appendChild(r);document.body.appendChild(e);var b=a.offsetHeight,k=s?s.offsetHeight:0,d=u?u.offsetHeight:0,g=h?h.offsetHeight:0,nt=c?c.offsetHeight:0,tt=n(l).outerHeight(!0),i=typeof getComputedStyle=="function"?getComputedStyle(r):!1,f=i?null:n(r),w=parseInt(i?i.paddingTop:f.css("paddingTop"))+parseInt(i?i.paddingBottom:f.css("paddingBottom"))+parseInt(i?i.borderTopWidth:f.css("borderTopWidth"))+parseInt(i?i.borderBottomWidth:f.css("borderBottomWidth")),it=w+parseInt(i?i.marginTop:f.css("marginTop"))+parseInt(i?i.marginBottom:f.css("marginBottom"))+2;document.body.removeChild(e);this.sizeInfo={liHeight:b,headerHeight:k,searchHeight:d,actionsHeight:g,doneButtonHeight:nt,dividerHeight:tt,menuPadding:w,menuExtras:it}}},setSize:function(){var h,d,g;if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var i=this,t=this.$menu,p=this.$menuInner,c=n(window),nt=this.$newElement[0].offsetHeight,w=this.sizeInfo.liHeight,l=this.sizeInfo.headerHeight,a=this.sizeInfo.searchHeight,v=this.sizeInfo.actionsHeight,y=this.sizeInfo.doneButtonHeight,tt=this.sizeInfo.dividerHeight,o=this.sizeInfo.menuPadding,f=this.sizeInfo.menuExtras,b=this.options.hideDisabled?".disabled":"",r,u,e,s,k=function(){e=i.$newElement.offset().top-c.scrollTop();s=c.height()-e-nt};if(k(),this.options.size==="auto"){h=function(){var h,b=function(t,i){return function(r){return i?r.classList?r.classList.contains(t):n(r).hasClass(t):!(r.classList?r.classList.contains(t):n(r).hasClass(t))}},d=i.$menuInner[0].getElementsByTagName("li"),c=Array.prototype.filter?Array.prototype.filter.call(d,b("hidden",!1)):i.$lis.not(".hidden"),g=Array.prototype.filter?Array.prototype.filter.call(c,b("dropdown-header",!0)):c.filter(".dropdown-header");k();r=s-f;i.options.container?(t.data("height")||t.data("height",t.height()),u=t.data("height")):u=t.height();i.options.dropupAuto&&i.$newElement.toggleClass("dropup",e>s&&r-f<u);i.$newElement.hasClass("dropup")&&(r=e-f);h=c.length+g.length>3?w*3+f-2:0;t.css({"max-height":r+"px",overflow:"hidden","min-height":h+l+a+v+y+"px"});p.css({"max-height":r-l-a-v-y-o+"px","overflow-y":"auto","min-height":Math.max(h-o,0)+"px"})};h();this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",h);c.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",h)}else this.options.size&&this.options.size!="auto"&&this.$lis.not(b).length>this.options.size&&(d=this.$lis.not(".divider").not(b).children().slice(0,this.options.size).last().parent().index(),g=this.$lis.slice(0,d+1).filter(".divider").length,r=w*this.options.size+g*tt+o,i.options.container?(t.data("height")||t.data("height",t.height()),u=t.data("height")):u=t.height(),i.options.dropupAuto&&this.$newElement.toggleClass("dropup",e>s&&r-f<u),t.css({"max-height":r+l+a+v+y+"px",overflow:"hidden","min-height":""}),p.css({"max-height":r-o+"px","overflow-y":"auto","min-height":""}))}},setWidth:function(){if(this.options.width==="auto"){this.$menu.css("min-width","0");var n=this.$menu.parent().clone().appendTo("body"),t=this.options.container?this.$newElement.clone().appendTo("body"):n,i=n.children(".dropdown-menu").outerWidth(),r=t.css("width","auto").children("button").outerWidth();n.remove();t.remove();this.$newElement.css("width",Math.max(i,r)+"px")}else this.options.width==="fit"?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&this.options.width!=="fit"&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=n('<div class="bs-container" />');var t=this,i,r,u=function(n){t.$bsContainer.addClass(n.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",n.hasClass("dropup"));i=n.offset();r=n.hasClass("dropup")?0:n[0].offsetHeight;t.$bsContainer.css({top:i.top+r,left:i.left,width:n[0].offsetWidth})};this.$button.on("click",function(){var i=n(this);t.isDisabled()||(u(t.$newElement),t.$bsContainer.appendTo(t.options.container).toggleClass("open",!i.hasClass("open")).append(t.$menu))});n(window).on("resize scroll",function(){u(t.$newElement)});this.$element.on("hide.bs.select",function(){t.$menu.data("height",t.$menu.height());t.$bsContainer.detach()})},setSelected:function(n,t,i){i||(i=this.findLis().eq(this.liObj[n]));i.toggleClass("selected",t);t?i.attr("aria-selected","true"):i.attr("aria-selected","false")},setDisabled:function(n,t,i){i||(i=this.findLis().eq(this.liObj[n]));t?i.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):i.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",-1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var n=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),this.$button.attr("tabindex")!=-1||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"));this.$button.click(function(){return!n.isDisabled()})},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&this.$element.attr("tabindex")!==-98&&this.$element.attr("tabindex")!=="-98"&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")));this.$element.attr("tabindex",-98)},clickListener:function(){var t=this,i=n(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(n){n.stopPropagation()});i.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&i.data("spaceSelect")&&(n.preventDefault(),i.data("spaceSelect",!1))});this.$button.on("click",function(){t.setSize();t.$element.on("shown.bs.select",function(){var i,n;if(t.options.liveSearch&&t.$menu.find("[role=search]").focus(),(t.options.liveSearch||!t.multiple)&&(t.options.liveSearch||t.multiple)){if(!t.multiple){if(i=t.liObj[t.$element[0].selectedIndex],typeof i!="number"||t.options.size===!1)return;n=t.$lis.eq(i)[0].offsetTop-t.$menuInner[0].offsetTop;n=n-t.$menuInner[0].offsetHeight/2+t.sizeInfo.liHeight/2;t.$menuInner[0].scrollTop=n}}else t.$menuInner.select("li").first().focus()});t.$element.on("hidden.bs.select",function(){t.$menuInner.find("li").removeClass("even").filter(":odd").addClass("even")})});this.$menuInner.on("click","li a",function(i){var s=n(this),e=s.parent().data("originalIndex"),k=t.$element.val(),d=t.$element.prop("selectedIndex"),v,y,b;if(t.multiple&&i.stopPropagation(),i.preventDefault(),!t.isDisabled()&&!s.parent().hasClass("disabled")){var h=t.$element.find("option"),f=h.eq(e),l=f.prop("selected"),a=f.parent("optgroup"),r=t.options.maxOptions,u=a.data("maxOptions")||!1;if(t.multiple){if(f.prop("selected",!l),t.setSelected(e,!l),s.blur(),(r!==!1||u!==!1)&&(v=r<h.filter(":selected").length,y=u<a.find("option:selected").length,r&&v||u&&y))if(r&&r==1)h.prop("selected",!1),f.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(e,!0);else if(u&&u==1)a.find("option:selected").prop("selected",!1),f.prop("selected",!0),b=s.parent().data("optgroup"),t.$menuInner.find('[data-optgroup="'+b+'"]').removeClass("selected"),t.setSelected(e,!0);else{var o=typeof t.options.maxOptionsText=="function"?t.options.maxOptionsText(r,u):t.options.maxOptionsText,p=o[0].replace("{n}",r),w=o[1].replace("{n}",u),c=n('<div class="notify"><\/div>');o[2]&&(p=p.replace("{var}",o[2][r>1?0:1]),w=w.replace("{var}",o[2][u>1?0:1]));f.prop("selected",!1);t.$menu.append(c);r&&v&&(c.append(n("<div>"+p+"<\/div>")),t.$element.trigger("maxReached.bs.select"));u&&y&&(c.append(n("<div>"+w+"<\/div>")),t.$element.trigger("maxReachedGrp.bs.select"));setTimeout(function(){t.setSelected(e,!1)},10);c.delay(750).fadeOut(300,function(){n(this).remove()})}}else h.prop("selected",!1),f.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(e,!0);t.multiple?t.options.liveSearch&&n(t.$searchbox).prop("bFocus"):t.$button.focus();(k!=t.$element.val()&&t.multiple||d!=t.$element.prop("selectedIndex")&&!t.multiple)&&(t.$element.triggerNative("change"),t.$element.trigger("changed.bs.select",[e,f.prop("selected"),l]))}});this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),t.options.liveSearch&&!n(i.target).hasClass("close")?t.$searchbox.focus():t.$button.focus())});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();t.options.liveSearch?t.$searchbox.focus():t.$button.focus()});this.$menu.on("click",".popover-title .close",function(){t.$button.click()});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(i){t.options.liveSearch||t.$button.focus();i.preventDefault();i.stopPropagation();n(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll();t.$element.triggerNative("change")});this.$element.change(function(){t.render(!0)})},liveSearchListener:function(){var t=this,u=n('<li class="no-results"><\/li>');this.$button.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){t.$menuInner.find(".active").removeClass("active");!t.$searchbox.val()||(t.$searchbox.val(""),t.$lis.not(".is-hidden").removeClass("hidden"),!u.parent().length||u.remove());t.multiple||t.$menuInner.find(".selected").addClass("active");t.$searchbox.prop("bFocus",!1)});this.$newElement.on("keydown.dropdown.data-api",function(n){var i=n.keyCode,r={keyCode:n.keyCode};(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122)&&t.$searchbox.trigger("input",r)});this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var e,f;t.$searchbox.val()?(e=t.$lis.not(".is-hidden").removeClass("hidden").children("a"),e=t.options.liveSearchNormalize?e.not(":a"+t._searchStyle()+'("'+i(t.$searchbox.val())+'")'):e.not(":"+t._searchStyle()+'("'+t.$searchbox.val()+'")'),e.parent().addClass("hidden").removeClass("even"),t.$lis.filter(".dropdown-header").each(function(){var i=n(this),r=i.data("optgroup");t.$lis.filter("[data-optgroup="+r+"]").not(i).not(".hidden").length===0&&(i.addClass("hidden"),t.$lis.filter("[data-optgroup="+r+"div]").addClass("hidden"))}),f=t.$lis.not(".hidden"),f.removeClass("even").filter(":odd").addClass("even"),f.each(function(t){var i=n(this);i.hasClass("divider")&&(i.index()===f.first().index()||i.index()===f.last().index()||f.eq(t+1).hasClass("divider"))&&i.addClass("hidden")}),t.$lis.not(".hidden, .no-results").length?!u.parent().length||u.remove():(!u.parent().length||u.remove(),u.html(t.options.noneResultsText.replace("{0}",'"'+r(t.$searchbox.val())+'"')).show(),t.$menuInner.append(u))):(t.$lis.not(".is-hidden").removeClass("hidden").removeClass("even").filter(":odd").addClass("even"),!u.parent().length||u.remove());t.$lis.filter(".active").removeClass("active");t.$searchbox.val()&&t.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus();n(this).focus()})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(n){return typeof n!="undefined"?(this.$element.val(n),this.render(),this.$element):this.$element.val()},changeAll:function(t,i){var e,r,o,u,f,s;for(typeof t=="undefined"&&(t=!0),typeof i=="undefined"&&(i=!0),this.findLis(),e=this.$element.find("option"),r="",r=i?this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",t):this.$lis.not(".divider, .dropdown-header, .disabled").toggleClass("selected",t),o=r.length,u=[],f=0;f<o;f++)s=r[f].getAttribute("data-original-index"),u[u.length]=e.eq(s)[0];n(u).prop("selected",t);this.render(!1)},selectAll:function(){return this.changeAll(!0,!0)},deselectAll:function(){return this.changeAll(!1,!1)},keydown:function(t,r){var s=n(this),v=s.is("input")?s.parent().parent():s.parent(),f,u=v.data("this"),e,l,y,p,b,k,g,c,a=":not(.disabled, .hidden, .dropdown-header, .divider)",d={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},o=r?r.keyCode:t.keyCode,w,h,tt,nt;(u.options.liveSearch&&(v=s.parent().parent()),u.options.container&&(v=u.$menu),f=n("[role=listbox] li",v),c=u.$newElement.hasClass("open"),!c&&(o>=48&&o<=57||o>=96&&o<=105||o>=65&&o<=90)&&(u.options.container?u.$button.trigger("click"):(u.setSize(),u.$menu.parent().addClass("open"),c=!0),u.$searchbox.focus()),u.options.liveSearch&&(/(27)/.test(o.toString(10))&&c&&u.$menu.find(".active").length===0&&(t.preventDefault(),u.$menu.parent().removeClass("open"),u.options.container&&u.$newElement.removeClass("open"),u.$button.focus()),f=n("[role=listbox] li"+a,v),s.val()||/(38|40)/.test(o.toString(10))||f.filter(".active").length===0&&(f=u.$menuInner.find("li"),f=u.options.liveSearchNormalize?f.filter(":a"+u._searchStyle()+"("+i(d[o])+")"):f.filter(":"+u._searchStyle()+"("+d[o]+")"))),f.length)&&(/(38|40)/.test(o.toString(10))?(n.each(f.find("a"),function(t,i){n(i).is(":focus")&&(e=f.index(n(i).parent()))}),y=f.filter(a).first().index(),p=f.filter(a).last().index(),l=f.eq(e).nextAll(a).eq(0).index(),b=f.eq(e).prevAll(a).eq(0).index(),k=f.eq(l).prevAll(a).eq(0).index(),u.options.liveSearch&&(f.each(function(t){n(this).hasClass("disabled")||n(this).data("index",t)}),e=f.index(f.filter(".active")),y=f.first().data("index"),p=f.last().data("index"),l=f.eq(e).nextAll().eq(0).data("index"),b=f.eq(e).prevAll().eq(0).data("index"),k=f.eq(l).prevAll().eq(0).data("index")),g=s.data("prevIndex"),o==38?(u.options.liveSearch&&e--,e!=k&&e>b&&(e=b),e<y&&(e=y),e==g&&(e=p)):o==40&&(u.options.liveSearch&&e++,e==-1&&(e=0),e!=k&&e<l&&(e=l),e>p&&(e=p),e==g&&(e=y)),s.data("prevIndex",e),u.options.liveSearch?(t.preventDefault(),s.hasClass("dropdown-toggle")||f.removeClass("active").eq(e).addClass("active").children("a").focus()):f.eq(e).children("a").focus()):s.is("input")||(w=[],f.each(function(){n(this).hasClass("disabled")||n.trim(n(this).children("a").text().toLowerCase()).substring(0,1)==d[o]&&w.push(n(this).index())}),h=n(document).data("keycount"),h++,n(document).data("keycount",h),tt=n.trim(n(":focus").text().toLowerCase()).substring(0,1),tt!=d[o]?(h=1,n(document).data("keycount",h)):h>=w.length&&(n(document).data("keycount",0),h>w.length&&(h=1)),f.eq(w[h-1]).children("a").focus()),(/(13|32)/.test(o.toString(10))||/(^9$)/.test(o.toString(10))&&u.options.selectOnTab)&&c&&(/(32)/.test(o.toString(10))||t.preventDefault(),u.options.liveSearch?/(32)/.test(o.toString(10))||(u.$menuInner.find(".active a").click(),s.focus()):(nt=n(":focus"),nt.click(),nt.focus(),t.preventDefault(),n(document).data("spaceSelect",!0)),n(document).data("keycount",0)),(/(^9$|27)/.test(o.toString(10))&&c&&(u.multiple||u.options.liveSearch)||/(27)/.test(o.toString(10))&&!c)&&(u.$menu.parent().removeClass("open"),u.$menu.find("li").removeClass("even").filter(":odd").addClass("even"),u.options.container&&u.$newElement.removeClass("open"),u.$button.focus()))},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null;this.liObj={};this.reloadLi();this.render();this.checkDisabled();this.liHeight(!0);this.setStyle();this.setWidth();this.$lis&&this.$searchbox.trigger("propertychange");this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove();this.$bsContainer?this.$bsContainer.remove():this.$menu.remove();this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};f=n.fn.selectpicker;n.fn.selectpicker=u;n.fn.selectpicker.Constructor=t;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=f,this};n(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',t.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',function(n){n.stopPropagation()});n(document).on("focusin.modal",".bs-searchbox input",function(){var t=document.activeElement;n(t).prop("bFocus",!0)});n(window).on("load.bs.select.data-api",function(){n(".selectpicker").each(function(){var t=n(this);u.call(t,t.data())})})})(n)}),onResize=function(){var n=$(".summary");$(window).width()<768?(n.is(":visible")&&n.hide(),$(".summary-box h2 a").unbind("click").click(function(){return $(this).parent().siblings(".summary").slideToggle(),$(this).toggleClass("active"),$(this).attr("aria-expanded",$(this).hasClass("active")),!1})):($(".pc").show(),$(".summary-box h2 a").unbind("click"),$(".summary-box h2 a").removeClass("active"))},$(document).ready(function(n){onResize();var t=n(window).width();n(window).resize(function(){n(window).width()!=t&&(t=n(window).width(),onResize())})}),function(n,t){function u(){return new Date(Date.UTC.apply(Date,arguments))}function e(){var n=new Date;return u(n.getFullYear(),n.getMonth(),n.getDate())}function y(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function c(n){return function(){return this[n].apply(this,arguments)}}function p(t,i){function s(n,t){return t.toLowerCase()}var u=n(t).data(),f={},e,o=new RegExp("^"+i.toLowerCase()+"([A-Z])"),r;i=new RegExp("^"+i.toLowerCase());for(r in u)i.test(r)&&(e=r.replace(o,s),f[e]=u[r]);return f}function w(t){var u={},i;if(r[t]||(t=t.split("-")[0],r[t]))return i=r[t],n.each(v,function(n,t){t in i&&(u[t]=i[t])}),u}var l=function(){var t={get:function(n){return this.slice(n)[0]},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;t<r;t++)if(this[t].valueOf()===i)return t;return-1},remove:function(n){this.splice(n,1)},replace:function(t){t&&(n.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var n=new l;return n.replace(this),n}};return function(){var i=[];return i.push.apply(i,arguments),n.extend(i,t),i}}(),f=function(t,r){this._process_options(r);this.dates=new l;this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=n(t);this.isInline=!1;this.isInput=this.element.is("input");this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1;this.hasInput=this.component&&this.element.find("input").length;this.component&&this.component.length===0&&(this.component=!1);this.picker=n(i.template);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&this.picker.addClass("datepicker-rtl");this.viewMode=this.o.startView;this.o.calendarWeeks&&this.picker.find("tfoot .today, tfoot .clear").attr("colspan",function(n,t){return parseInt(t)+1});this._allow_update=!1;this.setStartDate(this._o.startDate);this.setEndDate(this._o.endDate);this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);this.setDatesDisabled(this.o.datesDisabled);this.fillDow();this.fillMonths();this._allow_update=!0;this.update();this.showMode();this.isInline&&this.show()},h,a,o,s,v,r,i;f.prototype={constructor:f,_process_options:function(f){var o,c,a,v,h,l;this._o=n.extend({},this._o,f);o=this.o=n.extend({},this._o);c=o.language;r[c]||(c=c.split("-")[0],r[c]||(c=s.language));o.language=c;switch(o.startView){case 2:case"decade":o.startView=2;break;case 1:case"year":o.startView=1;break;default:o.startView=0}switch(o.minViewMode){case 1:case"months":o.minViewMode=1;break;case 2:case"years":o.minViewMode=2;break;default:o.minViewMode=0}if(o.startView=Math.max(o.startView,o.minViewMode),o.multidate!==!0&&(o.multidate=Number(o.multidate)||!1,o.multidate!==!1&&(o.multidate=Math.max(0,o.multidate))),o.multidateSeparator=String(o.multidateSeparator),o.weekStart%=7,o.weekEnd=(o.weekStart+6)%7,a=i.parseFormat(o.format),o.startDate!==-Infinity&&(o.startDate=o.startDate?o.startDate instanceof Date?this._local_to_utc(this._zero_time(o.startDate)):i.parseDate(o.startDate,a,o.language):-Infinity),o.endDate!==Infinity&&(o.endDate=o.endDate?o.endDate instanceof Date?this._local_to_utc(this._zero_time(o.endDate)):i.parseDate(o.endDate,a,o.language):Infinity),o.daysOfWeekDisabled=o.daysOfWeekDisabled||[],n.isArray(o.daysOfWeekDisabled)||(o.daysOfWeekDisabled=o.daysOfWeekDisabled.split(/[,\s]*/)),o.daysOfWeekDisabled=n.map(o.daysOfWeekDisabled,function(n){return parseInt(n,10)}),o.datesDisabled=o.datesDisabled||[],n.isArray(o.datesDisabled)||(v=[],v.push(i.parseDate(o.datesDisabled,a,o.language)),o.datesDisabled=v),o.datesDisabled=n.map(o.datesDisabled,function(n){return i.parseDate(n,a,o.language)}),h=String(o.orientation).toLowerCase().split(/\s+/g),l=o.orientation.toLowerCase(),h=n.grep(h,function(n){return/^auto|left|right|top|bottom$/.test(n)}),o.orientation={x:"auto",y:"auto"},l&&l!=="auto")if(h.length===1)switch(h[0]){case"top":case"bottom":o.orientation.y=h[0];break;case"left":case"right":o.orientation.x=h[0]}else l=n.grep(h,function(n){return/^left|right$/.test(n)}),o.orientation.x=l[0]||"auto",l=n.grep(h,function(n){return/^top|bottom$/.test(n)}),o.orientation.y=l[0]||"auto";if(o.defaultViewDate){var y=o.defaultViewDate.year||(new Date).getFullYear(),p=o.defaultViewDate.month||0,w=o.defaultViewDate.day||1;o.defaultViewDate=u(y,p,w)}else o.defaultViewDate=e();o.showOnFocus=o.showOnFocus!==t?o.showOnFocus:!0},_events:[],_secondaryEvents:[],_applyEvents:function(n){for(var i=0,f,r,u;i<n.length;i++){f=n[i][0];n[i].length===2?(r=t,u=n[i][1]):n[i].length===3&&(r=n[i][1],u=n[i][2]);f.on(u,r)}},_unapplyEvents:function(n){for(var i=0,f,r,u;i<n.length;i++)f=n[i][0],n[i].length===2?(u=t,r=n[i][1]):n[i].length===3&&(u=n[i][1],r=n[i][2]),f.off(r,u)},_buildEvents:function(){var t={keyup:n.proxy(function(t){n.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:n.proxy(this.keydown,this)};this.o.showOnFocus===!0&&(t.focus=n.proxy(this.show,this));this.isInput?this._events=[[this.element,t]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),t],[this.component,{click:n.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:n.proxy(this.show,this)}]];this._events.push([this.element,"*",{blur:n.proxy(function(n){this._focused_from=n.target},this)}],[this.element,{blur:n.proxy(function(n){this._focused_from=n.target},this)}]);this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{"mousedown touchend":n.proxy(function(n){console.log(n.target.tagName);this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||n.target.tagName==="HTML"||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,r){var u=r||this.dates.get(-1),f=this._utc_to_local(u);this.element.trigger({type:t,date:f,dates:n.map(this.dates,this._utc_to_local),format:n.proxy(function(n,t){arguments.length===0?(n=this.dates.length-1,t=this.o.format):typeof n=="string"&&(t=n,n=this.dates.length-1);t=t||this.o.format;var r=this.dates.get(n);return i.formatDate(r,t,this.o.language)},this)})},show:function(){if(!this.element.attr("readonly")||this.o.enableOnReadonly!==!1)return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&n(this.element).blur(),this},hide:function(){return this.isInline?this:this.picker.is(":visible")?(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"),this):this},remove:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},_utc_to_local:function(n){return n&&new Date(n.getTime()+n.getTimezoneOffset()*6e4)},_local_to_utc:function(n){return n&&new Date(n.getTime()-n.getTimezoneOffset()*6e4)},_zero_time:function(n){return n&&new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return n&&new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))},getDates:function(){return n.map(this.dates,this._utc_to_local)},getUTCDates:function(){return n.map(this.dates,function(n){return new Date(n)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var n=this.dates.get(-1);return typeof n!="undefined"?new Date(n):null},clearDates:function(){var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input"));n&&n.val("").change();this.update();this._trigger("changeDate");this.o.autoclose&&this.hide()},setDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,n.map(t,this._utc_to_local)),this._trigger("changeDate"),this.setValue(),this},setDate:c("setDates"),setUTCDate:c("setUTCDates"),setValue:function(){var n=this.getFormattedDate();return this.isInput?this.element.val(n).change():this.component&&this.element.find("input").val(n).change(),this},getFormattedDate:function(r){r===t&&(r=this.o.format);var u=this.o.language;return n.map(this.dates,function(n){return i.formatDate(n,r,u)}).join(this.o.multidateSeparator)},setStartDate:function(n){return this._process_options({startDate:n}),this.update(),this.updateNavArrows(),this},setEndDate:function(n){return this._process_options({endDate:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(n){return this._process_options({daysOfWeekDisabled:n}),this.update(),this.updateNavArrows(),this},setDatesDisabled:function(n){this._process_options({datesDisabled:n});this.update();this.updateNavArrows()},place:function(){var u,p,s,w;if(this.isInline)return this;var f=this.picker.outerWidth(),e=this.picker.outerHeight(),h=n(this.o.container).width(),b=n(this.o.container).height(),c=n(this.o.container).scrollTop(),l=n(this.o.container).offset(),a=[];this.element.parents().each(function(){var t=n(this).css("z-index");t!=="auto"&&t!==0&&a.push(parseInt(t))});var v=Math.max.apply(Math,a)+10,r=this.component?this.component.parent().offset():this.element.offset(),y=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),o=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),t=r.left-l.left,i=r.top-l.top;return this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(t-=f-o)):r.left<0?(this.picker.addClass("datepicker-orient-left"),t-=r.left-10):t+f>h?(this.picker.addClass("datepicker-orient-right"),t=r.left+o-f):this.picker.addClass("datepicker-orient-left"),u=this.o.orientation.y,u==="auto"&&(p=-c+i-e,s=c+b-(i+y+e),u=Math.max(p,s)===s?"top":"bottom"),this.picker.addClass("datepicker-orient-"+u),u==="top"?i+=y:i-=e+parseInt(this.picker.css("padding-top")),this.o.rtl?(w=h-(t+o),this.picker.css({top:i,right:w,zIndex:v})):this.picker.css({top:i,left:t,zIndex:v}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var r=this.dates.copy(),t=[],u=!1;return arguments.length?(n.each(arguments,n.proxy(function(n,i){i instanceof Date&&(i=this._local_to_utc(i));t.push(i)},this)),u=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),t=t&&this.o.multidate?t.split(this.o.multidateSeparator):[t],delete this.element.data().date),t=n.map(t,n.proxy(function(n){return i.parseDate(n,this.o.format,this.o.language)},this)),t=n.grep(t,n.proxy(function(n){return n<this.o.startDate||n>this.o.endDate||!n},this),!0),this.dates.replace(t),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),u?this.setValue():t.length&&String(r)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&r.length&&this._trigger("clearDate"),this.fill(),this},fillDow:function(){var t=this.o.weekStart,n="<tr>",i;for(this.o.calendarWeeks&&(this.picker.find(".datepicker-days thead tr:first-child .datepicker-switch").attr("colspan",function(n,t){return parseInt(t)+1}),i='<th class="cw">&#160;<\/th>',n+=i);t<this.o.weekStart+7;)n+='<th class="dow">'+r[this.o.language].daysMin[t++%7]+"<\/th>";n+="<\/tr>";this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var n="",t=0;t<12;)n+='<span class="month">'+r[this.o.language].monthsShort[t++]+"<\/span>";this.picker.find(".datepicker-months td").html(n)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),u=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()===r&&t.getUTCMonth()<f?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()===r&&t.getUTCMonth()>f)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&t.getUTCFullYear()===u.getFullYear()&&t.getUTCMonth()===u.getMonth()&&t.getUTCDate()===u.getDate()&&i.push("today"),this.dates.contains(t)!==-1&&i.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&i.push("disabled"),this.o.datesDisabled.length>0&&n.grep(this.o.datesDisabled,function(n){return y(t,n)}).length>0&&i.push("disabled","disabled-date"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),n.inArray(t.valueOf(),this.range)!==-1&&i.push("selected")),i},fill:function(){var g=new Date(this.viewDate),f=g.getUTCFullYear(),p=g.getUTCMonth(),w=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,ft=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,b=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,et=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,ot=r[this.o.language].today||r.en.today||"",st=r[this.o.language].clear||r.en.clear||"",y,e,k,c,s,h,o,l,it,rt,ut,a,v;if(!isNaN(f)&&!isNaN(p)){for(this.picker.find(".datepicker-days thead .datepicker-switch").text(r[this.o.language].months[p]+" "+f),this.picker.find("tfoot .today").text(ot).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot .clear").text(st).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths(),e=u(f,p-1,28),k=i.getDaysInMonth(e.getUTCFullYear(),e.getUTCMonth()),e.setUTCDate(k),e.setUTCDate(k-(e.getUTCDay()-this.o.weekStart+7)%7),c=new Date(e),c.setUTCDate(c.getUTCDate()+42),c=c.valueOf(),s=[];e.valueOf()<c;){if(e.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var nt=new Date(+e+(this.o.weekStart-e.getUTCDay()-7)%7*864e5),tt=new Date(Number(nt)+(11-nt.getUTCDay())%7*864e5),d=new Date(Number(d=u(tt.getUTCFullYear(),0,1))+(11-d.getUTCDay())%7*864e5),ht=(tt-d)/6048e5+1;s.push('<td class="cw">'+ht+"<\/td>")}h=this.getClassNames(e);h.push("day");this.o.beforeShowDay!==n.noop&&(o=this.o.beforeShowDay(this._utc_to_local(e)),o===t?o={}:typeof o=="boolean"?o={enabled:o}:typeof o=="string"&&(o={classes:o}),o.enabled===!1&&h.push("disabled"),o.classes&&(h=h.concat(o.classes.split(/\s+/))),o.tooltip&&(y=o.tooltip));h=n.unique(h);s.push('<td class="'+h.join(" ")+'"'+(y?' title="'+y+'"':"")+">"+e.getUTCDate()+"<\/td>");y=null;e.getUTCDay()===this.o.weekEnd&&s.push("<\/tr>");e.setUTCDate(e.getUTCDate()+1)}for(this.picker.find(".datepicker-days tbody").empty().append(s.join("")),l=this.picker.find(".datepicker-months").find("th:eq(1)").text(f).end().find("span").removeClass("active"),n.each(this.dates,function(n,t){t.getUTCFullYear()===f&&l.eq(t.getUTCMonth()).addClass("active")}),(f<w||f>b)&&l.addClass("disabled"),f===w&&l.slice(0,ft).addClass("disabled"),f===b&&l.slice(et+1).addClass("disabled"),this.o.beforeShowMonth!==n.noop&&(it=this,n.each(l,function(t,i){if(!n(i).hasClass("disabled")){var r=new Date(f,t,1),u=it.o.beforeShowMonth(r);u===!1&&n(i).addClass("disabled")}})),s="",f=parseInt(f/10,10)*10,rt=this.picker.find(".datepicker-years").find("th:eq(1)").text(f+"-"+(f+9)).end().find("td"),f-=1,ut=n.map(this.dates,function(n){return n.getUTCFullYear()}),v=-1;v<11;v++)a=["year"],v===-1?a.push("old"):v===10&&a.push("new"),n.inArray(f,ut)!==-1&&a.push("active"),(f<w||f>b)&&a.push("disabled"),s+='<span class="'+a.join(" ")+'">'+f+"<\/span>",f+=1;rt.html(s)}},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&n<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==Infinity&&n>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&n<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==Infinity&&n>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){var r,e,f,o,h,s,c;if(t.preventDefault(),r=n(t.target).closest("span, td, th"),r.length===1)switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":h=i.modes[this.viewMode].navStep*(r[0].className==="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h);this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h);this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":s=new Date;s=u(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0);this.showMode(-2);c=this.o.todayBtn==="linked"?null:"view";this._setDate(s,c);break;case"clear":this.clearDates()}break;case"span":r.hasClass("disabled")||(this.viewDate.setUTCDate(1),r.hasClass("month")?(o=1,f=r.parent().find("span").index(r),e=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(f),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(u(e,f,o))):(o=1,f=0,e=parseInt(r.text(),10)||0,this.viewDate.setUTCFullYear(e),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(u(e,f,o))),this.showMode(-1),this.fill());break;case"td":r.hasClass("day")&&!r.hasClass("disabled")&&(o=parseInt(r.text(),10)||1,e=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),r.hasClass("old")?f===0?(f=11,e-=1):f-=1:r.hasClass("new")&&(f===11?(f=0,e+=1):f+=1),this._setDate(u(e,f,o)))}this.picker.is(":visible")&&this._focused_from&&n(this._focused_from).focus();delete this._focused_from},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),t!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):this.o.multidate===!1?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(n,t){t&&t!=="date"||this._toggle_multidate(n&&new Date(n));t&&t!=="view"||(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&t==="view"||this._trigger("changeDate");var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input"));i&&i.change();this.o.autoclose&&(!t||t==="date")&&this.hide()},moveMonth:function(n,i){var e;if(!n)return t;if(!i)return n;var r=new Date(n.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),h=Math.abs(i),u,f;if(i=i>0?1:-1,h===1)f=i===-1?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==u},u=s+i,r.setUTCMonth(u),(u<0||u>11)&&(u=(u+12)%12);else{for(e=0;e<h;e++)r=this.moveMonth(r,i);u=r.getUTCMonth();r.setUTCDate(o);f=function(){return u!==r.getUTCMonth()}}while(f())r.setUTCDate(--o),r.setUTCMonth(u);return r},moveYear:function(n,t){return this.moveMonth(n,t*12)},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){var o,t,u,i,r,f;if(!this.picker.is(":visible")){n.keyCode===27&&this.show();return}o=!1;r=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;t=n.keyCode===37?-1:1;n.ctrlKey?(u=this.moveYear(this.dates.get(-1)||e(),t),i=this.moveYear(r,t),this._trigger("changeYear",this.viewDate)):n.shiftKey?(u=this.moveMonth(this.dates.get(-1)||e(),t),i=this.moveMonth(r,t),this._trigger("changeMonth",this.viewDate)):(u=new Date(this.dates.get(-1)||e()),u.setUTCDate(u.getUTCDate()+t),i=new Date(r),i.setUTCDate(r.getUTCDate()+t));this.dateWithinRange(i)&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),n.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;t=n.keyCode===38?-1:1;n.ctrlKey?(u=this.moveYear(this.dates.get(-1)||e(),t),i=this.moveYear(r,t),this._trigger("changeYear",this.viewDate)):n.shiftKey?(u=this.moveMonth(this.dates.get(-1)||e(),t),i=this.moveMonth(r,t),this._trigger("changeMonth",this.viewDate)):(u=new Date(this.dates.get(-1)||e()),u.setUTCDate(u.getUTCDate()+t*7),i=new Date(r),i.setUTCDate(r.getUTCDate()+t*7));this.dateWithinRange(i)&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate(r),o=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(":visible")&&(n.preventDefault(),typeof n.stopPropagation=="function"?n.stopPropagation():n.cancelBubble=!0,this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}o&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.isInput?f=this.element:this.component&&(f=this.element.find("input")),f&&f.change())},showMode:function(n){n&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+n)));this.picker.children("div").hide().filter(".datepicker-"+i.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()}};h=function(t,i){this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;o.call(n(this.inputs),i).bind("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n(t).data("datepicker")});this.updateDates()};h.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},dateUpdated:function(t){if(!this.updating){this.updating=!0;var e=n(t.target).data("datepicker"),i=e.getUTCDate(),f=n.inArray(t.target,this.inputs),r=f-1,u=f+1,o=this.inputs.length;if(f!==-1){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t.setUTCDate(i)}),i<this.dates[r])while(r>=0&&i<this.dates[r])this.pickers[r--].setUTCDate(i);else if(i>this.dates[u])while(u<o&&i>this.dates[u])this.pickers[u++].setUTCDate(i);this.updateDates();delete this.updating}}},remove:function(){n.map(this.pickers,function(n){n.remove()});delete this.element.data().datepicker}};a=n.fn.datepicker;o=function(i){var u=Array.apply(null,arguments),r;return u.shift(),this.each(function(){var o=n(this),e=o.data("datepicker"),l=typeof i=="object"&&i,v;if(!e){var a=p(this,"date"),y=n.extend({},s,a,l),b=w(y.language),c=n.extend({},s,b,a,l);o.hasClass("input-daterange")||c.inputs?(v={inputs:c.inputs||o.find("input").toArray()},o.data("datepicker",e=new h(this,n.extend(c,v)))):o.data("datepicker",e=new f(this,c))}if(typeof i=="string"&&typeof e[i]=="function"&&(r=e[i].apply(e,u),r!==t))return!1}),r!==t?r:this};n.fn.datepicker=o;s=n.fn.datepicker.defaults={autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,calendarWeeks:!1,clearBtn:!0,toggleActive:!1,daysOfWeekDisabled:[],datesDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!0,enableOnReadonly:!0,container:"body"};v=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=f;r=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}};i={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},getDaysInMonth:function(n,t){return[31,i.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(n){var t=n.replace(this.validParts,'\0').split('\0'),i=n.match(this.validParts);if(!t||!t.length||!i||i.length===0)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(e,o,s){function tt(){var n=this.slice(0,c[h].length),t=c[h].slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var nt,c,v,y,h,a,it,d,w;if(!e)return t;if(e instanceof Date)return e;if(typeof o=="string"&&(o=i.parseFormat(o)),nt=/([\-+]\d+)([dmwy])/,c=e.match(/([\-+]\d+)([dmwy])/g),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e)){for(e=new Date,h=0;h<c.length;h++){v=nt.exec(c[h]);y=parseInt(v[1]);switch(v[2]){case"d":e.setUTCDate(e.getUTCDate()+y);break;case"m":e=f.prototype.moveMonth.call(f.prototype,e,y);break;case"w":e.setUTCDate(e.getUTCDate()+y*7);break;case"y":e=f.prototype.moveYear.call(f.prototype,e,y)}}return u(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0)}c=e&&e.match(this.nonpunctuation)||[];e=new Date;var b={},g=["yyyy","yy","M","MM","m","mm","d","dd"],l={yyyy:function(n,t){return n.setUTCFullYear(t)},yy:function(n,t){return n.setUTCFullYear(2e3+t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;t<0;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!==t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}},p,k;if(l.M=l.MM=l.mm=l.m,l.dd=l.d,e=u(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),a=o.parts.slice(),c.length!==a.length&&(a=n(a).filter(function(t,i){return n.inArray(i,g)!==-1}).toArray()),c.length===a.length){for(h=0,it=a.length;h<it;h++){if(p=parseInt(c[h],10),v=a[h],isNaN(p))switch(v){case"MM":k=n(r[s].months).filter(tt);p=n.inArray(k[0],r[s].months)+1;break;case"M":k=n(r[s].monthsShort).filter(tt);p=n.inArray(k[0],r[s].monthsShort)+1}b[v]=p}for(h=0;h<g.length;h++)w=g[h],w in b&&!isNaN(b[w])&&(d=new Date(e),l[w](d,b[w]),isNaN(d)||(e=d))}return e},formatDate:function(t,u,f){var e,s,o,h;if(!t)return"";for(typeof u=="string"&&(u=i.parseFormat(u)),e={d:t.getUTCDate(),D:r[f].daysShort[t.getUTCDay()],DD:r[f].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:r[f].monthsShort[t.getUTCMonth()],MM:r[f].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,t=[],s=n.extend([],u.separators),o=0,h=u.parts.length;o<=h;o++)s.length&&t.push(s.shift()),t.push(e[u.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="prev">&#171;<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">&#187;<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};i.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+i.headTemplate+"<tbody><\/tbody>"+i.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=a,this};n.fn.datepicker.version="1.4.0";n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),o.call(i,"show"))});n(function(){o.call(n('[data-provide="datepicker-inline"]'))})}(window.jQuery),$(document).ready(function(){$(".date input").datepicker({orientation:"top left",format:"dd-M-yyyy",todayHighlight:!0,autoclose:!0,forceParse:!1}).on("show",function(){return $(this).parent().addClass("active"),!1}).on("hide",function(){return $(this).parent().removeClass("active"),!1})}),$(document).ready(function(){if($("#agencyOptions-allActive").length){var n=$("input[name='agencyStatus']");disableAgencySelect(!0,!1);n.change(function(){$(this).val()=="2"?disableAgencySelect(!1,!0):disableAgencySelect(!0,!0);$(this).focus()});$("#agencyOptions-sel").is(":checked")&&disableAgencySelect(!1,!0)}}),$("#agencyOptions-allActive").length){activeSelect=$("#activeSelect");retiredSelect=$("#retiredSelect");function disableAgencySelect(n,t){n&&t&&(activeSelect.val(0),retiredSelect.val(0));n?($('#activeSelect, [for="activeSelect"]').addClass("labelDisabled"),$('#retiredSelect, [for="retiredSelect"]').addClass("labelDisabled")):($('#activeSelect, [for="activeSelect"]').removeClass("labelDisabled"),$('#retiredSelect, [for="retiredSelect"]').removeClass("labelDisabled"));activeSelect.attr("disabled",n);retiredSelect.attr("disabled",n);activeSelect.selectpicker("refresh");retiredSelect.selectpicker("refresh");$(".bootstrap-select").each(function(){$(this).children(".dropdown-menu").find("li:odd").addClass("even")})}function writeError(){$("#agencyErrID").html("You must select an agency")}function validateAgencies(){var n=!1;return(clearErrors(),!$("#agencyOptions-sel").is(":checked"))?!1:(activeSelect.val()||retiredSelect.val()||(writeError(),n=!0),n)}function clearErrors(){$("#agencyErrID").html("")}$(activeSelect).closest("form").on("keydown","input",function(n){n.keyCode==13&&$("#submitBtnID").length&&$("#submitBtnID").click()});$(activeSelect).closest("form").submit(function(n){var t=validateAgencies();t?(this.submitted=!0,n.preventDefault()):this.submitted=!1})}$(document).ready(function(){var t=new URL(window.location.href);if(t.searchParams.get("editHelp")==="true"){var r=t.searchParams.get("mode"),n={},i="";r==="new"?(n.page=t.searchParams.get("page"),n.field=t.searchParams.get("field"),i=$('a[data-field="'+n.field+'"]').data("href")):(n.id=t.searchParams.get("id"),i=$('a[data-identifier="'+n.id+'"]').data("href"));showDialog(r,n,i)}})