chunk-5238a06f.d27adabe0e4d37fb8b27.js 1.4 MB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5238a06f"],{"030f":function(t,e,n){(function(t){(function(){"use strict";var e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=function(t){return function(e){return typeof e===t}},o=function(t){return function(e){return t===e}},i=n("string"),a=n("object"),u=n("array"),c=o(null),s=r("boolean"),l=o(void 0),f=function(t){return null===t||void 0===t},d=function(t){return!f(t)},m=r("function"),g=r("number"),h=function(t,e){if(u(t)){for(var n=0,r=t.length;n<r;++n)if(!e(t[n]))return!1;return!0}return!1},p=function(){},v=function(t){return function(){return t()}},b=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},y=function(t,e){return function(n){return t(e(n))}},w=function(t){return function(){return t}},x=function(t){return t},C=function(t,e){return t===e};function S(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var k=function(t){return function(e){return!t(e)}},T=function(t){return function(){throw new Error(t)}},O=w(!1),_=w(!0),E=tinymce.util.Tools.resolve("tinymce.ThemeManager"),A=function(){return A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},A.apply(this,arguments)};function D(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function M(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var N=function(){return R},R=function(){var t=function(t){return t()},e=x,n={fold:function(t,e){return t()},isSome:O,isNone:_,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:w(null),getOrUndefined:w(void 0),or:e,orThunk:t,map:N,each:p,bind:N,exists:O,forall:_,filter:function(){return N()},toArray:function(){return[]},toString:w("none()")};return n}(),z=function(t){var e=w(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:_,isNone:O,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return z(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:R},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},B=function(t){return null===t||void 0===t?R:z(t)},P={some:z,none:N,from:B},I=Array.prototype.slice,L=Array.prototype.indexOf,H=Array.prototype.push,F=function(t,e){return L.call(t,e)},V=function(t,e){var n=F(t,e);return-1===n?P.none():P.some(n)},j=function(t,e){return F(t,e)>-1},U=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},W=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},$=function(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=I.call(t,r,r+e);n.push(o)}return n},q=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},G=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},K=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},X=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=e(a,o)?n:r;u.push(a)}return{pass:n,fail:r}},Y=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},J=function(t,e,n){return K(t,(function(t,r){n=e(n,t,r)})),n},Z=function(t,e,n){return G(t,(function(t,r){n=e(n,t,r)})),n},Q=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return P.some(i);if(n(i,r))break}return P.none()},tt=function(t,e){return Q(t,e,O)},et=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return P.some(n)}return P.none()},nt=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);H.apply(e,t[n])}return e},rt=function(t,e){return nt(q(t,e))},ot=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},it=function(t){var e=I.call(t,0);return e.reverse(),e},at=function(t,e){return Y(t,(function(t){return!j(e,t)}))},ut=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},ct=function(t){return[t]},st=function(t,e){var n=I.call(t,0);return n.sort(e),n},lt=function(t,e){return e>=0&&e<t.length?P.some(t[e]):P.none()},ft=function(t){return lt(t,0)},dt=function(t){return lt(t,t.length-1)},mt=m(Array.from)?Array.from:function(t){return I.call(t)},gt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return P.none()},ht=Object.keys,pt=Object.hasOwnProperty,vt=function(t,e){for(var n=ht(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},bt=function(t,e){return yt(t,(function(t,n){return{k:n,v:e(t,n)}}))},yt=function(t,e){var n={};return vt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},wt=function(t){return function(e,n){t[n]=e}},xt=function(t,e,n,r){var o={};return vt(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},Ct=function(t,e){var n={};return xt(t,e,wt(n),p),n},St=function(t,e){var n=[];return vt(t,(function(t,r){n.push(e(t,r))})),n},kt=function(t,e){for(var n=ht(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];if(e(a,i,t))return P.some(a)}return P.none()},Tt=function(t){return St(t,x)},Ot=function(t,e){return _t(t,e)?P.from(t[e]):P.none()},_t=function(t,e){return pt.call(t,e)},Et=function(t,e){return _t(t,e)&&void 0!==t[e]&&null!==t[e]},At=function(t,e,n){return void 0===n&&(n=C),t.exists((function(t){return n(t,e)}))},Dt=function(t,e,n){return void 0===n&&(n=C),Rt(t,e,n).getOr(t.isNone()&&e.isNone())},Mt=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},Nt=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return P.none();e.push(r.getOrDie())}return P.some(e)},Rt=function(t,e,n){return t.isSome()&&e.isSome()?P.some(n(t.getOrDie(),e.getOrDie())):P.none()},zt=function(t,e,n,r){return t.isSome()&&e.isSome()&&n.isSome()?P.some(r(t.getOrDie(),e.getOrDie(),n.getOrDie())):P.none()},Bt=function(t,e){return void 0!==t&&null!==t?P.some(e(t)):P.none()},Pt=function(t,e){return t?P.some(e):P.none()},It=function(t,e){return t+e},Lt=function(t,e){return t.substring(e)},Ht=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},Ft=function(t,e){return Ut(t,e)?Lt(t,e.length):t},Vt=function(t,e){return Wt(t,e)?t:It(t,e)},jt=function(t,e){return-1!==t.indexOf(e)},Ut=function(t,e){return Ht(t,e,0)},Wt=function(t,e){return Ht(t,e,t.length-e.length)},$t=function(t){return function(e){return e.replace(t,"")}},qt=$t(/^\s+|\s+$/g),Gt=function(t){return t.length>0},Kt=function(t){return!Gt(t)},Xt=function(t){return void 0!==t.style&&m(t.style.getPropertyValue)},Yt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Qt(r.childNodes[0])},Jt=function(t,e){var n=e||document,r=n.createElement(t);return Qt(r)},Zt=function(t,e){var n=e||document,r=n.createTextNode(t);return Qt(r)},Qt=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},te=function(t,e,n){return P.from(t.dom.elementFromPoint(e,n)).map(Qt)},ee={fromHtml:Yt,fromTag:Jt,fromText:Zt,fromDom:Qt,fromPoint:te};"undefined"!==typeof window?window:Function("return this;")();var ne,re=9,oe=11,ie=1,ae=3,ue=function(t){var e=t.dom.nodeName;return e.toLowerCase()},ce=function(t){return t.dom.nodeType},se=function(t){return function(e){return ce(e)===t}},le=se(ie),fe=se(ae),de=se(re),me=se(oe),ge=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},he=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:w(o),isiPhone:w(i),isTablet:w(c),isPhone:w(s),isTouch:w(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:w(l),isDesktop:w(f)}},pe=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},ve=function(t,e){var n=pe(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return we(r(1),r(2))},be=function(t,e){var n=String(e).toLowerCase();return 0===t.length?ye():ve(t,n)},ye=function(){return we(0,0)},we=function(t,e){return{major:t,minor:e}},xe={nu:we,detect:be,unknown:ye},Ce=function(t,e){return gt(e.brands,(function(e){var n=e.brand.toLowerCase();return tt(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:xe.nu(parseInt(e.version,10),0)}}))}))},Se=function(t,e){var n=String(e).toLowerCase();return tt(t,(function(t){return t.search(n)}))},ke=function(t,e){return Se(t,e).map((function(t){var n=xe.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},Te=function(t,e){return Se(t,e).map((function(t){var n=xe.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},Oe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,_e=function(t){return function(e){return jt(e,t)}},Ee=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return jt(t,"edge/")&&jt(t,"chrome")&&jt(t,"safari")&&jt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Oe],search:function(t){return jt(t,"chrome")&&!jt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return jt(t,"msie")||jt(t,"trident")}},{name:"Opera",versionRegexes:[Oe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:_e("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:_e("firefox")},{name:"Safari",versionRegexes:[Oe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(jt(t,"safari")||jt(t,"mobile/"))&&jt(t,"applewebkit")}}],Ae=[{name:"Windows",search:_e("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return jt(t,"iphone")||jt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:_e("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:_e("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:_e("linux"),versionRegexes:[]},{name:"Solaris",search:_e("sunos"),versionRegexes:[]},{name:"FreeBSD",search:_e("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:_e("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],De={browsers:w(Ee),oses:w(Ae)},Me="Edge",Ne="Chrome",Re="IE",ze="Opera",Be="Firefox",Pe="Safari",Ie=function(){return Le({current:void 0,version:xe.unknown()})},Le=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(Me),isChrome:r(Ne),isIE:r(Re),isOpera:r(ze),isFirefox:r(Be),isSafari:r(Pe)}},He={unknown:Ie,nu:Le,edge:w(Me),chrome:w(Ne),ie:w(Re),opera:w(ze),firefox:w(Be),safari:w(Pe)},Fe="Windows",Ve="iOS",je="Android",Ue="Linux",We="OSX",$e="Solaris",qe="FreeBSD",Ge="ChromeOS",Ke=function(){return Xe({current:void 0,version:xe.unknown()})},Xe=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Fe),isiOS:r(Ve),isAndroid:r(je),isOSX:r(We),isLinux:r(Ue),isSolaris:r($e),isFreeBSD:r(qe),isChromeOS:r(Ge)}},Ye={unknown:Ke,nu:Xe,windows:w(Fe),ios:w(Ve),android:w(je),linux:w(Ue),osx:w(We),solaris:w($e),freebsd:w(qe),chromeos:w(Ge)},Je=function(t,e,n){var r=De.browsers(),o=De.oses(),i=e.bind((function(t){return Ce(r,t)})).orThunk((function(){return ke(r,t)})).fold(He.unknown,He.nu),a=Te(o,t).fold(Ye.unknown,Ye.nu),u=he(a,i,t,n);return{browser:i,os:a,deviceType:u}},Ze={detect:Je},Qe=function(t){return window.matchMedia(t).matches},tn=ge((function(){return Ze.detect(navigator.userAgent,P.from(navigator.userAgentData),Qe)})),en=function(){return tn()},nn=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},rn=function(t,e){return nn(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},on=function(t,e){var n=t.dom;if(n.nodeType!==ie)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},an=function(t){return t.nodeType!==ie&&t.nodeType!==re&&t.nodeType!==oe||0===t.childElementCount},un=function(t,e){var n=void 0===e?document:e.dom;return an(n)?[]:q(n.querySelectorAll(t),ee.fromDom)},cn=function(t,e){var n=void 0===e?document:e.dom;return an(n)?P.none():P.from(n.querySelector(t)).map(ee.fromDom)},sn=function(t,e){return t.dom===e.dom},ln=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},fn=function(t,e){return rn(t.dom,e.dom)},dn=function(t,e){return en().browser.isIE()?fn(t,e):ln(t,e)},mn=function(t){return ee.fromDom(t.dom.ownerDocument)},gn=function(t){return de(t)?t:mn(t)},hn=function(t){return ee.fromDom(gn(t).dom.documentElement)},pn=function(t){return ee.fromDom(gn(t).dom.defaultView)},vn=function(t){return P.from(t.dom.parentNode).map(ee.fromDom)},bn=function(t){return vn(t)},yn=function(t){return P.from(t.dom.offsetParent).map(ee.fromDom)},wn=function(t){return P.from(t.dom.nextSibling).map(ee.fromDom)},xn=function(t){return q(t.dom.childNodes,ee.fromDom)},Cn=function(t,e){var n=t.dom.childNodes;return P.from(n[e]).map(ee.fromDom)},Sn=function(t){return Cn(t,0)},kn=function(t,e){return{element:t,offset:e}},Tn=function(t,e){var n=xn(t);return n.length>0&&e<n.length?kn(n[e],0):kn(t,e)},On=function(t){return me(t)&&d(t.dom.host)},_n=m(Element.prototype.attachShadow)&&m(Node.prototype.getRootNode),En=w(_n),An=_n?function(t){return ee.fromDom(t.dom.getRootNode())}:gn,Dn=function(t){return On(t)?t:ee.fromDom(gn(t).dom.body)},Mn=function(t){return Nn(t).isSome()},Nn=function(t){var e=An(t);return On(e)?P.some(e):P.none()},Rn=function(t){return ee.fromDom(t.dom.host)},zn=function(t){if(En()&&d(t.target)){var e=ee.fromDom(t.target);if(le(e)&&Bn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return ft(n)}}return P.from(t.target)},Bn=function(t){return d(t.dom.shadowRoot)},Pn=function(t){var e=fe(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return Nn(ee.fromDom(e)).fold((function(){return n.body.contains(e)}),y(Pn,Rn))},In=function(){return Ln(ee.fromDom(document))},Ln=function(t){var e=t.dom.body;if(null===e||void 0===e)throw new Error("Body is not available yet");return ee.fromDom(e)},Hn=function(t,e,n){if(!(i(n)||s(n)||g(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Fn=function(t,e,n){Hn(t.dom,e,n)},Vn=function(t,e){var n=t.dom;vt(e,(function(t,e){Hn(n,e,t)}))},jn=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},Un=function(t,e){return P.from(jn(t,e))},Wn=function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},$n=function(t,e){t.dom.removeAttribute(e)},qn=function(t,e,n){if(!i(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);Xt(t)&&t.style.setProperty(e,n)},Gn=function(t,e){Xt(t)&&t.style.removeProperty(e)},Kn=function(t,e,n){var r=t.dom;qn(r,e,n)},Xn=function(t,e){var n=t.dom;vt(e,(function(t,e){qn(n,e,t)}))},Yn=function(t,e){var n=t.dom;vt(e,(function(t,e){t.fold((function(){Gn(n,e)}),(function(t){qn(n,e,t)}))}))},Jn=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||Pn(t)?o:Zn(n,e)},Zn=function(t,e){return Xt(t)?t.style.getPropertyValue(e):""},Qn=function(t,e){var n=t.dom,r=Zn(n,e);return P.from(r).filter((function(t){return t.length>0}))},tr=function(t){var e={},n=t.dom;if(Xt(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},er=function(t,e,n){var r=ee.fromTag(t);Kn(r,e,n);var o=Qn(r,e);return o.isSome()},nr=function(t,e){var n=t.dom;Gn(n,e),At(Un(t,"style").map(qt),"")&&$n(t,"style")},rr=function(t){return t.dom.offsetWidth},or=function(t,e){var n=function(e,n){if(!g(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;Xt(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=Jn(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return Z(e,(function(e,n){var r=Jn(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},a=function(t,e,n){var r=i(t,n),o=e>r?e-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},ir=or("height",(function(t){var e=t.dom;return Pn(t)?e.getBoundingClientRect().height:e.offsetHeight})),ar=function(t){return ir.get(t)},ur=function(t){return ir.getOuter(t)},cr=function(t,e){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=ir.max(t,e,n);Kn(t,"max-height",r+"px")},sr=function(t,e){var n=function(n,r){return sr(t+n,e+r)};return{left:t,top:e,translate:n}},lr=sr,fr=function(t){var e=t.getBoundingClientRect();return lr(e.left,e.top)},dr=function(t,e){return void 0!==t?t:void 0!==e?e:0},mr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return lr(n.offsetLeft,n.offsetTop);var i=dr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=dr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=dr(o.clientTop,n.clientTop),c=dr(o.clientLeft,n.clientLeft);return gr(t).translate(a-c,i-u)},gr=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?lr(r.offsetLeft,r.offsetTop):Pn(t)?fr(e):lr(0,0)},hr=or("width",(function(t){return t.dom.offsetWidth})),pr=function(t,e){return hr.set(t,e)},vr=function(t){return hr.get(t)},br=function(t){return hr.getOuter(t)},yr=function(t,e){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=hr.max(t,e,n);Kn(t,"max-width",r+"px")},wr=function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}},xr=function(t){var e=ee.fromDom(zn(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=b(r,n);return wr(e,t.clientX,t.clientY,n,r,o,t)},Cr=function(t,e){return function(n){t(n)&&e(xr(n))}},Sr=function(t,e,n,r,o){var i=Cr(n,r);return t.dom.addEventListener(e,i,o),{unbind:S(Or,t,e,i,o)}},kr=function(t,e,n,r){return Sr(t,e,n,r,!1)},Tr=function(t,e,n,r){return Sr(t,e,n,r,!0)},Or=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},_r=function(t,e){var n=vn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},Er=function(t,e){var n=wn(t);n.fold((function(){var n=vn(t);n.each((function(t){Dr(t,e)}))}),(function(t){_r(t,e)}))},Ar=function(t,e){var n=Sn(t);n.fold((function(){Dr(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Dr=function(t,e){t.dom.appendChild(e.dom)},Mr=function(t,e,n){Cn(t,n).fold((function(){Dr(t,e)}),(function(t){_r(t,e)}))},Nr=function(t,e){G(e,(function(e){_r(t,e)}))},Rr=function(t,e){G(e,(function(e){Dr(t,e)}))},zr=function(t){t.dom.textContent="",G(xn(t),(function(t){Br(t)}))},Br=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Pr=function(t){var e=xn(t);e.length>0&&Nr(t,e),Br(t)},Ir=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return lr(n,r)},Lr=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},Hr=function(t){var e=void 0===t?window:t;return en().browser.isFirefox()?P.none():P.from(e["visualViewport"])},Fr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Vr=function(t){var e=void 0===t?window:t,n=e.document,r=Ir(ee.fromDom(n));return Hr(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Fr(r.left,r.top,n,o)}),(function(t){return Fr(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},jr=function(t,e){var n=t.view(e);return n.fold(w([]),(function(e){var n=t.owner(e),r=jr(t,n);return[e].concat(r)}))},Ur=function(t,e){var n=e.owner(t),r=jr(e,n);return P.some(r)},Wr=function(t){var e,n=t.dom===document?P.none():P.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement);return n.map(ee.fromDom)},$r=function(t){return mn(t)},qr=Object.freeze({__proto__:null,view:Wr,owner:$r}),Gr=function(t){var e=ee.fromDom(document),n=Ir(e),r=Ur(t,qr);return r.fold(S(mr,t),(function(e){var r=gr(t),o=J(e,(function(t,e){var n=gr(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return lr(o.left+r.left+n.left,o.top+r.top+n.top)}))},Kr=function(t,e,n){return{point:t,width:e,height:n}},Xr=function(t,e,n,r){return{x:t,y:e,width:n,height:r}},Yr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Jr=function(t){var e=mr(t),n=br(t),r=ur(t);return Yr(e.left,e.top,n,r)},Zr=function(t){var e=Gr(t),n=br(t),r=ur(t);return Yr(e.left,e.top,n,r)},Qr=function(){return Vr(window)},to=function(t){var e=function(e){return to(t)},n=function(e){return to(t)},r=function(e){return to(e(t))},o=function(e){return to(t)},i=function(e){e(t)},a=function(e){return e(t)},u=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return P.some(t)};return{isValue:_,isError:O,getOr:w(t),getOrThunk:w(t),getOrDie:w(t),or:e,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:c,forall:s,toOptional:l}},eo=function(t){var e=function(t){return t()},n=function(){return T(String(t))()},r=x,o=function(t){return t()},i=function(e){return eo(t)},a=function(e){return eo(e(t))},u=function(e){return eo(t)},c=function(e,n){return e(t)};return{isValue:O,isError:_,getOr:x,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:a,each:p,bind:u,exists:O,forall:_,toOptional:P.none}},no=function(t,e){return t.fold((function(){return eo(e)}),to)},ro={value:to,error:eo,fromOption:no};(function(t){t[t["Error"]=0]="Error",t[t["Value"]=1]="Value"})(ne||(ne={}));var oo=function(t,e,n){return t.stype===ne.Error?e(t.serror):n(t.svalue)},io=function(t){var e=[],n=[];return G(t,(function(t){oo(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n}},ao=function(t,e){return t.stype===ne.Error?{stype:ne.Error,serror:e(t.serror)}:t},uo=function(t,e){return t.stype===ne.Value?{stype:ne.Value,svalue:e(t.svalue)}:t},co=function(t,e){return t.stype===ne.Value?e(t.svalue):t},so=function(t,e){return t.stype===ne.Error?e(t.serror):t},lo=function(t){return{stype:ne.Value,svalue:t}},fo=function(t){return{stype:ne.Error,serror:t}},mo=function(t){return oo(t,ro.error,ro.value)},go=function(t){return t.fold(fo,lo)},ho={fromResult:go,toResult:mo,svalue:lo,partition:io,serror:fo,bind:co,bindError:so,map:uo,mapError:ao,fold:oo},po=function(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}},vo=function(t,e){return{tag:"custom",newKey:t,instantiator:e}},bo=function(t,e,n){switch(t.tag){case"field":return e(t.key,t.newKey,t.presence,t.prop);case"custom":return n(t.newKey,t.instantiator)}},yo=function(t,e){return e},wo=function(t,e){var n=a(t)&&a(e);return n?Co(t,e):e},xo=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var a in i)_t(i,a)&&(r[a]=t(r[a],i[a]))}return r}},Co=xo(wo),So=xo(yo),ko=function(){return{tag:"required",process:{}}},To=function(t){return{tag:"defaultedThunk",process:t}},Oo=function(t){return To(w(t))},_o=function(){return{tag:"option",process:{}}},Eo=function(t){return{tag:"mergeWithThunk",process:t}},Ao=function(t){return Eo(w(t))},Do=function(t,e){return t.length>0?ho.svalue(Co(e,So.apply(void 0,t))):ho.svalue(e)},Mo=function(t){return b(ho.serror,nt)(t)},No=function(t,e){var n=ho.partition(t);return n.errors.length>0?Mo(n.errors):Do(n.values,e)},Ro=function(t){var e=ho.partition(t);return e.errors.length>0?Mo(e.errors):ho.svalue(e.values)},zo={consolidateObj:No,consolidateArr:Ro},Bo=function(t){return a(t)&&ht(t).length>100?" removed due to size":JSON.stringify(t,null,2)},Po=function(t){var e=t.length>10?t.slice(0,10).concat([{path:[],getErrorInfo:w("... (only showing first ten failures)")}]):t;return q(e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))},Io=function(t,e){return ho.serror([{path:t,getErrorInfo:e}])},Lo=function(t,e,n){return Io(t,(function(){return'Could not find valid *required* value for "'+e+'" in '+Bo(n)}))},Ho=function(t,e){return Io(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))},Fo=function(t,e,n){return Io(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Bo(e)}))},Vo=function(t,e){return Io(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))},jo=function(t,e){return Io(t,w(e))},Uo=function(t){var e=function(e,n){return ho.bindError(t(n),(function(t){return jo(e,t)}))},n=w("val");return{extract:e,toString:n}},Wo=Uo(ho.svalue),$o=function(t,e,n,r){return Ot(e,n).fold((function(){return Lo(t,n,e)}),r)},qo=function(t,e,n,r){var o=Ot(t,e).getOrThunk((function(){return n(t)}));return r(o)},Go=function(t,e,n){return n(Ot(t,e))},Ko=function(t,e,n,r){var o=Ot(t,e).map((function(e){return!0===e?n(t):e}));return r(o)},Xo=function(t,e,n,r,o){var i=function(t){return o.extract(e.concat([r]),t)},a=function(t){return t.fold((function(){return ho.svalue(P.none())}),(function(t){var n=o.extract(e.concat([r]),t);return ho.map(n,P.some)}))};switch(t.tag){case"required":return $o(e,n,r,i);case"defaultedThunk":return qo(n,r,t.process,i);case"option":return Go(n,r,a);case"defaultedOptionThunk":return Ko(n,r,t.process,a);case"mergeWithThunk":return qo(n,r,w({}),(function(e){var r=Co(t.process(n),e);return i(r)}))}},Yo=function(t,e,n){for(var r={},o=[],i=0,a=n;i<a.length;i++){var u=a[i];bo(u,(function(n,i,a,u){var c=Xo(a,t,e,n,u);ho.fold(c,(function(t){o.push.apply(o,t)}),(function(t){r[i]=t}))}),(function(t,n){r[t]=n(e)}))}return o.length>0?ho.serror(o):ho.svalue(r)},Jo=function(t){var e=function(e,n){return t().extract(e,n)},n=function(){return t().toString()};return{extract:e,toString:n}},Zo=function(t){return ht(Ct(t,d))},Qo=function(t){var e=ti(t),n=J(t,(function(t,e){return bo(e,(function(e){var n;return Co(t,(n={},n[e]=!0,n))}),w(t))}),{}),r=function(t,r){var o=s(r)?[]:Zo(r),i=Y(o,(function(t){return!Et(n,t)}));return 0===i.length?e.extract(t,r):Vo(t,i)};return{extract:r,toString:e.toString}},ti=function(t){var e=function(e,n){return Yo(e,n,t)},n=function(){var e=q(t,(function(t){return bo(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))}));return"obj{\n"+e.join("\n")+"}"};return{extract:e,toString:n}},ei=function(t){var e=function(e,n){var r=q(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return zo.consolidateArr(r)},n=function(){return"array("+t.toString()+")"};return{extract:e,toString:n}},ni=function(t){var e=function(e,n){for(var r=[],o=0,i=t;o<i.length;o++){var a=i[o],u=a.extract(e,n);if(u.stype===ne.Value)return u;r.push(u)}return zo.consolidateArr(r)},n=function(){return"oneOf("+q(t,(function(t){return t.toString()})).join(", ")+")"};return{extract:e,toString:n}},ri=function(t,e){var n=function(e,n){return ei(Uo(t)).extract(e,n)},r=function(t,r){var o=ht(r),i=n(t,o);return ho.bind(i,(function(n){var o=q(n,(function(t){return po(t,t,ko(),e)}));return ti(o).extract(t,r)}))},o=function(){return"setOf("+e.toString()+")"};return{extract:r,toString:o}},oi=function(t,e){var n=ge(e),r=function(t,e){return n().extract(t,e)},o=function(){return n().toString()};return{extract:r,toString:o}},ii=b(ei,ti),ai=w(Wo),ui=function(t,e){return Uo((function(n){var r=typeof n;return t(n)?ho.svalue(n):ho.serror("Expected type: "+e+" but got: "+r)}))},ci=ui(g,"number"),si=ui(i,"string"),li=ui(s,"boolean"),fi=ui(m,"function"),di=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return di(t[e])}));default:return!1}},mi=Uo((function(t){return di(t)?ho.svalue(t):ho.serror("Expected value to be acceptable for sending via postMessage")})),gi=function(t,e,n,r){var o=Ot(n,r);return o.fold((function(){return Fo(t,n,r)}),(function(n){return n.extract(t.concat(["branch: "+r]),e)}))},hi=function(t,e){var n=function(n,r){var o=Ot(r,t);return o.fold((function(){return Ho(n,t)}),(function(t){return gi(n,r,e,t)}))},r=function(){return"chooseOn("+t+"). Possible values: "+ht(e)};return{extract:n,toString:r}},pi=function(){return ei(Wo)},vi=function(t){return Uo((function(e){return t(e).fold(ho.serror,ho.svalue)}))},bi=function(t,e){return ri((function(e){return ho.fromResult(t(e))}),e)},yi=function(t,e,n){var r=e.extract([t],n);return ho.mapError(r,(function(t){return{input:n,errors:t}}))},wi=function(t,e,n){return ho.toResult(yi(t,e,n))},xi=function(t){return t.fold((function(t){throw new Error(Si(t))}),x)},Ci=function(t,e,n){return xi(wi(t,e,n))},Si=function(t){return"Errors: \n"+Po(t.errors).join("\n")+"\n\nInput object: "+Bo(t.input)},ki=function(t,e){return hi(t,bt(e,ti))},Ti=function(t,e){return oi(t,e)},Oi=po,_i=vo,Ei=function(t){return vi((function(e){return j(t,e)?ro.value(e):ro.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')}))},Ai=function(t){return Oi(t,t,ko(),ai())},Di=function(t,e){return Oi(t,t,ko(),e)},Mi=function(t){return Di(t,ci)},Ni=function(t){return Di(t,si)},Ri=function(t,e){return Oi(t,t,ko(),Ei(e))},zi=function(t){return Di(t,li)},Bi=function(t){return Di(t,fi)},Pi=function(t,e){return Oi(t,t,_o(),Uo((function(n){return ho.serror("The field: "+t+" is forbidden. "+e)})))},Ii=function(t,e){return Oi(t,t,ko(),ti(e))},Li=function(t,e){return Oi(t,t,ko(),ii(e))},Hi=function(t,e){return Oi(t,t,ko(),ei(e))},Fi=function(t){return Oi(t,t,_o(),ai())},Vi=function(t,e){return Oi(t,t,_o(),e)},ji=function(t){return Vi(t,ci)},Ui=function(t){return Vi(t,si)},Wi=function(t){return Vi(t,fi)},$i=function(t,e){return Vi(t,ei(e))},qi=function(t,e){return Vi(t,ti(e))},Gi=function(t,e){return Vi(t,Qo(e))},Ki=function(t,e){return Oi(t,t,Oo(e),ai())},Xi=function(t,e,n){return Oi(t,t,Oo(e),n)},Yi=function(t,e){return Xi(t,e,ci)},Ji=function(t,e){return Xi(t,e,si)},Zi=function(t,e,n){return Xi(t,e,Ei(n))},Qi=function(t,e){return Xi(t,e,li)},ta=function(t,e){return Xi(t,e,fi)},ea=function(t,e){return Xi(t,e,mi)},na=function(t,e,n){return Xi(t,e,ei(n))},ra=function(t,e,n){return Xi(t,e,ti(n))},oa=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},ia=function(t){if(!u(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return G(t,(function(r,o){var i=ht(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],c=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(c))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+i);var u=function(t){var r=ht(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=ot(e,(function(t){return j(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:u,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n},aa={generate:ia};aa.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ua,ca=function(t){var e=[],n=[];return G(t,(function(t){t.fold((function(t){e.push(t)}),(function(t){n.push(t)}))})),{errors:e,values:n}},sa=function(t,e){var n={};return vt(t,(function(t,r){j(e,r)||(n[r]=t)})),n},la=function(t,e){var n;return n={},n[t]=e,n},fa=function(t){var e={};return G(t,(function(t){e[t.key]=t.value})),e},da=function(t,e){return sa(t,e)},ma=function(t,e){return la(t,e)},ga=function(t){return fa(t)},ha=function(t,e){return 0===t.length?ro.value(e):ro.value(Co(e,So.apply(void 0,t)))},pa=function(t){return ro.error(nt(t))},va=function(t,e){var n=ca(t);return n.errors.length>0?pa(n.errors):ha(n.values,e)},ba=function(t){return m(t)?t:O},ya=function(t,e,n){var r=t.dom,o=ba(n);while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return P.none()},wa=function(t,e,n){var r=e(t),o=ba(n);return r.orThunk((function(){return o(t)?P.none():ya(t,e,o)}))},xa=function(t,e){return sn(t.element,e.event.target)},Ca={can:_,abort:O,run:p},Sa=function(t){if(!Et(t,"can")&&!Et(t,"abort")&&!Et(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return A(A({},Ca),t)},ka=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Z(t,(function(t,r){return t&&e(r).apply(void 0,n)}),!0)}},Ta=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Z(t,(function(t,r){return t||e(r).apply(void 0,n)}),!1)}},Oa=function(t){return m(t)?{can:_,abort:O,run:t}:t},_a=function(t){var e=ka(t,(function(t){return t.can})),n=Ta(t,(function(t){return t.abort})),r=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];G(t,(function(t){t.run.apply(void 0,e)}))};return{can:e,abort:n,run:r}},Ea=w,Aa=Ea("touchstart"),Da=Ea("touchmove"),Ma=Ea("touchend"),Na=Ea("touchcancel"),Ra=Ea("mousedown"),za=Ea("mousemove"),Ba=Ea("mouseout"),Pa=Ea("mouseup"),Ia=Ea("mouseover"),La=Ea("focusin"),Ha=Ea("focusout"),Fa=Ea("keydown"),Va=Ea("keyup"),ja=Ea("input"),Ua=Ea("change"),Wa=Ea("click"),$a=Ea("transitioncancel"),qa=Ea("transitionend"),Ga=Ea("transitionstart"),Ka=Ea("selectstart"),Xa=function(t){return w("alloy."+t)},Ya={tap:Xa("tap")},Ja=Xa("focus"),Za=Xa("blur.post"),Qa=Xa("paste.post"),tu=Xa("receive"),eu=Xa("execute"),nu=Xa("focus.item"),ru=Ya.tap,ou=Xa("longpress"),iu=Xa("sandbox.close"),au=Xa("typeahead.cancel"),uu=Xa("system.init"),cu=Xa("system.touchmove"),su=Xa("system.touchend"),lu=Xa("system.scroll"),fu=Xa("system.resize"),du=Xa("system.attached"),mu=Xa("system.detached"),gu=Xa("system.dismissRequested"),hu=Xa("system.repositionRequested"),pu=Xa("focusmanager.shifted"),vu=Xa("slotcontainer.visibility"),bu=Xa("change.tab"),yu=Xa("dismiss.tab"),wu=Xa("highlight"),xu=Xa("dehighlight"),Cu=function(t,e){Ou(t,t.element,e,{})},Su=function(t,e,n){Ou(t,t.element,e,n)},ku=function(t){Cu(t,eu())},Tu=function(t,e,n){Ou(t,e,n,{})},Ou=function(t,e,n,r){var o=A({target:e},r);t.getSystem().triggerEvent(n,e,o)},_u=function(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event)},Eu=function(t){return ga(t)},Au=function(t,e){return{key:t,value:Sa({abort:e})}},Du=function(t,e){return{key:t,value:Sa({can:e})}},Mu=function(t){return{key:t,value:Sa({run:function(t,e){e.event.prevent()}})}},Nu=function(t,e){return{key:t,value:Sa({run:e})}},Ru=function(t,e,n){return{key:t,value:Sa({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}},zu=function(t){return function(e){return Nu(t,e)}},Bu=function(t){return function(e){return{key:t,value:Sa({run:function(t,n){xa(t,n)&&e(t,n)}})}}},Pu=function(t,e){return Nu(t,(function(n,r){n.getSystem().getByUid(e).each((function(e){_u(e,e.element,t,r)}))}))},Iu=function(t,e,n){var r=e.partUids[n];return Pu(t,r)},Lu=function(t,e){return Nu(t,(function(t,n){var r=n.event,o=t.getSystem().getByDom(r.target).getOrThunk((function(){var e=wa(r.target,(function(e){return t.getSystem().getByDom(e).toOptional()}),O);return e.getOr(t)}));e(t,o,n)}))},Hu=function(t){return Nu(t,(function(t,e){e.cut()}))},Fu=function(t){return Nu(t,(function(t,e){e.stop()}))},Vu=function(t,e){return Bu(t)(e)},ju=Bu(du()),Uu=Bu(mu()),Wu=Bu(uu()),$u=zu(eu()),qu=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,xn(ee.fromDom(r))},Gu=function(t){return t.dom.innerHTML},Ku=function(t,e){var n=mn(t),r=n.dom,o=ee.fromDom(r.createDocumentFragment()),i=qu(e,r);Rr(o,i),zr(t),Dr(t,o)},Xu=function(t){var e=ee.fromTag("div"),n=ee.fromDom(t.dom.cloneNode(!0));return Dr(e,n),Gu(e)},Yu=function(t,e){return ee.fromDom(t.dom.cloneNode(e))},Ju=function(t){return Yu(t,!1)},Zu=function(t){if(On(t))return"#shadow-root";var e=Ju(t);return Xu(e)},Qu=function(t){return Zu(t)},tc=function(t,e,n){return sn(e,t.element)&&!sn(e,n)},ec=Eu([Du(Ja(),(function(t,e){var n=e.event,r=n.originator,o=n.target;return!tc(t,r,o)||(console.warn(Ja()+" did not get interpreted by the desired target. \nOriginator: "+Qu(r)+"\nTarget: "+Qu(o)+"\nCheck the "+Ja()+" event handlers"),!1)}))]),nc=Object.freeze({__proto__:null,events:ec}),rc=0,oc=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return rc++,t+"_"+r+rc+String(n)},ic=w("alloy-id-"),ac=w("data-alloy-id"),uc=ic(),cc=ac(),sc=function(t,e){var n=oc(uc+t);return lc(e,n),n},lc=function(t,e){Object.defineProperty(t.dom,cc,{value:e,writable:!0})},fc=function(t){var e=le(t)?t.dom[cc]:null;return P.from(e)},dc=function(t){return oc(t)},mc=x,gc=function(t){var e=function(e){return"The component must be in a context to execute: "+e+(t?"\n"+Qu(t().element)+" is not in context.":"")},n=function(t){return function(){throw new Error(e(t))}},r=function(t){return function(){console.warn(e(t))}};return{debugInfo:w("fake"),triggerEvent:r("triggerEvent"),triggerFocus:r("triggerFocus"),triggerEscape:r("triggerEscape"),broadcast:r("broadcast"),broadcastOn:r("broadcastOn"),broadcastEvent:r("broadcastEvent"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),isConnected:O}},hc=gc(),pc=function(t,e,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:vc(a.slice(0,1).concat(a.slice(3)))}},t},vc=function(t){return q(t,(function(t){return Wt(t,"/*")?t.substring(0,t.length-"/*".length):t}))},bc=function(t,e){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:vc(i)}},t},yc=function(t,e){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:vc(i.slice(1))}},t},wc=oc("alloy-premade"),xc=function(t){return ma(wc,t)},Cc=function(t){return Ot(t,wc)},Sc=function(t){return yc((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,M([e.getApis(),e],n,!1))}),t)},kc={init:function(){return Tc({readState:w("No State required")})}},Tc=function(t){return t},Oc=function(t,e){var n=q(e,(function(t){return qi(t.name(),[Ai("config"),Ki("state",kc)])})),r=wi("component.behaviours",ti(n),t.behaviours).fold((function(e){throw new Error(Si(e)+"\nComplete spec:\n"+JSON.stringify(t,null,2))}),x);return{list:e,data:bt(r,(function(t){var e=t.map((function(t){return{config:t.config,state:t.state.init(t.config)}}));return w(e)}))}},_c=function(t){return t.list},Ec=function(t){return t.data},Ac=function(t,e){var n={};return vt(t,(function(t,r){vt(t,(function(t,o){var i=Ot(n,o).getOr([]);n[o]=i.concat([e(r,t)])}))})),n},Dc=function(t){return{classes:l(t.classes)?[]:t.classes,attributes:l(t.attributes)?{}:t.attributes,styles:l(t.styles)?{}:t.styles}},Mc=function(t,e){return A(A({},t),{attributes:A(A({},t.attributes),e.attributes),styles:A(A({},t.styles),e.styles),classes:t.classes.concat(e.classes)})},Nc=function(t,e,n,r){var o=A({},e);G(n,(function(e){o[e.name()]=e.exhibit(t,r)}));var i=Ac(o,(function(t,e){return{name:t,modification:e}})),a=function(t){return J(t,(function(t,e){return A(A({},e.modification),t)}),{})},u=J(i.classes,(function(t,e){return e.modification.concat(t)}),[]),c=a(i.attributes),s=a(i.styles);return Dc({classes:u,attributes:c,styles:s})},Rc=function(t,e,n,r){try{var o=st(n,(function(n,o){var i=n[e],a=o[e],u=r.indexOf(i),c=r.indexOf(a);if(-1===u)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===c)throw new Error("The ordering for "+t+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(r,null,2));return u<c?-1:c<u?1:0}));return ro.value(o)}catch(i){return ro.error([i])}},zc=function(t,e){return{handler:t,purpose:e}},Bc=function(t,e){return{cHandler:t,purpose:e}},Pc=function(t,e){return Bc(S.apply(void 0,[t.handler].concat(e)),t.purpose)},Ic=function(t){return t.cHandler},Lc=function(t,e){return{name:t,handler:e}},Hc=function(t,e){var n={};return G(t,(function(t){n[t.name()]=t.handlers(e)})),n},Fc=function(t,e,n){var r=A(A({},n),Hc(e,t));return Ac(r,Lc)},Vc=function(t,e,n,r){var o=Fc(t,n,r);return $c(o,e)},jc=function(t){var e=Oa(t);return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[t,n].concat(r);e.abort.apply(void 0,i)?n.stop():e.can.apply(void 0,i)&&e.run.apply(void 0,i)}},Uc=function(t,e){return ro.error(["The event ("+t+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(q(e,(function(t){return t.name})),null,2)])},Wc=function(t,e,n){var r=e[n];return r?Rc("Event: "+n,"name",t,r).map((function(t){var e=q(t,(function(t){return t.handler}));return _a(e)})):Uc(n,t)},$c=function(t,e){var n=St(t,(function(t,n){var r=1===t.length?ro.value(t[0].handler):Wc(t,e,n);return r.map((function(r){var o=jc(r),i=t.length>1?Y(e[n],(function(e){return U(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return ma(n,zc(o,i))}))}));return va(n,{})},qc="alloy.base.behaviour",Gc=ti([Oi("dom","dom",ko(),ti([Ai("tag"),Ki("styles",{}),Ki("classes",[]),Ki("attributes",{}),Fi("value"),Fi("innerHtml")])),Ai("components"),Ai("uid"),Ki("events",{}),Ki("apis",{}),Oi("eventOrder","eventOrder",Ao((ua={},ua[eu()]=["disabling",qc,"toggling","typeaheadevents"],ua[Ja()]=[qc,"focusing","keying"],ua[uu()]=[qc,"disabling","toggling","representing"],ua[ja()]=[qc,"representing","streaming","invalidating"],ua[mu()]=[qc,"representing","item-events","tooltipping"],ua[Ra()]=["focusing",qc,"item-type-events"],ua[Aa()]=["focusing",qc,"item-type-events"],ua[Ia()]=["item-type-events","tooltipping"],ua[tu()]=["receiving","reflecting","tooltipping"],ua)),ai()),Fi("domModification")]),Kc=function(t){return wi("custom.definition",Gc,t)},Xc=function(t){return A(A({},t.dom),{uid:t.uid,domChildren:q(t.components,(function(t){return t.element}))})},Yc=function(t){return t.domModification.fold((function(){return Dc({})}),Dc)},Jc=function(t){return t.events},Zc=function(t,e){var n=jn(t,e);return void 0===n||""===n?[]:n.split(" ")},Qc=function(t,e,n){var r=Zc(t,e),o=r.concat([n]);return Fn(t,e,o.join(" ")),!0},ts=function(t,e,n){var r=Y(Zc(t,e),(function(t){return t!==n}));return r.length>0?Fn(t,e,r.join(" ")):$n(t,e),!1},es=function(t){return void 0!==t.dom.classList},ns=function(t){return Zc(t,"class")},rs=function(t,e){return Qc(t,"class",e)},os=function(t,e){return ts(t,"class",e)},is=function(t,e){es(t)?t.dom.classList.add(e):rs(t,e)},as=function(t){var e=es(t)?t.dom.classList:ns(t);0===e.length&&$n(t,"class")},us=function(t,e){if(es(t)){var n=t.dom.classList;n.remove(e)}else os(t,e);as(t)},cs=function(t,e){return es(t)&&t.dom.classList.contains(e)},ss=function(t,e){G(e,(function(e){is(t,e)}))},ls=function(t,e){G(e,(function(e){us(t,e)}))},fs=function(t,e){return ot(e,(function(e){return cs(t,e)}))},ds=function(t){return t.dom.value},ms=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e},gs=function(t){var e=ee.fromTag(t.tag);Vn(e,t.attributes),ss(e,t.classes),Xn(e,t.styles),t.innerHtml.each((function(t){return Ku(e,t)}));var n=t.domChildren;return Rr(e,n),t.value.each((function(t){ms(e,t)})),t.uid,lc(e,t.uid),e},hs=function(t){var e=Ot(t,"behaviours").getOr({});return rt(ht(e),(function(t){var n=e[t];return d(n)?[n.me]:[]}))},ps=function(t,e){return Oc(t,e)},vs=function(t){var e=hs(t);return ps(t,e)},bs=function(t,e,n){var r=Xc(t),o=Yc(t),i={"alloy.base.modification":o},a=e.length>0?Nc(n,i,e,r):o;return Mc(r,a)},ys=function(t,e,n){var r={"alloy.base.behaviour":Jc(t)};return Vc(n,t.eventOrder,e,r).getOrDie()},ws=function(t){var e=function(){return y},n=oa(hc),r=xi(Kc(t)),o=vs(t),i=_c(o),a=Ec(o),u=bs(r,i,a),c=gs(u),s=ys(r,i,a),l=oa(r.components),f=function(t){n.set(t)},d=function(){n.set(gc(e))},g=function(){var t=xn(c),e=rt(t,(function(t){return n.get().getByDom(t).fold((function(){return[]}),ct)}));l.set(e)},h=function(e){var n=a,r=m(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))};return r()},p=function(t){return m(a[t.name()])},v=function(){return r.apis},b=function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},y={uid:t.uid,getSystem:n.get,config:h,hasConfigured:p,spec:t,readState:b,getApis:v,connect:f,disconnect:d,element:c,syncComponents:g,components:l.get,events:s};return y},xs=function(t){var e=Ot(t,"components").getOr([]);return q(e,_s)},Cs=function(t){var e=mc(t),n=e.events,r=D(e,["events"]),o=xs(r),i=A(A({},r),{events:A(A({},nc),n),components:o});return ro.value(ws(i))},Ss=function(t){var e=ee.fromText(t);return ks({element:e})},ks=function(t){var e=Ci("external.component",Qo([Ai("element"),Fi("uid")]),t),n=oa(gc()),r=function(t){n.set(t)},o=function(){n.set(gc((function(){return a})))},i=e.uid.getOrThunk((function(){return dc("external")}));lc(e.element,i);var a={uid:i,getSystem:n.get,config:P.none,hasConfigured:O,connect:r,disconnect:o,getApis:function(){return{}},element:e.element,spec:t,readState:w("No state"),syncComponents:p,components:w([]),events:{}};return xc(a)},Ts=dc,Os=function(t){return _t(t,"uid")},_s=function(t){return Cc(t).getOrThunk((function(){var e=Os(t)?t:A({uid:Ts("")},t);return Cs(e).getOrDie()}))},Es=xc;function As(t,e,n,r,o){return t(n,r)?P.some(n):m(o)&&o(n)?P.none():e(n,r,o)}var Ds,Ms=function(t,e,n){var r=t.dom,o=m(n)?n:O;while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r);if(e(i))return P.some(i);if(o(i))break}return P.none()},Ns=function(t,e,n){var r=function(t,e){return e(t)};return As(r,Ms,t,e,n)},Rs=function(t,e){var n=function(t){return e(ee.fromDom(t))},r=tt(t.dom.childNodes,n);return r.map(ee.fromDom)},zs=function(t,e){var n=function(t){for(var r=0;r<t.childNodes.length;r++){var o=ee.fromDom(t.childNodes[r]);if(e(o))return P.some(o);var i=n(t.childNodes[r]);if(i.isSome())return i}return P.none()};return n(t.dom)},Bs=function(t,e,n){return Ns(t,e,n).isSome()},Ps=function(t,e,n){return Ms(t,(function(t){return on(t,e)}),n)},Is=function(t,e){return Rs(t,(function(t){return on(t,e)}))},Ls=function(t,e){return cn(e,t)},Hs=function(t,e,n){var r=function(t,e){return on(t,e)};return As(r,Ps,t,e,n)},Fs=function(t){var e=Ns(t,(function(t){if(!le(t))return!1;var e=jn(t,"id");return void 0!==e&&e.indexOf("aria-owns")>-1}));return e.bind((function(t){var e=jn(t,"id"),n=An(t);return Ls(n,'[aria-owns="'+e+'"]')}))},Vs=function(){var t=oc("aria-owns"),e=function(e){Fn(e,"aria-owns",t)},n=function(t){$n(t,"aria-owns")};return{id:t,link:e,unlink:n}},js=function(t,e){return Fs(e).exists((function(e){return Us(t,e)}))},Us=function(t,e){return Bs(e,(function(e){return sn(e,t.element)}),O)||js(t,e)},Ws="unknown";(function(t){t[t["STOP"]=0]="STOP",t[t["NORMAL"]=1]="NORMAL",t[t["LOGGING"]=2]="LOGGING"})(Ds||(Ds={}));var $s=oa({}),qs=function(t,e){var n=[],r=(new Date).getTime();return{logEventCut:function(t,e,r){n.push({outcome:"cut",target:e,purpose:r})},logEventStopped:function(t,e,r){n.push({outcome:"stopped",target:e,purpose:r})},logNoParent:function(t,e,r){n.push({outcome:"no-parent",target:e,purpose:r})},logEventNoHandlers:function(t,e){n.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,r){n.push({outcome:"response",purpose:r,target:e})},write:function(){var o=(new Date).getTime();j(["mousemove","mouseover","mouseout",uu()],t)||console.log(t,{event:t,time:o-r,target:e.dom,sequence:q(n,(function(t){return j(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Qu(t.target)+")":t.outcome}))})}}},Gs=function(t,e,n){var r=Ot($s.get(),t).orThunk((function(){var e=ht($s.get());return gt(e,(function(e){return t.indexOf(e)>-1?P.some($s.get()[e]):P.none()}))})).getOr(Ds.NORMAL);switch(r){case Ds.NORMAL:return n(Zs());case Ds.LOGGING:var o=qs(t,e),i=n(o);return o.write(),i;case Ds.STOP:return!0}},Ks=["alloy/data/Fields","alloy/debugging/Debugging"],Xs=function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");return tt(e,(function(t){return t.indexOf("alloy")>0&&!U(Ks,(function(e){return t.indexOf(e)>-1}))})).getOr(Ws)}return Ws},Ys={logEventCut:p,logEventStopped:p,logNoParent:p,logEventNoHandlers:p,logEventResponse:p,write:p},Js=function(t,e,n){return Gs(t,e,n)},Zs=w(Ys),Qs=w([Ai("menu"),Ai("selectedMenu")]),tl=w([Ai("item"),Ai("selectedItem")]);w(ti(tl().concat(Qs())));var el=w(ti(tl())),nl=Ii("initSize",[Ai("numColumns"),Ai("numRows")]),rl=function(){return Di("markers",el())},ol=function(){return Ii("markers",[Ai("backgroundMenu")].concat(Qs()).concat(tl()))},il=function(t){return Ii("markers",q(t,Ai))},al=function(t,e,n){return Xs(),Oi(e,e,n,vi((function(t){return ro.value((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)}))})))},ul=function(t){return al("onHandler",t,Oo(p))},cl=function(t){return al("onKeyboardHandler",t,Oo(P.none))},sl=function(t){return al("onHandler",t,ko())},ll=function(t){return al("onKeyboardHandler",t,ko())},fl=function(t,e){return _i(t,w(e))},dl=function(t){return _i(t,x)},ml=w(nl),gl=function(t,e,n,r,o,i,a,u){return void 0===u&&(u=!1),{x:t,y:e,bubble:n,direction:r,placement:o,restriction:i,label:a+"-"+o,alwaysFit:u}},hl=aa.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),pl=function(t,e,n,r,o,i,a,u,c){return t.fold(e,n,r,o,i,a,u,c)},vl=function(t,e,n,r){return t.fold(e,e,r,r,e,r,n,n)},bl=function(t,e,n,r){return t.fold(e,r,e,r,n,n,e,r)},yl=hl.southeast,wl=hl.southwest,xl=hl.northeast,Cl=hl.northwest,Sl=hl.south,kl=hl.north,Tl=hl.east,Ol=hl.west,_l=function(t,e,n,r){var o=t+e;return o>r?n:o<n?r:o},El=function(t,e,n){return Math.min(Math.max(t,e),n)},Al=function(t,e){switch(e){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}},Dl=function(t,e){return ut(["left","right","top","bottom"],(function(n){return Ot(e,n).map((function(e){return Al(t,e)}))}))},Ml=function(t,e,n){var r=function(r,o){return e[r].map((function(e){var i="top"===r||"bottom"===r,a=i?n.top:n.left,u="left"===r||"top"===r?Math.max:Math.min,c=u(e,o)+a;return i?El(c,t.y,t.bottom):El(c,t.x,t.right)})).getOr(o)},o=r("left",t.x),i=r("top",t.y),a=r("right",t.right),u=r("bottom",t.bottom);return Yr(o,i,a-o,u-i)},Nl="layout",Rl=function(t){return t.x},zl=function(t,e){return t.x+t.width/2-e.width/2},Bl=function(t,e){return t.x+t.width-e.width},Pl=function(t,e){return t.y-e.height},Il=function(t){return t.y+t.height},Ll=function(t,e){return t.y+t.height/2-e.height/2},Hl=function(t){return t.x+t.width},Fl=function(t,e){return t.x-e.width},Vl=function(t,e,n){return gl(Rl(t),Il(t),n.southeast(),yl(),"southeast",Dl(t,{left:1,top:3}),Nl)},jl=function(t,e,n){return gl(Bl(t,e),Il(t),n.southwest(),wl(),"southwest",Dl(t,{right:0,top:3}),Nl)},Ul=function(t,e,n){return gl(Rl(t),Pl(t,e),n.northeast(),xl(),"northeast",Dl(t,{left:1,bottom:2}),Nl)},Wl=function(t,e,n){return gl(Bl(t,e),Pl(t,e),n.northwest(),Cl(),"northwest",Dl(t,{right:0,bottom:2}),Nl)},$l=function(t,e,n){return gl(zl(t,e),Pl(t,e),n.north(),kl(),"north",Dl(t,{bottom:2}),Nl)},ql=function(t,e,n){return gl(zl(t,e),Il(t),n.south(),Sl(),"south",Dl(t,{top:3}),Nl)},Gl=function(t,e,n){return gl(Hl(t),Ll(t,e),n.east(),Tl(),"east",Dl(t,{left:0}),Nl)},Kl=function(t,e,n){return gl(Fl(t,e),Ll(t,e),n.west(),Ol(),"west",Dl(t,{right:1}),Nl)},Xl=function(){return[Vl,jl,Ul,Wl,ql,$l,Gl,Kl]},Yl=function(){return[jl,Vl,Wl,Ul,ql,$l,Gl,Kl]},Jl=function(){return[Ul,Wl,Vl,jl,$l,ql]},Zl=function(){return[Wl,Ul,jl,Vl,$l,ql]},Ql=function(){return[Vl,jl,Ul,Wl,ql,$l]},tf=function(){return[jl,Vl,Wl,Ul,ql,$l]},ef=function(t,e){return e.universal?t:Y(t,(function(t){return j(e.channels,t)}))},nf=function(t){return Eu([Nu(tu(),(function(e,n){var r=t.channels,o=ht(r),i=n,a=ef(o,i);G(a,(function(t){var n=r[t],o=n.schema,a=Ci("channel["+t+"] data\nReceiver: "+Qu(e.element),o,i.data);n.onReceive(e,a)}))}))])},rf=Object.freeze({__proto__:null,events:nf}),of=[Di("channels",bi(ro.value,Qo([sl("onReceive"),Ki("schema",ai())])))],af=function(t,e,n){return $u((function(r){n(r,t,e)}))},uf=function(t,e,n){return Wu((function(r,o){n(r,t,e)}))},cf=function(t,e,n,r,o,i){var a=Qo(t),u=qi(e,[Gi("config",t)]);return df(a,u,e,n,r,o,i)},sf=function(t,e,n,r,o,i){var a=t,u=qi(e,[Vi("config",t)]);return df(a,u,e,n,r,o,i)},lf=function(t,e,n){var r=function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var a=[r].concat(o);return r.config({name:w(t)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+t+". Using API: "+n)}),(function(t){var n=Array.prototype.slice.call(a,1);return e.apply(void 0,[r,t.config,t.state].concat(n))}))};return pc(r,n,e)},ff=function(t){return{key:t,value:void 0}},df=function(t,e,n,r,o,i,a){var u=function(t){return Et(t,n)?t[n]():P.none()},c=bt(o,(function(t,e){return lf(n,t,e)})),s=bt(i,(function(t,e){return bc(t,e)})),l=A(A(A({},s),c),{revoke:S(ff,n),config:function(e){var r=Ci(n+"-config",t,e);return{key:n,value:{config:r,me:l,configAsRaw:ge((function(){return Ci(n+"-config",t,e)})),initialConfig:e,state:a}}},schema:w(e),exhibit:function(t,e){return Rt(u(t),Ot(r,"exhibit"),(function(t,n){return n(e,t.config,t.state)})).getOrThunk((function(){return Dc({})}))},name:w(n),handlers:function(t){return u(t).map((function(t){var e=Ot(r,"events").getOr((function(){return{}}));return e(t.config,t.state)})).getOr({})}});return l},mf=function(t){return ga(t)},gf=Qo([Ai("fields"),Ai("name"),Ki("active",{}),Ki("apis",{}),Ki("state",kc),Ki("extra",{})]),hf=function(t){var e=Ci("Creating behaviour: "+t.name,gf,t);return cf(e.fields,e.name,e.active,e.apis,e.extra,e.state)},pf=Qo([Ai("branchKey"),Ai("branches"),Ai("name"),Ki("active",{}),Ki("apis",{}),Ki("state",kc),Ki("extra",{})]),vf=function(t){var e=Ci("Creating behaviour: "+t.name,pf,t);return sf(ki(e.branchKey,e.branches),e.name,e.active,e.apis,e.extra,e.state)},bf=w(void 0),yf=hf({fields:of,name:"receiving",active:rf}),wf=function(t,e){return Dc({classes:[],styles:e.useFixed()?{}:{position:"relative"}})},xf=Object.freeze({__proto__:null,exhibit:wf}),Cf=function(){return ee.fromDom(document)},Sf=function(t){return t.dom.focus()},kf=function(t){return t.dom.blur()},Tf=function(t){var e=An(t).dom;return t.dom===e.activeElement},Of=function(t){return void 0===t&&(t=Cf()),P.from(t.dom.activeElement).map(ee.fromDom)},_f=function(t){return Of(An(t)).filter((function(e){return t.dom.contains(e.dom)}))},Ef=function(t,e){var n=An(e),r=Of(n).bind((function(t){var n=function(e){return sn(t,e)};return n(e)?P.some(e):zs(e,n)})),o=t(e);return r.each((function(t){Of(n).filter((function(e){return sn(e,t)})).fold((function(){Sf(t)}),p)})),o},Af=function(t,e,n,r,o){var i=function(t){return t+"px"};return{position:t,left:e.map(i),top:n.map(i),right:r.map(i),bottom:o.map(i)}},Df=function(t){return A(A({},t),{position:P.some(t.position)})},Mf=function(t,e){Yn(t,Df(e))},Nf=aa.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Rf=function(t,e,n,r,o,i){var a=e.rect,u=a.x-n,c=a.y-r,s=a.width,l=a.height,f=o-(u+s),d=i-(c+l),m=P.some(u),g=P.some(c),h=P.some(f),p=P.some(d),v=P.none();return pl(e.direction,(function(){return Af(t,m,g,v,v)}),(function(){return Af(t,v,g,h,v)}),(function(){return Af(t,m,v,v,p)}),(function(){return Af(t,v,v,h,p)}),(function(){return Af(t,m,g,v,v)}),(function(){return Af(t,m,v,v,p)}),(function(){return Af(t,m,g,v,v)}),(function(){return Af(t,v,g,h,v)}))},zf=function(t,e){return t.fold((function(){var t=e.rect;return Af("absolute",P.some(t.x),P.some(t.y),P.none(),P.none())}),(function(t,n,r,o){return Rf("absolute",e,t,n,r,o)}),(function(t,n,r,o){return Rf("fixed",e,t,n,r,o)}))},Bf=function(t,e){var n=S(Gr,e),r=t.fold(n,n,(function(){var t=Ir();return Gr(e).translate(-t.left,-t.top)})),o=br(e),i=ur(e);return Yr(r.left,r.top,o,i)},Pf=function(t,e){return e.fold((function(){return t.fold(Qr,Qr,Yr)}),(function(e){return t.fold(e,e,(function(){var n=e(),r=If(t,n.x,n.y);return Yr(r.left,r.top,n.width,n.height)}))}))},If=function(t,e,n){var r=lr(e,n),o=function(){var t=Ir();return r.translate(-t.left,-t.top)};return t.fold(w(r),w(r),o)},Lf=function(t,e,n,r){return t.fold(e,n,r)};Nf.none;var Hf,Ff=Nf.relative,Vf=Nf.fixed,jf=function(t,e){return{anchorBox:t,origin:e}},Uf=function(t,e){return jf(t,e)},Wf="data-alloy-placement",$f=function(t,e){Fn(t,Wf,e)},qf=function(t){return Un(t,Wf)},Gf=function(t){return $n(t,Wf)},Kf=aa.generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Xf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,a=t.x,u=t.y,c=t.right,s=t.bottom,l=t.width,f=t.height,d=a>=n&&a<=o,m=u>=r&&u<=i,g=d&&m,h=c<=o&&c>=n,p=s<=i&&s>=r,v=h&&p,b=Math.min(l,a>=n?o-a:c-n),y=Math.min(f,u>=r?i-u:s-r);return{originInBounds:g,sizeInBounds:v,visibleW:b,visibleH:y}},Yf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,a=t.x,u=t.y,c=t.width,s=t.height,l=Math.max(n,o-c),f=Math.max(r,i-s),d=El(a,n,l),m=El(u,r,f),g=Math.min(d+c,o)-d,h=Math.min(m+s,i)-m;return Yr(d,m,g,h)},Jf=function(t,e,n){var r=w(e.bottom-n.y),o=w(n.bottom-e.y),i=vl(t,o,o,r),a=w(e.right-n.x),u=w(n.right-e.x),c=bl(t,u,u,a);return{maxWidth:c,maxHeight:i}},Zf=function(t,e,n,r){var o=t.bubble,i=o.offset,a=Ml(r,t.restriction,i),u=t.x+i.left,c=t.y+i.top,s=Yr(u,c,e,n),l=Xf(s,a),f=l.originInBounds,d=l.sizeInBounds,m=l.visibleW,g=l.visibleH,h=f&&d,p=h?s:Yf(s,a),v=p.width>0&&p.height>0,b=Jf(t.direction,p,r),y=b.maxWidth,w=b.maxHeight,x={rect:p,maxHeight:w,maxWidth:y,direction:t.direction,placement:t.placement,classes:{on:o.classesOn,off:o.classesOff},layout:t.label,testY:c};return h||t.alwaysFit?Kf.fit(x):Kf.nofit(x,m,g,v)},Qf=function(t,e,n,r,o,i){var a=r.width,u=r.height,c=function(e,c,s,l,f){var d=e(n,r,o,t,i),m=Zf(d,a,u,i);return m.fold(w(m),(function(t,e,n,r){var o=f===r?n>l||e>s:!f&&r;return o?m:Kf.nofit(c,s,l,f)}))},s=Z(e,(function(t,e){var n=S(c,e);return t.fold(w(t),n)}),Kf.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:yl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1));return s.fold(x,x)},td=function(t){var e=oa(P.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(P.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},a=function(t){n(),e.set(P.some(t))};return{clear:r,isSet:o,get:i,set:a}},ed=function(){return td((function(t){return t.destroy()}))},nd=function(){return td((function(t){return t.unbind()}))},rd=function(){var t=ed(),e=function(e){return t.get().each(e)};return A(A({},t),{run:e})},od=function(){var t=td(p),e=function(e){return t.get().each(e)};return A(A({},t),{on:e})},id=_,ad=function(t,e,n){return kr(t,e,id,n)},ud=function(t,e,n){return Tr(t,e,id,n)},cd=xr,sd=["top","bottom","right","left"],ld="data-alloy-transition-timer",fd=function(t,e){return fs(t,e.classes)},dd=function(t,e,n){return n.exists((function(n){var r=t.mode;return"all"===r||n[r]!==e[r]}))},md=function(t,e){var n=function(t){return parseFloat(t).toFixed(3)};return kt(e,(function(e,r){var o=t[r].map(n),i=e.map(n);return!Dt(o,i)})).isSome()},gd=function(t){var e=function(e){var n=Jn(t,e),r=i(n)?n.split(/\s*,\s*/):[];return Y(r,Gt)},n=function(t){if(i(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return Wt(t,"ms")?e:1e3*e}return 0},r=e("transition-delay"),o=e("transition-duration");return Z(o,(function(t,e,o){var i=n(r[o])+n(e);return Math.max(t,i)}),0)},hd=function(t,e){var n,r=nd(),o=nd(),i=function(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return sn(e.target,t)&&Kt(r)&&j(sd,e.raw.propertyName)},a=function(a){if(f(a)||i(a)){r.clear(),o.clear();var u=null===a||void 0===a?void 0:a.raw.type;(f(u)||u===qa())&&(clearTimeout(n),$n(t,ld),ls(t,e.classes))}},u=function(){r.set(ad(t,qa(),a)),o.set(ad(t,$a(),a))};if("ontransitionstart"in t.dom)var c=ad(t,Ga(),(function(t){i(t)&&(c.unbind(),u())}));else u();var s=gd(t);requestAnimationFrame((function(){n=setTimeout(a,s+17),Fn(t,ld,n)}))},pd=function(t,e){ss(t,e.classes),Un(t,ld).each((function(e){clearTimeout(parseInt(e,10)),$n(t,ld)})),hd(t,e)},vd=function(t,e,n,r,o,i){var a=dd(r,o,i);if(a||fd(t,r)){Kn(t,"position",n.position);var u=Bf(e,t),c=zf(e,A(A({},o),{rect:u})),s=ut(sd,(function(t){return c[t]}));md(n,s)&&(Yn(t,s),a&&pd(t,r),rr(t))}else ls(t,r.classes)},bd=function(t){return{width:br(t),height:ur(t)}},yd=function(t,e,n,r){nr(e,"max-height"),nr(e,"max-width");var o=bd(e);return Qf(e,r.preference,t,o,n,r.bounds)},wd=function(t,e){var n=e.classes;ls(t,n.off),ss(t,n.on)},xd=function(t,e,n){var r=n.maxHeightFunction;r(t,e.maxHeight)},Cd=function(t,e,n){var r=n.maxWidthFunction;r(t,e.maxWidth)},Sd=function(t,e,n){var r=zf(n.origin,e);n.transition.each((function(o){vd(t,n.origin,r,o,e,n.lastPlacement)})),Mf(t,r)},kd=function(t,e){$f(t,e.placement)},Td=function(t,e){cr(t,Math.floor(e))},Od=w((function(t,e){Td(t,e),Xn(t,{"overflow-x":"hidden","overflow-y":"auto"})})),_d=w((function(t,e){Td(t,e)})),Ed=function(t,e,n){return void 0===t[e]?n:t[e]},Ad=function(t,e,n,r,o,i,a,u){var c=Ed(a,"maxHeightFunction",Od()),s=Ed(a,"maxWidthFunction",p),l=t.anchorBox,f=t.origin,d={bounds:Pf(f,i),origin:f,preference:r,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:o,transition:u};return Dd(l,e,n,d)},Dd=function(t,e,n,r){var o=yd(t,e,n,r);return Sd(e,o,r),kd(e,o),wd(e,o),xd(e,o,r),Cd(e,o,r),{layout:o.layout,placement:o.placement}},Md=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Nd=function(t,e,n,r){void 0===r&&(r=1);var o=t*r,i=e*r,a=function(t){return Ot(n,t).getOr([])},u=function(t,e,n){var r=at(Md,n);return{offset:lr(t,e),classesOn:rt(n,a),classesOff:rt(r,a)}};return{southeast:function(){return u(-t,e,["top","alignLeft"])},southwest:function(){return u(t,e,["top","alignRight"])},south:function(){return u(-t/2,e,["top","alignCentre"])},northeast:function(){return u(-t,-e,["bottom","alignLeft"])},northwest:function(){return u(t,-e,["bottom","alignRight"])},north:function(){return u(-t/2,-e,["bottom","alignCentre"])},east:function(){return u(t,-e/2,["valignCentre","left"])},west:function(){return u(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return u(o,i,["top","alignLeft","inset"])},insetNorthwest:function(){return u(-o,i,["top","alignRight","inset"])},insetNorth:function(){return u(-o/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return u(o,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return u(-o,-i,["bottom","alignRight","inset"])},insetSouth:function(){return u(-o/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return u(-o,-i/2,["valignCentre","right","inset"])},insetWest:function(){return u(o,-i/2,["valignCentre","left","inset"])}}},Rd=function(){return Nd(0,0,{})},zd=x,Bd=function(t,e){return function(n){return"rtl"===Pd(n)?e:t}},Pd=function(t){return"rtl"===Jn(t,"direction")?"rtl":"ltr"};(function(t){t["TopToBottom"]="toptobottom",t["BottomToTop"]="bottomtotop"})(Hf||(Hf={}));var Id="data-alloy-vertical-dir",Ld=function(t){return Bs(t,(function(t){return le(t)&&jn(t,"data-alloy-vertical-dir")===Hf.BottomToTop}))},Hd=function(){return qi("layouts",[Ai("onLtr"),Ai("onRtl"),Fi("onBottomLtr"),Fi("onBottomRtl")])},Fd=function(t,e,n,r,o,i,a){var u=a.map(Ld).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)})),l=u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),f=u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r),d=Bd(l,f);return d(t)},Vd=function(t,e,n){var r=e.hotspot,o=Bf(n,r.element),i=Fd(t.element,e,Ql(),tf(),Jl(),Zl(),P.some(e.hotspot.element));return P.some(zd({anchorBox:o,bubble:e.bubble.getOr(Rd()),overrides:e.overrides,layouts:i,placer:P.none()}))},jd=[Ai("hotspot"),Fi("bubble"),Ki("overrides",{}),Hd(),fl("placement",Vd)],Ud=function(t,e,n){var r=If(n,e.x,e.y),o=Yr(r.left,r.top,e.width,e.height),i=Fd(t.element,e,Xl(),Yl(),Xl(),Yl(),P.none());return P.some(zd({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:P.none()}))},Wd=[Ai("x"),Ai("y"),Ki("height",0),Ki("width",0),Ki("bubble",Rd()),Ki("overrides",{}),Hd(),fl("placement",Ud)],$d=aa.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),qd=function(t){return t.fold(x,(function(t,e,n){return t.translate(-e,-n)}))},Gd=function(t){return t.fold(x,x)},Kd=function(t){return Z(t,(function(t,e){return t.translate(e.left,e.top)}),lr(0,0))},Xd=function(t){var e=q(t,qd);return Kd(e)},Yd=function(t){var e=q(t,Gd);return Kd(e)},Jd=$d.screen,Zd=$d.absolute,Qd=function(t,e,n){var r=pn(n.root).dom,o=function(e){var n=mn(e),r=mn(t.element);return sn(n,r)};return P.from(r.frameElement).map(ee.fromDom).filter(o).map(mr)},tm=function(t,e,n){var r=mn(t.element),o=Ir(r),i=Qd(t,e,n).getOr(o);return Zd(i,o.left,o.top)},em=function(t,e,n,r){var o=Jd(lr(t,e));return P.some(Kr(o,n,r))},nm=function(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],a=Lf(r,(function(){return Yd(i)}),(function(){return Yd(i)}),(function(){return Xd(i)})),u=Xr(a.left,a.top,t.width,t.height),c=n.showAbove?Jl():Ql(),s=n.showAbove?Zl():tf(),l=Fd(o,n,c,s,c,s,P.none());return zd({anchorBox:u,bubble:n.bubble.getOr(Rd()),overrides:n.overrides,layouts:l,placer:P.none()})}))},rm=function(t,e,n){var r=tm(t,n,e);return e.node.filter(Pn).bind((function(o){var i=o.dom.getBoundingClientRect(),a=em(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element);return nm(a,r,e,n,u)}))},om=[Ai("node"),Ai("root"),Fi("bubble"),Hd(),Ki("overrides",{}),Ki("showAbove",!1),fl("placement",rm)],im="\ufeff",am=" ",um=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},cm={create:um},sm=aa.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),lm=function(t,e,n,r){return t.fold(e,n,r)},fm=function(t){return t.fold(x,x,x)},dm=sm.before,mm=sm.on,gm=sm.after,hm={before:dm,on:mm,after:gm,cata:lm,getStart:fm},pm=aa.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),vm=function(t){return pm.exact(t.start,t.soffset,t.finish,t.foffset)},bm=function(t){return t.match({domRange:function(t){return ee.fromDom(t.startContainer)},relative:function(t,e){return hm.getStart(t)},exact:function(t,e,n,r){return t}})},ym=pm.domRange,wm=pm.relative,xm=pm.exact,Cm=function(t){var e=bm(t);return pn(e)},Sm=cm.create,km={domRange:ym,relative:wm,exact:xm,exactFromRange:vm,getWin:Cm,range:Sm},Tm=function(t,e){e.fold((function(e){t.setStartBefore(e.dom)}),(function(e,n){t.setStart(e.dom,n)}),(function(e){t.setStartAfter(e.dom)}))},Om=function(t,e){e.fold((function(e){t.setEndBefore(e.dom)}),(function(e,n){t.setEnd(e.dom,n)}),(function(e){t.setEndAfter(e.dom)}))},_m=function(t,e,n){var r=t.document.createRange();return Tm(r,e),Om(r,n),r},Em=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Am=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Dm=function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?P.some(n).map(Am):P.none()},Mm=function(t){var e=t.getBoundingClientRect();return e.width>0||e.height>0?P.some(e).map(Am):P.none()},Nm=aa.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Rm=function(t,e,n){return e(ee.fromDom(n.startContainer),n.startOffset,ee.fromDom(n.endContainer),n.endOffset)},zm=function(t,e){return e.match({domRange:function(t){return{ltr:w(t),rtl:P.none}},relative:function(e,n){return{ltr:ge((function(){return _m(t,e,n)})),rtl:ge((function(){return P.some(_m(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:ge((function(){return Em(t,e,n,r,o)})),rtl:ge((function(){return P.some(Em(t,r,o,e,n))}))}}})},Bm=function(t,e){var n=e.ltr();if(n.collapsed){var r=e.rtl().filter((function(t){return!1===t.collapsed}));return r.map((function(t){return Nm.rtl(ee.fromDom(t.endContainer),t.endOffset,ee.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Rm(t,Nm.ltr,n)}))}return Rm(t,Nm.ltr,n)},Pm=function(t,e){var n=zm(t,e);return Bm(t,n)},Im=function(t,e){var n=Pm(t,e);return n.match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,n),i}})};Nm.ltr,Nm.rtl;var Lm,Hm=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?P.from(e.dom.nodeValue):P.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},Fm=Hm(fe,"text"),Vm=function(t){return Fm.get(t)},jm=function(t){return Fm.getOption(t)},Um=function(t){return"img"===ue(t)?1:jm(t).fold((function(){return xn(t).length}),(function(t){return t.length}))},Wm=function(t){return jm(t).filter((function(t){return 0!==t.trim().length||t.indexOf(am)>-1})).isSome()},$m=["img","br"],qm=function(t){var e=Wm(t);return e||j($m,ue(t))},Gm=function(t){return Km(t,qm)},Km=function(t,e){var n=function(t){for(var r=xn(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return P.some(i);var a=n(i);if(a.isSome())return a}return P.none()};return n(t)},Xm=function(t,e){return un(e,t)},Ym=function(t,e,n,r){var o=mn(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Jm=function(t,e,n,r){var o=Ym(t,e,n,r),i=sn(t,n)&&e===r;return o.collapsed&&!i},Zm=function(t){return P.from(t.getSelection())},Qm=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return P.some(cm.create(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(n.endContainer),n.endOffset))}return P.none()},tg=function(t){if(null===t.anchorNode||null===t.focusNode)return Qm(t);var e=ee.fromDom(t.anchorNode),n=ee.fromDom(t.focusNode);return Jm(e,t.anchorOffset,n,t.focusOffset)?P.some(cm.create(e,t.anchorOffset,n,t.focusOffset)):Qm(t)},eg=function(t){return Zm(t).filter((function(t){return t.rangeCount>0})).bind(tg)},ng=function(t,e){var n=Im(t,e);return Dm(n)},rg=function(t,e){var n=Im(t,e);return Mm(n)},og=function(t,e){return{element:t,offset:e}},ig=function(t,e){var n=xn(t);if(0===n.length)return og(t,e);if(e<n.length)return og(n[e],0);var r=n[n.length-1],o=fe(r)?Vm(r).length:xn(r).length;return og(r,o)},ag=function(t,e){return fe(t)?og(t,e):ig(t,e)},ug=function(t,e){var n=e.getSelection.getOrThunk((function(){return function(){return eg(t)}}));return n().map((function(t){var e=ag(t.start,t.soffset),n=ag(t.finish,t.foffset);return km.range(e.element,e.offset,n.element,n.offset)}))},cg=function(t,e,n){var r=pn(e.root).dom,o=tm(t,n,e),i=ug(r,e).bind((function(t){var e=rg(r,km.exactFromRange(t)).orThunk((function(){var e=ee.fromText(im);_r(t.start,e);var n=ng(r,km.exact(e,0,e,1));return Br(e),n}));return e.bind((function(t){return em(t.left,t.top,t.width,t.height)}))})),a=ug(r,e).bind((function(t){return le(t.start)?P.some(t.start):bn(t.start)})),u=a.getOr(t.element);return nm(i,o,e,n,u)},sg=[Fi("getSelection"),Ai("root"),Fi("bubble"),Hd(),Ki("overrides",{}),Ki("showAbove",!1),fl("placement",cg)],lg="link-layout",fg=function(t){return t.x+t.width},dg=function(t,e){return t.x-e.width},mg=function(t,e){return t.y-e.height+t.height},gg=function(t){return t.y},hg=function(t,e,n){return gl(fg(t),gg(t),n.southeast(),yl(),"southeast",Dl(t,{left:0,top:2}),lg)},pg=function(t,e,n){return gl(dg(t,e),gg(t),n.southwest(),wl(),"southwest",Dl(t,{right:1,top:2}),lg)},vg=function(t,e,n){return gl(fg(t),mg(t,e),n.northeast(),xl(),"northeast",Dl(t,{left:0,bottom:3}),lg)},bg=function(t,e,n){return gl(dg(t,e),mg(t,e),n.northwest(),Cl(),"northwest",Dl(t,{right:1,bottom:3}),lg)},yg=function(){return[hg,pg,vg,bg]},wg=function(){return[pg,hg,bg,vg]},xg=function(t,e,n){var r=Bf(n,e.item.element),o=Fd(t.element,e,yg(),wg(),yg(),wg(),P.none());return P.some(zd({anchorBox:r,bubble:Rd(),overrides:e.overrides,layouts:o,placer:P.none()}))},Cg=[Ai("item"),Hd(),Ki("overrides",{}),fl("placement",xg)],Sg=ki("type",{selection:sg,node:om,hotspot:jd,submenu:Cg,makeshift:Wd}),kg=[Hi("classes",si),Zi("mode","all",["all","layout","placement"])],Tg=[Ki("useFixed",O),Fi("getBounds")],Og=[Di("anchor",Sg),qi("transition",kg)],_g=function(){var t=document.documentElement;return Vf(0,0,t.clientWidth,t.clientHeight)},Eg=function(t){var e=mr(t.element),n=t.element.dom.getBoundingClientRect();return Ff(e.left,e.top,n.width,n.height)},Ag=function(t,e,n,r,o,i,a){var u=Uf(n.anchorBox,e);return Ad(u,o.element,n.bubble,n.layouts,i,r,n.overrides,a)},Dg=function(t,e,n,r,o){Mg(t,e,n,r,o,P.none())},Mg=function(t,e,n,r,o,i){var a=i.map(Jr);return Ng(t,e,n,r,o,a)},Ng=function(t,e,n,r,o,i){var a=Ci("placement.info",ti(Og),o),u=a.anchor,c=r.element,s=n.get(r.uid);Ef((function(){Kn(c,"position","fixed");var o=Qn(c,"visibility");Kn(c,"visibility","hidden");var l=e.useFixed()?_g():Eg(t),f=u.placement,d=i.map(w).or(e.getBounds);f(t,u,l).each((function(e){var o=e.placer.getOr(Ag),i=o(t,l,e,d,r,s,a.transition);n.set(r.uid,i)})),o.fold((function(){nr(c,"visibility")}),(function(t){Kn(c,"visibility",t)})),Qn(c,"left").isNone()&&Qn(c,"top").isNone()&&Qn(c,"right").isNone()&&Qn(c,"bottom").isNone()&&At(Qn(c,"position"),"fixed")&&nr(c,"position")}),c)},Rg=function(t,e,n){return e.useFixed()?"fixed":"absolute"},zg=function(t,e,n,r){var o=r.element;G(["position","left","right","top","bottom"],(function(t){return nr(o,t)})),Gf(o),n.clear(r.uid)},Bg=Object.freeze({__proto__:null,position:Dg,positionWithin:Mg,positionWithinBounds:Ng,getMode:Rg,reset:zg}),Pg=function(){var t={},e=function(e,n){t[e]=n},n=function(e){return Ot(t,e)},r=function(e){d(e)?delete t[e]:t={}};return Tc({readState:function(){return t},clear:r,set:e,get:n})},Ig=Object.freeze({__proto__:null,init:Pg}),Lg=hf({fields:Tg,name:"positioning",active:xf,apis:Bg,state:Ig}),Hg=function(t){Cu(t,mu());var e=t.components();G(e,Hg)},Fg=function(t){var e=t.components();G(e,Fg),Cu(t,du())},Vg=function(t,e){Dr(t.element,e.element)},jg=function(t){G(t.components(),(function(t){return Br(t.element)})),zr(t.element),t.syncComponents()},Ug=function(t,e){var n=t.components();jg(t);var r=at(n,e);G(r,(function(e){Hg(e),t.getSystem().removeFromWorld(e)})),G(e,(function(e){e.getSystem().isConnected()?Vg(t,e):(t.getSystem().addToWorld(e),Vg(t,e),Pn(t.element)&&Fg(e)),t.syncComponents()}))},Wg=function(t,e){$g(t,e,Dr)},$g=function(t,e,n){t.getSystem().addToWorld(e),n(t.element,e.element),Pn(t.element)&&Fg(e),t.syncComponents()},qg=function(t){Hg(t),Br(t.element),t.getSystem().removeFromWorld(t)},Gg=function(t){var e=vn(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}));qg(t),e.each((function(t){t.syncComponents()}))},Kg=function(t){var e=t.components();G(e,qg),zr(t.element),t.syncComponents()},Xg=function(t,e){Jg(t,e,Dr)},Yg=function(t,e){Jg(t,e,Er)},Jg=function(t,e,n){n(t,e.element);var r=xn(e.element);G(r,(function(t){e.getByDom(t).each(Fg)}))},Zg=function(t){var e=xn(t.element);G(e,(function(e){t.getByDom(e).each(Hg)})),Br(t.element)},Qg=function(t,e,n,r){n.get().each((function(e){Kg(t)}));var o=e.getAttachPoint(t);Wg(o,t);var i=t.getSystem().build(r);return Wg(t,i),n.set(i),i},th=function(t,e,n,r){var o=Qg(t,e,n,r);return e.onOpen(t,o),o},eh=function(t,e,n,r){return n.get().map((function(){return Qg(t,e,n,r)}))},nh=function(t,e,n,r,o){sh(t,e),th(t,e,n,r),o(),fh(t,e)},rh=function(t,e,n){n.get().each((function(r){Kg(t),Gg(t),e.onClose(t,r),n.clear()}))},oh=function(t,e,n){return n.isOpen()},ih=function(t,e,n,r){return oh(t,e,n)&&n.get().exists((function(n){return e.isPartOf(t,n,r)}))},ah=function(t,e,n){return n.get()},uh=function(t,e,n,r){Qn(t.element,e).fold((function(){$n(t.element,n)}),(function(e){Fn(t.element,n,e)})),Kn(t.element,e,r)},ch=function(t,e,n){Un(t.element,n).fold((function(){return nr(t.element,e)}),(function(n){return Kn(t.element,e,n)}))},sh=function(t,e,n){var r=e.getAttachPoint(t);Kn(t.element,"position",Lg.getMode(r)),uh(t,"visibility",e.cloakVisibilityAttr,"hidden")},lh=function(t){return U(["top","left","right","bottom"],(function(e){return Qn(t,e).isSome()}))},fh=function(t,e,n){lh(t.element)||nr(t.element,"position"),ch(t,"visibility",e.cloakVisibilityAttr)},dh=Object.freeze({__proto__:null,cloak:sh,decloak:fh,open:th,openWhileCloaked:nh,close:rh,isOpen:oh,isPartOf:ih,getState:ah,setContent:eh}),mh=function(t,e){return Eu([Nu(iu(),(function(n,r){rh(n,t,e)}))])},gh=Object.freeze({__proto__:null,events:mh}),hh=[ul("onOpen"),ul("onClose"),Ai("isPartOf"),Ai("getAttachPoint"),Ki("cloakVisibilityAttr","data-precloak-visibility")],ph=function(){var t=od(),e=w("not-implemented");return Tc({readState:e,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})},vh=Object.freeze({__proto__:null,init:ph}),bh=hf({fields:hh,name:"sandboxing",active:gh,apis:dh,state:vh}),yh=w("dismiss.popups"),wh=w("reposition.popups"),xh=w("mouse.released"),Ch=Qo([Ki("isExtraPart",O),qi("fireEventInstead",[Ki("event",gu())])]),Sh=function(t){var e,n=Ci("Dismissal",Ch,t);return e={},e[yh()]={schema:Qo([Ai("target")]),onReceive:function(t,e){if(bh.isOpen(t)){var r=bh.isPartOf(t,e.target)||n.isExtraPart(t,e.target);r||n.fireEventInstead.fold((function(){return bh.close(t)}),(function(e){return Cu(t,e.event)}))}}},e},kh=Qo([qi("fireEventInstead",[Ki("event",hu())]),Bi("doReposition")]),Th=function(t){var e,n=Ci("Reposition",kh,t);return e={},e[wh()]={onReceive:function(t){bh.isOpen(t)&&n.fireEventInstead.fold((function(){return n.doReposition(t)}),(function(e){return Cu(t,e.event)}))}},e},Oh=function(t,e,n){e.store.manager.onLoad(t,e,n)},_h=function(t,e,n){e.store.manager.onUnload(t,e,n)},Eh=function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},Ah=function(t,e,n){return e.store.manager.getValue(t,e,n)},Dh=function(t,e,n){return n},Mh=Object.freeze({__proto__:null,onLoad:Oh,onUnload:_h,setValue:Eh,getValue:Ah,getState:Dh}),Nh=function(t,e){var n=t.resetOnDom?[ju((function(n,r){Oh(n,t,e)})),Uu((function(n,r){_h(n,t,e)}))]:[uf(t,e,Oh)];return Eu(n)},Rh=Object.freeze({__proto__:null,events:Nh}),zh=function(){var t=oa(null),e=function(){return{mode:"memory",value:t.get()}},n=function(){return null===t.get()},r=function(){t.set(null)};return Tc({set:t.set,get:t.get,isNotSet:n,clear:r,readState:e})},Bh=function(){var t=p;return Tc({readState:t})},Ph=function(){var t=oa({}),e=oa({}),n=function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},r=function(){t.set({}),e.set({})},o=function(n){return Ot(t.get(),n).orThunk((function(){return Ot(e.get(),n)}))},i=function(n){var r=t.get(),o=e.get(),i={},a={};G(n,(function(t){i[t.value]=t,Ot(t,"meta").each((function(e){Ot(e,"text").each((function(e){a[e]=t}))}))})),t.set(A(A({},r),i)),e.set(A(A({},o),a))};return Tc({readState:n,lookup:o,update:i,clear:r})},Ih=function(t){return t.store.manager.state(t)},Lh=Object.freeze({__proto__:null,memory:zh,dataset:Ph,manual:Bh,init:Ih}),Hh=function(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)},Fh=function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).getOrThunk((function(){return r.getFallbackEntry(o)}))},Vh=function(t,e,n){var r=e.store;r.initialValue.each((function(r){Hh(t,e,n,r)}))},jh=function(t,e,n){n.clear()},Uh=[Fi("initialValue"),Ai("getFallbackEntry"),Ai("getDataKey"),Ai("setValue"),fl("manager",{setValue:Hh,getValue:Fh,onLoad:Vh,onUnload:jh,state:Ph})],Wh=function(t,e,n){return e.store.getValue(t)},$h=function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},qh=function(t,e,n){e.store.initialValue.each((function(n){e.store.setValue(t,n)}))},Gh=[Ai("getValue"),Ki("setValue",p),Fi("initialValue"),fl("manager",{setValue:$h,getValue:Wh,onLoad:qh,onUnload:p,state:kc.init})],Kh=function(t,e,n,r){n.set(r),e.onSetValue(t,r)},Xh=function(t,e,n){return n.get()},Yh=function(t,e,n){e.store.initialValue.each((function(t){n.isNotSet()&&n.set(t)}))},Jh=function(t,e,n){n.clear()},Zh=[Fi("initialValue"),fl("manager",{setValue:Kh,getValue:Xh,onLoad:Yh,onUnload:Jh,state:zh})],Qh=[Xi("store",{mode:"memory"},ki("mode",{memory:Zh,manual:Gh,dataset:Uh})),ul("onSetValue"),Ki("resetOnDom",!1)],tp=hf({fields:Qh,name:"representing",active:Rh,apis:Mh,extra:{setValueFrom:function(t,e){var n=tp.getValue(e);tp.setValue(t,n)}},state:Lh}),ep=function(t,e){return ra(t,{},q(e,(function(e){return Pi(e.name(),"Cannot configure "+e.name()+" for "+t)})).concat([_i("dump",x)]))},np=function(t){return t.dump},rp=function(t,e){return A(A({},mf(e)),t.dump)},op={field:ep,augment:rp,get:np},ip="placeholder",ap=aa.generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),up=function(t){return _t(t,"uiType")},cp=function(t,e,n,r){return t.exists((function(t){return t!==n.owner}))?ap.single(!0,w(n)):Ot(r,n.name).fold((function(){throw new Error("Unknown placeholder component: "+n.name+"\nKnown: ["+ht(r)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(n,null,2))}),(function(t){return t.replace()}))},sp=function(t,e,n,r){return up(n)&&n.uiType===ip?cp(t,e,n,r):ap.single(!1,w(n))},lp=function(t,e,n,r){var o=sp(t,e,n,r);return o.fold((function(o,i){var a=up(n)?i(e,n.config,n.validated):i(e),u=Ot(a,"components").getOr([]),c=rt(u,(function(n){return lp(t,e,n,r)}));return[A(A({},a),{components:c})]}),(function(t,r){if(up(n)){var o=r(e,n.config,n.validated),i=n.validated.preprocess.getOr(x);return i(o)}return r(e)}))},fp=function(t,e,n,r){return rt(n,(function(n){return lp(t,e,n,r)}))},dp=function(t,e){var n=!1,r=function(){return n},o=function(){if(n)throw new Error("Trying to use the same placeholder more than once: "+t);return n=!0,e},i=function(){return e.fold((function(t,e){return t}),(function(t,e){return t}))};return{name:w(t),required:i,used:r,replace:o}},mp=function(t,e,n,r){var o=bt(r,(function(t,e){return dp(e,t)})),i=fp(t,e,n,o);return vt(o,(function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))})),i},gp=ap.single,hp=ap.multiple,pp=w(ip),vp=aa.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),bp=Ki("factory",{sketch:x}),yp=Ki("schema",[]),wp=Ai("name"),xp=Oi("pname","pname",To((function(t){return"<alloy."+oc(t.name)+">"})),ai()),Cp=_i("schema",(function(){return[Fi("preprocess")]})),Sp=Ki("defaults",w({})),kp=Ki("overrides",w({})),Tp=ti([bp,yp,wp,xp,Sp,kp]),Op=ti([bp,yp,wp,Sp,kp]),_p=ti([bp,yp,wp,xp,Sp,kp]),Ep=ti([bp,Cp,wp,Ai("unit"),xp,Sp,kp]),Ap=function(t){return t.fold(P.some,P.none,P.some,P.some)},Dp=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},Mp=function(t){return t.fold(x,x,x,x)},Np=function(t,e){return function(n){var r=Ci("Converting part type",e,n);return t(r)}},Rp=Np(vp.required,Tp),zp=Np(vp.external,Op),Bp=Np(vp.optional,_p),Pp=Np(vp.group,Ep),Ip=w("entirety"),Lp=Object.freeze({__proto__:null,required:Rp,external:zp,optional:Bp,group:Pp,asNamedPart:Ap,name:Dp,asCommon:Mp,original:Ip}),Hp=function(t,e,n,r){return Co(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},Fp=function(t,e,n){var r={},o={};return G(n,(function(t){t.fold((function(t){r[t.pname]=gp(!0,(function(e,n,r){return t.factory.sketch(Hp(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];o[t.name]=w(t.factory.sketch(Hp(e,t,n[Ip()]),n))}),(function(t){r[t.pname]=gp(!1,(function(e,n,r){return t.factory.sketch(Hp(e,t,n,r))}))}),(function(t){r[t.pname]=hp(!0,(function(e,n,r){var o=e[t.name];return q(o,(function(n){return t.factory.sketch(Co(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:w(r),externals:w(o)}},Vp=function(t,e){var n={};return G(e,(function(e){Ap(e).each((function(e){var r=jp(t,e.pname);n[e.name]=function(n){var o=Ci("Part: "+e.name+" in "+t,ti(e.schema),n);return A(A({},r),{config:n,validated:o})}}))})),n},jp=function(t,e){return{uiType:pp(),owner:t,name:e}},Up=function(t,e,n){return{uiType:pp(),owner:t,name:e,config:n,validated:{}}},Wp=function(t){return rt(t,(function(t){return t.fold(P.none,P.some,P.none,P.none).map((function(t){return Ii(t.name,t.schema.concat([dl(Ip())]))})).toArray()}))},$p=function(t){return q(t,Dp)},qp=function(t,e,n){return Fp(t,e,n)},Gp=function(t,e,n){return mp(P.some(t),e,e.components,n)},Kp=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()},Xp=function(t,e,n){return Kp(t,e,n).getOrDie("Could not find part: "+n)},Yp=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return G(n,(function(t){r[t]=w(i.getByUid(o[t]))})),r},Jp=function(t,e){var n=t.getSystem();return bt(e.partUids,(function(t,e){return w(n.getByUid(t))}))},Zp=function(t){return ht(t.partUids)},Qp=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return G(n,(function(t){r[t]=w(i.getByUid(o[t]).getOrDie())})),r},tv=function(t,e){var n=$p(e);return ga(q(n,(function(e){return{key:e,value:t+"-"+e}})))},ev=function(t){return Oi("partUids","partUids",Eo((function(e){return tv(e.uid,t)})),ai())},nv=Object.freeze({__proto__:null,generate:Vp,generateOne:Up,schemas:Wp,names:$p,substitutes:qp,components:Gp,defaultUids:tv,defaultUidsSchema:ev,getAllParts:Jp,getAllPartNames:Zp,getPart:Kp,getPartOrDie:Xp,getParts:Yp,getPartsOrDie:Qp}),rv=function(t,e){var n=t.length>0?[Ii("parts",t)]:[];return n.concat([Ai("uid"),Ki("dom",{}),Ki("components",[]),dl("originalSpec"),Ki("debug.sketcher",{})]).concat(e)},ov=function(t,e,n,r,o){var i=rv(r,o);return Ci(t+" [SpecSchema]",Qo(i.concat(e)),n)},iv=function(t,e,n,r){var o=cv(r),i=ov(t,e,o,[],[]);return n(i,o)},av=function(t,e,n,r,o){var i=cv(o),a=Wp(n),u=ev(n),c=ov(t,e,i,a,[u]),s=qp(t,c,n),l=Gp(t,c,s.internals());return r(c,l,i,s.externals())},uv=function(t){return _t(t,"uid")},cv=function(t){return uv(t)?t:A(A({},t),{uid:dc("uid")})},sv=function(t){return void 0!==t.uid},lv=Qo([Ai("name"),Ai("factory"),Ai("configFields"),Ki("apis",{}),Ki("extraApis",{})]),fv=Qo([Ai("name"),Ai("factory"),Ai("configFields"),Ai("partFields"),Ki("apis",{}),Ki("extraApis",{})]),dv=function(t){var e=Ci("Sketcher for "+t.name,lv,t),n=function(t){return iv(e.name,e.configFields,e.factory,t)},r=bt(e.apis,Sc),o=bt(e.extraApis,(function(t,e){return bc(t,e)}));return A(A({name:e.name,configFields:e.configFields,sketch:n},r),o)},mv=function(t){var e=Ci("Sketcher for "+t.name,fv,t),n=function(t){return av(e.name,e.configFields,e.partFields,e.factory,t)},r=Vp(e.name,e.partFields),o=bt(e.apis,Sc),i=bt(e.extraApis,(function(t,e){return bc(t,e)}));return A(A({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:n,parts:r},o),i)},gv=function(t){return"input"===ue(t)&&"radio"!==jn(t,"type")||"textarea"===ue(t)},hv=function(t,e,n){return e.find(t)},pv=Object.freeze({__proto__:null,getCurrent:hv}),vv=[Ai("find")],bv=hf({fields:vv,name:"composing",apis:pv}),yv=["input","button","textarea","select"],wv=function(t,e,n){var r=e.disabled()?Ev:Av;r(t,e)},xv=function(t,e){return!0===e.useNative&&j(yv,ue(t.element))},Cv=function(t){return Wn(t.element,"disabled")},Sv=function(t){Fn(t.element,"disabled","disabled")},kv=function(t){$n(t.element,"disabled")},Tv=function(t){return"true"===jn(t.element,"aria-disabled")},Ov=function(t){Fn(t.element,"aria-disabled","true")},_v=function(t){Fn(t.element,"aria-disabled","false")},Ev=function(t,e,n){e.disableClass.each((function(e){is(t.element,e)}));var r=xv(t,e)?Sv:Ov;r(t),e.onDisabled(t)},Av=function(t,e,n){e.disableClass.each((function(e){us(t.element,e)}));var r=xv(t,e)?kv:_v;r(t),e.onEnabled(t)},Dv=function(t,e){return xv(t,e)?Cv(t):Tv(t)},Mv=function(t,e,n,r){var o=r?Ev:Av;o(t,e)},Nv=Object.freeze({__proto__:null,enable:Av,disable:Ev,isDisabled:Dv,onLoad:wv,set:Mv}),Rv=function(t,e){return Dc({classes:e.disabled()?e.disableClass.toArray():[]})},zv=function(t,e){return Eu([Au(eu(),(function(e,n){return Dv(e,t)})),uf(t,e,wv)])},Bv=Object.freeze({__proto__:null,exhibit:Rv,events:zv}),Pv=[ta("disabled",O),Ki("useNative",!0),Fi("disableClass"),ul("onDisabled"),ul("onEnabled")],Iv=hf({fields:Pv,name:"disabling",active:Bv,apis:Nv}),Lv=function(t,e,n,r){var o=Xm(t.element,"."+e.highlightClass);G(o,(function(n){U(r,(function(t){return t.element===n}))||(us(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),Cu(n,xu())})))}))},Hv=function(t,e,n){return Lv(t,e,n,[])},Fv=function(t,e,n,r){qv(t,e,n,r)&&(us(r.element,e.highlightClass),e.onDehighlight(t,r),Cu(r,xu()))},Vv=function(t,e,n,r){Lv(t,e,n,[r]),qv(t,e,n,r)||(is(r.element,e.highlightClass),e.onHighlight(t,r),Cu(r,wu()))},jv=function(t,e,n){Xv(t,e).each((function(r){Vv(t,e,n,r)}))},Uv=function(t,e,n){Yv(t,e).each((function(r){Vv(t,e,n,r)}))},Wv=function(t,e,n,r){Kv(t,e,n,r).fold((function(t){throw t}),(function(r){Vv(t,e,n,r)}))},$v=function(t,e,n,r){var o=tb(t,e),i=tt(o,r);i.each((function(r){Vv(t,e,n,r)}))},qv=function(t,e,n,r){return cs(r.element,e.highlightClass)},Gv=function(t,e,n){return Ls(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Kv=function(t,e,n,r){var o=Xm(t.element,"."+e.itemClass);return P.from(o[r]).fold((function(){return ro.error(new Error("No element found with index "+r))}),t.getSystem().getByDom)},Xv=function(t,e,n){return Ls(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Yv=function(t,e,n){var r=Xm(t.element,"."+e.itemClass),o=r.length>0?P.some(r[r.length-1]):P.none();return o.bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Jv=function(t,e,n,r){var o=Xm(t.element,"."+e.itemClass),i=et(o,(function(t){return cs(t,e.highlightClass)}));return i.bind((function(e){var n=_l(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))},Zv=function(t,e,n){return Jv(t,e,n,-1)},Qv=function(t,e,n){return Jv(t,e,n,1)},tb=function(t,e,n){var r=Xm(t.element,"."+e.itemClass);return Mt(q(r,(function(e){return t.getSystem().getByDom(e).toOptional()})))},eb=Object.freeze({__proto__:null,dehighlightAll:Hv,dehighlight:Fv,highlight:Vv,highlightFirst:jv,highlightLast:Uv,highlightAt:Wv,highlightBy:$v,isHighlighted:qv,getHighlighted:Gv,getFirst:Xv,getLast:Yv,getPrevious:Zv,getNext:Qv,getCandidates:tb}),nb=[Ai("highlightClass"),Ai("itemClass"),ul("onHighlight"),ul("onDehighlight")],rb=hf({fields:nb,name:"highlighting",apis:eb}),ob=[8],ib=[9],ab=[13],ub=[27],cb=[32],sb=[37],lb=[38],fb=[39],db=[40],mb=function(t,e,n){var r=it(t.slice(0,e)),o=it(t.slice(e+1));return tt(r.concat(o),n)},gb=function(t,e,n){var r=it(t.slice(0,e));return tt(r,n)},hb=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return tt(o.concat(r),n)},pb=function(t,e,n){var r=t.slice(e+1);return tt(r,n)},vb=function(t){return function(e){var n=e.raw;return j(t,n.which)}},bb=function(t){return function(e){return ot(t,(function(t){return t(e)}))}},yb=function(t){var e=t.raw;return!0===e.shiftKey},wb=function(t){var e=t.raw;return!0===e.ctrlKey},xb=k(yb),Cb=function(t,e){return{matches:t,classification:e}},Sb=function(t,e){var n=tt(t,(function(t){return t.matches(e)}));return n.map((function(t){return t.classification}))},kb=function(t,e,n){var r=e.exists((function(t){return n.exists((function(e){return sn(e,t)}))}));r||Su(t,pu(),{prevFocus:e,newFocus:n})},Tb=function(){var t=function(t){return _f(t.element)},e=function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element);var o=t(e);kb(e,r,o)};return{get:t,set:e}},Ob=function(){var t=function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},e=function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(p,(function(t){rb.highlight(e,t)}));var o=t(e);kb(e,r,o)};return{get:t,set:e}};(function(t){t["OnFocusMode"]="onFocus",t["OnEnterOrSpaceMode"]="onEnterOrSpace",t["OnApiMode"]="onApi"})(Lm||(Lm={}));var _b=function(t,e,n,r,o){var i=function(){return t.concat([Ki("focusManager",Tb()),Xi("focusInside","onFocus",vi((function(t){return j(["onFocus","onEnterOrSpace","onApi"],t)?ro.value(t):ro.error("Invalid value for focusInside")}))),fl("handler",c),fl("state",e),fl("sendFocusIn",o)])},a=function(t,e,n,r,o){var i=n(t,e,r,o);return Sb(i,e.event).bind((function(n){return n(t,e,r,o)}))},u=function(t,e){var i=t.focusInside!==Lm.OnFocusMode?P.none():o(t).map((function(n){return Nu(Ja(),(function(r,o){n(r,t,e),o.stop()}))})),u=function(n,r){var i=vb(cb.concat(ab))(r.event);t.focusInside===Lm.OnEnterOrSpaceMode&&i&&xa(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))},c=[Nu(Fa(),(function(r,o){a(r,o,n,t,e).fold((function(){u(r,o)}),(function(t){o.stop()}))})),Nu(Va(),(function(n,o){a(n,o,r,t,e).each((function(t){o.stop()}))}))];return Eu(i.toArray().concat(c))},c={schema:i,processKey:a,toEvents:u};return c},Eb=function(t){var e=[Fi("onEscape"),Fi("onEnter"),Ki("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ki("firstTabstop",0),Ki("useTabstopAt",_),Fi("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return Hs(e,t)})).getOr(e);return ar(n)>0},r=function(t,e){var r=Xm(t.element,e.selector),o=Y(r,(function(t){return n(e,t)}));return P.from(o[e.firstTabstop])},o=function(t,e){return e.focusManager.get(t).bind((function(t){return Hs(t,e.selector)}))},i=function(t,e){return n(t,e)&&t.useTabstopAt(e)},a=function(t,e,n){r(t,e).each((function(n){e.focusManager.set(t,n)}))},u=function(t,e,n,r,o){return o(e,n,(function(t){return i(r,t)})).fold((function(){return r.cyclic?P.some(!0):P.none()}),(function(e){return r.focusManager.set(t,e),P.some(!0)}))},c=function(t,e,n,r){var i=Xm(t.element,n.selector);return o(t,n).bind((function(e){var o=et(i,S(sn,e));return o.bind((function(e){return u(t,i,e,n,r)}))}))},s=function(t,e,n){var r=n.cyclic?mb:gb;return c(t,e,n,r)},l=function(t,e,n){var r=n.cyclic?hb:pb;return c(t,e,n,r)},f=function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))},d=function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))},m=w([Cb(bb([yb,vb(ib)]),s),Cb(vb(ib),l),Cb(vb(ub),d),Cb(bb([xb,vb(ab)]),f)]),g=w([]);return _b(e,kc.init,m,g,(function(){return P.some(a)}))},Ab=Eb(_i("cyclic",O)),Db=Eb(_i("cyclic",_)),Mb=function(t,e,n){return Tu(t,n,eu()),P.some(!0)},Nb=function(t,e,n){var r=gv(n)&&vb(cb)(e.event);return r?P.none():Mb(t,e,n)},Rb=function(t,e){return P.some(!0)},zb=[Ki("execute",Nb),Ki("useSpace",!1),Ki("useEnter",!0),Ki("useControlEnter",!1),Ki("useDown",!1)],Bb=function(t,e,n){return n.execute(t,e,t.element)},Pb=function(t,e,n,r){var o=n.useSpace&&!gv(t.element)?cb:[],i=n.useEnter?ab:[],a=n.useDown?db:[],u=o.concat(i).concat(a);return[Cb(vb(u),Bb)].concat(n.useControlEnter?[Cb(bb([wb,vb(ab)]),Bb)]:[])},Ib=function(t,e,n,r){return n.useSpace&&!gv(t.element)?[Cb(vb(cb),Rb)]:[]},Lb=_b(zb,kc.init,Pb,Ib,(function(){return P.none()})),Hb=function(){var t=od(),e=function(e,n){t.set({numRows:e,numColumns:n})},n=function(){return t.get().map((function(t){return t.numRows}))},r=function(){return t.get().map((function(t){return t.numColumns}))};return Tc({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:e,getNumRows:n,getNumColumns:r})},Fb=function(t){return t.state(t)},Vb=Object.freeze({__proto__:null,flatgrid:Hb,init:Fb}),jb=function(t){return function(e,n,r,o){var i=t(e.element);return qb(i,e,n,r,o)}},Ub=function(t,e){var n=Bd(t,e);return jb(n)},Wb=function(t,e){var n=Bd(e,t);return jb(n)},$b=function(t){return function(e,n,r,o){return qb(t,e,n,r,o)}},qb=function(t,e,n,r,o){var i=r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)}));return i.map((function(t){return r.focusManager.set(e,t),!0}))},Gb=$b,Kb=$b,Xb=$b,Yb=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},Jb=function(t){return!Yb(t.dom)},Zb=function(t,e){return et(t,e).map((function(e){return{index:e,candidates:t}}))},Qb=function(t,e,n){var r=function(t){return sn(t,e)},o=Xm(t,n),i=Y(o,Jb);return Zb(i,r)},ty=function(t,e){return et(t,(function(t){return sn(e,t)}))},ey=function(t,e,n,r){var o=Math.floor(e/n),i=e%n;return r(o,i).bind((function(e){var r=e.row*n+e.column;return r>=0&&r<t.length?P.some(t[r]):P.none()}))},ny=function(t,e,n,r,o){return ey(t,e,r,(function(e,i){var a=e===n-1,u=a?t.length-e*r:r,c=_l(i,o,0,u-1);return P.some({row:e,column:c})}))},ry=function(t,e,n,r,o){return ey(t,e,r,(function(e,i){var a=_l(e,o,0,n-1),u=a===n-1,c=u?t.length-a*r:r,s=El(i,0,c-1);return P.some({row:a,column:s})}))},oy=function(t,e,n,r){return ny(t,e,n,r,1)},iy=function(t,e,n,r){return ny(t,e,n,r,-1)},ay=function(t,e,n,r){return ry(t,e,n,r,-1)},uy=function(t,e,n,r){return ry(t,e,n,r,1)},cy=[Ai("selector"),Ki("execute",Nb),cl("onEscape"),Ki("captureTab",!1),ml()],sy=function(t,e,n){Ls(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))},ly=function(t,e){return e.focusManager.get(t).bind((function(t){return Hs(t,e.selector)}))},fy=function(t,e,n,r){return ly(t,n).bind((function(r){return n.execute(t,e,r)}))},dy=function(t){return function(e,n,r,o){return Qb(e,n,r.selector).bind((function(e){return t(e.candidates,e.index,o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}},my=function(t,e,n){return n.captureTab?P.some(!0):P.none()},gy=function(t,e,n){return n.onEscape(t,e)},hy=dy(iy),py=dy(oy),vy=dy(ay),by=dy(uy),yy=w([Cb(vb(sb),Ub(hy,py)),Cb(vb(fb),Wb(hy,py)),Cb(vb(lb),Gb(vy)),Cb(vb(db),Kb(by)),Cb(bb([yb,vb(ib)]),my),Cb(bb([xb,vb(ib)]),my),Cb(vb(ub),gy),Cb(vb(cb.concat(ab)),fy)]),wy=w([Cb(vb(cb),Rb)]),xy=_b(cy,Hb,yy,wy,(function(){return P.some(sy)})),Cy=function(t,e,n,r){var o=function(t){return"button"===ue(t)&&"disabled"===jn(t,"disabled")},i=function(t,e,n){var a=_l(e,r,0,n.length-1);return a===t?P.none():o(n[a])?i(t,a,n):P.from(n[a])};return Qb(t,n,e).bind((function(t){var e=t.index,n=t.candidates;return i(e,e,n)}))},Sy=[Ai("selector"),Ki("getInitial",P.none),Ki("execute",Nb),cl("onEscape"),Ki("executeOnMove",!1),Ki("allowVertical",!0)],ky=function(t,e){return e.focusManager.get(t).bind((function(t){return Hs(t,e.selector)}))},Ty=function(t,e,n){return ky(t,n).bind((function(r){return n.execute(t,e,r)}))},Oy=function(t,e,n){e.getInitial(t).orThunk((function(){return Ls(t.element,e.selector)})).each((function(n){e.focusManager.set(t,n)}))},_y=function(t,e,n){return Cy(t,n.selector,e,-1)},Ey=function(t,e,n){return Cy(t,n.selector,e,1)},Ay=function(t){return function(e,n,r,o){return t(e,n,r,o).bind((function(){return r.executeOnMove?Ty(e,n,r):P.some(!0)}))}},Dy=function(t,e,n){return n.onEscape(t,e)},My=function(t,e,n,r){var o=sb.concat(n.allowVertical?lb:[]),i=fb.concat(n.allowVertical?db:[]);return[Cb(vb(o),Ay(Ub(_y,Ey))),Cb(vb(i),Ay(Wb(_y,Ey))),Cb(vb(ab),Ty),Cb(vb(cb),Ty),Cb(vb(ub),Dy)]},Ny=w([Cb(vb(cb),Rb)]),Ry=_b(Sy,kc.init,My,Ny,(function(){return P.some(Oy)})),zy=function(t,e,n){return P.from(t[e]).bind((function(t){return P.from(t[n]).map((function(t){return{rowIndex:e,columnIndex:n,cell:t}}))}))},By=function(t,e,n,r){var o=t[e],i=o.length,a=_l(n,r,0,i-1);return zy(t,e,a)},Py=function(t,e,n,r){var o=_l(n,r,0,t.length-1),i=t[o].length,a=El(e,0,i-1);return zy(t,o,a)},Iy=function(t,e,n,r){var o=t[e],i=o.length,a=El(n+r,0,i-1);return zy(t,e,a)},Ly=function(t,e,n,r){var o=El(n+r,0,t.length-1),i=t[o].length,a=El(e,0,i-1);return zy(t,o,a)},Hy=function(t,e,n){return By(t,e,n,1)},Fy=function(t,e,n){return By(t,e,n,-1)},Vy=function(t,e,n){return Py(t,n,e,-1)},jy=function(t,e,n){return Py(t,n,e,1)},Uy=function(t,e,n){return Iy(t,e,n,-1)},Wy=function(t,e,n){return Iy(t,e,n,1)},$y=function(t,e,n){return Ly(t,n,e,-1)},qy=function(t,e,n){return Ly(t,n,e,1)},Gy=[Ii("selectors",[Ai("row"),Ai("cell")]),Ki("cycles",!0),Ki("previousSelector",P.none),Ki("execute",Nb)],Ky=function(t,e,n){var r=e.previousSelector(t).orThunk((function(){var n=e.selectors;return Ls(t.element,n.cell)}));r.each((function(n){e.focusManager.set(t,n)}))},Xy=function(t,e,n){return _f(t.element).bind((function(r){return n.execute(t,e,r)}))},Yy=function(t,e){return q(t,(function(t){return Xm(t,e.selectors.cell)}))},Jy=function(t,e){return function(n,r,o){var i=o.cycles?t:e;return Hs(r,o.selectors.row).bind((function(t){var e=Xm(t,o.selectors.cell);return ty(e,r).bind((function(e){var r=Xm(n,o.selectors.row);return ty(r,t).bind((function(t){var n=Yy(r,o);return i(n,t,e).map((function(t){return t.cell}))}))}))}))}},Zy=Jy(Fy,Uy),Qy=Jy(Hy,Wy),tw=Jy(Vy,$y),ew=Jy(jy,qy),nw=w([Cb(vb(sb),Ub(Zy,Qy)),Cb(vb(fb),Wb(Zy,Qy)),Cb(vb(lb),Gb(tw)),Cb(vb(db),Kb(ew)),Cb(vb(cb.concat(ab)),Xy)]),rw=w([Cb(vb(cb),Rb)]),ow=_b(Gy,kc.init,nw,rw,(function(){return P.some(Ky)})),iw=[Ai("selector"),Ki("execute",Nb),Ki("moveOnTab",!1)],aw=function(t,e,n){return n.focusManager.get(t).bind((function(r){return n.execute(t,e,r)}))},uw=function(t,e,n){Ls(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))},cw=function(t,e,n){return Cy(t,n.selector,e,-1)},sw=function(t,e,n){return Cy(t,n.selector,e,1)},lw=function(t,e,n,r){return n.moveOnTab?Xb(cw)(t,e,n,r):P.none()},fw=function(t,e,n,r){return n.moveOnTab?Xb(sw)(t,e,n,r):P.none()},dw=w([Cb(vb(lb),Xb(cw)),Cb(vb(db),Xb(sw)),Cb(bb([yb,vb(ib)]),lw),Cb(bb([xb,vb(ib)]),fw),Cb(vb(ab),aw),Cb(vb(cb),aw)]),mw=w([Cb(vb(cb),Rb)]),gw=_b(iw,kc.init,dw,mw,(function(){return P.some(uw)})),hw=[cl("onSpace"),cl("onEnter"),cl("onShiftEnter"),cl("onLeft"),cl("onRight"),cl("onTab"),cl("onShiftTab"),cl("onUp"),cl("onDown"),cl("onEscape"),Ki("stopSpaceKeyup",!1),Fi("focusIn")],pw=function(t,e,n){return[Cb(vb(cb),n.onSpace),Cb(bb([xb,vb(ab)]),n.onEnter),Cb(bb([yb,vb(ab)]),n.onShiftEnter),Cb(bb([yb,vb(ib)]),n.onShiftTab),Cb(bb([xb,vb(ib)]),n.onTab),Cb(vb(lb),n.onUp),Cb(vb(db),n.onDown),Cb(vb(sb),n.onLeft),Cb(vb(fb),n.onRight),Cb(vb(cb),n.onSpace),Cb(vb(ub),n.onEscape)]},vw=function(t,e,n){return n.stopSpaceKeyup?[Cb(vb(cb),Rb)]:[]},bw=_b(hw,kc.init,pw,vw,(function(t){return t.focusIn})),yw=Ab.schema(),ww=Db.schema(),xw=Ry.schema(),Cw=xy.schema(),Sw=ow.schema(),kw=Lb.schema(),Tw=gw.schema(),Ow=bw.schema(),_w=Object.freeze({__proto__:null,acyclic:yw,cyclic:ww,flow:xw,flatgrid:Cw,matrix:Sw,execution:kw,menu:Tw,special:Ow}),Ew=function(t){return Et(t,"setGridSize")},Aw=vf({branchKey:"mode",branches:_w,name:"keying",active:{events:function(t,e){var n=t.handler;return n.toEvents(t,e)}},apis:{focusIn:function(t,e,n){e.sendFocusIn(e).fold((function(){t.getSystem().triggerFocus(t.element,t.element)}),(function(r){r(t,e,n)}))},setGridSize:function(t,e,n,r,o){Ew(n)?n.setGridSize(r,o):console.error("Layout does not support setGridSize")}},state:Vb}),Dw=function(t,e,n,r){Ef((function(){var e=q(r,t.getSystem().build);Ug(t,e)}),t.element)},Mw=function(t,e,n,r){var o=t.getSystem().build(r);$g(t,o,n)},Nw=function(t,e,n,r){Mw(t,e,Dr,r)},Rw=function(t,e,n,r){Mw(t,e,Ar,r)},zw=function(t,e,n,r){var o=Bw(t),i=tt(o,(function(t){return sn(r.element,t.element)}));i.each(Gg)},Bw=function(t,e){return t.components()},Pw=function(t,e,n,r,o){var i=Bw(t);return P.from(i[r]).map((function(i){return zw(t,e,n,i),o.each((function(n){Mw(t,e,(function(t,e){Mr(t,e,r)}),n)})),i}))},Iw=function(t,e,n,r,o){var i=Bw(t);return et(i,r).bind((function(r){return Pw(t,e,n,r,o)}))},Lw=Object.freeze({__proto__:null,append:Nw,prepend:Rw,remove:zw,replaceAt:Pw,replaceBy:Iw,set:Dw,contents:Bw}),Hw=hf({fields:[],name:"replacing",apis:Lw}),Fw=function(t,e){var n=Eu(e);return hf({fields:[Ai("enabled")],name:t,active:{events:w(n)}})},Vw=function(t,e){var n=Fw(t,e);return{key:t,value:{config:{},me:n,configAsRaw:w({}),initialConfig:{},state:kc}}},jw=function(t,e){e.ignore||(Sf(t.element),e.onFocus(t))},Uw=function(t,e){e.ignore||kf(t.element)},Ww=function(t){return Tf(t.element)},$w=Object.freeze({__proto__:null,focus:jw,blur:Uw,isFocused:Ww}),qw=function(t,e){var n=e.ignore?{}:{attributes:{tabindex:"-1"}};return Dc(n)},Gw=function(t){return Eu([Nu(Ja(),(function(e,n){jw(e,t),n.stop()}))].concat(t.stopMousedown?[Nu(Ra(),(function(t,e){e.event.prevent()}))]:[]))},Kw=Object.freeze({__proto__:null,exhibit:qw,events:Gw}),Xw=[ul("onFocus"),Ki("stopMousedown",!1),Ki("ignore",!1)],Yw=hf({fields:Xw,name:"focusing",active:Kw,apis:$w}),Jw=function(t){var e=function(){var e=oa(t),n=function(){return e.get()},r=function(t){return e.set(t)},o=function(){return e.set(t)},i=function(){return e.get()};return{get:n,set:r,clear:o,readState:i}};return{init:e}},Zw=function(t,e,n){var r=e.aria;r.update(t,r,n.get())},Qw=function(t,e,n){e.toggleClass.each((function(e){n.get()?is(t.element,e):us(t.element,e)}))},tx=function(t,e,n){rx(t,e,n,!n.get())},ex=function(t,e,n){n.set(!0),Qw(t,e,n),Zw(t,e,n)},nx=function(t,e,n){n.set(!1),Qw(t,e,n),Zw(t,e,n)},rx=function(t,e,n,r){var o=r?ex:nx;o(t,e,n)},ox=function(t,e,n){return n.get()},ix=function(t,e,n){rx(t,e,n,e.selected)},ax=Object.freeze({__proto__:null,onLoad:ix,toggle:tx,isOn:ox,on:ex,off:nx,set:rx}),ux=function(){return Dc({})},cx=function(t,e){var n=af(t,e,tx),r=uf(t,e,ix);return Eu(nt([t.toggleOnExecute?[n]:[],[r]]))},sx=Object.freeze({__proto__:null,exhibit:ux,events:cx}),lx=function(t,e,n){Fn(t.element,"aria-pressed",n),e.syncWithExpanded&&mx(t,e,n)},fx=function(t,e,n){Fn(t.element,"aria-selected",n)},dx=function(t,e,n){Fn(t.element,"aria-checked",n)},mx=function(t,e,n){Fn(t.element,"aria-expanded",n)},gx=[Ki("selected",!1),Fi("toggleClass"),Ki("toggleOnExecute",!0),Xi("aria",{mode:"none"},ki("mode",{pressed:[Ki("syncWithExpanded",!1),fl("update",lx)],checked:[fl("update",dx)],expanded:[fl("update",mx)],selected:[fl("update",fx)],none:[fl("update",p)]}))],hx=hf({fields:gx,name:"toggling",active:sx,apis:ax,state:Jw(!1)}),px=function(){var t=function(t,e){e.stop(),ku(t)};return[Nu(Wa(),t),Nu(ru(),t),Hu(Aa()),Hu(Ra())]},vx=function(t){var e=function(t){return $u((function(e,n){t(e),n.stop()}))};return Eu(nt([t.map(e).toArray(),px()]))},bx="alloy.item-hover",yx="alloy.item-focus",wx=function(t){(_f(t.element).isNone()||Yw.isFocused(t))&&(Yw.isFocused(t)||Yw.focus(t),Su(t,bx,{item:t}))},xx=function(t){Su(t,yx,{item:t})},Cx=w(bx),Sx=w(yx),kx=function(t){return{dom:t.dom,domModification:A(A({},t.domModification),{attributes:A(A(A({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:op.augment(t.itemBehaviours,[t.toggling.fold(hx.revoke,(function(t){return hx.config(A({aria:{mode:"checked"}},t))})),Yw.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){xx(t)}}),Aw.config({mode:"execution"}),tp.config({store:{mode:"memory",initialValue:t.data}}),Vw("item-type-events",M(M([],px(),!0),[Nu(Ia(),wx),Nu(nu(),Yw.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}},Tx=[Ai("data"),Ai("components"),Ai("dom"),Ki("hasSubmenu",!1),Fi("toggling"),op.field("itemBehaviours",[hx,Yw,Aw,tp]),Ki("ignoreFocus",!1),Ki("domModification",{}),fl("builder",kx),Ki("eventOrder",{})],Ox=function(t){return{dom:t.dom,components:t.components,events:Eu([Fu(nu())])}},_x=[Ai("dom"),Ai("components"),fl("builder",Ox)],Ex=w("item-widget"),Ax=w([Rp({name:"widget",overrides:function(t){return{behaviours:mf([tp.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:p}})])}}})]),Dx=function(t){var e=qp(Ex(),t,Ax()),n=Gp(Ex(),t,e.internals()),r=function(e){return Kp(e,t,"widget").map((function(t){return Aw.focusIn(t),t}))},o=function(e,n){return gv(n.event.target)?P.none():function(){return t.autofocus?(n.setSource(e.element),P.none()):P.none()}()};return{dom:t.dom,components:n,domModification:t.domModification,events:Eu([$u((function(t,e){r(t).each((function(t){e.stop()}))})),Nu(Ia(),wx),Nu(nu(),(function(e,n){t.autofocus?r(e):Yw.focus(e)}))]),behaviours:op.augment(t.widgetBehaviours,[tp.config({store:{mode:"memory",initialValue:t.data}}),Yw.config({ignore:t.ignoreFocus,onFocus:function(t){xx(t)}}),Aw.config({mode:"special",focusIn:t.autofocus?function(t){r(t)}:bf(),onLeft:o,onRight:o,onEscape:function(e,n){return Yw.isFocused(e)||t.autofocus?t.autofocus?(n.setSource(e.element),P.none()):P.none():(Yw.focus(e),P.some(!0))}})])}},Mx=[Ai("uid"),Ai("data"),Ai("components"),Ai("dom"),Ki("autofocus",!1),Ki("ignoreFocus",!1),op.field("widgetBehaviours",[tp,Yw,Aw]),Ki("domModification",{}),ev(Ax()),fl("builder",Dx)],Nx=ki("type",{widget:Mx,item:Tx,separator:_x}),Rx=function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}},zx=function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}},Bx=function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}},Px=w([Pp({factory:{sketch:function(t){var e=Ci("menu.spec item",Nx,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return _t(e,"uid")?e:A(A({},e),{uid:dc("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Ix=w([Ai("value"),Ai("items"),Ai("dom"),Ai("components"),Ki("eventOrder",{}),ep("menuBehaviours",[rb,tp,bv,Aw]),Xi("movement",{mode:"menu",moveOnTab:!0},ki("mode",{grid:[ml(),fl("config",Rx)],matrix:[fl("config",zx),Ai("rowSelector")],menu:[Ki("moveOnTab",!0),fl("config",Bx)]})),rl(),Ki("fakeFocus",!1),Ki("focusManager",Tb()),ul("onHighlight")]),Lx=w("alloy.menu-focus"),Hx=function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:rp(t.menuBehaviours,[rb.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),tp.config({store:{mode:"memory",initialValue:t.value}}),bv.config({find:P.some}),Aw.config(t.movement.config(t,t.movement))]),events:Eu([Nu(Sx(),(function(t,e){var n=e.event;t.getSystem().getByDom(n.target).each((function(n){rb.highlight(t,n),e.stop(),Su(t,Lx(),{menu:t,item:n})}))})),Nu(Cx(),(function(t,e){var n=e.event.item;rb.highlight(t,n)}))]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}},Fx=mv({name:"Menu",configFields:Ix(),partFields:Px(),factory:Hx}),Vx=function(t){return yt(t,(function(t,e){return{k:t,v:e}}))},jx=function(t,e,n,r){return Ot(n,r).bind((function(r){return Ot(t,r).bind((function(r){var o=jx(t,e,n,r);return P.some([r].concat(o))}))})).getOr([])},Ux=function(t,e){var n={};vt(t,(function(t,e){G(t,(function(t){n[t]=e}))}));var r=e,o=Vx(e),i=bt(o,(function(t,e){return[e].concat(jx(n,r,o,e))}));return bt(n,(function(t){return Ot(i,t).getOr([t])}))},Wx=function(){var t=oa({}),e=oa({}),n=oa({}),r=od(),o=oa({}),i=function(){t.set({}),e.set({}),n.set({}),r.clear()},a=function(){return r.get().isNone()},u=function(t,n){var r;e.set(A(A({},e.get()),(r={},r[t]={type:"prepared",menu:n},r)))},c=function(i,a,u,c){r.set(i),t.set(u),e.set(a),o.set(c);var s=Ux(c,u);n.set(s)},s=function(e){return kt(t.get(),(function(t,n){return t===e}))},l=function(t,e,n){return h(t).bind((function(r){return s(t).bind((function(t){return e(t).map((function(t){return{triggeredMenu:r,triggeringItem:t,triggeringPath:n}}))}))}))},f=function(t,e){var o=Y(v(t).toArray(),(function(t){return h(t).isSome()}));return Ot(n.get(),t).bind((function(t){var n=it(o.concat(t)),i=rt(n,(function(t,o){return l(t,e,n.slice(0,o+1)).fold((function(){return At(r.get(),t)?[]:[P.none()]}),(function(t){return[P.some(t)]}))}));return Nt(i)}))},d=function(e){return Ot(t.get(),e).map((function(t){var r=Ot(n.get(),e).getOr([]);return[t].concat(r)}))},m=function(t){return Ot(n.get(),t).bind((function(t){return t.length>1?P.some(t.slice(1)):P.none()}))},g=function(t){return Ot(n.get(),t)},h=function(t){return p(t).bind($x)},p=function(t){return Ot(e.get(),t)},v=function(e){return Ot(t.get(),e)},b=function(t){var e=o.get();return at(ht(e),t)},y=function(){return r.get().bind(h)},w=function(){return e.get()};return{setMenuBuilt:u,setContents:c,expand:d,refresh:g,collapse:m,lookupMenu:p,lookupItem:v,otherMenus:b,getPrimary:y,getMenus:w,clear:i,isClear:a,getTriggeringPath:f}},$x=function(t){return"prepared"===t.type?P.some(t.menu):P.none()},qx={init:Wx,extractPreparedMenu:$x},Gx=function(t,e){var n,r=od(),o=function(e,n,r){return bt(r,(function(r,o){var i=function(){return Fx.sketch(A(A({},r),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?Ob():Tb()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))},i=qx.init(),a=function(e){var n=o(e,t.data.primary,t.data.menus),r=s();return i.setContents(t.data.primary,n,t.data.expansions,r),i.getPrimary()},u=function(t){return tp.getValue(t).value},c=function(t,e,n){return gt(e,(function(t){if(!t.getSystem().isConnected())return P.none();var e=rb.getCandidates(t);return tt(e,(function(t){return u(t)===n}))}))},s=function(e){return bt(t.data.menus,(function(t,e){return rt(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},l=function(t,e){rb.highlight(t,e),rb.getHighlighted(e).orThunk((function(){return rb.getFirst(e)})).each((function(e){Tu(t,e.element,nu())}))},f=function(t,e){return Mt(q(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?P.some(t.menu):P.none()}))})))},d=function(e,n,r){var o=f(n,n.otherMenus(r));G(o,(function(n){ls(n.element,[t.markers.backgroundMenu]),t.stayInDom||Hw.remove(e,n)}))},m=function(e){return r.get().getOrThunk((function(){var n={},o=Xm(e.element,"."+t.markers.item),i=Y(o,(function(t){return"true"===jn(t,"aria-haspopup")}));return G(i,(function(t){e.getSystem().getByDom(t).each((function(t){var e=u(t);n[e]=t}))})),r.set(n),n}))},g=function(t,e){var n=m(t);vt(n,(function(t,n){var r=j(e,n);Fn(t.element,"aria-expanded",r)}))},h=function(e,n,r){return P.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return P.none();var i=o.menu,a=f(n,r.slice(1));return G(a,(function(e){is(e.element,t.markers.backgroundMenu)})),Pn(i.element)||Hw.append(e,Es(i)),ls(i.element,[t.markers.backgroundMenu]),l(e,i),d(e,n,r),P.some(i)}))}))};(function(t){t[t["HighlightSubmenu"]=0]="HighlightSubmenu",t[t["HighlightParent"]=1]="HighlightParent"})(n||(n={}));var v=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return i.setMenuBuilt(e,r),r}return n.menu},b=function(e,r,o){if(void 0===o&&(o=n.HighlightSubmenu),r.hasConfigured(Iv)&&Iv.isDisabled(r))return P.some(r);var a=u(r);return i.expand(a).bind((function(a){return g(e,a),P.from(a[0]).bind((function(u){return i.lookupMenu(u).bind((function(c){var s=v(e,u,c);return Pn(s.element)||Hw.append(e,Es(s)),t.onOpenSubmenu(e,r,s,it(a)),o===n.HighlightSubmenu?(rb.highlightFirst(s),h(e,i,a)):(rb.dehighlightAll(s),P.some(r))}))}))}))},y=function(e,n){var r=u(n);return i.collapse(r).bind((function(r){return g(e,r),h(e,i,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},w=function(t,e){var n=u(e);return i.refresh(n).bind((function(e){return g(t,e),h(t,i,e)}))},x=function(t,e){return gv(e.element)?P.none():b(t,e,n.HighlightSubmenu)},C=function(t,e){return gv(e.element)?P.none():y(t,e)},S=function(e,n){return y(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))},k=function(e){return function(n,r){return Hs(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(_)}))}))}},T=Eu([Nu(Lx(),(function(t,e){var n=e.event.item;i.lookupItem(u(n)).each((function(){var n=e.event.menu;rb.highlight(t,n);var r=u(e.event.item);i.refresh(r).each((function(e){return d(t,i,e)}))}))})),$u((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){var o=u(r);0===o.indexOf("collapse-item")&&y(e,r),b(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),p)}))})),ju((function(e,n){a(e).each((function(n){Hw.append(e,Es(n)),t.onOpenMenu(e,n),t.highlightImmediately&&l(e,n)}))}))].concat(t.navigateOnHover?[Nu(Cx(),(function(e,r){var o=r.event.item;w(e,o),b(e,o,n.HighlightParent),t.onHover(e,o)}))]:[])),O=function(t){return rb.getHighlighted(t).bind(rb.getHighlighted)},E=function(t){O(t).each((function(e){y(t,e)}))},D=function(t){i.getPrimary().each((function(e){l(t,e)}))},M=function(t){return P.from(t.components()[0]).filter((function(t){return"menu"===jn(t.element,"role")}))},N=function(e){var n=i.getPrimary().bind((function(t){return O(e).bind((function(t){var n=u(t),r=Tt(i.getMenus()),o=Mt(q(r,qx.extractPreparedMenu));return i.getTriggeringPath(n,(function(t){return c(e,o,t)}))})).map((function(e){return{primary:t,triggeringPath:e}}))}));n.fold((function(){M(e).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))},R={collapseMenu:E,highlightPrimary:D,repositionMenus:N};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:rp(t.tmenuBehaviours,[Aw.config({mode:"special",onRight:k(x),onLeft:k(C),onEscape:k(S),focusIn:function(t,e){i.getPrimary().each((function(e){Tu(t,e.element,nu())}))}}),rb.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),bv.config({find:function(t){return rb.getHighlighted(t)}}),Hw.config({})]),eventOrder:t.eventOrder,apis:R,events:T}},Kx=w("collapse-item"),Xx=function(t,e,n){return{primary:t,menus:e,expansions:n}},Yx=function(t,e){return{primary:t,menus:ma(t,e),expansions:{}}},Jx=function(t){return{value:oc(Kx()),meta:{text:t}}},Zx=dv({name:"TieredMenu",configFields:[ll("onExecute"),ll("onEscape"),sl("onOpenMenu"),sl("onOpenSubmenu"),ul("onRepositionMenu"),ul("onCollapseMenu"),Ki("highlightImmediately",!0),Ii("data",[Ai("primary"),Ai("menus"),Ai("expansions")]),Ki("fakeFocus",!1),ul("onHighlight"),ul("onHover"),ol(),Ai("dom"),Ki("navigateOnHover",!0),Ki("stayInDom",!1),ep("tmenuBehaviours",[Aw,rb,bv,Hw]),Ki("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:Gx,extraApis:{tieredData:Xx,singleData:Yx,collapseItem:Jx}}),Qx=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Ql()},onRtl:function(){return tf()}}}:{},u=function(t){return 2===t.length},c=function(t){return u(t)?a:{}};return Zx.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return bh.close(e),t.onEscape.map((function(t){return t(e)})),P.some(!0)},onExecute:function(){return P.some(!0)},onOpenMenu:function(t,e){Lg.positionWithinBounds(i().getOrDie(),e,n,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();Lg.position(o,n,{anchor:A({type:"submenu",item:e},c(r))})},onRepositionMenu:function(t,e,r){var a=i().getOrDie();Lg.positionWithinBounds(a,e,n,o()),G(r,(function(t){var e=c(t.triggeringPath);Lg.position(a,t.triggeredMenu,{anchor:A({type:"submenu",item:t.triggeringItem},e)})}))}})},tC=function(t,e){var n=function(e,n){var r=t.getRelated(e);return r.exists((function(t){return Us(t,n)}))},r=function(t,e){bh.setContent(t,e)},o=function(t,e,n){i(t,e,n,P.none())},i=function(t,e,n,r){a(t,e,n,(function(){return r.map((function(t){return Jr(t)}))}))},a=function(e,n,r,o){var i=t.lazySink(e).getOrDie();bh.openWhileCloaked(e,n,(function(){return Lg.positionWithinBounds(i,e,r,o())})),tp.setValue(e,P.some({mode:"position",config:r,getBounds:o}))},u=function(t,e,n){c(t,e,n,P.none)},c=function(e,n,r,o){var i=Qx(t,e,n,r,o);bh.open(e,i),tp.setValue(e,P.some({mode:"menu",menu:i}))},s=function(t){bh.isOpen(t)&&(tp.setValue(t,P.none()),bh.close(t))},l=function(t){return bh.getState(t)},f=function(e){bh.isOpen(e)&&tp.getValue(e).each((function(n){switch(n.mode){case"menu":bh.getState(e).each(Zx.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();Lg.positionWithinBounds(r,e,n.config,n.getBounds());break}}))},d={setContent:r,showAt:o,showWithin:i,showWithinBounds:a,showMenuAt:u,showMenuWithinBounds:c,hide:s,getContent:l,reposition:f,isOpen:bh.isOpen};return{uid:t.uid,dom:t.dom,behaviours:rp(t.inlineBehaviours,[bh.config({isPartOf:function(t,e,r){return Us(e,r)||n(t,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),tp.config({store:{mode:"memory",initialValue:P.none()}}),yf.config({channels:A(A({},Sh(A({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Th(A(A({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:f})))})]),eventOrder:t.eventOrder,apis:d}},eC=dv({name:"InlineView",configFields:[Ai("lazySink"),ul("onShow"),ul("onHide"),Wi("onEscape"),ep("inlineBehaviours",[bh,tp,yf]),qi("fireDismissalEventInstead",[Ki("event",gu())]),qi("fireRepositionEventInstead",[Ki("event",hu())]),Ki("getRelated",P.none),Ki("isExtraPart",O),Ki("eventOrder",P.none)],factory:tC,apis:{showAt:function(t,e,n,r){t.showAt(e,n,r)},showWithin:function(t,e,n,r,o){t.showWithin(e,n,r,o)},showWithinBounds:function(t,e,n,r,o){t.showWithinBounds(e,n,r,o)},showMenuAt:function(t,e,n,r){t.showMenuAt(e,n,r)},showMenuWithinBounds:function(t,e,n,r,o){t.showMenuWithinBounds(e,n,r,o)},hide:function(t,e){t.hide(e)},isOpen:function(t,e){return t.isOpen(e)},getContent:function(t,e){return t.getContent(e)},setContent:function(t,e,n){t.setContent(e,n)},reposition:function(t,e){t.reposition(e)}}}),nC="layout-inset",rC=function(t){return t.x},oC=function(t,e){return t.x+t.width/2-e.width/2},iC=function(t,e){return t.x+t.width-e.width},aC=function(t){return t.y},uC=function(t,e){return t.y+t.height-e.height},cC=function(t,e){return t.y+t.height/2-e.height/2},sC=function(t,e,n){return gl(iC(t,e),uC(t,e),n.insetSouthwest(),Cl(),"southwest",Dl(t,{right:0,bottom:3}),nC)},lC=function(t,e,n){return gl(rC(t),uC(t,e),n.insetSoutheast(),xl(),"southeast",Dl(t,{left:1,bottom:3}),nC)},fC=function(t,e,n){return gl(iC(t,e),aC(t),n.insetNorthwest(),wl(),"northwest",Dl(t,{right:0,top:2}),nC)},dC=function(t,e,n){return gl(rC(t),aC(t),n.insetNortheast(),yl(),"northeast",Dl(t,{left:1,top:2}),nC)},mC=function(t,e,n){return gl(oC(t,e),aC(t),n.insetNorth(),Sl(),"north",Dl(t,{top:2}),nC)},gC=function(t,e,n){return gl(oC(t,e),uC(t,e),n.insetSouth(),kl(),"south",Dl(t,{bottom:3}),nC)},hC=function(t,e,n){return gl(iC(t,e),cC(t,e),n.insetEast(),Ol(),"east",Dl(t,{right:0}),nC)},pC=function(t,e,n){return gl(rC(t),cC(t,e),n.insetWest(),Tl(),"west",Dl(t,{left:1}),nC)},vC=function(t){switch(t){case"north":return mC;case"northeast":return dC;case"northwest":return fC;case"south":return gC;case"southeast":return lC;case"southwest":return sC;case"east":return hC;case"west":return pC}},bC=function(t,e,n,r,o){var i=qf(r).map(vC).getOr(mC);return i(t,e,n,r,o)},yC=function(t){switch(t){case"north":return gC;case"northeast":return lC;case"northwest":return sC;case"south":return mC;case"southeast":return dC;case"southwest":return fC;case"east":return pC;case"west":return hC}},wC=function(t,e,n,r,o){var i=qf(r).map(yC).getOr(mC);return i(t,e,n,r,o)},xC=tinymce.util.Tools.resolve("tinymce.util.Delay"),CC=function(t){var e=vx(t.action),n=t.dom.tag,r=function(e){return Ot(t.dom,"attributes").bind((function(t){return Ot(t,e)}))},o=function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return A({type:t},e)}var o=r("role").getOr("button");return{role:o}};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:op.augment(t.buttonBehaviours,[Yw.config({}),Aw.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:o()},eventOrder:t.eventOrder}},SC=dv({name:"Button",factory:CC,configFields:[Ki("uid",void 0),Ai("dom"),Ki("components",[]),op.field("buttonBehaviours",[Yw,Aw]),Fi("action"),Fi("role"),Ki("eventOrder",{})]}),kC=function(t){var e=sv(t)&&Et(t,"uid")?t.uid:dc("memento"),n=function(t){return t.getSystem().getByUid(e).getOrDie()},r=function(t){return t.getSystem().getByUid(e).toOptional()},o=function(){return A(A({},t),{uid:e})};return{get:n,getOpt:r,asSpec:o}},TC=tinymce.util.Tools.resolve("tinymce.util.I18n"),OC={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},_C="temporary-placeholder",EC=function(t){return function(){return Ot(t,_C).getOr("!not found!")}},AC=function(t,e){var n=t.toLowerCase();if(TC.isRtl()){var r=Vt(n,"-rtl");return _t(e,r)?r:n}return n},DC=function(t,e){return Ot(e,AC(t,e))},MC=function(t,e){var n=e();return DC(t,n).getOrThunk(EC(n))},NC=function(t,e,n){var r=e();return DC(t,r).or(n).getOrThunk(EC(r))},RC=function(t){return!!TC.isRtl()&&_t(OC,t)},zC=function(){return Vw("add-focusable",[ju((function(t){Is(t.element,"svg").each((function(t){return Fn(t,"focusable","false")}))}))])},BC=function(t,e,n,r){var o,i,a=RC(e)?["tox-icon--flip"]:[],u=Ot(n,AC(e,n)).or(r).getOrThunk(EC(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(a),innerHtml:u},behaviours:mf(M(M([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[zC()],!1))}},PC=function(t,e,n,r){return void 0===r&&(r=P.none()),BC(e,t,n(),r)},IC=function(t,e,n){var r=n(),o=tt(t,(function(t){return _t(r,AC(t,r))}));return BC(e,o.getOr(_C),r,P.none())},LC={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},HC=function(t){var e=kC({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:mf([Hw.config({})])}),n=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},r=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},o=kC({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},r(0)],behaviours:mf([Hw.config({})])}),i=function(t,e){t.getSystem().isConnected()&&o.getOpt(t).each((function(t){Hw.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},r(e)])}))},a=function(t,n){if(t.getSystem().isConnected()){var r=e.get(t);Hw.set(r,[Ss(n)])}},u={updateProgress:i,updateText:a},c=nt([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return P.from(LC[t])})).toArray()]),s=kC(SC.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[PC("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),l=IC(c,{tag:"div",classes:["tox-notification__icon"]},t.iconProvider),f={dom:{tag:"div",classes:["tox-notification__body"]},components:[e.asSpec()],behaviours:mf([Hw.config({})])},d=[l,f];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},behaviours:mf([Yw.config({}),Vw("notification-events",[Nu(La(),(function(t){s.getOpt(t).each(Yw.focus)}))])]),components:d.concat(t.progress?[o.asSpec()]:[]).concat(t.closeButton?[s.asSpec()]:[]),apis:u}},FC=dv({name:"Notification",factory:HC,configFields:[Fi("level"),Ai("progress"),Ai("icon"),Ai("onAction"),Ai("text"),Ai("iconProvider"),Ai("translationProvider"),Qi("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function VC(t,e,n){var r=e.backstage.shared,o=function(t){switch(t){case"bc-bc":return gC;case"tc-tc":return mC;case"tc-bc":return $l;case"bc-tc":default:return ql}},i=function(t){t.length>0&&G(t,(function(e,n){0===n?e.moveRel(null,"banner"):e.moveRel(t[n-1].getEl(),"bc-tc")}))},a=function(e,i){var a=!e.closeButton&&e.timeout&&(e.timeout>0||e.timeout<0),u=function(){i(),eC.hide(s)},c=_s(FC.sketch({text:e.text,level:j(["success","error","warning","warn","info"],e.type)?e.type:void 0,progress:!0===e.progressBar,icon:P.from(e.icon),closeButton:!a,onAction:u,iconProvider:r.providers.icons,translationProvider:r.providers.translate})),s=_s(eC.sketch(A({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:r.getSink,fireDismissalEventInstead:{}},r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));n.add(s),e.timeout>0&&xC.setTimeout((function(){u()}),e.timeout);var l=function(){var e=Jr(ee.fromDom(t.getContentAreaContainer())),n=Qr(),r=El(n.x,e.x,e.right),o=El(n.y,e.y,e.bottom),i=Math.max(e.right,n.right),a=Math.max(e.bottom,n.bottom);return P.some(Yr(r,o,i-r,a-o))};return{close:u,moveTo:function(t,e){eC.showAt(s,Es(c),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){var n=Es(c),i={maxHeightFunction:_d()};if("banner"!==e&&d(t)){var a=o(e),u={type:"node",root:In(),node:P.some(ee.fromDom(t)),overrides:i,layouts:{onRtl:function(){return[a]},onLtr:function(){return[a]}}};eC.showWithinBounds(s,n,{anchor:u},l)}else{var f=A(A({},r.anchors.banner()),{overrides:i});eC.showWithinBounds(s,n,{anchor:f},l)}},text:function(t){FC.updateText(c,t)},settings:e,getEl:function(){return c.element.dom},progressBar:{value:function(t){FC.updateProgress(c,t)}}}},u=function(t){t.close()},c=function(t){return t.settings};return{open:a,close:u,reposition:i,getArgs:c}}var jC,UC=function(t,e){var n=null,r=function(){c(n)||(clearTimeout(n),n=null)},o=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];c(n)&&(n=setTimeout((function(){n=null,t.apply(null,r)}),e))};return{cancel:r,throttle:o}},WC=function(t,e){var n=null,r=function(){c(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},$C=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),qC=function(t,e){return t.isBlock(e)||j(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)},GC=function(t,e,n,r,o){var i=$C(t,(function(e){return qC(t,e)}));return P.from(i.backwards(e,n,r,o))},KC="[data-mce-autocompleter]",XC=function(t,e){return YC(ee.fromDom(t.selection.getNode())).getOrThunk((function(){var n=ee.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Dr(n,ee.fromDom(e.extractContents())),e.insertNode(n.dom),vn(n).each((function(t){return t.dom.normalize()})),Gm(n).map((function(e){t.selection.setCursorLocation(e.dom,Um(e))})),n}))},YC=function(t){return Hs(t,KC)},JC=function(t){return t.collapsed&&3===t.startContainer.nodeType},ZC=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},QC=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},tS=function(t,e){return t.substring(e.length)},eS=function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(QC(o))return P.none();if(o===n)break}return P.some(r)},nS=function(t,e,n,r){if(void 0===r&&(r=0),!JC(e))return P.none();var o=function(t,e,r){return eS(r,e,n).getOr(e)},i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return GC(t,e.startContainer,e.startOffset,o,i).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return P.none();var i=ZC(o),a=i.lastIndexOf(n);return 0!==a||tS(i,n).length<r?P.none():P.some({text:tS(i,n),range:o,triggerChar:n})}))},rS=function(t,e,n,r){return void 0===r&&(r=0),YC(ee.fromDom(e.startContainer)).fold((function(){return nS(t,e,n,r)}),(function(e){var r=t.createRng();r.selectNode(e.dom);var o=ZC(r);return P.some({range:r,text:tS(o,n),triggerChar:n})}))},oS=function(t,e){e.on("keypress compositionend",t.onKeypress.throttle),e.on("remove",t.onKeypress.cancel);var n=function(t,e){Su(t,Fa(),{raw:e})};e.on("keydown",(function(e){var r=function(){return t.getView().bind(rb.getHighlighted)};8===e.which&&t.onKeypress.throttle(e),t.isActive()&&(27===e.which&&t.cancelIfNecessary(),t.isMenuOpen()?13===e.which?(r().each(ku),e.preventDefault()):40===e.which?(r().fold((function(){t.getView().each(rb.highlightFirst)}),(function(t){n(t,e)})),e.preventDefault(),e.stopImmediatePropagation()):37!==e.which&&38!==e.which&&39!==e.which||r().each((function(t){n(t,e),e.preventDefault(),e.stopImmediatePropagation()})):13!==e.which&&38!==e.which&&40!==e.which||t.cancelIfNecessary())})),e.on("NodeChange",(function(e){t.isActive()&&!t.isProcessingAction()&&YC(ee.fromDom(e.element)).isNone()&&t.cancelIfNecessary()}))},iS={setup:oS},aS=tinymce.util.Tools.resolve("tinymce.util.Promise"),uS=function(t,e){return{container:t,offset:e}},cS=function(t){return t.nodeType===ae},sS=function(t){return t.nodeType===ie},lS=function(t){if(cS(t))return uS(t,t.data.length);var e=t.childNodes;return e.length>0?lS(e[e.length-1]):uS(t,e.length)},fS=function(t,e){var n=t.childNodes;return n.length>0&&e<n.length?fS(n[e],0):n.length>0&&sS(t)&&n.length===e?lS(n[n.length-1]):uS(t,e)},dS=function(t,e){return GC(t,e.container,e.offset,(function(t,e){return 0===e?-1:e}),t.getRoot()).filter((function(t){var e=t.container.data.charAt(t.offset-1);return!QC(e)})).isSome()},mS=function(t){return function(e){var n=fS(e.startContainer,e.startOffset);return!dS(t,n)}},gS=function(t,e,n){return gt(n.triggerChars,(function(n){return rS(t,e,n)}))},hS=function(t,e){var n=e(),r=t.selection.getRng();return gS(t.dom,r,n).bind((function(n){return pS(t,e,n)}))},pS=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng(),a=i.startContainer.nodeValue,u=Y(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return mS(t.dom)}))(n.range,a,n.text)}));if(0===u.length)return P.none();var c=aS.all(q(u,(function(t){var e=t.fetch(n.text,t.maxResults,r);return e.then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}}))})));return P.some({lookupData:c,context:n})},vS=ti([Ni("type"),Ui("text")]),bS=function(t){return wi("separatormenuitem",vS,t)},yS=ti([Ki("type","autocompleteitem"),Ki("active",!1),Ki("disabled",!1),Ki("meta",{}),Ni("value"),Ui("text"),Ui("icon")]),wS=ti([Ni("type"),Ni("ch"),Yi("minChars",1),Ki("columns",1),Yi("maxResults",10),Wi("matches"),Bi("fetch"),Bi("onAction"),na("highlightOn",[],si)]),xS=function(t){return wi("Autocompleter.Separator",vS,t)},CS=function(t){return wi("Autocompleter.Item",yS,t)},SS=function(t){return wi("Autocompleter",wS,t)},kS=[Qi("disabled",!1),Ui("tooltip"),Ui("icon"),Ui("text"),ta("onSetup",(function(){return p}))],TS=ti([Ni("type"),Bi("onAction")].concat(kS)),OS=function(t){return wi("toolbarbutton",TS,t)},_S=[Qi("active",!1)].concat(kS),ES=ti(_S.concat([Ni("type"),Bi("onAction")])),AS=function(t){return wi("ToggleButton",ES,t)},DS=[ta("predicate",O),Zi("scope","node",["node","editor"]),Zi("position","selection",["node","selection","line"])],MS=kS.concat([Ki("type","contextformbutton"),Ki("primary",!1),Bi("onAction"),_i("original",x)]),NS=_S.concat([Ki("type","contextformbutton"),Ki("primary",!1),Bi("onAction"),_i("original",x)]),RS=kS.concat([Ki("type","contextformbutton")]),zS=_S.concat([Ki("type","contextformtogglebutton")]),BS=ki("type",{contextformbutton:MS,contextformtogglebutton:NS}),PS=ti([Ki("type","contextform"),ta("initValue",w("")),Ui("label"),Hi("commands",BS),Vi("launch",ki("type",{contextformbutton:RS,contextformtogglebutton:zS}))].concat(DS)),IS=function(t){return wi("ContextForm",PS,t)},LS=ti([Ki("type","contexttoolbar"),Ni("items")].concat(DS)),HS=function(t){return wi("ContextToolbar",LS,t)},FS=function(t){var e={};return G(t,(function(t){e[t]={}})),ht(e)},VS=function(t){var e=t.ui.registry.getAll().popups,n=bt(e,(function(t){return SS(t).fold((function(t){throw new Error(Si(t))}),x)})),r=FS(St(n,(function(t){return t.ch}))),o=Tt(n),i=function(t){return Y(o,(function(e){return e.ch===t}))};return{dataset:n,triggerChars:r,lookupByChar:i}};(function(t){t[t["CLOSE_ON_EXECUTE"]=0]="CLOSE_ON_EXECUTE",t[t["BUBBLE_TO_SANDBOX"]=1]="BUBBLE_TO_SANDBOX"})(jC||(jC={}));var jS,US=jC,WS="tox-menu-nav__js",$S="tox-collection__item",qS="tox-swatch",GS={normal:WS,color:qS},KS="tox-collection__item--enabled",XS="tox-collection__group-heading",YS="tox-collection__item-icon",JS="tox-collection__item-label",ZS="tox-collection__item-accessory",QS="tox-collection__item-caret",tk="tox-collection__item-checkmark",ek="tox-collection__item--active",nk="tox-collection__item-container",rk="tox-collection__item-container--column",ok="tox-collection__item-container--row",ik="tox-collection__item-container--align-right",ak="tox-collection__item-container--align-left",uk="tox-collection__item-container--valign-top",ck="tox-collection__item-container--valign-middle",sk="tox-collection__item-container--valign-bottom",lk=function(t){return Ot(GS,t).getOr(WS)},fk=function(t){return"color"===t?"tox-swatches":"tox-menu"},dk=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:fk(t),tieredMenu:"tox-tiered-menu"}},mk=function(t){var e=dk(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:lk(t)}},gk=function(t,e,n){var r=dk(n);return{tag:"div",classes:nt([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},hk=[Fx.parts.items({})],pk=function(t,e,n){var r=dk(n),o={tag:"div",classes:nt([[r.tieredMenu]])};return{dom:o,markers:mk(n)}},vk=function(t,e){return function(n){var r=$(n,e);return q(r,(function(e){return{dom:t,components:e}}))}},bk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Fx.parts.items({preprocess:"auto"!==t?vk({tag:"div",classes:["tox-swatches__row"]},t):x})]}]}},yk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Fx.parts.items({preprocess:vk({tag:"div",classes:["tox-collection__group"]},t)})]}},wk=function(t,e){var n=[],r=[];return G(t,(function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],_t(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),r.length>0&&n.push(r),q(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},xk=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Fx.parts.items({preprocess:function(n){return"auto"!==t&&t>1?vk({tag:"div",classes:["tox-collection__group"]},t)(n):wk(n,(function(t,n){return"separator"===e[n].type}))}})]}},Ck=function(t,e){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Fx.parts.items({preprocess:function(e){return wk(e,(function(e,n){return"separator"===t[n].type}))}})]}},Sk=function(t){return U(t,(function(t){return"icon"in t&&void 0!==t.icon}))},kk=function(t){return console.error(Si(t)),console.log(t),P.none()},Tk=function(t,e,n,r,o){var i=Ck(n);return{value:t,dom:i.dom,components:i.components,items:n}},Ok=function(t,e,n,r,o){if("color"===o){var i=bk(r);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&"auto"===r){i=xk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&1===r){i=xk(1,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o){i=xk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("listpreview"===o&&"auto"!==r){i=yk(r);return{value:t,dom:i.dom,components:i.components,items:n}}return{value:t,dom:gk(e,r,o),components:hk,items:n}},_k=[Ni("type"),Ni("src"),Ui("alt"),na("classes",[],si)],Ek=ti(_k),Ak=[Ni("type"),Ni("text"),Ui("name"),na("classes",["tox-collection__item-label"],si)],Dk=ti(Ak),Mk=Jo((function(){return hi("type",{cardimage:Ek,cardtext:Dk,cardcontainer:Nk})})),Nk=ti([Ni("type"),Ji("direction","horizontal"),Ji("align","left"),Ji("valign","middle"),Hi("items",Mk)]),Rk=[Qi("disabled",!1),Ui("text"),Ui("shortcut"),Oi("value","value",To((function(){return oc("menuitem-value")})),ai()),Ki("meta",{})],zk=ti([Ni("type"),Ui("label"),Hi("items",Mk),ta("onSetup",(function(){return p})),ta("onAction",p)].concat(Rk)),Bk=function(t){return wi("cardmenuitem",zk,t)},Pk=ti([Ni("type"),Qi("active",!1),Ui("icon")].concat(Rk)),Ik=function(t){return wi("choicemenuitem",Pk,t)},Lk=[Ni("type"),Ni("fancytype"),ta("onAction",p)],Hk=[Ki("initData",{})].concat(Lk),Fk=[ra("initData",{},[Qi("allowCustomColors",!0),$i("colors",ai())])].concat(Lk),Vk=ki("fancytype",{inserttable:Hk,colorswatch:Fk}),jk=function(t){return wi("fancymenuitem",Vk,t)},Uk=ti([Ni("type"),ta("onSetup",(function(){return p})),ta("onAction",p),Ui("icon")].concat(Rk)),Wk=function(t){return wi("menuitem",Uk,t)},$k=ti([Ni("type"),Bi("getSubmenuItems"),ta("onSetup",(function(){return p})),Ui("icon")].concat(Rk)),qk=function(t){return wi("nestedmenuitem",$k,t)},Gk=ti([Ni("type"),Ui("icon"),Qi("active",!1),ta("onSetup",(function(){return p})),Bi("onAction")].concat(Rk)),Kk=function(t){return wi("togglemenuitem",Gk,t)},Xk=function(t,e,n){var r=Xm(t.element,"."+n);if(r.length>0){var o=et(r,(function(t){var n=t.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return P.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return P.none()},Yk=function(t,e){return mf([Vw(t,e)])},Jk=function(t){return Yk(oc("unnamed-events"),t)},Zk={namedEvents:Yk,unnamedEvents:Jk},Qk=oc("tooltip.exclusive"),tT=oc("tooltip.show"),eT=oc("tooltip.hide"),nT=function(t,e,n){t.getSystem().broadcastOn([Qk],{})},rT=function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Hw.set(t,r)}))},oT=Object.freeze({__proto__:null,hideAllExclusive:nT,setComponents:rT}),iT=function(t,e){var n=function(n){e.getTooltip().each((function(r){Gg(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()},r=function(n){if(!e.isShowing()){nT(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:Eu("normal"===t.mode?[Nu(Ia(),(function(t){Cu(n,tT)})),Nu(Ba(),(function(t){Cu(n,eT)}))]:[]),behaviours:mf([Hw.config({})])});e.setTooltip(o),Wg(r,o),t.onShow(n,o),Lg.position(r,o,{anchor:t.anchor(n)})}};return Eu(nt([[Nu(tT,(function(n){e.resetTimer((function(){r(n)}),t.delay)})),Nu(eT,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Nu(tu(),(function(t,e){var r=e;r.universal||j(r.channels,Qk)&&n(t)})),Uu((function(t){n(t)}))],"normal"===t.mode?[Nu(La(),(function(t){Cu(t,tT)})),Nu(Za(),(function(t){Cu(t,eT)})),Nu(Ia(),(function(t){Cu(t,tT)})),Nu(Ba(),(function(t){Cu(t,eT)}))]:[Nu(wu(),(function(t,e){Cu(t,tT)})),Nu(xu(),(function(t){Cu(t,eT)}))]]))},aT=Object.freeze({__proto__:null,events:iT}),uT=[Ai("lazySink"),Ai("tooltipDom"),Ki("exclusive",!0),Ki("tooltipComponents",[]),Ki("delay",300),Zi("mode","normal",["normal","follow-highlight"]),Ki("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:w([ql,$l,Vl,Ul,jl,Wl]),onRtl:w([ql,$l,Vl,Ul,jl,Wl])}}})),ul("onHide"),ul("onShow")],cT=function(){var t=od(),e=od(),n=function(){t.on(clearTimeout)},r=function(e,r){n(),t.set(setTimeout(e,r))},o=w("not-implemented");return Tc({getTooltip:e.get,isShowing:e.isSet,setTooltip:e.set,clearTooltip:e.clear,clearTimer:n,resetTimer:r,readState:o})},sT=Object.freeze({__proto__:null,init:cT}),lT=hf({fields:uT,name:"tooltipping",active:aT,state:sT,apis:oT}),fT=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},dT=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),mT=tinymce.util.Tools.resolve("tinymce.EditorManager"),gT=function(t){var e=t.getParam("skin"),n=t.getParam("skin_url");if(!1!==e){var r=e||"oxide";n=n?t.documentBaseURI.toAbsolute(n):mT.baseURL+"/skins/ui/"+r}return n},hT=function(t){return t.getParam("readonly",!1,"boolean")},pT=function(t){return!1===t.getParam("skin")},vT=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},bT=function(t){return t.getParam("width",dT.DOM.getStyle(t.getElement(),"width"))},yT=function(t){return P.from(t.getParam("min_width")).filter(g)},wT=function(t){return P.from(t.getParam("min_height")).filter(g)},xT=function(t){return P.from(t.getParam("max_width")).filter(g)},CT=function(t){return P.from(t.getParam("max_height")).filter(g)},ST=function(t){return P.from(t.getParam("style_formats")).filter(u)},kT=function(t){return t.getParam("style_formats_merge",!1,"boolean")},TT=function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},OT=function(t){return t.getParam("content_langs",void 0,"array")},_T=function(t){return t.getParam("removed_menuitems","")},ET=function(t){return!1!==t.getParam("menubar",!0,"boolean")},AT=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=i(e),o=u(e)&&e.length>0;return!MT(t)&&(o||r||n)},DT=function(t){var e=W(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),n=Y(e,(function(t){return"string"===typeof t}));return n.length>0?P.some(n):P.none()},MT=function(t){return DT(t).fold((function(){var e=t.getParam("toolbar",[],"string[]");return e.length>0}),_)};(function(t){t["default"]="wrap",t["floating"]="floating",t["sliding"]="sliding",t["scrolling"]="scrolling"})(jS||(jS={}));var NT,RT=function(t){return t.getParam("toolbar_mode","","string")};(function(t){t["auto"]="auto",t["top"]="top",t["bottom"]="bottom"})(NT||(NT={}));var zT,BT=function(t){return t.getParam("toolbar_groups",{},"object")},PT=function(t){return t.getParam("toolbar_location",NT.auto,"string")},IT=function(t){return PT(t)===NT.bottom},LT=function(t){return t.getParam("fixed_toolbar_container","","string")},HT=function(t){return t.getParam("fixed_toolbar_container_target")},FT=function(t){return t.getParam("toolbar_persist",!1,"boolean")},VT=function(t){if(!t.inline)return P.none();var e=LT(t);if(e.length>0)return Ls(In(),e);var n=HT(t);return d(n)?P.some(ee.fromDom(n)):P.none()},jT=function(t){return t.inline&&VT(t).isSome()},UT=function(t){var e=VT(t);return e.getOrThunk((function(){return Dn(An(ee.fromDom(t.getElement())))}))},WT=function(t){return t.inline&&!ET(t)&&!AT(t)&&!MT(t)},$T=function(t){var e=t.getParam("toolbar_sticky",!1,"boolean");return(e||t.inline)&&!jT(t)&&!WT(t)},qT=function(t){return t.getParam("toolbar_sticky_offset",0,"number")},GT=function(t){return t.getParam("draggable_modal",!1,"boolean")},KT=function(t){var e=t.getParam("menu");return e?bt(e,(function(t){return A(A({},t),{items:t.items})})):{}},XT=function(t){return t.getParam("menubar")},YT=function(t){return t.getParam("toolbar",!0)},JT=function(t){return t.getParam("file_picker_callback")},ZT=function(t){return t.getParam("file_picker_types")},QT=function(t){return t.getParam("file_browser_callback_types")},tO=function(t){return!1===t.getParam("typeahead_urls")},eO=function(t){return t.getParam("anchor_top","#top")},nO=function(t){return t.getParam("anchor_bottom","#bottom")},rO=function(t){var e=t.getParam("file_picker_validator_handler",void 0,"function");return void 0===e?t.getParam("filepicker_validator_handler",void 0,"function"):e},oO="silver.readonly",iO=ti([zi("readonly")]),aO=function(t,e){var n=t.outerContainer,r=n.element;e&&(t.mothership.broadcastOn([yh()],{target:r}),t.uiMothership.broadcastOn([yh()],{target:r})),t.mothership.broadcastOn([oO],{readonly:e}),t.uiMothership.broadcastOn([oO],{readonly:e})},uO=function(t,e){t.on("init",(function(){t.mode.isReadOnly()&&aO(e,!0)})),t.on("SwitchMode",(function(){return aO(e,t.mode.isReadOnly())})),hT(t)&&t.setMode("readonly")},cO=function(){var t;return yf.config({channels:(t={},t[oO]={schema:iO,onReceive:function(t,e){Iv.set(t,e.readonly)}},t)})},sO=function(t){return Iv.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},lO=function(t){return Iv.config({disabled:t})},fO=function(t){return Iv.config({disabled:t,disableClass:"tox-tbtn--disabled"})},dO=function(t){return Iv.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},mO={item:sO,button:lO,splitButton:fO,toolbarButton:dO},gO=function(t,e){var n=t.getApi(e);return function(t){t(n)}},hO=function(t,e){return ju((function(n){var r=gO(t,n);r((function(n){var r=t.onSetup(n);m(r)&&e.set(r)}))}))},pO=function(t,e){return Uu((function(n){return gO(t,n)(e.get())}))},vO=function(t,e){return $u((function(n,r){gO(t,n)(t.onAction),t.triggersSubmenu||e!==US.CLOSE_ON_EXECUTE||(Cu(n,iu()),r.stop())}))},bO=(zT={},zT[eu()]=["disabling","alloy.base.behaviour","toggling","item-events"],zT),yO=Mt,wO=function(t,e,n,r){var o=oa(p);return{type:"item",dom:e.dom,components:yO(e.optComponents),data:t.data,eventOrder:bO,hasSubmenu:t.triggersSubmenu,itemBehaviours:mf([Vw("item-events",[vO(t,n),hO(t,o),pO(t,o)]),mO.item((function(){return t.disabled||r.isDisabled()})),cO(),Hw.config({})].concat(t.itemBehaviours))}},xO=function(t){return{value:t.value,meta:A({text:t.text.getOr("")},t.meta)}},CO=tinymce.util.Tools.resolve("tinymce.Env"),SO=function(t){var e={alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"},n={meta:"Ctrl",access:"Shift+Alt"},r=CO.mac?e:n,o=t.split("+"),i=q(o,(function(t){var e=t.toLowerCase().trim();return _t(r,e)?r[e]:t}));return CO.mac?i.join(""):i.join("+")},kO=function(t,e,n){return void 0===n&&(n=[YS]),PC(t,{tag:"div",classes:n},e)},TO=function(t){return{dom:{tag:"div",classes:[JS]},components:[Ss(TC.translate(t))]}},OO=function(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}},_O=function(t,e){return{dom:{tag:"div",classes:[JS]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Ss(TC.translate(e))]}]}},EO=function(t){return{dom:{tag:"div",classes:[ZS],innerHtml:SO(t)}}},AO=function(t){return kO("checkmark",t,[tk])},DO=function(t){return kO("chevron-right",t,[QS])},MO=function(t){return kO("chevron-down",t,[QS])},NO=function(t,e){var n="vertical"===t.direction?rk:ok,r="left"===t.align?ak:ik,o=function(){switch(t.valign){case"top":return uk;case"middle":return ck;case"bottom":return sk}};return{dom:{tag:"div",classes:[nk,n,r,o()]},components:e}},RO=function(t,e,n){return{dom:{tag:"img",classes:e,attributes:{src:t,alt:n.getOr("")}}}},zO=function(t,e,n){var r="custom",o="remove",i=t.ariaLabel,a=t.value,u=t.iconContent.map((function(t){return NC(t,e.icons,n)})),c=function(){var t=qS,n=u.getOr(""),c=i.map((function(t){return{title:e.translate(t)}})).getOr({}),s={tag:"div",attributes:c,classes:[t]};return A(A({},s),a===r?{tag:"button",classes:M(M([],s.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:n}:a===o?{classes:M(M([],s.classes,!0),["tox-swatch--remove"],!1),innerHtml:n}:{attributes:A(A({},s.attributes),{"data-mce-color":a}),styles:{"background-color":a}})};return{dom:c(),optComponents:[]}},BO=function(t){var e=t.map((function(t){return{attributes:{title:TC.translate(t)}}})).getOr({});return A({tag:"div",classes:[WS,$S]},e)},PO=function(t,e,n,r){var o={tag:"div",classes:[YS]},i=function(t){return PC(t,o,e.icons,r)},a=function(){return P.some({dom:o})},u=n?t.iconContent.map(i).orThunk(a):P.none(),c=t.checkMark,s=P.from(t.meta).fold((function(){return TO}),(function(t){return _t(t,"style")?S(_O,t.style):TO})),l=t.htmlContent.fold((function(){return t.textContent.map(s)}),(function(t){return P.some(OO(t,[JS]))})),f={dom:BO(t.ariaLabel),optComponents:[u,l,t.shortcutContent.map(EO),c,t.caret]};return f},IO=function(t,e,n,r){return void 0===r&&(r=P.none()),"color"===t.presets?zO(t,e,r):PO(t,e,n,r)},LO=function(t,e){return Ot(t,"tooltipWorker").map((function(t){return[lT.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:_d}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){lT.setComponents(e,[ks({element:ee.fromDom(t)})])}))}})]})).getOr([])},HO=function(t){return dT.DOM.encode(t)},FO=function(t,e){var n=TC.translate(t),r=HO(n);if(e.length>0){var o=new RegExp(fT(e),"gi");return r.replace(o,(function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"}))}return r},VO=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=IO({presets:r,textContent:P.none(),htmlContent:n?t.text.map((function(t){return FO(t,e)})):P.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:P.none(),checkMark:P.none(),caret:P.none(),value:t.value},a.providers,u,t.icon);return wO({data:xO(t),disabled:t.disabled,getApi:w({}),onAction:function(e){return o(t.value,t.meta)},onSetup:w(p),triggersSubmenu:!1,itemBehaviours:LO(t.meta,a)},c,i,a.providers)},jO=function(t,e){return q(t,(function(t){switch(t.type){case"cardcontainer":return NO(t,jO(t.items,e));case"cardimage":return RO(t.src,t.classes,t.alt);case"cardtext":var n=t.name.exists((function(t){return j(e.cardText.highlightOn,t)})),r=n?P.from(e.cardText.matchText).getOr(""):"";return OO(FO(t.text,r),t.classes)}}))},UO=function(t,e,n,r){var o=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){Iv.set(t,e),G(Xm(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(Iv)&&Iv.set(t,e)}))}))}}},i={dom:BO(t.label),optComponents:[P.some({dom:{tag:"div",classes:[nk,ok]},components:jO(t.items,r)})]};return wO({data:xO(A({text:P.none()},t)),disabled:t.disabled,getApi:o,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:P.from(r.itemBehaviours).getOr([])},i,e,n.providers)},WO=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=function(t){return{setActive:function(e){hx.set(t,e)},isActive:function(){return hx.isOn(t)},isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},s=IO({presets:n,textContent:e?t.text:P.none(),htmlContent:P.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:P.none(),checkMark:e?P.some(AO(a.icons)):P.none(),caret:P.none(),value:t.value},a,u);return Co(wO({data:xO(t),disabled:t.disabled,getApi:c,onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),p},triggersSubmenu:!1,itemBehaviours:[]},s,i,a),{toggling:{toggleClass:KS,toggleOnExecute:!1,selected:t.active}})},$O=Vp(Ex(),Ax()),qO=function(t){return{value:t}},GO=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,KO=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,XO=function(t){return GO.test(t)||KO.test(t)},YO=function(t){return Ft(t,"#").toUpperCase()},JO=function(t){return XO(t)?P.some({value:YO(t)}):P.none()},ZO=function(t){var e=t.value.replace(GO,(function(t,e,n,r){return e+e+n+n+r+r}));return{value:e}},QO=function(t){var e=ZO(t),n=KO.exec(e.value);return null===n?["FFFFFF","FF","FF","FF"]:n},t_=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},e_=function(t){var e=t_(t.red)+t_(t.green)+t_(t.blue);return qO(e)},n_=Math.min,r_=Math.max,o_=Math.round,i_=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,a_=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,u_=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},c_=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},s_=function(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,a=t.value/100;if(i=r_(0,n_(i,1)),a=r_(0,n_(a,1)),0===i)return e=n=r=o_(255*a),u_(e,n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return e=o_(255*(e+l)),n=o_(255*(n+l)),r=o_(255*(r+l)),u_(e,n,r,1)},l_=function(t){var e=QO(t),n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16);return u_(n,r,o,1)},f_=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return u_(o,i,a,u)},d_=function(t){if("transparent"===t)return P.some(u_(0,0,0,0));var e=i_.exec(t);if(null!==e)return P.some(f_(e[1],e[2],e[3],"1"));var n=a_.exec(t);return null!==n?P.some(f_(n[1],n[2],n[3],n[4])):P.none()},m_=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},g_=u_(255,0,0,1),h_=function(t){return t.fire("SkinLoaded")},p_=function(t,e){return t.fire("SkinLoadError",e)},v_=function(t){return t.fire("ResizeEditor")},b_=function(t,e){return t.fire("ResizeContent",e)},y_=function(t,e){return t.fire("ScrollContent",e)},w_=function(t,e){return t.fire("TextColorChange",e)},x_=function(t,e,n){return{hue:t,saturation:e,value:n}},C_=function(t){var e=0,n=0,r=0,o=t.red/255,i=t.green/255,a=t.blue/255,u=Math.min(o,Math.min(i,a)),c=Math.max(o,Math.max(i,a));if(u===c)return r=u,x_(0,0,100*r);var s=o===u?i-a:a===u?o-i:a-o;return e=o===u?3:a===u?1:5,e=60*(e-s/(c-u)),n=(c-u)/c,r=c,x_(Math.round(e),Math.round(100*n),Math.round(100*r))},S_=function(t){return C_(l_(t))},k_=function(t){return e_(s_(t))},T_=function(t){return JO(t).orThunk((function(){return d_(t).map(e_)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return e_(u_(o,i,a,u))}))},O_=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),__="tinymce-custom-colors";function E_(t){void 0===t&&(t=10);var e=O_.getItem(__),n=i(e)?JSON.parse(e):[],r=function(e){var n=t-e.length;return n<0?e.slice(0,t):e},o=r(n),a=function(e){V(o,e).each(u),o.unshift(e),o.length>t&&o.pop(),O_.setItem(__,JSON.stringify(o))},u=function(t){o.splice(t,1)},c=function(){return o.slice(0)};return{add:a,state:c}}var A_,D_="choiceitem",M_=[{type:D_,text:"Light Green",value:"#BFEDD2"},{type:D_,text:"Light Yellow",value:"#FBEEB8"},{type:D_,text:"Light Red",value:"#F8CAC6"},{type:D_,text:"Light Purple",value:"#ECCAFA"},{type:D_,text:"Light Blue",value:"#C2E0F4"},{type:D_,text:"Green",value:"#2DC26B"},{type:D_,text:"Yellow",value:"#F1C40F"},{type:D_,text:"Red",value:"#E03E2D"},{type:D_,text:"Purple",value:"#B96AD9"},{type:D_,text:"Blue",value:"#3598DB"},{type:D_,text:"Dark Turquoise",value:"#169179"},{type:D_,text:"Orange",value:"#E67E23"},{type:D_,text:"Dark Red",value:"#BA372A"},{type:D_,text:"Dark Purple",value:"#843FA1"},{type:D_,text:"Dark Blue",value:"#236FA1"},{type:D_,text:"Light Gray",value:"#ECF0F1"},{type:D_,text:"Medium Gray",value:"#CED4D9"},{type:D_,text:"Gray",value:"#95A5A6"},{type:D_,text:"Dark Gray",value:"#7E8C8D"},{type:D_,text:"Navy Blue",value:"#34495E"},{type:D_,text:"Black",value:"#000000"},{type:D_,text:"White",value:"#ffffff"}],N_=E_(10),R_=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({text:t[n+1],value:"#"+T_(t[n]).value,type:"choiceitem"});return e},z_=function(t,e){return t.getParam("color_cols",e,"number")},B_=function(t){return!1!==t.getParam("custom_colors")},P_=function(t){return t.getParam("color_map")},I_=function(t){var e=P_(t);return void 0!==e?R_(e):M_},L_=function(){return q(N_.state(),(function(t){return{type:D_,text:t,value:t}}))},H_=function(t){N_.add(t)},F_="#000000",V_=function(t,e){var n;return t.dom.getParents(t.selection.getStart(),(function(t){var r;(r=t.style["forecolor"===e?"color":"background-color"])&&(n=n||r)})),P.from(n)},j_=function(t,e,n){t.undoManager.transact((function(){t.focus(),t.formatter.apply(e,{value:n}),t.nodeChanged()}))},U_=function(t,e){t.undoManager.transact((function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()}))},W_=function(t){t.addCommand("mceApplyTextcolor",(function(e,n){j_(t,e,n)})),t.addCommand("mceRemoveTextcolor",(function(e){U_(t,e)}))},$_=function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))},q_=function(t){var e=I_(t),n=$_(e.length);return z_(t,n)},G_=function(t){var e="choiceitem",n={type:e,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},r={type:e,text:"Custom color",icon:"color-picker",value:"custom"};return t?[n,r]:[n]},K_=function(t,e,n,r){if("custom"===n){var o=tE(t);o((function(n){n.each((function(n){H_(n),t.execCommand("mceApplyTextcolor",e,n),r(n)}))}),F_)}else"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))},X_=function(t,e){return t.concat(L_().concat(G_(e)))},Y_=function(t,e){return function(n){n(X_(t,e))}},J_=function(t,e,n){var r="forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";t.setIconFill(r,n)},Z_=function(t,e,n,r,o){t.ui.registry.addSplitButton(e,{tooltip:r,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){var r=V_(t,n);return r.bind((function(t){return d_(t).map((function(t){var n=e_(t).value;return jt(e.toLowerCase(),n)}))})).getOr(!1)},columns:q_(t),fetch:Y_(I_(t),B_(t)),onAction:function(e){K_(t,n,o.get(),p)},onItemAction:function(r,i){K_(t,n,i,(function(n){o.set(n),w_(t,{name:e,color:n})}))},onSetup:function(n){J_(n,e,o.get());var r=function(t){t.name===e&&J_(n,t.name,t.color)};return t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})},Q_=function(t,e,n,r){t.ui.registry.addNestedMenuItem(e,{text:r,icon:"forecolor"===e?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(e){K_(t,n,e.value,p)}}]}})},tE=function(t){return function(e,n){var r=!1,o=function(n){var o=n.getData(),i=o.colorpicker;r?(e(P.from(i)),n.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",i]))},i=function(t,e){"hex-valid"===e.name&&(r=e.value)},a={colorpicker:n};t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:a,onAction:i,onSubmit:o,onClose:p,onCancel:function(){e(P.none())}})}},eE=function(t){W_(t);var e=oa(F_),n=oa(F_);Z_(t,"forecolor","forecolor","Text color",e),Z_(t,"backcolor","hilitecolor","Background color",n),Q_(t,"forecolor","forecolor","Text color"),Q_(t,"backcolor","hilitecolor","Background color")},nE=function(t,e,n,r,o,i,a,u){var c=Sk(e),s="color"!==o?"normal":"color",l=rE(e,n,r,s,i,a,u);return Ok(t,c,l,r,o)},rE=function(t,e,n,r,o,i,a){return Mt(q(t,(function(u){return"choiceitem"===u.type?Ik(u).fold(kk,(function(c){return P.some(WO(c,1===n,r,e,i(u.value),o,a,Sk(t)))})):P.none()})))},oE=function(t,e){var n=mk(e);if(1===t)return{mode:"menu",moveOnTab:!0};if("auto"===t)return{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}};var r="color"===e?"tox-swatches__row":"tox-collection__group";return{mode:"matrix",rowSelector:"."+r}},iE=function(t,e){return 1===t?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===t?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===e?".tox-swatches__row":".tox-collection__group",cell:"color"===e?"."+qS:"."+$S}}},aE=function(t,e){var n=uE(t,e),r=e.colorinput.getColorCols(),o="color",i=nE(oc("menu-value"),n,(function(e){t.onAction({value:e})}),r,o,US.CLOSE_ON_EXECUTE,O,e.shared.providers),a=A(A({},i),{markers:mk(o),movement:oE(r,o)});return{type:"widget",data:{value:oc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[$O.widget(Fx.sketch(a))]}},uE=function(t,e){var n=t.initData.allowCustomColors&&e.colorinput.hasCustomColors();return t.initData.colors.fold((function(){return X_(e.colorinput.getColors(),n)}),(function(t){return t.concat(G_(n))}))},cE=oc("cell-over"),sE=oc("cell-execute"),lE=function(t,e,n){var r,o=function(n){return Su(n,cE,{row:t,col:e})},i=function(n){return Su(n,sE,{row:t,col:e})},a=function(t,e){e.stop(),i(t)};return _s({dom:{tag:"div",attributes:(r={role:"button"},r["aria-labelledby"]=n,r)},behaviours:mf([Vw("insert-table-picker-cell",[Nu(Ia(),Yw.focus),Nu(eu(),i),Nu(Wa(),a),Nu(ru(),a)]),hx.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Yw.config({onFocus:o})])})},fE=function(t,e,n){for(var r=[],o=0;o<e;o++){for(var i=[],a=0;a<n;a++)i.push(lE(o,a,t));r.push(i)}return r},dE=function(t,e,n,r,o){for(var i=0;i<r;i++)for(var a=0;a<o;a++)hx.set(t[i][a],i<=e&&a<=n)},mE=function(t){return rt(t,(function(t){return q(t,Es)}))},gE=function(t,e){return Ss(e+"x"+t)},hE=function(t){var e=10,n=10,r=oc("size-label"),o=fE(r,e,n),i=gE(0,0),a=kC({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:r}},components:[i],behaviours:mf([Hw.config({})])});return{type:"widget",data:{value:oc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[$O.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:mE(o).concat(a.asSpec()),behaviours:mf([Vw("insert-table-picker",[ju((function(t){Hw.set(a.get(t),[i])})),Lu(cE,(function(t,r,i){var u=i.event,c=u.row,s=u.col;dE(o,c,s,e,n),Hw.set(a.get(t),[gE(c+1,s+1)])})),Lu(sE,(function(e,n,r){var o=r.event,i=o.row,a=o.col;t.onAction({numRows:i+1,numColumns:a+1}),Cu(e,iu())}))]),Aw.config({initSize:{numRows:e,numColumns:n},mode:"flatgrid",selector:'[role="button"]'})])})]}},pE={inserttable:hE,colorswatch:aE},vE=function(t,e){return Ot(pE,t.fancytype).map((function(n){return n(t,e)}))},bE=function(t,e,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var i=o?MO(n.icons):DO(n.icons),a=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},u=IO({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:P.none(),ariaLabel:t.text,caret:P.some(i),checkMark:P.none(),shortcutContent:t.shortcut},n,r);return wO({data:xO(t),getApi:a,disabled:t.disabled,onAction:p,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,e,n)},yE=function(t,e,n,r){void 0===r&&(r=!0);var o=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},i=IO({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:P.none(),ariaLabel:t.text,caret:P.none(),checkMark:P.none(),shortcutContent:t.shortcut},n,r);return wO({data:xO(t),getApi:o,disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},i,e,n)},wE=function(t){var e=t.text.fold((function(){return{}}),(function(t){return{innerHtml:t}}));return{type:"separator",dom:A({tag:"div",classes:[$S,XS]},e),components:[]}},xE=function(t,e,n,r){void 0===r&&(r=!0);var o=function(t){return{setActive:function(e){hx.set(t,e)},isActive:function(){return hx.isOn(t)},isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},i=IO({iconContent:t.icon,textContent:t.text,htmlContent:P.none(),ariaLabel:t.text,checkMark:P.some(AO(n.icons)),caret:P.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,r);return Co(wO({data:xO(t),disabled:t.disabled,getApi:o,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},i,e,n),{toggling:{toggleClass:KS,toggleOnExecute:!1,selected:t.active}})},CE=VO,SE=wE,kE=yE,TE=bE,OE=xE,_E=vE,EE=UO;(function(t){t[t["ContentFocus"]=0]="ContentFocus",t[t["UiFocus"]=1]="UiFocus"})(A_||(A_={}));var AE=function(t,e,n,r,o){var i=n.shared.providers,a=function(t){return o?A(A({},t),{shortcut:P.none(),icon:t.text.isSome()?P.none():t.icon}):t};switch(t.type){case"menuitem":return Wk(t).fold(kk,(function(t){return P.some(kE(a(t),e,i,r))}));case"nestedmenuitem":return qk(t).fold(kk,(function(t){return P.some(TE(a(t),e,i,r,o))}));case"togglemenuitem":return Kk(t).fold(kk,(function(t){return P.some(OE(a(t),e,i,r))}));case"separator":return bS(t).fold(kk,(function(t){return P.some(SE(t))}));case"fancymenuitem":return jk(t).fold(kk,(function(t){return _E(a(t),n)}));default:return console.error("Unknown item in general menu",t),P.none()}},DE=function(t,e,n,r,o,i,a){var u=1===r,c=!u||Sk(t);return Mt(q(t,(function(t){switch(t.type){case"separator":return xS(t).fold(kk,(function(t){return P.some(SE(t))}));case"cardmenuitem":return Bk(t).fold(kk,(function(t){return P.some(EE(A(A({},t),{onAction:function(e){t.onAction(e),n(t.value,t.meta)}}),o,i,{itemBehaviours:LO(t.meta,i),cardText:{matchText:e,highlightOn:a}}))}));case"autocompleteitem":default:return CS(t).fold(kk,(function(t){return P.some(CE(t,e,u,"normal",n,o,i,c))}))}})))},ME=function(t,e,n,r,o){var i=Sk(e),a=Mt(q(e,(function(t){var e=function(t){return o?!_t(t,"text"):i},a=function(t){return AE(t,n,r,e(t),o)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?a(A(A({},t),{disabled:!0})):a(t)}))),u=o?Tk:Ok;return u(t,i,a,1,"normal")},NE=function(t){return Zx.singleData(t.value,t)},RE=function(t,e,n,r){var o=n===A_.ContentFocus?Ob():Tb(),i=oE(e,r),a=mk(r);return{dom:t.dom,components:t.components,items:t.items,value:t.value,markers:{selectedItem:a.selectedItem,item:a.item},movement:i,fakeFocus:n===A_.ContentFocus,focusManager:o,menuBehaviours:Zk.unnamedEvents("auto"!==e?[]:[ju((function(t,e){Xk(t,4,a.item).each((function(e){var n=e.numColumns,r=e.numRows;Aw.setGridSize(t,r,n)}))}))])}},zE=function(t,e){var n=od(),r=oa(!1),o=_s(eC.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:mf([Vw("dismissAutocompleter",[Nu(gu(),(function(){return c()}))])]),lazySink:e.getSink})),i=function(){return eC.isOpen(o)},a=function(){return n.get().isSome()},u=function(){a()&&eC.hide(o)},c=function(){if(a()){var e=n.get().map((function(t){return t.element}));YC(e.getOr(ee.fromDom(t.selection.getNode()))).each(Pr),u(),n.clear(),r.set(!1)}},s=ge((function(){return VS(t)})),l=function(n,o){var i=gt(o,(function(t){return P.from(t.columns)})).getOr(1);return rt(o,(function(o){var a=o.items;return DE(a,o.matchText,(function(e,i){var a=t.selection.getRng();rS(t.dom,a,n).fold((function(){return console.error("Lost context. Cursor probably moved")}),(function(t){var n=t.range,a={hide:function(){c()},reload:function(t){u(),g(t)}};r.set(!0),o.onAction(a,n,e,i),r.set(!1)}))}),i,US.BUBBLE_TO_SANDBOX,e,o.highlightOn)}))},f=function(e){if(!a()){var o=XC(t,e.range);n.set({triggerChar:e.triggerChar,element:o,matchLength:e.text.length}),r.set(!1)}},d=function(e,n,r,i){e.matchLength=n.text.length;var a=gt(r,(function(t){return P.from(t.columns)})).getOr(1);eC.showAt(o,Fx.sketch(RE(Ok("autocompleter-value",!0,i,a,"normal"),a,A_.ContentFocus,"normal")),{anchor:{type:"node",root:ee.fromDom(t.getBody()),node:P.from(e.element)}}),eC.getContent(o).each(rb.highlightFirst)},m=function(e){return n.get().map((function(n){return rS(t.dom,t.selection.getRng(),n.triggerChar).bind((function(n){return pS(t,s,n,e)}))})).getOrThunk((function(){return hS(t,s)}))},g=function(t){m(t).fold(c,(function(t){f(t.context),t.lookupData.then((function(e){n.get().map((function(n){var r=t.context;if(n.triggerChar===r.triggerChar){var o=l(r.triggerChar,e);o.length>0?d(n,r,e,o):r.text.length-n.matchLength>=10?c():u()}}))}))}))},h=WC((function(t){27!==t.which&&g()}),50),p={onKeypress:h,cancelIfNecessary:c,isMenuOpen:i,isActive:a,isProcessingAction:r.get,getView:function(){return eC.getContent(o)}};!1===t.hasPlugin("rtc")&&iS.setup(p,t)},BE={register:zE},PE=function(t,e,n){return Hs(t,e,n).isSome()},IE=function(t,e){var n=null,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n=setTimeout((function(){t.apply(null,r),n=null}),e)},o=function(){null!==n&&(clearTimeout(n),n=null)};return{cancel:o,schedule:r}},LE=5,HE=400,FE=function(t){var e=t.raw;return void 0===e.touches||1!==e.touches.length?P.none():P.some(e.touches[0])},VE=function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>LE||r>LE},jE=function(t){var e=od(),n=oa(!1),r=IE((function(e){t.triggerEvent(ou(),e),n.set(!0)}),HE),o=function(t){return FE(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.schedule(t),n.set(!1),e.set(i)})),P.none()},i=function(t){return r.cancel(),FE(t).each((function(t){e.on((function(n){VE(t,n)&&e.clear()}))})),P.none()},a=function(o){r.cancel();var i=function(t){return sn(t.target,o.target)};return e.get().filter(i).map((function(e){return n.get()?(o.prevent(),!1):t.triggerEvent(ru(),o)}))},u=ga([{key:Aa(),value:o},{key:Da(),value:i},{key:Ma(),value:a}]),c=function(t,e){return Ot(u,e).bind((function(e){return e(t)}))};return{fireIfReady:c}},UE=function(t){var e=t.raw;return e.which===ob[0]&&!j(["input","textarea"],ue(t.target))&&!PE(t.target,'[contenteditable="true"]')},WE=function(){return en().browser.isFirefox()},$E=function(t,e){return WE()?ud(t,"focus",e):ad(t,"focusin",e)},qE=function(t,e){return WE()?ud(t,"blur",e):ad(t,"focusout",e)},GE=function(t,e){var n=A({stopBackspace:!0},e),r=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],o=jE(n),i=q(r.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return ad(t,e,(function(t){o.fireIfReady(t,e).each((function(e){e&&t.kill()}));var r=n.triggerEvent(e,t);r&&t.kill()}))})),a=od(),u=ad(t,"paste",(function(t){o.fireIfReady(t,"paste").each((function(e){e&&t.kill()}));var e=n.triggerEvent("paste",t);e&&t.kill(),a.set(setTimeout((function(){n.triggerEvent(Qa(),t)}),0))})),c=ad(t,"keydown",(function(t){var e=n.triggerEvent("keydown",t);e?t.kill():n.stopBackspace&&UE(t)&&t.prevent()})),s=$E(t,(function(t){var e=n.triggerEvent("focusin",t);e&&t.kill()})),l=od(),f=qE(t,(function(t){var e=n.triggerEvent("focusout",t);e&&t.kill(),l.set(setTimeout((function(){n.triggerEvent(Za(),t)}),0))})),d=function(){G(i,(function(t){t.unbind()})),c.unbind(),s.unbind(),f.unbind(),u.unbind(),a.on(clearTimeout),l.on(clearTimeout)};return{unbind:d}},KE=function(t,e){var n=Ot(t,"target").getOr(e);return oa(n)},XE=function(t,e){var n=oa(!1),r=oa(!1),o=function(){n.set(!0)},i=function(){r.set(!0)};return{stop:o,cut:i,isStopped:n.get,isCut:r.get,event:t,setSource:e.set,getSource:e.get}},YE=function(t){var e=oa(!1),n=function(){e.set(!0)};return{stop:n,cut:p,isStopped:e.get,isCut:O,event:t,setSource:T("Cannot set source of a broadcasted event"),getSource:T("Cannot get source of a broadcasted event")}},JE=aa.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),ZE=function(t,e,n,r,o,i){var a=t(e,r),u=XE(n,o);return a.fold((function(){return i.logEventNoHandlers(e,r),JE.complete()}),(function(t){var n=t.descHandler,r=Ic(n);return r(u),u.isStopped()?(i.logEventStopped(e,t.element,n.purpose),JE.stopped()):u.isCut()?(i.logEventCut(e,t.element,n.purpose),JE.complete()):vn(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),JE.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),JE.resume(r)}))}))},QE=function(t,e,n,r,o,i){return ZE(t,e,n,r,o,i).fold(_,(function(r){return QE(t,e,n,r,o,i)}),O)},tA=function(t,e,n,r,o){var i=KE(n,r);return ZE(t,e,n,r,i,o)},eA=function(t,e,n){var r=YE(e);return G(t,(function(t){var e=t.descHandler,n=Ic(e);n(r)})),r.isStopped()},nA=function(t,e,n,r){return rA(t,e,n,n.target,r)},rA=function(t,e,n,r,o){var i=KE(n,r);return QE(t,e,n,r,i,o)},oA=function(t,e){return{element:t,descHandler:e}},iA=function(t,e){return{id:t,descHandler:e}},aA=function(){var t={},e=function(e,n,r){vt(r,(function(r,o){var i=void 0!==t[o]?t[o]:{};i[n]=Pc(r,e),t[o]=i}))},n=function(t,e){return fc(e).bind((function(e){return Ot(t,e)})).map((function(t){return oA(e,t)}))},r=function(e){return Ot(t,e).map((function(t){return St(t,(function(t,e){return iA(e,t)}))})).getOr([])},o=function(e,r,o){return Ot(t,r).bind((function(t){return wa(o,(function(e){return n(t,e)}),e)}))},i=function(e){vt(t,(function(t,n){_t(t,e)&&delete t[e]}))};return{registerId:e,unregisterId:i,filterByType:r,find:o}},uA=function(){var t=aA(),e={},n=function(t){var e=t.element;return fc(e).getOrThunk((function(){return sc("uid-",t.element)}))},r=function(t,n){var r=e[n];if(r!==t)throw new Error('The tagId "'+n+'" is already used by: '+Qu(r.element)+"\nCannot use it for: "+Qu(t.element)+"\nThe conflicting element is"+(Pn(r.element)?" ":" not ")+"already in the DOM");i(t)},o=function(o){var i=n(o);Et(e,i)&&r(o,i);var a=[o];t.registerId(a,i,o.events),e[i]=o},i=function(n){fc(n.element).each((function(n){delete e[n],t.unregisterId(n)}))},a=function(e){return t.filterByType(e)},u=function(e,n,r){return t.find(e,n,r)},c=function(t){return Ot(e,t)};return{find:u,filter:a,register:o,unregister:i,getById:c}},cA=function(t){var e=t.dom,n=e.attributes,r=D(e,["attributes"]);return{uid:t.uid,dom:A({tag:"div",attributes:A({role:"presentation"},n)},r),components:t.components,behaviours:np(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},sA=dv({name:"Container",factory:cA,configFields:[Ki("components",[]),ep("containerBehaviours",[]),Ki("events",{}),Ki("domModification",{}),Ki("eventOrder",{})]}),lA=function(t){var e=function(e){return vn(t.element).fold(_,(function(t){return sn(e,t)}))},n=uA(),r=function(t,r){return n.find(e,t,r)},o=GE(t.element,{triggerEvent:function(t,e){return Js(t,e.target,(function(n){return nA(r,t,e,n)}))}}),i={debugInfo:w("real"),triggerEvent:function(t,e,n){Js(t,e,(function(o){return rA(r,t,n,e,o)}))},triggerFocus:function(t,e){fc(t).fold((function(){Sf(t)}),(function(n){Js(Ja(),t,(function(n){return tA(r,Ja(),{originator:e,kill:p,prevent:p,target:t},t,n),!1}))}))},triggerEscape:function(t,e){i.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return h(t)},getByDom:function(t){return v(t)},build:_s,addToGui:function(t){c(t)},removeFromGui:function(t){s(t)},addToWorld:function(t){a(t)},removeFromWorld:function(t){u(t)},broadcast:function(t){d(t)},broadcastOn:function(t,e){m(t,e)},broadcastEvent:function(t,e){g(t,e)},isConnected:_},a=function(t){t.connect(i),fe(t.element)||(n.register(t),G(t.components(),a),i.triggerEvent(uu(),t.element,{target:t.element}))},u=function(t){fe(t.element)||(G(t.components(),u),n.unregister(t)),t.disconnect()},c=function(e){Wg(t,e)},s=function(t){Gg(t)},l=function(){o.unbind(),Br(t.element)},f=function(t){var e=n.filter(tu());G(e,(function(e){var n=e.descHandler,r=Ic(n);r(t)}))},d=function(t){f({universal:!0,data:t})},m=function(t,e){f({universal:!1,channels:t,data:e})},g=function(t,e){var r=n.filter(t);return eA(r,e)},h=function(t){return n.getById(t).fold((function(){return ro.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),ro.value)},v=function(t){var e=fc(t).getOr("not found");return h(e)};return a(t),{root:t,element:t.element,destroy:l,add:c,remove:s,getByUid:h,getByDom:v,addToWorld:a,removeFromWorld:u,broadcast:d,broadcastOn:m,broadcastEvent:g}},fA=function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:q(t.items,e.interpreter)}},dA=w([Ki("prefix","form-field"),ep("fieldBehaviours",[bv,tp])]),mA=w([Bp({schema:[Ai("dom")],name:"label"}),Bp({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ai("text")],name:"aria-descriptor"}),Rp({factory:{sketch:function(t){var e=da(t,["factory"]);return t.factory.sketch(e)}},schema:[Ai("factory")],name:"field"})]),gA=function(t,e,n,r){var o=rp(t.fieldBehaviours,[bv.config({find:function(e){return Kp(e,t,"field")}}),tp.config({store:{mode:"manual",getValue:function(t){return bv.getCurrent(t).bind(tp.getValue)},setValue:function(t,e){bv.getCurrent(t).each((function(t){tp.setValue(t,e)}))}}})]),i=Eu([ju((function(e,n){var r=Yp(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=oc(t.prefix);r.label().each((function(t){Fn(t.element,"for",n),Fn(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=oc(t.prefix);Fn(n.element,"id",r),Fn(e.element,"aria-describedby",r)}))}))}))]),a={getField:function(e){return Kp(e,t,"field")},getLabel:function(e){return Kp(e,t,"label")}};return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:a}},hA=mv({name:"FormField",configFields:dA(),partFields:mA(),factory:gA,apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),pA=function(t,e){return Dc({attributes:ga([{key:e.tabAttr,value:"true"}])})},vA=Object.freeze({__proto__:null,exhibit:pA}),bA=[Ki("tabAttr","data-alloy-tabstop")],yA=hf({fields:bA,name:"tabstopping",active:vA}),wA=tinymce.util.Tools.resolve("tinymce.html.Entities"),xA=function(t,e,n,r){var o=SA(t,e,n,r);return hA.sketch(o)},CA=function(t,e){return xA(t,e,[],[])},SA=function(t,e,n,r){return{dom:TA(n),components:t.toArray().concat([e]),fieldBehaviours:mf(r)}},kA=function(){return TA([])},TA=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},OA=function(t,e){return hA.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},_A=oc("form-component-change"),EA=oc("form-close"),AA=oc("form-cancel"),DA=oc("form-action"),MA=oc("form-submit"),NA=oc("form-block"),RA=oc("form-unblock"),zA=oc("form-tabchange"),BA=oc("form-resize"),PA=function(t,e){var n,r=t.label.map((function(t){return OA(t,e)})),o=function(t){return function(e,n){Hs(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,jn(r,"data-collection-item-value"))}))}},i=function(n,r){var o=q(r,(function(n){var r=TC.translate(n.text),o=1===t.columns?'<div class="tox-collection__item-label">'+r+"</div>":"",i='<div class="tox-collection__item-icon">'+n.icon+"</div>",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,(function(t){return a[t]})),c=e.isDisabled()?" tox-collection__item--state-disabled":"";return'<div class="tox-collection__item'+c+'" tabindex="-1" data-collection-item-value="'+wA.encodeAllRaw(n.value)+'" title="'+u+'" aria-label="'+u+'">'+i+o+"</div>"})),i="auto"!==t.columns&&t.columns>1?$(o,t.columns):[o],a=q(i,(function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}));Ku(n.element,a.join(""))},a=o((function(n,r,o,i){r.stop(),e.isDisabled()||Su(n,DA,{name:t.name,value:i})})),u=[Nu(Ia(),o((function(t,e,n){Sf(n)}))),Nu(Wa(),a),Nu(ru(),a),Nu(La(),o((function(t,e,n){Ls(t.element,"."+ek).each((function(t){us(t,ek)})),is(n,ek)}))),Nu(Ha(),o((function(t){Ls(t.element,"."+ek).each((function(t){us(t,ek)}))}))),$u(o((function(e,n,r,o){Su(e,DA,{name:t.name,value:o})})))],c=function(t,e){return q(Xm(t.element,".tox-collection__item"),e)},s=hA.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:x},behaviours:mf([Iv.config({disabled:e.isDisabled,onDisabled:function(t){c(t,(function(t){is(t,"tox-collection__item--state-disabled"),Fn(t,"aria-disabled",!0)}))},onEnabled:function(t){c(t,(function(t){us(t,"tox-collection__item--state-disabled"),$n(t,"aria-disabled")}))}}),cO(),Hw.config({}),tp.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,n){i(e,n),"auto"===t.columns&&Xk(e,5,"tox-collection__item").each((function(t){var n=t.numRows,r=t.numColumns;Aw.setGridSize(e,n,r)})),Cu(e,BA)}}),yA.config({}),Aw.config(iE(t.columns,"normal")),Vw("collection-events",u)]),eventOrder:(n={},n[eu()]=["disabling","alloy.base.behaviour","collection-events"],n)}),l=["tox-form__group--collection"];return xA(r,s,l,[])},IA=w([Fi("data"),Ki("inputAttributes",{}),Ki("inputStyles",{}),Ki("tag","input"),Ki("inputClasses",[]),ul("onSetValue"),Ki("styles",{}),Ki("eventOrder",{}),ep("inputBehaviours",[tp,Yw]),Ki("selectOnFocus",!0)]),LA=function(t){return mf([Yw.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=ds(e);e.dom.setSelectionRange(0,n.length)}:p})])},HA=function(t){return A(A({},LA(t)),rp(t.inputBehaviours,[tp.config({store:A(A({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return ds(t.element)},setValue:function(t,e){var n=ds(t.element);n!==e&&ms(t.element,e)}}),onSetValue:t.onSetValue})]))},FA=function(t){return{tag:t.tag,attributes:A({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},VA=function(t,e){return{uid:t.uid,dom:FA(t),components:[],behaviours:HA(t),eventOrder:t.eventOrder}},jA=dv({name:"Input",configFields:IA(),factory:VA}),UA={},WA={exports:UA};(function(e,n,r,o){(function(t,o){"object"===typeof n&&"undefined"!==typeof r?r.exports=o():"function"===typeof e&&e.amd?e(o):(t="undefined"!==typeof globalThis?globalThis:t||self,t.EphoxContactWrapper=o())})(this,(function(){var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},n={exports:{}};(function(t){(function(e){var n=setTimeout;function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function a(t,e){while(3===t._state)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}u(e.promise,r)}else(1===t._state?u:c)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===typeof e||"function"===typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"===typeof n)return void f(o(n,e),t)}t._state=1,t._value=e,s(t)}catch(r){c(t,r)}}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,u(e,t))}),(function(t){n||(n=!0,c(e,t))}))}catch(r){if(n)return;n=!0,c(e,r)}}i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return a(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"===typeof a||"function"===typeof a)){var u=a.then;if("function"===typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0===--r&&t(e)}catch(c){n(c)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},i.resolve=function(t){return t&&"object"===typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},i._immediateFn="function"===typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},t.exports?t.exports=i:e.Promise||(e.Promise=i)})(e)})(n);var r=n.exports,o=function(){return"undefined"!==typeof window?window:Function("return this;")()}(),i={boltExport:o.Promise||r};return i}))})(void 0,UA,WA);var $A,qA=WA.exports.boltExport,GA=function(t){var e=P.none(),n=[],r=function(t){return GA((function(e){o((function(n){e(t(n))}))}))},o=function(t){a()?c(t):n.push(t)},i=function(t){a()||(e=P.some(t),u(n),n=[])},a=function(){return e.isSome()},u=function(t){G(t,c)},c=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t(i),{get:o,map:r,isReady:a}},KA=function(t){return GA((function(e){e(t)}))},XA={nu:GA,pure:KA},YA=function(t){setTimeout((function(){throw t}),0)},JA=function(t){var e=function(e){t().then(e,YA)},n=function(e){return JA((function(){return t().then(e)}))},r=function(e){return JA((function(){return t().then((function(t){return e(t).toPromise()}))}))},o=function(e){return JA((function(){return t().then((function(){return e.toPromise()}))}))},i=function(){return XA.nu(e)},a=function(){var e=null;return JA((function(){return null===e&&(e=t()),e}))},u=t;return{map:n,bind:r,anonBind:o,toLazy:i,toCached:a,toPromise:u,get:e}},ZA=function(t){return JA((function(){return new qA(t)}))},QA=function(t){return JA((function(){return qA.resolve(t)}))},tD={nu:ZA,pure:QA},eD=["input","textarea"],nD=function(t){var e=ue(t);return j(eD,e)},rD=function(t,e){var n=e.getRoot(t).getOr(t.element);us(n,e.invalidClass),e.notify.each((function(e){nD(t.element)&&Fn(t.element,"aria-invalid",!1),e.getContainer(t).each((function(t){Ku(t,e.validHtml)})),e.onValid(t)}))},oD=function(t,e,n,r){var o=e.getRoot(t).getOr(t.element);is(o,e.invalidClass),e.notify.each((function(e){nD(t.element)&&Fn(t.element,"aria-invalid",!0),e.getContainer(t).each((function(t){Ku(t,r)})),e.onInvalid(t,r)}))},iD=function(t,e,n){return e.validator.fold((function(){return tD.pure(ro.value(!0))}),(function(e){return e.validate(t)}))},aD=function(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),iD(t,e).map((function(r){return t.getSystem().isConnected()?r.fold((function(r){return oD(t,e,n,r),ro.error(r)}),(function(n){return rD(t,e),ro.value(n)})):ro.error("No longer in system")}))},uD=function(t,e){var n=e.getRoot(t).getOr(t.element);return cs(n,e.invalidClass)},cD=Object.freeze({__proto__:null,markValid:rD,markInvalid:oD,query:iD,run:aD,isInvalid:uD}),sD=function(t,e){return t.validator.map((function(n){return Eu([Nu(n.onEvent,(function(n){aD(n,t,e).get(x)}))].concat(n.validateOnLoad?[ju((function(n){aD(n,t,e).get(p)}))]:[]))})).getOr({})},lD=Object.freeze({__proto__:null,events:sD}),fD=[Ai("invalidClass"),Ki("getRoot",P.none),qi("notify",[Ki("aria","alert"),Ki("getContainer",P.none),Ki("validHtml",""),ul("onValid"),ul("onInvalid"),ul("onValidate")]),qi("validator",[Ai("validate"),Ki("onEvent","input"),Ki("validateOnLoad",!0)])],dD=hf({fields:fD,name:"invalidating",active:lD,apis:cD,extra:{validation:function(t){return function(e){var n=tp.getValue(e);return tD.pure(t(n))}}}}),mD=function(t,e,n,r){return n.getOrCreate(t,e,r)},gD=Object.freeze({__proto__:null,getCoupled:mD}),hD=[Di("others",bi(ro.value,ai()))],pD=function(){var t={},e=function(e,n,r){var o=ht(n.others);if(o)return Ot(t,r).getOrThunk((function(){var o=Ot(n.others,r).getOrDie("No information found for coupled component: "+r),i=o(e),a=e.getSystem().build(i);return t[r]=a,a}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))},n=w({});return Tc({readState:n,getOrCreate:e})},vD=Object.freeze({__proto__:null,init:pD}),bD=hf({fields:hD,name:"coupling",apis:gD,state:vD}),yD=w("sink"),wD=w(Bp({name:yD(),overrides:w({dom:{tag:"div"},behaviours:mf([Lg.config({useFixed:_})]),events:Eu([Hu(Fa()),Hu(Ra()),Hu(Wa())])})}));(function(t){t[t["HighlightFirst"]=0]="HighlightFirst",t[t["HighlightNone"]=1]="HighlightNone"})($A||($A={}));var xD,CD=function(t,e){var n=t.getHotspot(e).getOr(e),r="hotspot",o=t.getAnchorOverrides();return t.layouts.fold((function(){return{type:r,hotspot:n,overrides:o}}),(function(t){return{type:r,hotspot:n,overrides:o,layouts:t}}))},SD=function(t,e,n){var r=t.fetch;return r(n).map(e)},kD=function(t,e,n,r,o,i,a){var u=SD(t,e,r),c=AD(r,t);return u.map((function(t){return t.bind((function(t){return P.from(Zx.sketch(A(A({},i.menu()),{uid:dc(""),data:t,highlightImmediately:a===$A.HighlightFirst,onOpenMenu:function(t,e){var r=c().getOrDie();Lg.position(r,e,{anchor:n}),bh.decloak(o)},onOpenSubmenu:function(t,e,n){var r=c().getOrDie();Lg.position(r,n,{anchor:{type:"submenu",item:e}}),bh.decloak(o)},onRepositionMenu:function(t,e,r){var o=c().getOrDie();Lg.position(o,e,{anchor:n}),G(r,(function(t){Lg.position(o,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return Yw.focus(r),bh.close(o),P.some(!0)}})))}))}))},TD=function(t,e,n,r,o,i,a){var u=CD(t,n),c=kD(t,e,u,n,r,o,a);return c.map((function(t){return t.fold((function(){bh.isOpen(r)&&bh.close(r)}),(function(t){bh.cloak(r),bh.open(r,t),i(r)})),r}))},OD=function(t,e,n,r,o,i,a){return bh.close(r),tD.pure(r)},_D=function(t,e,n,r,o,i){var a=bD.getCoupled(n,"sandbox"),u=bh.isOpen(a),c=u?OD:TD;return c(t,e,n,a,r,o,i)},ED=function(t,e,n){var r=bv.getCurrent(e).getOr(e),o=vr(t.element);n?Kn(r.element,"min-width",o+"px"):pr(r.element,o)},AD=function(t,e){return t.getSystem().getByUid(e.uid+"-"+yD()).map((function(t){return function(){return ro.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return ro.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},DD=function(t){bh.getState(t).each((function(t){Zx.repositionMenus(t)}))},MD=function(t,e,n){var r=Vs(),o=function(o,i){var a=CD(t,e);r.link(e.element),t.matchWidth&&ED(a.hotspot,i,t.useMinWidth),t.onOpen(a,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},i=function(t,o){r.unlink(e.element),void 0!==n&&void 0!==n.onClose&&n.onClose(t,o)},a=AD(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:op.augment(t.sandboxBehaviours,[tp.config({store:{mode:"memory",initialValue:e}}),bh.config({onOpen:o,onClose:i,isPartOf:function(t,n,r){return Us(n,r)||Us(e,r)},getAttachPoint:function(){return a().getOrDie()}}),bv.config({find:function(t){return bh.getState(t).bind((function(t){return bv.getCurrent(t)}))}}),yf.config({channels:A(A({},Sh({isExtraPart:O})),Th({doReposition:DD}))})])}},ND=function(t){var e=bD.getCoupled(t,"sandbox");DD(e)},RD=function(){return[Ki("sandboxClasses",[]),op.field("sandboxBehaviours",[bv,yf,bh,tp])]},zD=w([Ai("dom"),Ai("fetch"),ul("onOpen"),cl("onExecute"),Ki("getHotspot",P.some),Ki("getAnchorOverrides",w({})),Hd(),ep("dropdownBehaviours",[hx,bD,Aw,Yw]),Ai("toggleClass"),Ki("eventOrder",{}),Fi("lazySink"),Ki("matchWidth",!1),Ki("useMinWidth",!1),Fi("role")].concat(RD())),BD=w([zp({schema:[ol()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),wD()]),PD=function(t,e,n,r){var o,i=function(e){return Ot(t.dom,"attributes").bind((function(t){return Ot(t,e)}))},a=function(t){bh.getState(t).each((function(t){Zx.highlightPrimary(t)}))},u=function(e){var n=a;_D(t,x,e,r,n,$A.HighlightFirst).get(p)},c={expand:function(e){hx.isOn(e)||_D(t,x,e,r,p,$A.HighlightNone).get(p)},open:function(e){hx.isOn(e)||_D(t,x,e,r,p,$A.HighlightFirst).get(p)},isOpen:hx.isOn,close:function(e){hx.isOn(e)&&_D(t,x,e,r,p,$A.HighlightFirst).get(p)},repositionMenus:function(t){hx.isOn(t)&&ND(t)}},s=function(t,e){return ku(t),P.some(!0)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.dropdownBehaviours,[hx.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),bD.config({others:{sandbox:function(e){return MD(t,e,{onOpen:function(){return hx.on(e)},onClose:function(){return hx.off(e)}})}}}),Aw.config({mode:"special",onSpace:s,onEnter:s,onDown:function(t,e){if(ID.isOpen(t)){var n=bD.getCoupled(t,"sandbox");a(n)}else ID.open(t);return P.some(!0)},onEscape:function(t,e){return ID.isOpen(t)?(ID.close(t),P.some(!0)):P.none()}}),Yw.config({})]),events:vx(P.some(u)),eventOrder:A(A({},t.eventOrder),(o={},o[eu()]=["disabling","toggling","alloy.base.behaviour"],o)),apis:c,domModification:{attributes:A(A({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:i("type").getOr("button")}:{})}}},ID=mv({name:"Dropdown",configFields:zD(),partFields:BD(),factory:PD,apis:{open:function(t,e){return t.open(e)},expand:function(t,e){return t.expand(e)},close:function(t,e){return t.close(e)},isOpen:function(t,e){return t.isOpen(e)},repositionMenus:function(t,e){return t.repositionMenus(e)}}}),LD=function(){return Dc({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})},HD=function(){return Eu([Au(Ka(),_)])},FD=Object.freeze({__proto__:null,events:HD,exhibit:LD}),VD=hf({fields:[],name:"unselecting",active:FD}),jD=function(t,e){return ID.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:mf([mO.button(e.providers.isDisabled),cO(),VD.config({}),yA.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:e.getSink,fetch:function(n){return tD.nu((function(e){return t.fetch(e)})).map((function(r){return P.from(NE(Co(nE(oc("menu-value"),r,(function(e){t.onItemAction(n,e)}),t.columns,t.presets,US.CLOSE_ON_EXECUTE,O,e.providers),{movement:oE(t.columns,t.presets)})))}))},parts:{menu:pk(!1,1,t.presets)}})},UD=oc("color-input-change"),WD=oc("color-swatch-change"),$D=oc("color-picker-cancel"),qD=function(t,e,n){var r=hA.parts.field({factory:jA,inputClasses:["tox-textfield"],onSetValue:function(t){return dD.run(t).get(p)},inputBehaviours:mf([Iv.config({disabled:e.providers.isDisabled}),cO(),yA.config({}),dD.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return vn(t.element)},notify:{onValid:function(t){var e=tp.getValue(t);Su(t,UD,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=tp.getValue(t);if(0===e.length)return tD.pure(ro.value(!0));var n=ee.fromTag("span");Kn(n,"background-color",e);var r=Qn(n,"background-color").fold((function(){return ro.error("blah")}),(function(t){return ro.value(e)}));return tD.pure(r)}}})]),selectOnFocus:!1}),o=t.label.map((function(t){return OA(t,e.providers)})),i=function(t,e){Su(t,WD,{value:e})},a=function(t,e){u.getOpt(t).each((function(t){"custom"===e?n.colorPicker((function(e){e.fold((function(){return Cu(t,$D)}),(function(e){i(t,e),H_(e)}))}),"#ffffff"):i(t,"remove"===e?"":e)}))},u=kC(jD({dom:{tag:"span",attributes:{"aria-label":e.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[jl,Vl,ql]},onLtr:function(){return[Vl,jl,ql]}},components:[],fetch:Y_(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:a},e));return hA.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:o.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,u.asSpec()]}]),fieldBehaviours:mf([Vw("form-field-events",[Nu(UD,(function(e,n){u.getOpt(e).each((function(t){Kn(t.element,"background-color",n.event.color)})),Su(e,_A,{name:t.name})})),Nu(WD,(function(t,e){hA.getField(t).each((function(n){tp.setValue(n,e.event.value),bv.getCurrent(t).each(Yw.focus)}))})),Nu($D,(function(t,e){hA.getField(t).each((function(e){bv.getCurrent(t).each(Yw.focus)}))}))])])})},GD=Bp({schema:[Ai("dom")],name:"label"}),KD=function(t){return Bp({name:t+"-edge",overrides:function(e){var n=e.model.manager.edgeActions[t];return n.fold((function(){return{}}),(function(t){return{events:Eu([Ru(Aa(),(function(e,n,r){return t(e,r)}),[e]),Ru(Ra(),(function(e,n,r){return t(e,r)}),[e]),Ru(za(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})},XD=KD("top-left"),YD=KD("top"),JD=KD("top-right"),ZD=KD("right"),QD=KD("bottom-right"),tM=KD("bottom"),eM=KD("bottom-left"),nM=KD("left"),rM=Rp({name:"thumb",defaults:w({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:Eu([Iu(Aa(),t,"spectrum"),Iu(Da(),t,"spectrum"),Iu(Ma(),t,"spectrum"),Iu(Ra(),t,"spectrum"),Iu(za(),t,"spectrum"),Iu(Pa(),t,"spectrum")])}}}),oM=Rp({schema:[_i("mouseIsDown",(function(){return oa(!1)}))],name:"spectrum",overrides:function(t){var e=t.model,n=e.manager,r=function(e,r){return n.getValueFromEvent(r).map((function(r){return n.setValueFrom(e,t,r)}))};return{behaviours:mf([Aw.config({mode:"special",onLeft:function(e){return n.onLeft(e,t)},onRight:function(e){return n.onRight(e,t)},onUp:function(e){return n.onUp(e,t)},onDown:function(e){return n.onDown(e,t)}}),Yw.config({})]),events:Eu([Nu(Aa(),r),Nu(Da(),r),Nu(Ra(),r),Nu(za(),(function(e,n){t.mouseIsDown.get()&&r(e,n)}))])}}}),iM=[GD,nM,ZD,YD,tM,XD,JD,eM,QD,rM,oM],aM="slider.change.value",uM=w(aM),cM=function(t){return-1!==t.type.indexOf("touch")},sM=function(t){var e=t.event.raw;if(cM(e)){var n=e;return void 0!==n.touches&&1===n.touches.length?P.some(n.touches[0]).map((function(t){return lr(t.clientX,t.clientY)})):P.none()}var r=e;return void 0!==r.clientX?P.some(r).map((function(t){return lr(t.clientX,t.clientY)})):P.none()},lM="top",fM="right",dM="bottom",mM="left",gM=function(t){return t.model.minX},hM=function(t){return t.model.minY},pM=function(t){return t.model.minX-1},vM=function(t){return t.model.minY-1},bM=function(t){return t.model.maxX},yM=function(t){return t.model.maxY},wM=function(t){return t.model.maxX+1},xM=function(t){return t.model.maxY+1},CM=function(t,e,n){return e(t)-n(t)},SM=function(t){return CM(t,bM,gM)},kM=function(t){return CM(t,yM,hM)},TM=function(t){return SM(t)/2},OM=function(t){return kM(t)/2},_M=function(t){return t.stepSize},EM=function(t){return t.snapToGrid},AM=function(t){return t.snapStart},DM=function(t){return t.rounded},MM=function(t,e){return void 0!==t[e+"-edge"]},NM=function(t){return MM(t,mM)},RM=function(t){return MM(t,fM)},zM=function(t){return MM(t,lM)},BM=function(t){return MM(t,dM)},PM=function(t){return t.model.value.get()},IM=function(t){return{x:t}},LM=function(t){return{y:t}},HM=function(t,e){return{x:t,y:e}},FM=function(t,e){Su(t,uM(),{value:e})},VM=function(t,e){FM(t,HM(pM(e),vM(e)))},jM=function(t,e){FM(t,LM(vM(e)))},UM=function(t,e){FM(t,HM(TM(e),vM(e)))},WM=function(t,e){FM(t,HM(wM(e),vM(e)))},$M=function(t,e){FM(t,IM(wM(e)))},qM=function(t,e){FM(t,HM(wM(e),OM(e)))},GM=function(t,e){FM(t,HM(wM(e),xM(e)))},KM=function(t,e){FM(t,LM(xM(e)))},XM=function(t,e){FM(t,HM(TM(e),xM(e)))},YM=function(t,e){FM(t,HM(pM(e),xM(e)))},JM=function(t,e){FM(t,IM(pM(e)))},ZM=function(t,e){FM(t,HM(pM(e),OM(e)))},QM=function(t,e,n,r){return t<e?t:t>n?n:t===e?e-1:Math.max(e,t-r)},tN=function(t,e,n,r){return t>n?t:t<e?e:t===n?n+1:Math.min(n,t+r)},eN=function(t,e,n){return Math.max(e,Math.min(n,t))},nN=function(t,e,n,r,o){return o.fold((function(){var o=t-e,i=Math.round(o/r)*r;return eN(e+i,e-1,n+1)}),(function(e){var o=(t-e)%r,i=Math.round(o/r),a=Math.floor((t-e)/r),u=Math.floor((n-e)/r),c=Math.min(u,a+i),s=e+c*r;return Math.max(e,s)}))},rN=function(t,e,n){return Math.min(n,Math.max(t,e))-e},oN=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,a=t.snap,u=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,g=s?e-1:e,h=l?n+1:n;if(o<f)return g;if(o>d)return h;var p=rN(o,f,d),v=eN(p/m*r+e,g,h);return a&&v>=e&&v<=n?nN(v,e,n,i,u):c?Math.round(v):v},iN=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return o<e?i?0:s:o>n?a?u:l:(o-e)/r*c},aN="top",uN="right",cN="bottom",sN="left",lN="width",fN="height",dN=function(t){return t.element.dom.getBoundingClientRect()},mN=function(t,e){return t[e]},gN=function(t){var e=dN(t);return mN(e,sN)},hN=function(t){var e=dN(t);return mN(e,uN)},pN=function(t){var e=dN(t);return mN(e,aN)},vN=function(t){var e=dN(t);return mN(e,cN)},bN=function(t){var e=dN(t);return mN(e,lN)},yN=function(t){var e=dN(t);return mN(e,fN)},wN=function(t,e,n){return(t+e)/2-n},xN=function(t,e){var n=dN(t),r=dN(e),o=mN(n,sN),i=mN(n,uN),a=mN(r,sN);return wN(o,i,a)},CN=function(t,e){var n=dN(t),r=dN(e),o=mN(n,aN),i=mN(n,cN),a=mN(r,aN);return wN(o,i,a)},SN=function(t,e){Su(t,uM(),{value:e})},kN=function(t){return{x:t}},TN=function(t,e,n){var r={min:gM(e),max:bM(e),range:SM(e),value:n,step:_M(e),snap:EM(e),snapStart:AM(e),rounded:DM(e),hasMinEdge:NM(e),hasMaxEdge:RM(e),minBound:gN(t),maxBound:hN(t),screenRange:bN(t)};return oN(r)},ON=function(t,e,n){var r=TN(t,e,n),o=kN(r);return SN(t,o),r},_N=function(t,e){var n=gM(e);SN(t,kN(n))},EN=function(t,e){var n=bM(e);SN(t,kN(n))},AN=function(t,e,n){var r=t>0?tN:QM,o=r(PM(n).x,gM(n),bM(n),_M(n));return SN(e,kN(o)),P.some(o)},DN=function(t){return function(e,n){return AN(t,e,n).map(_)}},MN=function(t){var e=sM(t);return e.map((function(t){return t.left}))},NN=function(t,e,n,r,o){var i=0,a=bN(t),u=r.bind((function(e){return P.some(xN(e,t))})).getOr(i),c=o.bind((function(e){return P.some(xN(e,t))})).getOr(a),s={min:gM(e),max:bM(e),range:SM(e),value:n,hasMinEdge:NM(e),hasMaxEdge:RM(e),minBound:gN(t),minOffset:i,maxBound:hN(t),maxOffset:a,centerMinEdge:u,centerMaxEdge:c};return iN(s)},RN=function(t,e,n,r,o,i){var a=NN(e,i,n,r,o);return gN(e)-gN(t)+a},zN=function(t,e,n,r){var o=PM(n),i=RN(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=vr(e.element)/2;Kn(e.element,"left",i-a+"px")},BN=DN(-1),PN=DN(1),IN=P.none,LN=P.none,HN={"top-left":P.none(),top:P.none(),"top-right":P.none(),right:P.some($M),"bottom-right":P.none(),bottom:P.none(),"bottom-left":P.none(),left:P.some(JM)},FN=Object.freeze({__proto__:null,setValueFrom:ON,setToMin:_N,setToMax:EN,findValueOfOffset:TN,getValueFromEvent:MN,findPositionOfValue:RN,setPositionFromValue:zN,onLeft:BN,onRight:PN,onUp:IN,onDown:LN,edgeActions:HN}),VN=function(t,e){Su(t,uM(),{value:e})},jN=function(t){return{y:t}},UN=function(t,e,n){var r={min:hM(e),max:yM(e),range:kM(e),value:n,step:_M(e),snap:EM(e),snapStart:AM(e),rounded:DM(e),hasMinEdge:zM(e),hasMaxEdge:BM(e),minBound:pN(t),maxBound:vN(t),screenRange:yN(t)};return oN(r)},WN=function(t,e,n){var r=UN(t,e,n),o=jN(r);return VN(t,o),r},$N=function(t,e){var n=hM(e);VN(t,jN(n))},qN=function(t,e){var n=yM(e);VN(t,jN(n))},GN=function(t,e,n){var r=t>0?tN:QM,o=r(PM(n).y,hM(n),yM(n),_M(n));return VN(e,jN(o)),P.some(o)},KN=function(t){return function(e,n){return GN(t,e,n).map(_)}},XN=function(t){var e=sM(t);return e.map((function(t){return t.top}))},YN=function(t,e,n,r,o){var i=0,a=yN(t),u=r.bind((function(e){return P.some(CN(e,t))})).getOr(i),c=o.bind((function(e){return P.some(CN(e,t))})).getOr(a),s={min:hM(e),max:yM(e),range:kM(e),value:n,hasMinEdge:zM(e),hasMaxEdge:BM(e),minBound:pN(t),minOffset:i,maxBound:vN(t),maxOffset:a,centerMinEdge:u,centerMaxEdge:c};return iN(s)},JN=function(t,e,n,r,o,i){var a=YN(e,i,n,r,o);return pN(e)-pN(t)+a},ZN=function(t,e,n,r){var o=PM(n),i=JN(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=ar(e.element)/2;Kn(e.element,"top",i-a+"px")},QN=P.none,tR=P.none,eR=KN(-1),nR=KN(1),rR={"top-left":P.none(),top:P.some(jM),"top-right":P.none(),right:P.none(),"bottom-right":P.none(),bottom:P.some(KM),"bottom-left":P.none(),left:P.none()},oR=Object.freeze({__proto__:null,setValueFrom:WN,setToMin:$N,setToMax:qN,findValueOfOffset:UN,getValueFromEvent:XN,findPositionOfValue:JN,setPositionFromValue:ZN,onLeft:QN,onRight:tR,onUp:eR,onDown:nR,edgeActions:rR}),iR=function(t,e){Su(t,uM(),{value:e})},aR=function(t,e){return{x:t,y:e}},uR=function(t,e,n){var r=TN(t,e,n.left),o=UN(t,e,n.top),i=aR(r,o);return iR(t,i),i},cR=function(t,e,n,r){var o=t>0?tN:QM,i=e?PM(r).x:o(PM(r).x,gM(r),bM(r),_M(r)),a=e?o(PM(r).y,hM(r),yM(r),_M(r)):PM(r).y;return iR(n,aR(i,a)),P.some(i)},sR=function(t,e){return function(n,r){return cR(t,e,n,r).map(_)}},lR=function(t,e){var n=gM(e),r=hM(e);iR(t,aR(n,r))},fR=function(t,e){var n=bM(e),r=yM(e);iR(t,aR(n,r))},dR=function(t){return sM(t)},mR=function(t,e,n,r){var o=PM(n),i=RN(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=JN(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=vr(e.element)/2,c=ar(e.element)/2;Kn(e.element,"left",i-u+"px"),Kn(e.element,"top",a-c+"px")},gR=sR(-1,!1),hR=sR(1,!1),pR=sR(-1,!0),vR=sR(1,!0),bR={"top-left":P.some(VM),top:P.some(UM),"top-right":P.some(WM),right:P.some(qM),"bottom-right":P.some(GM),bottom:P.some(XM),"bottom-left":P.some(YM),left:P.some(ZM)},yR=Object.freeze({__proto__:null,setValueFrom:uR,setToMin:lR,setToMax:fR,getValueFromEvent:dR,setPositionFromValue:mR,onLeft:gR,onRight:hR,onUp:pR,onDown:vR,edgeActions:bR}),wR=[Ki("stepSize",1),Ki("onChange",p),Ki("onChoose",p),Ki("onInit",p),Ki("onDragStart",p),Ki("onDragEnd",p),Ki("snapToGrid",!1),Ki("rounded",!0),Fi("snapStart"),Di("model",ki("mode",{x:[Ki("minX",0),Ki("maxX",100),_i("value",(function(t){return oa(t.mode.minX)})),Ai("getInitialValue"),fl("manager",FN)],y:[Ki("minY",0),Ki("maxY",100),_i("value",(function(t){return oa(t.mode.minY)})),Ai("getInitialValue"),fl("manager",oR)],xy:[Ki("minX",0),Ki("maxX",100),Ki("minY",0),Ki("maxY",100),_i("value",(function(t){return oa({x:t.mode.minX,y:t.mode.minY})})),Ai("getInitialValue"),fl("manager",yR)]})),ep("sliderBehaviours",[Aw,tp]),_i("mouseIsDown",(function(){return oa(!1)}))],xR=function(t,e,n,r){var o,i=function(e){return Xp(e,t,"thumb")},a=function(e){return Xp(e,t,"spectrum")},u=function(e){return Kp(e,t,"left-edge")},c=function(e){return Kp(e,t,"right-edge")},s=function(e){return Kp(e,t,"top-edge")},l=function(e){return Kp(e,t,"bottom-edge")},f=t.model,d=f.manager,m=function(e,n){d.setPositionFromValue(e,n,t,{getLeftEdge:u,getRightEdge:c,getTopEdge:s,getBottomEdge:l,getSpectrum:a})},g=function(t,e){f.value.set(e);var n=i(t);m(t,n)},h=function(e,n){g(e,n);var r=i(e);return t.onChange(e,r,n),P.some(!0)},p=function(e){d.setToMin(e,t)},v=function(e){d.setToMax(e,t)},b=function(e){var n=function(){Kp(e,t,"thumb").each((function(n){var r=f.value.get();t.onChoose(e,n,r)}))},r=t.mouseIsDown.get();t.mouseIsDown.set(!1),r&&n()},y=function(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,i(e))},w=function(e,n){n.stop(),t.onDragEnd(e,i(e)),b(e)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.sliderBehaviours,[Aw.config({mode:"special",focusIn:function(e){return Kp(e,t,"spectrum").map(Aw.focusIn).map(_)}}),tp.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),yf.config({channels:(o={},o[xh()]={onReceive:b},o)})]),events:Eu([Nu(uM(),(function(t,e){h(t,e.event.value)})),ju((function(e,n){var r=f.getInitialValue();f.value.set(r);var o=i(e);m(e,o);var u=a(e);t.onInit(e,o,u,f.value.get())})),Nu(Aa(),y),Nu(Ma(),w),Nu(Ra(),y),Nu(Pa(),w)]),apis:{resetToMin:p,resetToMax:v,setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},CR=mv({name:"Slider",configFields:wR,partFields:iM,factory:xR,apis:{setValue:function(t,e,n){t.setValue(e,n)},resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),SR=oc("rgb-hex-update"),kR=oc("slider-update"),TR=oc("palette-update"),OR=function(t,e){var n=CR.parts.spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=CR.parts.thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return CR.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:w({y:0})},components:[n,r],sliderBehaviours:mf([Yw.config({})]),onChange:function(t,e,n){Su(t,kR,{value:n})}})},_R="form",ER=[ep("formBehaviours",[tp])],AR=function(t){return"<alloy.field."+t+">"},DR=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),Up(_R,AR(e),n)};return{field:e,record:w(t)}}(),n=t(e),r=e.record(),o=q(r,(function(t){return Rp({name:t,pname:AR(t)})}));return av(_R,ER,o,NR,n)},MR=function(t,e){return t.fold((function(){return ro.error(e)}),ro.value)},NR=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.formBehaviours,[tp.config({store:{mode:"manual",getValue:function(e){var n=Jp(e,t);return bt(n,(function(t,e){return t().bind((function(t){var n=bv.getCurrent(t);return MR(n,new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+Qu(t.element)))})).map(tp.getValue)}))},setValue:function(e,n){vt(n,(function(n,r){Kp(e,t,r).each((function(t){bv.getCurrent(t).each((function(t){tp.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return Kp(e,t,n).bind(bv.getCurrent)}}}},RR={getField:Sc((function(t,e,n){return t.getField(e,n)})),sketch:DR},zR=oc("valid-input"),BR=oc("invalid-input"),PR=oc("validating-input"),IR="colorcustom.rgb.",LR=function(t,e,n,r){var o=function(n,r){return dD.config({invalidClass:e("invalid"),notify:{onValidate:function(t){Su(t,PR,{type:n})},onValid:function(t){Su(t,zR,{type:n,value:tp.getValue(t)})},onInvalid:function(t){Su(t,BR,{type:n,value:tp.getValue(t)})}},validator:{validate:function(e){var n=tp.getValue(e),o=r(n)?ro.value(!0):ro.error(t("aria.input.invalid"));return tD.pure(o)},validateOnLoad:!1}})},i=function(n,r,i,a,u){var c=t(IR+"range"),s=hA.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":a}}}),l=hA.parts.field({data:u,factory:jA,inputAttributes:A({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:mf([o(r,n),yA.config({})]),onSetValue:function(t){if(dD.isInvalid(t)){var e=dD.run(t);e.get(p)}}}),f=[s,l],d="hex"!==r?[hA.parts["aria-descriptor"]({text:c})]:[],m=f.concat(d);return{dom:{tag:"div",attributes:{role:"presentation"}},components:m}},a=function(t,e){var n=e_(e);return RR.getField(t,"hex").each((function(e){Yw.isFocused(e)||tp.setValue(t,{hex:n.value})})),n},u=function(t,e){var n=e.red,r=e.green,o=e.blue;tp.setValue(t,{red:n,green:r,blue:o})},c=kC({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),s=function(t,e){c.getOpt(t).each((function(t){Kn(t.element,"background-color","#"+e.value)}))},l=function(){var o={red:oa(P.some(255)),green:oa(P.some(255)),blue:oa(P.some(255)),hex:oa(P.some("ffffff"))},l=function(t,e){var n=l_(e);u(t,n),g(n)},f=function(t){return o[t].get()},d=function(t,e){o[t].set(e)},m=function(){return f("red").bind((function(t){return f("green").bind((function(e){return f("blue").map((function(n){return u_(t,e,n,1)}))}))}))},g=function(t){var e=t.red,n=t.green,r=t.blue;d("red",P.some(e)),d("green",P.some(n)),d("blue",P.some(r))},h=function(t,e){var n=e.event;"hex"!==n.type?d(n.type,P.none()):r(t)},p=function(t,e){n(t);var r=qO(e);d("hex",P.some(e));var o=l_(r);u(t,o),g(o),Su(t,SR,{hex:r}),s(t,r)},v=function(t,e,n){var r=parseInt(n,10);d(e,P.some(r)),m().each((function(e){var n=a(t,e);Su(t,SR,{hex:n}),s(t,n)}))},b=function(t){return"hex"===t.type},y=function(t,e){var n=e.event;b(n)?p(t,n.value):v(t,n.type,n.value)},w=function(e){return{label:t(IR+e+".label"),description:t(IR+e+".description")}},x=w("red"),C=w("green"),S=w("blue"),k=w("hex");return Co(RR.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",hA.sketch(i(c_,"red",x.label,x.description,255))),n.field("green",hA.sketch(i(c_,"green",C.label,C.description,255))),n.field("blue",hA.sketch(i(c_,"blue",S.label,S.description,255))),n.field("hex",hA.sketch(i(XO,"hex",k.label,k.description,"ffffff"))),c.asSpec()],formBehaviours:mf([dD.config({invalidClass:e("form-invalid")}),Vw("rgb-form-events",[Nu(zR,y),Nu(BR,h),Nu(PR,h)])])}})),{apis:{updateHex:function(t,e){tp.setValue(t,{hex:e.value}),l(t,e),s(t,e)}}})},f=dv({factory:l,name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}});return f},HR=function(t,e){var n=CR.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),r=CR.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"<div class="+e("sv-palette-inner-thumb")+' role="presentation"></div>'}}),o=function(t,e){var n=t.width,r=t.height,o=t.getContext("2d");if(null!==o){o.fillStyle=e,o.fillRect(0,0,n,r);var i=o.createLinearGradient(0,0,n,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),o.fillStyle=i,o.fillRect(0,0,n,r);var a=o.createLinearGradient(0,0,0,r);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=a,o.fillRect(0,0,n,r)}},i=function(t,e){var n=t.components()[0].element.dom,r=x_(e,100,100),i=s_(r);o(n,m_(i))},a=function(t,e){var n=C_(l_(e));CR.setValue(t,{x:n.saturation,y:100-n.value})},u=function(t){var i=w({x:0,y:0}),a=function(t,e,n){Su(t,TR,{value:n})},u=function(t,e,n,r){o(n.element.dom,m_(g_))},c=mf([bv.config({find:P.some}),Yw.config({})]);return CR.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:i},rounded:!1,components:[n,r],onChange:a,onInit:u,sliderBehaviours:c})},c=dv({factory:u,name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){i(e,n)},setThumb:function(t,e,n){a(e,n)}},extraApis:{}});return c},FR=function(t,e){var n=function(n){var r=LR(t,e,n.onValidHex,n.onInvalidHex),o=HR(t,e),i=function(t){return(100-t)/100*360},a=function(t){return 100-t/360*100},u={paletteRgba:oa(g_),paletteHue:oa(0)},c=kC(OR(t,e)),s=kC(o.sketch({})),l=kC(r.sketch({})),f=function(t,e,n){s.getOpt(t).each((function(t){o.setHue(t,n)}))},d=function(t,e){l.getOpt(t).each((function(t){r.updateHex(t,e)}))},m=function(t,e,n){c.getOpt(t).each((function(t){CR.setValue(t,{y:a(n)})}))},g=function(t,e){s.getOpt(t).each((function(t){o.setThumb(t,e)}))},h=function(t,e){var n=l_(t);u.paletteRgba.set(n),u.paletteHue.set(e)},p=function(t,e,n,r){h(e,n),G(r,(function(r){r(t,e,n)}))},v=function(){var t=[d];return function(e,n){var r=n.event.value,o=u.paletteHue.get(),i=x_(o,r.x,100-r.y),a=k_(i);p(e,a,o,t)}},b=function(){var t=[f,d];return function(e,n){var r=i(n.event.value.y),o=u.paletteRgba.get(),a=C_(o),c=x_(r,a.saturation,a.value),s=k_(c);p(e,s,r,t)}},y=function(){var t=[f,m,g];return function(e,n){var r=n.event.hex,o=S_(r);p(e,r,o.hue,t)}};return{uid:n.uid,dom:n.dom,components:[s.asSpec(),c.asSpec(),l.asSpec()],behaviours:mf([Vw("colour-picker-events",[Nu(SR,y()),Nu(TR,v()),Nu(kR,b())]),bv.config({find:function(t){return l.getOpt(t)}}),Aw.config({mode:"acyclic"})])}},r=dv({name:"ColourPicker",configFields:[Ai("dom"),Ki("onValidHex",p),Ki("onInvalidHex",p)],factory:n});return r},VR=function(){return bv.config({find:P.some})},jR=function(t){return bv.config({find:t.getOpt})},UR=function(t){return bv.config({find:function(e){return Cn(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},WR={self:VR,memento:jR,childAt:UR},$R={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},qR=function(t){return $R[t]},GR=function(t){return qR(t)},KR=function(t){var e=function(t){return"tox-"+t},n=FR(GR,e),r=function(t){Su(t,DA,{name:"hex-valid",value:!0})},o=function(t){Su(t,DA,{name:"hex-valid",value:!1})},i=kC(n.sketch({dom:{tag:"div",classes:[e("color-picker-container")],attributes:{role:"presentation"}},onValidHex:r,onInvalidHex:o}));return{dom:{tag:"div"},components:[i.asSpec()],behaviours:mf([tp.config({store:{mode:"manual",getValue:function(t){var e=i.get(t),n=bv.getCurrent(e),r=n.bind((function(t){var e=tp.getValue(t);return e.hex}));return r.map((function(t){return"#"+t})).getOr("")},setValue:function(t,e){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,r=n.exec(e),o=i.get(t),a=bv.getCurrent(o);a.fold((function(){console.log("Can not find form")}),(function(t){tp.setValue(t,{hex:P.from(r[1]).getOr("")}),RR.getField(t,"hex").each((function(t){Cu(t,ja())}))}))}}}),WR.self()])}},XR=tinymce.util.Tools.resolve("tinymce.Resource"),YR=function(t){return _t(t,"init")},JR=function(t){var e=od(),n=kC({dom:{tag:t.tag}}),r=od();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:mf([Vw("custom-editor-events",[ju((function(o){n.getOpt(o).each((function(n){(YR(t)?t.init(n.element.dom):XR.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element.dom,t.settings)}))).then((function(t){r.on((function(e){t.setValue(e)})),r.clear(),e.set(t)}))}))}))]),tp.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(n)}),(function(t){return t.setValue(n)}))}}}),WR.self()]),components:[n.asSpec()]}},ZR=tinymce.util.Tools.resolve("tinymce.util.Tools"),QR=ti([Ki("preprocess",x),Ki("postprocess",x)]),tz=function(t,e){var n=Ci("RepresentingConfigs.memento processors",QR,e);return tp.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=tp.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);tp.setValue(i,o)}}})},ez=function(t,e,n){return tp.config(Co({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))},nz=function(t,e,n){return ez(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}))},rz=function(t){return nz(t,ds,ms)},oz=function(t){return nz(t,Gu,Ku)},iz=function(t){return tp.config({store:{mode:"memory",initialValue:t}})},az={memento:tz,withElement:nz,withComp:ez,domValue:rz,domHtml:oz,memory:iz},uz="jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",cz=function(t,e){var n=ZR.explode(e.getSetting("images_file_types",uz,"string")),r=function(t){return U(n,(function(e){return Wt(t.name.toLowerCase(),"."+e.toLowerCase())}))};return Y(mt(t),r)},sz=function(t,e){var n=function(t,e){e.stop()},r=function(t){return function(e,n){G(t,(function(t){t(e,n)}))}},o=function(t,e){if(!Iv.isDisabled(t)){var n=e.event.raw;a(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event.raw.target;a(t,n.files)},a=function(n,r){tp.setValue(n,cz(r,e)),Su(n,_A,{name:t.name})},u=kC({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:mf([Vw("input-file-events",[Hu(Wa()),Hu(ru())])])}),c=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:mf([az.memory([]),WR.self(),Iv.config({}),hx.config({toggleClass:"dragenter",toggleOnExecute:!1}),Vw("dropzone-events",[Nu("dragenter",r([n,hx.toggle])),Nu("dragleave",r([n,hx.toggle])),Nu("dragover",n),Nu("drop",r([n,o])),Nu(Ua(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},SC.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){var e=u.get(t);e.element.dom.click()},buttonBehaviours:mf([yA.config({}),mO.button(e.isDisabled),cO()])})]}]}},s=t.label.map((function(t){return OA(t,e)})),l=hA.parts.field({factory:{sketch:c}});return xA(s,l,["tox-form__group--stretched"],[])},lz=function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:q(t.items,e.interpreter)}},fz=oc("alloy-fake-before-tabstop"),dz=oc("alloy-fake-after-tabstop"),mz=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:mf([Yw.config({ignore:!0}),yA.config({})])}},gz=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[mz([fz]),t,mz([dz])],behaviours:mf([WR.childAt(1)])}},hz=function(t,e){Su(t,Fa(),{raw:{which:9,shiftKey:e}})},pz=function(t,e){var n=e.element;cs(n,fz)?hz(t,!0):cs(n,dz)&&hz(t,!1)},vz=function(t){return PE(t,["."+fz,"."+dz].join(","),O)},bz=!(en().browser.isIE()||en().browser.isEdge()),yz=function(t){var e=oa("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)Fn(n.element,"srcdoc",r);else{Fn(n.element,"src","javascript:''");var o=n.element.dom.contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}},wz=function(t,e){var n=bz&&t.sandboxed,r=A(A({},t.label.map((function(t){return{title:t}})).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=yz(n),i=t.label.map((function(t){return OA(t,e)})),a=function(t){return gz({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:mf([yA.config({}),Yw.config({}),az.withComp(P.none(),o.getValue,o.setValue)])})},u=hA.parts.field({factory:{sketch:a}});return xA(i,u,["tox-form__group--stretched"],[])},xz=function(t,e){return kz(document.createElement("canvas"),t,e)},Cz=function(t){var e=xz(t.width,t.height),n=Sz(e);return n.drawImage(t,0,0),e},Sz=function(t){return t.getContext("2d")},kz=function(t,e,n){return t.width=e,t.height=n,t},Tz=function(t){return t.naturalWidth||t.width},Oz=function(t){return t.naturalHeight||t.height},_z=function(t){return new qA((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)}))},Ez=function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return P.none();for(var r=n[1],o=e[1],i=1024,a=atob(o),u=a.length,c=Math.ceil(u/i),s=new Array(c),l=0;l<c;++l){for(var f=l*i,d=Math.min(f+i,u),m=new Array(d-f),g=f,h=0;g<d;++h,++g)m[h]=a[g].charCodeAt(0);s[l]=new Uint8Array(m)}return P.some(new Blob(s,{type:r}))},Az=function(t){return new qA((function(e,n){Ez(t).fold((function(){n("uri is not base64: "+t)}),e)}))},Dz=function(t,e,n){return e=e||"image/png",m(HTMLCanvasElement.prototype.toBlob)?new qA((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):Az(t.toDataURL(e,n))},Mz=function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)},Nz=function(t){return _z(t).then((function(t){zz(t);var e=xz(Tz(t),Oz(t)),n=Sz(e);return n.drawImage(t,0,0),e}))},Rz=function(t){return new qA((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))},zz=function(t){URL.revokeObjectURL(t.src)},Bz=function(t,e,n){var r=e.type,o=w(r),i=function(){return qA.resolve(e)},a=w(n),u=function(){return n.split(",")[1]},c=function(e,n){return t.then((function(t){return Dz(t,e,n)}))},s=function(e,n){return t.then((function(t){return Mz(t,e,n)}))},l=function(t,e){return s(t,e).then((function(t){return t.split(",")[1]}))},f=function(){return t.then(Cz)};return{getType:o,toBlob:i,toDataURL:a,toBase64:u,toAdjustedBlob:c,toAdjustedDataURL:s,toAdjustedBase64:l,toCanvas:f}},Pz=function(t){return Rz(t).then((function(e){return Bz(Nz(t),t,e)}))},Iz=function(t,e){return Dz(t,e).then((function(e){return Bz(qA.resolve(t),e,t.toDataURL())}))},Lz=function(t){return Pz(t)},Hz=function(t,e,n){var r="string"===typeof t?parseFloat(t):t;return r>n?r=n:r<e&&(r=e),r},Fz=function(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]},Vz=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],jz=function(t,e){for(var n,r=[],o=new Array(25),i=0;i<5;i++){for(var a=0;a<5;a++)r[a]=e[a+5*i];for(a=0;a<5;a++){n=0;for(var u=0;u<5;u++)n+=t[a+5*u]*r[u];o[a+5*i]=n}}return o},Uz=function(t,e){var n;return e=Hz(e,-1,1),e*=100,e<0?n=127+e/100*127:(n=e%1,n=0===n?Vz[e]:Vz[Math.floor(e)]*(1-n)+Vz[Math.floor(e)+1]*n,n=127*n+127),jz(t,[n/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])},Wz=function(t,e){return e=Hz(255*e,-255,255),jz(t,[1,0,0,0,e,0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])},$z=function(t,e,n,r){return e=Hz(e,0,2),n=Hz(n,0,2),r=Hz(r,0,2),jz(t,[e,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0,0,0,0,0,1])},qz=function(t,e){return t.toCanvas().then((function(n){return Gz(n,t.getType(),e)}))},Gz=function(t,e,n){var r=Sz(t),o=function(t,e){for(var n,r,o,i,a=t.data,u=e[0],c=e[1],s=e[2],l=e[3],f=e[4],d=e[5],m=e[6],g=e[7],h=e[8],p=e[9],v=e[10],b=e[11],y=e[12],w=e[13],x=e[14],C=e[15],S=e[16],k=e[17],T=e[18],O=e[19],_=0;_<a.length;_+=4)n=a[_],r=a[_+1],o=a[_+2],i=a[_+3],a[_]=n*u+r*c+o*s+i*l+f,a[_+1]=n*d+r*m+o*g+i*h+p,a[_+2]=n*v+r*b+o*y+i*w+x,a[_+3]=n*C+r*S+o*k+i*T+O;return t},i=o(r.getImageData(0,0,t.width,t.height),n);return r.putImageData(i,0,0),Iz(t,e)},Kz=function(t,e){return t.toCanvas().then((function(n){return Xz(n,t.getType(),e)}))},Xz=function(t,e,n){var r=Sz(t),o=function(t,e,n){for(var r=function(t,e,n){return t>n?t=n:t<e&&(t=e),t},o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=t.data,u=e.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,h=0;h<o;h++)for(var p=0;p<o;p++){var v=r(f+p-i,0,c-1),b=r(l+h-i,0,s-1),y=4*(b*c+v),w=n[h*o+p];d+=a[y]*w,m+=a[y+1]*w,g+=a[y+2]*w}var x=4*(l*c+f);u[x]=r(d,0,255),u[x+1]=r(m,0,255),u[x+2]=r(g,0,255)}return e},i=r.getImageData(0,0,t.width,t.height),a=r.getImageData(0,0,t.width,t.height);return a=o(i,a,n),r.putImageData(a,0,0),Iz(t,e)},Yz=function(t){var e=function(e,n,r){for(var o=Sz(e),i=new Array(256),a=function(t,e){for(var n=t.data,r=0;r<n.length;r+=4)n[r]=e[n[r]],n[r+1]=e[n[r+1]],n[r+2]=e[n[r+2]];return t},u=0;u<i.length;u++)i[u]=t(u,r);var c=a(o.getImageData(0,0,e.width,e.height),i);return o.putImageData(c,0,0),Iz(e,n)};return function(t,n){return t.toCanvas().then((function(r){return e(r,t.getType(),n)}))}},Jz=function(t){return function(e,n){return qz(e,t(Fz(),n))}},Zz=function(t){return function(e){return qz(e,t)}},Qz=function(t){return function(e){return Kz(e,t)}},tB=Zz([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),eB=Jz(Wz),nB=Jz(Uz),rB=function(t,e,n,r){return qz(t,$z(Fz(),e,n,r))},oB=Qz([0,-1,0,-1,5,-1,0,-1,0]),iB=Yz((function(t,e){return 255*Math.pow(t/255,1-e)})),aB=function(t,e,n){var r=Tz(t),o=Oz(t),i=e/r,a=n/o,u=!1;(i<.5||i>2)&&(i=i<.5?.5:2,u=!0),(a<.5||a>2)&&(a=a<.5?.5:2,u=!0);var c=uB(t,i,a);return u?c.then((function(t){return aB(t,e,n)})):c},uB=function(t,e,n){return new qA((function(r){var o=Tz(t),i=Oz(t),a=Math.floor(o*e),u=Math.floor(i*n),c=xz(a,u),s=Sz(c);s.drawImage(t,0,0,o,i,0,0,a,u),r(c)}))},cB=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},sB=function(t,e){return t.toCanvas().then((function(n){return lB(n,t.getType(),e)}))},lB=function(t,e,n){var r=n<0?360+n:n,o=r*Math.PI/180,i=t.width,a=t.height,u=Math.sin(o),c=Math.cos(o),s=cB(Math.abs(i*c)+Math.abs(a*u)),l=cB(Math.abs(i*u)+Math.abs(a*c)),f=xz(s,l),d=Sz(f);return d.translate(s/2,l/2),d.rotate(o),d.drawImage(t,-i/2,-a/2),Iz(f,e)},fB=function(t,e){return t.toCanvas().then((function(n){return dB(n,t.getType(),e)}))},dB=function(t,e,n){var r=xz(t.width,t.height),o=Sz(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),Iz(r,e)},mB=function(t,e,n,r,o){return t.toCanvas().then((function(i){return gB(i,t.getType(),e,n,r,o)}))},gB=function(t,e,n,r,o,i){var a=xz(o,i),u=Sz(a);return u.drawImage(t,-n,-r),Iz(a,e)},hB=function(t,e,n){return t.toCanvas().then((function(r){return aB(r,e,n).then((function(e){return Iz(e,t.getType())}))}))},pB=function(t){return tB(t)},vB=function(t){return oB(t)},bB=function(t,e){return iB(t,e)},yB=function(t,e,n,r){return rB(t,e,n,r)},wB=function(t,e){return eB(t,e)},xB=function(t,e){return nB(t,e)},CB=function(t,e){return fB(t,e)},SB=function(t,e,n,r,o){return mB(t,e,n,r,o)},kB=function(t,e,n){return hB(t,e,n)},TB=function(t,e){return sB(t,e)},OB=function(t,e,n){return PC(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)},_B=function(t,e){return OB(t,e,[])},EB=function(t,e){return OB(t,e,[Hw.config({})])},AB=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:mf([Hw.config({})])}},DB=oc("toolbar.button.execute"),MB=function(t){return $u((function(e,n){gO(t,e)((function(n){Su(e,DB,{buttonApi:n}),t.onAction(n)}))}))},NB=(xD={},xD[eu()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],xD),RB=oc("update-menu-text"),zB=oc("update-menu-icon"),BB=function(t,e,n){var r=oa(p),o=t.text.map((function(t){return kC(AB(t,e,n.providers))})),i=t.icon.map((function(t){return kC(EB(t,n.providers.icons))})),a=function(t,e){var n=tp.getValue(t);return Yw.focus(n),Su(n,"keydown",{raw:e.event.raw}),ID.close(n),P.some(!0)},u=t.role.fold((function(){return{}}),(function(t){return{role:t}})),c=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),s=PC("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons),l=kC(ID.sketch(A(A(A({},t.uid?{uid:t.uid}:{}),u),{dom:{tag:"button",classes:[e,e+"--select"].concat(q(t.classes,(function(t){return e+"--"+t}))),attributes:A({},c)},components:yO([i.map((function(t){return t.asSpec()})),o.map((function(t){return t.asSpec()})),P.some(s)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:mf(M(M([],t.dropdownBehaviours,!0),[mO.button((function(){return t.disabled||n.providers.isDisabled()})),cO(),VD.config({}),Hw.config({}),Vw("dropdown-events",[hO(t,r),pO(t,r)]),Vw("menubutton-update-display-text",[Nu(RB,(function(t,e){o.bind((function(e){return e.getOpt(t)})).each((function(t){Hw.set(t,[Ss(n.providers.translate(e.event.text))])}))})),Nu(zB,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Hw.set(t,[EB(e.event.icon,n.providers.icons)])}))}))])],!1)),eventOrder:Co(NB,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:mf([Aw.config({mode:"special",onLeft:a,onRight:a})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:pk(!1,t.columns,t.presets)},fetch:function(e){return tD.nu(S(t.fetch,e))}})));return l.asSpec()},PB=function(t){return i(t)},IB=function(t){return"separator"===t.type},LB=function(t){return _t(t,"getSubmenuItems")},HB={type:"separator"},FB=function(t,e){var n=Z(t,(function(t,n){return PB(n)?""===n?t:"|"===n?t.length>0&&!IB(t[t.length-1])?t.concat([HB]):t:_t(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])}),[]);return n.length>0&&IB(n[n.length-1])&&n.pop(),n},VB=function(t,e){var n=t.getSubmenuItems(),r=WB(n,e),o=Co(r.menus,ma(t.value,r.items)),i=Co(r.expansions,ma(t.value,t.value));return{item:t,menus:o,expansions:i}},jB=function(t,e){return LB(t)?VB(t,e):{item:t,menus:{},expansions:{}}},UB=function(t){if(IB(t))return t;var e=Ot(t,"value").getOrThunk((function(){return oc("generated-menu-item")}));return Co({value:e},t)},WB=function(t,e){var n=FB(i(t)?t.split(" "):t,e);return J(n,(function(t,n){var r=UB(n),o=jB(r,e);return{menus:Co(t.menus,o.menus),items:[o.item].concat(t.items),expansions:Co(t.expansions,o.expansions)}}),{menus:{},expansions:{},items:[]})},$B=function(t,e,n,r){var o=oc("primary-menu"),i=WB(t,n.shared.providers.menuItems());if(0===i.items.length)return P.none();var a=ME(o,i.items,e,n,r),u=bt(i.menus,(function(t,r){return ME(r,t,e,n,!1)})),c=Co(u,ma(o,a));return P.from(Zx.tieredData(o,c,i.expansions))},qB=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)},setActive:function(e){var n=t.element;e?(is(n,"tox-tbtn--enabled"),Fn(n,"aria-pressed",!0)):(us(n,"tox-tbtn--enabled"),$n(n,"aria-pressed"))},isActive:function(){return cs(t.element,"tox-tbtn--enabled")}}},GB=function(t,e,n,r){return BB({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r($B(t,US.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:qB,columns:1,presets:"normal",classes:[],dropdownBehaviours:[yA.config({})]},e,n.shared)},KB=function(t,e,n){var r=function(t){return function(r){var o=!r.isActive();r.setActive(o),t.storage.set(o),n.shared.getSink().each((function(n){e().getOpt(n).each((function(e){Sf(e.element),Su(e,DA,{name:t.name,value:t.storage.get()})}))}))}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e(q(t,(function(t){var e=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return A(A({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})})))}},XB=function(t,e,n,r,o,i){void 0===n&&(n=[]);var a=e.fold((function(){return{}}),(function(t){return{action:t}})),u=A({buttonBehaviours:mf([mO.button((function(){return t.disabled||i.isDisabled()})),cO(),yA.config({}),Vw("button press",[Mu("click"),Mu("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),c=Co(u,{dom:r});return Co(c,{components:o})},YB=function(t,e,n,r){void 0===r&&(r=[]);var o=t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({}),i={tag:"button",classes:["tox-tbtn"],attributes:o},a=t.icon.map((function(t){return _B(t,n.icons)})),u=yO([a]);return XB(t,e,r,i,u,n)},JB=function(t,e,n,r){void 0===r&&(r=[]);var o=YB(t,P.some(e),n,r);return SC.sketch(o)},ZB=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return _B(t,n.icons)})):P.none(),u=a.isSome()?yO([a]):[],c=a.isSome()?{}:{innerHtml:i},s=M(M(M(M([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),a.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),o,!0),l=A(A({tag:"button",classes:s},c),{attributes:{title:i}});return XB(t,e,r,l,u,n)},QB=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=ZB(t,P.some(e),n,r,o);return SC.sketch(i)},tP=function(t,e){return function(n){"custom"===e?Su(n,DA,{name:t,value:{}}):"submit"===e?Cu(n,MA):"cancel"===e?Cu(n,AA):console.error("Unknown button type: ",e)}},eP=function(t,e){return"menu"===e},nP=function(t,e){return"custom"===e||"cancel"===e||"submit"===e},rP=function(t,e,n){if(eP(t,e)){var r=function(){return a},o=t,i=A(A({},t),{onSetup:function(e){return e.setDisabled(t.disabled),p},fetch:KB(o.items,r,n)}),a=kC(GB(i,"tox-tbtn",n,P.none()));return a.asSpec()}if(nP(t,e)){var u=tP(t.name,e),c=A(A({},t),{borderless:!1});return QB(c,u,n.shared.providers,[])}console.error("Unknown footer button type: ",e)},oP=function(t,e){var n=tP(t.name,"custom");return CA(P.none(),hA.parts.field(A({factory:SC},ZB(t,P.some(n),e,[az.memory(""),WR.self()]))))},iP=w([Ki("field1Name","field1"),Ki("field2Name","field2"),sl("onLockedChange"),il(["lockClass"]),Ki("locked",!1),op.field("coupledFieldBehaviours",[bv,tp])]),aP=function(t,e,n){return Kp(t,e,n).bind(bv.getCurrent)},uP=function(t,e){return Rp({factory:hA,name:t,overrides:function(t){return{fieldBehaviours:mf([Vw("coupled-input-behaviour",[Nu(ja(),(function(n){aP(n,t,e).each((function(e){Kp(n,t,"lock").each((function(r){hx.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})},cP=w([uP("field1","field2"),uP("field2","field1"),Rp({factory:SC,schema:[Ai("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:mf([hx.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),sP=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:op.augment(t.coupledFieldBehaviours,[bv.config({find:P.some}),tp.config({store:{mode:"manual",getValue:function(e){var n,r=Qp(e,t,["field1","field2"]);return n={},n[t.field1Name]=tp.getValue(r.field1()),n[t.field2Name]=tp.getValue(r.field2()),n},setValue:function(e,n){var r=Qp(e,t,["field1","field2"]);Et(n,t.field1Name)&&tp.setValue(r.field1(),n[t.field1Name]),Et(n,t.field2Name)&&tp.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return Kp(e,t,"field1")},getField2:function(e){return Kp(e,t,"field2")},getLock:function(e){return Kp(e,t,"lock")}}}},lP=mv({name:"FormCoupledInputs",configFields:iP(),partFields:cP(),factory:sP,apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),fP=function(t){var e={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},n=function(t){return t in e?e[t]:1},r=t.value.toFixed(n(t.unit));return-1!==r.indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+t.unit},dP=function(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/,n=e.exec(t);if(null!==n){var r=parseFloat(n[1]),o=n[2];return ro.value({value:r,unit:o})}return ro.error(t)},mP=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return _t(n,t)};return t.unit===e?P.some(t.value):r(t.unit)&&r(e)?n[t.unit]===n[e]?P.some(t.value):P.some(t.value/n[t.unit]*n[e]):P.none()},gP=function(t){return P.none()},hP=function(t,e){return function(n){return mP(n,e).map((function(n){return{value:n*t,unit:e}}))}},pP=function(t,e){var n=dP(t).toOptional(),r=dP(e).toOptional();return Rt(n,r,(function(t,e){return mP(t,e.unit).map((function(t){return e.value/t})).map((function(t){return hP(t,e.unit)})).getOr(gP)})).getOr(gP)},vP=function(t,e){var n=gP,r=oc("ratio-event"),o=function(t){return PC(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)},i=lP.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[o("lock"),o("unlock")],buttonBehaviours:mf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),yA.config({})])}),a=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},u=function(n){return hA.parts.field({factory:jA,inputClasses:["tox-textfield"],inputBehaviours:mf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),yA.config({}),Vw("size-input-events",[Nu(La(),(function(t,e){Su(t,r,{isField1:n})})),Nu(Ua(),(function(e,n){Su(e,_A,{name:t.name})}))])]),selectOnFocus:!1})},c=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},s=lP.parts.field1(a([hA.parts.label(c("Width")),u(!0)])),l=lP.parts.field2(a([hA.parts.label(c("Height")),u(!1)]));return lP.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,a([c("&nbsp;"),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){dP(tp.getValue(t)).each((function(t){n(t).each((function(t){tp.setValue(e,fP(t))}))}))},coupledFieldBehaviours:mf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){lP.getField1(t).bind(hA.getField).each(Iv.disable),lP.getField2(t).bind(hA.getField).each(Iv.disable),lP.getLock(t).each(Iv.disable)},onEnabled:function(t){lP.getField1(t).bind(hA.getField).each(Iv.enable),lP.getField2(t).bind(hA.getField).each(Iv.enable),lP.getLock(t).each(Iv.enable)}}),cO(),Vw("size-input-events2",[Nu(r,(function(t,e){var r=e.event.isField1,o=r?lP.getField1(t):lP.getField2(t),i=r?lP.getField2(t):lP.getField1(t),a=o.map(tp.getValue).getOr(""),u=i.map(tp.getValue).getOr("");n=pP(a,u)}))])])})},bP=w(oc("undo")),yP=w(oc("redo")),wP=w(oc("zoom")),xP=w(oc("back")),CP=w(oc("apply")),SP=w(oc("swap")),kP=w(oc("transform")),TP=w(oc("temp-transform")),OP=w(oc("transform-apply")),_P={undo:bP,redo:yP,zoom:wP,back:xP,apply:CP,swap:SP,transform:kP,tempTransform:TP,transformApply:OP},EP=w("save-state"),AP=w("disable"),DP=w("enable"),MP={formActionEvent:DA,saveState:EP,disable:AP,enable:DP},NP=function(t,e){var n=function(t,n,r,o){return kC(QB({name:t,text:t,disabled:r,primary:o,icon:P.none(),borderless:!1},n,e))},r=function(t,n,r,o){return kC(JB({name:t,icon:P.some(t),tooltip:P.some(n),disabled:o,primary:!1,borderless:!1},r,e))},o=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Iv)&&Iv.disable(n)}))},i=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Iv)&&Iv.enable(n)}))},a={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},u=p,c=function(t,e,n){Su(t,e,n)},s=function(t){return Cu(t,MP.disable())},l=function(t){return Cu(t,MP.enable())},f=function(t,e){s(t),c(t,_P.transform(),{transform:e}),l(t)},d=function(t,e){s(t),c(t,_P.tempTransform(),{transform:e}),l(t)},m=function(t){return function(){at.getOpt(t).each((function(t){Hw.set(t,[ot])}))}},g=function(t,e){s(t),c(t,_P.transformApply(),{transform:e,swap:m(t)}),l(t)},h=function(){return n("Back",(function(t){return c(t,_P.back(),{swap:m(t)})}),!1,!1)},v=function(){return kC({dom:{tag:"div",classes:["tox-spacer"]},behaviours:mf([Iv.config({})])})},b=function(){return n("Apply",(function(t){return c(t,_P.apply(),{swap:m(t)})}),!0,!0)},y=function(){return function(e){var n=t.getRect();return SB(e,n.x,n.y,n.w,n.h)}},x=[h(),v(),n("Apply",(function(e){var n=y();g(e,n),t.hideCrop()}),!1,!0)],C=sA.sketch({dom:a,components:x.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-crop-buttons-events",[Nu(MP.disable(),(function(t,e){o(x,t)})),Nu(MP.enable(),(function(t,e){i(x,t)}))])])}),S=kC(vP({name:"size",label:P.none(),constrain:!0,disabled:!1},e)),k=function(t,e){return function(n){return kB(n,t,e)}},T=[h(),v(),S,v(),n("Apply",(function(t){S.getOpt(t).each((function(e){var n=tp.getValue(e),r=parseInt(n.width,10),o=parseInt(n.height,10),i=k(r,o);g(t,i)}))}),!1,!0)],O=sA.sketch({dom:a,components:T.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-resize-buttons-events",[Nu(MP.disable(),(function(t,e){o(T,t)})),Nu(MP.enable(),(function(t,e){i(T,t)}))])])}),_=function(t,e){return function(n){return t(n,e)}},E=_(CB,"h"),A=_(CB,"v"),D=_(TB,-90),M=_(TB,90),N=function(t,e){d(t,e)},R=[h(),v(),r("flip-horizontally","Flip horizontally",(function(t){N(t,E)}),!1),r("flip-vertically","Flip vertically",(function(t){N(t,A)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){N(t,D)}),!1),r("rotate-right","Rotate clockwise",(function(t){N(t,M)}),!1),v(),b()],z=sA.sketch({dom:a,components:R.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-fliprotate-buttons-events",[Nu(MP.disable(),(function(t,e){o(R,t)})),Nu(MP.enable(),(function(t,e){i(R,t)}))])])}),B=function(t,n,r,o,i){var a=CR.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),u=CR.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=CR.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return kC(CR.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:w({x:o})},components:[a,u,c],sliderBehaviours:mf([Yw.config({})]),onChoose:n}))},I=function(t,e,n,r,o){var i=function(t,n,r){var o=_(e,r.x/100);f(t,o)};return B(t,i,n,r,o)},L=function(t,e,n,r,o){return[h(),I(t,e,n,r,o),b()]},H=function(t,e,n,r,u){var c=L(t,e,n,r,u);return sA.sketch({dom:a,components:c.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-filter-panel-buttons-events",[Nu(MP.disable(),(function(t,e){o(c,t)})),Nu(MP.enable(),(function(t,e){i(c,t)}))])])})},F=[h(),v(),b()],V=sA.sketch({dom:a,components:F.map((function(t){return t.asSpec()}))}),j=H("Brightness",wB,-100,0,100),U=H("Contrast",xB,-100,0,100),W=H("Gamma",bB,-100,0,100),$=function(t,e,n){return function(r){return yB(r,t,e,n)}},q=function(t){var e=function(t,e,n){var r=G.getOpt(t),o=X.getOpt(t),i=K.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o=tp.getValue(e).x/100,i=tp.getValue(r).x/100,a=tp.getValue(n).x/100,u=$(o,i,a);f(t,u)}))}))}))};return B(t,e,0,100,200)},G=q("R"),K=q("G"),X=q("B"),Y=[h(),G,K,X,b()],J=sA.sketch({dom:a,components:Y.map((function(t){return t.asSpec()}))}),Z=function(t,e,n){return function(r){var o=function(){at.getOpt(r).each((function(e){Hw.set(e,[t]),n(e)}))};c(r,_P.swap(),{transform:e,swap:o})}},Q=function(e){t.showCrop()},tt=function(e){S.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;tp.setValue(e,{width:r,height:o})}))},et=P.some(vB),nt=P.some(pB),rt=[r("crop","Crop",Z(C,P.none(),Q),!1),r("resize","Resize",Z(O,P.none(),tt),!1),r("orientation","Orientation",Z(z,P.none(),u),!1),r("brightness","Brightness",Z(j,P.none(),u),!1),r("sharpen","Sharpen",Z(V,et,u),!1),r("contrast","Contrast",Z(U,P.none(),u),!1),r("color-levels","Color levels",Z(J,P.none(),u),!1),r("gamma","Gamma",Z(W,P.none(),u),!1),r("invert","Invert",Z(V,nt,u),!1)],ot=sA.sketch({dom:a,components:rt.map((function(t){return t.asSpec()}))}),it=sA.sketch({dom:{tag:"div"},components:[ot],containerBehaviours:mf([Hw.config({})])}),at=kC(it),ut=function(t){return at.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))};return{memContainer:at,getApplyButton:ut}},RP=tinymce.util.Tools.resolve("tinymce.geom.Rect"),zP=tinymce.util.Tools.resolve("tinymce.util.Observable"),BP=tinymce.util.Tools.resolve("tinymce.util.VK"),PP=function(t){var e=Math.max,n=t.documentElement,r=t.body,o=e(n.scrollWidth,r.scrollWidth),i=e(n.clientWidth,r.clientWidth),a=e(n.offsetWidth,r.offsetWidth),u=e(n.scrollHeight,r.scrollHeight),c=e(n.clientHeight,r.clientHeight),s=e(n.offsetHeight,r.offsetHeight);return{width:o<a?i:o,height:u<s?c:u}},IP=function(t){return d(t.changedTouches)},LP=function(t){if(IP(t))for(var e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]};function HP(t,e){var n,r,o,i,a,u,c,s=[],l=[],f=null!==(n=e.document)&&void 0!==n?n:document,m=null!==(r=e.root)&&void 0!==r?r:f,g=ee.fromDom(f),h=ee.fromDom(m.getElementById(null!==(o=e.handle)&&void 0!==o?o:t)),p=function(t){var n=t.raw,r=PP(f);LP(n),t.prevent(),a=n.button,u=n.screenX,c=n.screenY;var o=Jn(h,"cursor");i=ee.fromTag("div",f),Xn(i,{position:"absolute",top:"0",left:"0",width:r.width+"px",height:r.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:o}),Dr(Ln(g),i),l.push(ad(g,"mousemove",v),ad(g,"touchmove",v),ad(g,"mouseup",b),ad(g,"touchend",b)),e.start(n)},v=function(t){var n=t.raw;if(LP(n),n.button!==a)return b(t);n.deltaX=n.screenX-u,n.deltaY=n.screenY-c,t.prevent(),e.drag(n)},b=function(t){LP(t.raw),G(l,(function(t){return t.unbind()})),l=[],Br(i),e.stop&&e.stop(t.raw)},y=function(){G(l.concat(s),(function(t){return t.unbind()})),l=[],s=[],d(i)&&Br(i)};return s.push(ad(h,"mousedown",p),ad(h,"touchstart",p)),{destroy:y}}var FP=0,VP=function(t,e,n,r,o){var i,a=[],u="tox-",c=u+"crid-"+FP++,s=ee.fromDom(r),l=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],f=["top","right","bottom","left"],d=function(t,e){return{x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},m=function(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}},g=function(){return m(n,t)},h=function(e,r,o,i){var a=r.x+o*e.deltaX,u=r.y+i*e.deltaY,c=Math.max(20,r.w+o*e.deltaW),s=Math.max(20,r.h+i*e.deltaH),l=t=RP.clamp({x:a,y:u,w:c,h:s},n,"move"===e.name);l=m(n,l),k.fire("updateRect",{rect:l}),x(l)},p=function(){var e=function(e){var n;return HP(c,{document:r.ownerDocument,root:An(s).dom,handle:c+"-"+e.name,start:function(){n=t},drag:function(t){h(e,n,t.deltaX,t.deltaY)}})},n=ee.fromTag("div");Vn(n,{id:c,class:u+"croprect-container",role:"grid","aria-dropeffect":"execute"}),Dr(s,n),G(f,(function(t){Ls(s,"#"+c).each((function(e){var n=ee.fromTag("div");Vn(n,{id:c+"-"+t,class:u+"croprect-block","data-mce-bogus":"all"}),Kn(n,"display","none"),Dr(e,n)}))})),G(l,(function(t){Ls(s,"#"+c).each((function(e){var n=ee.fromTag("div");Vn(n,{id:c+"-"+t.name,"aria-label":t.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:t.label}),ss(n,[u+"croprect-handle",u+"croprect-handle-"+t.name]),Kn(n,"display","none"),Dr(e,n)}))})),i=q(l,e),b(t);var d=function(t){Fn(t.target,"aria-grabbed","focus"===t.raw.type?"true":"false")},m=function(e){var n;G(l,(function(t){if(jn(e.target,"id")===c+"-"+t.name)return n=t,!1}));var r=function(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),h(n,r,o,i)};switch(e.raw.keyCode){case BP.LEFT:r(e,n,t,-10,0);break;case BP.RIGHT:r(e,n,t,10,0);break;case BP.UP:r(e,n,t,0,-10);break;case BP.DOWN:r(e,n,t,0,10);break;case BP.ENTER:case BP.SPACEBAR:e.prevent(),o();break}};a.push(ad(s,"focusin",d),ad(s,"focusout",d),ad(s,"keydown",m))},v=function(t){var e=M(M([],q(l,(function(t){return"#"+c+"-"+t.name})),!0),q(f,(function(t){return"#"+c+"-"+t})),!0).join(","),n=Xm(s,e);G(n,t?function(t){return nr(t,"display")}:function(t){return Kn(t,"display","none")})},b=function(t){var n=function(t,e){Ls(s,"#"+c+"-"+t).each((function(t){Xn(t,{left:e.x+"px",top:e.y+"px",width:Math.max(0,e.w)+"px",height:Math.max(0,e.h)+"px"})}))};G(l,(function(e){Ls(s,"#"+c+"-"+e.name).each((function(n){Xn(n,{left:t.w*e.xMul+t.x+"px",top:t.h*e.yMul+t.y+"px"})}))})),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)},y=function(e){t=e,b(t)},w=function(n){e=n,b(t)},x=function(t){y(d(n,t))},C=function(e){n=e,b(t)},S=function(){G(i,(function(t){return t.destroy()})),i=[],G(a,(function(t){return t.unbind()})),a=[]};p();var k=A(A({},zP),{toggleVisibility:v,setClampRect:C,setRect:y,getInnerRect:g,setInnerRect:x,setViewPortRect:w,destroy:S});return k},jP={create:VP},UP=function(t){return new aS((function(e){var n=function(){t.removeEventListener("load",n),e(t)};t.complete?e(t):t.addEventListener("load",n)}))},WP=function(t){var e=kC({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),n=oa(1),r=rd(),o=oa({x:0,y:0,w:1,h:1}),i=oa({x:0,y:0,w:1,h:1}),a=function(t,i){g.getOpt(t).each((function(t){var a=n.get(),u=vr(t.element),c=ar(t.element),s=i.dom.naturalWidth*a,l=i.dom.naturalHeight*a,f=Math.max(0,u/2-s/2),d=Math.max(0,c/2-l/2),m={left:f.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:l.toString()+"px",position:"absolute"};Xn(i,m),e.getOpt(t).each((function(t){Xn(t.element,m)})),r.run((function(t){var e=o.get();t.setRect({x:e.x*a+f,y:e.y*a+d,w:e.w*a,h:e.h*a}),t.setClampRect({x:f,y:d,w:s,h:l}),t.setViewPortRect({x:0,y:0,w:u,h:c})}))}))},u=function(t,e){g.getOpt(t).each((function(t){var r=vr(t.element),o=ar(t.element),i=e.dom.naturalWidth,a=e.dom.naturalHeight,u=Math.min(r/i,o/a);u>=1?n.set(1):n.set(u)}))},c=function(t,e){var n=ee.fromTag("img");return Fn(n,"src",e),UP(n.dom).then((function(){t.getSystem().isConnected()&&g.getOpt(t).map((function(t){var e=ks({element:n});Hw.replaceAt(t,1,P.some(e));var r=i.get(),c={x:0,y:0,w:n.dom.naturalWidth,h:n.dom.naturalHeight};i.set(c);var s=RP.inflate(c,-20,-20);o.set(s),r.w===c.w&&r.h===c.h||u(t,n),a(t,n)}))}))},s=function(t,e){var r=n.get(),o=e>0?Math.min(2,r+.1):Math.max(.1,r-.1);n.set(o),g.getOpt(t).each((function(t){var e=t.components()[1].element;a(t,e)}))},l=function(){r.run((function(t){t.toggleVisibility(!0)}))},f=function(){r.run((function(t){t.toggleVisibility(!1)}))},d=function(){return o.get()},m=sA.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[e.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:mf([Vw("image-panel-crop-events",[ju((function(t){g.getOpt(t).each((function(t){var e=t.element.dom,i=jP.create({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,p);i.toggleVisibility(!1),i.on("updateRect",(function(t){var e=t.rect,r=n.get(),i={x:Math.round(e.x/r),y:Math.round(e.y/r),w:Math.round(e.w/r),h:Math.round(e.h/r)};o.set(i)})),r.set(i)}))})),Uu((function(){r.clear()}))])])}],containerBehaviours:mf([Hw.config({}),Vw("image-panel-events",[ju((function(e){c(e,t)}))])])}),g=kC(m),h=function(){var t=i.get();return{width:t.w,height:t.h}};return{memContainer:g,updateSrc:c,zoom:s,showCrop:l,hideCrop:f,getRect:d,getMeasurements:h}},$P=function(t,e,n,r,o){return JB({name:t,icon:P.some(e),disabled:n,tooltip:P.some(t),primary:!1,borderless:!1},r,o)},qP=function(t,e){e?Iv.enable(t):Iv.disable(t)},GP=function(t){var e=function(t,e,o){n.getOpt(t).each((function(t){qP(t,e)})),r.getOpt(t).each((function(t){qP(t,o)}))},n=kC($P("Undo","undo",!0,(function(t){Su(t,_P.undo(),{direction:1})}),t)),r=kC($P("Redo","redo",!0,(function(t){Su(t,_P.redo(),{direction:1})}),t)),o=sA.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[n.asSpec(),r.asSpec(),$P("Zoom in","zoom-in",!1,(function(t){Su(t,_P.zoom(),{direction:1})}),t),$P("Zoom out","zoom-out",!1,(function(t){Su(t,_P.zoom(),{direction:-1})}),t)]});return{container:o,updateButtonUndoStates:e}};function KP(){var t=[],e=-1,n=function(n){var r=t.splice(++e);return t.push(n),{state:n,removed:r}},r=function(){if(i())return t[--e]},o=function(){if(a())return t[++e]},i=function(){return e>0},a=function(){return-1!==e&&e<t.length-1};return{data:t,add:n,undo:r,redo:o,canUndo:i,canRedo:a}}var XP,YP=function(t){var e=oa(t),n=od(),r=KP();r.add(t);var o=function(){return e.get()},i=function(t){e.set(t)},a=function(){return n.get().getOrThunk(e.get)},u=function(t){var e=c(t);return f(),n.set(e),e.url},c=function(t){return{blob:t,url:URL.createObjectURL(t)}},s=function(t){URL.revokeObjectURL(t.url)},l=function(t){ZR.each(t,s)},f=function(){n.on(s),n.clear()},d=function(t){var e=c(t);i(e);var n=r.add(e).removed;return l(n),e.url},m=function(t){var e=c(t);return n.set(e),e.url},g=function(t){return n.get().fold(p,(function(e){d(e.blob),t()}))},h=function(){var t=r.undo();return i(t),t.url},v=function(){var t=r.redo();return i(t),t.url},b=function(){var t=r.canUndo(),e=r.canRedo();return{undoEnabled:t,redoEnabled:e}};return{getBlobState:o,setBlobState:i,addBlobState:d,getTempState:a,updateTempState:u,addTempState:m,applyTempState:g,destroyTempState:f,undo:h,redo:v,getHistoryStates:b}},JP=function(t,e){var n=YP(t.currentState),r=function(t,e){var n=e.event.direction;k.zoom(t,n)},o=function(t){var e=n.getHistoryStates();T.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),Su(t,MP.formActionEvent,{name:MP.saveState(),value:e.undoEnabled})},i=function(t){T.updateButtonUndoStates(t,!1,!1)},a=function(t,e){var r=n.undo();f(t,r).then((function(e){l(t),o(t)}))},u=function(t,e){var r=n.redo();f(t,r).then((function(e){l(t),o(t)}))},c=function(t){return t.toBlob()},s=function(t){Su(t,MP.formActionEvent,{name:MP.disable(),value:{}})},l=function(t){O.getApplyButton(t).each((function(t){Iv.enable(t)})),Su(t,MP.formActionEvent,{name:MP.enable(),value:{}})},f=function(t,e){return s(t),k.updateSrc(t,e)},d=function(t,e,n,r,i){s(t),Lz(e).then(n).then(c).then(r).then((function(e){return f(t,e)})).then((function(){o(t),i(),l(t)})).catch((function(e){console.log(e),t.getSystem().isConnected()&&l(t)}))},m=function(t,e,r){var o=n.getBlobState().blob,i=function(t){return n.updateTempState(t)};d(t,o,e,i,r)},g=function(t,e){var r=n.getTempState().blob,o=function(t){return n.addTempState(t)};d(t,r,e,o,p)},h=function(t,e,r){var o=n.getBlobState().blob,i=function(e){var r=n.addBlobState(e);return b(t),r};d(t,o,e,i,r)},v=function(t,e){var r=function(){b(t);var n=e.event.swap;n()};n.applyTempState(r)},b=function(t){var e=n.getBlobState().url;return n.destroyTempState(),o(t),e},y=function(t){var e=b(t);f(t,e).then((function(e){l(t)}))},w=function(t,e){y(t);var n=e.event.swap;n(),k.hideCrop()},x=function(t,e){return m(t,e.event.transform,p)},C=function(t,e){return g(t,e.event.transform)},S=function(t,e){return h(t,e.event.transform,e.event.swap)},k=WP(t.currentState.url),T=GP(e),O=NP(k,e),_=function(t,e){i(t);var n=e.event.transform,r=e.event.swap;n.fold((function(){r()}),(function(e){m(t,e,r)}))};return{dom:{tag:"div",attributes:{role:"presentation"}},components:[O.memContainer.asSpec(),k.memContainer.asSpec(),T.container],behaviours:mf([tp.config({store:{mode:"manual",getValue:function(){return n.getBlobState()}}}),Vw("image-tools-events",[Nu(_P.undo(),a),Nu(_P.redo(),u),Nu(_P.zoom(),r),Nu(_P.back(),w),Nu(_P.apply(),v),Nu(_P.transform(),x),Nu(_P.tempTransform(),C),Nu(_P.transformApply(),S),Nu(_P.swap(),_)]),WR.self()])}},ZP=function(t,e){var n={dom:{tag:"label",innerHtml:e.providers.translate(t.label),classes:["tox-label"]}},r=q(t.items,e.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[n].concat(r),behaviours:mf([WR.self(),Hw.config({}),az.domHtml(P.none()),Aw.config({mode:"acyclic"})])}},QP=function(t){return!_t(t,"items")},tI="data-value",eI=function(t,e,n,r){return q(n,(function(n){return QP(n)?{type:"togglemenuitem",text:n.text,value:n.value,active:n.value===r,onAction:function(){tp.setValue(t,n.value),Su(t,_A,{name:e}),Yw.focus(t)}}:{type:"nestedmenuitem",text:n.text,getSubmenuItems:function(){return eI(t,e,n.items,r)}}}))},nI=function(t,e){return gt(t,(function(t){return QP(t)?Pt(t.value===e,t):nI(t.items,e)}))},rI=function(t,e){var n=e.shared.providers,r=ft(t.items).filter(QP),o=t.label.map((function(t){return OA(t,n)})),i=hA.parts.field({dom:{},factory:{sketch:function(n){return BB({uid:n.uid,text:r.map((function(t){return t.text})),icon:P.none(),tooltip:t.label,role:P.none(),fetch:function(n,r){var o=eI(n,t.name,t.items,tp.getValue(n));r($B(o,US.CLOSE_ON_EXECUTE,e,!1))},onSetup:w(p),getApi:w({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[yA.config({}),tp.config({store:{mode:"manual",initialValue:r.map((function(t){return t.value})).getOr(""),getValue:function(t){return jn(t.element,tI)},setValue:function(e,n){nI(t.items,n).each((function(t){Fn(e.element,tI,t.value),Su(e,RB,{text:t.text})}))}}})]},"tox-listbox",e.shared)}}}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[i]};return hA.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:nt([o.toArray(),[a]]),fieldBehaviours:mf([Iv.config({disabled:w(t.disabled),onDisabled:function(t){hA.getField(t).each(Iv.disable)},onEnabled:function(t){hA.getField(t).each(Iv.enable)}})])})},oI=function(t,e){return{dom:{tag:"div",classes:t.classes},components:q(t.items,e.shared.interpreter)}},iI=function(t,e){var n=q(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return ma("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:rp(t.selectBehaviours,[Yw.config({}),tp.config({store:A({mode:"manual",getValue:function(t){return ds(t.element)},setValue:function(e,n){var r=tt(t.options,(function(t){return t.value===n}));r.isSome()&&ms(e.element,n)}},r)})])}},aI=dv({name:"HtmlSelect",configFields:[Ai("options"),ep("selectBehaviours",[Yw,tp]),Ki("selectClasses",[]),Ki("selectAttributes",{}),Fi("data")],factory:iI}),uI=function(t,e){var n=q(t.items,(function(t){return{text:e.translate(t.text),value:t.value}})),r=t.label.map((function(t){return OA(t,e)})),o=hA.parts.field({dom:{},selectAttributes:{size:t.size},options:n,factory:aI,selectBehaviours:mf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),yA.config({}),Vw("selectbox-change",[Nu(Ua(),(function(e,n){Su(e,_A,{name:t.name})}))])])}),i=t.size>1?P.none():P.some(PC("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},e.icons)),a={dom:{tag:"div",classes:["tox-selectfield"]},components:nt([[o],i.toArray()])};return hA.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:nt([r.toArray(),[a]]),fieldBehaviours:mf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){hA.getField(t).each(Iv.disable)},onEnabled:function(t){hA.getField(t).each(Iv.enable)}}),cO()])})},cI=function(t,e){var n=function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}},r=function(t){return{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:q(t,n)}]}},o=function(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}},i=function(t){return{dom:{tag:"tr"},components:q(t,o)}},a=function(t){return{dom:{tag:"tbody"},components:q(t,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[r(t.header),a(t.cells)],behaviours:mf([yA.config({}),Yw.config({})])}},sI=function(t,e){var n=t.label.map((function(t){return OA(t,e)})),r=[Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),Aw.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return Cu(t,MA),P.some(!0)}}),Vw("textfield-change",[Nu(ja(),(function(e,n){Su(e,_A,{name:t.name})})),Nu(Qa(),(function(e,n){Su(e,_A,{name:t.name})}))]),yA.config({})],o=t.validation.map((function(t){return dD.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-invalid",validator:{validate:function(e){var n=tp.getValue(e),r=t.validator(n);return tD.pure(!0===r?ro.value(n):ro.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),i=t.placeholder.fold(w({}),(function(t){return{placeholder:e.translate(t)}})),a=t.inputMode.fold(w({}),(function(t){return{inputmode:t}})),u=A(A({},i),a),c=hA.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:u,inputClasses:[t.classname],inputBehaviours:mf(nt([r,o])),selectOnFocus:!1,factory:jA}),s=t.flex?["tox-form__group--stretched"]:[],l=s.concat(t.maximized?["tox-form-group--maximize"]:[]),f=[Iv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){hA.getField(t).each(Iv.disable)},onEnabled:function(t){hA.getField(t).each(Iv.enable)}}),cO()];return xA(n,c,l,f)},lI=function(t,e){return sI({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:P.none(),maximized:t.maximized},e)},fI=function(t,e){return sI({name:t.name,multiline:!0,label:t.label,inputMode:P.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:P.none(),maximized:t.maximized},e)},dI=function(t,e){var n=t.stream.streams,r=n.setup(t,e);return Eu([Nu(t.event,r),Uu((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[Nu(t,(function(){return e.cancel()}))]})).getOr([])))},mI=Object.freeze({__proto__:null,events:dI}),gI=function(t){var e=oa(null),n=function(){return{timer:null!==e.get()?"set":"unset"}},r=function(t){e.set(t)},o=function(){var t=e.get();null!==t&&t.cancel()};return Tc({readState:n,setTimer:r,cancel:o})},hI=function(t){return t.stream.streams.state(t)},pI=Object.freeze({__proto__:null,throttle:gI,init:hI}),vI=function(t,e){var n=t.stream,r=WC(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},bI=[Di("stream",ki("mode",{throttle:[Ai("delay"),Ki("stopEvent",!0),fl("streams",{setup:vI,state:gI})]})),Ki("event","input"),Fi("cancelEvent"),sl("onStream")],yI=hf({fields:bI,name:"streaming",active:mI,state:pI}),wI=function(t,e,n){var r=tp.getValue(n);tp.setValue(e,r),CI(e)},xI=function(t,e){var n=t.element,r=ds(n),o=n.dom;"number"!==jn(n,"type")&&e(o,r)},CI=function(t){xI(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},SI=function(t,e){xI(t,(function(t,n){return t.setSelectionRange(e,n.length)}))},kI=function(t,e,n){if(t.selectsOver){var r=tp.getValue(e),o=t.getDisplayText(r),i=tp.getValue(n),a=t.getDisplayText(i);return 0===a.indexOf(o)?P.some((function(){wI(t,e,n),SI(e,o.length)})):P.none()}return P.none()},TI=w("alloy.typeahead.itemexecute"),OI=function(t,e,n,r){var o=function(e,n,o){t.previewing.set(!1);var i=bD.getCoupled(e,"sandbox");if(bh.isOpen(i))bv.getCurrent(i).each((function(t){rb.getHighlighted(t).fold((function(){o(t)}),(function(){_u(i,t.element,"keydown",n)}))}));else{var u=function(t){bv.getCurrent(t).each(o)};TD(t,a(e),e,i,r,u,$A.HighlightFirst).get(p)}},i=LA(t),a=function(t){return function(e){return e.map((function(e){var n=Tt(e.menus),r=rt(n,(function(t){return Y(t.items,(function(t){return"item"===t.type}))})),o=tp.getState(t);return o.update(q(r,(function(t){return t.data}))),e}))}},u=[Yw.config({}),tp.config({onSetValue:t.onSetValue,store:A({mode:"dataset",getDataKey:function(t){return ds(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){ms(e.element,t.model.getDisplayText(n))}},t.initialData.map((function(t){return ma("initialValue",t)})).getOr({}))}),yI.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,n){var o=bD.getCoupled(e,"sandbox"),i=Yw.isFocused(e);if(i&&ds(e.element).length>=t.minChars){var u=bv.getCurrent(o).bind((function(t){return rb.getHighlighted(t).map(tp.getValue)}));t.previewing.set(!0);var c=function(e){bv.getCurrent(o).each((function(e){u.fold((function(){t.model.selectsOver&&rb.highlightFirst(e)}),(function(t){rb.highlightBy(e,(function(e){var n=tp.getValue(e);return n.value===t.value})),rb.getHighlighted(e).orThunk((function(){return rb.highlightFirst(e),P.none()}))}))}))};TD(t,a(e),e,o,r,c,$A.HighlightFirst).get(p)}},cancelEvent:au()}),Aw.config({mode:"special",onDown:function(t,e){return o(t,e,rb.highlightFirst),P.some(!0)},onEscape:function(t){var e=bD.getCoupled(t,"sandbox");return bh.isOpen(e)?(bh.close(e),P.some(!0)):P.none()},onUp:function(t,e){return o(t,e,rb.highlightLast),P.some(!0)},onEnter:function(e){var n=bD.getCoupled(e,"sandbox"),r=bh.isOpen(n);if(r&&!t.previewing.get())return bv.getCurrent(n).bind((function(t){return rb.getHighlighted(t)})).map((function(t){return Su(e,TI(),{item:t}),!0}));var o=tp.getValue(e);return Cu(e,au()),t.onExecute(n,e,o),r&&bh.close(n),P.some(!0)}}),hx.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),bD.config({others:{sandbox:function(e){return MD(t,e,{onOpen:function(){return hx.on(e)},onClose:function(){return hx.off(e)}})}}}),Vw("typeaheadevents",[$u((function(e){var n=p;_D(t,a(e),e,r,n,$A.HighlightFirst).get(p)})),Nu(TI(),(function(e,n){var r=bD.getCoupled(e,"sandbox");wI(t.model,e,n.event.item),Cu(e,au()),t.onItemExecute(e,r,n.event.item,tp.getValue(e)),bh.close(r),CI(e)}))].concat(t.dismissOnBlur?[Nu(Za(),(function(t){var e=bD.getCoupled(t,"sandbox");_f(e.element).isNone()&&bh.close(e)}))]:[]))];return{uid:t.uid,dom:FA(Co(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:A(A({},i),rp(t.typeaheadBehaviours,u)),eventOrder:t.eventOrder}},_I=w([Fi("lazySink"),Ai("fetch"),Ki("minChars",5),Ki("responseTime",1e3),ul("onOpen"),Ki("getHotspot",P.some),Ki("getAnchorOverrides",w({})),Ki("layouts",P.none()),Ki("eventOrder",{}),ra("model",{},[Ki("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),Ki("selectsOver",!0),Ki("populateFromBrowse",!0)]),ul("onSetValue"),cl("onExecute"),ul("onItemExecute"),Ki("inputClasses",[]),Ki("inputAttributes",{}),Ki("inputStyles",{}),Ki("matchWidth",!0),Ki("useMinWidth",!1),Ki("dismissOnBlur",!0),il(["openClass"]),Fi("initialData"),ep("typeaheadBehaviours",[Yw,tp,yI,Aw,hx,bD]),_i("previewing",(function(){return oa(!0)}))].concat(IA()).concat(RD())),EI=w([zp({schema:[ol()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){kI(t.model,r,n).fold((function(){return rb.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&wI(t.model,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOptional().map((function(t){return Su(t,TI(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&wI(t.model,e,n)}))}}}})]),AI=mv({name:"Typeahead",configFields:_I(),partFields:EI(),factory:OI}),DI=function(t){var e=function(){return DI(t.toCached())},n=function(e){return DI(t.bind((function(t){return t.fold((function(t){return tD.pure(ro.error(t))}),(function(t){return e(t)}))})))},r=function(e){return DI(t.map((function(t){return t.bind(e)})))},o=function(e){return DI(t.map((function(t){return t.map(e)})))},i=function(e){return DI(t.map((function(t){return t.mapError(e)})))},a=function(e,n){return t.map((function(t){return t.fold(e,n)}))},u=function(e,n){return DI(tD.nu((function(r){var o=!1,i=setTimeout((function(){o=!0,r(ro.error(n()))}),e);t.get((function(t){o||(clearTimeout(i),r(t))}))})))};return A(A({},t),{toCached:e,bindFuture:n,bindResult:r,mapResult:o,mapError:i,foldResult:a,withTimeout:u})},MI=function(t){return DI(tD.nu(t))},NI=function(t){return DI(tD.pure(ro.value(t)))},RI=function(t){return DI(tD.pure(ro.error(t)))},zI=function(t){return DI(tD.pure(t))},BI=function(t){return DI(t.map(ro.value))},PI=function(t){return MI((function(e){t.then((function(t){e(ro.value(t))}),(function(t){e(ro.error(t))}))}))},II={nu:MI,wrap:DI,pure:NI,value:NI,error:RI,fromResult:zI,fromFuture:BI,fromPromise:PI},LI={type:"separator"},HI=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:p}},FI=function(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:p}},VI=function(t){return q(t,HI)},jI=function(t,e){return Y(e,(function(e){return e.type===t}))},UI=function(t,e){return VI(jI(t,e))},WI=function(t){return UI("header",t.targets)},$I=function(t){return UI("anchor",t.targets)},qI=function(t){return P.from(t.anchorTop).map((function(t){return FI("<top>",t)})).toArray()},GI=function(t){return P.from(t.anchorBottom).map((function(t){return FI("<bottom>",t)})).toArray()},KI=function(t){return q(t,(function(t){return FI(t,t)}))},XI=function(t){return Z(t,(function(t,e){var n=0===t.length||0===e.length;return n?t.concat(e):t.concat(LI,e)}),[])},YI=function(t,e){var n=t.toLowerCase();return Y(e,(function(t){var e=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text;return jt(e.toLowerCase(),n)||jt(t.value.toLowerCase(),n)}))},JI=function(t,e,n){var r=tp.getValue(e),o=void 0!==r.meta.text?r.meta.text:r.value,i=n.getLinkInformation();return i.fold((function(){return[]}),(function(e){var r=YI(o,KI(n.getHistory(t)));return"file"===t?XI([r,YI(o,WI(e)),YI(o,nt([qI(e),$I(e),GI(e)]))]):r}))},ZI=oc("aria-invalid"),QI=function(t,e,n){var r,o=e.shared.providers,i=function(e){var r=tp.getValue(e);n.addToHistory(r.value,t.filetype)},a=hA.parts.field({factory:AI,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":ZI,type:"url"},minChars:0,responseTime:0,fetch:function(r){var o=JI(t.filetype,r,n),i=$B(o,US.BUBBLE_TO_SANDBOX,e,!1);return tD.pure(i)},getHotspot:function(t){return m.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(dD)&&dD.run(t).get(p)},typeaheadBehaviours:mf(nt([n.getValidationHandler().map((function(e){return dD.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){s.getOpt(t).each((function(t){Fn(t.element,"title",o.translate(e))}))}},validator:{validate:function(n){var r=tp.getValue(n);return II.nu((function(n){e({type:t.filetype,url:r.value},(function(t){if("invalid"===t.status){var e=ro.error(t.message);n(e)}else{var r=ro.value(t.message);n(r)}}))}))},validateOnLoad:!1}})})).toArray(),[Iv.config({disabled:function(){return t.disabled||o.isDisabled()}}),yA.config({}),Vw("urlinput-events",nt(["file"===t.filetype?[Nu(ja(),(function(e){Su(e,_A,{name:t.name})}))]:[],[Nu(Ua(),(function(e){Su(e,_A,{name:t.name}),i(e)})),Nu(Qa(),(function(e){Su(e,_A,{name:t.name}),i(e)}))]]))]])),eventOrder:(r={},r[ja()]=["streaming","urlinput-events","invalidating"],r),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:pk(!1,1,"normal")},onExecute:function(t,e,n){Su(e,MA,{})},onItemExecute:function(e,n,r,o){i(e),Su(e,_A,{name:t.name})}}),u=t.label.map((function(t){return OA(t,o)})),c=function(t,e,n,r){return void 0===n&&(n=t),void 0===r&&(r=t),PC(n,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],attributes:A({title:o.translate(r),"aria-live":"polite"},e.fold((function(){return{}}),(function(t){return{id:t}})))},o.icons)},s=kC(c("invalid",P.some(ZI),"warning")),l=kC({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[s.asSpec()]}),f=n.getUrlPicker(t.filetype),d=oc("browser.url.event"),m=kC({dom:{tag:"div",classes:["tox-control-wrap"]},components:[a,l.asSpec()],behaviours:mf([Iv.config({disabled:function(){return t.disabled||o.isDisabled()}})])}),g=kC(QB({name:t.name,icon:P.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return Cu(t,d)}),o,[],["tox-browse-url"])),h=function(){return{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:nt([[m.asSpec()],f.map((function(){return g.asSpec()})).toArray()])}},v=function(e){bv.getCurrent(e).each((function(n){var r=tp.getValue(n),o=A({fieldname:t.name},r);f.each((function(r){r(o).get((function(r){tp.setValue(n,r),Su(e,_A,{name:t.name})}))}))}))};return hA.sketch({dom:kA(),components:u.toArray().concat([h()]),fieldBehaviours:mf([Iv.config({disabled:function(){return t.disabled||o.isDisabled()},onDisabled:function(t){hA.getField(t).each(Iv.disable),g.getOpt(t).each(Iv.disable)},onEnabled:function(t){hA.getField(t).each(Iv.enable),g.getOpt(t).each(Iv.enable)}}),cO(),Vw("url-input-events",[Nu(d,v)])])})},tL=function(t,e){return sA.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:MC(t.icon,e.icons),attributes:{title:e.translate(t.iconTooltip)}},action:function(e){Su(e,DA,{name:"alert-banner",value:t.url})},buttonBehaviours:mf([zC()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(t.text)}}]})},eL=function(t,e){var n=tp.config({store:{mode:"manual",getValue:function(t){var e=t.element.dom;return e.checked},setValue:function(t,e){var n=t.element.dom;n.checked=e}}}),r=function(t){return t.element.dom.click(),P.some(!0)},o=hA.parts.field({factory:{sketch:x},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:mf([WR.self(),Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),yA.config({}),Yw.config({}),n,Aw.config({mode:"special",onEnter:r,onSpace:r,stopSpaceKeyup:!0}),Vw("checkbox-events",[Nu(Ua(),(function(e,n){Su(e,_A,{name:t.name})}))])])}),i=hA.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:e.translate(t.label)},behaviours:mf([VD.config({})])}),a=function(t){var n="checked"===t?"selected":"unselected";return PC(n,{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},e.icons)},u=kC({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[a("checked"),a("unchecked")]});return hA.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[o,u.asSpec(),i],fieldBehaviours:mf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){hA.getField(t).each(Iv.disable)},onEnabled:function(t){hA.getField(t).each(Iv.enable)}}),cO()])})},nL=function(t){return"presentation"===t.presets?sA.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):sA.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:mf([yA.config({}),Yw.config({})])})},rL=function(t){return function(e,n,r){return Ot(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}},oL=function(t){return function(e,n,r){var o=Co(n,{source:"dynamic"});return rL(t)(e,o,r)}},iL={bar:rL((function(t,e){return fA(t,e.shared)})),collection:rL((function(t,e){return PA(t,e.shared.providers)})),alertbanner:rL((function(t,e){return tL(t,e.shared.providers)})),input:rL((function(t,e){return lI(t,e.shared.providers)})),textarea:rL((function(t,e){return fI(t,e.shared.providers)})),label:rL((function(t,e){return ZP(t,e.shared)})),iframe:oL((function(t,e){return wz(t,e.shared.providers)})),button:rL((function(t,e){return oP(t,e.shared.providers)})),checkbox:rL((function(t,e){return eL(t,e.shared.providers)})),colorinput:rL((function(t,e){return qD(t,e.shared,e.colorinput)})),colorpicker:rL(KR),dropzone:rL((function(t,e){return sz(t,e.shared.providers)})),grid:rL((function(t,e){return lz(t,e.shared)})),listbox:rL((function(t,e){return rI(t,e)})),selectbox:rL((function(t,e){return uI(t,e.shared.providers)})),sizeinput:rL((function(t,e){return vP(t,e.shared.providers)})),urlinput:rL((function(t,e){return QI(t,e,e.urlinput)})),customeditor:rL(JR),htmlpanel:rL(nL),imagetools:rL((function(t,e){return JP(t,e.shared.providers)})),table:rL((function(t,e){return cI(t,e.shared.providers)})),panel:rL((function(t,e){return oI(t,e)}))},aL={field:function(t,e){return e}},uL=function(t,e,n){var r=Co(n,{shared:{interpreter:function(e){return cL(t,e,r)}}});return cL(t,e,r)},cL=function(t,e,n){return Ot(iL,e.type).fold((function(){return console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e}),(function(r){return r(t,e,n)}))},sL=function(t,e){var n=aL;return cL(n,t,e)},lL={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},fL=function(t,e,n){var r=12,o={maxHeightFunction:_d()},i=function(){return{type:"node",root:Dn(t()),node:P.from(t()),bubble:Nd(r,r,lL),layouts:{onRtl:function(){return[dC]},onLtr:function(){return[fC]}},overrides:o}},a=function(){return{type:"hotspot",hotspot:e(),bubble:Nd(-r,r,lL),layouts:{onRtl:function(){return[Vl]},onLtr:function(){return[jl]}},overrides:o}};return function(){return n()?i():a()}},dL=function(t,e,n){var r=function(){return{type:"node",root:Dn(t()),node:P.from(t()),layouts:{onRtl:function(){return[mC]},onLtr:function(){return[mC]}}}},o=function(){return{type:"hotspot",hotspot:e(),layouts:{onRtl:function(){return[ql]},onLtr:function(){return[ql]}}}};return function(){return n()?r():o()}},mL=function(t,e){return function(){return{type:"selection",root:e(),getSelection:function(){var e=t.selection.getRng();return P.some(km.range(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(e.endContainer),e.endOffset))}}}},gL=function(t){return function(e){return{type:"node",root:t(),node:e}}},hL=function(t,e,n){var r=jT(t),o=function(){return ee.fromDom(t.getBody())},i=function(){return ee.fromDom(t.getContentAreaContainer())},a=function(){return r||!n()};return{inlineDialog:fL(i,e,a),banner:dL(i,e,a),cursor:mL(t,o),node:gL(o)}},pL=function(t){return function(e,n){var r=tE(t);r(e,n)}},vL=function(t){return function(){return B_(t)}},bL=function(t){return function(){return I_(t)}},yL=function(t){return function(){return q_(t)}},wL=function(t){return{colorPicker:pL(t),hasCustomColors:vL(t),getColors:bL(t),getColorCols:yL(t)}},xL=function(t){return function(){return GT(t)}},CL=function(t){return{isDraggableModal:xL(t)}},SL=function(t){var e=oa(IT(t)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===e.get()},getDockingMode:e.get,setDockingMode:e.set}},kL=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],TL=function(t){return _t(t,"items")},OL=function(t){return _t(t,"block")},_L=function(t){return _t(t,"inline")},EL=function(t){return _t(t,"selector")},AL=function(t){return Z(t,(function(t,e){if(TL(e)){var n=AL(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(_L(e)||OL(e)||EL(e)){var r=i(e.name)?e.name:e.title.toLowerCase(),o="custom-"+r;return{customFormats:t.customFormats.concat([{name:o,format:e}]),formats:t.formats.concat([{title:e.title,format:o,icon:e.icon}])}}return A(A({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},DL=function(t,e){var n=AL(e),r=function(e){G(e,(function(e){t.formatter.has(e.name)||t.formatter.register(e.name,e.format)}))};return t.formatter?r(n.customFormats):t.on("init",(function(){r(n.customFormats)})),n.formats},ML=function(t){return ST(t).map((function(e){var n=DL(t,e);return kT(t)?kL.concat(n):n})).getOr(kL)},NL=function(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return Co(t,r)},RL=function(t,e,n,r){var o=function(t){return NL(t,n,r)},a=function(t){var e={type:"submenu"};return Co(t,e)},u=function(e){var o=i(e.name)?e.name:oc(e.title),a="custom-"+o,u={type:"formatter",format:a,isSelected:n(a),getStylePreview:r(a)},c=Co(e,u);return t.formatter.register(o,c),c},c=function(t){return q(t,(function(t){var e=ht(t);if(Et(t,"items")){var n=c(t.items);return Co(a(t),{getStyleItems:w(n)})}return Et(t,"format")?o(t):1===e.length&&j(e,"title")?Co(t,{type:"separator"}):u(t)}))};return c(e)},zL=function(t){var e=function(e){return function(){return t.formatter.match(e)}},n=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?P.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):P.none()}},r=function(t){var e=t.items;return void 0!==e&&e.length>0?rt(e,r):[t.format]},o=oa([]),i=oa([]),a=oa([]),u=oa([]),c=oa(!1);t.on("PreInit",(function(a){var u=ML(t),c=RL(t,u,e,n);o.set(c),i.set(rt(c,r))})),t.on("addStyleModifications",(function(o){var i=RL(t,o.items,e,n);a.set(i),c.set(o.replace),u.set(rt(i,r))}));var s=function(){var t=c.get()?[]:o.get(),e=a.get();return t.concat(e)},l=function(){var t=c.get()?[]:i.get(),e=u.get();return t.concat(e)};return{getData:s,getFlattenedKeys:l}},BL=function(t){return d(t)&&1===t.nodeType},PL=ZR.trim,IL=function(t){return function(e){if(BL(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},LL=IL("true"),HL=IL("false"),FL=function(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}},VL=function(t){while(t=t.parentNode){var e=t.contentEditable;if(e&&"inherit"!==e)return LL(t)}return!1},jL=function(t,e){return q(Xm(ee.fromDom(e),t),(function(t){return t.dom}))},UL=function(t){return t.innerText||t.textContent},WL=function(t){return t.id?t.id:oc("h")},$L=function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)},qL=function(t){return $L(t)&&KL(t)},GL=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},KL=function(t){return VL(t)&&!HL(t)},XL=function(t){return GL(t)&&KL(t)},YL=function(t){return GL(t)?parseInt(t.nodeName.substr(1),10):0},JL=function(t){var e=WL(t),n=function(){t.id=e};return FL("header",UL(t),"#"+e,YL(t),n)},ZL=function(t){var e=t.id||t.name,n=UL(t);return FL("anchor",n||"#"+e,"#"+e,0,p)},QL=function(t){return q(Y(t,XL),JL)},tH=function(t){return q(Y(t,qL),ZL)},eH=function(t){var e=jL("h1,h2,h3,h4,h5,h6,a:not([href])",t);return e},nH=function(t){return PL(t.title).length>0},rH=function(t){var e=eH(t);return Y(QL(e).concat(tH(e)),nH)},oH={find:rH},iH="tinymce-url-history",aH=5,uH=function(t){return i(t)&&/^https?/.test(t)},cH=function(t){return u(t)&&t.length<=aH&&ot(t,uH)},sH=function(t){return a(t)&&kt(t,(function(t){return!cH(t)})).isNone()},lH=function(){var t,e=O_.getItem(iH);if(null===e)return{};try{t=JSON.parse(e)}catch(n){if(n instanceof SyntaxError)return console.log("Local storage "+iH+" was not valid JSON",n),{};throw n}return sH(t)?t:(console.log("Local storage "+iH+" was not valid format",t),{})},fH=function(t){if(!sH(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));O_.setItem(iH,JSON.stringify(t))},dH=function(t){var e=lH();return Ot(e,t).getOr([])},mH=function(t,e){if(uH(t)){var n=lH(),r=Ot(n,e).getOr([]),o=Y(r,(function(e){return e!==t}));n[e]=[t].concat(o).slice(0,aH),fH(n)}},gH=function(t){return!!t},hH=function(t){return bt(ZR.makeMap(t,/[, ]/),gH)},pH=function(t){return P.from(JT(t)).filter(m)},vH=function(t){var e=P.some(ZT(t)).filter(gH),n=P.some(QT(t)).filter(gH),r=e.or(n).map(hH);return pH(t).fold(O,(function(t){return r.fold(_,(function(t){return ht(t).length>0&&t}))}))},bH=function(t,e){var n=vH(t);return s(n)?n?pH(t):P.none():n[e]?pH(t):P.none()},yH=function(t,e){return bH(t,e).map((function(n){return function(r){return tD.nu((function(o){var u=function(t,e){if(!i(t))throw new Error("Expected value to be string");if(void 0!==e&&!a(e))throw new Error("Expected meta to be a object");var n={value:t,meta:e};o(n)},c=A({filetype:e,fieldname:r.fieldname},P.from(r.meta).getOr({}));n.call(t,u,r.value,c)}))}}))},wH=function(t){return P.from(t).filter(i).getOrUndefined()},xH=function(t){return tO(t)?P.none():P.some({targets:oH.find(t.getBody()),anchorTop:wH(eO(t)),anchorBottom:wH(nO(t))})},CH=function(t){return P.from(rO(t))},SH=function(t){return{getHistory:dH,addToHistory:mH,getLinkInformation:function(){return xH(t)},getValidationHandler:function(){return CH(t)},getUrlPicker:function(e){return yH(t,e)}}},kH=function(t,e,n){var r=oa(!1),o=SL(e),i={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:TC.translate,isDisabled:function(){return e.mode.isReadOnly()||e.ui.isDisabled()},getSetting:e.getParam.bind(e)},interpreter:function(t){return sL(t,i)},anchors:hL(e,n,o.isPositionedAtTop),header:o,getSink:function(){return ro.value(t)}},urlinput:SH(e),styleselect:zL(e),colorinput:wL(e),dialog:CL(e),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(t){return r.set(t)}};return i},TH=function(t,e,n){var r=function(t,r){G([e,n],(function(e){e.broadcastEvent(t,r)}))},o=function(t,r){G([e,n],(function(e){e.broadcastOn([t],r)}))},i=function(t){return o(yh(),{target:t.target})},a=Cf(),u=ad(a,"touchstart",i),c=ad(a,"touchmove",(function(t){return r(cu(),t)})),s=ad(a,"touchend",(function(t){return r(su(),t)})),l=ad(a,"mousedown",i),f=ad(a,"mouseup",(function(t){0===t.raw.button&&o(xh(),{target:t.target})})),d=function(t){return o(yh(),{target:ee.fromDom(t.target)})},m=function(t){0===t.button&&o(xh(),{target:ee.fromDom(t.target)})},g=function(){G(t.editorManager.get(),(function(e){t!==e&&e.fire("DismissPopups",{relatedTarget:t})}))},h=function(t){return r(lu(),cd(t))},p=function(t){o(wh(),{}),r(fu(),cd(t))},v=function(){return o(wh(),{})},b=function(e){e.state&&o(yh(),{target:ee.fromDom(t.getContainer())})},y=function(t){o(yh(),{target:ee.fromDom(t.relatedTarget.getContainer())})};t.on("PostRender",(function(){t.on("click",d),t.on("tap",d),t.on("mouseup",m),t.on("mousedown",g),t.on("ScrollWindow",h),t.on("ResizeWindow",p),t.on("ResizeEditor",v),t.on("AfterProgressState",b),t.on("DismissPopups",y)})),t.on("remove",(function(){t.off("click",d),t.off("tap",d),t.off("mouseup",m),t.off("mousedown",g),t.off("ScrollWindow",h),t.off("ResizeWindow",p),t.off("ResizeEditor",v),t.off("AfterProgressState",b),t.off("DismissPopups",y),l.unbind(),u.unbind(),c.unbind(),s.unbind(),f.unbind()})),t.on("detach",(function(){Zg(e),Zg(n),e.destroy(),n.destroy()}))},OH=nv,_H=Lp,EH=w([Ki("shell",!1),Ai("makeItem"),Ki("setupItem",p),op.field("listBehaviours",[Hw])]),AH=function(){return{behaviours:mf([Hw.config({})])}},DH=Bp({name:"items",overrides:AH}),MH=w([DH]),NH=w("CustomList"),RH=function(t,e,n,r){var o=function(e,n){a(e).fold((function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=Hw.contents(r),i=n.length,a=i-o.length,u=a>0?W(a,(function(){return t.makeItem()})):[],c=o.slice(i);G(c,(function(t){return Hw.remove(r,t)})),G(u,(function(t){return Hw.append(r,t)}));var s=Hw.contents(r);G(s,(function(r,o){t.setupItem(e,r,n[o],o)}))}))},i=t.shell?{behaviours:[Hw.config({})],components:[]}:{behaviours:[],components:e},a=function(e){return t.shell?P.some(e):Kp(e,t,"items")};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:rp(t.listBehaviours,i.behaviours),apis:{setItems:o}}},zH=mv({name:NH(),configFields:EH(),partFields:MH(),factory:RH,apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),BH=w([Ai("dom"),Ki("shell",!0),ep("toolbarBehaviours",[Hw])]),PH=function(){return{behaviours:mf([Hw.config({})])}},IH=w([Bp({name:"groups",overrides:PH})]),LH=function(t,e,n,r){var o=function(t,e){i(t).fold((function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Hw.set(t,e)}))},i=function(e){return t.shell?P.some(e):Kp(e,t,"groups")},a=t.shell?{behaviours:[Hw.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:a.components,behaviours:rp(t.toolbarBehaviours,a.behaviours),apis:{setGroups:o},domModification:{attributes:{role:"group"}}}},HH=mv({name:"Toolbar",configFields:BH(),partFields:IH(),factory:LH,apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),FH=p,VH=O,jH=w([]),UH=Object.freeze({__proto__:null,setup:FH,isDocked:VH,getBehaviours:jH}),WH=function(t){var e=At(Qn(t,"position"),"fixed"),n=e?P.none():yn(t);return n.orThunk((function(){var e=ee.fromTag("span");return vn(t).bind((function(t){Dr(t,e);var n=yn(e);return Br(e),n}))}))},$H=function(t){return WH(t).map(mr).getOrThunk((function(){return lr(0,0)}))},qH=aa.generate([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),GH=function(t,e){var n=t.element;is(n,e.transitionClass),us(n,e.fadeOutClass),is(n,e.fadeInClass),e.onShow(t)},KH=function(t,e){var n=t.element;is(n,e.transitionClass),us(n,e.fadeInClass),is(n,e.fadeOutClass),e.onHide(t)},XH=function(t,e){return t.y<e.bottom&&t.bottom>e.y},YH=function(t,e){return t.y>=e.y},JH=function(t,e){return t.bottom<=e.bottom},ZH=function(t,e,n){return ot(t,(function(t){switch(t){case"bottom":return JH(e,n);case"top":return YH(e,n)}}))},QH=function(t,e){return e.getInitialPos().map((function(e){return Yr(e.bounds.x,e.bounds.y,vr(t),ar(t))}))},tF=function(t,e,n){n.setInitialPos({style:tr(t),position:Jn(t,"position")||"static",bounds:e})},eF=function(t,e,n){return n.getInitialPos().bind((function(r){switch(n.clearInitialPos(),r.position){case"static":return P.some(qH.static());case"absolute":var o=WH(t).map(Jr).getOrThunk((function(){return Jr(In())}));return P.some(qH.absolute(Af("absolute",Ot(r.style,"left").map((function(t){return e.x-o.x})),Ot(r.style,"top").map((function(t){return e.y-o.y})),Ot(r.style,"right").map((function(t){return o.right-e.right})),Ot(r.style,"bottom").map((function(t){return o.bottom-e.bottom})))));default:return P.none()}}))},nF=function(t,e,n){return QH(t,n).filter((function(t){return ZH(n.getModes(),t,e)})).bind((function(e){return eF(t,e,n)}))},rF=function(t,e,n){var r=Jr(t);if(ZH(n.getModes(),r,e))return P.none();tF(t,r,n);var o=Qr(),i=r.x-o.x,a=e.y-o.y,u=o.bottom-e.bottom,c=r.y<=e.y;return P.some(qH.fixed(Af("fixed",P.some(i),c?P.some(a):P.none(),P.none(),c?P.none():P.some(u))))},oF=function(t,e,n){var r=t.element,o=At(Qn(r,"position"),"fixed");return o?nF(r,e,n):rF(r,e,n)},iF=function(t,e){var n=t.element;return QH(n,e).bind((function(t){return eF(n,t,e)}))},aF=function(t,e,n){n.setDocked(!1),G(["left","right","top","bottom","position"],(function(e){return nr(t.element,e)})),e.onUndocked(t)},uF=function(t,e,n,r){var o="fixed"===r.position;n.setDocked(o),Mf(t.element,r);var i=o?e.onDocked:e.onUndocked;i(t)},cF=function(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var a=XH(i,r);if(a!==n.isVisible())if(n.setVisible(a),o&&!a)ss(t.element,[e.fadeOutClass]),e.onHide(t);else{var u=a?GH:KH;u(t,e)}}))}))},sF=function(t,e,n){var r=e.lazyViewport(t),o=n.isDocked();o&&cF(t,e,n,r),oF(t,r,n).each((function(o){o.fold((function(){return aF(t,e,n)}),(function(r){return uF(t,e,n,r)}),(function(o){cF(t,e,n,r,!0),uF(t,e,n,o)}))}))},lF=function(t,e,n){var r=t.element;n.setDocked(!1),iF(t,n).each((function(r){r.fold((function(){return aF(t,e,n)}),(function(r){return uF(t,e,n,r)}),p)})),n.setVisible(!0),e.contextual.each((function(e){ls(r,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(t)})),fF(t,e,n)},fF=function(t,e,n){t.getSystem().isConnected()&&sF(t,e,n)},dF=function(t,e,n){n.isDocked()&&lF(t,e,n)},mF=function(t,e,n){return n.isDocked()},gF=function(t,e,n,r){return n.setModes(r)},hF=function(t,e,n){return n.getModes()},pF=Object.freeze({__proto__:null,refresh:fF,reset:dF,isDocked:mF,getModes:hF,setModes:gF}),vF=function(t,e){return Eu([Vu(qa(),(function(n,r){t.contextual.each((function(t){if(cs(n.element,t.transitionClass)){ls(n.element,[t.transitionClass,t.fadeInClass]);var o=e.isVisible()?t.onShown:t.onHidden;o(n)}r.stop()}))})),Nu(lu(),(function(n,r){fF(n,t,e)})),Nu(fu(),(function(n,r){dF(n,t,e)}))])},bF=Object.freeze({__proto__:null,events:vF}),yF=[qi("contextual",[Ni("fadeInClass"),Ni("fadeOutClass"),Ni("transitionClass"),Bi("lazyContext"),ul("onShow"),ul("onShown"),ul("onHide"),ul("onHidden")]),ta("lazyViewport",Qr),na("modes",["top","bottom"],si),ul("onDocked"),ul("onUndocked")],wF=function(t){var e=oa(!1),n=oa(!0),r=od(),o=oa(t.modes),i=function(){return"docked: "+e.get()+", visible: "+n.get()+", modes: "+o.get().join(",")};return Tc({isDocked:e.get,setDocked:e.set,getInitialPos:r.get,setInitialPos:r.set,clearInitialPos:r.clear,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:i})},xF=Object.freeze({__proto__:null,init:wF}),CF=hf({fields:yF,name:"docking",active:bF,apis:pF,state:xF}),SF=w(oc("toolbar-height-change")),kF={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},TF="tox-tinymce--toolbar-sticky-on",OF="tox-tinymce--toolbar-sticky-off",_F=function(t,e){var n=mn(e),r=n.dom.defaultView.innerHeight,o=Ir(n),i=ee.fromDom(t.elm),a=Zr(i),u=ar(i),c=a.y,s=c+u,l=mr(e),f=ar(e),d=l.top,m=d+f,g=Math.abs(d-o.top)<2,h=Math.abs(m-(o.top+r))<2;if(g&&c<m)Lr(o.left,c-f,n);else if(h&&s>d){var p=c-r+u+f;Lr(o.left,p,n)}},EF=function(t,e){return j(CF.getModes(t),e)},AF=function(t){var e=function(t){return ur(t)+(parseInt(Jn(t,"margin-top"),10)||0)+(parseInt(Jn(t,"margin-bottom"),10)||0)},n=t.element;vn(n).each((function(r){var o="padding-"+CF.getModes(t)[0];if(CF.isDocked(t)){var i=vr(r);Kn(n,"width",i+"px"),Kn(r,o,e(n)+"px")}else nr(n,"width"),nr(r,o)}))},DF=function(t,e){e?(us(t,kF.fadeOutClass),ss(t,[kF.transitionClass,kF.fadeInClass])):(us(t,kF.fadeInClass),ss(t,[kF.fadeOutClass,kF.transitionClass]))},MF=function(t,e){var n=ee.fromDom(t.getContainer());e?(is(n,TF),us(n,OF)):(is(n,OF),us(n,TF))},NF=function(t,e){var n=mn(e);Of(n).filter((function(t){return!sn(e,t)})).filter((function(e){return sn(e,ee.fromDom(n.dom.body))||dn(t,e)})).each((function(){return Sf(e)}))},RF=function(t,e){return _f(t).orThunk((function(){return e().toOptional().bind((function(t){return _f(t.element)}))}))},zF=function(t,e,n){t.inline||(e.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){n().each(CF.reset)})),t.on("ResizeWindow ResizeEditor",(function(){n().each(AF)})),t.on("SkinLoaded",(function(){n().each((function(t){CF.isDocked(t)?CF.reset(t):CF.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){n().each(CF.reset)}))),t.on("AfterScrollIntoView",(function(t){n().each((function(e){CF.refresh(e);var n=e.element;Jb(n)&&_F(t,n)}))})),t.on("PostRender",(function(){MF(t,!1)}))},BF=function(t){return t().map(CF.isDocked).getOr(!1)},PF=function(){var t;return[yf.config({channels:(t={},t[SF()]={onReceive:AF},t)})]},IF=function(t,e){var n=od(),r=e.getSink,o=function(t){r().each((function(e){return t(e.element)}))},i=function(e){t.inline||AF(e),MF(t,CF.isDocked(e)),e.getSystem().broadcastOn([wh()],{}),r().each((function(t){return t.getSystem().broadcastOn([wh()],{})}))},a=t.inline?[]:PF();return M([Yw.config({}),CF.config({contextual:A({lazyContext:function(e){var n=ur(e.element),r=t.inline?t.getContentAreaContainer():t.getContainer(),o=Jr(ee.fromDom(r)),i=o.height-n,a=o.y+(EF(e,"top")?0:n);return P.some(Yr(o.x,a,o.width,i))},onShow:function(){o((function(t){return DF(t,!0)}))},onShown:function(t){o((function(t){return ls(t,[kF.transitionClass,kF.fadeInClass])})),n.get().each((function(e){NF(t.element,e),n.clear()}))},onHide:function(t){RF(t.element,r).fold(n.clear,n.set),o((function(t){return DF(t,!1)}))},onHidden:function(){o((function(t){return ls(t,[kF.transitionClass])}))}},kF),lazyViewport:function(e){var n=Qr(),r=qT(t),o=n.y+(EF(e,"top")?r:0),i=n.height-(EF(e,"bottom")?r:0);return Yr(n.x,o,n.width,i)},modes:[e.header.getDockingMode()],onDocked:i,onUndocked:i})],a,!0)},LF=Object.freeze({__proto__:null,setup:zF,isDocked:BF,getBehaviours:IF}),HF=function(t){var e=t.editor,n=t.sticky?IF:jH;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:mf(n(e,t.sharedBackstage))}},FF=ti([Ni("type"),Di("items",ni([ii([Ni("name"),Hi("items",si)]),si]))].concat(kS)),VF=function(t){return wi("GroupToolbarButton",FF,t)},jF=[Ui("text"),Ui("tooltip"),Ui("icon"),Bi("fetch"),ta("onSetup",(function(){return p}))],UF=ti(M([Ni("type")],jF,!0)),WF=function(t){return wi("menubutton",UF,t)},$F=ti([Ni("type"),Ui("tooltip"),Ui("icon"),Ui("text"),Wi("select"),Bi("fetch"),ta("onSetup",(function(){return p})),Zi("presets","normal",["normal","color","listpreview"]),Ki("columns",1),Bi("onAction"),Bi("onItemAction")]),qF=function(t){return wi("SplitButton",$F,t)},GF=function(t,e){var n=function(t,n){var r=q(n,(function(t){var n={type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}},r=WF(n).mapError((function(t){return Si(t)})).getOrDie();return GB(r,"tox-mbtn",e.backstage,P.some("menuitem"))}));Hw.set(t,r)},r={focus:Aw.focusIn,setMenus:n};return{uid:t.uid,dom:t.dom,components:[],behaviours:mf([Hw.config({}),Vw("menubar-events",[ju((function(e){t.onSetup(e)})),Nu(Ia(),(function(t,e){Ls(t.element,".tox-mbtn--active").each((function(n){Hs(e.event.target,".tox-mbtn").each((function(e){sn(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){ID.expand(t),ID.close(n),Yw.focus(t)}))}))}))}))})),Nu(pu(),(function(t,e){e.event.prevFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(n){e.event.newFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(t){ID.isOpen(n)&&(ID.expand(t),ID.close(n))}))}))}))]),Aw.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),P.some(!0)}}),yA.config({})]),apis:r,domModification:{attributes:{role:"menubar"}}}},KF=dv({factory:GF,name:"silver.Menubar",configFields:[Ai("dom"),Ai("uid"),Ai("onEscape"),Ai("backstage"),Ki("onSetup",p)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),XF=function(t,e){return e.getAnimationRoot.fold((function(){return t.element}),(function(e){return e(t)}))},YF=function(t){return t.dimension.property},JF=function(t,e){return t.dimension.getDimension(e)},ZF=function(t,e){var n=XF(t,e);ls(n,[e.shrinkingClass,e.growingClass])},QF=function(t,e){us(t.element,e.openClass),is(t.element,e.closedClass),Kn(t.element,YF(e),"0px"),rr(t.element)},tV=function(t,e){us(t.element,e.closedClass),is(t.element,e.openClass),nr(t.element,YF(e))},eV=function(t,e,n,r){n.setCollapsed(),Kn(t.element,YF(e),JF(e,t.element)),rr(t.element),ZF(t,e),QF(t,e),e.onStartShrink(t),e.onShrunk(t)},nV=function(t,e,n,r){var o=r.getOrThunk((function(){return JF(e,t.element)}));n.setCollapsed(),Kn(t.element,YF(e),o),rr(t.element);var i=XF(t,e);us(i,e.growingClass),is(i,e.shrinkingClass),QF(t,e),e.onStartShrink(t)},rV=function(t,e,n){var r=JF(e,t.element),o="0px"===r?eV:nV;o(t,e,n,P.some(r))},oV=function(t,e,n){var r=XF(t,e),o=cs(r,e.shrinkingClass),i=JF(e,t.element);tV(t,e);var a=JF(e,t.element),u=function(){Kn(t.element,YF(e),i),rr(t.element)},c=function(){QF(t,e)},s=o?u:c;s(),us(r,e.shrinkingClass),is(r,e.growingClass),tV(t,e),Kn(t.element,YF(e),a),n.setExpanded(),e.onStartGrow(t)},iV=function(t,e,n){if(n.isExpanded()){nr(t.element,YF(e));var r=JF(e,t.element);Kn(t.element,YF(e),r)}},aV=function(t,e,n){n.isExpanded()||oV(t,e,n)},uV=function(t,e,n){n.isExpanded()&&rV(t,e,n)},cV=function(t,e,n){n.isExpanded()&&eV(t,e,n)},sV=function(t,e,n){return n.isExpanded()},lV=function(t,e,n){return n.isCollapsed()},fV=function(t,e,n){var r=XF(t,e);return!0===cs(r,e.growingClass)},dV=function(t,e,n){var r=XF(t,e);return!0===cs(r,e.shrinkingClass)},mV=function(t,e,n){return fV(t,e)||dV(t,e)},gV=function(t,e,n){var r=n.isExpanded()?rV:oV;r(t,e,n)},hV=Object.freeze({__proto__:null,refresh:iV,grow:aV,shrink:uV,immediateShrink:cV,hasGrown:sV,hasShrunk:lV,isGrowing:fV,isShrinking:dV,isTransitioning:mV,toggleGrow:gV,disableTransitions:ZF}),pV=function(t,e,n){var r=e.expanded;return Dc(r?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:ma(e.dimension.property,"0px")})},vV=function(t,e){return Eu([Vu(qa(),(function(n,r){var o=r.event.raw;if(o.propertyName===t.dimension.property){ZF(n,t),e.isExpanded()&&nr(n.element,t.dimension.property);var i=e.isExpanded()?t.onGrown:t.onShrunk;i(n)}}))])},bV=Object.freeze({__proto__:null,exhibit:pV,events:vV}),yV=[Ai("closedClass"),Ai("openClass"),Ai("shrinkingClass"),Ai("growingClass"),Fi("getAnimationRoot"),ul("onShrunk"),ul("onStartShrink"),ul("onGrown"),ul("onStartGrow"),Ki("expanded",!1),Di("dimension",ki("property",{width:[fl("property","width"),fl("getDimension",(function(t){return vr(t)+"px"}))],height:[fl("property","height"),fl("getDimension",(function(t){return ar(t)+"px"}))]}))],wV=function(t){var e=oa(t.expanded),n=function(){return"expanded: "+e.get()};return Tc({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:S(e.set,!1),setExpanded:S(e.set,!0),readState:n})},xV=Object.freeze({__proto__:null,init:wV}),CV=hf({fields:yV,name:"sliding",active:bV,apis:hV,state:xV}),SV="container",kV=[ep("slotBehaviours",[])],TV=function(t){return"<alloy.field."+t+">"},OV=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),Up(SV,TV(e),n)};return{slot:e,record:w(t)}}(),n=t(e),r=e.record(),o=q(r,(function(t){return Rp({name:t,pname:TV(t)})}));return av(SV,kV,o,_V,n)},_V=function(t,e){var n=function(e){return Zp(t)},r=function(e,n){return Kp(e,t,n)},o=function(e,n){return function(r,o){return Kp(r,t,o).map((function(t){return e(t,o)})).getOr(n)}},i=function(t){return function(e,n){G(n,(function(n){return t(e,n)}))}},a=function(t,e){return"true"!==jn(t.element,"aria-hidden")},u=function(t,e){if(!a(t)){var n=t.element;nr(n,"display"),$n(n,"aria-hidden"),Su(t,vu(),{name:e,visible:!0})}},c=function(t,e){if(a(t)){var n=t.element;Kn(n,"display","none"),Fn(n,"aria-hidden","true"),Su(t,vu(),{name:e,visible:!1})}},s=o(a,!1),l=o(c),f=i(l),d=function(t){return f(t,n())},m=o(u),g={getSlotNames:n,getSlot:r,isShowing:s,hideSlot:l,hideAllSlots:d,showSlot:m};return{uid:t.uid,dom:t.dom,components:e,behaviours:np(t.slotBehaviours),apis:g}},EV=bt({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},(function(t){return Sc(t)})),AV=A(A({},EV),{sketch:OV}),DV=ti([Ui("icon"),Ui("tooltip"),ta("onShow",p),ta("onHide",p),ta("onSetup",(function(){return p}))]),MV=function(t){return wi("sidebar",DV,t)},NV=function(t){var e=t.ui.registry.getAll().sidebars;G(ht(e),(function(n){var r=e[n],o=function(){return At(P.from(t.queryCommandValue("ToggleSidebar")),n)};t.ui.registry.addToggleButton(n,{icon:r.icon,tooltip:r.tooltip,onAction:function(e){t.execCommand("ToggleSidebar",!1,n),e.setActive(o())},onSetup:function(e){var n=function(){return e.setActive(o())};return t.on("ToggleSidebar",n),function(){t.off("ToggleSidebar",n)}}})}))},RV=function(t){return{element:function(){return t.element.dom}}},zV=function(t,e){var n=q(ht(e),(function(t){var n=e[t],r=xi(MV(n));return{name:t,getApi:RV,onSetup:r.onSetup,onShow:r.onShow,onHide:r.onHide}}));return q(n,(function(e){var r=oa(p);return t.slot(e.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Zk.unnamedEvents([hO(e,r),pO(e,r),Nu(vu(),(function(t,e){var r=e.event,o=tt(n,(function(t){return t.name===r.name}));o.each((function(e){var n=r.visible?e.onShow:e.onHide;n(e.getApi(t))}))}))])})}))},BV=function(t){return AV.sketch((function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:zV(e,t),slotBehaviours:Zk.unnamedEvents([ju((function(t){return AV.hideAllSlots(t)}))])}}))},PV=function(t,e){var n=bv.getCurrent(t);n.each((function(t){return Hw.set(t,[BV(e)])}))},IV=function(t,e){var n=bv.getCurrent(t);n.each((function(t){var n=bv.getCurrent(t);n.each((function(n){CV.hasGrown(t)?AV.isShowing(n,e)?CV.shrink(t):(AV.hideAllSlots(n),AV.showSlot(n,e)):(AV.hideAllSlots(n),AV.showSlot(n,e),CV.grow(t))}))}))},LV=function(t){var e=bv.getCurrent(t);return e.bind((function(t){var e=CV.isGrowing(t)||CV.hasGrown(t);if(e){var n=bv.getCurrent(t);return n.bind((function(t){return tt(AV.getSlotNames(t),(function(e){return AV.isShowing(t,e)}))}))}return P.none()}))},HV=oc("FixSizeEvent"),FV=oc("AutoSizeEvent"),VV=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:mf([yA.config({}),Yw.config({}),CV.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){var e=bv.getCurrent(t);e.each(AV.hideAllSlots),Cu(t,FV)},onGrown:function(t){Cu(t,FV)},onStartGrow:function(t){Su(t,HV,{width:Qn(t.element,"width").getOr("")})},onStartShrink:function(t){Su(t,HV,{width:vr(t.element)+"px"})}}),Hw.config({}),bv.config({find:function(t){var e=Hw.contents(t);return ft(e)}})])}],behaviours:mf([WR.childAt(0),Vw("sidebar-sliding-events",[Nu(HV,(function(t,e){Kn(t.element,"width",e.event.width)})),Nu(FV,(function(t,e){nr(t.element,"width")}))])])}},jV=function(t,e,n,r){Fn(t.element,"aria-busy",!0);var o=e.getRoot(t).getOr(t),i=mf([Aw.config({mode:"special",onTab:function(){return P.some(!0)},onShiftTab:function(){return P.some(!0)}}),Yw.config({})]),a=r(o,i),u=o.getSystem().build(a);Hw.append(o,Es(u)),u.hasConfigured(Aw)&&e.focus&&Aw.focusIn(u),n.isBlocked()||e.onBlock(t),n.blockWith((function(){return Hw.remove(o,u)}))},UV=function(t,e,n){$n(t.element,"aria-busy"),n.isBlocked()&&e.onUnblock(t),n.clear()},WV=Object.freeze({__proto__:null,block:jV,unblock:UV}),$V=[ta("getRoot",P.none),Qi("focus",!0),ul("onBlock"),ul("onUnblock")],qV=function(){var t=ed(),e=function(e){t.set({destroy:e})};return Tc({readState:t.isSet,blockWith:e,clear:t.clear,isBlocked:t.isSet})},GV=Object.freeze({__proto__:null,init:qV}),KV=hf({fields:$V,name:"blocking",apis:WV,state:GV}),XV=function(t){var e=void 0!==t.dom.attributes?t.dom.attributes:[];return Z(e,(function(t,e){var n;return"class"===e.name?t:A(A({},t),(n={},n[e.name]=e.value,n))}),{})},YV=function(t){return Array.prototype.slice.call(t.dom.classList,0)},JV=function(t){var e=ee.fromHtml(t),n=xn(e),r=XV(e),o=YV(e),i=0===n.length?{}:{innerHtml:Gu(e)};return A({tag:ue(e),classes:o,attributes:r},i)},ZV=function(t){return function(e,n){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:JV('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}},QV=function(t){return bv.getCurrent(t).each((function(t){return Sf(t.element)}))},tj=function(t,e){var n="tabindex",r="data-mce-"+n;P.from(t.iframeElement).map(ee.fromDom).each((function(t){e?(Un(t,n).each((function(e){return Fn(t,r,e)})),Fn(t,n,-1)):($n(t,n),Un(t,r).each((function(e){Fn(t,n,e),$n(t,r)})))}))},ej=function(t,e,n,r){var o=e.element;if(tj(t,n),n)KV.block(e,ZV(r)),nr(o,"display"),$n(o,"aria-hidden"),t.hasFocus()&&QV(e);else{var i=bv.getCurrent(e).exists((function(t){return Tf(t.element)}));KV.unblock(e),Kn(o,"display","none"),Fn(o,"aria-hidden","true"),i&&t.focus()}},nj=function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:mf([Hw.config({}),KV.config({focus:!1}),bv.config({find:function(t){return ft(t.components())}})]),components:[]}},rj=function(t){return"focusin"===t.type},oj=function(t){if(rj(t)){var e=t.composed?ft(t.composedPath()):P.from(t.target);return e.map(ee.fromDom).filter(le).exists((function(t){return cs(t,"mce-pastebin")}))}return!1},ij=function(t,e,n){var r=oa(!1),o=od(),i=function(n){r.get()&&!oj(n)&&(n.preventDefault(),QV(e()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",i),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&i(t)}))}));var a=function(o){o!==r.get()&&(r.set(o),ej(t,e(),o,n.providers),t.fire("AfterProgressState",{state:o}))};t.on("ProgressState",(function(e){if(o.on(xC.clearTimeout),g(e.time)){var n=xC.setEditorTimeout(t,(function(){return a(e.state)}),e.time);o.set(n)}else a(e.state),o.clear()}))},aj=function(t,e){var n={len:0,list:[]},r=Z(t,(function(t,n){var r=e(n,t.len);return r.fold(w(t),(function(e){return{len:e.finish,list:t.list.concat([e])}}))}),n);return r.list},uj=function(t,e,n){return{within:t,extra:e,withinWidth:n}},cj=function(t,e,n){var r=aj(t,(function(t,e){var r=n(t);return P.some({element:t,start:e,finish:e+r,width:r})})),o=Y(r,(function(t){return t.finish<=e})),i=J(o,(function(t,e){return t+e.width}),0),a=r.slice(o.length);return{within:o,extra:a,withinWidth:i}},sj=function(t){return q(t,(function(t){return t.element}))},lj=function(t,e,n){var r=sj(t.concat(e));return uj(r,[],n)},fj=function(t,e,n,r){var o=sj(t).concat([n]);return uj(o,sj(e),r)},dj=function(t,e,n){return uj(sj(t),[],n)},mj=function(t,e,n){var r=cj(e,t,n);return 0===r.extra.length?P.some(r):P.none()},gj=function(t,e,n,r){var o=mj(t,e,n).getOrThunk((function(){return cj(e,t-n(r),n)})),i=o.within,a=o.extra,u=o.withinWidth;return 1===a.length&&a[0].width<=n(r)?lj(i,a,u):a.length>=1?fj(i,a,r,u):dj(i,a,u)},hj=function(t,e){var n=q(e,(function(t){return Es(t)}));HH.setGroups(t,n)},pj=function(t){return gt(t,(function(t){return _f(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}))},vj=function(t,e,n){var r=e.builtGroups.get();if(0!==r.length){var o=Xp(t,e,"primary"),i=bD.getCoupled(t,"overflowGroup");Kn(o.element,"visibility","hidden");var a=r.concat([i]),u=pj(a);n([]),hj(o,a);var c=vr(o.element),s=gj(c,e.builtGroups.get(),(function(t){return vr(t.element)}),i);0===s.extra.length?(Hw.remove(o,i),n([])):(hj(o,s.within),n(s.extra)),nr(o.element,"visibility"),rr(o.element),u.each(Yw.focus)}},bj=w([ep("splitToolbarBehaviours",[bD]),_i("builtGroups",(function(){return oa([])}))]),yj=w([il(["overflowToggledClass"]),Wi("getOverflowBounds"),Ai("lazySink"),_i("overflowGroups",(function(){return oa([])}))].concat(bj())),wj=w([Rp({factory:HH,schema:BH(),name:"primary"}),zp({schema:BH(),name:"overflow"}),zp({name:"overflow-button"}),zp({name:"overflow-group"})]),xj=w((function(t,e){yr(t,Math.floor(e))})),Cj=w([il(["toggledClass"]),Ai("lazySink"),Bi("fetch"),Wi("getBounds"),qi("fireDismissalEventInstead",[Ki("event",gu())]),Hd()]),Sj=w([zp({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:mf([hx.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),zp({factory:HH,schema:BH(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:mf([Aw.config({mode:"cyclic",onEscape:function(e){return Kp(e,t,"button").each(Yw.focus),P.none()}})])}}})]),kj=function(t,e){var n=bD.getCoupled(t,"toolbarSandbox");bh.isOpen(n)?bh.close(n):bh.open(n,e.toolbar())},Tj=function(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();Lg.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:xj()}}},o)},Oj=function(t,e,n,r,o){HH.setGroups(e,o),Tj(t,e,n,r),hx.on(t)},_j=function(t,e,n){var r=Vs(),o=function(o,i){n.fetch().get((function(o){Oj(t,i,n,e.layouts,o),r.link(t.element),Aw.focusIn(i)}))},i=function(){hx.off(t),Yw.focus(t),r.unlink(t.element)};return{dom:{tag:"div",attributes:{id:r.id}},behaviours:mf([Aw.config({mode:"special",onEscape:function(t){return bh.close(t),P.some(!0)}}),bh.config({onOpen:o,onClose:i,isPartOf:function(e,n,r){return Us(n,r)||Us(t,r)},getAttachPoint:function(){return n.lazySink(t).getOrDie()}}),yf.config({channels:A(A({},Sh(A({isExtraPart:O},n.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Th({doReposition:function(){bh.getState(bD.getCoupled(t,"toolbarSandbox")).each((function(r){Tj(t,r,n,e.layouts)}))}}))})])}},Ej=function(t,e,n,r){return A(A({},SC.sketch(A(A({},r.button()),{action:function(t){kj(t,r)},buttonBehaviours:op.augment({dump:r.button().buttonBehaviours},[bD.config({others:{toolbarSandbox:function(e){return _j(e,n,t)}}})])}))),{apis:{setGroups:function(e,r){bh.getState(bD.getCoupled(e,"toolbarSandbox")).each((function(o){Oj(e,o,t,n.layouts,r)}))},reposition:function(e){bh.getState(bD.getCoupled(e,"toolbarSandbox")).each((function(r){Tj(e,r,t,n.layouts)}))},toggle:function(t){kj(t,r)},getToolbar:function(t){return bh.getState(bD.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return bh.isOpen(bD.getCoupled(t,"toolbarSandbox"))}}})},Aj=mv({name:"FloatingToolbarButton",factory:Ej,configFields:Cj(),partFields:Sj(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Dj=w([Ai("items"),il(["itemSelector"]),ep("tgroupBehaviours",[Aw])]),Mj=w([Pp({name:"items",unit:"item"})]),Nj=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.tgroupBehaviours,[Aw.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}},Rj=mv({name:"ToolbarGroup",configFields:Dj(),partFields:Mj(),factory:Nj}),zj=function(t){return q(t,(function(t){return Es(t)}))},Bj=function(t,e,n){vj(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){Aj.setGroups(t,zj(r))}))}))},Pj=function(t,e,n,r){var o=kC(Aj.sketch({fetch:function(){return tD.nu((function(e){e(zj(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[jl,Vl]},onRtl:function(){return[Vl,jl]},onBottomLtr:function(){return[Wl,Ul]},onBottomRtl:function(){return[Ul,Wl]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.splitToolbarBehaviours,[bD.config({others:{overflowGroup:function(){return Rj.sketch(A(A({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(q(n,e.getSystem().build)),Bj(e,o,t)},refresh:function(e){return Bj(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){Aj.toggle(t)}))},isOpen:function(t){return o.getOpt(t).map(Aj.isOpen).getOr(!1)},reposition:function(t){o.getOpt(t).each((function(t){Aj.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind(Aj.getToolbar)}},domModification:{attributes:{role:"group"}}}},Ij=mv({name:"SplitFloatingToolbar",configFields:yj(),partFields:wj(),factory:Pj,apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),Lj=w([il(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),ul("onOpened"),ul("onClosed")].concat(bj())),Hj=w([Rp({factory:HH,schema:BH(),name:"primary"}),Rp({factory:HH,schema:BH(),name:"overflow",overrides:function(t){return{toolbarBehaviours:mf([CV.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){Kp(e,t,"overflow-button").each((function(t){hx.off(t),Yw.focus(t)})),t.onClosed(e)},onGrown:function(e){Aw.focusIn(e),t.onOpened(e)},onStartGrow:function(e){Kp(e,t,"overflow-button").each(hx.on)}}),Aw.config({mode:"acyclic",onEscape:function(e){return Kp(e,t,"overflow-button").each(Yw.focus),P.some(!0)}})])}}}),zp({name:"overflow-button",overrides:function(t){return{buttonBehaviours:mf([hx.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),zp({name:"overflow-group"})]),Fj=function(t,e){return Kp(t,e,"overflow").map(CV.hasGrown).getOr(!1)},Vj=function(t,e){Kp(t,e,"overflow-button").bind((function(){return Kp(t,e,"overflow")})).each((function(n){jj(t,e),CV.toggleGrow(n)}))},jj=function(t,e){Kp(t,e,"overflow").each((function(n){vj(t,e,(function(t){var e=q(t,(function(t){return Es(t)}));HH.setGroups(n,e)})),Kp(t,e,"overflow-button").each((function(t){CV.hasGrown(n)&&hx.on(t)})),CV.refresh(n)}))},Uj=function(t,e,n,r){var o="alloy.toolbar.toggle",i=function(e,n){var r=q(n,e.getSystem().build);t.builtGroups.set(r)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.splitToolbarBehaviours,[bD.config({others:{overflowGroup:function(t){return Rj.sketch(A(A({},r["overflow-group"]()),{items:[SC.sketch(A(A({},r["overflow-button"]()),{action:function(e){Cu(t,o)}}))]}))}}}),Vw("toolbar-toggle-events",[Nu(o,(function(e){Vj(e,t)}))])]),apis:{setGroups:function(e,n){i(e,n),jj(e,t)},refresh:function(e){return jj(e,t)},toggle:function(e){return Vj(e,t)},isOpen:function(e){return Fj(e,t)}},domModification:{attributes:{role:"group"}}}},Wj=mv({name:"SplitSlidingToolbar",configFields:Lj(),partFields:Hj(),factory:Uj,apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)}}}),$j=function(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:A({tag:"div",classes:["tox-toolbar__group"]},e),components:[Rj.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:mf([yA.config({}),Yw.config({})])}},qj=function(t){return Rj.sketch($j(t))},Gj=function(t,e){var n=ju((function(e){var n=q(t.initGroups,qj);HH.setGroups(e,n)}));return mf([mO.toolbarButton(t.providers.isDisabled),cO(),Aw.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Vw("toolbar-events",[n])])},Kj=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":$j({title:P.none(),items:[]}),"overflow-button":YB({name:"more",icon:P.some("more-drawer"),disabled:!1,tooltip:P.some("More..."),primary:!1,borderless:!1},P.none(),t.providers)},splitToolbarBehaviours:Gj(t,e)}},Xj=function(t){var e=Kj(t),n=4,r=Ij.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return Ij.sketch(A(A({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element,r=Zr(e),o=hn(e),i=Zr(o),a=Math.max(o.dom.scrollHeight,i.height);return Yr(r.x+n,i.y,r.width-2*n,a)},parts:A(A({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[r],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},Yj=function(t){var e=Wj.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=Wj.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=Kj(t);return Wj.sketch(A(A({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([SF()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([SF()],{type:"closed"})}}))},Jj=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return HH.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===jS.scrolling?["tox-toolbar--scrolling"]:[])},components:[HH.parts.groups({})],toolbarBehaviours:Gj(t,e)})},Zj=function(t,e,n){var r={getSocket:function(e){return OH.getPart(e,t,"socket")},setSidebar:function(e,n){OH.getPart(e,t,"sidebar").each((function(t){return PV(t,n)}))},toggleSidebar:function(e,n){OH.getPart(e,t,"sidebar").each((function(t){return IV(t,n)}))},whichSidebar:function(e){return OH.getPart(e,t,"sidebar").bind(LV).getOrNull()},getHeader:function(e){return OH.getPart(e,t,"header")},getToolbar:function(e){return OH.getPart(e,t,"toolbar")},setToolbar:function(e,n){OH.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){OH.getPart(e,t,"multiple-toolbar").each((function(t){zH.setItems(t,n)}))},refreshToolbar:function(e){var n=OH.getPart(e,t,"toolbar");n.each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(e){OH.getPart(e,t,"toolbar").each((function(t){Bt(t.getApis().toggle,(function(e){return e(t)}))}))},isToolbarDrawerToggled:function(e){return OH.getPart(e,t,"toolbar").bind((function(t){return P.from(t.getApis().isOpen).map((function(e){return e(t)}))})).getOr(!1)},getThrobber:function(e){return OH.getPart(e,t,"throbber")},focusToolbar:function(e){var n=OH.getPart(e,t,"toolbar").orThunk((function(){return OH.getPart(e,t,"multiple-toolbar")}));n.each((function(t){Aw.focusIn(t)}))},setMenubar:function(e,n){OH.getPart(e,t,"menubar").each((function(t){KF.setMenus(t,n)}))},focusMenubar:function(e){OH.getPart(e,t,"menubar").each((function(t){KF.focus(t)}))}};return{uid:t.uid,dom:t.dom,components:e,apis:r,behaviours:t.behaviours}},Qj=_H.optional({factory:KF,name:"menubar",schema:[Ai("backstage")]}),tU=function(t){return t.type===jS.sliding?Yj:t.type===jS.floating?Xj:Jj},eU=_H.optional({factory:{sketch:function(t){return zH.sketch({uid:t.uid,dom:t.dom,listBehaviours:mf([Aw.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return Jj({type:t.type,uid:oc("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),P.some(!0)}})},setupItem:function(t,e,n,r){HH.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[Ai("dom"),Ai("onEscape")]}),nU=_H.optional({factory:{sketch:function(t){var e=tU(t),n={type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),P.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes};return e(n)}},name:"toolbar",schema:[Ai("dom"),Ai("onEscape"),Ai("getSink")]}),rU=_H.optional({factory:{sketch:HF},name:"header",schema:[Ai("dom")]}),oU=_H.optional({name:"socket",schema:[Ai("dom")]}),iU=_H.optional({factory:{sketch:VV},name:"sidebar",schema:[Ai("dom")]}),aU=_H.optional({factory:{sketch:nj},name:"throbber",schema:[Ai("dom")]}),uU=mv({name:"OuterContainer",factory:Zj,configFields:[Ai("dom"),Ai("behaviours")],partFields:[rU,Qj,nU,eU,oU,iU,aU],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=q(n,(function(t){return qj(t)}));t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=q(n,(function(t){return q(t,qj)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},toggleToolbarDrawer:function(t,e){t.toggleToolbarDrawer(e)},isToolbarDrawerToggled:function(t,e){return t.isToolbarDrawerToggled(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),cU="file edit view insert format tools table help",sU={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},lU=function(t,e,n){var r=_T(n).split(/[ ,]/);return{text:t.title,getItems:function(){return rt(t.items,(function(t){var n=t.toLowerCase();return 0===n.trim().length||U(r,(function(t){return t===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]}))}}},fU=function(t){return"string"===typeof t?t.split(" "):t},dU=function(t,e){var n=A(A({},sU),e.menus),r=ht(e.menus).length>0,o=void 0===e.menubar||!0===e.menubar?fU(cU):fU(!1===e.menubar?"":e.menubar),i=Y(o,(function(t){var n=_t(sU,t);return r?n||Ot(e.menus,t).exists((function(t){return _t(t,"items")})):n})),a=q(i,(function(r){var o=n[r];return lU({title:o.title,items:fU(o.items)},e,t)}));return Y(a,(function(t){var e=function(t){return"separator"!==t.type};return t.getItems().length>0&&U(t.getItems(),e)}))},mU=function(t){var e=function(){t._skinLoaded=!0,h_(t)};return function(){t.initialized?e():t.on("init",e)}},gU=function(t,e){return function(){return p_(t,{message:e})}},hU=function(t,e,n){return new aS((function(r,o){n.load(e,r,o),t.on("remove",(function(){return n.unload(e)}))}))},pU=function(t,e){var n=e+"/skin.min.css";return hU(t,n,t.ui.styleSheetLoader)},vU=function(t,e){var n=Mn(ee.fromDom(t.getElement()));if(n){var r=e+"/skin.shadowdom.min.css";return hU(t,r,dT.DOM.styleSheetLoader)}return aS.resolve()},bU=function(t,e){var n=gT(e);n&&e.contentCSS.push(n+(t?"/content.inline":"/content")+".min.css"),!1===pT(e)&&i(n)?aS.all([pU(e,n),vU(e,n)]).then(mU(e),gU(e,"Skin could not be loaded")):mU(e)()},yU=S(bU,!1),wU=S(bU,!0),xU=function(t,e){return function(n){var r=nd(),o=function(){n.setActive(t.formatter.match(e));var o=t.formatter.formatChanged(e,n.setActive);r.set(o)};return t.initialized?o():t.once("init",o),function(){t.off("init",o),r.clear()}}},CU=function(t,e,n){return function(r){var o=function(){return n(r)},i=function(){n(r),t.on(e,o)};return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(e,o)}}},SU=function(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}},kU=function(t,e){return function(){return t.execCommand(e)}},TU=function(t,e,n){var r=function(t,r,i,a){var u=e.shared.providers.translate(t.title);if("separator"===t.type)return P.some({type:"separator",text:u});if("submenu"===t.type){var c=rt(t.getStyleItems(),(function(t){return o(t,r,a)}));return 0===r&&c.length<=0?P.none():P.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return rt(t.getStyleItems(),(function(t){return o(t,r,a)}))}})}return P.some(A({type:"togglemenuitem",text:u,icon:t.icon,active:t.isSelected(a),disabled:i,onAction:n.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))))},o=function(t,e,o){var i="formatter"===t.type&&n.isInvalid(t);return 0===e?i?[]:r(t,e,!1,o).toArray():r(t,e,i,o).toArray()},i=function(t){var e=n.getCurrentValue(),r=n.shouldHide?0:1;return rt(t,(function(t){return o(t,r,e)}))},a=function(t,e){return function(n,r){var o=e(),a=i(o),u=$B(a,US.CLOSE_ON_EXECUTE,t,!1);r(u)}};return{validateItems:i,getFetch:a}},OU=function(t,e,n){var r=n.dataset,o="basic"===r.type?function(){return q(r.data,(function(t){return NL(t,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:TU(t,e,n),getStyleItems:o}},_U=function(t,e,n){var r=OU(t,e,n),o=r.items,i=r.getStyleItems,a=function(t){return{getComponent:w(t)}},u=CU(t,"NodeChange",(function(t){var e=t.getComponent();n.updateText(e)}));return BB({text:n.icon.isSome()?P.none():n.text,icon:n.icon,tooltip:P.from(n.tooltip),role:P.none(),fetch:o.getFetch(e,i),onSetup:u,getApi:a,columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)},EU=function(t){return q(t,(function(t){var e=t,n=t,r=t.split("=");return r.length>1&&(e=r[0],n=r[1]),{title:e,format:n}}))},AU=function(t){return{type:"basic",data:t}};(function(t){t[t["SemiColon"]=0]="SemiColon",t[t["Space"]=1]="Space"})(XP||(XP={}));var DU,MU=function(t,e){return e===XP.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")},NU=function(t,e,n,r){var o=t.getParam(e,n,"string"),i=EU(MU(o,r));return{type:"basic",data:i}},RU=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],zU=function(t){var e=function(){return tt(RU,(function(e){return t.formatter.match(e.format)}))},n=function(e){return function(){return t.formatter.match(e)}},r=function(t){return P.none},o=function(t){var n=e(),r=n.fold(w("left"),(function(t){return t.title.toLowerCase()}));Su(t,zB,{icon:"align-"+r})},i=AU(RU),a=function(e){return function(){return tt(RU,(function(t){return t.format===e.format})).each((function(e){return t.execCommand(e.command)}))}};return{tooltip:"Align",text:P.none(),icon:P.some("align-left"),isSelectedFor:n,getCurrentValue:P.none,getPreviewFor:r,onAction:a,updateText:o,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},BU=function(t,e){return _U(t,e,zU(t))},PU=function(t,e){var n=OU(t,e,zU(t));t.ui.registry.addNestedMenuItem("align",{text:e.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},IU="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",LU=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],HU=function(t){var e=t.split(/\s*,\s*/);return q(e,(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))},FU=function(t){var e=function(){var e=HU(t.toLowerCase());return ot(LU,(function(t){return e.indexOf(t.toLowerCase())>-1}))};return 0===t.indexOf("-apple-system")&&e()},VU=function(t){var e="System Font",n=function(){var n=function(t){return t?HU(t)[0]:""},r=t.queryCommandValue("FontName"),o=c.data,i=r?r.toLowerCase():"",a=tt(o,(function(t){var e=t.format;return e.toLowerCase()===i||n(e).toLowerCase()===n(i).toLowerCase()})).orThunk((function(){return Pt(FU(i),{title:e,format:i})}));return{matchOpt:a,font:r}},r=function(t){return function(e){return e.exists((function(e){return e.format===t}))}},o=function(){var t=n().matchOpt;return t},i=function(t){return function(){return P.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},a=function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},u=function(t){var e=n(),r=e.matchOpt,o=e.font,i=r.fold(w(o),(function(t){return t.title}));Su(t,RB,{text:i})},c=NU(t,"font_formats",IU,XP.SemiColon);return{tooltip:"Fonts",text:P.some(e),icon:P.none(),isSelectedFor:r,getCurrentValue:o,getPreviewFor:i,onAction:a,updateText:u,dataset:c,shouldHide:!1,isInvalid:O}},jU=function(t,e){return _U(t,e,VU(t))},UU=function(t,e){var n=OU(t,e,VU(t));t.ui.registry.addNestedMenuItem("fontformats",{text:e.shared.providers.translate("Fonts"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},WU="8pt 10pt 12pt 14pt 18pt 24pt 36pt",$U={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},qU={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},GU=function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n},KU=function(t,e){return/[0-9.]+px$/.test(t)?GU(72*parseInt(t,10)/96,e||0)+"pt":Ot(qU,t).getOr(t)},XU=function(t){return Ot($U,t).getOr("")},YU=function(t){var e=function(){var e=P.none(),n=u.data,r=t.queryCommandValue("FontSize");if(r)for(var o=function(t){var o=KU(r,t),i=XU(o);e=tt(n,(function(t){return t.format===r||t.format===o||t.format===i}))},i=3;e.isNone()&&i>=0;i--)o(i);return{matchOpt:e,size:r}},n=function(t){return function(e){return e.exists((function(e){return e.format===t}))}},r=function(){var t=e().matchOpt;return t},o=w(P.none),i=function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},a=function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(w(o),(function(t){return t.title}));Su(t,RB,{text:i})},u=NU(t,"fontsize_formats",WU,XP.Space);return{tooltip:"Font sizes",text:P.some("12pt"),icon:P.none(),isSelectedFor:n,getPreviewFor:o,getCurrentValue:r,onAction:i,updateText:a,dataset:u,shouldHide:!1,isInvalid:O}},JU=function(t,e){return _U(t,e,YU(t))},ZU=function(t,e){var n=OU(t,e,YU(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},QU=function(t,e){var n=e(),r=q(n,(function(t){return t.format}));return P.from(t.formatter.closest(r)).bind((function(t){return tt(n,(function(e){return e.format===t}))})).orThunk((function(){return Pt(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))},tW="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",eW=function(t){var e="Paragraph",n=function(e){return function(){return t.formatter.match(e)}},r=function(e){return function(){var n=t.formatter.get(e);return P.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},o=function(n){var r=QU(t,(function(){return i.data})),o=r.fold(w(e),(function(t){return t.title}));Su(n,RB,{text:o})},i=NU(t,"block_formats",tW,XP.SemiColon);return{tooltip:"Blocks",text:P.some(e),icon:P.none(),isSelectedFor:n,getCurrentValue:P.none,getPreviewFor:r,onAction:SU(t),updateText:o,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},nW=function(t,e){return _U(t,e,eW(t))},rW=function(t,e){var n=OU(t,e,eW(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},oW=function(t,e){var n="Paragraph",r=function(e){return function(){return t.formatter.match(e)}},o=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?P.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):P.none()}},i=function(e){var r=function(t){var e=t.items;return void 0!==e&&e.length>0?rt(e,r):[{title:t.title,format:t.format}]},o=rt(ML(t),r),i=QU(t,w(o)),a=i.fold(w(n),(function(t){return t.title}));Su(e,RB,{text:a})};return{tooltip:"Formats",text:P.some(n),icon:P.none(),isSelectedFor:r,getCurrentValue:P.none,getPreviewFor:o,onAction:SU(t),updateText:i,shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}},iW=function(t,e){var n=A({type:"advanced"},e.styleselect);return _U(t,e,oW(t,n))},aW=function(t,e){var n=A({type:"advanced"},e.styleselect),r=OU(t,e,oW(t,n));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})},uW=function(t,e){var n=function(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=t(r,e.get()),i=q(o,n.getSystem().build);Ug(n,i)}))};return Eu([Nu(tu(),(function(e,r){var o=r;if(!o.universal){var i=t.channel;j(o.channels,i)&&n(e,o.data)}})),ju((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])},cW=Object.freeze({__proto__:null,events:uW}),sW=function(t,e,n){return n},lW=Object.freeze({__proto__:null,getState:sW}),fW=[Ai("channel"),Fi("renderComponents"),Fi("updateState"),Fi("initialData")],dW=function(){var t=oa(P.none()),e=function(){return t.set(P.none())},n=function(){return t.get().getOr("none")};return{readState:n,get:t.get,set:t.set,clear:e}},mW=Object.freeze({__proto__:null,init:dW}),gW=hf({fields:fW,name:"reflecting",active:cW,apis:lW,state:mW}),hW=w([Ai("toggleClass"),Ai("fetch"),sl("onExecute"),Ki("getHotspot",P.some),Ki("getAnchorOverrides",w({})),Hd(),sl("onItemExecute"),Fi("lazySink"),Ai("dom"),ul("onOpen"),ep("splitDropdownBehaviours",[bD,Aw,Yw]),Ki("matchWidth",!1),Ki("useMinWidth",!1),Ki("eventOrder",{}),Fi("role")].concat(RD())),pW=Rp({factory:SC,schema:[Ai("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:mf([Yw.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(ku)},buttonBehaviours:mf([hx.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),vW=Rp({factory:SC,schema:[Ai("dom")],name:"button",defaults:function(){return{buttonBehaviours:mf([Yw.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),bW=w([pW,vW,Bp({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ai("text")],name:"aria-descriptor"}),zp({schema:[ol()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),wD()]),yW=function(t,e,n,r){var o,i=function(t){bv.getCurrent(t).each((function(t){rb.highlightFirst(t),Aw.focusIn(t)}))},a=function(e){var n=i;_D(t,x,e,r,n,$A.HighlightFirst).get(p)},u=function(t){return a(t),P.some(!0)},c=function(e){var n=Xp(e,t,"button");return ku(n),P.some(!0)},s=A(A({},Eu([ju((function(e,n){var r=Kp(e,t,"aria-descriptor");r.each((function(t){var n=oc("aria");Fn(t.element,"id",n),Fn(e.element,"aria-describedby",n)}))}))])),vx(P.some(a))),l={repositionMenus:function(t){hx.isOn(t)&&ND(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:l,eventOrder:A(A({},t.eventOrder),(o={},o[eu()]=["disabling","toggling","alloy.base.behaviour"],o)),events:s,behaviours:rp(t.splitDropdownBehaviours,[bD.config({others:{sandbox:function(e){var n=Xp(e,t,"arrow"),r={onOpen:function(){hx.on(n),hx.on(e)},onClose:function(){hx.off(n),hx.off(e)}};return MD(t,e,r)}}}),Aw.config({mode:"special",onSpace:c,onEnter:c,onDown:u}),Yw.config({}),hx.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},wW=mv({name:"SplitDropdown",configFields:hW(),partFields:bW(),factory:yW,apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),xW=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},CW=function(t){return{setActive:function(e){hx.set(t,e)},isActive:function(){return hx.isOn(t)},isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},SW=function(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})},kW=oc("focus-button"),TW=function(t,e,n,r,o,i){var a;return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]),attributes:SW(n,i)},components:yO([t.map((function(t){return _B(t,i.icons)})),e.map((function(t){return AB(t,"tox-tbtn",i)}))]),eventOrder:(a={},a[Ra()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:mf([mO.toolbarButton(i.isDisabled),cO(),Vw("common-button-display-events",[Nu(Ra(),(function(t,e){e.event.prevent(),Cu(t,kW)}))])].concat(r.map((function(n){return gW.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return yO([t.icon.map((function(t){return _B(t,i.icons)})),t.text.map((function(t){return AB(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}},OW=function(t,e,n,r){var o=e.shared;return Aj.sketch({lazySink:o.getSink,fetch:function(){return tD.nu((function(e){e(q(n(t.items),qj))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:TW(t.icon,t.text,t.tooltip,P.none(),P.none(),o.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:r}}}})},_W=function(t,e,n){var r=oa(p),o=TW(t.icon,t.text,t.tooltip,P.none(),P.none(),n);return SC.sketch({dom:o.dom,components:o.components,eventOrder:NB,buttonBehaviours:mf([Vw("toolbar-button-events",[MB({onAction:t.onAction,getApi:e.getApi}),hO(e,r),pO(e,r)]),mO.toolbarButton((function(){return t.disabled||n.isDisabled()})),cO()].concat(e.toolbarButtonBehaviours))})},EW=function(t,e){return AW(t,e,[])},AW=function(t,e,n){return _W(t,{toolbarButtonBehaviours:[].concat(n.length>0?[Vw("toolbarButtonWith",n)]:[]),getApi:xW,onSetup:t.onSetup},e)},DW=function(t,e){return MW(t,e,[])},MW=function(t,e,n){return Co(_W(t,{toolbarButtonBehaviours:[Hw.config({}),hx.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(n.length>0?[Vw("toolbarToggleButtonWith",n)]:[]),getApi:CW,onSetup:t.onSetup},e))},NW=function(t,e,n){return function(r){return tD.nu((function(t){return e.fetch(t)})).map((function(o){return P.from(NE(Co(nE(oc("menu-value"),o,(function(n){e.onItemAction(t(r),n)}),e.columns,e.presets,US.CLOSE_ON_EXECUTE,e.select.getOr(O),n),{movement:oE(e.columns,e.presets),menuBehaviours:Zk.unnamedEvents("auto"!==e.columns?[]:[ju((function(t,n){Xk(t,4,lk(e.presets)).each((function(e){var n=e.numRows,r=e.numColumns;Aw.setGridSize(t,n,r)}))}))])})))}))}},RW=function(t,e){var n,r=oc("channel-update-split-dropdown-display"),o=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)},setIconFill:function(e,n){Ls(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){Fn(t,"fill",n)}))},setIconStroke:function(e,n){Ls(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){Fn(t,"stroke",n)}))},setActive:function(e){Fn(t.element,"aria-pressed",e),Ls(t.element,"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return hx.set(t,e)}))}))},isActive:function(){return Ls(t.element,"span").exists((function(e){return t.getSystem().getByDom(e).exists(hx.isOn)}))}}},i=oa(p),a={getApi:o,onSetup:t.onSetup};return wW.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:A({"aria-pressed":!1},SW(t.tooltip,e.providers))},onExecute:function(e){t.onAction(o(e))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:mf([mO.splitButton(e.providers.isDisabled),cO(),Vw("split-dropdown-events",[Nu(kW,Yw.focus),hO(a,i),pO(a,i)]),VD.config({})]),eventOrder:(n={},n[du()]=["alloy.base.behaviour","split-dropdown-events"],n),toggleClass:"tox-tbtn--enabled",lazySink:e.getSink,fetch:NW(o,t,e.providers),parts:{menu:pk(!1,t.columns,t.presets)},components:[wW.parts.button(TW(t.icon,t.text,P.none(),P.some(r),P.some([hx.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),e.providers)),wW.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:MC("chevron-down",e.providers.icons)},buttonBehaviours:mf([mO.splitButton(e.providers.isDisabled),cO(),zC()])}),wW.parts["aria-descriptor"]({text:e.providers.translate("To open the popup, press Shift+Enter")})]})},zW=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],BW=function(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return Si(t)})).getOrDie();return e(i,r,o)}},PW={button:BW(OS,(function(t,e){return EW(t,e.backstage.shared.providers)})),togglebutton:BW(AS,(function(t,e){return DW(t,e.backstage.shared.providers)})),menubutton:BW(WF,(function(t,e){return GB(t,"tox-tbtn",e.backstage,P.none())})),splitbutton:BW(qF,(function(t,e){return RW(t,e.backstage.shared)})),grouptoolbarbutton:BW(VF,(function(t,e,n){var r,o=n.ui.registry.getAll().buttons,i=function(t){return WW(n,{buttons:o,toolbar:t,allowToolbarGroups:!1},e,P.none())},a=(r={},r[Id]=e.backstage.shared.header.isPositionedAtTop()?Hf.TopToBottom:Hf.BottomToTop,r);switch(RT(n)){case jS.floating:return OW(t,e.backstage,i,a);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:function(t,e){return iW(t,e.backstage)},fontsizeSelectButton:function(t,e){return JU(t,e.backstage)},fontSelectButton:function(t,e){return jU(t,e.backstage)},formatButton:function(t,e){return nW(t,e.backstage)},alignMenuButton:function(t,e){return BU(t,e.backstage)}},IW=function(t,e,n){return Ot(PW,t.type).fold((function(){return console.error("skipping button defined by",t),P.none()}),(function(r){return P.some(r(t,e,n))}))},LW={styleselect:PW.styleSelectButton,fontsizeselect:PW.fontsizeSelectButton,fontselect:PW.fontSelectButton,formatselect:PW.formatButton,align:PW.alignMenuButton},HW=function(t){var e=q(zW,(function(e){var n=Y(e.items,(function(e){return _t(t,e)||_t(LW,e)}));return{name:e.name,items:n}}));return Y(e,(function(t){return t.items.length>0}))},FW=function(t){var e=t.split("|");return q(e,(function(t){return{items:t.trim().split(" ")}}))},VW=function(t){return h(t,(function(t){return _t(t,"name")&&_t(t,"items")}))},jW=function(t){var e=t.toolbar,n=t.buttons;return!1===e?[]:void 0===e||!0===e?HW(n):i(e)?FW(e):VW(e)?e:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},UW=function(t,e,n,r,o,i){return Ot(e,n.toLowerCase()).orThunk((function(){return i.bind((function(t){return gt(t,(function(t){return Ot(e,t+n.toLowerCase())}))}))})).fold((function(){return Ot(LW,n.toLowerCase()).map((function(e){return e(t,o)})).orThunk((function(){return P.none()}))}),(function(e){return"grouptoolbarbutton"!==e.type||r?IW(e,o,t):(console.warn("Ignoring the '"+n+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),P.none())}))},WW=function(t,e,n,r){var o=jW(e),i=q(o,(function(o){var i=rt(o.items,(function(o){return 0===o.trim().length?[]:UW(t,e.buttons,o,e.allowToolbarGroups,n,r).toArray()}));return{title:P.from(t.translate(o.name)),items:i}}));return Y(i,(function(t){return t.items.length>0}))},$W=function(t,e,n,r){var o=e.outerContainer,a=n.toolbar,u=n.buttons;if(h(a,i)){var c=a.map((function(e){var o={toolbar:e,buttons:u,allowToolbarGroups:n.allowToolbarGroups};return WW(t,o,{backstage:r},P.none())}));uU.setToolbars(o,c)}else uU.setToolbar(o,WW(t,n,{backstage:r},P.none()))},qW=en(),GW=qW.os.isiOS()&&qW.os.version.major<=12,KW=function(t,e){var n=t.dom,r=t.getWin(),o=t.getDoc().documentElement,i=oa(lr(r.innerWidth,r.innerHeight)),a=oa(lr(o.offsetWidth,o.offsetHeight)),u=function(){var e=i.get();e.left===r.innerWidth&&e.top===r.innerHeight||(i.set(lr(r.innerWidth,r.innerHeight)),b_(t))},c=function(){var e=t.getDoc().documentElement,n=a.get();n.left===e.offsetWidth&&n.top===e.offsetHeight||(a.set(lr(e.offsetWidth,e.offsetHeight)),b_(t))},s=function(e){return y_(t,e)};n.bind(r,"resize",u),n.bind(r,"scroll",s);var l=ud(ee.fromDom(t.getBody()),"load",c),f=e.uiMothership.element;t.on("hide",(function(){Kn(f,"display","none")})),t.on("show",(function(){nr(f,"display")})),t.on("NodeChange",c),t.on("remove",(function(){l.unbind(),n.unbind(r,"resize",u),n.unbind(r,"scroll",s),r=null}))},XW=function(t,e,n,r,o){var i=oa(0),a=e.outerContainer;yU(t);var u=ee.fromDom(o.targetNode),c=Dn(An(u));Yg(u,e.mothership),Xg(c,e.uiMothership),t.on("PostRender",(function(){$W(t,e,n,r),i.set(t.getWin().innerWidth),uU.setMenubar(a,dU(t,n)),uU.setSidebar(a,n.sidebar),KW(t,e)}));var s=uU.getSocket(a).getOrDie("Could not find expected socket element");if(GW){Xn(s.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var l=UC((function(){t.fire("ScrollContent")}),20),f=ad(s.element,"scroll",l.throttle);t.on("remove",f.unbind)}uO(t,e),t.addCommand("ToggleSidebar",(function(e,n){uU.toggleSidebar(a,n),t.fire("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){return uU.whichSidebar(a)}));var d=RT(t),m=function(){uU.refreshToolbar(e.outerContainer)};d!==jS.sliding&&d!==jS.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var e=t.getWin().innerWidth;e!==i.get()&&(m(),i.set(e))}));var g={enable:function(){aO(e,!1)},disable:function(){aO(e,!0)},isDisabled:function(){return Iv.isDisabled(a)}};return{iframeContainer:s.element.dom,editorContainer:a.element.dom,api:g}},YW=Object.freeze({__proto__:null,render:XW}),JW=function(t){var e=/^[0-9\.]+(|px)$/i;return e.test(""+t)?P.some(parseInt(""+t,10)):P.none()},ZW=function(t){return g(t)?t+"px":t},QW=function(t,e,n){var r=e.filter((function(e){return t<e})),o=n.filter((function(e){return t>e}));return r.or(o).getOr(t)},t$=function(t){var e=vT(t),n=wT(t),r=CT(t);return JW(e).map((function(t){return QW(t,n,r)}))},e$=function(t){var e=t$(t);return e.getOr(vT(t))},n$=function(t){var e=bT(t),n=yT(t),r=xT(t);return JW(e).map((function(t){return QW(t,n,r)}))},r$=function(t){var e=n$(t);return e.getOr(bT(t))},o$=function(t,e,n,r,o){var i=n.uiMothership,a=n.outerContainer,u=dT.DOM,c=jT(t),s=$T(t),l=xT(t).or(n$(t)),f=r.shared.header,d=f.isPositionedAtTop,m=RT(t),g=m===jS.sliding||m===jS.floating,h=oa(!1),p=function(){return h.get()&&!t.removed},v=function(t){return g?t.fold(w(0),(function(t){return t.components().length>1?ar(t.components()[1].element):0})):0},b=function(n){switch(PT(t)){case NT.auto:var r=uU.getToolbar(a),o=v(r),i=ar(n.element)-o,u=Jr(e),c=u.y>i;if(c)return"top";var s=hn(e),l=Math.max(s.dom.scrollHeight,ar(s)),f=u.bottom<l-i;if(f)return"bottom";var d=Qr(),m=d.bottom<u.bottom-i;return m?"bottom":"top";case NT.bottom:return"bottom";case NT.top:default:return"top"}},y=function(t){var e=o.get();CF.setModes(e,[t]),f.setDockingMode(t);var n=d()?Hf.TopToBottom:Hf.BottomToTop;Fn(e.element,Id,n)},x=function(){var t=l.getOrThunk((function(){var t=JW(Jn(In(),"margin-left")).getOr(0);return vr(In())-mr(e).left+t}));Kn(o.get().element,"max-width",t+"px")},C=function(){var t=uU.getToolbar(a),n=v(t),r=Jr(e),i=d()?Math.max(r.y-ar(o.get().element)+n,0):r.bottom;Xn(a.element,{position:"absolute",top:Math.round(i)+"px",left:Math.round(r.x)+"px"})},S=function(){i.broadcastOn([wh()],{})},k=function(t){if(void 0===t&&(t=!1),p()){if(c||x(),g&&uU.refreshToolbar(a),c||C(),s){var e=o.get();t?CF.reset(e):CF.refresh(e)}S()}},T=function(t){if(void 0===t&&(t=!0),!c&&s&&p()){var e=f.getDockingMode(),n=b(o.get());n!==e&&(y(n),t&&k(!0))}},O=function(){h.set(!0),Kn(a.element,"display","flex"),u.addClass(t.getBody(),"mce-edit-focus"),nr(i.element,"display"),T(!1),k()},_=function(){h.set(!1),n.outerContainer&&(Kn(a.element,"display","none"),u.removeClass(t.getBody(),"mce-edit-focus")),Kn(i.element,"display","none")};return{isVisible:p,isPositionedAtTop:d,show:O,hide:_,update:k,updateMode:T,repositionPopups:S}},i$=function(t,e){var n=Jr(t);return{pos:e?n.y:n.bottom,bounds:n}},a$=function(t,e,n,r){var o=oa(i$(e,n.isPositionedAtTop())),i=function(r){var i=i$(e,n.isPositionedAtTop()),a=i.pos,u=i.bounds,c=o.get(),s=c.pos,l=c.bounds,f=u.height!==l.height||u.width!==l.width;o.set({pos:a,bounds:u}),f&&b_(t,r),n.isVisible()&&(s!==a?n.update(!0):f&&(n.updateMode(),n.repositionPopups()))};r||(t.on("activate",n.show),t.on("deactivate",n.hide)),t.on("SkinLoaded ResizeWindow",(function(){return n.update(!0)})),t.on("NodeChange keydown",(function(t){xC.requestAnimationFrame((function(){return i(t)}))})),t.on("ScrollWindow",(function(){return n.updateMode()}));var a=nd();a.set(ud(ee.fromDom(t.getBody()),"load",i)),t.on("remove",(function(){a.clear()}))},u$=function(t,e,n,r,o){var i=e.mothership,a=e.uiMothership,u=e.outerContainer,c=oa(null),s=ee.fromDom(o.targetNode),l=o$(t,s,e,r,c),f=FT(t);wU(t);var d=function(){if(c.get())l.show();else{c.set(uU.getHeader(u).getOrDie());var o=UT(t);Xg(o,i),Xg(o,a),$W(t,e,n,r),uU.setMenubar(u,dU(t,n)),l.show(),a$(t,s,l,f),t.nodeChanged()}},m=function(){return xC.setEditorTimeout(t,d,0)};t.on("show",d),t.on("hide",l.hide),f||(t.on("focus",m),t.on("blur",l.hide)),t.on("init",(function(){(t.hasFocus()||f)&&m()})),uO(t,e);var g={show:function(){l.show()},hide:function(){l.hide()},enable:function(){aO(e,!1)},disable:function(){aO(e,!0)},isDisabled:function(){return Iv.isDisabled(u)}};return{editorContainer:u.element.dom,api:g}},c$=Object.freeze({__proto__:null,render:u$}),s$="contexttoolbar-show",l$="contexttoolbar-hide",f$=function(t){return{hide:function(){return Cu(t,iu())},getValue:function(){return tp.getValue(t)}}},d$=function(t,e){return Nu(DB,(function(n,r){var o=t.get(n),i=f$(o);e.onAction(i,r.event.buttonApi)}))},m$=function(t,e,n){var r=e.original;r.primary;var o=D(r,["primary"]),i=xi(OS(A(A({},o),{type:"button",onAction:p})));return AW(i,n.backstage.shared.providers,[d$(t,e)])},g$=function(t,e,n){var r=e.original;r.primary;var o=D(r,["primary"]),i=xi(AS(A(A({},o),{type:"togglebutton",onAction:p})));return MW(i,n.backstage.shared.providers,[d$(t,e)])},h$=function(t,e,n){var r={backstage:{shared:{providers:n}}};return"contextformtogglebutton"===e.type?g$(t,e,r):m$(t,e,r)},p$=function(t,e,n){var r=q(e,(function(e){return kC(h$(t,e,n))})),o=function(){return q(r,(function(t){return t.asSpec()}))},i=function(t){return gt(e,(function(e,n){return e.primary?P.from(r[n]).bind((function(e){return e.getOpt(t)})).filter(k(Iv.isDisabled)):P.none()}))};return{asSpecs:o,findPrimary:i}},v$=function(t,e){var n=t.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),r=kC(jA.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:n,selectOnFocus:!0,inputBehaviours:mf([Aw.config({mode:"special",onEnter:function(t){return o.findPrimary(t).map((function(t){return ku(t),!0}))},onLeft:function(t,e){return e.cut(),P.none()},onRight:function(t,e){return e.cut(),P.none()}})])})),o=p$(r,t.commands,e);return[{title:P.none(),items:[r.asSpec()]},{title:P.none(),items:o.asSpecs()}]},b$=function(t,e,n){return Jj({type:t,uid:oc("context-toolbar"),initGroups:v$(e,n),onEscape:P.none,cyclicKeying:!0,providers:n})},y$={renderContextForm:b$,buildInitGroups:v$},w$=function(t,e,n){return void 0===n&&(n=.01),e.bottom-t.y>=n&&t.bottom-e.y>=n},x$=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=Tn(ee.fromDom(t.startContainer),t.startOffset).element,r=fe(n)?vn(n):P.some(n);return r.filter(le).map((function(t){return t.dom.getBoundingClientRect()})).getOr(e)}return e},C$=function(t){var e=t.selection.getRng(),n=x$(e);if(t.inline){var r=Ir();return Yr(r.left+n.left,r.top+n.top,n.width,n.height)}var o=Zr(ee.fromDom(t.getBody()));return Yr(o.x+n.left,o.y+n.top,n.width,n.height)},S$=function(t,e){return e.filter(Pn).map(Zr).getOrThunk((function(){return C$(t)}))},k$=function(t,e,n){var r=Math.max(t.x+n,e.x),o=Math.min(t.right-n,e.right);return{x:r,width:o-r}},T$=function(t,e,n,r,o,i){var a=ee.fromDom(t.getContainer()),u=Ls(a,".tox-editor-header").getOr(a),c=Jr(u),s=c.y>=e.bottom,l=r&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===o?Jr(a):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}},O$=function(t,e,n,r){void 0===r&&(r=0);var o=Vr(window),i=Jr(ee.fromDom(t.getContentAreaContainer())),a=ET(t)||AT(t)||MT(t),u=k$(i,o,r),c=u.x,s=u.width;if(t.inline&&!a)return Yr(c,o.y,s,o.height);var l=e.header.isPositionedAtTop(),f=T$(t,i,o,l,n,r),d=f.y,m=f.bottom;return Yr(c,d,s,m-d)},_$=12,E$={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},A$={maxHeightFunction:_d(),maxWidthFunction:xj()},D$=function(t,e){var n=t.selection.getRng(),r=Tn(ee.fromDom(n.startContainer),n.startOffset);return n.startContainer===n.endContainer&&n.startOffset===n.endOffset-1&&sn(r.element,e)},M$=function(t,e,n){var r=Qn(t,"position");Kn(t,"position",e);var o=n(t);return r.each((function(e){return Kn(t,"position",e)})),o},N$=function(t){return"node"===t},R$=function(t,e,n,r,o){var i=C$(t),a=r.lastElement().exists((function(t){return sn(n,t)}));if(D$(t,n))return a?bC:mC;if(a)return M$(e,r.getMode(),(function(){var t=w$(i,Jr(e));return t&&!r.isReposition()?wC:bC}));var u="fixed"===r.getMode()?o.y+Ir().top:o.y,c=ar(e)+_$;return u+c<=i.y?mC:gC},z$=function(t,e,n,r){var o=function(e){return function(r,o,i,a,u){var c=R$(t,a,e,n,u),s=A(A({},r),{y:u.y,height:u.height});return A(A({},c(s,o,i,a,u)),{alwaysFit:!0})}},i=function(t){return N$(r)?[o(t)]:[]},a={onLtr:function(t){return[$l,ql,Ul,Vl,Wl,jl].concat(i(t))},onRtl:function(t){return[$l,ql,Wl,jl,Ul,Vl].concat(i(t))}},u={onLtr:function(t){return[ql,Vl,jl,Ul,Wl,$l].concat(i(t))},onRtl:function(t){return[ql,jl,Vl,Wl,Ul,$l].concat(i(t))}};return e?u:a},B$=function(t,e,n,r){return"line"===e?{bubble:Nd(_$,0,E$),layouts:{onLtr:function(){return[Gl]},onRtl:function(){return[Kl]}},overrides:A$}:{bubble:Nd(0,_$,E$,1/_$),layouts:z$(t,n,r,e),overrides:A$}},P$=function(t,e){var n=Y(e,(function(e){return e.predicate(t.dom)})),r=X(n,(function(t){return"contexttoolbar"===t.type})),o=r.pass,i=r.fail;return{contextToolbars:o,contextForms:i}},I$=function(t){if(t.length<=1)return t;var e=function(e){return U(t,(function(t){return t.position===e}))},n=function(e){return Y(t,(function(t){return t.position===e}))},r=e("selection"),o=e("node");if(r||o){if(o&&r){var i=n("node"),a=q(n("selection"),(function(t){return A(A({},t),{position:"node"})}));return i.concat(a)}return n(r?"selection":"node")}return n("line")},L$=function(t){if(t.length<=1)return t;var e=function(e){return tt(t,(function(t){return t.position===e}))},n=e("selection").orThunk((function(){return e("node")})).orThunk((function(){return e("line")})).map((function(t){return t.position}));return n.fold((function(){return[]}),(function(e){return Y(t,(function(t){return t.position===e}))}))},H$=function(t,e,n){var r=P$(t,e);if(r.contextForms.length>0)return P.some({elem:t,toolbars:[r.contextForms[0]]});var o=P$(t,n);if(o.contextForms.length>0)return P.some({elem:t,toolbars:[o.contextForms[0]]});if(r.contextToolbars.length>0||o.contextToolbars.length>0){var i=I$(r.contextToolbars.concat(o.contextToolbars));return P.some({elem:t,toolbars:i})}return P.none()},F$=function(t,e,n){return t(e)?P.none():ya(e,(function(t){if(le(t)){var e=P$(t,n.inNodeScope),r=e.contextToolbars,o=e.contextForms,i=o.length>0?o:L$(r);return i.length>0?P.some({elem:t,toolbars:i}):P.none()}return P.none()}),t)},V$=function(t,e){var n=ee.fromDom(e.getBody()),r=function(t){return sn(t,n)},o=function(t){return!r(t)&&!dn(n,t)},i=ee.fromDom(e.selection.getNode());return o(i)?P.none():H$(i,t.inNodeScope,t.inEditorScope).orThunk((function(){return F$(r,i,t)}))},j$=function(t,e){var n={},r=[],o=[],i={},a={},u=function(t,u){var c=xi(IS(u));n[t]=c,c.launch.map((function(n){i["form:"+t]=A(A({},u.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){e(c)}})})),"editor"===c.scope?o.push(c):r.push(c),a[t]=c},c=function(t,e){HS(e).each((function(n){"editor"===e.scope?o.push(n):r.push(n),a[t]=n}))},s=ht(t);return G(s,(function(e){var n=t[e];"contextform"===n.type?u(e,n):"contexttoolbar"===n.type&&c(e,n)})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}},U$=oc("forward-slide"),W$=oc("backward-slide"),$$=oc("change-slide-event"),q$="tox-pop--resizing",G$=function(t){var e=oa([]);return eC.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){e.set([]),eC.getContent(t).each((function(t){nr(t.element,"visibility")})),us(t.element,q$),nr(t.element,"width")},inlineBehaviours:mf([Vw("context-toolbar-events",[Vu(qa(),(function(t,e){"width"===e.event.raw.propertyName&&(us(t.element,q$),nr(t.element,"width"))})),Nu($$,(function(t,e){var n=t.element;nr(n,"width");var r=vr(n);eC.setContent(t,e.event.contents),is(n,q$);var o=vr(n);Kn(n,"width",r+"px"),eC.getContent(t).each((function(t){e.event.focus.bind((function(t){return Sf(t),_f(n)})).orThunk((function(){return Aw.focusIn(t),Of(An(n))}))})),xC.setTimeout((function(){Kn(t.element,"width",o+"px")}),0)})),Nu(U$,(function(t,n){eC.getContent(t).each((function(n){e.set(e.get().concat([{bar:n,focus:Of(An(t.element))}]))})),Su(t,$$,{contents:n.event.forwardContents,focus:P.none()})})),Nu(W$,(function(t,n){dt(e.get()).each((function(n){e.set(e.get().slice(0,e.get().length-1)),Su(t,$$,{contents:Es(n.bar),focus:n.focus})}))}))]),Aw.config({mode:"special",onEscape:function(n){return dt(e.get()).fold((function(){return t.onEscape()}),(function(t){return Cu(n,W$),P.some(!0)}))}})]),lazySink:function(){return ro.value(t.sink)}})},K$="tox-pop--transition",X$=function(t,e,n,r){var o=r.backstage,i=o.shared,a=en().deviceType.isTouch,u=od(),c=od(),s=od(),l=_s(G$({sink:n,onEscape:function(){return t.focus(),P.some(!0)}})),f=function(){var e=s.get().getOr("node"),n=N$(e)?1:0;return O$(t,i,e,n)},d=function(){return!t.removed&&!(a()&&o.isContextMenuOpen())},m=function(t){return At(Rt(t,u.get(),sn),!0)},g=function(){if(d()){var e=f(),n=At(s.get(),"node")?S$(t,u.get()):C$(t);return e.height<=0||!w$(n,e)}return!0},h=function(){u.clear(),c.clear(),s.clear(),eC.hide(l)},v=function(){if(eC.isOpen(l)){var t=l.element;nr(t,"display"),g()?Kn(t,"display","none"):(c.set(0),eC.reposition(l))}},b=function(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:mf([Aw.config({mode:"acyclic"}),Vw("pop-dialog-wrap-events",[ju((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Aw.focusIn(e)}))})),Uu((function(e){t.shortcuts.remove("ctrl+F9")}))])])}},y=ge((function(){return j$(e,(function(t){var e=C([t]);Su(l,U$,{forwardContents:b(e)})}))})),w=function(e,n){return WW(t,{buttons:e,toolbar:n.items,allowToolbarGroups:!1},r,P.some(["form:"]))},x=function(t,e){return y$.buildInitGroups(t,e)},C=function(e){var n=t.ui.registry.getAll().buttons,r=y(),o=A(A({},n),r.formNavigators),a=RT(t)===jS.scrolling?jS.scrolling:jS.default,u=nt(q(e,(function(t){return"contexttoolbar"===t.type?w(o,t):x(t,i.providers)})));return Jj({type:a,uid:oc("context-toolbar"),initGroups:u,onEscape:P.none,cyclicKeying:!0,providers:i.providers})},S=function(e,r){var o="node"===e?i.anchors.node(r):i.anchors.cursor(),s=B$(t,e,a(),{lastElement:u.get,isReposition:function(){return At(c.get(),0)},getMode:function(){return Lg.getMode(n)}});return Co(o,s)},k=function(t,e){if(T.cancel(),d()){var r=C(t),o=t[0].position,i=S(o,e);s.set(o),c.set(1);var a=l.element;nr(a,"display"),m(e)||(us(a,K$),Lg.reset(n,l)),eC.showWithinBounds(l,b(r),{anchor:i,transition:{classes:[K$],mode:"placement"}},(function(){return P.some(f())})),e.fold(u.clear,u.set),g()&&Kn(a,"display","none")}},T=WC((function(){if(t.hasFocus()&&!t.removed)if(cs(l.element,K$))T.throttle();else{var e=y();V$(e,t).fold(h,(function(t){k(t.toolbars,P.some(t.elem))}))}}),17);t.on("init",(function(){t.on("remove",h),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",v),t.on("click keyup focus SetContent",T.throttle),t.on(l$,h),t.on(s$,(function(e){var n=y();Ot(n.lookupTable,e.toolbarKey).each((function(n){k([n],Pt(e.target!==t,e.target)),eC.getContent(l).each(Aw.focusIn)}))})),t.on("focusout",(function(e){xC.setEditorTimeout(t,(function(){_f(n.element).isNone()&&_f(l.element).isNone()&&h()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&h()})),t.on("AfterProgressState",(function(e){e.state?h():t.hasFocus()&&T.throttle()})),t.on("NodeChange",(function(t){_f(l.element).fold(T.throttle,p)}))}))},Y$=function(t){var e=[{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}];G(e,(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kU(t,e.cmd),onSetup:xU(t,e.name)})})),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:kU(t,"JustifyNone")})},J$={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Z$=function(){var t="[0-9]+",e="[+-]?"+t,n="[eE]"+e,r="\\.",o=function(t){return"(?:"+t+")?"},i=["Infinity",t+r+o(t)+o(n),r+t+o(n),t+o(n)].join("|"),a="[+-]?(?:"+i+")";return new RegExp("^("+a+")(.*)$")}(),Q$=function(t,e){return U(e,(function(e){return U(J$[e],(function(e){return t===e}))}))},tq=function(t,e){var n=P.from(Z$.exec(t));return n.bind((function(t){var n=Number(t[1]),r=t[2];return Q$(r,e)?P.some({value:n,unit:r}):P.none()}))},eq=function(t,e){return tq(t,e).map((function(t){var e=t.value,n=t.unit;return e+n}))},nq=function(t,e){var n=function(){var n=e.getOptions(t),r=e.getCurrent(t).map(e.hash),o=od();return q(n,(function(n){return{type:"togglemenuitem",text:e.display(n),onSetup:function(i){var a=function(t){t&&(o.on((function(t){return t.setActive(!1)})),o.set(i)),i.setActive(t)};a(At(r,e.hash(n)));var u=e.watcher(t,n,a);return function(){o.clear(),u()}},onAction:function(){return e.setCurrent(t,n)}}}))};t.ui.registry.addMenuButton(e.name,{tooltip:e.text,icon:e.icon,fetch:function(t){return t(n())},onSetup:e.onToolbarSetup}),t.ui.registry.addNestedMenuItem(e.name,{type:"nestedmenuitem",text:e.text,getSubmenuItems:n,onSetup:e.onMenuSetup})},rq={name:"lineheight",text:"Line height",icon:"line-height",getOptions:TT,hash:function(t){return eq(t,["fixed","relative","empty"]).getOr(t)},display:x,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return P.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},oq=function(t){var e=P.from(OT(t));return e.map((function(e){return{name:"language",text:"Language",icon:"language",getOptions:w(e),hash:function(t){return l(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,e,n){return t.formatter.formatChanged("lang",n,!1,{value:e.code,customValue:e.customCode}).unbind},getCurrent:function(t){var e=ee.fromDom(t.selection.getNode());return wa(e,(function(t){return P.some(t).filter(le).bind((function(t){var e=Un(t,"lang");return e.map((function(e){var n=Un(t,"data-mce-lang").getOrUndefined();return{code:e,customCode:n,title:""}}))}))}))},setCurrent:function(t,e){return t.execCommand("Lang",!1,e)},onToolbarSetup:function(e){var n=nd();return e.setActive(t.formatter.match("lang",{},void 0,!0)),n.set(t.formatter.formatChanged("lang",e.setActive,!0)),n.clear}}}))},iq=function(t){nq(t,rq),oq(t).each((function(e){return nq(t,e)}))},aq=function(t,e){PU(t,e),UU(t,e),aW(t,e),rW(t,e),ZU(t,e)},uq=function(t){return CU(t,"NodeChange",(function(e){e.setDisabled(!t.queryCommandState("outdent"))}))},cq=function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:uq(t),onAction:kU(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:kU(t,"indent")})},sq=function(t){cq(t)},lq=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},fq=function(t){ZR.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:xU(t,e.name),onAction:lq(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:xU(t,n),onAction:lq(t,n)})}},dq=function(t){ZR.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(e){t.ui.registry.addButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kU(t,e.action)})}))},mq=function(t){ZR.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kU(t,e.action),onSetup:xU(t,e.name)})}))},gq=function(t){fq(t),dq(t),mq(t)},hq=function(t){ZR.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(e){t.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:kU(t,e.action)})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:lq(t,"code")})},pq=function(t){gq(t),hq(t)},vq=function(t,e){return CU(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(n){n.setDisabled(t.mode.isReadOnly()||!t.undoManager[e]())}))},bq=function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:vq(t,"hasUndo"),onAction:kU(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:vq(t,"hasRedo"),onAction:kU(t,"redo")})},yq=function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:vq(t,"hasUndo"),onAction:kU(t,"undo")}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:vq(t,"hasRedo"),onAction:kU(t,"redo")})},wq=function(t){bq(t),yq(t)},xq=function(t){return CU(t,"VisualAid",(function(e){e.setActive(t.hasVisual)}))},Cq=function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:xq(t),onAction:kU(t,"mceToggleVisualAid")})},Sq=function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:kU(t,"mceToggleVisualAid")})},kq=function(t){Sq(t),Cq(t)},Tq=function(t,e){Y$(t),pq(t),aq(t,e),wq(t),eE(t),kq(t),sq(t),iq(t)},Oq=function(t,e){return{type:"makeshift",x:t,y:e}},_q=function(t,e,n){return Oq(t.x+e,t.y+n)},Eq=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},Aq=function(t){if(Eq(t)){var e=t.touches[0];return Oq(e.pageX,e.pageY)}return Oq(t.pageX,t.pageY)},Dq=function(t){if(Eq(t)){var e=t.touches[0];return Oq(e.clientX,e.clientY)}return Oq(t.clientX,t.clientY)},Mq=function(t,e){var n=dT.DOM.getPos(t);return _q(e,n.x,n.y)},Nq=function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?Aq(e):Mq(t.getContentAreaContainer(),Dq(e)):Rq(t)},Rq=function(t){return{type:"selection",root:ee.fromDom(t.selection.getNode())}},zq=function(t){return{type:"node",node:P.some(ee.fromDom(t.selection.getNode())),root:ee.fromDom(t.getBody())}},Bq=function(t,e,n){switch(n){case"node":return zq(t);case"point":return Nq(t,e);case"selection":return Rq(t)}},Pq=function(t,e,n,r,o,i){var a=n(),u=Bq(t,e,i);$B(a,US.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),eC.showMenuAt(o,{anchor:u},{menu:{markers:mk("normal")},data:t})}))},Iq={onLtr:function(){return[ql,Vl,jl,Ul,Wl,$l,mC,gC,dC,lC,fC,sC]},onRtl:function(){return[ql,jl,Vl,Wl,Ul,$l,mC,gC,fC,sC,dC,lC]}},Lq=12,Hq={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},Fq=function(t,e){var n=t.selection;if(n.isCollapsed()||e.touches.length<1)return!1;var r=e.touches[0],o=n.getRng(),i=ng(t.getWin(),km.domRange(o));return i.exists((function(t){return t.left<=r.clientX&&t.right>=r.clientX&&t.top<=r.clientY&&t.bottom>=r.clientY}))},Vq=function(t){var e=t.selection.getRng(),n=function(){xC.setEditorTimeout(t,(function(){t.selection.setRng(e)}),10),i()};t.once("touchend",n);var r=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",r,!0);var o=function(){return i()};t.once("longpresscancel",o);var i=function(){t.off("touchend",n),t.off("longpresscancel",o),t.off("mousedown",r)}},jq=function(t,e,n){var r=Bq(t,e,n),o="point"===n?Lq:0;return A({bubble:Nd(0,o,Hq),layouts:Iq,overrides:{maxWidthFunction:xj(),maxHeightFunction:_d()}},r)},Uq=function(t,e,n,r,o,i,a){var u=jq(t,e,i);$B(n,US.CLOSE_ON_EXECUTE,r,!0).map((function(n){e.preventDefault(),eC.showMenuWithinBounds(o,{anchor:u},{menu:{markers:mk("normal"),highlightImmediately:a},data:n,type:"horizontal"},(function(){return P.some(O$(t,r.shared,"node"===i?"node":"selection"))})),t.fire(l$)}))},Wq=function(t,e,n,r,o,i){var a=en(),u=a.os.isiOS(),c=a.os.isOSX(),s=a.os.isAndroid(),l=a.deviceType.isTouch(),f=function(){return!(s||u||c&&l)},d=function(){var a=n();Uq(t,e,a,r,o,i,f())};if((c||u)&&"node"!==i){var m=function(){Vq(t),d()};Fq(t,e)?m():(t.once("selectionchange",m),t.once("touchend",(function(){return t.off("selectionchange",m)})))}else d()},$q=function(t){return"string"===typeof t?t.split(/[ ,]/):t},qq=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},Gq=function(t,e,n){var r=t.ui.registry.getAll().contextMenus;return P.from(t.getParam(e)).map($q).getOrThunk((function(){return Y($q(n),(function(t){return _t(r,t)}))}))},Kq=function(t){return!1===t.getParam("contextmenu")},Xq=function(t){return Gq(t,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},Yq=function(t){return t.getParam("contextmenu_avoid_overlap","","string")},Jq=function(t){return i(t)?"|"===t:"separator"===t.type},Zq={type:"separator"},Qq=function(t){var e=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(i(t))return t;switch(t.type){case"separator":return Zq;case"submenu":return A(A({type:"nestedmenuitem"},e(t)),{getSubmenuItems:function(){var e=t.getSubmenuItems();return i(e)?e:q(e,Qq)}});default:return A(A({type:"menuitem"},e(t)),{onAction:v(t.onAction)})}},tG=function(t,e){if(0===e.length)return t;var n=dt(t).filter((function(t){return!Jq(t)})),r=n.fold((function(){return[]}),(function(t){return[Zq]}));return t.concat(r).concat(e).concat([Zq])},eG=function(t,e,n){var r=Z(e,(function(e,r){return Ot(t,r.toLowerCase()).map((function(t){var r=t.update(n);if(i(r))return tG(e,r.split(" "));if(r.length>0){var o=q(r,Qq);return tG(e,o)}return e})).getOrThunk((function(){return e.concat([r])}))}),[]);return r.length>0&&Jq(r[r.length-1])&&r.pop(),r},nG=function(t,e){return e.ctrlKey&&!qq(t)},rG=function(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)},oG=function(t,e){return rG(t,e)?t.selection.getStart(!0):e.target},iG=function(t,e){var n=Yq(t),r=rG(t,e)?"selection":"point";if(Gt(n)){var o=oG(t,e),i=PE(ee.fromDom(o),n);return i?"node":r}return r},aG=function(t,e,n){var r=en(),o=r.deviceType.isTouch,i=_s(eC.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:mf([Vw("dismissContextMenu",[Nu(gu(),(function(e,n){bh.close(e),t.focus()}))])])})),a=function(t){return eC.hide(i)},u=function(e){if(qq(t)&&e.preventDefault(),!nG(t,e)&&!Kq(t)){var r=iG(t,e),a=function(){var n=oG(t,e),r=t.ui.registry.getAll(),o=Xq(t);return eG(r.contextMenus,o,n)},u=o()?Wq:Pq;u(t,e,a,n,i,r)}};t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(o()?"":" ResizeWindow");t.on(e,a),t.on("longpress contextmenu",u)}))},uG=aa.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),cG=function(t){return function(e){return e.translate(-t.left,-t.top)}},sG=function(t){return function(e){return e.translate(t.left,t.top)}},lG=function(t){return function(e,n){return Z(t,(function(t,e){return e(t)}),lr(e,n))}},fG=function(t,e,n){return t.fold(lG([sG(n),cG(e)]),lG([cG(e)]),lG([]))},dG=function(t,e,n){return t.fold(lG([sG(n)]),lG([]),lG([sG(e)]))},mG=function(t,e,n){return t.fold(lG([]),lG([cG(n)]),lG([sG(e),cG(n)]))},gG=function(t,e,n,r,o,i){var a=dG(t,o,i),u=dG(e,o,i);return Math.abs(a.left-u.left)<=n&&Math.abs(a.top-u.top)<=r},hG=function(t,e,n,r,o,i){var a=dG(t,o,i),u=dG(e,o,i),c=Math.abs(a.left-u.left),s=Math.abs(a.top-u.top);return lr(c,s)},pG=function(t,e,n){var r=t.fold((function(t,e){return{position:P.some("absolute"),left:P.some(t+"px"),top:P.some(e+"px")}}),(function(t,e){return{position:P.some("absolute"),left:P.some(t-n.left+"px"),top:P.some(e-n.top+"px")}}),(function(t,e){return{position:P.some("fixed"),left:P.some(t+"px"),top:P.some(e+"px")}}));return A({right:P.none(),bottom:P.none()},r)},vG=function(t,e,n){return t.fold((function(t,r){return yG(t+e,r+n)}),(function(t,r){return wG(t+e,r+n)}),(function(t,r){return xG(t+e,r+n)}))},bG=function(t,e,n,r){var o=function(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left),a.getOr(u.top))}};return t.fold(o(mG,yG),o(dG,wG),o(fG,xG))},yG=uG.offset,wG=uG.absolute,xG=uG.fixed,CG=function(t,e){var n=jn(t,e);return l(n)?NaN:parseInt(n,10)},SG=function(t,e){var n=t.element,r=CG(n,e.leftAttr),o=CG(n,e.topAttr);return isNaN(r)||isNaN(o)?P.none():P.some(lr(r,o))},kG=function(t,e,n){var r=t.element;Fn(r,e.leftAttr,n.left+"px"),Fn(r,e.topAttr,n.top+"px")},TG=function(t,e){var n=t.element;$n(n,e.leftAttr),$n(n,e.topAttr)},OG=function(t,e,n,r){return SG(t,e).fold((function(){return n}),(function(t){return xG(t.left+r.left,t.top+r.top)}))},_G=function(t,e,n,r,o,i){var a=OG(t,e,n,r),u=e.mustSnap?DG(t,e,a,o,i):MG(t,e,a,o,i),c=fG(a,o,i);return kG(t,e,c),u.fold((function(){return{coord:xG(c.left,c.top),extra:P.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))},EG=function(t,e){TG(t,e)},AG=function(t,e,n,r){return gt(t,(function(t){var o=t.sensor,i=gG(e,o,t.range.left,t.range.top,n,r);return i?P.some({output:bG(t.output,e,n,r),extra:t.extra}):P.none()}))},DG=function(t,e,n,r,o){var i=e.getSnapPoints(t),a=AG(i,n,r,o);return a.orThunk((function(){var t=Z(i,(function(t,e){var i=e.sensor,a=hG(n,i,e.range.left,e.range.top,r,o);return t.deltas.fold((function(){return{deltas:P.some(a),snap:P.some(e)}}),(function(n){var r=(a.left+a.top)/2,o=(n.left+n.top)/2;return r<=o?{deltas:P.some(a),snap:P.some(e)}:t}))}),{deltas:P.none(),snap:P.none()});return t.snap.map((function(t){return{output:bG(t.output,n,r,o),extra:t.extra}}))}))},MG=function(t,e,n,r,o){var i=e.getSnapPoints(t);return AG(i,n,r,o)},NG=function(t,e,n){return{coord:bG(t.output,t.output,e,n),extra:t.extra}},RG=function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=mn(t.element),a=Ir(i),u=$H(o),c=NG(r,a,u),s=pG(c.coord,a,u);Yn(o,s)}},zG=Object.freeze({__proto__:null,snapTo:RG}),BG="data-initial-z-index",PG=function(t){vn(t.element).filter(le).each((function(t){Un(t,BG).fold((function(){return nr(t,"z-index")}),(function(e){return Kn(t,"z-index",e)})),$n(t,BG)}))},IG=function(t){vn(t.element).filter(le).each((function(e){Qn(e,"z-index").each((function(t){Fn(e,BG,t)})),Kn(e,"z-index",Jn(t.element,"z-index"))}))},LG=function(t,e){t.getSystem().addToGui(e),IG(e)},HG=function(t){PG(t),t.getSystem().removeFromGui(t)},FG=function(t,e,n){return t.getSystem().build(sA.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))},VG=qi("snaps",[Ai("getSnapPoints"),ul("onSensor"),Ai("leftAttr"),Ai("topAttr"),Ki("lazyViewport",Qr),Ki("mustSnap",!1)]),jG=[Ki("useFixed",O),Ai("blockerClass"),Ki("getTarget",x),Ki("onDrag",p),Ki("repositionTarget",!0),Ki("onDrop",p),ta("getBounds",Qr),VG],UG=function(t){return zt(Qn(t,"left"),Qn(t,"top"),Qn(t,"position"),(function(t,e,n){var r="fixed"===n?xG:yG;return r(parseInt(t,10),parseInt(e,10))})).getOrThunk((function(){var e=mr(t);return wG(e.left,e.top)}))},WG=function(t,e,n,r,o){var i=o.bounds,a=dG(e,n,r),u=El(a.left,i.x,i.x+i.width-o.width),c=El(a.top,i.y,i.y+i.height-o.height),s=wG(u,c);return e.fold((function(){var t=mG(s,n,r);return yG(t.left,t.top)}),w(s),(function(){var t=fG(s,n,r);return xG(t.left,t.top)}))},$G=function(t,e,n,r,o,i,a){var u=e.fold((function(){var t=vG(n,i.left,i.top),e=fG(t,r,o);return xG(e.left,e.top)}),(function(e){var a=_G(t,e,n,i,r,o);return a.extra.each((function(n){e.onSensor(t,n)})),a.coord}));return WG(t,u,r,o,a)},qG=function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=mn(t.element),a=Ir(i),u=$H(o),c=UG(o),s=$G(t,e.snaps,c,a,u,r,n),l=pG(s,a,u);Yn(o,l)}e.onDrag(t,o,r)},GG=function(t,e){return{bounds:t.getBounds(),height:ur(e.element),width:br(e.element)}},KG=function(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return GG(e,t)}));i.each((function(n){qG(t,e,a,n)}))},XG=function(t,e,n,r){e.each(HG),n.snaps.each((function(e){EG(t,e)}));var o=n.getTarget(t.element);r.reset(),n.onDrop(t,o)},YG=function(t){return function(e,n){var r=function(t){n.setStartData(GG(e,t))};return Eu(M([Nu(lu(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r),!0))}},JG=function(t){return Eu([Nu(Ra(),t.forceDrop),Nu(Pa(),t.drop),Nu(za(),(function(e,n){t.move(n.event)})),Nu(Ba(),t.delayDrop)])},ZG=function(t){return P.from(lr(t.x,t.y))},QG=function(t,e){return lr(e.left-t.left,e.top-t.top)},tK=Object.freeze({__proto__:null,getData:ZG,getDelta:QG}),eK=function(t,e,n){return[Nu(Ra(),(function(r,o){var i=o.event.raw;if(0===i.button){o.stop();var a=function(){return XG(r,P.some(s),t,e)},u=IE(a,200),c={drop:a,delayDrop:u.schedule,forceDrop:a,move:function(n){u.cancel(),KG(r,t,e,tK,n)}},s=FG(r,t.blockerClass,JG(c)),l=function(){n(r),LG(r,s)};l()}}))]},nK=M(M([],jG,!0),[fl("dragger",{handlers:YG(eK)})],!1),rK=function(t){return Eu([Nu(Aa(),t.forceDrop),Nu(Ma(),t.drop),Nu(Na(),t.drop),Nu(Da(),(function(e,n){t.move(n.event)}))])},oK=function(t){var e=t[0];return P.some(lr(e.clientX,e.clientY))},iK=function(t){var e=t.raw,n=e.touches;return 1===n.length?oK(n):P.none()},aK=function(t,e){return lr(e.left-t.left,e.top-t.top)},uK=Object.freeze({__proto__:null,getData:iK,getDelta:aK}),cK=function(t,e,n){var r=od(),o=function(n){XG(n,r.get(),t,e),r.clear()};return[Nu(Aa(),(function(i,a){a.stop();var u=function(){return o(i)},c={drop:u,delayDrop:p,forceDrop:u,move:function(n){KG(i,t,e,uK,n)}},s=FG(i,t.blockerClass,rK(c));r.set(s);var l=function(){n(i),LG(i,s)};l()})),Nu(Da(),(function(n,r){r.stop(),KG(n,t,e,uK,r.event)})),Nu(Ma(),(function(t,e){e.stop(),o(t)})),Nu(Na(),o)]},sK=M(M([],jG,!0),[fl("dragger",{handlers:YG(cK)})],!1),lK=function(t,e,n){return M(M([],eK(t,e,n),!0),cK(t,e,n),!0)},fK=M(M([],jG,!0),[fl("dragger",{handlers:YG(lK)})],!1),dK=nK,mK=sK,gK=fK,hK=Object.freeze({__proto__:null,mouse:dK,touch:mK,mouseOrTouch:gK}),pK=function(){var t=P.none(),e=P.none(),n=function(){t=P.none(),e=P.none()},r=function(e,n){var r=t.map((function(t){return e.getDelta(t,n)}));return t=P.some(n),r},o=function(t,e){return t.getData(e).bind((function(e){return r(t,e)}))},i=function(t){e=P.some(t)},a=function(){return e},u=w({});return Tc({readState:u,reset:n,update:o,getStartData:a,setStartData:i})},vK=Object.freeze({__proto__:null,init:pK}),bK=vf({branchKey:"mode",branches:hK,name:"dragging",active:{events:function(t,e){var n=t.dragger;return n.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:P.from(t.extra)}}},state:vK,apis:zG}),yK=40,wK=yK/2,xK=function(t,e,n,r,o,i){return t.fold((function(){return bK.snap({sensor:wG(n-wK,r-wK),range:lr(o,i),output:wG(P.some(n),P.some(r)),extra:{td:e}})}),(function(t){var o=n-wK,i=r-wK,a=yK,u=yK,c=t.element.dom.getBoundingClientRect();return bK.snap({sensor:wG(o,i),range:lr(a,u),output:wG(P.some(n-c.width/2),P.some(r-c.height/2)),extra:{td:e}})}))},CK=function(t,e,n){var r=function(t,e){return t.exists((function(t){return sn(t,e)}))};return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,o){var i=o.td;r(e.get(),i)||(e.set(i),n(i))},mustSnap:!0}},SK=function(t){return kC(SC.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:mf([bK.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),VD.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},kK=function(t,e){var n=oa([]),r=oa([]),o=oa(!1),i=od(),a=od(),u=function(t){var n=Zr(t);return xK(m.getOpt(e),t,n.x,n.y,n.width,n.height)},c=function(){return q(n.get(),(function(t){return u(t)}))},s=function(t){var n=Zr(t);return xK(g.getOpt(e),t,n.right,n.bottom,n.width,n.height)},l=function(){return q(r.get(),(function(t){return s(t)}))},f=CK(c,i,(function(e){a.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),d=CK(l,a,(function(e){i.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),m=SK(f),g=SK(d),h=_s(m.asSpec()),p=_s(g.asSpec()),v=function(e,n,r,o){var i=n.dom.getBoundingClientRect();nr(e.element,"display");var a=pn(ee.fromDom(t.getBody())).dom.innerHeight,u=r(i),c=o(i,a);(u||c)&&Kn(e.element,"display","none")},b=function(t,e,n,r){var o=n(e);bK.snapTo(t,o);var i=function(t){return t[r]<0},a=function(t,e){return t[r]>e};v(t,e,i,a)},y=function(t){return b(h,t,u,"top")},w=function(){return i.get().each(y)},x=function(t){return b(p,t,s,"bottom")},C=function(){return a.get().each(x)};en().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){o.get()||(Wg(e,h),Wg(e,p),o.set(!0)),i.set(t.start),a.set(t.finish),t.otherCells.each((function(e){n.set(e.upOrLeftCells),r.set(e.downOrRightCells),y(t.start),x(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){w(),C()})),t.on("TableSelectionClear",(function(){o.get()&&(Gg(h),Gg(p),o.set(!1)),i.clear(),a.clear()})))},TK=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},OK=function(t,e,n){e.delimiter||(e.delimiter="»");var r=function(r){var o=r||[],i=q(o,(function(e,r){return SC.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":r,"tab-index":-1,"aria-level":r+1},innerHtml:e.name},action:function(n){t.focus(),t.selection.select(e.element),t.nodeChanged()},buttonBehaviours:mf([mO.button(n.isDisabled),cO()])})})),a={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+e.delimiter+" "}};return Z(i.slice(1),(function(t,e){var n=t;return n.push(a),n.push(e),n}),[i[0]])},o=function(e){var n=[],r=e.length;while(r-- >0){var o=e[r];if(1===o.nodeType&&!TK(o)){var i=t.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:mf([Aw.config({mode:"flow",selector:"div[role=button]"}),Iv.config({disabled:n.isDisabled}),cO(),yA.config({}),Hw.config({}),Vw("elementPathEvents",[ju((function(e,n){t.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Aw.focusIn(e)})),t.on("NodeChange",(function(t){var n=o(t.parents);n.length>0?Hw.set(e,r(n)):Hw.set(e,[])}))}))])]),components:[]}};(function(t){t[t["None"]=0]="None",t[t["Both"]=1]="Both",t[t["Vertical"]=2]="Vertical"})(DU||(DU={}));var _K=function(t,e,n,r,o){var i={};return i.height=QW(r+e.top,wT(t),CT(t)),n===DU.Both&&(i.width=QW(o+e.left,yT(t),xT(t))),i},EK=function(t,e,n){var r=ee.fromDom(t.getContainer()),o=_K(t,e,n,ar(r),vr(r));vt(o,(function(t,e){return Kn(r,e,ZW(t))})),v_(t)},AK=function(t){var e=!t.hasPlugin("autoresize"),n=t.getParam("resize",e);return!1===n?DU.None:"both"===n?DU.Both:DU.Vertical},DK=function(t,e,n,r){var o=20,i=lr(n*o,r*o);return EK(t,i,e),P.some(!0)},MK=function(t,e){var n=AK(t);return n===DU.None?P.none():P.some(PC("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:e.translate("Resize")},behaviours:[bK.config({mode:"mouse",repositionTarget:!1,onDrag:function(e,r,o){return EK(t,o,n)},blockerClass:"tox-blocker"}),Aw.config({mode:"special",onLeft:function(){return DK(t,n,-1,0)},onRight:function(){return DK(t,n,1,0)},onUp:function(){return DK(t,n,0,-1)},onDown:function(){return DK(t,n,0,1)}}),yA.config({}),Yw.config({})]},e.icons))},NK=function(t,e){var n,r=function(t,n,r){return Hw.set(t,[Ss(e.translate(["{0} "+r,n[r]]))])};return SC.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:mf([mO.button(e.isDisabled),cO(),yA.config({}),Hw.config({}),tp.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Vw("wordcount-events",[$u((function(t){var e=tp.getValue(t),n="words"===e.mode?"characters":"words";tp.setValue(t,{mode:n,count:e.count}),r(t,e.count,n)})),ju((function(e){t.on("wordCountUpdate",(function(t){var n=tp.getValue(e).mode;tp.setValue(e,{mode:n,count:t.wordCount}),r(e,t.wordCount,n)}))}))])]),eventOrder:(n={},n[eu()]=["disabling","alloy.base.behaviour","wordcount-events"],n)})},RK=function(t,e){var n=function(){var t=TC.translate(["Powered by {0}","Tiny"]),e='<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+t+'">'+t+"</a>";return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:e}}},r=function(){var r=[];return t.getParam("elementpath",!0,"boolean")&&r.push(OK(t,{},e)),t.hasPlugin("wordcount")&&r.push(NK(t,e)),t.getParam("branding",!0,"boolean")&&r.push(n()),r.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[]},o=function(){var n=r(),o=MK(t,e);return n.concat(o.toArray())};return{dom:{tag:"div",classes:["tox-statusbar"]},components:o()}},zK=function(t){var e,n=t.inline,r=n?c$:YW,o=$T(t)?LF:UH,i=P.none(),a=en(),u=a.browser.isIE(),c=u?["tox-platform-ie"]:[],s=a.deviceType.isTouch(),l="tox-platform-touch",f=s?[l]:[],d=IT(t),m=UT(t),g=TC.isRtl()?{attributes:{dir:"rtl"}}:{},h={attributes:(e={},e[Id]=d?Hf.BottomToTop:Hf.TopToBottom,e)},v=function(){return i.bind(uU.getHeader)},b=function(){return o.isDocked(v)},y=function(){Kn(Z.element,"width",document.body.clientWidth+"px")},w=function(){var t=sn(In(),m)&&"grid"===Jn(m,"display"),e={dom:A({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c).concat(f)},g),behaviours:mf([Lg.config({useFixed:function(){return b()}})])},n={dom:{styles:{width:document.body.clientWidth+"px"}},events:Eu([Nu(fu(),y)])};return Co(e,t?n:{})},x=_s(w()),C=function(){return ro.value(x)},S=kC({dom:{tag:"div",classes:["tox-anchorbar"]}}),k=function(){return i.bind((function(t){return S.getOpt(t)})).getOrDie("Could not find a anchor bar element")},T=function(){return i.bind((function(t){return uU.getToolbar(t)})).getOrDie("Could not find more toolbar element")},O=function(){return i.bind((function(t){return uU.getThrobber(t)})).getOrDie("Could not find throbber element")},_=kH(x,t,k),E=uU.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:_,onEscape:function(){t.focus()}}),D=RT(t),M=uU.parts.toolbar(A({dom:{tag:"div",classes:["tox-toolbar"]},getSink:C,providers:_.shared.providers,onEscape:function(){t.focus()},type:D,lazyToolbar:T,lazyHeader:function(){return v().getOrDie("Could not find header element")}},h)),N=uU.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:_.shared.providers,onEscape:function(){t.focus()},type:D}),R=uU.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),z=uU.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),B=uU.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:_}),I=t.getParam("statusbar",!0,"boolean"),L=I&&!n?P.some(RK(t,_.shared.providers)):P.none(),H={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[R,z]},F=MT(t),V=AT(t),j=ET(t),U=function(){return F?[N]:V?[M]:[]},W=uU.parts.header({dom:A({tag:"div",classes:["tox-editor-header"]},h),components:nt([j?[E]:[],U(),jT(t)?[]:[S.asSpec()]]),sticky:$T(t),editor:t,sharedBackstage:_.shared}),$=nt([d?[]:[W],n?[]:[H],d?[W]:[]]),q={dom:{tag:"div",classes:["tox-editor-container"]},components:$},G=nt([[q],n?[]:L.toArray(),[B]]),K=WT(t),X=A(A({role:"application"},TC.isRtl()?{dir:"rtl"}:{}),K?{"aria-hidden":"true"}:{}),Y=_s(uU.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(n?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(f).concat(c),styles:A({visibility:"hidden"},K?{opacity:"0",border:"0"}:{}),attributes:X},components:G,behaviours:mf([cO(),Iv.config({disableClass:"tox-tinymce--disabled"}),Aw.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));i=P.some(Y),t.shortcuts.add("alt+F9","focus menubar",(function(){uU.focusMenubar(Y)})),t.shortcuts.add("alt+F10","focus toolbar",(function(){uU.focusToolbar(Y)})),t.addCommand("ToggleToolbarDrawer",(function(){uU.toggleToolbarDrawer(Y)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return uU.isToolbarDrawerToggled(Y)}));var J=lA(Y),Z=lA(x);TH(t,J,Z);var Q=function(){var t={broadcastAll:Z.broadcast,broadcastOn:Z.broadcastOn,register:p};return{channels:t}},tt=function(){var e=ZW(e$(t)),n=ZW(r$(t));return t.inline||(er("div","width",n)&&Kn(Y.element,"width",n),er("div","height",e)?Kn(Y.element,"height",e):Kn(Y.element,"height","200px")),e},et=function(){o.setup(t,_.shared,v),Tq(t,_),aG(t,C,_),NV(t),ij(t,O,_.shared),bt(BT(t),(function(e,n){t.ui.registry.addGroupToolbarButton(n,e)}));var e=t.ui.registry.getAll(),n=e.buttons,i=e.menuItems,a=e.contextToolbars,u=e.sidebars,c=DT(t),s={menuItems:i,menus:KT(t),menubar:XT(t),toolbar:c.getOrThunk((function(){return YT(t)})),allowToolbarGroups:D===jS.floating,buttons:n,sidebar:u};X$(t,a,x,{backstage:_}),kK(t,x);var l=t.getElement(),f=tt(),d={mothership:J,uiMothership:Z,outerContainer:Y},m={targetNode:l,height:f};return r.render(t,d,s,_,m)};return{mothership:J,uiMothership:Z,backstage:_,renderUI:et,getUi:Q}},BK=function(t,e){var n=P.from(jn(t,"id")).fold((function(){var t=oc("dialog-describe");return Fn(e,"id",t),t}),x);Fn(t,"aria-describedby",n)},PK=function(t,e){var n=Un(t,"id").fold((function(){var t=oc("dialog-label");return Fn(e,"id",t),t}),x);Fn(t,"aria-labelledby",n)},IK=w([Ai("lazySink"),Fi("dragBlockClass"),ta("getBounds",Qr),Ki("useTabstopAt",_),Ki("eventOrder",{}),ep("modalBehaviours",[Aw]),cl("onExecute"),ll("onEscape")]),LK={sketch:x},HK=w([Bp({name:"draghandle",overrides:function(t,e){return{behaviours:mf([bK.config({mode:"mouse",getTarget:function(t){return Ps(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),Rp({schema:[Ai("dom")],name:"title"}),Rp({factory:LK,schema:[Ai("dom")],name:"close"}),Rp({factory:LK,schema:[Ai("dom")],name:"body"}),Bp({factory:LK,schema:[Ai("dom")],name:"footer"}),zp({factory:{sketch:function(t,e){return A(A({},t),{dom:e.dom,components:e.components})}},schema:[Ki("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ki("components",[])],name:"blocker"})]),FK=function(t,e,n,r){var o,i=od(),a=function(e){i.set(e);var n=t.lazySink(e).getOrDie(),o=r.blocker(),a=n.getSystem().build(A(A({},o),{components:o.components.concat([Es(e)]),behaviours:mf([Yw.config({}),Vw("dialog-blocker-events",[Vu(La(),(function(){Aw.focusIn(e)}))])])}));Wg(n,a),Aw.focusIn(e)},u=function(t){i.clear(),vn(t.element).each((function(e){t.getSystem().getByDom(e).each((function(t){Gg(t)}))}))},c=function(e){return Xp(e,t,"body")},s=function(e){return Xp(e,t,"footer")},l=function(t,e){KV.block(t,e)},f=function(t){KV.unblock(t)},d=oc("modal-events"),m=A(A({},t.eventOrder),(o={},o[du()]=[d].concat(t.eventOrder["alloy.system.attached"]||[]),o));return{uid:t.uid,dom:t.dom,components:e,apis:{show:a,hide:u,getBody:c,getFooter:s,setIdle:f,setBusy:l},eventOrder:m,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:rp(t.modalBehaviours,[Hw.config({}),Aw.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),KV.config({getRoot:i.get}),Vw(d,[ju((function(e){PK(e.element,Xp(e,t,"title").element),BK(e.element,Xp(e,t,"body").element)}))])])}},VK=mv({name:"ModalDialog",configFields:IK(),partFields:HK(),factory:FK,apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),jK=ti([Ni("type"),Ni("name")].concat(Rk)),UK=li,WK=[Oi("name","name",To((function(){return oc("button-name")})),si),Ui("icon"),Zi("align","end",["start","end"]),Qi("primary",!1),Qi("disabled",!1)],$K=M(M([],WK,!0),[Ni("text")],!1),qK=M([Ri("type",["submit","cancel","custom"])],$K,!0),GK=M([Ri("type",["menu"]),Ui("text"),Ui("tooltip"),Ui("icon"),Hi("items",jK)],WK,!0),KK=ki("type",{submit:qK,cancel:qK,custom:qK,menu:GK}),XK=[Ni("type"),Ni("text"),Ri("level",["info","warn","error","success"]),Ni("icon"),Ki("url","")],YK=ti(XK),JK=function(t){return[Ni("type"),t]},ZK=[Ni("type"),Ni("text"),Qi("disabled",!1),Qi("primary",!1),Oi("name","name",To((function(){return oc("button-name")})),si),Ui("icon"),Qi("borderless",!1)],QK=ti(ZK),tX=[Ni("type"),Ni("name"),Ni("label"),Qi("disabled",!1)],eX=ti(tX),nX=li,rX=[Ni("type"),Ni("name")],oX=rX.concat([Ui("label")]),iX=oX.concat([Ki("columns","auto")]),aX=ti(iX),uX=ii([Ni("value"),Ni("text"),Ni("icon")]),cX=oX,sX=ti(cX),lX=si,fX=oX,dX=ti(fX),mX=si,gX=rX.concat([Ji("tag","textarea"),Ni("scriptId"),Ni("scriptUrl"),ea("settings",void 0)]),hX=rX.concat([Ji("tag","textarea"),Bi("init")]),pX=vi((function(t){return wi("customeditor.old",Qo(hX),t).orThunk((function(){return wi("customeditor.new",Qo(gX),t)}))})),vX=si,bX=oX,yX=ti(bX),wX=pi(),xX=function(t){return[Ni("type"),Mi("columns"),t]},CX=[Ni("type"),Ni("html"),Zi("presets","presentation",["presentation","document"])],SX=ti(CX),kX=oX.concat([Qi("sandboxed",!0)]),TX=ti(kX),OX=si,_X=oX.concat([Di("currentState",ti([Ai("blob"),Ni("url")]))]),EX=ti(_X),AX=oX.concat([Ui("inputMode"),Ui("placeholder"),Qi("maximized",!1),Qi("disabled",!1)]),DX=ti(AX),MX=si,NX=function(t){return[Ni("type"),Ni("label"),t]},RX=[Ni("text"),Ni("value")],zX=[Ni("text"),Hi("items",Ti("items",(function(){return BX})))],BX=ni([ti(RX),ti(zX)]),PX=oX.concat([Hi("items",BX),Qi("disabled",!1)]),IX=ti(PX),LX=si,HX=oX.concat([Li("items",[Ni("text"),Ni("value")]),Yi("size",1),Qi("disabled",!1)]),FX=ti(HX),VX=si,jX=oX.concat([Qi("constrain",!0),Qi("disabled",!1)]),UX=ti(jX),WX=ti([Ni("width"),Ni("height")]),$X=[Ni("type"),Hi("header",si),Hi("cells",ei(si))],qX=ti($X),GX=oX.concat([Ui("placeholder"),Qi("maximized",!1),Qi("disabled",!1)]),KX=ti(GX),XX=si,YX=oX.concat([Zi("filetype","file",["image","media","file"]),Ki("disabled",!1)]),JX=ti(YX),ZX=ti([Ni("value"),Ki("meta",{})]),QX=function(t){return Oi("items","items",ko(),ei(vi((function(e){return wi("Checking item of "+t,tY,e).fold((function(t){return ro.error(Si(t))}),(function(t){return ro.value(t)}))}))))},tY=Jo((function(){return hi("type",{alertbanner:YK,bar:ti(JK(QX("bar"))),button:QK,checkbox:eX,colorinput:sX,colorpicker:dX,dropzone:yX,grid:ti(xX(QX("grid"))),iframe:TX,input:DX,listbox:IX,selectbox:FX,sizeinput:UX,textarea:KX,urlinput:JX,customeditor:pX,htmlpanel:SX,imagetools:EX,collection:aX,label:ti(NX(QX("label"))),table:qX,panel:nY})})),eY=[Ni("type"),Ki("classes",[]),Hi("items",tY)],nY=ti(eY),rY=[Oi("name","name",To((function(){return oc("tab-name")})),si),Ni("title"),Hi("items",tY)],oY=[Ni("type"),Li("tabs",rY)],iY=ti(oY),aY=$K,uY=KK,cY=ti([Ni("title"),Di("body",hi("type",{panel:nY,tabpanel:iY})),Ji("size","normal"),Hi("buttons",uY),Ki("initialData",{}),ta("onAction",p),ta("onChange",p),ta("onSubmit",p),ta("onClose",p),ta("onCancel",p),Ki("onTabChange",p)]),sY=function(t){return wi("dialog",cY,t)},lY=ti(M([Ri("type",["cancel","custom"])],aY,!0)),fY=ti([Ni("title"),Ni("url"),ji("height"),ji("width"),$i("buttons",lY),ta("onAction",p),ta("onCancel",p),ta("onClose",p),ta("onMessage",p)]),dY=function(t){return wi("dialog",fY,t)},mY=function(t){return a(t)?[t].concat(rt(Tt(t),mY)):u(t)?rt(t,mY):[]},gY=function(t){return i(t.type)&&i(t.name)},hY={checkbox:nX,colorinput:lX,colorpicker:mX,dropzone:wX,input:MX,iframe:OX,sizeinput:WX,selectbox:VX,listbox:LX,size:WX,textarea:XX,urlinput:ZX,customeditor:vX,collection:uX,togglemenuitem:UK},pY=function(t){return P.from(hY[t.type])},vY=function(t){return Y(mY(t),gY)},bY=function(t){var e=vY(t),n=rt(e,(function(t){return pY(t).fold((function(){return[]}),(function(e){return[Di(t.name,e)]}))}));return ti(n)},yY=function(t){var e=xi(sY(t)),n=bY(t),r=t.initialData;return{internalDialog:e,dataValidator:n,initialData:r}},wY={open:function(t,e){var n=yY(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){var n=xi(dY(e));return t(n)},redial:function(t){return yY(t)}},xY=function(t){var e=[],n={};return vt(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),e.length>0?ro.error(e):ro.value(n)},CY=function(t,e){var n=kC(RR.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:q(t.items,(function(t){return uL(n,t,e)}))}})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:mf([Aw.config({mode:"acyclic",useTabstopAt:k(vz)}),WR.memento(n),az.memento(n,{postprocess:function(t){return xY(t).fold((function(t){return console.error(t),{}}),x)}})])}},SY=function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:vx(t.action),behaviours:rp(t.tabButtonBehaviours,[Yw.config({}),Aw.config({mode:"execution",useSpace:!0,useEnter:!0}),tp.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}},kY=dv({name:"TabButton",configFields:[Ki("uid",void 0),Ai("value"),Oi("dom","dom",Eo((function(){return{attributes:{role:"tab",id:oc("aria"),"aria-selected":"false"}}})),ai()),Fi("action"),Ki("domModification",{}),ep("tabButtonBehaviours",[Yw,Aw,tp]),Ai("view")],factory:SY}),TY=w([Ai("tabs"),Ai("dom"),Ki("clickToDismiss",!1),ep("tabbarBehaviours",[rb,Aw]),il(["tabClass","selectedClass"])]),OY=Pp({factory:kY,name:"tabs",unit:"tab",overrides:function(t){var e=function(t,e){rb.dehighlight(t,e),Su(t,yu(),{tabbar:t,button:e})},n=function(t,e){rb.highlight(t,e),Su(t,bu(),{tabbar:t,button:e})};return{action:function(r){var o=r.getSystem().getByUid(t.uid).getOrDie(),i=rb.isHighlighted(o,r),a=function(){return i&&t.clickToDismiss?e:i?p:n}();a(o,r)},domModification:{classes:[t.markers.tabClass]}}}}),_Y=w([OY]),EY=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:rp(t.tabbarBehaviours,[rb.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){Fn(e.element,"aria-selected","true")},onDehighlight:function(t,e){Fn(e.element,"aria-selected","false")}}),Aw.config({mode:"flow",getInitial:function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}},AY=mv({name:"Tabbar",configFields:TY(),partFields:_Y(),factory:EY}),DY=function(t,e){return{uid:t.uid,dom:t.dom,behaviours:rp(t.tabviewBehaviours,[Hw.config({})]),domModification:{attributes:{role:"tabpanel"}}}},MY=dv({name:"Tabview",configFields:[ep("tabviewBehaviours",[Hw])],factory:DY}),NY=w([Ki("selectFirst",!0),ul("onChangeTab"),ul("onDismissTab"),Ki("tabs",[]),ep("tabSectionBehaviours",[])]),RY=Rp({factory:AY,schema:[Ai("dom"),Ii("markers",[Ai("tabClass"),Ai("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),zY=Rp({factory:MY,name:"tabview"}),BY=w([RY,zY]),PY=function(t,e,n,r){var o=function(e){var n=tp.getValue(e);Kp(e,t,"tabview").each((function(r){var o=tt(t.tabs,(function(t){return t.value===n}));o.each((function(n){var o=n.view();Un(e.element,"id").each((function(t){Fn(r.element,"aria-labelledby",t)})),Hw.set(r,o),t.onChangeTab(r,e,o)}))}))},i=function(e,n){Kp(e,t,"tabbar").each((function(t){n(t).each(ku)}))};return{uid:t.uid,dom:t.dom,components:e,behaviours:np(t.tabSectionBehaviours),events:Eu(nt([t.selectFirst?[ju((function(t,e){i(t,rb.getFirst)}))]:[],[Nu(bu(),(function(t,e){var n=e.event.button;o(n)})),Nu(yu(),(function(e,n){var r=n.event.button;t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return Kp(e,t,"tabview").map((function(t){return Hw.contents(t)})).getOr([])},showTab:function(t,e){var n=function(t){var n=rb.getCandidates(t),r=tt(n,(function(t){return tp.getValue(t)===e}));return r.filter((function(e){return!rb.isHighlighted(t,e)}))};i(t,n)}}}},IY=mv({name:"TabSection",configFields:NY(),partFields:BY(),factory:PY,apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),LY=function(t,e,n){return q(t,(function(r,o){Hw.set(n,t[o].view());var i=e.dom.getBoundingClientRect();return Hw.set(n,[]),i.height}))},HY=function(t){return ft(st(t,(function(t,e){return t>e?-1:t<e?1:0})))},FY=function(t,e,n){var r,o=hn(t).dom,i=Ps(t,".tox-dialog-wrap").getOr(t),a="fixed"===Jn(i,"position");r=a?Math.max(o.clientHeight,window.innerHeight):Math.max(o.offsetHeight,o.scrollHeight);var u=ar(e),c=e.dom.offsetLeft>=n.dom.offsetLeft+vr(n),s=c?Math.max(ar(n),u):u,l=parseInt(Jn(t,"margin-top"),10)||0,f=parseInt(Jn(t,"margin-bottom"),10)||0,d=ar(t)+l+f,m=d-s;return r-m},VY=function(t,e){ft(t).each((function(t){return IY.showTab(e,t.value)}))},jY=function(t,e){Kn(t,"height",e+"px"),en().browser.isIE()?nr(t,"flex-basis"):Kn(t,"flex-basis",e+"px")},UY=function(t,e,n){Ps(t,'[role="dialog"]').each((function(t){Ls(t,'[role="tablist"]').each((function(r){n.get().map((function(n){return Kn(e,"height","0"),Kn(e,"flex-basis","0"),Math.min(n,FY(t,e,r))})).each((function(t){jY(e,t)}))}))}))},WY=function(t){return Ls(t,'[role="tabpanel"]')},$Y=function(t){var e=function(){var e=od(),n=[ju((function(n){var r=n.element;WY(r).each((function(o){Kn(o,"visibility","hidden"),n.getSystem().getByDom(o).toOptional().each((function(n){var r=LY(t,o,n),i=HY(r);i.fold(e.clear,e.set)})),UY(r,o,e),nr(o,"visibility"),VY(t,n),xC.requestAnimationFrame((function(){UY(r,o,e)}))}))})),Nu(fu(),(function(t){var n=t.element;WY(n).each((function(t){UY(n,t,e)}))})),Nu(BA,(function(t,n){var r=t.element;WY(r).each((function(t){var n=Of(An(t));Kn(t,"visibility","hidden");var o=Qn(t,"height").map((function(t){return parseInt(t,10)}));nr(t,"height"),nr(t,"flex-basis");var i=t.dom.getBoundingClientRect().height,a=o.forall((function(t){return i>t}));a?(e.set(i),UY(r,t,e)):o.each((function(e){jY(t,e)})),nr(t,"visibility"),n.each(Sf)}))}))],r=!1;return{extraEvents:n,selectFirst:r}}(),n=function(){var t=[],e=!0;return{extraEvents:t,selectFirst:e}}();return{smartTabHeight:e,naiveTabHeight:n}},qY="send-data-to-section",GY="send-data-to-view",KY=function(t,e){var n=oa({}),r=function(t){var e=tp.getValue(t),r=xY(e).getOr({}),o=n.get(),i=Co(o,r);n.set(i)},o=function(t){var e=n.get();tp.setValue(t,e)},i=oa(null),a=q(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[RR.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"]},components:q(t.items,(function(t){return uL(n,t,e)})),formBehaviours:mf([Aw.config({mode:"acyclic",useTabstopAt:k(vz)}),Vw("TabView.form.events",[ju(o),Uu(r)]),yf.config({channels:ga([{key:qY,value:{onReceive:r}},{key:GY,value:{onReceive:o}}])})])}}))]}}})),u=$Y(a).smartTabHeight;return IY.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=tp.getValue(e);Su(t,zA,{name:r,oldName:i.get()}),i.set(r)},tabs:a,components:[IY.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[AY.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:mf([yA.config({})])}),IY.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:u.selectFirst,tabSectionBehaviours:mf([Vw("tabpanel",u.extraEvents),Aw.config({mode:"acyclic"}),bv.config({find:function(t){return ft(IY.getViewItems(t))}}),tp.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([qY],{}),n.get()},setValue:function(t,e){n.set(e),t.getSystem().broadcastOn([GY],{})}}})])})},XY=oc("update-dialog"),YY=oc("update-title"),JY=oc("update-body"),ZY=oc("update-footer"),QY=oc("body-send-message"),tJ=function(t,e,n,r){var o=function(t){switch(t.body.type){case"tabpanel":return[KY(t.body,n)];default:return[CY(t.body,n)]}},i=function(t,e){return P.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},a={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:A(A({},e.map((function(t){return{id:t}})).getOr({})),r?a:{})},components:[],behaviours:mf([WR.childAt(0),gW.config({channel:JY,updateState:i,renderComponents:o,initialData:t})])}},eJ=function(t,e,n,r){return tJ(t,P.some(e),n,r)},nJ=function(t,e){var n=tJ(t,P.none(),e,!1);return VK.parts.body(n)},rJ=function(t){var e={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[gz({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:mf([yA.config({}),Yw.config({})])})]}],behaviours:mf([Aw.config({mode:"acyclic",useTabstopAt:k(vz)})])};return VK.parts.body(e)},oJ=CO.deviceType.isTouch(),iJ=function(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}},aJ=function(t,e){return VK.parts.close(SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:mf([yA.config({})])}))},uJ=function(){return VK.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},cJ=function(t,e){return VK.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:JV("<p>"+e.translate(t)+"</p>")}]}]})},sJ=function(t){return VK.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},lJ=function(t,e){return[sA.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),sA.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]},fJ=function(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return VK.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),P.some(!0)},useTabstopAt:function(t){return!vz(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:A({position:"relative"},t.extraStyles)},components:M([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:JV('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:oJ?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:mf(M([Yw.config({}),Vw("dialog-events",t.dialogEvents.concat([Vu(La(),(function(t,e){Aw.focusIn(t)}))])),Vw("scroll-lock",[ju((function(){is(In(),i)})),Uu((function(){us(In(),i)}))])],t.extraBehaviours,!0)),eventOrder:A((e={},e[eu()]=["dialog-events"],e[du()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[mu()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})},dJ=function(t){return SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[PC("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){Cu(t,AA)}})},mJ=function(t,e,n){var r=function(t){return[Ss(n.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:A({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:mf([gW.config({channel:YY,renderComponents:r})])}},gJ=function(){return{dom:JV('<div class="tox-dialog__draghandle"></div>')}},hJ=function(t,e,n){return sA.sketch({dom:JV('<div class="tox-dialog__header"></div>'),components:[mJ(t,P.some(e),n),gJ(),dJ(n)],containerBehaviours:mf([bK.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Hs(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})},pJ=function(t,e){var n=VK.parts.title(mJ(t,P.none(),e)),r=VK.parts.draghandle(gJ()),o=VK.parts.close(dJ(e)),i=[n].concat(t.draggable?[r]:[]).concat([o]);return sA.sketch({dom:JV('<div class="tox-dialog__header"></div>'),components:i})},vJ=function(t,e){return pJ({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},e.shared.providers)},bJ=function(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:JV('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},yJ=function(t,e,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){VK.setBusy(t(),(function(t,r){return bJ(n.message,r,e)}))},onUnblock:function(){VK.setIdle(t())}}},wJ=function(t,e,n,r){var o,i=function(t,e){return P.some(e)};return _s(fJ(A(A({},t),{lazySink:r.shared.getSink,extraBehaviours:M([gW.config({channel:XY,updateState:i,initialData:e}),az.memory({})],t.extraBehaviours,!0),onEscape:function(t){Cu(t,AA)},dialogEvents:n,eventOrder:(o={},o[tu()]=[gW.name(),yf.name()],o[du()]=["scroll-lock",gW.name(),"messages","dialog-events","alloy.base.behaviour"],o[mu()]=["alloy.base.behaviour","dialog-events","messages",gW.name(),"scroll-lock"],o)})))},xJ=function(t){var e=function(t){var e=q(t.items,(function(t){var e=oa(!1);return A(A({},t),{storage:e})}));return A(A({},t),{items:e})};return q(t,(function(t){return"menu"===t.type?e(t):t}))},CJ=function(t){return Z(t,(function(t,e){if("menu"===e.type){var n=e;return Z(n.items,(function(t,e){return t[e.name]=e.storage,t}),t)}return t}),{})},SJ=function(t,e){return[Lu(La(),pz),t(EA,(function(t,n){e.onClose(),n.onClose()})),t(AA,(function(t,e,n,r){e.onCancel(t),Cu(r,EA)})),Nu(RA,(function(t,n){return e.onUnblock()})),Nu(NA,(function(t,n){return e.onBlock(n.event)}))]},kJ=function(t,e){var n=function(e,n){return Nu(e,(function(e,o){r(e,(function(r,i){n(t(),r,o.event,e)}))}))},r=function(t,e){gW.getState(t).get().each((function(n){e(n,t)}))};return M(M([],SJ(n,e),!0),[n(DA,(function(t,e,n){e.onAction(t,{name:n.name})}))],!1)},TJ=function(t,e,n){var r=function(e,n){return Nu(e,(function(e,r){o(e,(function(o,i){n(t(),o,r.event,e)}))}))},o=function(t,e){gW.getState(t).get().each((function(n){e(n.internalDialog,t)}))};return M(M([],SJ(r,e),!0),[r(MA,(function(t,e){return e.onSubmit(t)})),r(_A,(function(t,e,n){e.onChange(t,{name:n.name})})),r(DA,(function(t,e,r,o){var i=function(){return Aw.focusIn(o)},a=function(t){return Wn(t,"disabled")||Un(t,"aria-disabled").exists((function(t){return"true"===t}))},u=An(o.element),c=Of(u);e.onAction(t,{name:r.name,value:r.value}),Of(u).fold(i,(function(t){a(t)||c.exists((function(e){return dn(t,e)&&a(e)}))?i():n().toOptional().filter((function(e){return!dn(e.element,t)})).each(i)}))})),r(zA,(function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})})),Uu((function(e){var n=t();tp.setValue(e,n.getData())}))],!1)},OJ={initUrlDialog:kJ,initDialog:TJ},_J=function(t,e){return rP(t,t.type,e)},EJ=function(t,e,n){return tt(e,(function(t){return t.name===n})).bind((function(e){return e.memento.getOpt(t)}))},AJ=function(t,e){var n=e.map((function(t){return t.footerButtons})).getOr([]),r=X(n,(function(t){return"start"===t.align})),o=function(t,e){return sA.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:q(e,(function(t){return t.memento.asSpec()}))})},i=o("start",r.pass),a=o("end",r.fail);return[i,a]},DJ=function(t,e){var n=function(t,n){var r=q(n.buttons,(function(t){var n=kC(_J(t,e));return{name:t.name,align:t.align,memento:n}})),o=function(t,e){return EJ(t,r,e)};return P.some({lookupByName:o,footerButtons:r})};return{dom:JV('<div class="tox-dialog__footer"></div>'),components:[],behaviours:mf([gW.config({channel:ZY,initialData:t,updateState:n,renderComponents:AJ})])}},MJ=function(t,e){return DJ(t,e)},NJ=function(t,e){return VK.parts.footer(DJ(t,e))},RJ=function(t,e){var n=t.getRoot();if(n.getSystem().isConnected()){var r=bv.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return RR.getField(r,e).fold((function(){var n=t.getFooter(),o=gW.getState(n);return o.get().bind((function(t){return t.lookupByName(r,e)}))}),(function(t){return P.some(t)}))}return P.none()},zJ=function(t,e){var n=t.getRoot();return gW.getState(n).get().map((function(t){return xi(wi("data",t.dataValidator,e))})).getOr(e)},BJ=function(t,e,n){var r=function(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)},o=function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=tp.getValue(r),i=bt(n,(function(t){return t.get()}));return A(A({},o),i)},a=function(e){r((function(r){var o=h.getData(),i=A(A({},o),e),a=zJ(t,i),u=t.getFormWrapper();tp.setValue(u,a),vt(n,(function(t,e){_t(i,e)&&t.set(i[e])}))}))},u=function(e){RJ(t,e).each(Iv.disable)},c=function(e){RJ(t,e).each(Iv.enable)},s=function(e){RJ(t,e).each(Yw.focus)},l=function(t){if(!i(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){Su(e,NA,{message:t})}))},f=function(){r((function(t){Cu(t,RA)}))},d=function(e){r((function(n){var r=t.getBody(),o=gW.getState(r);o.get().exists((function(t){return t.isTabPanel()}))&&bv.getCurrent(r).each((function(t){IY.showTab(t,e)}))}))},m=function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([XY],r),n.getSystem().broadcastOn([YY],r.internalDialog),n.getSystem().broadcastOn([JY],r.internalDialog),n.getSystem().broadcastOn([ZY],r.internalDialog),h.setData(r.initialData)}))},g=function(){r((function(t){Cu(t,EA)}))},h={getData:o,setData:a,disable:u,enable:c,focus:s,block:l,unblock:f,showTab:d,redial:m,close:g};return h},PJ=function(t){switch(t){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}},IJ=function(t,e,n){var r=vJ(t.internalDialog.title,n),o=nJ({body:t.internalDialog.body},n),i=xJ(t.internalDialog.buttons),a=CJ(i),u=NJ({buttons:i},n),c=OJ.initDialog((function(){return m}),yJ((function(){return f}),n.shared.providers,e),n.shared.getSink),s=PJ(t.internalDialog.size),l={header:r,body:o,footer:P.some(u),extraClasses:s,extraBehaviours:[],extraStyles:{}},f=wJ(l,t,c,n),d=function(){var t=function(){var t=VK.getBody(f);return bv.getCurrent(t).getOr(t)};return{getRoot:w(f),getBody:function(){return VK.getBody(f)},getFooter:function(){return VK.getFooter(f)},getFormWrapper:t}}(),m=BJ(d,e.redial,a);return{dialog:f,instanceApi:m}},LJ=function(t,e,n,r){var o,i,a=oc("dialog-label"),u=oc("dialog-content"),c=function(t,e){return P.some(e)},s=kC(hJ({title:t.internalDialog.title,draggable:!0},a,n.shared.providers)),l=kC(eJ({body:t.internalDialog.body},u,n,r)),f=xJ(t.internalDialog.buttons),d=CJ(f),m=kC(MJ({buttons:f},n)),g=OJ.initDialog((function(){return p}),{onBlock:function(t){KV.block(h,(function(e,r){return bJ(t.message,r,n.shared.providers)}))},onUnblock:function(){KV.unblock(h)},onClose:function(){return e.closeWindow()}},n.shared.getSink),h=_s({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(o={role:"dialog"},o["aria-labelledby"]=a,o["aria-describedby"]=u,o)},eventOrder:(i={},i[tu()]=[gW.name(),yf.name()],i[eu()]=["execute-on-form"],i[du()]=["reflecting","execute-on-form"],i),behaviours:mf([Aw.config({mode:"cyclic",onEscape:function(t){return Cu(t,EA),P.some(!0)},useTabstopAt:function(t){return!vz(t)&&("button"!==ue(t)||"disabled"!==jn(t,"disabled"))}}),gW.config({channel:XY,updateState:c,initialData:t}),Yw.config({}),Vw("execute-on-form",g.concat([Vu(La(),(function(t,e){Aw.focusIn(t)}))])),KV.config({getRoot:function(){return P.some(h)}}),Hw.config({}),az.memory({})]),components:[s.asSpec(),l.asSpec(),m.asSpec()]}),p=BJ({getRoot:w(h),getFooter:function(){return m.get(h)},getBody:function(){return l.get(h)},getFormWrapper:function(){var t=l.get(h);return bv.getCurrent(t).getOr(t)}},e.redial,d);return{dialog:h,instanceApi:p}},HJ=tinymce.util.Tools.resolve("tinymce.util.URI"),FJ=function(t){var e=function(e){t.getSystem().isConnected()&&e(t)},n=function(t){if(!i(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");e((function(e){Su(e,NA,{message:t})}))},r=function(){e((function(t){Cu(t,RA)}))},o=function(){e((function(t){Cu(t,EA)}))},a=function(t){e((function(e){e.getSystem().broadcastOn([QY],t)}))};return{block:n,unblock:r,close:o,sendMessage:a}},VJ=["insertContent","setContent","execCommand","close","block","unblock"],jJ=function(t){return a(t)&&-1!==VJ.indexOf(t.mceAction)},UJ=function(t){return!jJ(t)&&a(t)&&_t(t,"mceAction")},WJ=function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!s(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock();break}},$J=function(t,e,n,r){var o,i=vJ(t.title,r),a=rJ(t),u=t.buttons.bind((function(t){return 0===t.length?P.none():P.some(NJ({buttons:t},r))})),c=OJ.initUrlDialog((function(){return v}),yJ((function(){return p}),r.shared.providers,e)),s=A(A({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),l=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],f=new HJ(t.url,{base_uri:new HJ(window.location.href)}),d=f.protocol+"://"+f.host+(f.port?":"+f.port:""),m=nd(),g=[Vw("messages",[ju((function(){var e=ad(ee.fromDom(window),"message",(function(e){if(f.isSameOrigin(new HJ(e.raw.origin))){var r=e.raw.data;jJ(r)?WJ(n,v,r):UJ(r)&&t.onMessage(v,r)}}));m.set(e)})),Uu(m.clear)]),yf.config({channels:(o={},o[QY]={onReceive:function(t,e){Ls(t.element,"iframe").each((function(t){var n=t.dom.contentWindow;n.postMessage(e,d)}))}},o)})],h={header:i,body:a,footer:u,extraClasses:l,extraBehaviours:g,extraStyles:s},p=wJ(h,t,c,r),v=FJ(p);return{dialog:p,instanceApi:v}},qJ=function(t){var e=t.backstage.shared,n=function(n,r){var o=function(){VK.hide(c),r()},i=kC(rP({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:P.none()},"cancel",t.backstage)),a=uJ(),u=aJ(o,e.providers),c=_s(fJ({lazySink:function(){return e.getSink()},header:iJ(a,u),body:cJ(n,e.providers),footer:P.some(sJ(lJ([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Nu(AA,o)],eventOrder:{}}));VK.show(c);var s=i.get(c);Yw.focus(s)};return{open:n}},GJ=function(t){var e=t.backstage.shared,n=function(n,r){var o=function(t){VK.hide(s),r(t)},i=kC(rP({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:P.none()},"submit",t.backstage)),a=rP({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:P.none()},"cancel",t.backstage),u=uJ(),c=aJ((function(){return o(!1)}),e.providers),s=_s(fJ({lazySink:function(){return e.getSink()},header:iJ(u,c),body:cJ(n,e.providers),footer:P.some(sJ(lJ([],[a,i.asSpec()]))),onEscape:function(){return o(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Nu(AA,(function(){return o(!1)})),Nu(MA,(function(){return o(!0)}))],eventOrder:{}}));VK.show(s);var l=i.get(s);Yw.focus(l)};return{open:n}},KJ=function(t,e){return xi(wi("data",e,t))},XJ=function(t){return PE(t,".tox-alert-dialog")||PE(t,".tox-confirm-dialog")},YJ=function(t,e,n){return e&&n?[]:[CF.config({contextual:{lazyContext:function(){return P.some(Jr(ee.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},JJ=function(t){var e=t.backstage,n=t.editor,r=$T(n),o=qJ(t),i=GJ(t),a=function(t,n,r){return void 0!==n&&"toolbar"===n.inline?l(t,e.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?l(t,e.shared.anchors.cursor(),r,n.ariaAttrs):s(t,r)},u=function(t,e){return c(t,e)},c=function(t,r){var o=function(t){var o=$J(t,{closeWindow:function(){VK.hide(o.dialog),r(o.instanceApi)}},n,e);return VK.show(o.dialog),o.instanceApi};return wY.openUrl(o,t)},s=function(t,n){var r=function(t,r,o){var i=r,a={dataValidator:o,initialData:i,internalDialog:t},u=IJ(a,{redial:wY.redial,closeWindow:function(){VK.hide(u.dialog),n(u.instanceApi)}},e);return VK.show(u.dialog),u.instanceApi.setData(i),u.instanceApi};return wY.open(r,t)},l=function(t,o,i,a){var u=function(t,u,c){var s=KJ(u,c),l=od(),f=e.shared.header.isPositionedAtTop(),d={dataValidator:c,initialData:s,internalDialog:t},m=function(){return l.on((function(t){eC.reposition(t),CF.refresh(t)}))},g=LJ(d,{redial:wY.redial,closeWindow:function(){l.on(eC.hide),n.off("ResizeEditor",m),l.clear(),i(g.instanceApi)}},e,a),h=_s(eC.sketch(A(A({lazySink:e.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},f?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:mf(M([Vw("window-manager-inline-events",[Nu(gu(),(function(t,e){Cu(g.dialog,AA)}))])],YJ(n,r,f),!0)),isExtraPart:function(t,e){return XJ(e)}})));return l.set(h),eC.showWithin(h,Es(g.dialog),{anchor:o},P.some(In())),r&&f||(CF.refresh(h),n.on("ResizeEditor",m)),g.instanceApi.setData(s),Aw.focusIn(g.dialog),g.instanceApi};return wY.open(u,t)},f=function(t,e){i.open(t,(function(t){e(t)}))},d=function(t,e){o.open(t,(function(){e()}))},m=function(t){t.close()};return{open:a,openUrl:u,alert:d,close:m,confirm:f}};function ZJ(){E.add("silver",(function(t){var e=zK(t),n=e.uiMothership,r=e.backstage,o=e.renderUI,i=e.getUi;BE.register(t,r.shared);var a=JJ({editor:t,backstage:r});return{renderUI:o,getWindowManagerImpl:w(a),getNotificationManagerImpl:function(){return VC(t,{backstage:r},n)},ui:i()}}))}ZJ()})()}).call(this,n("c8ba"))},"0335":function(t,e,n){n("0f58")},"07d1":function(t,e,n){n("94ce")},"07d7":function(t,e,n){n("a8b8")},"080b":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env"),n=function(t){return t.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},r=function(t){return t.getParam("pagebreak_split_block",!1)},o="mce-pagebreak",i=function(t){var n='<img src="'+e.transparentSrc+'" class="'+o+'" data-mce-resize="false" data-mce-placeholder />';return t?"<p>"+n+"</p>":n},a=function(t){var e=n(t),a=function(){return r(t)},u=new RegExp(e.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(function(t){return"\\"+t})),"gi");t.on("BeforeSetContent",(function(t){t.content=t.content.replace(u,i(a()))})),t.on("PreInit",(function(){t.serializer.addNodeFilter("img",(function(n){var r,i,u=n.length;while(u--)if(r=n[u],i=r.attr("class"),i&&-1!==i.indexOf(o)){var c=r.parent;if(t.schema.getBlockElements()[c.name]&&a()){c.type=3,c.value=e,c.raw=!0,r.remove();continue}r.type=3,r.value=e,r.raw=!0}}))}))},u=function(t){t.addCommand("mcePageBreak",(function(){t.insertContent(i(r(t)))}))},c=function(t){t.on("ResolveName",(function(e){"IMG"===e.target.nodeName&&t.dom.hasClass(e.target,o)&&(e.name="pagebreak")}))},s=function(t){var e=function(){return t.execCommand("mcePageBreak")};t.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:e}),t.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:e})};function l(){t.add("pagebreak",(function(t){u(t),s(t),a(t),c(t)}))}l()})()},"0902":function(t,e,n){n("88b6")},"0a9d":function(t,e,n){n("69a4")},"0aa0":function(t,e,n){n("3b47")},"0efa":function(t,e,n){n("4bdc")},"0f58":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=function(t){return function(e){return typeof e===t}},o=n("string"),i=r("function"),a=function(){},u=function(t){return function(){return t}},c=function(t){return t};function s(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var l=u(!1),f=u(!0),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.XHR"),g=function(t){return t.getParam("template_cdate_classes","cdate")},h=function(t){return t.getParam("template_mdate_classes","mdate")},p=function(t){return t.getParam("template_selected_content_classes","selcontent")},v=function(t){return t.getParam("template_preview_replace_values")},b=function(t){return t.getParam("content_style","","string")},y=function(t){return t.getParam("content_css_cors",!1,"boolean")},w=function(t){return t.getParam("template_replace_values")},x=function(t){return t.getParam("templates")},C=function(t){return t.getParam("template_cdate_format",t.translate("%Y-%m-%d"))},S=function(t){return t.getParam("template_mdate_format",t.translate("%Y-%m-%d"))},k=function(t){var e=t.getParam("body_class","","hash");return e[t.id]||""},T=function(t){var e=t.getParam("body_class","","string");return-1===e.indexOf("=")?e:k(t)},O=function(t,e){if(t=""+t,t.length<e)for(var n=0;n<e-t.length;n++)t="0"+t;return t},_=function(t,e,n){void 0===n&&(n=new Date);var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),a="January February March April May June July August September October November December".split(" ");return e=e.replace("%D","%m/%d/%Y"),e=e.replace("%r","%I:%M:%S %p"),e=e.replace("%Y",""+n.getFullYear()),e=e.replace("%y",""+n.getYear()),e=e.replace("%m",O(n.getMonth()+1,2)),e=e.replace("%d",O(n.getDate(),2)),e=e.replace("%H",""+O(n.getHours(),2)),e=e.replace("%M",""+O(n.getMinutes(),2)),e=e.replace("%S",""+O(n.getSeconds(),2)),e=e.replace("%I",""+((n.getHours()+11)%12+1)),e=e.replace("%p",n.getHours()<12?"AM":"PM"),e=e.replace("%B",""+t.translate(a[n.getMonth()])),e=e.replace("%b",""+t.translate(i[n.getMonth()])),e=e.replace("%A",""+t.translate(o[n.getDay()])),e=e.replace("%a",""+t.translate(r[n.getDay()])),e=e.replace("%%","%"),e},E=function(t,e){return function(){var n=x(t);i(n)?n(e):o(n)?m.send({url:n,success:function(t){e(JSON.parse(t))}}):e(n)}},A=function(t,e){return d.each(e,(function(e,n){i(e)&&(e=e(n)),t=t.replace(new RegExp("\\{\\$"+n+"\\}","g"),e)})),t},D=function(t,e){var n=t.dom,r=w(t);d.each(n.select("*",e),(function(t){d.each(r,(function(e,r){n.hasClass(t,r)&&i(e)&&e(t)}))}))},M=function(t,e){return new RegExp("\\b"+e+"\\b","g").test(t.className)},N=function(t,e,n){var r=t.dom,o=t.selection.getContent();n=A(n,w(t));var i=r.create("div",null,n),a=r.select(".mceTmpl",i);a&&a.length>0&&(i=r.create("div",null),i.appendChild(a[0].cloneNode(!0))),d.each(r.select("*",i),(function(e){M(e,g(t).replace(/\s+/g,"|"))&&(e.innerHTML=_(t,C(t))),M(e,h(t).replace(/\s+/g,"|"))&&(e.innerHTML=_(t,S(t))),M(e,p(t).replace(/\s+/g,"|"))&&(e.innerHTML=o)})),D(t,i),t.execCommand("mceInsertContent",!1,i.innerHTML),t.addVisual()},R=function(){return z},z=function(){var t=function(t){return t()},e=c,n={fold:function(t,e){return t()},isSome:l,isNone:f,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:e,orThunk:t,map:R,each:a,bind:R,exists:l,forall:f,filter:function(){return R()},toArray:function(){return[]},toString:u("none()")};return n}(),B=function(t){var e=u(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:f,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return B(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:z},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},P=function(t){return null===t||void 0===t?z:B(t)},I={some:B,none:R,from:P},L=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},H=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return I.some(i);if(n(i,r))break}return I.none()},F=function(t,e){return H(t,e,l)},V=tinymce.util.Tools.resolve("tinymce.Env"),j=tinymce.util.Tools.resolve("tinymce.util.Promise"),U=Object.hasOwnProperty,W=function(t,e){return $(t,e)?I.from(t[e]):I.none()},$=function(t,e){return U.call(t,e)},q={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},G=function(t){return t.replace(/["'<>&]/g,(function(t){return W(q,t).getOr(t)}))},K=function(t,e){if(-1===e.indexOf("<html>")){var n="",r=b(t),o=y(t)?' crossorigin="anonymous"':"";d.each(t.contentCSS,(function(e){n+='<link type="text/css" rel="stylesheet" href="'+t.documentBaseURI.toAbsolute(e)+'"'+o+">"})),r&&(n+='<style type="text/css">'+r+"</style>");var i=T(t),a=t.dom.encode,u=V.mac?"e.metaKey":"e.ctrlKey && !e.altKey",c='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+u+")) {e.preventDefault();}}}, false);<\/script> ",s=t.getBody().dir,l=s?' dir="'+a(s)+'"':"";e='<!DOCTYPE html><html><head><base href="'+a(t.documentBaseURI.getURI())+'">'+n+c+'</head><body class="'+a(i)+'"'+l+">"+e+"</body></html>"}return A(e,v(t))},X=function(t,e){var n=function(){if(!e||0===e.length){var n=t.translate("No templates defined.");return t.notificationManager.open({text:n,type:"info"}),I.none()}return I.from(d.map(e,(function(t,e){var n=function(t){return void 0!==t.url};return{selected:0===e,text:t.title,value:{url:n(t)?I.from(t.url):I.none(),content:n(t)?I.none():I.from(t.content),description:t.description}}})))},r=function(t){return L(t,(function(t){return{text:t.text,value:t.text}}))},o=function(t,e){return F(t,(function(t){return t.text===e}))},i=function(e){t.windowManager.alert("Could not load the specified template.",(function(){return e.focus("template")}))},a=function(t){return new j((function(e,n){t.value.url.fold((function(){return e(t.value.content.getOr(""))}),(function(t){return m.send({url:t,success:function(t){e(t)},error:function(t){n(t)}})}))}))},u=function(t,e){return function(n,r){if("template"===r.name){var u=n.getData().template;o(t,u).each((function(t){n.block("Loading..."),a(t).then((function(r){e(n,t,r)})).catch((function(){e(n,t,""),n.disable("save"),i(n)}))}))}}},c=function(e){return function(n){var r=n.getData();o(e,r.template).each((function(e){a(e).then((function(e){t.execCommand("mceInsertTemplate",!1,e),n.close()})).catch((function(){n.disable("save"),i(n)}))}))}},s=function(e){var n=r(e),o=function(t,n){return{title:"Insert Template",size:"large",body:{type:"panel",items:t},initialData:n,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:c(e),onChange:u(e,s)}},s=function(e,r,i){var a=K(t,i),u=[{type:"selectbox",name:"template",label:"Templates",items:n},{type:"htmlpanel",html:'<p aria-live="polite">'+G(r.value.description)+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],c={template:r.text,preview:a};e.unblock(),e.redial(o(u,c)),e.focus("template")},l=t.windowManager.open(o([],{template:"",preview:""}));l.block("Loading..."),a(e[0]).then((function(t){s(l,e[0],t)})).catch((function(){s(l,e[0],""),l.disable("save"),i(l)}))},l=n();l.each(s)},Y=function(t){return function(e){X(t,e)}},J=function(t){t.addCommand("mceInsertTemplate",s(N,t)),t.addCommand("mceTemplate",E(t,Y(t)))},Z=function(t){t.on("PreProcess",(function(e){var n=t.dom,r=S(t);d.each(n.select("div",e.node),(function(e){n.hasClass(e,"mceTmpl")&&(d.each(n.select("*",e),(function(e){n.hasClass(e,h(t).replace(/\s+/g,"|"))&&(e.innerHTML=_(t,r))})),D(t,e))}))}))},Q=function(t){var e=function(){return t.execCommand("mceTemplate")};t.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:e}),t.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:e})};function tt(){t.add("template",(function(t){Q(t),J(t),Z(t)}))}tt()})()},"169f":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.getParam("allow_html_in_named_anchor",!1,"boolean")},o="a:not([href])",i=function(t){return!t},a=function(t){var e=t.getAttribute("id")||t.getAttribute("name");return e||""},u=function(t){return t&&"a"===t.nodeName.toLowerCase()},c=function(t){return u(t)&&!t.getAttribute("href")&&""!==a(t)},s=function(t){return c(t)&&!t.firstChild},l=function(t){var r=t.dom;e(r).walk(t.selection.getRng(),(function(t){n.each(t,(function(t){s(t)&&r.remove(t,!1)}))}))},f=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},d=function(t){return t.dom.getParent(t.selection.getStart(),o)},m=function(t){var e=d(t);return e?a(e):""},g=function(t,e){t.undoManager.transact((function(){r(t)||t.selection.collapse(!0),t.selection.isCollapsed()?t.insertContent(t.dom.createHTML("a",{id:e})):(l(t),t.formatter.remove("namedAnchor",null,null,!0),t.formatter.apply("namedAnchor",{value:e}),t.addVisual())}))},h=function(t,e,n){n.removeAttribute("name"),n.id=e,t.addVisual(),t.undoManager.add()},p=function(t,e){var n=d(t);n?h(t,e,n):g(t,e),t.focus()},v=function(t,e){return f(e)?(p(t,e),!0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1)},b=function(t){var e=m(t);t.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:e},onSubmit:function(e){v(t,e.getData().id)&&e.close()}})},y=function(t){t.addCommand("mceAnchor",(function(){b(t)}))},w=function(t){return t&&i(t.attr("href"))&&!i(t.attr("id")||t.attr("name"))},x=function(t){return w(t)&&!t.firstChild},C=function(t){return function(e){for(var n=0;n<e.length;n++){var r=e[n];x(r)&&r.attr("contenteditable",t)}}},S=function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("a",C("false")),t.serializer.addNodeFilter("a",C(null))}))},k=function(t){t.formatter.register("namedAnchor",{inline:"a",selector:o,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:function(t,e,n){return c(t)}})},T=function(t){t.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return t.execCommand("mceAnchor")},onSetup:function(e){return t.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),t.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return t.execCommand("mceAnchor")}})};function O(){t.add("anchor",(function(t){S(t),y(t),T(t),t.on("PreInit",(function(){k(t)}))}))}O()})()},"16f1":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e){return t.fire("insertCustomChar",{chr:e})},n=function(t,n){var r=e(t,n).chr;t.execCommand("mceInsertContent",!1,r)},r=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},o=function(t){return function(e){return r(e)===t}},i=function(t){return function(e){return t===e}},a=o("array"),u=i(null),c=function(){},s=function(t){return function(){return t}},l=function(t){return t},f=s(!1),d=s(!0),m=function(){return g},g=function(){var t=function(t){return t()},e=l,n={fold:function(t,e){return t()},isSome:f,isNone:d,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:s(null),getOrUndefined:s(void 0),or:e,orThunk:t,map:m,each:c,bind:m,exists:f,forall:d,filter:function(){return m()},toArray:function(){return[]},toString:s("none()")};return n}(),h=function(t){var e=s(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:d,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return h(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:g},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},p=function(t){return null===t||void 0===t?g:h(t)},v={some:h,none:m,from:p},b=Array.prototype.push,y=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},w=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},x=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return v.some(i);if(n(i,r))break}return v.none()},C=function(t,e){return x(t,e,f)},S=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);b.apply(e,t[n])}return e},k=function(t,e){return S(y(t,e))},T=tinymce.util.Tools.resolve("tinymce.util.Tools"),O=function(t){return t.getParam("charmap")},_=function(t){return t.getParam("charmap_append")},E=T.isArray,A="User Defined",D=function(){return[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]},M=function(t){return T.grep(t,(function(t){return E(t)&&2===t.length}))},N=function(t){return E(t)?M(t):"function"===typeof t?t():[]},R=function(t,e){var n=O(t);n&&(e=[{name:A,characters:N(n)}]);var r=_(t);if(r){var o=T.grep(e,(function(t){return t.name===A}));return o.length?(o[0].characters=[].concat(o[0].characters).concat(N(r)),e):e.concat({name:A,characters:N(r)})}return e},z=function(t){var e=R(t,D());return e.length>1?[{name:"All",characters:k(e,(function(t){return t.characters}))}].concat(e):e},B=function(t){var e=function(){return z(t)},r=function(e){n(t,e)};return{getCharMap:e,insertChar:r}},P=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},I=function(t,e){var n=null,r=function(){u(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},L=String.fromCodePoint,H=function(t,e){return-1!==t.indexOf(e)},F=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(L)return L.apply(void 0,t);for(var n=[],r=0,o="",i=0,a=t.length;i!==a;++i){var u=+t[i];if(!(u<1114111&&u>>>0===u))throw RangeError("Invalid code point: "+u);u<=65535?r=n.push(u):(u-=65536,r=n.push(55296+(u>>10),u%1024+56320)),r>=16383&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+String.fromCharCode.apply(null,n)},V=function(t,e,n){return!!H(F(t).toLowerCase(),n)||(H(e.toLowerCase(),n)||H(e.toLowerCase().replace(/\s+/g,""),n))},j=function(t,e){var n=[],r=e.toLowerCase();return w(t.characters,(function(t){V(t[0],t[1],r)&&n.push(t)})),y(n,(function(t){return{text:t[1],value:F(t[0]),icon:F(t[0])}}))},U="pattern",W=function(t,e){var r=function(){return[{label:"Search",type:"input",name:U},{type:"collection",name:"results"}]},o=function(){return y(e,(function(t){return{title:t.name,name:t.name,items:r()}}))},i=function(){return{type:"panel",items:r()}},a=function(){return{type:"tabpanel",tabs:o()}},u=1===e.length?P(A):P("All"),c=function(t,n){C(e,(function(t){return t.name===u.get()})).each((function(e){var r=j(e,n);t.setData({results:r})}))},s=40,l=I((function(t){var e=t.getData().pattern;c(t,e)}),s),f=1===e.length?i():a(),d={pattern:"",results:j(e[0],"")},m={title:"Special Character",size:"normal",body:f,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:d,onAction:function(e,r){"results"===r.name&&(n(t,r.value),e.close())},onTabChange:function(t,e){u.set(e.newTabName),l.throttle(t)},onChange:function(t,e){e.name===U&&l.throttle(t)}},g=t.windowManager.open(m);g.focus(U)},$=function(t,e){t.addCommand("mceShowCharmap",(function(){W(t,e)}))},q=tinymce.util.Tools.resolve("tinymce.util.Promise"),G=function(t,e){t.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(t,n){return new q((function(n,r){n(j(e,t))}))},onAction:function(e,n,r){t.selection.setRng(n),t.insertContent(r),e.hide()}})},K=function(t){t.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return t.execCommand("mceShowCharmap")}}),t.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return t.execCommand("mceShowCharmap")}})};function X(){t.add("charmap",(function(t){var e=z(t);return $(t,e),K(t),G(t,e[0]),B(t)}))}X()})()},2401:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=function(t){return function(e){return typeof e===t}},o=n("string"),i=n("object"),a=n("array"),u=r("boolean"),c=r("function"),s=r("number"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=function(t,e){return t===e},g=function(t){return function(e){return!t(e)}},h=f(!1),p=f(!0),v=function(){return b},b=function(){var t=function(t){return t()},e=d,n={fold:function(t,e){return t()},isSome:h,isNone:p,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:e,orThunk:t,map:v,each:l,bind:v,exists:h,forall:p,filter:function(){return v()},toArray:function(){return[]},toString:f("none()")};return n}(),y=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:h,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return y(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:b},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},w=function(t){return null===t||void 0===t?b:y(t)},x={some:y,none:v,from:w},C=Array.prototype.slice,S=Array.prototype.push,k=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},T=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},O=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},_=function(t,e){if(0===t.length)return[];for(var n=e(t[0]),r=[],o=[],i=0,a=t.length;i<a;i++){var u=t[i],c=e(u);c!==n&&(r.push(o),o=[]),n=c,o.push(u)}return 0!==o.length&&r.push(o),r},E=function(t,e,n){return T(t,(function(t,r){n=e(n,t,r)})),n},A=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return x.some(i);if(n(i,r))break}return x.none()},D=function(t,e){return A(t,e,h)},M=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);S.apply(e,t[n])}return e},N=function(t,e){return M(k(t,e))},R=function(t){var e=C.call(t,0);return e.reverse(),e},z=function(t,e){return e>=0&&e<t.length?x.some(t[e]):x.none()},B=function(t){return z(t,0)},P=function(t){return z(t,t.length-1)},I=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return x.none()},L=function(){return L=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},L.apply(this,arguments)};function H(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var F=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},V=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!s&&!c&&!l;return{isiPad:f(o),isiPhone:f(i),isTablet:f(c),isPhone:f(s),isTouch:f(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:f(l),isDesktop:f(d)}},j=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},U=function(t,e){var n=j(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return q(r(1),r(2))},W=function(t,e){var n=String(e).toLowerCase();return 0===t.length?$():U(t,n)},$=function(){return q(0,0)},q=function(t,e){return{major:t,minor:e}},G={nu:q,detect:W,unknown:$},K=function(t,e){return I(e.brands,(function(e){var n=e.brand.toLowerCase();return D(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:G.nu(parseInt(e.version,10),0)}}))}))},X=function(t,e){var n=String(e).toLowerCase();return D(t,(function(t){return t.search(n)}))},Y=function(t,e){return X(t,e).map((function(t){var n=G.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},J=function(t,e){return X(t,e).map((function(t){var n=G.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},Z=function(t,e){return-1!==t.indexOf(e)},Q=function(t){return function(e){return e.replace(t,"")}},tt=Q(/^\s+|\s+$/g),et=function(t){return t.length>0},nt=function(t){return!et(t)},rt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ot=function(t){return function(e){return Z(e,t)}},it=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Z(t,"edge/")&&Z(t,"chrome")&&Z(t,"safari")&&Z(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,rt],search:function(t){return Z(t,"chrome")&&!Z(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Z(t,"msie")||Z(t,"trident")}},{name:"Opera",versionRegexes:[rt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ot("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ot("firefox")},{name:"Safari",versionRegexes:[rt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Z(t,"safari")||Z(t,"mobile/"))&&Z(t,"applewebkit")}}],at=[{name:"Windows",search:ot("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Z(t,"iphone")||Z(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ot("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ot("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ot("linux"),versionRegexes:[]},{name:"Solaris",search:ot("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ot("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ot("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ut={browsers:f(it),oses:f(at)},ct="Edge",st="Chrome",lt="IE",ft="Opera",dt="Firefox",mt="Safari",gt=function(){return ht({current:void 0,version:G.unknown()})},ht=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(ct),isChrome:r(st),isIE:r(lt),isOpera:r(ft),isFirefox:r(dt),isSafari:r(mt)}},pt={unknown:gt,nu:ht,edge:f(ct),chrome:f(st),ie:f(lt),opera:f(ft),firefox:f(dt),safari:f(mt)},vt="Windows",bt="iOS",yt="Android",wt="Linux",xt="OSX",Ct="Solaris",St="FreeBSD",kt="ChromeOS",Tt=function(){return Ot({current:void 0,version:G.unknown()})},Ot=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(vt),isiOS:r(bt),isAndroid:r(yt),isOSX:r(xt),isLinux:r(wt),isSolaris:r(Ct),isFreeBSD:r(St),isChromeOS:r(kt)}},_t={unknown:Tt,nu:Ot,windows:f(vt),ios:f(bt),android:f(yt),linux:f(wt),osx:f(xt),solaris:f(Ct),freebsd:f(St),chromeos:f(kt)},Et=function(t,e,n){var r=ut.browsers(),o=ut.oses(),i=e.bind((function(t){return K(r,t)})).orThunk((function(){return Y(r,t)})).fold(pt.unknown,pt.nu),a=J(o,t).fold(_t.unknown,_t.nu),u=V(a,i,t,n);return{browser:i,os:a,deviceType:u}},At={detect:Et},Dt=function(t){return window.matchMedia(t).matches},Mt=F((function(){return At.detect(navigator.userAgent,x.from(navigator.userAgentData),Dt)})),Nt=function(){return Mt()},Rt=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},zt=function(t,e){return Rt(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},Bt=1,Pt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Ht(r.childNodes[0])},It=function(t,e){var n=e||document,r=n.createElement(t);return Ht(r)},Lt=function(t,e){var n=e||document,r=n.createTextNode(t);return Ht(r)},Ht=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},Ft=function(t,e,n){return x.from(t.dom.elementFromPoint(e,n)).map(Ht)},Vt={fromHtml:Pt,fromTag:It,fromText:Lt,fromDom:Ht,fromPoint:Ft},jt=function(t,e){var n=t.dom;if(n.nodeType!==Bt)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Ut=function(t,e){return t.dom===e.dom},Wt=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},$t=function(t,e){return zt(t.dom,e.dom)},qt=function(t,e){return Nt().browser.isIE()?$t(t,e):Wt(t,e)},Gt=jt,Kt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Xt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Yt=tinymce.util.Tools.resolve("tinymce.util.VK"),Jt=Object.keys,Zt=function(t,e){for(var n=Jt(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},Qt=function(t){return function(e,n){t[n]=e}},te=function(t,e,n,r){var o={};return Zt(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},ee=function(t,e){var n={};return te(t,e,Qt(n),l),n};"undefined"!==typeof window?window:Function("return this;")();var ne=function(t){var e=t.dom.nodeName;return e.toLowerCase()},re=function(t){return t.dom.nodeType},oe=function(t){return function(e){return re(e)===t}},ie=oe(Bt),ae=function(t){return function(e){return ie(e)&&ne(e)===t}},ue=function(t,e,n){if(!(o(n)||u(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},ce=function(t,e){var n=t.dom;Zt(e,(function(t,e){ue(n,e,t)}))},se=function(t){return E(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},le=function(t){return x.from(t.dom.parentNode).map(Vt.fromDom)},fe=function(t){return k(t.dom.childNodes,Vt.fromDom)},de=function(t,e){var n=t.dom.childNodes;return x.from(n[e]).map(Vt.fromDom)},me=function(t){return de(t,0)},ge=function(t){return de(t,t.dom.childNodes.length-1)},he=function(t,e){var n=le(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},pe=function(t,e){t.dom.appendChild(e.dom)},ve=function(t,e){T(e,(function(e){he(t,e)}))},be=function(t,e){T(e,(function(e){pe(t,e)}))},ye=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},we=function(t,e){return Vt.fromDom(t.dom.cloneNode(e))},xe=function(t){return we(t,!0)},Ce=function(t,e){var n=Vt.fromTag(e),r=se(t);return ce(n,r),n},Se=function(t,e){var n=Ce(t,e);he(t,n);var r=fe(t);return be(n,r),ye(t),n},ke=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Te=tinymce.util.Tools.resolve("tinymce.util.Tools"),Oe=function(t){return function(e){return e&&e.nodeName.toLowerCase()===t}},_e=function(t){return function(e){return e&&t.test(e.nodeName)}},Ee=function(t){return t&&3===t.nodeType},Ae=_e(/^(OL|UL|DL)$/),De=_e(/^(OL|UL)$/),Me=Oe("ol"),Ne=_e(/^(LI|DT|DD)$/),Re=_e(/^(DT|DD)$/),ze=_e(/^(TH|TD)$/),Be=Oe("br"),Pe=function(t){return t.parentNode.firstChild===t},Ie=function(t,e){return e&&!!t.schema.getTextBlockElements()[e.nodeName]},Le=function(t,e){return t&&t.nodeName in e},He=function(t,e){return!!Be(e)&&(t.isBlock(e.nextSibling)&&!Be(e.previousSibling))},Fe=function(t,e,n){var r=t.isEmpty(e);return!(n&&t.select("span[data-mce-type=bookmark]",e).length>0)&&r},Ve=function(t,e){return t.isChildOf(e,t.getRoot())},je=function(t){return t.getParam("lists_indent_on_tab",!0)},Ue=function(t){var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},We=function(t){return t.getParam("forced_root_block_attrs",{})},$e=function(t,e){var n,r,o,i=t.dom,a=t.schema.getBlockElements(),u=i.createFragment(),c=Ue(t);if(c&&(r=i.create(c),r.tagName===c.toUpperCase()&&i.setAttribs(r,We(t)),Le(e.firstChild,a)||u.appendChild(r)),e)while(n=e.firstChild){var s=n.nodeName;o||"SPAN"===s&&"bookmark"===n.getAttribute("data-mce-type")||(o=!0),Le(n,a)?(u.appendChild(n),r=null):c?(r||(r=i.create(c),u.appendChild(r)),r.appendChild(n)):u.appendChild(n)}return c?o||r.appendChild(i.create("br",{"data-mce-bogus":"1"})):u.appendChild(i.create("br")),u},qe=ke.DOM,Ge=function(t,e,n){var r=function(t){Te.each(o,(function(e){t.parentNode.insertBefore(e,n.parentNode)})),qe.remove(t)},o=qe.select('span[data-mce-type="bookmark"]',e),i=$e(t,n),a=qe.createRng();a.setStartAfter(n),a.setEndAfter(e);for(var u=a.extractContents(),c=u.firstChild;c;c=c.firstChild)if("LI"===c.nodeName&&t.dom.isEmpty(c)){qe.remove(c);break}t.dom.isEmpty(u)||qe.insertAfter(u,e),qe.insertAfter(i,e),Fe(t.dom,n.parentNode)&&r(n.parentNode),qe.remove(n),Fe(t.dom,e)&&qe.remove(e)},Ke=ae("dd"),Xe=ae("dt"),Ye=function(t,e){Ke(e)?Se(e,"dt"):Xe(e)&&le(e).each((function(n){return Ge(t,n.dom,e.dom)}))},Je=function(t){Xe(t)&&Se(t,"dd")},Ze=function(t,e,n){T(n,"Indent"===e?Je:function(e){return Ye(t,e)})},Qe=function(t,e){if(Ee(t))return{container:t,offset:e};var n=Kt.getNode(t,e);return Ee(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&Ee(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Ee(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},tn=function(t){var e=t.cloneRange(),n=Qe(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);var r=Qe(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},en=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),nn=function(t,e){var n=e||t.selection.getStart(!0);return t.dom.getParent(n,"OL,UL,DL",ln(t,n))},rn=function(t,e){return t&&1===e.length&&e[0]===t},on=function(t){return O(t.querySelectorAll("ol,ul,dl"),Ae)},an=function(t){var e=nn(t),n=t.selection.getSelectedBlocks();return rn(e,n)?on(e):O(n,(function(t){return Ae(t)&&e!==t}))},un=function(t,e){var n=Te.map(e,(function(e){var n=t.dom.getParent(e,"li,dd,dt",ln(t,e));return n||e}));return en.unique(n)},cn=function(t){var e=t.selection.getSelectedBlocks();return O(un(t,e),Ne)},sn=function(t){return O(cn(t),Re)},ln=function(t,e){var n=t.dom.getParents(e,"TD,TH");return n.length>0?n[0]:t.getBody()},fn=function(t,e){var n=t.dom.getParents(e,"ol,ul",ln(t,e));return P(n)},dn=function(t){var e=fn(t,t.selection.getStart()),n=O(t.selection.getSelectedBlocks(),De);return e.toArray().concat(n)},mn=function(t){var e=dn(t);return gn(t,e)},gn=function(t,e){var n=k(e,(function(e){return fn(t,e).getOr(e)}));return en.unique(n)},hn=function(t,e,n){return void 0===n&&(n=m),t.exists((function(t){return n(t,e)}))},pn=function(t,e,n){return t.isSome()&&e.isSome()?x.some(n(t.getOrDie(),e.getOrDie())):x.none()},vn=function(t,e){var n=e||document,r=n.createDocumentFragment();return T(t,(function(t){r.appendChild(t.dom)})),Vt.fromDom(r)},bn=function(t,e,n){return t.fire("ListMutation",{action:e,element:n})},yn=function(t){return void 0!==t.style&&c(t.style.getPropertyValue)},wn=function(t,e,n){if(!o(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);yn(t)&&t.style.setProperty(e,n)},xn=function(t,e,n){var r=t.dom;wn(r,e,n)},Cn=function(t,e){pe(t.item,e.list)},Sn=function(t){for(var e=1;e<t.length;e++)Cn(t[e-1],t[e])},kn=function(t,e){pn(P(t),B(e),Cn)},Tn=function(t,e){var n={list:Vt.fromTag(e,t),item:Vt.fromTag("li",t)};return pe(n.list,n.item),n},On=function(t,e,n){for(var r=[],o=0;o<n;o++)r.push(Tn(t,e.listType));return r},_n=function(t,e){for(var n=0;n<t.length-1;n++)xn(t[n].item,"list-style-type","none");P(t).each((function(t){ce(t.list,e.listAttributes),ce(t.item,e.itemAttributes),be(t.item,e.content)}))},En=function(t,e){ne(t.list)!==e.listType&&(t.list=Se(t.list,e.listType)),ce(t.list,e.listAttributes)},An=function(t,e,n){var r=Vt.fromTag("li",t);return ce(r,e),be(r,n),r},Dn=function(t,e){pe(t.list,e),t.item=e},Mn=function(t,e,n){var r=e.slice(0,n.depth);return P(r).each((function(e){var r=An(t,n.itemAttributes,n.content);Dn(e,r),En(e,n)})),r},Nn=function(t,e,n){var r=On(t,n,n.depth-e.length);return Sn(r),_n(r,n),kn(e,r),e.concat(r)},Rn=function(t,e){var n=E(e,(function(e,n){return n.depth>e.length?Nn(t,e,n):Mn(t,e,n)}),[]);return B(n).map((function(t){return t.list}))},zn=function(t){return Gt(t,"OL,UL")},Bn=function(t){return me(t).exists(zn)},Pn=function(t){return ge(t).exists(zn)},In=function(t){return t.depth>0},Ln=function(t){return t.isSelected},Hn=function(t){var e=fe(t),n=Pn(t)?e.slice(0,-1):e;return k(n,xe)},Fn=function(t,e,n){return le(t).filter(ie).map((function(r){return{depth:e,dirty:!1,isSelected:n,content:Hn(t),itemAttributes:se(t),listAttributes:se(r),listType:ne(r)}}))},Vn=function(t,e){switch(t){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}e.dirty=!0},jn=function(t,e){t.listType=e.listType,t.listAttributes=L({},e.listAttributes)},Un=function(t){t.listAttributes=ee(t.listAttributes,(function(t,e){return"start"!==e}))},Wn=function(t,e){var n=t[e].depth,r=function(t){return t.depth===n&&!t.dirty},o=function(t){return t.depth<n};return A(R(t.slice(0,e)),r,o).orThunk((function(){return A(t.slice(e+1),r,o)}))},$n=function(t){return T(t,(function(e,n){Wn(t,n).fold((function(){e.dirty&&Un(e)}),(function(t){return jn(e,t)}))})),t},qn=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},Gn=function(t,e,n,r){return me(r).filter(zn).fold((function(){e.each((function(t){Ut(t.start,r)&&n.set(!0)}));var o=Fn(r,t,n.get());e.each((function(t){Ut(t.end,r)&&n.set(!1)}));var i=ge(r).filter(zn).map((function(r){return Kn(t,e,n,r)})).getOr([]);return o.toArray().concat(i)}),(function(r){return Kn(t,e,n,r)}))},Kn=function(t,e,n,r){return N(fe(r),(function(r){var o=zn(r)?Kn:Gn,i=t+1;return o(i,e,n,r)}))},Xn=function(t,e){var n=qn(!1),r=0;return k(t,(function(t){return{sourceList:t,entries:Kn(r,e,n,t)}}))},Yn=function(t,e){var n=$n(e);return k(n,(function(e){var n=vn(e.content);return Vt.fromDom($e(t,n.dom))}))},Jn=function(t,e){var n=$n(e);return Rn(t.contentDocument,n).toArray()},Zn=function(t,e){return N(_(e,In),(function(e){var n=B(e).exists(In);return n?Jn(t,e):Yn(t,e)}))},Qn=function(t,e){T(O(t,Ln),(function(t){return Vn(e,t)}))},tr=function(t){var e=k(cn(t),Vt.fromDom);return pn(D(e,g(Bn)),D(R(e),g(Bn)),(function(t,e){return{start:t,end:e}}))},er=function(t,e,n){var r=Xn(e,tr(t));T(r,(function(e){Qn(e.entries,n);var r=Zn(t,e.entries);T(r,(function(e){bn(t,"Indent"===n?"IndentList":"OutdentList",e.dom)})),ve(e.sourceList,r),ye(e.sourceList)}))},nr=function(t,e){var n=k(mn(t),Vt.fromDom),r=k(sn(t),Vt.fromDom),o=!1;if(n.length||r.length){var i=t.selection.getBookmark();er(t,n,e),Ze(t,e,r),t.selection.moveToBookmark(i),t.selection.setRng(tn(t.selection.getRng())),t.nodeChanged(),o=!0}return o},rr=function(t){return nr(t,"Indent")},or=function(t){return nr(t,"Outdent")},ir=function(t){return nr(t,"Flatten")},ar=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),ur=ke.DOM,cr=function(t){var e={},n=function(n){var r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"];if(1===r.nodeType){var i=ur.create("span",{"data-mce-type":"bookmark"});r.hasChildNodes()?(o=Math.min(o,r.childNodes.length-1),n?r.insertBefore(i,r.childNodes[o]):ur.insertAfter(i,r.childNodes[o])):r.appendChild(i),r=i,o=0}e[n?"startContainer":"endContainer"]=r,e[n?"startOffset":"endOffset"]=o};return n(!0),t.collapsed||n(),e},sr=function(t){var e=function(e){var n,r=function(t){var e=t.parentNode.firstChild,n=0;while(e){if(e===t)return n;1===e.nodeType&&"bookmark"===e.getAttribute("data-mce-type")||n++,e=e.nextSibling}return-1},o=n=t[e?"startContainer":"endContainer"],i=t[e?"startOffset":"endOffset"];o&&(1===o.nodeType&&(i=r(o),o=o.parentNode,ur.remove(n),!o.hasChildNodes()&&ur.isBlock(o)&&o.appendChild(ur.create("br"))),t[e?"startContainer":"endContainer"]=o,t[e?"startOffset":"endOffset"]=i)};e(!0),e();var n=ur.createRng();return n.setStart(t.startContainer,t.startOffset),t.endContainer&&n.setEnd(t.endContainer,t.endOffset),tn(n)},lr=function(t){switch(t){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},fr=function(t){return/\btox\-/.test(t.className)},dr=function(t,e,n){var r=function(t){var r=A(t.parents,Ae,ze).filter((function(t){return t.nodeName===e&&!fr(t)})).isSome();n(r)},o=t.dom.getParents(t.selection.getNode());return r({parents:o}),t.on("NodeChange",r),function(){return t.off("NodeChange",r)}},mr=function(t,e,n){var r=n["list-style-type"]?n["list-style-type"]:null;t.setStyle(e,"list-style-type",r)},gr=function(t,e){Te.each(e,(function(e,n){t.setAttribute(n,e)}))},hr=function(t,e,n){gr(e,n["list-attributes"]),Te.each(t.select("li",e),(function(t){gr(t,n["list-item-attributes"])}))},pr=function(t,e,n){mr(t,e,n),hr(t,e,n)},vr=function(t,e,n){Te.each(n,(function(n){var r;return t.setStyle(e,(r={},r[n]="",r))}))},br=function(t,e,n,r){var o=e[n?"startContainer":"endContainer"],i=e[n?"startOffset":"endOffset"];1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!n&&Be(o.nextSibling)&&(o=o.nextSibling);while(o.parentNode!==r){if(Ie(t,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},yr=function(t,e,n){for(var r,o=[],i=t.dom,a=br(t,e,!0,n),u=br(t,e,!1,n),c=[],s=a;s;s=s.nextSibling)if(c.push(s),s===u)break;return Te.each(c,(function(e){if(Ie(t,e))return o.push(e),void(r=null);if(i.isBlock(e)||Be(e))return Be(e)&&i.remove(e),void(r=null);var a=e.nextSibling;ar.isBookmarkNode(e)&&(Ae(a)||Ie(t,a)||!a&&e.parentNode===n)?r=null:(r||(r=i.create("p"),e.parentNode.insertBefore(r,e),o.push(r)),r.appendChild(e))})),o},wr=function(t,e,n){var r=t.getStyle(e,"list-style-type"),o=n?n["list-style-type"]:"";return o=null===o?"":o,r===o},xr=function(t,e,n){var r=t.selection.getRng(),o="LI",i=ln(t,t.selection.getStart(!0)),a=t.dom;if("false"!==a.getContentEditable(t.selection.getNode())){e=e.toUpperCase(),"DL"===e&&(o="DT");var u=cr(r),c=yr(t,r,i);Te.each(c,(function(r){var i,u=r.previousSibling,c=r.parentNode;Ne(c)||(u&&Ae(u)&&u.nodeName===e&&wr(a,u,n)?(i=u,r=a.rename(r,o),u.appendChild(r)):(i=a.create(e),r.parentNode.insertBefore(i,r),i.appendChild(r),r=a.rename(r,o)),vr(a,r,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),pr(a,i,n),Or(t.dom,i))})),t.selection.setRng(sr(u))}},Cr=function(t,e){return t&&e&&Ae(t)&&t.nodeName===e.nodeName},Sr=function(t,e,n){var r=t.getStyle(e,"list-style-type",!0),o=t.getStyle(n,"list-style-type",!0);return r===o},kr=function(t,e){return t.className===e.className},Tr=function(t,e,n){return Cr(e,n)&&Sr(t,e,n)&&kr(e,n)},Or=function(t,e){var n,r;if(n=e.nextSibling,Tr(t,e,n)){while(r=n.firstChild)e.appendChild(r);t.remove(n)}if(n=e.previousSibling,Tr(t,e,n)){while(r=n.lastChild)e.insertBefore(r,e.firstChild);t.remove(n)}},_r=function(t,e,n,r){if(e.nodeName!==n){var o=t.dom.rename(e,n);pr(t.dom,o,r),bn(t,lr(n),o)}else pr(t.dom,e,r),bn(t,lr(n),e)},Er=function(t,e,n,r,o){var i=Ae(e);if(i&&e.nodeName===r&&!Ar(o))ir(t);else{xr(t,r,o);var a=cr(t.selection.getRng()),u=i?H([e],n,!0):n;Te.each(u,(function(e){_r(t,e,r,o)})),t.selection.setRng(sr(a))}},Ar=function(t){return"list-style-type"in t},Dr=function(t,e,n,r){if(e!==t.getBody())if(e)if(e.nodeName!==n||Ar(r)||fr(e)){var o=cr(t.selection.getRng());pr(t.dom,e,r);var i=t.dom.rename(e,n);Or(t.dom,i),t.selection.setRng(sr(o)),xr(t,n,r),bn(t,lr(n),i)}else ir(t);else xr(t,n,r),bn(t,lr(n),e)},Mr=function(t,e,n){var r=nn(t),o=an(t),a=i(n)?n:{};o.length>0?Er(t,r,o,e,a):Dr(t,r,e,a)},Nr=ke.DOM,Rr=function(t,e){var n=e.parentNode;if("LI"===n.nodeName&&n.firstChild===e){var r=n.previousSibling;r&&"LI"===r.nodeName?(r.appendChild(e),Fe(t,n)&&Nr.remove(n)):Nr.setStyle(n,"listStyleType","none")}if(Ae(n)){r=n.previousSibling;r&&"LI"===r.nodeName&&r.appendChild(e)}},zr=function(t,e){var n=Te.grep(t.select("ol,ul",e));Te.each(n,(function(e){Rr(t,e)}))},Br=function(t,e,n,r){var o=e.startContainer,i=e.startOffset;if(Ee(o)&&(n?i<o.data.length:i>0))return o;var a=t.schema.getNonEmptyElements();1===o.nodeType&&(o=Kt.getNode(o,i));var u=new Xt(o,r);n&&He(t.dom,o)&&u.next();while(o=u[n?"next":"prev2"]()){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(a[o.nodeName])return o;if(Ee(o)&&o.data.length>0)return o}},Pr=function(t,e){var n=e.childNodes;return 1===n.length&&!Ae(n[0])&&t.isBlock(n[0])},Ir=function(t,e){Pr(t,e)&&t.remove(e.firstChild,!0)},Lr=function(t,e,n){var r,o=Pr(t,n)?n.firstChild:n;if(Ir(t,e),!Fe(t,e,!0))while(r=e.firstChild)o.appendChild(r)},Hr=function(t,e,n){var r,o=e.parentNode;if(Ve(t,e)&&Ve(t,n)){Ae(n.lastChild)&&(r=n.lastChild),o===n.lastChild&&Be(o.previousSibling)&&t.remove(o.previousSibling);var i=n.lastChild;i&&Be(i)&&e.hasChildNodes()&&t.remove(i),Fe(t,n,!0)&&t.$(n).empty(),Lr(t,e,n),r&&n.appendChild(r);var a=qt(Vt.fromDom(n),Vt.fromDom(e)),u=a?t.getParents(e,Ae,n):[];t.remove(e),T(u,(function(e){Fe(t,e)&&e!==t.getRoot()&&t.remove(e)}))}},Fr=function(t,e,n){t.dom.$(n).empty(),Hr(t.dom,e,n),t.selection.setCursorLocation(n,0)},Vr=function(t,e,n,r){var o=t.dom;if(o.isEmpty(r))Fr(t,n,r);else{var i=cr(e);Hr(o,n,r),t.selection.setRng(sr(i))}},jr=function(t,e,n,r){var o=cr(e);Hr(t.dom,n,r);var i=sr(o);t.selection.setRng(i)},Ur=function(t,e){var n=t.dom,r=t.selection,o=r.getStart(),i=ln(t,o),a=n.getParent(r.getStart(),"LI",i);if(a){var u=a.parentNode;if(u===t.getBody()&&Fe(n,u))return!0;var c=tn(r.getRng()),s=n.getParent(Br(t,c,e,i),"LI",i);if(s&&s!==a)return t.undoManager.transact((function(){e?Vr(t,c,s,a):Pe(a)?or(t):jr(t,c,a,s)})),!0;if(!s&&!e&&0===c.startOffset&&0===c.endOffset)return t.undoManager.transact((function(){ir(t)})),!0}return!1},Wr=function(t,e,n){var r=t.getParent(e.parentNode,t.isBlock,n);t.remove(e),r&&t.isEmpty(r)&&t.remove(r)},$r=function(t,e){var n=t.dom,r=t.selection.getStart(),o=ln(t,r),i=n.getParent(r,n.isBlock,o);if(i&&n.isEmpty(i)){var a=tn(t.selection.getRng()),u=n.getParent(Br(t,a,e,o),"LI",o);if(u)return t.undoManager.transact((function(){Wr(n,i,o),Or(n,u.parentNode),t.selection.select(u,!0),t.selection.collapse(e)})),!0}return!1},qr=function(t,e){return Ur(t,e)||$r(t,e)},Gr=function(t){var e=t.selection.getStart(),n=ln(t,e),r=t.dom.getParent(e,"LI,DT,DD",n);return!!(r||cn(t).length>0)&&(t.undoManager.transact((function(){t.execCommand("Delete"),zr(t.dom,t.getBody())})),!0)},Kr=function(t,e){return t.selection.isCollapsed()?qr(t,e):Gr(t)},Xr=function(t){t.on("keydown",(function(e){e.keyCode===Yt.BACKSPACE?Kr(t,!1)&&e.preventDefault():e.keyCode===Yt.DELETE&&Kr(t,!0)&&e.preventDefault()}))},Yr=function(t){return{backspaceDelete:function(e){Kr(t,e)}}},Jr=function(t,e){var n=nn(t);t.undoManager.transact((function(){i(e.styles)&&t.dom.setStyles(n,e.styles),i(e.attrs)&&Zt(e.attrs,(function(e,r){return t.dom.setAttrib(n,r,e)}))}))},Zr=function(t){var e=R(tt(t).split("")),n=k(e,(function(t,e){var n=t.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,e)*n}));return E(n,(function(t,e){return t+e}),0)},Qr=function(t){if(t--,t<0)return"";var e=t%26,n=Math.floor(t/26),r=Qr(n),o=String.fromCharCode("A".charCodeAt(0)+e);return r+o},to=function(t){return/^[A-Z]+$/.test(t)},eo=function(t){return/^[a-z]+$/.test(t)},no=function(t){return/^[0-9]+$/.test(t)},ro=function(t){return no(t)?2:to(t)?0:eo(t)?1:nt(t)?3:4},oo=function(t){switch(ro(t)){case 2:return x.some({listStyleType:x.none(),start:t});case 0:return x.some({listStyleType:x.some("upper-alpha"),start:Zr(t).toString()});case 1:return x.some({listStyleType:x.some("lower-alpha"),start:Zr(t).toString()});case 3:return x.some({listStyleType:x.none(),start:""});case 4:return x.none()}},io=function(t){var e=parseInt(t.start,10);return hn(t.listStyleType,"upper-alpha")?Qr(e):hn(t.listStyleType,"lower-alpha")?Qr(e).toLowerCase():t.start},ao=function(t){var e=nn(t);Me(e)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:io({start:t.dom.getAttrib(e,"start","1"),listStyleType:x.some(t.dom.getStyle(e,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=e.getData();oo(n.start).each((function(e){t.execCommand("mceListUpdate",!1,{attrs:{start:"1"===e.start?"":e.start},styles:{"list-style-type":e.listStyleType.getOr("")}})})),e.close()}})},uo=function(t,e){return function(){var n=nn(t);return n&&n.nodeName===e}},co=function(t){t.addCommand("mceListProps",(function(){ao(t)}))},so=function(t){t.on("BeforeExecCommand",(function(e){var n=e.command.toLowerCase();"indent"===n?rr(t):"outdent"===n&&or(t)})),t.addCommand("InsertUnorderedList",(function(e,n){Mr(t,"UL",n)})),t.addCommand("InsertOrderedList",(function(e,n){Mr(t,"OL",n)})),t.addCommand("InsertDefinitionList",(function(e,n){Mr(t,"DL",n)})),t.addCommand("RemoveList",(function(){ir(t)})),co(t),t.addCommand("mceListUpdate",(function(e,n){i(n)&&Jr(t,n)})),t.addQueryStateHandler("InsertUnorderedList",uo(t,"UL")),t.addQueryStateHandler("InsertOrderedList",uo(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",uo(t,"DL"))},lo=function(t){t.on("keydown",(function(e){e.keyCode!==Yt.TAB||Yt.metaKeyPressed(e)||t.undoManager.transact((function(){(e.shiftKey?or(t):rr(t))&&e.preventDefault()}))}))},fo=function(t){je(t)&&lo(t),Xr(t)},mo=function(t){var e=function(e){return function(){return t.execCommand(e)}};t.hasPlugin("advlist")||(t.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:e("InsertOrderedList"),onSetup:function(e){return dr(t,"OL",e.setActive)}}),t.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:e("InsertUnorderedList"),onSetup:function(e){return dr(t,"UL",e.setActive)}}))},go=function(t){var e={text:"List properties...",icon:"ordered-list",onAction:function(){return t.execCommand("mceListProps")},onSetup:function(e){return dr(t,"OL",(function(t){return e.setDisabled(!t)}))}};t.ui.registry.addMenuItem("listprops",e),t.ui.registry.addContextMenu("lists",{update:function(e){var n=nn(t,e);return Me(n)?["listprops"]:[]}})};function ho(){t.add("lists",(function(t){return!1===t.hasPlugin("rtc",!0)?(fo(t),so(t)):co(t),mo(t),go(t),Yr(t)}))}ho()})()},"24e8":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},n=function(t,e){return-1!==t.indexOf(e)},r=function(t,n){return e(t,n,0)},o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(){return/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g},a=new RegExp("^"+i().source+"$","i"),u=function(t){return t.getParam("autolink_pattern",a)},c=function(t){return t.getParam("default_link_target",!1)},s=function(t){return t.getParam("link_default_protocol","http","string")},l=function(t){return/^[(\[{ \u00a0]$/.test(t)},f=function(t){return 3===t.nodeType},d=function(t){return 1===t.nodeType},m=function(t){return x(t,-1)},g=function(t){return x(t,0)},h=function(t){return x(t,-1)},p=function(t,e){if(e<0&&(e=0),f(t)){var n=t.data.length;e>n&&(e=n)}return e},v=function(t,e,n){!d(e)||e.hasChildNodes()?t.setStart(e,p(e,n)):t.setStartBefore(e)},b=function(t,e,n){!d(e)||e.hasChildNodes()?t.setEnd(e,p(e,n)):t.setEndAfter(e)},y=function(t){return/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(t)},w=function(t){return/[?!,.;:]/.test(t)},x=function(t,e){var o,i,a,d,m,g,h,p=u(t),x=c(t);if(null===t.dom.getParent(t.selection.getNode(),"a[href]")){var C=t.selection.getRng().cloneRange();if(C.startOffset<5){if(m=C.endContainer.previousSibling,!m){if(!C.endContainer.firstChild||!C.endContainer.firstChild.nextSibling)return;m=C.endContainer.firstChild.nextSibling}if(g=m.length,v(C,m,g),b(C,m,g),C.endOffset<5)return;o=C.endOffset,i=m}else{if(i=C.endContainer,!f(i)&&i.firstChild){while(!f(i)&&i.firstChild)i=i.firstChild;f(i)&&(v(C,i,0),b(C,i,i.nodeValue.length))}o=1===C.endOffset?2:C.endOffset-1-e}var S=o;do{v(C,i,o>=2?o-2:0),b(C,i,o>=1?o-1:0),o-=1,h=C.toString()}while(!l(h)&&o-2>=0);l(C.toString())?(v(C,i,o),b(C,i,S),o+=1):0===C.startOffset?(v(C,i,0),b(C,i,S)):(v(C,i,o),b(C,i,S)),d=C.toString(),w(d.charAt(d.length-1))&&b(C,i,S-1),d=C.toString().trim();var k=d.match(p),T=s(t);if(k){var O=k[0];r(O,"www.")?O=T+"://"+O:n(O,"@")&&!y(O)&&(O="mailto:"+O),a=t.selection.getBookmark(),t.selection.setRng(C),t.execCommand("createlink",!1,O),!1!==x&&t.dom.setAttrib(t.selection.getNode(),"target",x),t.selection.moveToBookmark(a),t.nodeChanged()}}},C=function(t){var e;t.on("keydown",(function(e){if(13===e.keyCode)return h(t)})),o.browser.isIE()?t.on("focus",(function(){if(!e){e=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}})):(t.on("keypress",(function(e){if(41===e.keyCode||93===e.keyCode||125===e.keyCode)return m(t)})),t.on("keyup",(function(e){if(32===e.keyCode)return g(t)})))};function S(){t.add("autolink",(function(t){C(t)}))}S()})()},2519:function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},r=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},o=function(t){return function(e){return r(e)===t}},i=function(t){return function(e){return typeof e===t}},a=o("string"),u=o("array"),c=i("boolean"),s=i("number"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=f(!1),g=f(!0),h="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]",p=f(h),v=function(){return b},b=function(){var t=function(t){return t()},e=d,n={fold:function(t,e){return t()},isSome:m,isNone:g,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:e,orThunk:t,map:v,each:l,bind:v,exists:m,forall:g,filter:function(){return v()},toArray:function(){return[]},toString:f("none()")};return n}(),y=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return y(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:b},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},w=function(t){return null===t||void 0===t?b:y(t)},x={some:y,none:v,from:w},C=p,S=tinymce.util.Tools.resolve("tinymce.Env"),k=tinymce.util.Tools.resolve("tinymce.util.Tools"),T=Array.prototype.slice,O=Array.prototype.push,_=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},E=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},A=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},D=function(t,e){if(0===t.length)return[];for(var n=e(t[0]),r=[],o=[],i=0,a=t.length;i<a;i++){var u=t[i],c=e(u);c!==n&&(r.push(o),o=[]),n=c,o.push(u)}return 0!==o.length&&r.push(o),r},M=function(t,e,n){return E(t,(function(t,r){n=e(n,t,r)})),n},N=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);O.apply(e,t[n])}return e},R=function(t,e){return N(_(t,e))},z=function(t,e){var n=T.call(t,0);return n.sort(e),n},B=Object.hasOwnProperty,P=function(t,e){return B.call(t,e)};"undefined"!==typeof window?window:Function("return this;")();var I=9,L=11,H=1,F=3,V=function(t){return t.dom.nodeType},j=function(t){return function(e){return V(e)===t}},U=j(F),W=function(t,e,n){if(!(a(n)||c(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},$=function(t,e,n){W(t.dom,e,n)},q=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},G=function(t,e){return q(t,e,Node.DOCUMENT_POSITION_PRECEDING)},K=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return J(r.childNodes[0])},X=function(t,e){var n=e||document,r=n.createElement(t);return J(r)},Y=function(t,e){var n=e||document,r=n.createTextNode(t);return J(r)},J=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},Z=function(t,e,n){return x.from(t.dom.elementFromPoint(e,n)).map(J)},Q={fromHtml:K,fromTag:X,fromText:Y,fromDom:J,fromPoint:Z},tt=function(t){return t.nodeType!==H&&t.nodeType!==I&&t.nodeType!==L||0===t.childElementCount},et=function(t,e){var n=void 0===e?document:e.dom;return tt(n)?[]:_(n.querySelectorAll(t),Q.fromDom)},nt=function(t){return x.from(t.dom.parentNode).map(Q.fromDom)},rt=function(t){return _(t.dom.childNodes,Q.fromDom)},ot=function(t,e){return{element:t,offset:e}},it=function(t,e){var n=rt(t);return n.length>0&&e<n.length?ot(n[e],0):ot(t,e)},at=function(t,e){var n=nt(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},ut=function(t,e){t.dom.appendChild(e.dom)},ct=function(t,e){at(t,e),ut(e,t)},st=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?x.from(e.dom.nodeValue):x.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},lt=st(U,"text"),ft=function(t){return lt.get(t)},dt=function(t,e){return et(e,t)},mt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),gt=function(t,e){return t.isBlock(e)||P(t.schema.getShortEndedElements(),e.nodeName)},ht=function(t,e){return"false"===t.getContentEditable(e)},pt=function(t,e){return"true"===t.getContentEditable(e)&&"false"===t.getContentEditableParent(e.parentNode)},vt=function(t,e){return!t.isBlock(e)&&P(t.schema.getWhiteSpaceElements(),e.nodeName)},bt=function(t,e){return gt(t,e)||ht(t,e)||vt(t,e)||pt(t,e)},yt=function(t){return 3===t.nodeType},wt=function(){return{sOffset:0,fOffset:0,elements:[]}},xt=function(t,e){return it(Q.fromDom(t),e)},Ct=function(t,e,n,r,o,i){void 0===i&&(i=!0);var a=i?e(!1):n;while(a){var u=ht(t,a);if(u||vt(t,a)){var c=u?r.cef(a):r.boundary(a);if(c)break;a=e(!0)}else{if(gt(t,a)){if(r.boundary(a))break}else yt(a)&&r.text(a);if(a===o)break;a=e(!1)}}},St=function(t,e,n,r,o){if(!bt(t,n)){var i=t.getParent(r,t.isBlock),a=new mt(n,i),u=o?a.next.bind(a):a.prev.bind(a);Ct(t,u,n,{boundary:g,cef:g,text:function(t){o?e.fOffset+=t.length:e.sOffset+=t.length,e.elements.push(Q.fromDom(t))}})}},kt=function(t,e,n,r,o,i){void 0===i&&(i=!0);var a=new mt(n,e),u=[],c=wt();St(t,c,n,e,!1);var s=function(){return c.elements.length>0&&(u.push(c),c=wt()),!1};return Ct(t,a.next.bind(a),n,{boundary:s,cef:function(t){return s(),o&&u.push.apply(u,o.cef(t)),!1},text:function(t){c.elements.push(Q.fromDom(t)),o&&o.text(t,c)}},r,i),r&&St(t,c,r,e,!0),s(),u},Tt=function(t,e){var n=xt(e.startContainer,e.startOffset),r=n.element.dom,o=xt(e.endContainer,e.endOffset),i=o.element.dom;return kt(t,e.commonAncestorContainer,r,i,{text:function(t,e){t===i?e.fOffset+=t.length-o.offset:t===r&&(e.sOffset+=n.offset)},cef:function(e){var n=R(dt(Q.fromDom(e),"*[contenteditable=true]"),(function(e){var n=e.dom;return kt(t,n,n)}));return z(n,(function(t,e){return G(t.elements[0].dom,e.elements[0].dom)?1:-1}))}},!1)},Ot=function(t,e){return e.collapsed?[]:Tt(t,e)},_t=function(t,e){var n=t.createRng();return n.selectNode(e),Ot(t,n)},Et=function(t,e){return R(e,(function(e){return _t(t,e)}))},At=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=e.regex;o.lastIndex=n;var i,a=[];while(i=o.exec(t)){var u=i[e.matchIndex],c=i.index+i[0].indexOf(u),s=c+u.length;if(s>r)break;a.push({start:c,finish:s}),o.lastIndex=s}return a},Dt=function(t,e){var n=M(t,(function(t,n){var r=ft(n),o=t.last,i=o+r.length,a=R(e,(function(t,e){return t.start<i&&t.finish>o?[{element:n,start:Math.max(o,t.start)-o,finish:Math.min(i,t.finish)-o,matchId:e}]:[]}));return{results:t.results.concat(a),last:i}}),{results:[],last:0}).results;return D(n,(function(t){return t.matchId}))},Mt=function(t,e){return R(e,(function(e){var n=e.elements,r=_(n,ft).join(""),o=At(r,t,e.sOffset,r.length-e.fOffset);return Dt(n,o)}))},Nt=function(t,e){A(t,(function(t,n){A(t,(function(t){var r=Q.fromDom(e.cloneNode(!1));$(r,"data-mce-index",n);var o=t.element.dom;if(o.length===t.finish&&0===t.start)ct(t.element,r);else{o.length!==t.finish&&o.splitText(t.finish);var i=o.splitText(t.start);ct(Q.fromDom(i),r)}}))}))},Rt=function(t,e,n,r){var o=_t(t,n),i=Mt(e,o);return Nt(i,r),i.length},zt=function(t,e,n,r){var o=n.getBookmark(),i=t.select("td[data-mce-selected],th[data-mce-selected]"),a=i.length>0?Et(t,i):Ot(t,n.getRng()),u=Mt(e,a);return Nt(u,r),n.moveToBookmark(o),u.length},Bt=function(t){var e=t.getAttribute("data-mce-index");return"number"===typeof e?""+e:e},Pt=function(t,e,n,r){var o=t.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";var i=t.getBody();return Gt(t,e,!1),r?zt(t.dom,n,t.selection,o):Rt(t.dom,n,i,o)},It=function(t){var e=t.parentNode;t.firstChild&&e.insertBefore(t.firstChild,t),t.parentNode.removeChild(t)},Lt=function(t,e){var n=[],r=k.toArray(t.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var i=Bt(r[o]);null!==i&&i.length&&(i===e.toString()&&n.push(r[o]))}return n},Ht=function(t,e,n){var r=e.get(),o=r.index,i=t.dom;n=!1!==n,n?o+1===r.count?o=0:o++:o-1===-1?o=r.count-1:o--,i.removeClass(Lt(t,r.index),"mce-match-marker-selected");var a=Lt(t,o);return a.length?(i.addClass(Lt(t,o),"mce-match-marker-selected"),t.selection.scrollIntoView(a[0]),o):-1},Ft=function(t,e){var n=e.parentNode;t.remove(e),t.isEmpty(n)&&t.remove(n)},Vt=function(t,e){var n=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]"),r="("+n+")";return e?"(?:^|\\s|"+C()+")"+r+"(?=$|\\s|"+C()+")":r},jt=function(t,e,n,r,o,i){var a=t.selection,u=Vt(n,o),c=a.isForward(),s={regex:new RegExp(u,r?"g":"gi"),matchIndex:1},l=Pt(t,e,s,i);if(S.browser.isSafari()&&a.setRng(a.getRng(),c),l){var f=Ht(t,e,!0);e.set({index:f,count:l,text:n,matchCase:r,wholeWord:o,inSelection:i})}return l},Ut=function(t,e){var r=Ht(t,e,!0);e.set(n(n({},e.get()),{index:r}))},Wt=function(t,e){var r=Ht(t,e,!1);e.set(n(n({},e.get()),{index:r}))},$t=function(t){var e=Bt(t);return null!==e&&e.length>0},qt=function(t,e,r,o,i){var a,u=e.get(),c=u.index,s=c;o=!1!==o;for(var l=t.getBody(),f=k.grep(k.toArray(l.getElementsByTagName("span")),$t),d=0;d<f.length;d++){var m=Bt(f[d]),g=a=parseInt(m,10);if(i||g===u.index){r.length?(f[d].firstChild.nodeValue=r,It(f[d])):Ft(t.dom,f[d]);while(f[++d]){if(g=parseInt(Bt(f[d]),10),g!==a){d--;break}Ft(t.dom,f[d])}o&&s--}else a>c&&f[d].setAttribute("data-mce-index",String(a-1))}return e.set(n(n({},u),{count:i?0:u.count-1,index:s})),o?Ut(t,e):Wt(t,e),!i&&e.get().count>0},Gt=function(t,e,r){for(var o,i,a=e.get(),u=k.toArray(t.getBody().getElementsByTagName("span")),c=0;c<u.length;c++){var s=Bt(u[c]);null!==s&&s.length&&(s===a.index.toString()&&(o||(o=u[c].firstChild),i=u[c].firstChild),It(u[c]))}if(e.set(n(n({},a),{index:-1,count:0,text:""})),o&&i){var l=t.dom.createRng();return l.setStart(o,0),l.setEnd(i,i.data.length),!1!==r&&t.selection.setRng(l),l}},Kt=function(t,e){return e.get().count>1},Xt=function(t,e){return e.get().count>1},Yt=function(t,e){var n=function(n){return Gt(t,e,n)},r=function(n,r,o,i){return void 0===i&&(i=!1),jt(t,e,n,r,o,i)},o=function(){return Ut(t,e)},i=function(){return Wt(t,e)},a=function(n,r,o){return qt(t,e,n,r,o)};return{done:n,find:r,next:o,prev:i,replace:a}},Jt=function(e){var n=t(x.none()),r=function(){return n.get().each(e)},o=function(){r(),n.set(x.none())},i=function(){return n.get().isSome()},a=function(){return n.get()},u=function(t){r(),n.set(x.some(t))};return{clear:o,isSet:i,get:a,set:u}},Zt=function(){var t=Jt(l),e=function(e){return t.get().each(e)};return n(n({},t),{on:e})},Qt=function(t,e){var r=Zt();t.undoManager.add();var o=k.trim(t.selection.getContent({format:"text"})),i=function(n){var r=Kt(t,e)?n.enable:n.disable;r("next");var o=Xt(t,e)?n.enable:n.disable;o("prev")},a=function(t){var r=t.getData(),o=e.get();e.set(n(n({},o),{matchCase:r.matchcase,wholeWord:r.wholewords,inSelection:r.inselection}))},u=function(t,e){var n=["replace","replaceall","prev","next"],r=e?t.disable:t.enable;E(n,r)},c=function(e){t.windowManager.alert("Could not find the specified string.",(function(){e.focus("findtext")}))},s=function(t,e){S.browser.isSafari()&&S.deviceType.isTouch()&&("find"===e||"replace"===e||"replaceall"===e)&&t.focus(e)},l=function(n){Gt(t,e,!1),u(n,!0),i(n)},f=function(n){var r=n.getData(),o=e.get();if(r.findtext.length){if(o.text===r.findtext&&o.matchCase===r.matchcase&&o.wholeWord===r.wholewords)Ut(t,e);else{var a=jt(t,e,r.findtext,r.matchcase,r.wholewords,r.inselection);a<=0&&c(n),u(n,0===a)}i(n)}else l(n)},d=e.get(),m={findtext:o,replacetext:"",wholewords:d.wholeWord,matchcase:d.matchCase,inselection:d.inSelection},g={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace all",disabled:!0}],initialData:m,onChange:function(t,n){"findtext"===n.name&&e.get().count>0&&l(t)},onAction:function(n,r){var o=n.getData();switch(r.name){case"find":f(n);break;case"replace":qt(t,e,o.replacetext)?i(n):l(n);break;case"replaceall":qt(t,e,o.replacetext,!0,!0),l(n);break;case"prev":Wt(t,e),i(n);break;case"next":Ut(t,e),i(n);break;case"matchcase":case"wholewords":case"inselection":a(n),l(n);break}s(n,r.name)},onSubmit:function(t){f(t),s(t,"find")},onClose:function(){t.focus(),Gt(t,e),t.undoManager.add()}};r.set(t.windowManager.open(g,{inline:"toolbar"}))},te=function(t,e){t.addCommand("SearchReplace",(function(){Qt(t,e)}))},ee=function(t,e){return function(){Qt(t,e)}},ne=function(t,e){t.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:ee(t,e),icon:"search"}),t.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:ee(t,e),icon:"search"}),t.shortcuts.add("Meta+F","",ee(t,e))};function re(){e.add("searchreplace",(function(e){var n=t({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return te(e,n),ne(e,n),Yt(e,n)}))}re()})()},"2b07":function(t,e,n){n("dbbc")},"2fec":function(t,e,n){n("24e8")},3154:function(t,e,n){n("f034")},"365e":function(t,e,n){n("cf08")},3699:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)},n=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return function(e){return n(e)===t}},o=r("string"),i=r("object"),a=r("array"),u=function(t){return null===t||void 0===t},c=function(t){return!u(t)},s=function(){},l=function(t){return function(){return t}},f=function(t){return t},d=l(!1),m=l(!0),g=function(){return h},h=function(){var t=function(t){return t()},e=f,n={fold:function(t,e){return t()},isSome:d,isNone:m,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(void 0),or:e,orThunk:t,map:g,each:s,bind:g,exists:d,forall:m,filter:function(){return g()},toArray:function(){return[]},toString:l("none()")};return n}(),p=function(t){var e=l(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:m,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return p(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:h},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},v=function(t){return null===t||void 0===t?h:p(t)},b={some:p,none:g,from:v},y=Array.prototype.push,w=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},x=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);y.apply(e,t[n])}return e},C=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},S=Object.keys,k=Object.hasOwnProperty,T=function(t,e){for(var n=S(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},O=function(t,e){return _(t,e)?b.from(t[e]):b.none()},_=function(t,e){return k.call(t,e)},E=function(t){return t.getParam("media_scripts")},A=function(t){return t.getParam("audio_template_callback")},D=function(t){return t.getParam("video_template_callback")},M=function(t){return t.getParam("media_live_embeds",!0)},N=function(t){return t.getParam("media_filter_html",!0)},R=function(t){return t.getParam("media_url_resolver")},z=function(t){return t.getParam("media_alt_source",!0)},B=function(t){return t.getParam("media_poster",!0)},P=function(t){return t.getParam("media_dimensions",!0)},I=tinymce.util.Tools.resolve("tinymce.util.Tools"),L=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),H=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),F=function(t,e){if(t)for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n].filter))return t[n]},V=L.DOM,j=function(t){return t.replace(/px$/,"")},U=function(t){var e=t.map.style,n=e?V.parseStyle(e):{};return{type:"ephox-embed-iri",source:t.map["data-ephox-embed-iri"],altsource:"",poster:"",width:O(n,"max-width").map(j).getOr(""),height:O(n,"max-height").map(j).getOr("")}},W=function(t,e){var n=C(!1),r={};return H({validate:!1,allow_conditional_comments:!0,start:function(e,o){if(n.get());else if(_(o.map,"data-ephox-embed-iri"))n.set(!0),r=U(o);else{if(r.source||"param"!==e||(r.source=o.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(r.type||(r.type=e),r=I.extend(o.map,r)),"script"===e){var i=F(t,o.map.src);if(!i)return;r={type:"script",source:o.map.src,width:String(i.width),height:String(i.height)}}"source"===e&&(r.source?r.altsource||(r.altsource=o.map.src):r.source=o.map.src),"img"!==e||r.poster||(r.poster=o.map.src)}}}).parse(e),r.source=r.source||r.src||r.data,r.altsource=r.altsource||"",r.poster=r.poster||"",r},$=function(t){var e={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},n=t.toLowerCase().split(".").pop(),r=e[n];return r||""},q=tinymce.util.Tools.resolve("tinymce.html.Schema"),G=tinymce.util.Tools.resolve("tinymce.html.Writer"),K=L.DOM,X=function(t){return/^[0-9.]+$/.test(t)?t+"px":t},Y=function(t,e){T(e,(function(e,n){var r=""+e;if(t.map[n]){var o=t.length;while(o--){var i=t[o];i.name===n&&(r?(t.map[n]=r,i.value=r):(delete t.map[n],t.splice(o,1)))}}else r&&(t.push({name:n,value:r}),t.map[n]=r)}))},J=function(t,e){var n=e.map.style,r=n?K.parseStyle(n):{};r["max-width"]=X(t.width),r["max-height"]=X(t.height),Y(e,{style:K.serializeStyle(r)})},Z=["source","altsource"],Q=function(t,e,n){var r,o=G(),i=C(!1),a=0;return H({validate:!1,allow_conditional_comments:!0,comment:function(t){o.comment(t)},cdata:function(t){o.cdata(t)},text:function(t,e){o.text(t,e)},start:function(t,u,c){if(i.get());else if(_(u.map,"data-ephox-embed-iri"))i.set(!0),J(e,u);else{switch(t){case"video":case"object":case"embed":case"img":case"iframe":void 0!==e.height&&void 0!==e.width&&Y(u,{width:e.width,height:e.height});break}if(n)switch(t){case"video":Y(u,{poster:e.poster,src:""}),e.altsource&&Y(u,{src:""});break;case"iframe":Y(u,{src:e.source});break;case"source":if(a<2&&(Y(u,{src:e[Z[a]],type:e[Z[a]+"mime"]}),!e[Z[a]]))return;a++;break;case"img":if(!e.poster)return;r=!0;break}}o.start(t,u,c)},end:function(t){if(!i.get()){if("video"===t&&n)for(var u=0;u<2;u++)if(e[Z[u]]){var c=[];c.map={},a<=u&&(Y(c,{src:e[Z[u]],type:e[Z[u]+"mime"]}),o.start("source",c,!0))}if(e.poster&&"object"===t&&n&&!r){var s=[];s.map={},Y(s,{src:e.poster,width:e.width,height:e.height}),o.start("img",s,!0)}}o.end(t)}},q({})).parse(t),o.getContent()},tt=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],et=function(t){var e=t.match(/^(https?:\/\/|www\.)(.+)$/i);return e&&e.length>1?"www."===e[1]?"https://":e[1]:"https://"},nt=function(t,e){for(var n=et(e),r=t.regex.exec(e),o=n+t.url,i=function(t){o=o.replace("$"+t,(function(){return r[t]?r[t]:""}))},a=0;a<r.length;a++)i(a);return o.replace(/\?$/,"")},rt=function(t){var e=tt.filter((function(e){return e.regex.test(t)}));return e.length>0?I.extend({},e[0],{url:nt(e[0],t)}):null},ot=function(t){var e=t.allowfullscreen?' allowFullscreen="1"':"";return'<iframe src="'+t.source+'" width="'+t.width+'" height="'+t.height+'"'+e+"></iframe>"},it=function(t){var e='<object data="'+t.source+'" width="'+t.width+'" height="'+t.height+'" type="application/x-shockwave-flash">';return t.poster&&(e+='<img src="'+t.poster+'" width="'+t.width+'" height="'+t.height+'" />'),e+="</object>",e},at=function(t,e){return e?e(t):'<audio controls="controls" src="'+t.source+'">'+(t.altsource?'\n<source src="'+t.altsource+'"'+(t.altsourcemime?' type="'+t.altsourcemime+'"':"")+" />\n":"")+"</audio>"},ut=function(t,e){return e?e(t):'<video width="'+t.width+'" height="'+t.height+'"'+(t.poster?' poster="'+t.poster+'"':"")+' controls="controls">\n<source src="'+t.source+'"'+(t.sourcemime?' type="'+t.sourcemime+'"':"")+" />\n"+(t.altsource?'<source src="'+t.altsource+'"'+(t.altsourcemime?' type="'+t.altsourcemime+'"':"")+" />\n":"")+"</video>"},ct=function(t){return'<script src="'+t.source+'"><\/script>'},st=function(t,e){var n=I.extend({},e);if(!n.source&&(I.extend(n,W(E(t),n.embed)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=t.convertURL(n.source,"source"),n.altsource=t.convertURL(n.altsource,"source"),n.sourcemime=$(n.source),n.altsourcemime=$(n.altsource),n.poster=t.convertURL(n.poster,"poster");var r=rt(n.source);if(r&&(n.source=r.url,n.type=r.type,n.allowfullscreen=r.allowFullscreen,n.width=n.width||String(r.w),n.height=n.height||String(r.h)),n.embed)return Q(n.embed,n,!0);var o=F(E(t),n.source);o&&(n.type="script",n.width=String(o.width),n.height=String(o.height));var i=A(t),a=D(t);return n.width=n.width||"300",n.height=n.height||"150",I.each(n,(function(e,r){n[r]=t.dom.encode(""+e)})),"iframe"===n.type?ot(n):"application/x-shockwave-flash"===n.sourcemime?it(n):-1!==n.sourcemime.indexOf("audio")?at(n,i):"script"===n.type?ct(n):ut(n,a)},lt=function(t){return t.hasAttribute("data-mce-object")||t.hasAttribute("data-ephox-embed-iri")},ft=function(t){t.on("click keyup touchend",(function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")})),t.on("ObjectSelected",(function(t){var e=t.target.getAttribute("data-mce-object");"script"===e&&t.preventDefault()})),t.on("ObjectResized",(function(t){var e=t.target;if(e.getAttribute("data-mce-object")){var n=e.getAttribute("data-mce-html");n&&(n=unescape(n),e.setAttribute("data-mce-html",escape(Q(n,{width:String(t.width),height:String(t.height)}))))}}))},dt=tinymce.util.Tools.resolve("tinymce.util.Promise"),mt={},gt=function(t,e,n){return new dt((function(r,o){var i=function(n){return n.html&&(mt[t.source]=n),r({url:t.source,html:n.html?n.html:e(t)})};mt[t.source]?i(mt[t.source]):n({url:t.source},i,o)}))},ht=function(t,e){return dt.resolve({html:e(t),url:t.source})},pt=function(t){return function(e){return st(t,e)}},vt=function(t,e){var n=R(t);return n?gt(e,pt(t),n):ht(e,pt(t))},bt=function(t){return _(mt,t)},yt=function(t,e){return O(e,t).bind((function(t){return O(t,"meta")}))},wt=function(t,e,n){return function(r){var o,a=function(){return O(t,r)},u=function(){return O(e,r)},c=function(t){return O(t,"value").bind((function(t){return t.length>0?b.some(t):b.none()}))},s=function(){return a().bind((function(t){return i(t)?c(t).orThunk(u):u().orThunk((function(){return b.from(t)}))}))},l=function(){return u().orThunk((function(){return a().bind((function(t){return i(t)?c(t):b.from(t)}))}))};return o={},o[r]=(r===n?s():l()).getOr(""),o}},xt=function(t,e){var n={};return O(t,"dimensions").each((function(t){w(["width","height"],(function(r){O(e,r).orThunk((function(){return O(t,r)})).each((function(t){return n[r]=t}))}))})),n},Ct=function(t,n){var r=n?yt(n,t).getOr({}):{},o=wt(t,r,n);return e(e(e(e(e({},o("source")),o("altsource")),o("poster")),o("embed")),xt(t,r))},St=function(t){var n=e(e({},t),{source:{value:O(t,"source").getOr("")},altsource:{value:O(t,"altsource").getOr("")},poster:{value:O(t,"poster").getOr("")}});return w(["width","height"],(function(e){O(t,e).each((function(t){var r=n.dimensions||{};r[e]=t,n.dimensions=r}))})),n},kt=function(t){return function(e){var n=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";t.notificationManager.open({type:"error",text:n})}},Tt=function(t,e){return W(E(t),e)},Ot=function(t){var n=t.selection.getNode(),r=lt(n)?t.serializer.serialize(n,{selection:!0}):"";return e({embed:r},W(E(t),r))},_t=function(t,n){return function(r){if(o(r.url)&&r.url.trim().length>0){var i=r.html,a=Tt(n,i),u=e(e({},a),{source:r.url,embed:i});t.setData(St(u))}}},Et=function(t,e){for(var n=t.dom.select("*[data-mce-object]"),r=0;r<e.length;r++)for(var o=n.length-1;o>=0;o--)e[r]===n[o]&&n.splice(o,1);t.selection.select(n[0])},At=function(t,e){var n=t.dom.select("*[data-mce-object]");t.insertContent(e),Et(t,n),t.nodeChanged()},Dt=function(t,e,n){e.embed=Q(e.embed,e),e.embed&&(t.source===e.source||bt(e.source))?At(n,e.embed):vt(n,e).then((function(t){At(n,t.html)})).catch(kt(n))},Mt=function(t){var n=Ot(t),r=C(n),o=St(n),i=function(e,n){var r=Ct(n.getData(),"source");e.source!==r.source&&(_t(v,t)({url:r.source,html:""}),vt(t,r).then(_t(v,t)).catch(kt(t)))},a=function(e){var n=Ct(e.getData()),r=Tt(t,n.embed);e.setData(St(r))},u=function(n,r){var o=Ct(n.getData(),r),i=st(t,o);n.setData(St(e(e({},o),{embed:i})))},c=[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],s=P(t)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],l={title:"General",name:"general",items:x([c,s])},f={type:"textarea",name:"embed",label:"Paste your embed code below:"},d={title:"Embed",items:[f]},m=[];z(t)&&m.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),B(t)&&m.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var g={title:"Advanced",name:"advanced",items:m},h=[l,d];m.length>0&&h.push(g);var p={type:"tabpanel",tabs:h},v=t.windowManager.open({title:"Insert/Edit Media",size:"normal",body:p,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=Ct(e.getData());Dt(r.get(),n,t),e.close()},onChange:function(t,e){switch(e.name){case"source":i(r.get(),t);break;case"embed":a(t);break;case"dimensions":case"altsource":case"poster":u(t,e.name);break}r.set(Ct(t.getData()))},initialData:o})},Nt=function(t){var e=function(){Mt(t)};return{showDialog:e}},Rt=function(t){var e=function(){Mt(t)};t.addCommand("mceMedia",e)},zt=tinymce.util.Tools.resolve("tinymce.html.Node"),Bt=tinymce.util.Tools.resolve("tinymce.Env"),Pt=tinymce.util.Tools.resolve("tinymce.html.DomParser"),It=function(t,e){if(!1===N(t))return e;var n,r=G();return H({validate:!1,allow_conditional_comments:!1,comment:function(t){n||r.comment(t)},cdata:function(t){n||r.cdata(t)},text:function(t,e){n||r.text(t,e)},start:function(e,o,i){if(n=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var a=o.length-1;a>=0;a--){var u=o[a].name;0===u.indexOf("on")&&(delete o.map[u],o.splice(a,1)),"style"===u&&(o[a].value=t.dom.serializeStyle(t.dom.parseStyle(o[a].value),e))}r.start(e,o,i),n=!1}},end:function(t){n||r.end(t)}},q({})).parse(e),r.getContent()},Lt=function(t){var e=t.name;return"iframe"===e||"video"===e||"audio"===e},Ht=function(t,e,n,r){void 0===r&&(r=null);var o=t.attr(n);return c(o)?o:_(e,n)?null:r},Ft=function(t,e,n){var r="img"===e.name||"video"===t.name,o=r?"300":null,i="audio"===t.name?"30":"150",a=r?i:null;e.attr({width:Ht(t,n,"width",o),height:Ht(t,n,"height",a)})},Vt=function(t,e,n,r){var o=Pt({forced_root_block:!1,validate:!1},t.schema).parse(r,{context:e});while(o.firstChild)n.append(o.firstChild)},jt=function(t,e){var n=e.name,r=new zt("img",1);return r.shortEnded=!0,Wt(t,e,r),Ft(e,r,{}),r.attr({style:e.attr("style"),src:Bt.transparentSrc,"data-mce-object":n,class:"mce-object mce-object-"+n}),r},Ut=function(t,e){var n=e.name,r=new zt("span",1);r.attr({contentEditable:"false",style:e.attr("style"),"data-mce-object":n,class:"mce-preview-object mce-object-"+n}),Wt(t,e,r);var o=t.dom.parseStyle(e.attr("style")),i=new zt(n,1);if(Ft(e,i,o),i.attr({src:e.attr("src"),style:e.attr("style"),class:e.attr("class")}),"iframe"===n)i.attr({allowfullscreen:e.attr("allowfullscreen"),frameborder:"0"});else{var a=["controls","crossorigin","currentTime","loop","muted","poster","preload"];w(a,(function(t){i.attr(t,e.attr(t))}));var u=r.attr("data-mce-html");c(u)&&Vt(t,n,i,unescape(u))}var s=new zt("span",1);return s.attr("class","mce-shim"),r.append(i),r.append(s),r},Wt=function(t,e,n){var r=e.attributes,o=r.length;while(o--){var i=r[o].name,a=r[o].value;"width"!==i&&"height"!==i&&"style"!==i&&("data"!==i&&"src"!==i||(a=t.convertURL(a,i)),n.attr("data-mce-p-"+i,a))}var u=e.firstChild&&e.firstChild.value;u&&(n.attr("data-mce-html",escape(It(t,u))),n.firstChild=null)},$t=function(t){var e=t.attr("class");return e&&/\btiny-pageembed\b/.test(e)},qt=function(t){while(t=t.parent)if(t.attr("data-ephox-embed-iri")||$t(t))return!0;return!1},Gt=function(t){return function(e){var n,r,o=e.length;while(o--)n=e[o],n.parent&&(n.parent.attr("data-mce-object")||("script"!==n.name||(r=F(E(t),n.attr("src")),r))&&(r&&(r.width&&n.attr("width",r.width.toString()),r.height&&n.attr("height",r.height.toString())),Lt(n)&&M(t)&&Bt.ceFalse?qt(n)||n.replace(Ut(t,n)):qt(n)||n.replace(jt(t,n))))}},Kt=function(t){t.on("preInit",(function(){var e=t.schema.getSpecialElements();I.each("video audio iframe object".split(" "),(function(t){e[t]=new RegExp("</"+t+"[^>]*>","gi")}));var n=t.schema.getBoolAttrs();I.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),(function(t){n[t]={}})),t.parser.addNodeFilter("iframe,video,audio,object,embed,script",Gt(t)),t.serializer.addAttributeFilter("data-mce-object",(function(e,n){var r,o,i,a,u,c,s,l,f=e.length;while(f--)if(r=e[f],r.parent){s=r.attr(n),o=new zt(s,1),"audio"!==s&&"script"!==s&&(l=r.attr("class"),l&&-1!==l.indexOf("mce-preview-object")?o.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):o.attr({width:r.attr("width"),height:r.attr("height")})),o.attr({style:r.attr("style")}),a=r.attributes,i=a.length;while(i--){var d=a[i].name;0===d.indexOf("data-mce-p-")&&o.attr(d.substr(11),a[i].value)}"script"===s&&o.attr("type","text/javascript"),u=r.attr("data-mce-html"),u&&(c=new zt("#text",3),c.raw=!0,c.value=It(t,unescape(u)),o.append(c)),r.replace(o)}}))})),t.on("SetContent",(function(){t.$("span.mce-preview-object").each((function(e,n){var r=t.$(n);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')}))}))},Xt=function(t){t.on("ResolveName",(function(t){var e;1===t.target.nodeType&&(e=t.target.getAttribute("data-mce-object"))&&(t.name=e)}))},Yt=function(t){var e=function(){return t.execCommand("mceMedia")};t.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:e,onSetup:function(e){var n=t.selection;return e.setActive(lt(n.getNode())),n.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",e.setActive).unbind}}),t.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:e})};function Jt(){t.add("media",(function(t){return Rt(t),Yt(t),Xt(t),Kt(t),ft(t),Nt(t)}))}Jt()})()},3744:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=n("string"),o=n("array"),i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.EditorManager"),u=tinymce.util.Tools.resolve("tinymce.Env"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t){return t.getParam("importcss_merge_classes")},l=function(t){return t.getParam("importcss_exclusive")},f=function(t){return t.getParam("importcss_selector_converter")},d=function(t){return t.getParam("importcss_selector_filter")},m=function(t){return t.getParam("importcss_groups")},g=function(t){return t.getParam("importcss_append")},h=function(t){return t.getParam("importcss_file_filter")},p=function(t){var e=t.getParam("skin");return!1!==e&&(e||"oxide")},v=function(t){return t.getParam("skin_url")},b=Array.prototype.push,y=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},w=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!o(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);b.apply(e,t[n])}return e},x=function(t,e){return w(y(t,e))},C=function(){var t=[],e=[],n={},r=function(t,r){n[t]?n[t].push(r):(e.push(t),n[t]=[r])},o=function(e){t.push(e)},i=function(){var r=x(e,(function(t){var e=n[t];return 0===e.length?[]:[{title:t,items:e}]}));return r.concat(t)};return{addItemToGroup:r,addItem:o,toFormats:i}},S=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,k=function(t){var e=u.cacheSuffix;return r(t)&&(t=t.replace("?"+e,"").replace("&"+e,"")),t},T=function(t,e){var n=p(t);if(n){var r=v(t),o=r?t.documentBaseURI.toAbsolute(r):a.baseURL+"/skins/ui/"+n,i=a.baseURL+"/skins/content/";return e===o+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(i)}return!1},O=function(t){return r(t)?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t},_=function(t){return t.styleSheet},E=function(t){return t.selectorText},A=function(t,e,n){var r=[],o={},i=function(e,o){var a,u=e.href;if(u=k(u),u&&n(u,o)&&!T(t,u)){c.each(e.imports,(function(t){i(t,!0)}));try{a=e.cssRules||e.rules}catch(s){}c.each(a,(function(t){_(t)?i(t.styleSheet,!0):E(t)&&c.each(t.selectorText.split(","),(function(t){r.push(c.trim(t))}))}))}};c.each(t.contentCSS,(function(t){o[t]=!0})),n||(n=function(t,e){return e||o[t]});try{c.each(e.styleSheets,(function(t){i(t)}))}catch(a){}return r},D=function(t,e){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(r){var o=r[1],i=r[2].substr(1).split(".").join(" "),a=c.makeMap("a,img");return r[1]?(n={title:e},t.schema.getTextBlockElements()[o]?n.block=o:t.schema.getBlockElements()[o]||a[o.toLowerCase()]?n.selector=o:n.inline=o):r[2]&&(n={inline:"span",title:e.substr(1),classes:i}),!1!==s(t)?n.classes=i:n.attributes={class:i},n}},M=function(t,e){return c.grep(t,(function(t){return!t.filter||t.filter(e)}))},N=function(t){return c.map(t,(function(t){return c.extend({},t,{original:t,selectors:{},filter:O(t.filter)})}))},R=function(t,e){return null===e||!1!==l(t)},z=function(t,e,n,r){return!(R(t,n)?e in r:e in n.selectors)},B=function(t,e,n,r){R(t,n)?r[e]=!0:n.selectors[e]=!0},P=function(t,e,n,r){var o;return o=r&&r.selector_converter?r.selector_converter:f(t)?f(t):function(){return D(t,n)},o.call(e,n,r)},I=function(t){t.on("init",(function(){var e=C(),n={},r=O(d(t)),o=N(m(t)),a=function(e,r){if(z(t,e,r,n)){B(t,e,r,n);var o=P(t,t.plugins.importcss,e,r);if(o){var a=o.name||i.DOM.uniqueId();return t.formatter.register(a,o),{title:o.title,format:a}}}return null};c.each(A(t,t.getDoc(),O(h(t))),(function(t){if(!S.test(t)&&(!r||r(t))){var n=M(o,t);if(n.length>0)c.each(n,(function(n){var r=a(t,n);r&&e.addItemToGroup(n.title,r)}));else{var i=a(t,null);i&&e.addItem(i)}}}));var u=e.toFormats();t.fire("addStyleModifications",{items:u,replace:!g(t)})}))},L=function(t){var e=function(e){return D(t,e)};return{convertSelectorToFormat:e}};function H(){t.add("importcss",(function(t){return I(t),L(t)}))}H()})()},"3ad8":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function r(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var o=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},i=function(t){return function(e){return o(e)===t}},a=i("string"),u=i("object"),c=i("array"),s=function(){},l=function(t){return function(){return t}},f=function(t){return t},d=function(t){return function(){throw new Error(t)}},m=l(!1),g=l(!0),h=function(){return p},p=function(){var t=function(t){return t()},e=f,n={fold:function(t,e){return t()},isSome:m,isNone:g,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(void 0),or:e,orThunk:t,map:h,each:s,bind:h,exists:m,forall:g,filter:function(){return h()},toArray:function(){return[]},toString:l("none()")};return n}(),v=function(t){var e=l(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b=function(t){return null===t||void 0===t?p:v(t)},y={some:v,none:h,from:b},w=Array.prototype.slice,x=Array.prototype.indexOf,C=function(t,e){return x.call(t,e)},S=function(t,e){return C(t,e)>-1},k=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},T=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},O=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},_=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},E=function(t,e,n){return O(t,(function(t,r){n=e(n,t,r)})),n},A=function(t,e,n){return T(t,(function(t,r){n=e(n,t,r)})),n},D=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return y.some(i);if(n(i,r))break}return y.none()},M=function(t,e){return D(t,e,m)},N=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},R=function(t,e){var n=w.call(t,0);return n.sort(e),n},z=function(t,e){return e>=0&&e<t.length?y.some(t[e]):y.none()},B=function(t){return z(t,0)},P=Object.keys,I=Object.hasOwnProperty,L=function(t,e){return I.call(t,e)},H=function(t){if(!c(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return T(t,(function(r,o){var i=P(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!c(u))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);var c=function(t){var r=P(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=N(e,(function(t){return S(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:c,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n},F={generate:H};F.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var V=function(t){var e=[],n=[];return T(t,(function(t){t.fold((function(t){e.push(t)}),(function(t){n.push(t)}))})),{errors:e,values:n}},j=function(t){var e=function(e){return j(t)},n=function(e){return j(t)},r=function(e){return j(e(t))},o=function(e){return j(t)},i=function(e){e(t)},a=function(e){return e(t)},u=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},f=function(){return y.some(t)};return{isValue:g,isError:m,getOr:l(t),getOrThunk:l(t),getOrDie:l(t),or:e,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:c,forall:s,toOptional:f}},U=function(t){var e=function(t){return t()},n=function(){return d(String(t))()},r=f,o=function(t){return t()},i=function(e){return U(t)},a=function(e){return U(e(t))},u=function(e){return U(t)},c=function(e,n){return e(t)};return{isValue:m,isError:g,getOr:f,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:a,each:s,bind:u,exists:m,forall:g,toOptional:y.none}},W=function(t,e){return t.fold((function(){return U(e)}),j)},$={value:j,error:U,fromOption:W},q=function(t){return"inline-command"===t.type||"inline-format"===t.type},G=function(t){return"block-command"===t.type||"block-format"===t.type},K=function(t){return R(t,(function(t,e){return t.start.length===e.start.length?0:t.start.length>e.start.length?-1:1}))},X=function(t){var e=function(e){return $.error({message:e,pattern:t})},n=function(n,r,o){if(void 0!==t.format){var i=void 0;if(c(t.format)){if(!N(t.format,a))return e(n+" pattern has non-string items in the `format` array");i=t.format}else{if(!a(t.format))return e(n+" pattern has non-string `format` parameter");i=[t.format]}return $.value(r(i))}return void 0!==t.cmd?a(t.cmd)?$.value(o(t.cmd,t.value)):e(n+" pattern has non-string `cmd` parameter"):e(n+" pattern is missing both `format` and `cmd` parameters")};if(!u(t))return e("Raw pattern is not an object");if(!a(t.start))return e("Raw pattern is missing `start` parameter");if(void 0!==t.end){if(!a(t.end))return e("Inline pattern has non-string `end` parameter");if(0===t.start.length&&0===t.end.length)return e("Inline pattern has empty `start` and `end` parameters");var r=t.start,o=t.end;return 0===o.length&&(o=r,r=""),n("Inline",(function(t){return{type:"inline-format",start:r,end:o,format:t}}),(function(t,e){return{type:"inline-command",start:r,end:o,cmd:t,value:e}}))}return void 0!==t.replacement?a(t.replacement)?0===t.start.length?e("Replacement pattern has empty `start` parameter"):$.value({type:"inline-command",start:"",end:t.start,cmd:"mceInsertContent",value:t.replacement}):e("Replacement pattern has non-string `replacement` parameter"):0===t.start.length?e("Block pattern has empty `start` parameter"):n("Block",(function(e){return{type:"block-format",start:t.start,format:e[0]}}),(function(e,n){return{type:"block-command",start:t.start,cmd:e,value:n}}))},Y=function(t){return"block-command"===t.type?{start:t.start,cmd:t.cmd,value:t.value}:"block-format"===t.type?{start:t.start,format:t.format}:"inline-command"===t.type?"mceInsertContent"===t.cmd&&""===t.start?{start:t.end,replacement:t.value}:{start:t.start,end:t.end,cmd:t.cmd,value:t.value}:"inline-format"===t.type?{start:t.start,end:t.end,format:1===t.format.length?t.format[0]:t.format}:void 0},J=function(t){return{inlinePatterns:_(t,q),blockPatterns:K(_(t,G))}},Z=function(t){var e=function(e){var n=V(k(e,X));if(n.errors.length>0){var r=n.errors[0];throw new Error(r.message+":\n"+JSON.stringify(r.pattern,null,2))}t.set(J(n.values))},n=function(){return r(r([],k(t.get().inlinePatterns,Y),!0),k(t.get().blockPatterns,Y),!0)};return{setPatterns:e,getPatterns:n}},Q="undefined"!==typeof window?window:Function("return this;")(),tt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Q.console;n&&(n.error?n.error.apply(n,t):n.log.apply(n,t))},et=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],nt=function(t){var e=t.getParam("textpattern_patterns",et,"array");if(!c(e))return tt("The setting textpattern_patterns should be an array"),{inlinePatterns:[],blockPatterns:[]};var n=V(k(e,X));return T(n.errors,(function(t){return tt(t.message,t.pattern)})),J(n.values)},rt=function(t){var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},ot=tinymce.util.Tools.resolve("tinymce.util.Delay"),it=tinymce.util.Tools.resolve("tinymce.util.VK"),at="\ufeff",ut=" ",ct=tinymce.util.Tools.resolve("tinymce.util.Tools"),st=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),lt=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),ft=function(t,e){return{container:t,offset:e}},dt=function(t){return t.nodeType===Node.TEXT_NODE},mt=function(t,e,n){if(e&&t.isEmpty(e)&&!n(e)){var r=e.parentNode;t.remove(e),mt(t,r,n)}},gt=function(t,e,n,r){void 0===r&&(r=!0);var o=e.startContainer.parentNode,i=e.endContainer.parentNode;e.deleteContents(),r&&!n(e.startContainer)&&(dt(e.startContainer)&&0===e.startContainer.data.length&&t.remove(e.startContainer),dt(e.endContainer)&&0===e.endContainer.data.length&&t.remove(e.endContainer),mt(t,o,n),o!==i&&mt(t,i,n))},ht=function(t,e){var n=e.get(t);return c(n)&&B(n).exists((function(t){return L(t,"block")}))},pt=function(t){return 0===t.start.length},vt=function(t,e){var n=y.from(t.dom.getParent(e.startContainer,t.dom.isBlock));return""===rt(t)?n.orThunk((function(){return y.some(t.getBody())})):n},bt=st.DOM,yt=function(t){return function(e){return t===e?-1:0}},wt=function(t){return function(e){return t.isBlock(e)||S(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)}},xt=function(t,e,n){if(dt(t)&&e>=0)return y.some(ft(t,e));var r=lt(bt);return y.from(r.backwards(t,e,yt(t),n)).map((function(t){return ft(t.container,t.container.data.length)}))},Ct=function(t,e,n){if(dt(t)&&e>=t.length)return y.some(ft(t,e));var r=lt(bt);return y.from(r.forwards(t,e,yt(t),n)).map((function(t){return ft(t.container,0)}))},St=function(t,e,n){if(!dt(t))return y.none();var r=t.textContent;if(e>=0&&e<=r.length)return y.some(ft(t,e));var o=lt(bt);return y.from(o.backwards(t,e,yt(t),n)).bind((function(t){var r=t.container.data;return St(t.container,e+r.length,n)}))},kt=function(t,e,n){if(!dt(t))return y.none();var r=t.textContent;if(e<=r.length)return y.some(ft(t,e));var o=lt(bt);return y.from(o.forwards(t,e,yt(t),n)).bind((function(t){return kt(t.container,e-r.length,n)}))},Tt=function(t,e,n,r,o){var i=lt(t,wt(t));return y.from(i.backwards(e,n,r,o))},Ot=function(t,e,n){if(dt(e)&&(n<0||n>e.data.length))return[];var r=[n],o=e;while(o!==t&&o.parentNode){for(var i=o.parentNode,a=0;a<i.childNodes.length;a++)if(i.childNodes[a]===o){r.push(a);break}o=i}return o===t?r.reverse():[]},_t=function(t,e,n,r,o){var i=Ot(t,e,n),a=Ot(t,r,o);return{start:i,end:a}},Et=function(t,e){var n=e.slice(),r=n.pop(),o=A(n,(function(t,e){return t.bind((function(t){return y.from(t.childNodes[e])}))}),y.some(t));return o.bind((function(t){return dt(t)&&(r<0||r>t.data.length)?y.none():y.some({node:t,offset:r})}))},At=function(t,e){return Et(t,e.start).bind((function(n){var r=n.node,o=n.offset;return Et(t,e.end).map((function(t){var e=t.node,n=t.offset,i=document.createRange();return i.setStart(r,o),i.setEnd(e,n),i}))}))},Dt=function(t,e){return _t(t,e.startContainer,e.startOffset,e.endContainer,e.endOffset)},Mt=function(t,e,n){var r=Ct(e,0,e);r.each((function(r){var o=r.container;kt(o,n.start.length,e).each((function(n){var r=t.createRng();r.setStart(o,0),r.setEnd(n.container,n.offset),gt(t,r,(function(t){return t===e}))}))}))},Nt=function(t,e){var n=t.dom,r=e.pattern,o=At(n.getRoot(),e.range).getOrDie("Unable to resolve path range");return vt(t,o).each((function(e){"block-format"===r.type?ht(r.format,t.formatter)&&t.undoManager.transact((function(){Mt(t.dom,e,r),t.formatter.apply(r.format)})):"block-command"===r.type&&t.undoManager.transact((function(){Mt(t.dom,e,r),t.execCommand(r.cmd,!1,r.value)}))})),!0},Rt=function(t,e){var n=e.replace(ut," ");return M(t,(function(t){return 0===e.indexOf(t.start)||0===n.indexOf(t.start)}))},zt=function(t,e){var n=t.dom,r=t.selection.getRng();return vt(t,r).filter((function(e){var r=rt(t),o=""===r&&n.is(e,"body")||n.is(e,r);return null!==e&&o})).bind((function(t){var r=t.textContent,o=Rt(e,r);return o.map((function(e){return ct.trim(r).length===e.start.length?[]:[{pattern:e,range:_t(n.getRoot(),t,0,t,0)}]}))})).getOr([])},Bt=function(t,e){if(0!==e.length){var n=t.selection.getBookmark();T(e,(function(e){return Nt(t,e)})),t.selection.moveToBookmark(n)}},Pt=0,It=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return Pt++,t+"_"+r+Pt+String(n)},Lt=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},Ht=function(t,e){return Lt(t,e,t.length-e.length)},Ft=function(t,e){return t.create("span",{"data-mce-type":"bookmark",id:e})},Vt=function(t,e){var n=t.createRng();return n.setStartAfter(e.start),n.setEndBefore(e.end),n},jt=function(t,e,n){var r=At(t.getRoot(),n).getOrDie("Unable to resolve path range"),o=r.startContainer,i=r.endContainer,a=0===r.endOffset?i:i.splitText(r.endOffset),u=0===r.startOffset?o:o.splitText(r.startOffset);return{prefix:e,end:a.parentNode.insertBefore(Ft(t,e+"-end"),a),start:u.parentNode.insertBefore(Ft(t,e+"-start"),u)}},Ut=function(t,e,n){mt(t,t.get(e.prefix+"-end"),n),mt(t,t.get(e.prefix+"-start"),n)},Wt=function(t,e,n){return function(t,e){var r=t.data,o=r.substring(0,e),i=o.lastIndexOf(n.charAt(n.length-1)),a=o.lastIndexOf(n);return-1!==a?a+n.length:-1!==i?i+1:-1}},$t=function(t,e,n,r){var o=e.start,i=Tt(t,r.container,r.offset,Wt(t,n,o),n);return i.bind((function(r){if(r.offset>=o.length){var i=t.createRng();return i.setStart(r.container,r.offset-o.length),i.setEnd(r.container,r.offset),y.some(i)}var a=r.offset-o.length;return St(r.container,a,n).map((function(e){var n=t.createRng();return n.setStart(e.container,e.offset),n.setEnd(r.container,r.offset),n})).filter((function(t){return t.toString()===o})).orThunk((function(){return $t(t,e,n,ft(r.container,0))}))}))},qt=function(t,e,n,r,o,i){if(void 0===i&&(i=!1),0===e.start.length&&!i){var a=t.createRng();return a.setStart(n,r),a.setEnd(n,r),y.some(a)}return xt(n,r,o).bind((function(n){var r=$t(t,e,o,n);return r.bind((function(t){if(i){if(t.endContainer===n.container&&t.endOffset===n.offset)return y.none();if(0===n.offset&&t.endContainer.textContent.length===t.endOffset)return y.none()}return y.some(t)}))}))},Gt=function(t,e,n){var r=t.dom,o=r.getRoot(),i=n.pattern,a=n.position.container,u=n.position.offset;return St(a,u-n.pattern.end.length,e).bind((function(c){var s=_t(o,c.container,c.offset,a,u);if(pt(i))return y.some({matches:[{pattern:i,startRng:s,endRng:s}],position:c});var l=Kt(t,n.remainingPatterns,c.container,c.offset,e),f=l.getOr({matches:[],position:c}),d=f.position,m=qt(r,i,d.container,d.offset,e,l.isNone());return m.map((function(t){var e=Dt(o,t);return{matches:f.matches.concat([{pattern:i,startRng:e,endRng:s}]),position:ft(t.startContainer,t.startOffset)}}))}))},Kt=function(t,e,n,r,o){var i=t.dom;return xt(n,r,i.getRoot()).bind((function(a){var u=i.createRng();u.setStart(o,0),u.setEnd(n,r);for(var c=u.toString(),s=0;s<e.length;s++){var l=e[s];if(Ht(c,l.end)){var f=e.slice();f.splice(s,1);var d=Gt(t,o,{pattern:l,remainingPatterns:f,position:a});if(d.isSome())return d}}return y.none()}))},Xt=function(t,e,n){t.selection.setRng(n),"inline-format"===e.type?T(e.format,(function(e){t.formatter.apply(e)})):t.execCommand(e.cmd,!1,e.value)},Yt=function(t,e,n,r){var o=Vt(t.dom,n);gt(t.dom,o,r),Xt(t,e,o)},Jt=function(t,e,n,r,o){var i=t.dom,a=Vt(i,r),u=Vt(i,n);gt(i,u,o),gt(i,a,o);var c={prefix:n.prefix,start:n.end,end:r.start},s=Vt(i,c);Xt(t,e,s)},Zt=function(t,e){var r=It("mce_textpattern"),o=E(e,(function(e,o){var i=jt(t,r+"_end"+e.length,o.endRng);return e.concat([n(n({},o),{endMarker:i})])}),[]);return E(o,(function(e,i){var a=o.length-e.length-1,u=pt(i.pattern)?i.endMarker:jt(t,r+"_start"+a,i.startRng);return e.concat([n(n({},i),{startMarker:u})])}),[])},Qt=function(t,e,n){var r=t.selection.getRng();return!1===r.collapsed?[]:vt(t,r).bind((function(o){var i=r.startOffset-(n?1:0);return Kt(t,e,r.startContainer,i,o)})).fold((function(){return[]}),(function(t){return t.matches}))},te=function(t,e){if(0!==e.length){var n=t.dom,r=t.selection.getBookmark(),o=Zt(n,e);T(o,(function(e){var r=n.getParent(e.startMarker.start,n.isBlock),o=function(t){return t===r};pt(e.pattern)?Yt(t,e.pattern,e.endMarker,o):Jt(t,e.pattern,e.startMarker,e.endMarker,o),Ut(n,e.endMarker,o),Ut(n,e.startMarker,o)})),t.selection.moveToBookmark(r)}},ee=function(t,e){if(!t.selection.isCollapsed())return!1;var n=Qt(t,e.inlinePatterns,!1),r=zt(t,e.blockPatterns);return(r.length>0||n.length>0)&&(t.undoManager.add(),t.undoManager.extra((function(){t.execCommand("mceInsertNewLine")}),(function(){t.insertContent(at),te(t,n),Bt(t,r);var e=t.selection.getRng(),o=xt(e.startContainer,e.startOffset,t.dom.getRoot());t.execCommand("mceInsertNewLine"),o.each((function(e){var n=e.container;n.data.charAt(e.offset-1)===at&&(n.deleteData(e.offset-1,1),mt(t.dom,n.parentNode,(function(e){return e===t.dom.getRoot()})))}))})),!0)},ne=function(t,e){var n=Qt(t,e.inlinePatterns,!0);n.length>0&&t.undoManager.transact((function(){te(t,n)}))},re=function(t,e,n){for(var r=0;r<t.length;r++)if(n(t[r],e))return!0;return!1},oe=function(t,e){return re(t,e,(function(t,e){return t===e.keyCode&&!1===it.modifierPressed(e)}))},ie=function(t,e){return re(t,e,(function(t,e){return t.charCodeAt(0)===e.charCode}))},ae=function(t,e){var n=[",",".",";",":","!","?"],r=[32];t.on("keydown",(function(n){13!==n.keyCode||it.modifierPressed(n)||ee(t,e.get())&&n.preventDefault()}),!0),t.on("keyup",(function(n){oe(r,n)&&ne(t,e.get())})),t.on("keypress",(function(r){ie(n,r)&&ot.setEditorTimeout(t,(function(){ne(t,e.get())}))}))};function ue(){e.add("textpattern",(function(e){var n=t(nt(e));return ae(e,n),Z(n)}))}ue()})()},"3aea":function(t,e,n){n("3699")},"3b47":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){var e=function(e){var n=t.get();n[e.name]=e,t.set(n)};return{addTab:e}},r=function(t,e){t.addCommand("mceHelp",e)},o=function(t,e){t.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:e}),t.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:e})},i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=function(){},u=function(t){return function(){return t}},c=function(t){return t},s=u(!1),l=u(!0),f=function(){return d},d=function(){var t=function(t){return t()},e=c,n={fold:function(t,e){return t()},isSome:s,isNone:l,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:e,orThunk:t,map:f,each:a,bind:f,exists:s,forall:l,filter:function(){return f()},toArray:function(){return[]},toString:u("none()")};return n}(),m=function(t){var e=u(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:l,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return m(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:d},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},g=function(t){return null===t||void 0===t?d:m(t)},h={some:m,none:f,from:g},p=Array.prototype.indexOf,v=function(t,e){return p.call(t,e)},b=function(t,e){return v(t,e)>-1},y=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},w=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},x=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return h.some(i);if(n(i,r))break}return h.none()},C=function(t,e){return x(t,e,s)},S=Object.keys,k=Object.hasOwnProperty,T=function(t,e){return O(t,e)?h.from(t[e]):h.none()},O=function(t,e){return k.call(t,e)},_=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},E=function(t){return h.from(t.getParam("help_tabs"))},A=function(t){return t.getParam("forced_plugins")},D="<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab’s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>",M=function(){var t={type:"htmlpanel",presets:"document",html:D};return{name:"keyboardnav",title:"Keyboard Navigation",items:[t]}},N=tinymce.util.Tools.resolve("tinymce.Env"),R=function(t){var e={alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"},n={meta:"Ctrl ",access:"Shift + Alt "},r=N.mac?e:n,o=t.split("+"),i=y(o,(function(t){var e=t.toLowerCase().trim();return O(r,e)?r[e]:t}));return N.mac?i.join("").replace(/\s/,""):i.join("+")},z=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],B=function(){var t=y(z,(function(t){var e=y(t.shortcuts,R).join(" or ");return[t.action,e]})),e={type:"table",header:["Action","Shortcut"],cells:t};return{name:"shortcuts",title:"Handy Shortcuts",items:[e]}},P=tinymce.util.Tools.resolve("tinymce.util.I18n"),I=y([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"autocorrect",name:"Autocorrect",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"export",name:"Export",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium"},{key:"rtc",name:"Real-Time Collaboration",type:"premium"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium"}],(function(t){return i(i({},t),{type:t.type||"opensource",slug:t.slug||t.key})})),L=function(t){var e=function(){var t=w(I,(function(t){var e=t.key,n=t.type;return"autocorrect"!==e&&"premium"===n})),e=y(t,(function(t){return"<li>"+P.translate(t.name)+"</li>"})).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+P.translate("Premium plugins:")+"</b></p><ul>"+e+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+P.translate("Learn more...")+"</a></li></ul></div>"},n=function(t){return'<a href="'+t.url+'" target="_blank" rel="noopener">'+t.name+"</a>"},r=function(t,e){return C(I,(function(t){return t.key===e})).fold((function(){var r=t.plugins[e].getMetadata;return"function"===typeof r?n(r()):e}),(function(t){var e="premium"===t.type?t.name+"*":t.name;return n({name:e,url:"https://www.tiny.cloud/docs/plugins/"+t.type+"/"+t.slug})}))},o=function(t){var e=S(t.plugins),n=A(t);return void 0===n?e:w(e,(function(t){return!b(n,t)}))},i=function(t){var e=o(t),n=y(e,(function(e){return"<li>"+r(t,e)+"</li>"})),i=n.length,a=n.join(""),u="<p><b>"+P.translate(["Plugins installed ({0}):",i])+"</b></p><ul>"+a+"</ul>";return u},a=function(t){return null==t?"":'<div data-mce-tabstop="1" tabindex="-1">'+i(t)+"</div>"},u={type:"htmlpanel",presets:"document",html:[a(t),e()].join("")};return{name:"plugins",title:"Plugins",items:[u]}},H=tinymce.util.Tools.resolve("tinymce.EditorManager"),F=function(){var t=function(t,e){return 0===t.indexOf("@")?"X.X.X":t+"."+e},e=t(H.majorVersion,H.minorVersion),n='<a href="https://www.tiny.cloud/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+e+"</a>",r={type:"htmlpanel",html:"<p>"+P.translate(["You are using {0}",n])+"</p>",presets:"document"};return{name:"versions",title:"Version",items:[r]}},V=function(t,e){var n={},r=y(t,(function(t){return"string"===typeof t?(O(e,t)&&(n[t]=e[t]),t):(n[t.name]=t,t.name)}));return{tabs:n,names:r}},j=function(t){var e=S(t),n=e.indexOf("versions");return-1!==n&&(e.splice(n,1),e.push("versions")),{tabs:t,names:e}},U=function(t,e){var n,r=B(),o=M(),a=L(t),u=F(),c=i((n={},n[r.name]=r,n[o.name]=o,n[a.name]=a,n[u.name]=u,n),e.get());return E(t).fold((function(){return j(c)}),(function(t){return V(t,c)}))},W=function(t,e){return function(){var n=U(t,e),r=n.tabs,o=n.names,i=y(o,(function(t){return T(r,t)})),a=_(i),u={type:"tabpanel",tabs:a};t.windowManager.open({title:"Help",size:"medium",body:u,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}};function $(){e.add("help",(function(e){var i=t({}),a=n(i),u=W(e,i);return o(e,u),r(e,u),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),a}))}$()})()},"3c41":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=0,n=function(t){var n=new Date,r=n.getTime(),o=Math.floor(1e9*Math.random());return e++,t+"_"+o+e+String(r)},r=function(t,e){var n='<table data-mce-id="mce" style="width: 100%">';n+="<tbody>";for(var r=0;r<e;r++){n+="<tr>";for(var o=0;o<t;o++)n+="<td><br></td>";n+="</tr>"}return n+="</tbody>",n+="</table>",n},o=function(t){var e=t.dom.select("*[data-mce-id]");return e[0]},i=function(t,e,n){t.undoManager.transact((function(){t.insertContent(r(e,n));var i=o(t);i.removeAttribute("data-mce-id");var a=t.dom.select("td,th",i);t.selection.setCursorLocation(a[0],0)}))},a=function(t,e,n){t.plugins.table?t.plugins.table.insertTable(e,n):i(t,e,n)},u=function(t,e,r){var o=t.editorUpload.blobCache,i=o.create(n("mceu"),r,e);o.add(i),t.insertContent(t.dom.createHTML("img",{src:i.blobUri()}))},c=tinymce.util.Tools.resolve("tinymce.util.Promise"),s=function(t){return new c((function(e){var n=new FileReader;n.onloadend=function(){e(n.result.split(",")[1])},n.readAsDataURL(t)}))},l=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),d=function(t){return new c((function(e){var n=document.createElement("input");n.type="file",n.accept="image/*",n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0.001",document.body.appendChild(n);var r=function(t){e(Array.prototype.slice.call(t.target.files))};n.addEventListener("change",r);var o=function(r){var i=function(){e([]),n.parentNode.removeChild(n)};l.os.isAndroid()&&"remove"!==r.type?f.setEditorTimeout(t,i,0):i(),t.off("focusin remove",o)};t.on("focusin remove",o),n.click()}))},m=function(t){t.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){d(t).then((function(e){if(e.length>0){var n=e[0];s(n).then((function(e){u(t,e,n)}))}}))}}),t.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){a(t,2,2)}})},g=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},h=function(t){return function(e){return g(e)===t}},p=function(t){return function(e){return typeof e===t}},v=function(t){return function(e){return t===e}},b=h("string"),y=h("object"),w=h("array"),x=p("boolean"),C=v(void 0),S=p("function"),k=function(){},T=function(t){return function(){return t}},O=function(t){return t},_=T(!1),E=T(!0),A=function(){return D},D=function(){var t=function(t){return t()},e=O,n={fold:function(t,e){return t()},isSome:_,isNone:E,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:T(null),getOrUndefined:T(void 0),or:e,orThunk:t,map:A,each:k,bind:A,exists:_,forall:E,filter:function(){return A()},toArray:function(){return[]},toString:T("none()")};return n}(),M=function(t){var e=T(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:E,isNone:_,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return M(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:D},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},N=function(t){return null===t||void 0===t?D:M(t)},R={some:M,none:A,from:N};function z(t,e,n,r,o){return t(n,r)?R.some(n):S(o)&&o(n)?R.none():e(n,r,o)}var B=1,P=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return H(r.childNodes[0])},I=function(t,e){var n=e||document,r=n.createElement(t);return H(r)},L=function(t,e){var n=e||document,r=n.createTextNode(t);return H(r)},H=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},F=function(t,e,n){return R.from(t.dom.elementFromPoint(e,n)).map(H)},V={fromHtml:P,fromTag:I,fromText:L,fromDom:H,fromPoint:F},j=function(t,e){var n=t.dom;if(n.nodeType!==B)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")};"undefined"!==typeof window?window:Function("return this;")();var U=function(t){var e=t.dom.nodeName;return e.toLowerCase()},W=function(t,e,n){var r=t.dom,o=S(n)?n:_;while(r.parentNode){r=r.parentNode;var i=V.fromDom(r);if(e(i))return R.some(i);if(o(i))break}return R.none()},$=function(t,e,n){var r=function(t,e){return e(t)};return z(r,W,t,e,n)},q=function(t,e,n){return W(t,(function(t){return j(t,e)}),n)},G=function(t,e,n){var r=function(t,e){return j(t,e)};return z(r,q,t,e,n)},K=function(t,e){if(e(t))return!0;throw new Error("Default value doesn't match requested type.")},X=function(t,e){if(w(t)||y(t))throw new Error("expected a string but found: "+t);return C(t)?e:x(t)?!1===t?"":e:t},Y=function(t){return function(e,n,r){K(r,t);var o=e.getParam(n,r);return X(o,r)}},J=Y(b),Z=function(t){return J(t,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote")},Q=function(t){return J(t,"quickbars_insert_toolbar","quickimage quicktable")},tt=function(t){return J(t,"quickbars_image_toolbar","alignleft aligncenter alignright")},et=function(t){var e=Q(t);e.trim().length>0&&t.ui.registry.addContextToolbar("quickblock",{predicate:function(e){var n=V.fromDom(e),r=t.schema.getTextBlockElements(),o=function(e){return e.dom===t.getBody()};return G(n,"table",o).fold((function(){return $(n,(function(e){return U(e)in r&&t.dom.isEmpty(e.dom)}),o).isSome()}),_)},items:e,position:"line",scope:"editor"})},nt=function(t){var e=function(e){return"false"!==t.dom.getContentEditableParent(e)},n=function(t){return"IMG"===t.nodeName||"FIGURE"===t.nodeName&&/image/i.test(t.className)},r=tt(t);r.trim().length>0&&t.ui.registry.addContextToolbar("imageselection",{predicate:n,items:r,position:"node"});var o=Z(t);o.trim().length>0&&t.ui.registry.addContextToolbar("textselection",{predicate:function(r){return!n(r)&&!t.selection.isCollapsed()&&e(r)},items:o,position:"selection",scope:"editor"})};function rt(){t.add("quickbars",(function(t){m(t),et(t),nt(t)}))}rt()})()},4237:function(t,e,n){n("be7f")},"43fc":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},r=function(t){return t.getParam("noneditable_editable_class","mceEditable")},o=function(t){var e=t.getParam("noneditable_regexp",[]);return e&&e.constructor===RegExp?[e]:e},i=function(t){return function(e){return-1!==(" "+e.attr("class")+" ").indexOf(t)}},a=function(t,e,n){return function(r){var o=arguments,i=o[o.length-2],a=i>0?e.charAt(i-1):"";if('"'===a)return r;if(">"===a){var u=e.lastIndexOf("<",i);if(-1!==u){var c=e.substring(u,i);if(-1!==c.indexOf('contenteditable="false"'))return r}}return'<span class="'+n+'" data-mce-content="'+t.dom.encode(o[0])+'">'+t.dom.encode("string"===typeof o[1]?o[1]:o[0])+"</span>"}},u=function(t,e,r){var o=e.length,i=r.content;if("raw"!==r.format){while(o--)i=i.replace(e[o],a(t,i,n(t)));r.content=i}},c=function(t){var a="contenteditable",c=" "+e.trim(r(t))+" ",s=" "+e.trim(n(t))+" ",l=i(c),f=i(s),d=o(t);t.on("PreInit",(function(){d.length>0&&t.on("BeforeSetContent",(function(e){u(t,d,e)})),t.parser.addAttributeFilter("class",(function(t){var e,n=t.length;while(n--)e=t[n],l(e)?e.attr(a,"true"):f(e)&&e.attr(a,"false")})),t.serializer.addAttributeFilter(a,(function(t){var e,n=t.length;while(n--)e=t[n],(l(e)||f(e))&&(d.length>0&&e.attr("data-mce-content")?(e.name="#text",e.type=3,e.raw=!0,e.value=e.attr("data-mce-content")):e.attr(a,null))}))}))};function s(){t.add("noneditable",(function(t){c(t)}))}s()})()},"4bd0":function(t,e,n){n("a376")},"4bdc":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,e){t.fire("VisualBlocks",{state:e})},r=function(t,e,r){var o=t.dom;o.toggleClass(t.getBody(),"mce-visualblocks"),r.set(!r.get()),n(t,r.get())},o=function(t,e,n){t.addCommand("mceVisualBlocks",(function(){r(t,e,n)}))},i=function(t){return t.getParam("visualblocks_default_state",!1,"boolean")},a=function(t,e,n){t.on("PreviewFormats AfterPreviewFormats",(function(e){n.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)})),t.on("init",(function(){i(t)&&r(t,e,n)}))},u=function(t,e){return function(n){n.setActive(e.get());var r=function(t){return n.setActive(t.state)};return t.on("VisualBlocks",r),function(){return t.off("VisualBlocks",r)}}},c=function(t,e){var n=function(){return t.execCommand("mceVisualBlocks")};t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:n,onSetup:u(t,e)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:n,onSetup:u(t,e)})};function s(){e.add("visualblocks",(function(e,n){var r=t(!1);o(e,n,r),c(e,r),a(e,n,r)}))}s()})()},"4ea8":function(t,e,n){n("cdd9")},"55a0":function(t,e,n){n("f962")},"62e5":function(t,e,n){n("2519")},"64d8":function(t,e,n){n("ef1f")},6957:function(t,e,n){n("75b8")},"69a4":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.getParam("content_style","","string")},o=function(t){return t.getParam("content_css_cors",!1,"boolean")},i=function(t){var e=t.getParam("body_class","","hash");return e[t.id]||""},a=function(t){var e=t.getParam("body_class","","string");return-1===e.indexOf("=")?e:i(t)},u=function(t){var e=t.getParam("body_id","","hash");return e[t.id]||e},c=function(t){var e=t.getParam("body_id","tinymce","string");return-1===e.indexOf("=")?e:u(t)},s=function(t){var i="",u=t.dom.encode,s=r(t);i+='<base href="'+u(t.documentBaseURI.getURI())+'">';var l=o(t)?' crossorigin="anonymous"':"";n.each(t.contentCSS,(function(e){i+='<link type="text/css" rel="stylesheet" href="'+u(t.documentBaseURI.toAbsolute(e))+'"'+l+">"})),s&&(i+='<style type="text/css">'+s+"</style>");var f=c(t),d=a(t),m=e.mac?"e.metaKey":"e.ctrlKey && !e.altKey",g='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+m+")) {e.preventDefault();}}}, false);<\/script> ",h=t.getBody().dir,p=h?' dir="'+u(h)+'"':"",v="<!DOCTYPE html><html><head>"+i+'</head><body id="'+u(f)+'" class="mce-content-body '+u(d)+'"'+p+">"+t.getContent()+g+"</body></html>";return v},l=function(t){var e=s(t),n=t.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:e}});n.focus("close")},f=function(t){t.addCommand("mcePreview",(function(){l(t)}))},d=function(t){var e=function(){return t.execCommand("mcePreview")};t.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:e}),t.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:e})};function m(){t.add("preview",(function(t){f(t),d(t)}))}m()})()},"6b68":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=tinymce.util.Tools.resolve("tinymce.html.DomParser"),i=tinymce.util.Tools.resolve("tinymce.html.Node"),a=tinymce.util.Tools.resolve("tinymce.html.Serializer"),u=function(t){return t.getParam("fullpage_hide_in_source_view")},c=function(t){return t.getParam("fullpage_default_xml_pi")},s=function(t){return t.getParam("fullpage_default_encoding")},l=function(t){return t.getParam("fullpage_default_font_family")},f=function(t){return t.getParam("fullpage_default_font_size")},d=function(t){return t.getParam("fullpage_default_text_color")},m=function(t){return t.getParam("fullpage_default_title")},g=function(t){return t.getParam("fullpage_default_doctype","<!DOCTYPE html>")},h=function(t){return t.getParam("protect")},p=function(t,e){return o({validate:!1,root_name:"#document"},t.schema).parse(e,{format:"xhtml"})},v=function(t,e){var n,o,i=p(t,e),a={},u=function(t,e){var n=t.attr(e);return n||""};return a.fontface=l(t),a.fontsize=f(t),n=i.firstChild,7===n.type&&(a.xml_pi=!0,o=/encoding="([^"]+)"/.exec(n.value),o&&(a.docencoding=o[1])),n=i.getAll("#doctype")[0],n&&(a.doctype="<!DOCTYPE"+n.value+">"),n=i.getAll("title")[0],n&&n.firstChild&&(a.title=n.firstChild.value),r.each(i.getAll("meta"),(function(t){var e,n=t.attr("name"),r=t.attr("http-equiv");n?a[n.toLowerCase()]=t.attr("content"):"Content-Type"===r&&(e=/charset\s*=\s*(.*)\s*/gi.exec(t.attr("content")),e&&(a.docencoding=e[1]))})),n=i.getAll("html")[0],n&&(a.langcode=u(n,"lang")||u(n,"xml:lang")),a.stylesheets=[],r.each(i.getAll("link"),(function(t){"stylesheet"===t.attr("rel")&&a.stylesheets.push(t.attr("href"))})),n=i.getAll("body")[0],n&&(a.langdir=u(n,"dir"),a.style=u(n,"style"),a.visited_color=u(n,"vlink"),a.link_color=u(n,"link"),a.active_color=u(n,"alink")),a},b=function(t,e,n){var o,u,c=t.dom,s=function(t,e,n){t.attr(e,n||void 0)},l=function(t){o.firstChild?o.insert(t,o.firstChild):o.append(t)},f=p(t,n);if(o=f.getAll("head")[0],o||(u=f.getAll("html")[0],o=new i("head",1),u.firstChild?u.insert(o,u.firstChild,!0):u.append(o)),u=f.firstChild,e.xml_pi){var d='version="1.0"';e.docencoding&&(d+=' encoding="'+e.docencoding+'"'),7!==u.type&&(u=new i("xml",7),f.insert(u,f.firstChild,!0)),u.value=d}else u&&7===u.type&&u.remove();u=f.getAll("#doctype")[0],e.doctype?(u||(u=new i("#doctype",10),e.xml_pi?f.insert(u,f.firstChild):l(u)),u.value=e.doctype.substring(9,e.doctype.length-1)):u&&u.remove(),u=null,r.each(f.getAll("meta"),(function(t){"Content-Type"===t.attr("http-equiv")&&(u=t)})),e.docencoding?(u||(u=new i("meta",1),u.attr("http-equiv","Content-Type"),u.shortEnded=!0,l(u)),u.attr("content","text/html; charset="+e.docencoding)):u&&u.remove(),u=f.getAll("title")[0],e.title?(u?u.empty():(u=new i("title",1),l(u)),u.append(new i("#text",3)).value=e.title):u&&u.remove(),r.each("keywords,description,author,copyright,robots".split(","),(function(t){var n,r,o=f.getAll("meta"),a=e[t];for(n=0;n<o.length;n++)if(r=o[n],r.attr("name")===t)return void(a?r.attr("content",a):r.remove());a&&(u=new i("meta",1),u.attr("name",t),u.attr("content",a),u.shortEnded=!0,l(u))}));var m={};r.each(f.getAll("link"),(function(t){"stylesheet"===t.attr("rel")&&(m[t.attr("href")]=t)})),r.each(e.stylesheets,(function(t){m[t]||(u=new i("link",1),u.attr({rel:"stylesheet",text:"text/css",href:t}),u.shortEnded=!0,l(u)),delete m[t]})),r.each(m,(function(t){t.remove()})),u=f.getAll("body")[0],u&&(s(u,"dir",e.langdir),s(u,"style",e.style),s(u,"vlink",e.visited_color),s(u,"link",e.link_color),s(u,"alink",e.active_color),c.setAttribs(t.getBody(),{style:e.style,dir:e.dir,vLink:e.visited_color,link:e.link_color,aLink:e.active_color})),u=f.getAll("html")[0],u&&(s(u,"lang",e.langcode),s(u,"xml:lang",e.langcode)),o.firstChild||o.remove();var g=a({validate:!1,indent:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(f);return g.substring(0,g.indexOf("</body>"))},y=function(t,e){var o=v(t,e.get()),i={title:"",keywords:"",description:"",robots:"",author:"",docencoding:""},a=n(n({},i),o);t.windowManager.open({title:"Metadata and Document Properties",size:"normal",body:{type:"panel",items:[{name:"title",type:"input",label:"Title"},{name:"keywords",type:"input",label:"Keywords"},{name:"description",type:"input",label:"Description"},{name:"robots",type:"input",label:"Robots"},{name:"author",type:"input",label:"Author"},{name:"docencoding",type:"input",label:"Encoding"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:a,onSubmit:function(n){var i=n.getData(),a=b(t,r.extend(o,i),e.get());e.set(a),n.close()}})},w=function(t,e){t.addCommand("mceFullPageProperties",(function(){y(t,e)}))},x=function(t,e){return r.each(t,(function(t){e=e.replace(t,(function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"}))})),e},C=function(t){return t.replace(/<!--mce:protected ([\s\S]*?)-->/g,(function(t,e){return unescape(e)}))},S=r.each,k=function(t){return t.replace(/<\/?[A-Z]+/g,(function(t){return t.toLowerCase()}))},T=function(t,e,n,o){var i,a,c,s="",l=t.dom;if(!o.selection&&(c=x(h(t),o.content),("raw"!==o.format||!e.get())&&(!o.source_view||!u(t)))){0!==c.length||o.source_view||(c=r.trim(e.get())+"\n"+r.trim(c)+"\n"+r.trim(n.get())),c=c.replace(/<(\/?)BODY/gi,"<$1body"),i=c.indexOf("<body"),-1!==i?(i=c.indexOf(">",i),e.set(k(c.substring(0,i+1))),a=c.indexOf("</body",i),-1===a&&(a=c.length),o.content=r.trim(c.substring(i+1,a)),n.set(k(c.substring(a)))):(e.set(O(t)),n.set("\n</body>\n</html>"));var f=p(t,e.get());S(f.getAll("style"),(function(t){t.firstChild&&(s+=t.firstChild.value)}));var d=f.getAll("body")[0];d&&l.setAttribs(t.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),l.remove("fullpage_styles");var m=t.getDoc().getElementsByTagName("head")[0];if(s){var g=l.add(m,"style",{id:"fullpage_styles"});g.appendChild(document.createTextNode(s))}var v={};r.each(m.getElementsByTagName("link"),(function(t){"stylesheet"===t.rel&&t.getAttribute("data-mce-fullpage")&&(v[t.href]=t)})),r.each(f.getAll("link"),(function(t){var e=t.attr("href");if(!e)return!0;v[e]||"stylesheet"!==t.attr("rel")||l.add(m,"link",{rel:"stylesheet",text:"text/css",href:e,"data-mce-fullpage":"1"}),delete v[e]})),r.each(v,(function(t){t.parentNode.removeChild(t)}))}},O=function(t){var e,n="",r="";if(c(t)){var o=s(t);n+='<?xml version="1.0" encoding="'+(o||"ISO-8859-1")+'" ?>\n'}return n+=g(t),n+="\n<html>\n<head>\n",(e=m(t))&&(n+="<title>"+e+"</title>\n"),(e=s(t))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+e+'" />\n'),(e=l(t))&&(r+="font-family: "+e+";"),(e=f(t))&&(r+="font-size: "+e+";"),(e=d(t))&&(r+="color: "+e+";"),n+="</head>\n<body"+(r?' style="'+r+'"':"")+">\n",n},_=function(t,e,n,o){"html"!==o.format||o.selection||o.source_view&&u(t)||(o.content=C(r.trim(e)+"\n"+r.trim(o.content)+"\n"+r.trim(n)))},E=function(t,e,n){t.on("BeforeSetContent",(function(r){T(t,e,n,r)})),t.on("GetContent",(function(r){_(t,e.get(),n.get(),r)}))},A=function(t){t.ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}}),t.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}})};function D(){e.add("fullpage",(function(e){var n=t(""),r=t("");w(e,n),A(e),E(e,n,r)}))}D()})()},7193:function(t,e,n){n("ae68")},"75b8":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.getParam("save_enablewhendirty",!0)},o=function(t){return!!t.getParam("save_onsavecallback")},i=function(t){return!!t.getParam("save_oncancelcallback")},a=function(t,e){t.notificationManager.open({text:e,type:"error"})},u=function(t){var n=e.DOM.getParent(t.id,"form");if(!r(t)||t.isDirty()){if(t.save(),o(t))return t.execCallback("save_onsavecallback",t),void t.nodeChanged();n?(t.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"===typeof n.submit?n.submit():a(t,"Error: Form submit field collision.")),t.nodeChanged()):a(t,"Error: No form element found.")}},c=function(t){var e=n.trim(t.startContent);i(t)?t.execCallback("save_oncancelcallback",t):t.resetContent(e)},s=function(t){t.addCommand("mceSave",(function(){u(t)})),t.addCommand("mceCancel",(function(){c(t)}))},l=function(t){return function(e){var n=function(){e.setDisabled(r(t)&&!t.isDirty())};return n(),t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}},f=function(t){t.ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return t.execCommand("mceSave")},onSetup:l(t)}),t.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return t.execCommand("mceCancel")},onSetup:l(t)}),t.addShortcut("Meta+S","","mceSave")};function d(){t.add("save",(function(t){f(t),s(t)}))}d()})()},"78e4":function(t,e,n){n("3ad8")},"7c4f":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return!!t.hasPlugin("powerpaste",!0)&&("undefined"!==typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)},r=function(t){return{clipboard:t}},o=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},i=function(t){return function(e){return o(e)===t}},a=function(t){return function(e){return typeof e===t}},u=i("array"),c=function(t){return null===t||void 0===t},s=function(t){return!c(t)},l=a("function"),f=function(){},d=function(t){return function(){return t}},m=function(t){return t},g=d(!1),h=d(!0),p=function(){return v},v=function(){var t=function(t){return t()},e=m,n={fold:function(t,e){return t()},isSome:g,isNone:h,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:e,orThunk:t,map:p,each:f,bind:p,exists:g,forall:h,filter:function(){return p()},toArray:function(){return[]},toString:d("none()")};return n}(),b=function(t){var e=d(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:h,isNone:g,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return b(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:v},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},y=function(t){return null===t||void 0===t?v:b(t)},w={some:b,none:p,from:y},x=Array.prototype.slice,C=Array.prototype.push,S=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},k=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},T=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},O=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},_=function(t,e,n){return T(t,(function(t,r){n=e(n,t,r)})),n},E=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);C.apply(e,t[n])}return e},A=function(t,e){return E(k(t,e))},D=l(Array.from)?Array.from:function(t){return x.call(t)},M=function(){return M=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},M.apply(this,arguments)},N=function(e){var n=t(w.none()),r=function(){return n.get().each(e)},o=function(){r(),n.set(w.none())},i=function(){return n.get().isSome()},a=function(){return n.get()},u=function(t){r(),n.set(w.some(t))};return{clear:o,isSet:i,get:a,set:u}},R=function(){var t=N(f),e=function(e){return t.get().each(e)};return M(M({},t),{on:e})},z=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},B=function(t,e){return z(t,e,0)},P=function(t,e){return z(t,e,t.length-e.length)},I=function(t,e){return e<=0?"":new Array(e+1).join(t)},L=tinymce.util.Tools.resolve("tinymce.Env"),H=tinymce.util.Tools.resolve("tinymce.util.Delay"),F=tinymce.util.Tools.resolve("tinymce.util.Promise"),V=tinymce.util.Tools.resolve("tinymce.util.VK"),j=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},U=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},W=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},$=function(t,e){return t.fire("paste",{ieFake:e})},q=tinymce.util.Tools.resolve("tinymce.util.Tools"),G=function(t){return t.getParam("paste_block_drop",!1)},K=function(t){return t.getParam("paste_data_images",!1)},X=function(t){return t.getParam("paste_filter_drop",!0)},Y=function(t){return t.getParam("paste_preprocess")},J=function(t){return t.getParam("paste_postprocess")},Z=function(t){return t.getParam("paste_webkit_styles")},Q=function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},tt=function(t){return t.getParam("paste_merge_formats",!0)},et=function(t){return t.getParam("smart_paste",!0)},nt=function(t){return t.getParam("paste_as_text",!1)},rt=function(t){return t.getParam("paste_retain_style_properties")},ot=function(t){var e="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody";return t.getParam("paste_word_valid_elements",e)},it=function(t){return t.getParam("paste_convert_word_fake_lists",!0)},at=function(t){return t.getParam("paste_enable_default_filters",!0)},ut=function(t){return t.getParam("validate")},ct=function(t){return t.getParam("allow_html_data_urls",!1,"boolean")},st=function(t){return t.getParam("paste_data_images",!1,"boolean")},lt=function(t){return t.getParam("images_dataimg_filter")},ft=function(t){return t.getParam("images_reuse_filename")},dt=function(t){return t.getParam("forced_root_block")},mt=function(t){return t.getParam("forced_root_block_attrs")},gt=function(t){return t.getParam("paste_tab_spaces",4,"number")},ht=function(t){var e="jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp";return q.explode(t.getParam("images_file_types",e,"string"))},pt="x-tinymce/html",vt="\x3c!-- "+pt+" --\x3e",bt=function(t){return vt+t},yt=function(t){return t.replace(vt,"")},wt=function(t){return-1!==t.indexOf(vt)},xt=d(pt),Ct=Object.hasOwnProperty,St=function(t,e){return Ct.call(t,e)},kt=tinymce.util.Tools.resolve("tinymce.html.Entities"),Tt=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},Ot=function(t){return t.replace(/\r?\n/g,"<br>")},_t=function(t,e){var n=[],r="<"+t;if("object"===typeof e){for(var o in e)St(e,o)&&n.push(o+'="'+kt.encodeAllRaw(e[o])+'"');n.length&&(r+=" "+n.join(" "))}return r+">"},Et=function(t,e,n){var r=t.split(/\n\n/),o=_t(e,n),i="</"+e+">",a=q.map(r,(function(t){return t.split(/\n/).join("<br />")})),u=function(t){return o+t+i};return 1===a.length?a[0]:q.map(a,u).join("")},At=function(t,e,n){return e?Et(t,!0===e?"p":e,n):Ot(t)},Dt=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Mt=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Nt=" ",Rt=tinymce.util.Tools.resolve("tinymce.html.Node"),zt=tinymce.util.Tools.resolve("tinymce.html.Schema"),Bt=function(t){return t.constructor===RegExp},Pt=function(t,e){return q.each(e,(function(e){t=Bt(e)?t.replace(e,""):t.replace(e[0],e[1])})),t},It=function(t){var e=zt(),n=Dt({},e),r="",o=e.getShortEndedElements(),i=q.makeMap("script noscript style textarea video audio iframe object"," "),a=e.getBlockElements(),u=function(t){var e=t.name,n=t;if("br"!==e){if("wbr"!==e)if(o[e]&&(r+=" "),i[e])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))do{u(t)}while(t=t.next);a[e]&&n.next&&(r+="\n","p"===e&&(r+="\n"))}}else r+="\n"};return t=Pt(t,[/<!\[[^\]]+\]>/g]),u(n.parse(t)),r},Lt=function(t){var e=function(t,e,n){return e||n?Nt:" "};return t=Pt(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,e],/<br class="Apple-interchange-newline">/g,/<br>$/i]),t},Ht=function(t){var e=0;return function(){return t+e++}},Ft=function(t){var e=t.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return q.hasOwn(n,e)?"image/"+n[e]:"image/"+e},Vt=function(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)},jt=function(t){var e=!1,n=[/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/];return t=t.replace(/^[\u00a0 ]+/,""),q.each(n,(function(n){if(n.test(t))return e=!0,!1})),e},Ut=function(t){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(t)},Wt=function(t){var e,n,r=1,o=function(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)do{e+=o(t)}while(t=t.next);return e},i=function(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!i(t,e))return!1}while(t=t.next);return!0},a=function(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)do{a(t)}while(t=t.next)},u=function(t,o,u){var c=t._listLevel||r;c!==r&&(c<r?e&&(e=e.parent.parent):(n=e,e=null)),e&&e.name===o?e.append(t):(n=n||e,e=new Rt(o,1),u>1&&e.attr("start",""+u),t.wrap(e)),t.name="li",c>r&&n&&n.lastChild.append(e),r=c,a(t),i(t,/^\u00a0+/),i(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(t,/^\u00a0+/)},c=[],s=t.firstChild;while("undefined"!==typeof s&&null!==s)if(c.push(s),s=s.walk(),null!==s)while("undefined"!==typeof s&&s.parent!==t)s=s.walk();for(var l=0;l<c.length;l++)if(t=c[l],"p"===t.name&&t.firstChild){var f=o(t);if(Ut(f)){u(t,"ul");continue}if(jt(f)){var d=/([0-9]+)\./.exec(f),m=1;d&&(m=parseInt(d[1],10)),u(t,"ol",m);continue}if(t._listLevel){u(t,"ul",1);continue}e=null}else n=e,e=null},$t=function(t,e,n,r){var o={},i=t.dom.parseStyle(r);q.each(i,(function(i,a){switch(a){case"mso-list":var u=/\w+ \w+([0-9]+)/i.exec(r);u&&(n._listLevel=parseInt(u[1],10)),/Ignore/i.test(i)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":a="text-align";break;case"vert-align":a="vertical-align";break;case"font-color":case"mso-foreground":a="color";break;case"mso-background":case"mso-highlight":a="background";break;case"font-weight":case"font-style":return void("normal"!==i&&(o[a]=i));case"mso-element":if(/^(comment|comment-list)$/i.test(i))return void n.remove();break}0!==a.indexOf("mso-comment")?0!==a.indexOf("mso-")&&("all"===rt(t)||e&&e[a])&&(o[a]=i):n.remove()})),/(bold)/i.test(o["font-weight"])&&(delete o["font-weight"],n.wrap(new Rt("b",1))),/(italic)/i.test(o["font-style"])&&(delete o["font-style"],n.wrap(new Rt("i",1)));var a=t.dom.serializeStyle(o,n.name);return a||null},qt=function(t,e){var n,r=rt(t);r&&(n=q.makeMap(r.split(/[, ]/))),e=Pt(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,Nt],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return e.length>0?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join(Nt):""}]]);var o=ot(t),i=zt({valid_elements:o,valid_children:"-li[p]"});q.each(i.elements,(function(t){t.attributes.class||(t.attributes.class={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))}));var a=Dt({},i);a.addAttributeFilter("style",(function(e){var r,o=e.length;while(o--)r=e[o],r.attr("style",$t(t,n,r,r.attr("style"))),"span"===r.name&&r.parent&&!r.attributes.length&&r.unwrap()})),a.addAttributeFilter("class",(function(t){var e,n,r=t.length;while(r--)e=t[r],n=e.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)})),a.addNodeFilter("del",(function(t){var e=t.length;while(e--)t[e].remove()})),a.addNodeFilter("a",(function(t){var e,n,r,o=t.length;while(o--)if(e=t[o],n=e.attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1],n&&(n="#"+n)),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()}));var u=a.parse(e);return it(t)&&Wt(u),e=Mt({validate:ut(t)},i).serialize(u),e},Gt=function(t,e){return at(t)?qt(t,e):e},Kt=function(t,e){var n=Dt({},t.schema);n.addNodeFilter("meta",(function(t){q.each(t,(function(t){t.remove()}))}));var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return Mt({validate:ut(t)},t.schema).serialize(r)},Xt=function(t,e){return{content:t,cancelled:e}},Yt=function(t,e,n,r){var o=t.dom.create("div",{style:"display:none"},e),i=U(t,o,n,r);return Xt(i.node.innerHTML,i.isDefaultPrevented())},Jt=function(t,e,n,r){var o=j(t,e,n,r),i=Kt(t,o.content);return t.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?Yt(t,i,n,r):Xt(i,o.isDefaultPrevented())},Zt=function(t,e,n){var r=Vt(e),o=r?Gt(t,e):e;return Jt(t,o,n,r)},Qt=function(t,e){return t.insertContent(e,{merge:tt(t),paste:!0}),!0},te=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},ee=function(t,e){return te(e)&&S(ht(t),(function(t){return P(e.toLowerCase(),"."+t.toLowerCase())}))},ne=function(t,e,n){return t.undoManager.extra((function(){n(t,e)}),(function(){t.insertContent('<img src="'+e+'">')})),!0},re=function(t,e,n){return t.undoManager.extra((function(){n(t,e)}),(function(){t.execCommand("mceInsertLink",!1,e)})),!0},oe=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!te(e))&&re(t,e,n)},ie=function(t,e,n){return!!ee(t,e)&&ne(t,e,n)},ae=function(t,e){q.each([oe,ie,Qt],(function(n){return!0!==n(t,e,Qt)}))},ue=function(t,e,n){n||!1===et(t)?Qt(t,e):ae(t,e)},ce=function(t){return-1!==" \f\t\v".indexOf(t)},se=function(t){return"\n"===t||"\r"===t},le=function(t,e){return e<t.length&&e>=0&&se(t[e])},fe=function(t,e){var n=I(" ",gt(t)),r=e.replace(/\t/g,n),o=_(r,(function(t,e){return ce(e)||e===Nt?t.pcIsSpace||""===t.str||t.str.length===r.length-1||le(r,t.str.length+1)?{pcIsSpace:!1,str:t.str+Nt}:{pcIsSpace:!0,str:t.str+" "}:{pcIsSpace:se(e),str:t.str+e}}),{pcIsSpace:!1,str:""});return o.str},de=function(t,e,n,r){var o=Zt(t,e,n);!1===o.cancelled&&ue(t,o.content,r)},me=function(t,e,n){var r=n||wt(e);de(t,yt(e),r,!1)},ge=function(t,e){var n=t.dom.encode(e).replace(/\r\n/g,"\n"),r=fe(t,n),o=At(r,dt(t),mt(t));de(t,o,!1,!0)},he=function(t){var e={},n="data:text/mce-internal,";if(t){if(t.getData){var r=t.getData("Text");r&&r.length>0&&-1===r.indexOf(n)&&(e["text/plain"]=r)}if(t.types)for(var o=0;o<t.types.length;o++){var i=t.types[o];try{e[i]=t.getData(i)}catch(a){e[i]=""}}}return e},pe=function(t,e){return he(e.clipboardData||t.getDoc().dataTransfer)},ve=function(t,e){return e in t&&t[e].length>0},be=function(t){return ve(t,"text/html")||ve(t,"text/plain")},ye=function(t){var e=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(t);return e?{type:e[1],data:decodeURIComponent(e[2])}:{type:null,data:null}},we=function(t,e){var n=lt(t);return!n||n(e)},xe=function(t,e){var n=e.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return s(n)?t.dom.encode(n[1]):null},Ce=Ht("mceclip"),Se=function(t,e){var n=ye(e.uri),r=n.data,o=n.type,i=Ce(),a=e.blob,u=new Image;if(u.src=e.uri,we(t,u)){var c=t.editorUpload.blobCache,l=void 0,f=c.getByData(r,o);if(f)l=f;else{var d=ft(t)&&s(a.name),m=d?xe(t,a.name):i,g=d?a.name:void 0;l=c.create(i,a,r,m,g),c.add(l)}me(t,'<img src="'+l.blobUri()+'">',!1)}else me(t,'<img src="'+e.uri+'">',!1)},ke=function(t){return"paste"===t.type},Te=function(t){return s(t.getAsFile)},Oe=function(t){return F.all(k(t,(function(t){return new F((function(e){var n=Te(t)?t.getAsFile():t,r=new window.FileReader;r.onload=function(){e({blob:n,uri:r.result})},r.readAsDataURL(n)}))})))},_e=function(t){var e=ht(t);return function(t){return B(t.type,"image/")&&S(e,(function(e){return Ft(e)===t.type}))}},Ee=function(t,e){var n=e.items?A(D(e.items),(function(t){return"file"===t.kind?[t.getAsFile()]:[]})):[],r=e.files?D(e.files):[];return O(n.length>0?n:r,_e(t))},Ae=function(t,e,n){var r=ke(e)?e.clipboardData:e.dataTransfer;if(st(t)&&r){var o=Ee(t,r);if(o.length>0)return e.preventDefault(),Oe(o).then((function(e){n&&t.selection.setRng(n),T(e,(function(e){Se(t,e)}))})),!0}return!1},De=function(t){var e=t.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&e&&e.items&&0===e.items.length},Me=function(t){return V.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Ne=function(t,e,n){var r,o=R(),i=R();t.on("keyup",i.clear),t.on("keydown",(function(n){var a=function(t){Me(t)&&!t.isDefaultPrevented()&&e.remove()};if(Me(n)&&!n.isDefaultPrevented()){if(r=n.shiftKey&&86===n.keyCode,r&&L.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),o.set(n),i.set(!0),L.ie&&r)return n.preventDefault(),void $(t,!0);e.remove(),e.create(),t.once("keyup",a),t.once("paste",(function(){t.off("keyup",a)}))}}));var a=function(t,n,r,o,i){var a;ve(n,"text/html")?a=n["text/html"]:(a=e.getHtml(),i=i||wt(a),e.isDefaultContent(a)&&(o=!0)),a=Lt(a),e.remove();var u=!1===i&&Tt(a),c=te(a);(!a.length||u&&!c)&&(o=!0),(o||c)&&(a=ve(n,"text/plain")&&u?n["text/plain"]:It(a)),e.isDefaultContent(a)?r||t.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?ge(t,a):me(t,a,i)},u=function(){return e.getLastRng()||t.selection.getRng()};t.on("paste",(function(c){var s=o.isSet()||i.isSet();s&&o.clear();var l=pe(t,c),f="text"===n.get()||r,d=ve(l,xt());r=!1,c.isDefaultPrevented()||De(c)?e.remove():be(l)||!Ae(t,c,u())?(s||c.preventDefault(),!L.ie||s&&!c.ieFake||ve(l,"text/html")||(e.create(),t.dom.bind(e.getEl(),"paste",(function(t){t.stopPropagation()})),t.getDoc().execCommand("Paste",!1,null),l["text/html"]=e.getHtml()),ve(l,"text/html")?(c.preventDefault(),d||(d=wt(l["text/html"])),a(t,l,s,f,d)):H.setEditorTimeout(t,(function(){a(t,l,s,f,d)}),0)):e.remove()}))},Re=function(t,e,n){var r;Ne(t,e,n),t.parser.addNodeFilter("img",(function(e,n,o){var i=function(t){return t.data&&!0===t.data.paste},a=function(t){t.attr("data-mce-object")||r===L.transparentSrc||t.remove()},u=function(t){return 0===t.indexOf("webkit-fake-url")},c=function(t){return 0===t.indexOf("data:")};if(!st(t)&&i(o)){var s=e.length;while(s--)r=e[s].attr("src"),r&&(u(r)||!ct(t)&&c(r))&&a(e[s])}}))},ze=function(t){return L.ie&&t.inline?document.body:t.getBody()},Be=function(t){return ze(t)!==t.getBody()},Pe=function(t,e,n){Be(t)&&t.dom.bind(e,"paste keyup",(function(e){Ue(t,n)||t.fire("paste")}))},Ie=function(t,e,n){var r=t.dom,o=t.getBody();e.set(t.selection.getRng());var i=t.dom.add(ze(t),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(L.ie||L.gecko)&&r.setStyle(i,"left","rtl"===r.getStyle(o,"direction",!0)?65535:-65535),r.bind(i,"beforedeactivate focusin focusout",(function(t){t.stopPropagation()})),Pe(t,i,n),i.focus(),t.selection.select(i,!0)},Le=function(t,e){if(He(t)){var n=void 0,r=e.get();while(n=t.dom.get("mcepastebin"))t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)},He=function(t){return t.dom.get("mcepastebin")},Fe=function(t){var e=function(e,n){e.appendChild(n),t.dom.remove(n,!0)},n=q.grep(ze(t).childNodes,(function(t){return"mcepastebin"===t.id})),r=n.shift();q.each(n,(function(t){e(r,t)}));for(var o=t.dom.select("div[id=mcepastebin]",r),i=o.length-1;i>=0;i--){var a=t.dom.create("div");r.insertBefore(a,o[i]),e(a,o[i])}return r?r.innerHTML:""},Ve=function(t,e){return e===t},je=function(t){return t&&"mcepastebin"===t.id},Ue=function(t,e){var n=He(t);return je(n)&&Ve(e,n.innerHTML)},We=function(e){var n=t(null),r="%MCEPASTEBIN%";return{create:function(){return Ie(e,n,r)},remove:function(){return Le(e,n)},getEl:function(){return He(e)},getHtml:function(){return Fe(e)},getLastRng:n.get,isDefault:function(){return Ue(e,r)},isDefaultContent:function(t){return Ve(r,t)}}},$e=function(t,e){var n=We(t);return t.on("PreInit",(function(){return Re(t,n,e)})),{pasteFormat:e,pasteHtml:function(e,n){return me(t,e,n)},pasteText:function(e){return ge(t,e)},pasteImageData:function(e,n){return Ae(t,e,n)},getDataTransferItems:he,hasHtmlOrText:be,hasContentType:ve}},qe=function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),W(t,!1)):(e.pasteFormat.set("text"),W(t,!0)),t.focus()},Ge=function(t,e){t.addCommand("mceTogglePlainTextPaste",(function(){qe(t,e)})),t.addCommand("mceInsertClipboardContent",(function(t,n){n.content&&e.pasteHtml(n.content,n.internal),n.text&&e.pasteText(n.text)}))},Ke=function(t){return!1===L.iOS&&"function"===typeof(null===t||void 0===t?void 0:t.setData)},Xe=function(t,e,n){if(!Ke(t))return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(xt(),e),!0}catch(r){return!1}},Ye=function(t,e,n,r){Xe(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Je=function(t){return function(e,n){var r=bt(e),o=t.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=t.dom.create("div",{contenteditable:"true"},r);t.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),t.dom.add(t.getBody(),o);var a=t.selection.getRng();i.focus();var u=t.dom.createRng();u.selectNodeContents(i),t.selection.setRng(u),H.setTimeout((function(){t.selection.setRng(a),o.parentNode.removeChild(o),n()}),0)}},Ze=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Qe=function(t){return!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody())},tn=function(t){return!t.selection.isCollapsed()||Qe(t)},en=function(t){return function(e){tn(t)&&Ye(e,Ze(t),Je(t),(function(){if(L.browser.isChrome()||L.browser.isFirefox()){var e=t.selection.getRng();H.setEditorTimeout(t,(function(){t.selection.setRng(e),t.execCommand("Delete")}),0)}else t.execCommand("Delete")}))}},nn=function(t){return function(e){tn(t)&&Ye(e,Ze(t),Je(t),f)}},rn=function(t){t.on("cut",en(t)),t.on("copy",nn(t))},on=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),an=function(t,e){return on.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},un=function(t){var e=t["text/plain"];return!!e&&0===e.indexOf("file://")},cn=function(t,e){t.focus(),t.selection.setRng(e)},sn=function(t,e,n){G(t)&&t.on("dragend dragover draggesture dragdrop drop drag",(function(t){t.preventDefault(),t.stopPropagation()})),K(t)||t.on("drop",(function(t){var e=t.dataTransfer;e&&e.files&&e.files.length>0&&t.preventDefault()})),t.on("drop",(function(r){var o=an(t,r);if(!r.isDefaultPrevented()&&!n.get()){var i=e.getDataTransferItems(r.dataTransfer),a=e.hasContentType(i,xt());if((e.hasHtmlOrText(i)&&!un(i)||!e.pasteImageData(r,o))&&o&&X(t)){var u=i["mce-internal"]||i["text/html"]||i["text/plain"];u&&(r.preventDefault(),H.setEditorTimeout(t,(function(){t.undoManager.transact((function(){i["mce-internal"]&&t.execCommand("Delete"),cn(t,o),u=Lt(u),i["text/html"]?e.pasteHtml(u,a):e.pasteText(u)}))})))}}})),t.on("dragstart",(function(t){n.set(!0)})),t.on("dragover dragend",(function(e){K(t)&&!1===n.get()&&(e.preventDefault(),cn(t,an(t,e))),"dragend"===e.type&&n.set(!1)}))},ln=function(t){var e=t.plugins.paste,n=Y(t);n&&t.on("PastePreProcess",(function(t){n.call(e,e,t)}));var r=J(t);r&&t.on("PastePostProcess",(function(t){r.call(e,e,t)}))},fn=function(t,e){t.on("PastePreProcess",(function(n){n.content=e(t,n.content,n.internal,n.wordContent)}))},dn=function(t,e){t.on("PastePostProcess",(function(n){e(t,n.node)}))},mn=function(t,e){if(!Vt(e))return e;var n=[];q.each(t.schema.getBlockElements(),(function(t,e){n.push(e)}));var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=Pt(e,[[r,"$1"]]),e=Pt(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]]),e},gn=function(t,e,n,r){if(r||n)return e;var o,i=Z(t);if(!1===Q(t)||"all"===i)return e;if(i&&(o=i.split(/[, ]/)),o){var a=t.dom,u=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(t,e,n,r){var i=a.parseStyle(a.decode(n)),c={};if("none"===o)return e+r;for(var s=0;s<o.length;s++){var l=i[o[s]],f=a.getStyle(u,o[s],!0);/color/.test(o[s])&&(l=a.toHex(l),f=a.toHex(f)),f!==l&&(c[o[s]]=l)}var d=a.serializeStyle(c,"span");return d?e+' style="'+d+'"'+r:e+r}))}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(t,e,n,r){return e+' style="'+n+'"'+r})),e},hn=function(t,e){t.$("a",e).find("font,u").each((function(e,n){t.dom.remove(n,!0)}))},pn=function(t){L.webkit&&fn(t,gn),L.ie&&(fn(t,mn),dn(t,hn))},vn=function(t,e){return function(n){n.setActive("text"===e.pasteFormat.get());var r=function(t){return n.setActive(t.state)};return t.on("PastePlainTextToggle",r),function(){return t.off("PastePlainTextToggle",r)}}},bn=function(t,e){var n=function(){return t.execCommand("mceTogglePlainTextPaste")};t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:n,onSetup:vn(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:n,onSetup:vn(t,e)})};function yn(){e.add("paste",(function(e){if(!1===n(e)){var o=t(!1),i=t(nt(e)?"text":"html"),a=$e(e,i);return pn(e),bn(e,a),Ge(e,a),ln(e),rn(e),sn(e,a,o),r(a)}}))}yn()})()},8388:function(t,e,n){},"840a":function(t,e,n){n("d4c3")},"84ec":function(t,e,n){n("2401")},"855b":function(t,e,n){n("e2d6")},8863:function(t,e,n){n("9dd9")},"88b6":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},n=function(t){t.addCommand("ApplyUnorderedListStyle",(function(n,r){e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",(function(n,r){e(t,"OL",r["list-style-type"])}))},r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]},i=function(t){var e=t.getParam("advlist_bullet_styles","default,circle,square");return e?e.split(/[ ,]/):[]},a=function(){},u=function(t){return function(){return t}},c=function(t){return t},s=u(!1),l=u(!0),f=function(){return d},d=function(){var t=function(t){return t()},e=c,n={fold:function(t,e){return t()},isSome:s,isNone:l,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:e,orThunk:t,map:f,each:a,bind:f,exists:s,forall:l,filter:function(){return f()},toArray:function(){return[]},toString:u("none()")};return n}(),m=function(t){var e=u(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:l,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return m(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:d},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},g=function(t){return null===t||void 0===t?d:m(t)},h={some:m,none:f,from:g},p=function(t,e){return t.$.contains(t.getBody(),e)},v=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},b=function(t){return function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&p(t,e)}},y=function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul"),n=t.dom.getStyle(e,"listStyleType");return h.from(n)},w=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(e(r))return n}return-1},x=function(t){return t.replace(/\-/g," ").replace(/\b\w/g,(function(t){return t.toUpperCase()}))},C=function(t,e,n){var o=w(e.parents,v),i=-1!==o?e.parents.slice(0,o):e.parents,a=r.grep(i,b(t));return a.length>0&&a[0].nodeName===n},S=function(t,e){return function(n){var r=function(r){n.setActive(C(t,r,e))};return t.on("NodeChange",r),function(){return t.off("NodeChange",r)}}},k=function(t,n,o,i,a,u){t.ui.registry.addSplitButton(n,{tooltip:o,icon:"OL"===a?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(t){var e=r.map(u,(function(t){var e="OL"===a?"num":"bull",n="disc"===t||"decimal"===t?"default":t,r="default"===t?"":t,o=x(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+n,text:o}}));t(e)},onAction:function(){return t.execCommand(i)},onItemAction:function(n,r){e(t,a,r)},select:function(e){var n=y(t);return n.map((function(t){return e===t})).getOr(!1)},onSetup:S(t,a)})},T=function(t,e,n,r,o,i){t.ui.registry.addToggleButton(e,{active:!1,tooltip:n,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:S(t,o),onAction:function(){return t.execCommand(r)}})},O=function(t,e,n,r,o,i){i.length>1?k(t,e,n,r,o,i):T(t,e,n,r,o)},_=function(t){O(t,"numlist","Numbered list","InsertOrderedList","OL",o(t)),O(t,"bullist","Bullet list","InsertUnorderedList","UL",i(t))};function E(){t.add("advlist",(function(t){t.hasPlugin("lists")?(_(t),n(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}E()})()},"8ce1":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return function(e){return t===e}},n=e(void 0),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(t){return t.fire("RestoreDraft")},u=function(t){return t.fire("StoreDraft")},c=function(t){return t.fire("RemoveDraft")},s=function(t,e){var n={s:1e3,m:6e4},r=t||e,o=/^(\d+)([ms]?)$/.exec(""+r);return(o[2]?n[o[2]]:1)*parseInt(r,10)},l=function(t){return t.getParam("autosave_ask_before_unload",!0)},f=function(t){var e=document.location;return t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},d=function(t){return t.getParam("autosave_restore_when_empty",!1)},m=function(t){return s(t.getParam("autosave_interval"),"30s")},g=function(t){return s(t.getParam("autosave_retention"),"20m")},h=function(t,e){if(n(e))return t.dom.isEmpty(t.getBody());var r=i.trim(e);if(""===r)return!0;var o=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(o)},p=function(t){var e=parseInt(o.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>g(t))||(v(t,!1),!1)},v=function(t,e){var n=f(t);o.removeItem(n+"draft"),o.removeItem(n+"time"),!1!==e&&c(t)},b=function(t){var e=f(t);!h(t)&&t.isDirty()&&(o.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),o.setItem(e+"time",(new Date).getTime().toString()),u(t))},y=function(t){var e=f(t);p(t)&&(t.setContent(o.getItem(e+"draft"),{format:"raw"}),a(t))},w=function(t){var e=m(t);r.setEditorInterval(t,(function(){b(t)}),e)},x=function(t){t.undoManager.transact((function(){y(t),v(t)})),t.focus()},C=function(t){return{hasDraft:function(){return p(t)},storeDraft:function(){return b(t)},restoreDraft:function(){return y(t)},removeDraft:function(e){return v(t,e)},isEmpty:function(e){return h(t,e)}}},S=tinymce.util.Tools.resolve("tinymce.EditorManager"),k=function(t){t.editorManager.on("BeforeUnload",(function(t){var e;i.each(S.get(),(function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&l(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))},T=function(t){return function(e){e.setDisabled(!p(t));var n=function(){return e.setDisabled(!p(t))};return t.on("StoreDraft RestoreDraft RemoveDraft",n),function(){return t.off("StoreDraft RestoreDraft RemoveDraft",n)}}},O=function(t){w(t),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){x(t)},onSetup:T(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){x(t)},onSetup:T(t)})};function _(){t.add("autosave",(function(t){return k(t),O(t),t.on("init",(function(){d(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),C(t)}))}_()})()},"90e7":function(t,e,n){n("3c41")},9434:function(t,e,n){n("e8b0")},"94ce":function(t,e){(function(){"use strict";var t=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},e=function(e){return function(n){return t(n)===e}},n=function(t){return function(e){return typeof e===t}},r=function(t){return function(e){return t===e}},o=e("string"),i=e("object"),a=e("array"),u=r(null),c=n("boolean"),s=r(void 0),l=function(t){return null===t||void 0===t},f=function(t){return!l(t)},d=n("function"),m=n("number"),g=function(){},h=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},p=function(t,e){return function(n){return t(e(n))}},v=function(t){return function(){return t}},b=function(t){return t},y=function(t,e){return t===e};function w(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var x=function(t){return function(e){return!t(e)}},C=function(t){return function(){throw new Error(t)}},S=v(!1),k=v(!0),T=function(){return O},O=function(){var t=function(t){return t()},e=b,n={fold:function(t,e){return t()},isSome:S,isNone:k,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:v(null),getOrUndefined:v(void 0),or:e,orThunk:t,map:T,each:g,bind:T,exists:S,forall:k,filter:function(){return T()},toArray:function(){return[]},toString:v("none()")};return n}(),_=function(t){var e=v(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:k,isNone:S,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return _(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:O},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},E=function(t){return null===t||void 0===t?O:_(t)},A={some:_,none:T,from:E},D=Array.prototype.slice,M=Array.prototype.indexOf,N=Array.prototype.push,R=function(t,e){return M.call(t,e)},z=function(t,e){return R(t,e)>-1},B=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},P=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},I=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},L=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},H=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},F=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=e(a,o)?n:r;u.push(a)}return{pass:n,fail:r}},V=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},j=function(t,e,n){return H(t,(function(t,r){n=e(n,t,r)})),n},U=function(t,e,n){return L(t,(function(t,r){n=e(n,t,r)})),n},W=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return A.some(i);if(n(i,r))break}return A.none()},$=function(t,e){return W(t,e,S)},q=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return A.some(n)}return A.none()},G=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);N.apply(e,t[n])}return e},K=function(t,e){return G(I(t,e))},X=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},Y=function(t){var e=D.call(t,0);return e.reverse(),e},J=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},Z=function(t){return[t]},Q=function(t,e){var n=D.call(t,0);return n.sort(e),n},tt=function(t,e){return e>=0&&e<t.length?A.some(t[e]):A.none()},et=function(t){return tt(t,0)},nt=function(t){return tt(t,t.length-1)},rt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return A.none()},ot=function(){return ot=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ot.apply(this,arguments)};function it(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var at=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},ut=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:v(o),isiPhone:v(i),isTablet:v(c),isPhone:v(s),isTouch:v(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:v(l),isDesktop:v(f)}},ct=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},st=function(t,e){var n=ct(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return dt(r(1),r(2))},lt=function(t,e){var n=String(e).toLowerCase();return 0===t.length?ft():st(t,n)},ft=function(){return dt(0,0)},dt=function(t,e){return{major:t,minor:e}},mt={nu:dt,detect:lt,unknown:ft},gt=function(t,e){return rt(e.brands,(function(e){var n=e.brand.toLowerCase();return $(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:mt.nu(parseInt(e.version,10),0)}}))}))},ht=function(t,e){var n=String(e).toLowerCase();return $(t,(function(t){return t.search(n)}))},pt=function(t,e){return ht(t,e).map((function(t){var n=mt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},vt=function(t,e){return ht(t,e).map((function(t){var n=mt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},bt=function(t,e){return t.substring(e)},yt=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},wt=function(t,e){return Ct(t,e)?bt(t,e.length):t},xt=function(t,e){return-1!==t.indexOf(e)},Ct=function(t,e){return yt(t,e,0)},St=function(t,e){return yt(t,e,t.length-e.length)},kt=function(t){return function(e){return e.replace(t,"")}},Tt=kt(/^\s+|\s+$/g),Ot=function(t){return t.length>0},_t=function(t){return!Ot(t)},Et=function(t){var e=parseFloat(t);return isNaN(e)?A.none():A.some(e)},At=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Dt=function(t){return function(e){return xt(e,t)}},Mt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return xt(t,"edge/")&&xt(t,"chrome")&&xt(t,"safari")&&xt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,At],search:function(t){return xt(t,"chrome")&&!xt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return xt(t,"msie")||xt(t,"trident")}},{name:"Opera",versionRegexes:[At,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Dt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Dt("firefox")},{name:"Safari",versionRegexes:[At,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(xt(t,"safari")||xt(t,"mobile/"))&&xt(t,"applewebkit")}}],Nt=[{name:"Windows",search:Dt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return xt(t,"iphone")||xt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Dt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Dt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Dt("linux"),versionRegexes:[]},{name:"Solaris",search:Dt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Dt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Dt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Rt={browsers:v(Mt),oses:v(Nt)},zt="Edge",Bt="Chrome",Pt="IE",It="Opera",Lt="Firefox",Ht="Safari",Ft=function(){return Vt({current:void 0,version:mt.unknown()})},Vt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(zt),isChrome:r(Bt),isIE:r(Pt),isOpera:r(It),isFirefox:r(Lt),isSafari:r(Ht)}},jt={unknown:Ft,nu:Vt,edge:v(zt),chrome:v(Bt),ie:v(Pt),opera:v(It),firefox:v(Lt),safari:v(Ht)},Ut="Windows",Wt="iOS",$t="Android",qt="Linux",Gt="OSX",Kt="Solaris",Xt="FreeBSD",Yt="ChromeOS",Jt=function(){return Zt({current:void 0,version:mt.unknown()})},Zt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Ut),isiOS:r(Wt),isAndroid:r($t),isOSX:r(Gt),isLinux:r(qt),isSolaris:r(Kt),isFreeBSD:r(Xt),isChromeOS:r(Yt)}},Qt={unknown:Jt,nu:Zt,windows:v(Ut),ios:v(Wt),android:v($t),linux:v(qt),osx:v(Gt),solaris:v(Kt),freebsd:v(Xt),chromeos:v(Yt)},te=function(t,e,n){var r=Rt.browsers(),o=Rt.oses(),i=e.bind((function(t){return gt(r,t)})).orThunk((function(){return pt(r,t)})).fold(jt.unknown,jt.nu),a=vt(o,t).fold(Qt.unknown,Qt.nu),u=ut(a,i,t,n);return{browser:i,os:a,deviceType:u}},ee={detect:te},ne=function(t){return window.matchMedia(t).matches},re=at((function(){return ee.detect(navigator.userAgent,A.from(navigator.userAgentData),ne)})),oe=function(){return re()},ie=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},ae=function(t,e){return ie(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},ue=8,ce=9,se=11,le=1,fe=3,de=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return he(r.childNodes[0])},me=function(t,e){var n=e||document,r=n.createElement(t);return he(r)},ge=function(t,e){var n=e||document,r=n.createTextNode(t);return he(r)},he=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},pe=function(t,e,n){return A.from(t.dom.elementFromPoint(e,n)).map(he)},ve={fromHtml:de,fromTag:me,fromText:ge,fromDom:he,fromPoint:pe},be=function(t,e){var n=t.dom;if(n.nodeType!==le)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},ye=function(t){return t.nodeType!==le&&t.nodeType!==ce&&t.nodeType!==se||0===t.childElementCount},we=function(t,e){var n=void 0===e?document:e.dom;return ye(n)?[]:I(n.querySelectorAll(t),ve.fromDom)},xe=function(t,e){var n=void 0===e?document:e.dom;return ye(n)?A.none():A.from(n.querySelector(t)).map(ve.fromDom)},Ce=function(t,e){return t.dom===e.dom},Se=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},ke=function(t,e){return ae(t.dom,e.dom)},Te=function(t,e){return oe().browser.isIE()?ke(t,e):Se(t,e)},Oe=be,_e=Object.keys,Ee=Object.hasOwnProperty,Ae=function(t,e){for(var n=_e(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},De=function(t,e){return Me(t,(function(t,n){return{k:n,v:e(t,n)}}))},Me=function(t,e){var n={};return Ae(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Ne=function(t){return function(e,n){t[n]=e}},Re=function(t,e,n,r){var o={};return Ae(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},ze=function(t,e){var n={};return Re(t,e,Ne(n),g),n},Be=function(t,e){var n=[];return Ae(t,(function(t,r){n.push(e(t,r))})),n},Pe=function(t){return Be(t,b)},Ie=function(t){return _e(t).length},Le=function(t,e){return He(t,e)?A.from(t[e]):A.none()},He=function(t,e){return Ee.call(t,e)},Fe=function(t,e){return He(t,e)&&void 0!==t[e]&&null!==t[e]},Ve=function(t){for(var e in t)if(Ee.call(t,e))return!1;return!0},je=["tfoot","thead","tbody","colgroup"],Ue=function(t){return z(je,t)},We=function(t,e){return{rows:t,columns:e}},$e=function(t,e){return{row:t,column:e}},qe=function(t,e,n){return{element:t,rowspan:e,colspan:n}},Ge=function(t,e,n,r){return{element:t,rowspan:e,colspan:n,isNew:r}},Ke=function(t,e,n,r,o,i){return{element:t,rowspan:e,colspan:n,row:r,column:o,isLocked:i}},Xe=function(t,e,n){return{element:t,cells:e,section:n}},Ye=function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}},Je=function(t,e,n){return{element:t,isNew:e,isLocked:n}},Ze=function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}},Qe=function(t,e,n,r){return{startRow:t,startCol:e,finishRow:n,finishCol:r}},tn=function(t,e,n){return{element:t,colspan:e,column:n}},en=function(t,e){return{element:t,columns:e}};"undefined"!==typeof window?window:Function("return this;")();var nn=function(t){var e=t.dom.nodeName;return e.toLowerCase()},rn=function(t){return t.dom.nodeType},on=function(t){return function(e){return rn(e)===t}},an=function(t){return rn(t)===ue||"#comment"===nn(t)},un=on(le),cn=on(fe),sn=on(ce),ln=on(se),fn=function(t){return function(e){return un(e)&&nn(e)===t}},dn=function(t){return ve.fromDom(t.dom.ownerDocument)},mn=function(t){return sn(t)?t:dn(t)},gn=function(t){return ve.fromDom(mn(t).dom.defaultView)},hn=function(t){return A.from(t.dom.parentNode).map(ve.fromDom)},pn=function(t){return A.from(t.dom.parentElement).map(ve.fromDom)},vn=function(t,e){var n=d(e)?e:S,r=t.dom,o=[];while(null!==r.parentNode&&void 0!==r.parentNode){var i=r.parentNode,a=ve.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},bn=function(t){return A.from(t.dom.previousSibling).map(ve.fromDom)},yn=function(t){return A.from(t.dom.nextSibling).map(ve.fromDom)},wn=function(t){return I(t.dom.childNodes,ve.fromDom)},xn=function(t,e){var n=t.dom.childNodes;return A.from(n[e]).map(ve.fromDom)},Cn=function(t){return xn(t,0)},Sn=function(t){return ln(t)&&f(t.dom.host)},kn=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),Tn=v(kn),On=kn?function(t){return ve.fromDom(t.dom.getRootNode())}:mn,_n=function(t){var e=On(t);return Sn(e)?A.some(e):A.none()},En=function(t){return ve.fromDom(t.dom.host)},An=function(t){if(Tn()&&f(t.target)){var e=ve.fromDom(t.target);if(un(e)&&Dn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return et(n)}}return A.from(t.target)},Dn=function(t){return f(t.dom.shadowRoot)},Mn=function(t){var e=cn(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return _n(ve.fromDom(e)).fold((function(){return n.body.contains(e)}),p(Mn,En))},Nn=function(){return Rn(ve.fromDom(document))},Rn=function(t){var e=t.dom.body;if(null===e||void 0===e)throw new Error("Body is not available yet");return ve.fromDom(e)},zn=function(t,e,n){return V(vn(t,n),e)},Bn=function(t,e){return V(wn(t),e)},Pn=function(t,e){var n=[];return L(wn(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(Pn(t,e))})),n},In=function(t,e,n){return zn(t,(function(t){return be(t,e)}),n)},Ln=function(t,e){return Bn(t,(function(t){return be(t,e)}))},Hn=function(t,e){return we(e,t)};function Fn(t,e,n,r,o){return t(n,r)?A.some(n):d(o)&&o(n)?A.none():e(n,r,o)}var Vn=function(t,e,n){var r=t.dom,o=d(n)?n:S;while(r.parentNode){r=r.parentNode;var i=ve.fromDom(r);if(e(i))return A.some(i);if(o(i))break}return A.none()},jn=function(t,e,n){var r=function(t,e){return e(t)};return Fn(r,Vn,t,e,n)},Un=function(t,e){var n=function(t){return e(ve.fromDom(t))},r=$(t.dom.childNodes,n);return r.map(ve.fromDom)},Wn=function(t,e){var n=function(t){for(var r=0;r<t.childNodes.length;r++){var o=ve.fromDom(t.childNodes[r]);if(e(o))return A.some(o);var i=n(t.childNodes[r]);if(i.isSome())return i}return A.none()};return n(t.dom)},$n=function(t,e,n){return Vn(t,(function(t){return be(t,e)}),n)},qn=function(t,e){return Un(t,(function(t){return be(t,e)}))},Gn=function(t,e){return xe(e,t)},Kn=function(t,e,n){var r=function(t,e){return be(t,e)};return Fn(r,$n,t,e,n)},Xn=function(t,e,n){if(!(o(n)||c(n)||m(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Yn=function(t,e,n){Xn(t.dom,e,n)},Jn=function(t,e){var n=t.dom;Ae(e,(function(t,e){Xn(n,e,t)}))},Zn=function(t,e){Ae(e,(function(e,n){e.fold((function(){er(t,n)}),(function(e){Xn(t.dom,n,e)}))}))},Qn=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},tr=function(t,e){return A.from(Qn(t,e))},er=function(t,e){t.dom.removeAttribute(e)},nr=function(t){return U(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},rr=function(t,e,n){return void 0===n&&(n=y),t.exists((function(t){return n(t,e)}))},or=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},ir=function(t,e,n){return t.isSome()&&e.isSome()?A.some(n(t.getOrDie(),e.getOrDie())):A.none()},ar=function(t,e){return void 0!==t&&null!==t?e(t):A.none()},ur=function(t){return t.bind(b)},cr=function(t,e){return t?A.some(e):A.none()},sr=function(t){return void 0!==t.style&&d(t.style.getPropertyValue)},lr=function(t,e,n){if(!o(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);sr(t)&&t.style.setProperty(e,n)},fr=function(t,e){sr(t)&&t.style.removeProperty(e)},dr=function(t,e,n){var r=t.dom;lr(r,e,n)},mr=function(t,e){var n=t.dom;Ae(e,(function(t,e){lr(n,e,t)}))},gr=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||Mn(t)?o:hr(n,e)},hr=function(t,e){return sr(t)?t.style.getPropertyValue(e):""},pr=function(t,e){var n=t.dom,r=hr(n,e);return A.from(r).filter((function(t){return t.length>0}))},vr=function(t,e){var n=t.dom;fr(n,e),rr(tr(t,"style").map(Tt),"")&&er(t,"style")},br=function(t,e){var n=t.dom,r=e.dom;sr(n)&&sr(r)&&(r.style.cssText=n.style.cssText)},yr=function(t,e,n){return void 0===n&&(n=0),tr(t,e).map((function(t){return parseInt(t,10)})).getOr(n)},wr=function(t,e){return yr(t,e,1)},xr=function(t){return fn("col")(t)?yr(t,"span",1)>1:wr(t,"colspan")>1},Cr=function(t){return wr(t,"rowspan")>1},Sr=function(t,e){return parseInt(gr(t,e),10)},kr=v(10),Tr=v(10),Or=function(t,e){return _r(t,e,k)},_r=function(t,e,n){return K(wn(t),(function(t){return be(t,e)?n(t)?[t]:[]:_r(t,e,n)}))},Er=function(t,e,n){if(void 0===n&&(n=S),n(e))return A.none();if(z(t,nn(e)))return A.some(e);var r=function(t){return be(t,"table")||n(t)};return $n(e,t.join(","),r)},Ar=function(t,e){return Er(["td","th"],t,e)},Dr=function(t){return Or(t,"th,td")},Mr=function(t){return be(t,"colgroup")?Ln(t,"col"):K(zr(t),(function(t){return Ln(t,"col")}))},Nr=function(t,e){return Kn(t,"table",e)},Rr=function(t){return Or(t,"tr")},zr=function(t){return Nr(t).fold(v([]),(function(t){return Ln(t,"colgroup")}))},Br=function(t,e){return I(t,(function(t){if("colgroup"===nn(t)){var n=I(Mr(t),(function(t){var e=yr(t,"span",1);return qe(t,1,e)}));return Xe(t,n,"colgroup")}n=I(Dr(t),(function(t){var e=yr(t,"rowspan",1),n=yr(t,"colspan",1);return qe(t,e,n)}));return Xe(t,n,e(t))}))},Pr=function(t){return hn(t).map((function(t){var e=nn(t);return Ue(e)?e:"tbody"})).getOr("tbody")},Ir=function(t){var e=Rr(t),n=zr(t),r=it(it([],n,!0),e,!0);return Br(r,Pr)},Lr=function(t,e){return Br(t,(function(){return e}))},Hr=function(t,e,n){var r=t.cells,o=r.slice(0,e),i=r.slice(e),a=o.concat(n).concat(i);return jr(t,a)},Fr=function(t,e,n){return Hr(t,e,[n])},Vr=function(t,e,n){var r=t.cells;r[e]=n},jr=function(t,e){return Ze(t.element,e,t.section,t.isNew)},Ur=function(t,e){var n=t.cells,r=I(n,e);return Ze(t.element,r,t.section,t.isNew)},Wr=function(t,e){return t.cells[e]},$r=function(t,e){return Wr(t,e).element},qr=function(t){return t.cells.length},Gr=function(t){var e=F(t,(function(t){return"colgroup"===t.section}));return{rows:e.fail,cols:e.pass}},Kr=function(t,e,n){var r=I(t.cells,n);return Ze(e(t.element),r,t.section,!0)},Xr="data-snooker-locked-cols",Yr=function(t){return tr(t,Xr).bind((function(t){return A.from(t.match(/\d+/g))})).map((function(t){return J(t,k)}))},Jr=function(t){var e=U(Gr(t).rows,(function(t,e){return L(e.cells,(function(e,n){e.isLocked&&(t[n]=!0)})),t}),{}),n=Be(e,(function(t,e){return parseInt(e,10)}));return Q(n)},Zr=function(t,e){return t+","+e},Qr=function(t,e,n){return A.from(t.access[Zr(e,n)])},to=function(t,e,n){var r=eo(t,(function(t){return n(e,t.element)}));return r.length>0?A.some(r[0]):A.none()},eo=function(t,e){var n=K(t.all,(function(t){return t.cells}));return V(n,e)},no=function(t){var e={},n=0;return L(t.cells,(function(t){var r=t.colspan;P(r,(function(o){var i=n+o;e[i]=tn(t.element,r,i)})),n+=r})),e},ro=function(t){var e={},n=[],r=et(t).map((function(t){return t.element})).bind(Nr),o=r.bind(Yr).getOr({}),i=0,a=0,u=0,c=F(t,(function(t){return"colgroup"===t.section})),s=c.pass,l=c.fail;L(l,(function(t){var r=[];L(t.cells,(function(t){var n=0;while(void 0!==e[Zr(u,n)])n++;for(var i=Fe(o,n.toString()),c=Ke(t.element,t.rowspan,t.colspan,u,n,i),s=0;s<t.colspan;s++)for(var l=0;l<t.rowspan;l++){var f=u+l,d=n+s,m=Zr(f,d);e[m]=c,a=Math.max(a,d+1)}r.push(c)})),i++,n.push(Xe(t.element,r,t.section)),u++}));var f=nt(s).map((function(t){var e=no(t),n=en(t.element,Pe(e));return{colgroups:[n],columns:e}})).getOrThunk((function(){return{colgroups:[],columns:{}}})),d=f.columns,m=f.colgroups,g=We(i,a);return{grid:g,access:e,all:n,columns:d,colgroups:m}},oo=function(t){var e=Ir(t);return ro(e)},io=function(t){return K(t.all,(function(t){return t.cells}))},ao=function(t){return Pe(t.columns)},uo=function(t){return _e(t.columns).length>0},co=function(t,e){return A.from(t.columns[e])},so={fromTable:oo,generate:ro,getAt:Qr,findItem:to,filterItems:eo,justCells:io,justColumns:ao,hasColumns:uo,getColumnAt:co},lo=function(t,e){var n=e.column,r=e.column+e.colspan-1,o=e.row,i=e.row+e.rowspan-1;return n<=t.finishCol&&r>=t.startCol&&o<=t.finishRow&&i>=t.startRow},fo=function(t,e){return e.column>=t.startCol&&e.column+e.colspan-1<=t.finishCol&&e.row>=t.startRow&&e.row+e.rowspan-1<=t.finishRow},mo=function(t,e){for(var n=!0,r=w(fo,e),o=e.startRow;o<=e.finishRow;o++)for(var i=e.startCol;i<=e.finishCol;i++)n=n&&so.getAt(t,o,i).exists(r);return n?A.some(e):A.none()},go=function(t,e){return Qe(Math.min(t.row,e.row),Math.min(t.column,e.column),Math.max(t.row+t.rowspan-1,e.row+e.rowspan-1),Math.max(t.column+t.colspan-1,e.column+e.colspan-1))},ho=function(t,e,n){var r=so.findItem(t,e,Ce),o=so.findItem(t,n,Ce);return r.bind((function(t){return o.map((function(e){return go(t,e)}))}))},po=function(t,e,n){return ho(t,e,n).bind((function(e){return mo(t,e)}))},vo=function(t,e,n,r){return so.findItem(t,e,Ce).bind((function(e){var o=n>0?e.row+e.rowspan-1:e.row,i=r>0?e.column+e.colspan-1:e.column,a=so.getAt(t,o+n,i+r);return a.map((function(t){return t.element}))}))},bo=function(t,e,n){return ho(t,e,n).map((function(e){var n=so.filterItems(t,w(lo,e));return I(n,(function(t){return t.element}))}))},yo=function(t,e){var n=function(t,e){return Te(e,t)};return so.findItem(t,e,n).map((function(t){return t.element}))},wo=function(t,e,n){return Nr(t).bind((function(r){var o=ko(r);return vo(o,t,e,n)}))},xo=function(t,e,n){var r=ko(t);return bo(r,e,n)},Co=function(t,e,n,r,o){var i=ko(t),a=Ce(t,n)?A.some(e):yo(i,e),u=Ce(t,o)?A.some(r):yo(i,r);return a.bind((function(t){return u.bind((function(e){return bo(i,t,e)}))}))},So=function(t,e,n){var r=ko(t);return po(r,e,n)},ko=so.fromTable,To=function(t,e){var n=hn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},Oo=function(t,e){var n=yn(t);n.fold((function(){var n=hn(t);n.each((function(t){Eo(t,e)}))}),(function(t){To(t,e)}))},_o=function(t,e){var n=Cn(t);n.fold((function(){Eo(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Eo=function(t,e){t.dom.appendChild(e.dom)},Ao=function(t,e,n){xn(t,n).fold((function(){Eo(t,e)}),(function(t){To(t,e)}))},Do=function(t,e){To(t,e),Eo(e,t)},Mo=function(t,e){L(e,(function(e){To(t,e)}))},No=function(t,e){L(e,(function(n,r){var o=0===r?t:e[r-1];Oo(o,n)}))},Ro=function(t,e){L(e,(function(e){Eo(t,e)}))},zo=function(t){t.dom.textContent="",L(wn(t),(function(t){Bo(t)}))},Bo=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Po=function(t){var e=wn(t);e.length>0&&Mo(t,e),Bo(t)},Io=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?A.from(e.dom.nodeValue):A.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},Lo=Io(cn,"text"),Ho=function(t){return Lo.get(t)},Fo=function(t){return Lo.getOption(t)},Vo=function(t,e){return Lo.set(t,e)},jo=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Uo(){var t=function(t){return ve.fromDom(t.dom.cloneNode(!1))},e=function(t){return mn(t).dom},n=function(t){return!!un(t)&&("body"===nn(t)||z(jo,nn(t)))},r=function(t){return!!un(t)&&z(["br","img","hr","input"],nn(t))},o=function(t){return un(t)&&"false"===Qn(t,"contenteditable")},i=function(t,e){return t.dom.compareDocumentPosition(e.dom)},a=function(t,e){var n=nr(t);Jn(e,n)},u=function(t){var e=nn(t);return z(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],e)},c=function(t){return un(t)?tr(t,"lang"):A.none()};return{up:v({selector:$n,closest:Kn,predicate:Vn,all:vn}),down:v({selector:Hn,predicate:Pn}),styles:v({get:gr,getRaw:pr,set:dr,remove:vr}),attrs:v({get:Qn,set:Yn,remove:er,copyTo:a}),insert:v({before:To,after:Oo,afterAll:No,append:Eo,appendAll:Ro,prepend:_o,wrap:Do}),remove:v({unwrap:Po,remove:Bo}),create:v({nu:ve.fromTag,clone:t,text:ve.fromText}),query:v({comparePosition:i,prevSibling:bn,nextSibling:yn}),property:v({children:wn,name:nn,parent:hn,document:e,isText:cn,isComment:an,isElement:un,isSpecial:u,getLanguage:c,getText:Ho,setText:Vo,isBoundary:n,isEmptyTag:r,isNonEditable:o}),eq:Ce,is:Oe}}var Wo=function(t,e,n,r){var o=n[0],i=n.slice(1);return r(t,e,o,i)},$o=function(t,e,n){return n.length>0?Wo(t,e,n,qo):A.none()},qo=function(t,e,n,r){var o=e(t,n);return j(r,(function(n,r){var o=e(t,r);return Go(t,n,o)}),o)},Go=function(t,e,n){return e.bind((function(e){return n.filter(w(t.eq,e))}))},Ko=function(t,e){return w(t.eq,e)},Xo=function(t,e,n,r){void 0===r&&(r=S);var o=[e].concat(t.up().all(e)),i=[n].concat(t.up().all(n)),a=function(t){var e=q(t,r);return e.fold((function(){return t}),(function(e){return t.slice(0,e+1)}))},u=a(o),c=a(i),s=$(u,(function(e){return B(c,Ko(t,e))}));return{firstpath:u,secondpath:c,shared:s}},Yo=$o,Jo=Xo,Zo=Uo(),Qo=function(t,e){return Yo(Zo,(function(e,n){return t(n)}),e)},ti=function(t,e,n){return Jo(Zo,t,e,n)},ei=function(t){return $n(t,"table")},ni=function(t,e,n){var r=function(t){return function(e){return void 0!==n&&n(e)||Ce(e,t)}};return Ce(t,e)?A.some({boxes:A.some([t]),start:t,finish:e}):ei(t).bind((function(o){return ei(e).bind((function(i){if(Ce(o,i))return A.some({boxes:xo(o,t,e),start:t,finish:e});if(Te(o,i)){var a=In(e,"td,th",r(o)),u=a.length>0?a[a.length-1]:e;return A.some({boxes:Co(o,t,o,e,i),start:t,finish:u})}if(Te(i,o)){a=In(t,"td,th",r(i));var c=a.length>0?a[a.length-1]:t;return A.some({boxes:Co(i,t,o,e,i),start:t,finish:c})}return ti(t,e).shared.bind((function(a){return Kn(a,"table",n).bind((function(n){var a=In(e,"td,th",r(n)),u=a.length>0?a[a.length-1]:e,c=In(t,"td,th",r(n)),s=c.length>0?c[c.length-1]:t;return A.some({boxes:Co(n,t,o,e,i),start:s,finish:u})}))}))}))}))},ri=function(t,e){var n=Hn(t,e);return n.length>0?A.some(n):A.none()},oi=function(t,e){return $(t,(function(t){return be(t,e)}))},ii=function(t,e,n){return Gn(t,e).bind((function(e){return Gn(t,n).bind((function(t){return Qo(ei,[e,t]).map((function(n){return{first:e,last:t,table:n}}))}))}))},ai=function(t,e){return $n(t,"table").bind((function(n){return Gn(n,e).bind((function(e){return ni(e,t).bind((function(t){return t.boxes.map((function(e){return{boxes:e,start:t.start,finish:t.finish}}))}))}))}))},ui=function(t,e,n,r,o){return oi(t,o).bind((function(t){return wo(t,e,n).bind((function(t){return ai(t,r)}))}))},ci=function(t,e){return ri(t,e)},si=function(t,e,n){return ii(t,e,n).bind((function(e){var n=function(e){return Ce(t,e)},r="thead,tfoot,tbody,table",o=$n(e.first,r,n),i=$n(e.last,r,n);return o.bind((function(t){return i.bind((function(n){return Ce(t,n)?So(e.table,e.first,e.last):A.none()}))}))}))},li=function(t){if(!a(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return L(t,(function(r,o){var i=_e(r);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],c=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!a(c))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+i);var a=function(t){var r=_e(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=X(e,(function(t){return z(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:a,log:function(t){console.log(t,{constructors:e,constructor:u,params:n})}}}})),n},fi={generate:li},di=fi.generate([{none:[]},{multiple:["elements"]},{single:["element"]}]),mi=function(t,e,n,r){return t.fold(e,n,r)},gi=di.none,hi=di.multiple,pi=di.single,vi=function(t,e,n){var r=function(){return ci(t(),n).fold((function(){return e().fold(gi,pi)}),(function(t){return hi(t)}))};return{get:r}},bi=tinymce.util.Tools.resolve("tinymce.PluginManager"),yi=function(t,e){return ve.fromDom(t.dom.cloneNode(e))},wi=function(t){return yi(t,!1)},xi=function(t){return yi(t,!0)},Ci=function(t,e){var n=ve.fromTag(e),r=nr(t);return Jn(n,r),n},Si=function(t,e){var n=Ci(t,e),r=wn(xi(t));return Ro(n,r),n},ki=function(t,e){var n=Ci(t,e);To(t,n);var r=wn(t);return Ro(n,r),Bo(t),n},Ti=function(t,e){var n=function(e,n){if(!m(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;sr(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=gr(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return U(e,(function(e,n){var r=gr(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},a=function(t,e,n){var r=i(t,n),o=e>r?e-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},Oi=function(){var t=oe().browser;return t.isIE()||t.isEdge()},_i=function(t,e){return Et(t).getOr(e)},Ei=function(t,e,n){return _i(gr(t,e),n)},Ai=function(t){return gr(t,"box-sizing")},Di=function(t,e,n,r){var o=Ei(t,"padding-"+n,0),i=Ei(t,"padding-"+r,0),a=Ei(t,"border-"+n+"-width",0),u=Ei(t,"border-"+r+"-width",0);return e-o-i-a-u},Mi=function(t,e){var n=t.dom,r=n.getBoundingClientRect().height||n.offsetHeight;return"border-box"===e?r:Di(t,r,"top","bottom")},Ni=function(t,e){var n=t.dom,r=n.getBoundingClientRect().width||n.offsetWidth;return"border-box"===e?r:Di(t,r,"left","right")},Ri=function(t){return Oi()?Mi(t,Ai(t)):Ei(t,"height",t.dom.offsetHeight)},zi=function(t){return Oi()?Ni(t,Ai(t)):Ei(t,"width",t.dom.offsetWidth)},Bi=function(t){return Ni(t,"content-box")},Pi=Ti("width",(function(t){return t.dom.offsetWidth})),Ii=function(t){return Pi.get(t)},Li=function(t){return Pi.getOuter(t)},Hi=Bi,Fi=zi,Vi=function(t,e){void 0===e&&(e=k);var n=t.grid,r=P(n.columns,b),o=P(n.rows,b);return I(r,(function(n){var r=function(){return K(o,(function(e){return so.getAt(t,e,n).filter((function(t){return t.column===n})).toArray()}))},i=function(t){return 1===t.colspan&&e(t.element)},a=function(){return so.getAt(t,0,n)};return ji(r,i,a)}))},ji=function(t,e,n){var r=t(),o=$(r,e),i=o.orThunk((function(){return A.from(r[0]).orThunk(n)}));return i.map((function(t){return t.element}))},Ui=function(t){var e=t.grid,n=P(e.rows,b),r=P(e.columns,b);return I(n,(function(e){var n=function(){return K(r,(function(n){return so.getAt(t,e,n).filter((function(t){return t.row===e})).fold(v([]),(function(t){return[t]}))}))},o=function(t){return 1===t.rowspan},i=function(){return so.getAt(t,e,0)};return ji(n,o,i)}))},Wi=function(t,e){if(e<0||e>=t.length-1)return A.none();var n=t[e].fold((function(){var n=Y(t.slice(0,e));return rt(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return A.some({value:t,delta:0})})),r=t[e+1].fold((function(){var n=t.slice(e+1);return rt(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return A.some({value:t,delta:1})}));return n.bind((function(t){return r.map((function(e){var n=e.delta+t.delta;return Math.abs(e.value-t.value)/n}))}))},$i=function(t,e){return function(n){return"rtl"===qi(n)?e:t}},qi=function(t){return"rtl"===gr(t,"direction")?"rtl":"ltr"},Gi=Ti("height",(function(t){var e=t.dom;return Mn(t)?e.getBoundingClientRect().height:e.offsetHeight})),Ki=function(t){return Gi.get(t)},Xi=function(t){return Gi.getOuter(t)},Yi=Ri,Ji=function(t,e){var n=function(n,r){return Ji(t+n,e+r)};return{left:t,top:e,translate:n}},Zi=Ji,Qi=function(t){var e=t.getBoundingClientRect();return Zi(e.left,e.top)},ta=function(t,e){return void 0!==t?t:void 0!==e?e:0},ea=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Zi(n.offsetLeft,n.offsetTop);var i=ta(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=ta(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=ta(o.clientTop,n.clientTop),c=ta(o.clientLeft,n.clientLeft);return na(t).translate(a-c,i-u)},na=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?Zi(r.offsetLeft,r.offsetTop):Mn(t)?Qi(e):Zi(0,0)},ra=function(t,e){return{row:t,y:e}},oa=function(t,e){return{col:t,x:e}},ia=function(t){var e=ea(t);return e.left+Li(t)},aa=function(t){return ea(t).left},ua=function(t,e){return oa(t,aa(e))},ca=function(t,e){return oa(t,ia(e))},sa=function(t){return ea(t).top},la=function(t,e){return ra(t,sa(e))},fa=function(t,e){return ra(t,sa(e)+Xi(e))},da=function(t,e,n){if(0===n.length)return[];var r=I(n.slice(1),(function(e,n){return e.map((function(e){return t(n,e)}))})),o=n[n.length-1].map((function(t){return e(n.length-1,t)}));return r.concat([o])},ma=function(t){return-t},ga={delta:b,positions:function(t){return da(la,fa,t)},edge:sa},ha={delta:b,edge:aa,positions:function(t){return da(ua,ca,t)}},pa={delta:ma,edge:ia,positions:function(t){return da(ca,ua,t)}},va=$i(ha,pa),ba={delta:function(t,e){return va(e).delta(t,e)},positions:function(t,e){return va(e).positions(t,e)},edge:function(t){return va(t).edge(t)}},ya={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},wa=function(){var t="[0-9]+",e="[+-]?"+t,n="[eE]"+e,r="\\.",o=function(t){return"(?:"+t+")?"},i=["Infinity",t+r+o(t)+o(n),r+t+o(n),t+o(n)].join("|"),a="[+-]?(?:"+i+")";return new RegExp("^("+a+")(.*)$")}(),xa=function(t,e){return B(e,(function(e){return B(ya[e],(function(e){return t===e}))}))},Ca=function(t,e){var n=A.from(wa.exec(t));return n.bind((function(t){var n=Number(t[1]),r=t[2];return xa(r,e)?A.some({value:n,unit:r}):A.none()}))},Sa=/(\d+(\.\d+)?)%/,ka=/(\d+(\.\d+)?)px|em/,Ta=fn("col"),Oa=function(t,e,n){var r=pn(t).getOrThunk((function(){return Rn(dn(t))}));return e(t)/n(r)*100},_a=function(t,e){dr(t,"width",e+"px")},Ea=function(t,e){dr(t,"width",e+"%")},Aa=function(t,e){dr(t,"height",e+"px")},Da=function(t){return Yi(t)+"px"},Ma=function(t,e,n,r){var o=Nr(t).map((function(t){var r=n(t);return Math.floor(e/100*r)})).getOr(e);return r(t,o),o},Na=function(t,e,n,r){var o=parseFloat(t);return St(t,"%")&&"table"!==nn(e)?Ma(e,o,n,r):o},Ra=function(t){var e=Da(t);return e?Na(e,t,Ki,Aa):Ki(t)},za=function(t,e,n){var r=n(t),o=wr(t,e);return r/o},Ba=function(t,e){return pr(t,e).orThunk((function(){return tr(t,e).map((function(t){return t+"px"}))}))},Pa=function(t){return Ba(t,"width")},Ia=function(t){return Ba(t,"height")},La=function(t){return Oa(t,Ii,Hi)},Ha=function(t){return Ta(t)?Ii(t):Fi(t)},Fa=function(t){return za(t,"rowspan",Ra)},Va=function(t){var e=Pa(t);return e.bind((function(t){return Ca(t,["fixed","relative","empty"])}))},ja=function(t,e,n){dr(t,"width",e+n)},Ua=function(t){return Ii(t)+"px"},Wa=function(t){return Oa(t,Ii,Hi)+"%"},$a=function(t){return Pa(t).exists((function(t){return Sa.test(t)}))},qa=function(t){return Pa(t).exists((function(t){return ka.test(t)}))},Ga=function(t){return Pa(t).isNone()},Ka=v(Sa),Xa=fn("col"),Ya=function(t){return Pa(t).getOrThunk((function(){return Ha(t)+"px"}))},Ja=function(t){return Ia(t).getOrThunk((function(){return Fa(t)+"px"}))},Za=function(t){return I(so.justColumns(t),(function(t){return A.from(t.element)}))},Qa=function(t){var e=oe().browser,n=e.isChrome()||e.isFirefox();return!Xa(t)||n},tu=function(t,e,n,r,o,i){return t.filter(r).fold((function(){return i(Wi(n,e))}),(function(t){return o(t)}))},eu=function(t,e,n,r){var o=Vi(t),i=so.hasColumns(t)?Za(t):o,a=[A.some(ba.edge(e))].concat(I(ba.positions(o,e),(function(t){return t.map((function(t){return t.x}))}))),u=x(xr);return I(i,(function(t,e){return tu(t,e,a,u,(function(t){if(Qa(t))return n(t);var i=ar(o[e],b);return tu(i,e,a,u,(function(t){return r(A.some(Ii(t)))}),r)}),r)}))},nu=function(t){return t.map((function(t){return t+"px"})).getOr("")},ru=function(t,e){return eu(t,e,Ya,nu)},ou=function(t,e,n){return eu(t,e,La,(function(t){return t.fold((function(){return n.minCellWidth()}),(function(t){return t/n.pixelWidth()*100}))}))},iu=function(t,e,n){return eu(t,e,Ha,(function(t){return t.getOrThunk(n.minCellWidth)}))},au=function(t,e,n,r,o){var i=Ui(t),a=[A.some(n.edge(e))].concat(I(n.positions(i,e),(function(t){return t.map((function(t){return t.y}))})));return I(i,(function(t,e){return tu(t,e,a,x(Cr),r,o)}))},uu=function(t,e,n){return au(t,e,n,Fa,(function(t){return t.getOrThunk(Tr)}))},cu=function(t,e,n){return au(t,e,n,Ja,nu)},su=function(t,e){return function(){return Mn(t)?e(t):parseFloat(pr(t,"width").getOr("0"))}},lu=function(t){var e=su(t,Ii),n=v(0),r=function(e,n){return iu(e,t,n)};return{width:e,pixelWidth:e,getWidths:r,getCellDelta:n,singleColumnWidth:v([0]),minCellWidth:n,setElementWidth:g,adjustTableWidth:g,isRelative:!0,label:"none"}},fu=function(t){var e=su(t,(function(t){return parseFloat(Wa(t))})),n=su(t,Ii),r=function(t){return t/n()*100},o=function(t,e){return[100-t]},i=function(){return kr()/n()*100},a=function(n){var r=e(),o=n/100*r,i=r+o;Ea(t,i)},u=function(e,n){return ou(e,t,n)};return{width:e,pixelWidth:n,getWidths:u,getCellDelta:r,singleColumnWidth:o,minCellWidth:i,setElementWidth:Ea,adjustTableWidth:a,isRelative:!0,label:"percent"}},du=function(t){var e=su(t,Ii),n=b,r=function(t,e){var n=Math.max(kr(),t+e);return[n-t]},o=function(n){var r=e()+n;_a(t,r)},i=function(e,n){return iu(e,t,n)};return{width:e,pixelWidth:e,getWidths:i,getCellDelta:n,singleColumnWidth:r,minCellWidth:kr,setElementWidth:_a,adjustTableWidth:o,isRelative:!1,label:"pixel"}},mu=function(t,e){var n=Ka().exec(e);return null!==n?fu(t):du(t)},gu=function(t){var e=Pa(t);return e.fold((function(){return lu(t)}),(function(e){return mu(t,e)}))},hu={getTableSize:gu,pixelSize:du,percentageSize:fu,noneSize:lu},pu=function(t,e,n,r,o,i){return{minRow:t,minCol:e,maxRow:n,maxCol:r,allCells:o,selectedCells:i}},vu=function(t,e){var n=t.grid.columns,r=t.grid.rows,o=r,i=n,a=0,u=0,c=[],s=[];return Ae(t.access,(function(t){if(c.push(t),e(t)){s.push(t);var n=t.row,r=n+t.rowspan-1,l=t.column,f=l+t.colspan-1;n<o?o=n:r>a&&(a=r),l<i?i=l:f>u&&(u=f)}})),pu(o,i,a,u,c,s)},bu=function(t,e,n){var r=t[n].element,o=ve.fromTag("td");Eo(o,ve.fromTag("br"));var i=e?Eo:_o;i(r,o)},yu=function(t,e,n,r){for(var o=e.grid.columns,i=e.grid.rows,a=0;a<i;a++)for(var u=!1,c=0;c<o;c++)if(!(a<n.minRow||a>n.maxRow||c<n.minCol||c>n.maxCol)){var s=so.getAt(e,a,c).filter(r).isNone();s?bu(t,u,a):u=!0}},wu=function(t,e,n,r){Ae(n.columns,(function(t){(t.column<e.minCol||t.column>e.maxCol)&&Bo(t.element)}));var o=V(Or(t,"tr"),(function(t){return 0===t.dom.childElementCount}));L(o,Bo),e.minCol!==e.maxCol&&e.minRow!==e.maxRow||L(Or(t,"th,td"),(function(t){er(t,"rowspan"),er(t,"colspan")})),er(t,Xr),er(t,"data-snooker-col-series");var i=hu.getTableSize(t);i.adjustTableWidth(r)},xu=function(t,e,n,r){if(0===r.minCol&&e.grid.columns===r.maxCol+1)return 0;var o=iu(e,t,n),i=U(o,(function(t,e){return t+e}),0),a=U(o.slice(r.minCol,r.maxCol+1),(function(t,e){return t+e}),0),u=a/i*n.pixelWidth(),c=u-n.pixelWidth();return n.getCellDelta(c)},Cu=function(t,e){var n=function(t){return be(t.element,e)},r=xi(t),o=Ir(r),i=hu.getTableSize(t),a=so.generate(o),u=vu(a,n),c="th:not("+e+"),td:not("+e+")",s=_r(r,"th,td",(function(t){return be(t,c)}));L(s,Bo),yu(o,a,u,n);var l=so.fromTable(t),f=xu(t,l,i,u);return wu(r,u,a,f),r},Su=" ",ku=function(t){return"img"===nn(t)?1:Fo(t).fold((function(){return wn(t).length}),(function(t){return t.length}))},Tu=function(t){return Fo(t).filter((function(t){return 0!==t.trim().length||t.indexOf(Su)>-1})).isSome()},Ou=["img","br"],_u=function(t){var e=Tu(t);return e||z(Ou,nn(t))},Eu=function(t){return Wn(t,_u)},Au=function(t){return Du(t,_u)},Du=function(t,e){var n=function(t){for(var r=wn(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return A.some(i);var a=n(i);if(a.isSome())return a}return A.none()};return n(t)},Mu={scope:["row","col"]},Nu=function(t){return function(){var e=ve.fromTag("td",t.dom);return Eo(e,ve.fromTag("br",t.dom)),e}},Ru=function(t){return function(){return ve.fromTag("col",t.dom)}},zu=function(t){return function(){return ve.fromTag("colgroup",t.dom)}},Bu=function(t){return function(){return ve.fromTag("tr",t.dom)}},Pu=function(t,e,n){var r=Si(t,e);return Ae(n,(function(t,e){null===t?er(r,e):Yn(r,e,t)})),r},Iu=function(t){return t},Lu=function(t,e,n){var r=Eu(t);return r.map((function(r){var o=n.join(","),i=In(r,o,(function(e){return Ce(e,t)}));return j(i,(function(t,e){var n=wi(e);return er(n,"contenteditable"),Eo(t,n),n}),e)})).getOr(e)},Hu=function(t,e){Ae(Mu,(function(n,r){return tr(t,r).filter((function(t){return z(n,t)})).each((function(t){return Yn(e,r,t)}))}))},Fu=function(t,e,n){var r=function(t,e){br(t.element,e),vr(e,"height"),1!==t.colspan&&vr(e,"width")},o=function(o){var i=ve.fromTag(nn(o.element),e.dom),a=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),u=a.length>0?Lu(o.element,i,a):i;return Eo(u,ve.fromTag("br")),r(o,i),Hu(o.element,i),t(o.element,i),i},i=function(n){var o=ve.fromTag(nn(n.element),e.dom);return r(n,o),t(n.element,o),o};return{col:i,colgroup:zu(e),row:Bu(e),cell:o,replace:Pu,colGap:Ru(e),gap:Nu(e)}},Vu=function(t){return{col:Ru(t),colgroup:zu(t),row:Bu(t),cell:Nu(t),replace:Iu,colGap:Ru(t),gap:Nu(t)}},ju=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,wn(ve.fromDom(r))},Uu=function(t){return I(t,ve.fromDom)},Wu=function(t){return t.nodeName.toLowerCase()},$u=function(t){return ve.fromDom(t.getBody())},qu=function(t){return t.getBoundingClientRect().width},Gu=function(t){return t.getBoundingClientRect().height},Ku=function(t){return function(e){return Ce(e,$u(t))}},Xu=function(t){return t?t.replace(/px$/,""):""},Yu=function(t){return/^\d+(\.\d+)?$/.test(t)?t+"px":t},Ju=function(t){er(t,"data-mce-style");var e=function(t){return er(t,"data-mce-style")};L(Dr(t),e),L(Mr(t),e),L(Rr(t),e)},Zu=function(t,e){var n=t.dom.getStyle(e,"width")||t.dom.getAttrib(e,"width");return A.from(n).filter(Ot)},Qu=function(t){return/^(\d+(\.\d+)?)%$/.test(t)},tc=function(t){return/^(\d+(\.\d+)?)px$/.test(t)},ec=function(t){return ve.fromDom(t.selection.getStart())},nc=function(t){return ve.fromDom(t.selection.getEnd())},rc=function(t){return mi(t.get(),v([]),b,Z)},oc=function(t){var e=function(t,e){return tr(t,e).exists((function(t){return parseInt(t,10)>1}))},n=function(t){return e(t,"rowspan")||e(t,"colspan")},r=rc(t);return r.length>0&&X(r,n)?A.some(r):A.none()},ic=function(t,e,n){return mi(e.get(),A.none,(function(e){return e.length<=1?A.none():si(t,n.firstSelectedSelector,n.lastSelectedSelector).map((function(t){return{bounds:t,cells:e}}))}),A.none)},ac="data-mce-selected",uc="td["+ac+"],th["+ac+"]",cc="["+ac+"]",sc="data-mce-first-selected",lc="td["+sc+"],th["+sc+"]",fc="data-mce-last-selected",dc="td["+fc+"],th["+fc+"]",mc=cc,gc={selected:ac,selectedSelector:uc,firstSelected:sc,firstSelectedSelector:lc,lastSelected:fc,lastSelectedSelector:dc},hc=function(t){return{element:t,mergable:A.none(),unmergable:A.none(),selection:[t]}},pc=function(t,e,n){return{element:n,mergable:ic(e,t,gc),unmergable:oc(t),selection:rc(t)}},vc=function(t,e,n){return{element:t,clipboard:e,generators:n}},bc=function(t,e,n,r){return{selection:rc(t),clipboard:n,generators:r}},yc=function(t){return Nr(t).bind((function(t){return ci(t,gc.firstSelectedSelector)})).fold(v(t),(function(t){return t[0]}))},wc=function(t){return function(e,n){var r=nn(e),o="col"===r||"colgroup"===r?yc(e):e;return Kn(o,t,n)}},xc=wc("th,td,caption"),Cc=wc("th,td"),Sc=function(t){return rc(t)},kc=function(t,e){var n=Cc(t),r=n.bind((function(t){return Nr(t)})).map((function(t){return Rr(t)}));return ir(n,r,(function(t,n){return V(n,(function(n){return B(Uu(n.dom.cells),(function(n){return"1"===Qn(n,e)||Ce(n,t)}))}))})).getOr([])},Tc=function(t){return Nr(t[0]).map((function(t){var e=Cu(t,mc);return Ju(e),[e]}))},Oc=function(t,e){return I(e,(function(e){return t.selection.serializer.serialize(e.dom,{})})).join("")},_c=function(t){return I(t,(function(t){return t.dom.innerText})).join("")},Ec=function(t,e,n){t.on("BeforeGetContent",(function(n){var r=function(e){n.preventDefault(),Tc(e).each((function(e){n.content="text"===n.format?_c(e):Oc(t,e)}))};!0===n.selection&&mi(e.get(),g,r,g)})),t.on("BeforeSetContent",(function(r){if(!0===r.selection&&!0===r.paste){var o=Sc(e);et(o).each((function(e){Nr(e).each((function(o){var i=V(ju(r.content),(function(t){return"meta"!==nn(t)})),a=fn("table");if(1===i.length&&a(i[0])){r.preventDefault();var u=ve.fromDom(t.getDoc()),c=Vu(u),s=vc(e,i[0],c);n.pasteCells(o,s).each((function(){t.focus()}))}}))}))}}))},Ac=fi.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Dc=ot({},Ac),Mc=function(t,e){return 0===t.length?Dc.none():1===t.length?Dc.only(0):0===e?Dc.left(0,1):e===t.length-1?Dc.right(e-1,e):e>0&&e<t.length-1?Dc.middle(e-1,e,e+1):Dc.none()},Nc=function(t,e,n,r,o){var i=t.slice(0),a=Mc(t,e),u=v(I(i,v(0))),c=function(t){return r.singleColumnWidth(i[t],n)},s=function(t,e){return o.calcLeftEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)},l=function(t,e,a){return o.calcMiddleDeltas(i,t,e,a,n,r.minCellWidth(),r.isRelative)},f=function(t,e){return o.calcRightEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)};return a.fold(u,c,s,l,f)},Rc=function(t,e,n){for(var r=0,o=t;o<e;o++)r+=void 0!==n[o]?n[o]:0;return r},zc=function(t,e){var n=so.justCells(t);return I(n,(function(t){var n=Rc(t.column,t.column+t.colspan,e);return{element:t.element,width:n,colspan:t.colspan}}))},Bc=function(t,e){var n=so.justColumns(t);return I(n,(function(t,n){return{element:t.element,width:e[n],colspan:t.colspan}}))},Pc=function(t,e){var n=so.justCells(t);return I(n,(function(t){var n=Rc(t.row,t.row+t.rowspan,e);return{element:t.element,height:n,rowspan:t.rowspan}}))},Ic=function(t,e){return I(t.all,(function(t,n){return{element:t.element,height:e[n]}}))},Lc=function(t){return j(t,(function(t,e){return t+e}),0)},Hc=function(t,e){return so.hasColumns(t)?Bc(t,e):zc(t,e)},Fc=function(t,e,n){var r=Hc(t,e);L(r,(function(t){n.setElementWidth(t.element,t.width)}))},Vc=function(t,e,n,r,o){var i=so.fromTable(t),a=o.getCellDelta(e),u=o.getWidths(i,o),c=n===i.grid.columns-1,s=r.clampTableDelta(u,n,a,o.minCellWidth(),c),l=Nc(u,n,s,o,r),f=I(l,(function(t,e){return t+u[e]}));Fc(i,f,o),r.resizeTable(o.adjustTableWidth,s,c)},jc=function(t,e,n,r){var o=so.fromTable(t),i=uu(o,t,r),a=I(i,(function(t,r){return n===r?Math.max(e+t,Tr()):t})),u=Pc(o,a),c=Ic(o,a);L(c,(function(t){Aa(t.element,t.height)})),L(u,(function(t){Aa(t.element,t.height)}));var s=Lc(a);Aa(t,s)},Uc=function(t,e,n,r,o){var i=so.generate(e),a=r.getWidths(i,r),u=r.pixelWidth(),c=o.calcRedestributedWidths(a,u,n.pixelDelta,r.isRelative),s=c.newSizes,l=c.delta;Fc(i,s,r),r.adjustTableWidth(l)},Wc=function(t,e,n,r){var o=so.generate(e),i=r.getWidths(o,r);Fc(o,i,r)},$c=function(t){return I(t,v(0))},qc=function(t,e,n,r,o){return o(t.slice(0,e)).concat(r).concat(o(t.slice(n)))},Gc=function(t){return function(e,n,r,o){if(t(r)){var i=Math.max(o,e[n]-Math.abs(r)),a=Math.abs(i-e[n]);return r>=0?a:-a}return r}},Kc=Gc((function(t){return t<0})),Xc=Gc(k),Yc=function(){var t=function(t,e,n,r,o){var i=Kc(t,e,r,o);return qc(t,e,n+1,[i,0],$c)},e=function(t,e,n,r){var o=(100+n)/100,i=Math.max(r,(t[e]+n)/o);return I(t,(function(t,n){var r=n===e?i:t/o;return r-t}))},n=function(n,r,o,i,a,u){return u?e(n,r,i,a):t(n,r,o,i,a)},r=function(t,e,r,o,i,a,u){return n(t,r,o,i,a,u)},o=function(t,e){return t(e)},i=function(t,n,r,o,i,a){if(a)return e(t,r,o,i);var u=Kc(t,r,o,i);return $c(t.slice(0,r)).concat([u])},a=function(t,e,n,r){if(r){var o=e+n,i=o/e,a=I(t,(function(t){return t/i}));return{delta:100*i-100,newSizes:a}}return{delta:n,newSizes:t}};return{resizeTable:o,clampTableDelta:Kc,calcLeftEdgeDeltas:n,calcMiddleDeltas:r,calcRightEdgeDeltas:i,calcRedestributedWidths:a}},Jc=function(){var t=function(t,e,n,r,o){var i=r>=0?n:e,a=Xc(t,i,r,o);return qc(t,e,n+1,[a,-a],$c)},e=function(e,n,r,o,i,a){return t(e,r,o,i,a)},n=function(t,e,n){n&&t(e)},r=function(t,e,n,r,o,i){if(i)return $c(t);var a=r/t.length;return I(t,v(a))},o=function(t,e,n,r,o){if(o){if(n>=0)return n;var i=U(t,(function(t,e){return t+e-r}),0);return Math.max(-i,n)}return Kc(t,e,n,r)},i=function(t,e,n,r){return{delta:0,newSizes:t}};return{resizeTable:n,clampTableDelta:o,calcLeftEdgeDeltas:t,calcMiddleDeltas:e,calcRightEdgeDeltas:r,calcRedestributedWidths:i}},Zc=function(t,e){var n=A.from(t.dom.documentElement).map(ve.fromDom).getOr(t);return{parent:v(n),view:v(t),origin:v(Zi(0,0)),isResizable:e}},Qc=function(t,e,n){var r=function(){return ea(e)};return{parent:v(e),view:v(t),origin:r,isResizable:n}},ts=function(t,e,n){return{parent:v(e),view:v(t),origin:v(Zi(0,0)),isResizable:n}},es={only:Zc,detached:Qc,body:ts},ns=fi.generate([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),rs=function(t,e,n){var r=n.substring(0,n.length-t.length),o=parseFloat(r);return r===o.toString()?e(o):ns.invalid(n)},os=function(t){return St(t,"%")?rs("%",ns.percent,t):St(t,"px")?rs("px",ns.pixels,t):ns.invalid(t)},is=ot(ot({},ns),{from:os}),as=function(t,e){return I(t,(function(t){var n=is.from(t);return n.fold((function(){return t}),(function(t){var n=t/e*100;return n+"%"}),(function(t){return t+"%"}))}))},us=function(t,e,n){var r=n/e;return I(t,(function(t){var e=is.from(t);return e.fold((function(){return t}),(function(t){return t*r+"px"}),(function(t){return t/100*n+"px"}))}))},cs=function(t,e){var n=t.fold((function(){return v("")}),(function(t){var n=t/e;return v(n+"px")}),(function(){var t=100/e;return v(t+"%")}));return P(e,n)},ss=function(t,e,n){return t.fold((function(){return e}),(function(t){return us(e,n,t)}),(function(t){return as(e,n)}))},ls=function(t,e,n){var r=is.from(n),o=X(t,(function(t){return"0px"===t}))?cs(r,t.length):ss(r,t,e);return gs(o)},fs=function(t,e){return 0===t.length?e:j(t,(function(t,e){return is.from(e).fold(v(0),b,b)+t}),0)},ds=function(t,e){var n=Math.floor(t);return{value:n+e,remainder:t-n}},ms=function(t,e){return is.from(t).fold(v(t),(function(t){return t+e+"px"}),(function(t){return t+e+"%"}))},gs=function(t){if(0===t.length)return t;var e=j(t,(function(t,e){var n=is.from(e).fold((function(){return{value:e,remainder:0}}),(function(t){return ds(t,"px")}),(function(t){return{value:t+"%",remainder:0}}));return{output:[n.value].concat(t.output),remainder:t.remainder+n.remainder}}),{output:[],remainder:0}),n=e.output;return n.slice(0,n.length-1).concat([ms(n[n.length-1],Math.round(e.remainder))])},hs=is.from,ps=function(t,e,n){L(e,(function(e){var r=t.slice(e.column,e.colspan+e.column),o=fs(r,kr());dr(e.element,"width",o+n)}))},vs=function(t,e,n){L(e,(function(e,r){var o=fs([t[r]],kr());dr(e.element,"width",o+n)}))},bs=function(t,e,n,r){L(n,(function(e){var n=t.slice(e.row,e.rowspan+e.row),o=fs(n,Tr());dr(e.element,"height",o+r)})),L(e,(function(e,n){dr(e.element,"height",t[n])}))},ys=function(t){return hs(t).fold(v("px"),v("px"),v("%"))},ws=function(t,e,n){var r=so.fromTable(t),o=r.all,i=so.justCells(r),a=so.justColumns(r);e.each((function(e){var n=ys(e),o=Ii(t),u=ru(r,t),c=ls(u,o,e);so.hasColumns(r)?vs(c,a,n):ps(c,i,n),dr(t,"width",e)})),n.each((function(e){var n=ys(e),a=Ki(t),u=cu(r,t,ga),c=ls(u,a,e);bs(c,o,i,n),dr(t,"height",e)}))},xs=$a,Cs=qa,Ss=Ga,ks=function(t){var e=so.fromTable(t);return e.grid},Ts=function(t){var e=[],n=function(t){if(void 0===t)throw new Error("Event bind error: undefined handler");e.push(t)},r=function(t){e=V(e,(function(e){return e!==t}))},o=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o={};L(t,(function(t,e){o[t]=n[e]})),L(e,(function(t){t(o)}))};return{bind:n,unbind:r,trigger:o}},Os=function(t){var e=De(t,(function(t){return{bind:t.bind,unbind:t.unbind}})),n=De(t,(function(t){return t.trigger}));return{registry:e,trigger:n}},_s=function(t,e){var n=null,r=function(){u(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},Es=function(t){return t.slice(0).sort()},As=function(t,e){throw new Error("All required keys ("+Es(t).join(", ")+") were not specified. Specified keys were: "+Es(e).join(", ")+".")},Ds=function(t){throw new Error("Unsupported keys for object: "+Es(t).join(", "))},Ms=function(t,e){if(!a(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");L(e,(function(e){if(!o(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")}))},Ns=function(t,e){throw new Error("All values need to be of type: "+e+". Keys ("+Es(t).join(", ")+") were not.")},Rs=function(t){var e=Es(t),n=$(e,(function(t,n){return n<e.length-1&&t===e[n+1]}));n.each((function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+e.join(", ")+"].")}))},zs=function(t,e){return Bs(t,e,{validate:d,label:"function"})},Bs=function(t,e,n){if(0===e.length)throw new Error("You must specify at least one required field.");return Ms("required",e),Rs(e),function(r){var o=_e(r),i=X(e,(function(t){return z(o,t)}));i||As(e,o),t(e,o);var a=V(e,(function(t){return!n.validate(r[t],t)}));return a.length>0&&Ns(a,n.label),r}},Ps=function(t,e){var n=V(e,(function(e){return!z(t,e)}));n.length>0&&Ds(n)},Is=function(t){return zs(Ps,t)},Ls=Is(["compare","extract","mutate","sink"]),Hs=Is(["element","start","stop","destroy"]),Fs=Is(["forceDrop","drop","move","delayDrop"]),Vs=function(){var t=A.none(),e=function(){t=A.none()},n=function(e,n){var r=t.map((function(t){return e.compare(t,n)}));return t=A.some(n),r},r=function(t,e){var r=e.extract(t);r.each((function(t){var r=n(e,t);r.each((function(t){o.trigger.move(t)}))}))},o=Os({move:Ts(["info"])});return{onEvent:r,reset:e,events:o.registry}},js=function(){var t=Os({move:Ts(["info"])});return{onEvent:g,reset:g,events:t.registry}},Us=function(){var t=js(),e=Vs(),n=t,r=function(){n.reset(),n=e},o=function(){n.reset(),n=t},i=function(t,e){n.onEvent(t,e)},a=function(){return n===e};return{on:r,off:o,isOn:a,onEvent:i,events:e.events}},Ws=function(t,e,n){var r=!1,o=Os({start:Ts([]),stop:Ts([])}),i=Us(),a=function(){m.stop(),i.isOn()&&(i.off(),o.trigger.stop())},u=_s(a,200),c=function(t){m.start(t),i.on(),o.trigger.start()},s=function(t){u.cancel(),i.onEvent(t,e)};i.events.move.bind((function(n){e.mutate(t,n.info)}));var l=function(){r=!0},f=function(){r=!1},d=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r&&t.apply(null,e)}},m=e.sink(Fs({forceDrop:a,drop:d(a),move:d(s),delayDrop:d(u.throttle)}),n),g=function(){m.destroy()};return{element:m.element,go:c,on:l,off:f,destroy:g,events:o.registry}},$s=function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}},qs=function(t){var e=ve.fromDom(An(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=h(r,n);return $s(e,t.clientX,t.clientY,n,r,o,t)},Gs=function(t,e){return function(n){t(n)&&e(qs(n))}},Ks=function(t,e,n,r,o){var i=Gs(n,r);return t.dom.addEventListener(e,i,o),{unbind:w(Ys,t,e,i,o)}},Xs=function(t,e,n,r){return Ks(t,e,n,r,!1)},Ys=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Js=k,Zs=function(t,e,n){return Xs(t,e,Js,n)},Qs=qs,tl=function(t,e){var n=Qn(t,e);return void 0===n||""===n?[]:n.split(" ")},el=function(t,e,n){var r=tl(t,e),o=r.concat([n]);return Yn(t,e,o.join(" ")),!0},nl=function(t,e,n){var r=V(tl(t,e),(function(t){return t!==n}));return r.length>0?Yn(t,e,r.join(" ")):er(t,e),!1},rl=function(t){return void 0!==t.dom.classList},ol=function(t){return tl(t,"class")},il=function(t,e){return el(t,"class",e)},al=function(t,e){return nl(t,"class",e)},ul=function(t,e){rl(t)?t.dom.classList.add(e):il(t,e)},cl=function(t){var e=rl(t)?t.dom.classList:ol(t);0===e.length&&er(t,"class")},sl=function(t,e){if(rl(t)){var n=t.dom.classList;n.remove(e)}else al(t,e);cl(t)},ll=function(t,e){return rl(t)&&t.dom.classList.contains(e)},fl=function(t){var e=t.replace(/\./g,"-"),n=function(t){return e+"-"+t};return{resolve:n}},dl=fl("ephox-dragster"),ml=dl.resolve,gl=function(t){var e=ot({layerClass:ml("blocker")},t),n=ve.fromTag("div");Yn(n,"role","presentation"),mr(n,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),ul(n,ml("blocker")),ul(n,e.layerClass);var r=v(n),o=function(){Bo(n)};return{element:r,destroy:o}},hl=function(t,e){return Zi(e.left-t.left,e.top-t.top)},pl=function(t){return A.some(Zi(t.x,t.y))},vl=function(t,e){t.mutate(e.left,e.top)},bl=function(t,e){var n=gl(e),r=Zs(n.element(),"mousedown",t.forceDrop),o=Zs(n.element(),"mouseup",t.drop),i=Zs(n.element(),"mousemove",t.move),a=Zs(n.element(),"mouseout",t.delayDrop),u=function(){n.destroy(),o.unbind(),i.unbind(),a.unbind(),r.unbind()},c=function(t){Eo(t,n.element())},s=function(){Bo(n.element())};return Hs({element:n.element,start:c,stop:s,destroy:u})},yl=Ls({compare:hl,extract:pl,sink:bl,mutate:vl}),wl=function(t,e){void 0===e&&(e={});var n=void 0!==e.mode?e.mode:yl;return Ws(t,n,e)},xl=function(t){return Kn(t,"[contenteditable]")},Cl=function(t,e){return void 0===e&&(e=!1),!oe().browser.isIE()&&Mn(t)?t.dom.isContentEditable:xl(t).fold(v(e),(function(t){return"true"===Sl(t)}))},Sl=function(t){return t.dom.contentEditable},kl=fl("ephox-snooker"),Tl=kl.resolve,Ol=function(){var t=Os({drag:Ts(["xDelta","yDelta"])}),e=function(e,n){t.trigger.drag(e,n)};return{mutate:e,events:t.registry}},_l=function(){var t=Os({drag:Ts(["xDelta","yDelta","target"])}),e=A.none(),n=Ol();n.events.drag.bind((function(n){e.each((function(e){t.trigger.drag(n.xDelta,n.yDelta,e)}))}));var r=function(t){e=A.some(t)},o=function(){return e};return{assign:r,get:o,mutate:n.mutate,events:t.registry}},El=function(t,e,n,r,o){var i=ve.fromTag("div");return mr(i,{position:"absolute",left:e-r/2+"px",top:n+"px",height:o+"px",width:r+"px"}),Jn(i,{"data-column":t,role:"presentation"}),i},Al=function(t,e,n,r,o){var i=ve.fromTag("div");return mr(i,{position:"absolute",left:e+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),Jn(i,{"data-row":t,role:"presentation"}),i},Dl=Tl("resizer-bar"),Ml=Tl("resizer-rows"),Nl=Tl("resizer-cols"),Rl=7,zl=function(t,e){return K(t.all,(function(t,n){return e(t.element)?[n]:[]}))},Bl=function(t,e){var n=[];return P(t.grid.columns,(function(r){var o=so.getColumnAt(t,r).map((function(t){return t.element}));o.forall(e)&&n.push(r)})),V(n,(function(n){var r=so.filterItems(t,(function(t){return t.column===n}));return X(r,(function(t){return e(t.element)}))}))},Pl=function(t){var e=Hn(t.parent(),"."+Dl);L(e,Bo)},Il=function(t,e,n){var r=t.origin();L(e,(function(e){e.each((function(e){var o=n(r,e);ul(o,Dl),Eo(t.parent(),o)}))}))},Ll=function(t,e,n,r){Il(t,e,(function(t,e){var o=El(e.col,e.x-t.left,n.top-t.top,Rl,r);return ul(o,Nl),o}))},Hl=function(t,e,n,r){Il(t,e,(function(t,e){var o=Al(e.row,n.left-t.left,e.y-t.top,r,Rl);return ul(o,Ml),o}))},Fl=function(t,e,n,r,o){var i=ea(n),a=e.isResizable,u=r.length>0?ga.positions(r,n):[],c=u.length>0?zl(t,a):[],s=V(u,(function(t,e){return B(c,(function(t){return e===t}))}));Hl(e,s,i,Li(n));var l=o.length>0?ba.positions(o,n):[],f=l.length>0?Bl(t,a):[],d=V(l,(function(t,e){return B(f,(function(t){return e===t}))}));Ll(e,d,i,Xi(n))},Vl=function(t,e){if(Pl(t),t.isResizable(e)){var n=so.fromTable(e),r=Ui(n),o=Vi(n);Fl(n,t,e,r,o)}},jl=function(t,e){var n=Hn(t.parent(),"."+Dl);L(n,e)},Ul=function(t){jl(t,(function(t){dr(t,"display","none")}))},Wl=function(t){jl(t,(function(t){dr(t,"display","block")}))},$l=function(t){return ll(t,Ml)},ql=function(t){return ll(t,Nl)},Gl=Tl("resizer-bar-dragging"),Kl=function(t){var e=_l(),n=wl(e,{}),r=A.none(),o=function(t,e){return A.from(Qn(t,e))};e.events.drag.bind((function(t){o(t.target,"data-row").each((function(e){var n=Sr(t.target,"top");dr(t.target,"top",n+t.yDelta+"px")})),o(t.target,"data-column").each((function(e){var n=Sr(t.target,"left");dr(t.target,"left",n+t.xDelta+"px")}))}));var i=function(t,e){var n=Sr(t,e),r=yr(t,"data-initial-"+e,0);return n-r};n.events.stop.bind((function(){e.get().each((function(e){r.each((function(n){o(e,"data-row").each((function(t){var r=i(e,"top");er(e,"data-initial-top"),m.trigger.adjustHeight(n,r,parseInt(t,10))})),o(e,"data-column").each((function(t){var r=i(e,"left");er(e,"data-initial-left"),m.trigger.adjustWidth(n,r,parseInt(t,10))})),Vl(t,n)}))}))}));var a=function(r,o){m.trigger.startAdjust(),e.assign(r),Yn(r,"data-initial-"+o,Sr(r,o)),ul(r,Gl),dr(r,"opacity","0.2"),n.go(t.parent())},u=Zs(t.parent(),"mousedown",(function(t){$l(t.target)&&a(t.target,"top"),ql(t.target)&&a(t.target,"left")})),c=function(e){return Ce(e,t.view())},s=function(t){return Kn(t,"table",c).filter(Cl)},l=Zs(t.view(),"mouseover",(function(e){s(e.target).fold((function(){Mn(e.target)&&Pl(t)}),(function(e){r=A.some(e),Vl(t,e)}))})),f=function(){u.unbind(),l.unbind(),n.destroy(),Pl(t)},d=function(e){Vl(t,e)},m=Os({adjustHeight:Ts(["table","delta","row"]),adjustWidth:Ts(["table","delta","column"]),startAdjust:Ts([])});return{destroy:f,refresh:d,on:n.on,off:n.off,hideBars:w(Ul,t),showBars:w(Wl,t),events:m.registry}},Xl=function(t,e,n){var r=ga,o=ba,i=Kl(t),a=Os({beforeResize:Ts(["table","type"]),afterResize:Ts(["table","type"]),startDrag:Ts([])});return i.events.adjustHeight.bind((function(t){var e=t.table;a.trigger.beforeResize(e,"row");var n=r.delta(t.delta,e);jc(e,n,t.row,r),a.trigger.afterResize(e,"row")})),i.events.startAdjust.bind((function(t){a.trigger.startDrag()})),i.events.adjustWidth.bind((function(t){var r=t.table;a.trigger.beforeResize(r,"col");var i=o.delta(t.delta,r),u=n(r);Vc(r,i,t.column,e,u),a.trigger.afterResize(r,"col")})),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:a.registry}},Yl={create:Xl},Jl=function(t,e){return t.fire("newrow",{node:e})},Zl=function(t,e){return t.fire("newcell",{node:e})},Ql=function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})},tf=function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})},ef=function(t,e,n,r,o){t.fire("TableSelectionChange",{cells:e,start:n,finish:r,otherCells:o})},nf=function(t){t.fire("TableSelectionClear")},rf=function(t,e,n){t.fire("TableModified",ot(ot({},n),{table:e}))},of={structure:!1,style:!0},af={structure:!0,style:!1},uf={structure:!0,style:!0},cf="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",sf={"border-collapse":"collapse",width:"100%"},lf=P(5,(function(t){var e=t+1+"px";return{title:e,value:e}})),ff=I(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(function(t){return{title:t,value:t.toLowerCase()}})),df=function(t){var e;if(Rf(t)){var n=t.dom,r=null!==(e=n.getParent(t.selection.getStart(),n.isBlock))&&void 0!==e?e:t.getBody(),o=Hi(ve.fromDom(r));return ot(ot({},sf),{width:o+"px"})}return zf(t)?ze(sf,(function(t,e){return"width"!==e})):sf},mf={border:"1"},gf="preservetable",hf=function(t){return t.getParam("table_sizing_mode","auto")},pf=function(t){return t.getParam("table_responsive_width")},vf=function(t){return t.getParam("table_border_widths",lf,"array")},bf=function(t){return t.getParam("table_border_styles",ff,"array")},yf=function(t){return t.getParam("table_default_attributes",mf,"object")},wf=function(t){return t.getParam("table_default_styles",df(t),"object")},xf=function(t){return t.getParam("table_resize_bars",!0,"boolean")},Cf=function(t){return t.getParam("table_tab_navigation",!0,"boolean")},Sf=function(t){return t.getParam("table_cell_advtab",!0,"boolean")},kf=function(t){return t.getParam("table_row_advtab",!0,"boolean")},Tf=function(t){return t.getParam("table_advtab",!0,"boolean")},Of=function(t){return t.getParam("table_appearance_options",!0,"boolean")},_f=function(t){return t.getParam("table_grid",!0,"boolean")},Ef=function(t){return t.getParam("table_style_by_css",!1,"boolean")},Af=function(t){return t.getParam("table_cell_class_list",[],"array")},Df=function(t){return t.getParam("table_row_class_list",[],"array")},Mf=function(t){return t.getParam("table_class_list",[],"array")},Nf=function(t){return"relative"===hf(t)||!0===pf(t)},Rf=function(t){return"fixed"===hf(t)||!1===pf(t)},zf=function(t){return"responsive"===hf(t)},Bf=function(t){return t.getParam("table_toolbar",cf)},Pf=function(t){return t.getParam("table_use_colgroups",!1,"boolean")},If=function(t){var e="section",n=t.getParam("table_header_type",e,"string"),r=["section","cells","sectionCells","auto"];return z(r,n)?n:e},Lf=function(t){var e=["preservetable","resizetable"],n=t.getParam("table_column_resizing",gf,"string");return $(e,(function(t){return t===n})).getOr(gf)},Hf=function(t){return"preservetable"===Lf(t)},Ff=function(t){return"resizetable"===Lf(t)},Vf=function(t){var e=t.getParam("table_clone_elements");return o(e)?A.some(e.split(/[ ,]/)):Array.isArray(e)?A.some(e):A.none()},jf=function(t){var e=t.getParam("object_resizing",!0);return o(e)?"table"===e:e},Uf=function(t){return t.getParam("table_background_color_map",[],"array")},Wf=function(t){return t.getParam("table_border_color_map",[],"array")},$f=function(t,e){return Nf(t)?hu.percentageSize(e):Rf(t)?hu.pixelSize(e):hu.getTableSize(e)},qf=function(t){er(t,"width")},Gf=function(t){var e=Wa(t);ws(t,A.some(e),A.none()),qf(t)},Kf=function(t){var e=Ua(t);ws(t,A.some(e),A.none()),qf(t)},Xf=function(t){vr(t,"width");var e=Mr(t),n=e.length>0?e:Dr(t);L(n,(function(t){vr(t,"width"),qf(t)})),qf(t)},Yf=Gf,Jf=Kf,Zf=Xf,Qf=function(t){var e=so.fromTable(t);so.hasColumns(e)||L(Dr(t),(function(t){var e=gr(t,"width");dr(t,"width",e),er(t,"width")}))},td=function(){var t=ve.fromTag("div");return mr(t,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Eo(Nn(),t),t},ed=function(t,e){return t.inline?es.body($u(t),td(),e):es.only(ve.fromDom(t.getDoc()),e)},nd=function(t,e){t.inline&&Bo(e.parent())},rd="bar-",od=function(t){return"false"!==Qn(t,"data-mce-resize")},id=function(t){var e,n,r=A.none(),o=A.none(),i=A.none(),a=function(t){return"TABLE"===t.nodeName},u=function(){return o},c=function(){return i.getOr(es.only(ve.fromDom(t.getBody()),od))},s=function(e){return $f(t,e)},l=function(){return Hf(t)?Jc():Yc()},f=function(t){return ks(t).columns},d=function(r,o,i){var a=St(o,"e");if(""===n&&Yf(r),i!==e&&""!==n){dr(r,"width",n);var u=l(),c=s(r),d=Hf(t)||a?f(r)-1:0;Vc(r,i-e,d,u,c)}else if(Qu(n)){var m=parseFloat(n.replace("%","")),g=i*m/e;dr(r,"width",g+"%")}tc(n)&&Qf(r)},m=function(){o.each((function(t){t.destroy()})),i.each((function(e){nd(t,e)}))};return t.on("init",(function(){var e=ed(t,od);if(i=A.some(e),jf(t)&&xf(t)){var n=l(),a=Yl.create(e,n,s);a.on(),a.events.startDrag.bind((function(e){r=A.some(t.selection.getRng())})),a.events.beforeResize.bind((function(e){var n=e.table.dom;Ql(t,n,qu(n),Gu(n),rd+e.type)})),a.events.afterResize.bind((function(e){var n=e.table,o=n.dom;Ju(n),r.each((function(e){t.selection.setRng(e),t.focus()})),tf(t,o,qu(o),Gu(o),rd+e.type),t.undoManager.add()})),o=A.some(a)}})),t.on("ObjectResizeStart",(function(r){var o=r.target;if(a(o)){var i=ve.fromDom(o);L(t.dom.select(".mce-clonedresizable"),(function(e){t.dom.addClass(e,"mce-"+Lf(t)+"-columns")})),!Cs(i)&&Rf(t)?Jf(i):!xs(i)&&Nf(t)&&Yf(i),Ss(i)&&Ct(r.origin,rd)&&Yf(i),e=r.width,n=zf(t)?"":Zu(t,o).getOr("")}})),t.on("ObjectResized",(function(e){var n=e.target;if(a(n)){var r=ve.fromDom(n),o=e.origin;Ct(o,"corner-")&&d(r,o,e.width),Ju(r),rf(t,r.dom,of)}})),t.on("SwitchMode",(function(){u().each((function(e){t.mode.isReadOnly()?e.hideBars():e.showBars()}))})),{lazyResize:u,lazyWire:c,destroy:m}},ad=function(t,e){return{element:t,offset:e}},ud=function(t,e,n){return t.property().isText(e)&&0===t.property().getText(e).trim().length||t.property().isComment(e)?n(e).bind((function(e){return ud(t,e,n).orThunk((function(){return A.some(e)}))})):A.none()},cd=function(t,e){if(t.property().isText(e))return t.property().getText(e).length;var n=t.property().children(e);return n.length},sd=function(t,e){var n=ud(t,e,t.query().prevSibling).getOr(e);if(t.property().isText(n))return ad(n,cd(t,n));var r=t.property().children(n);return r.length>0?sd(t,r[r.length-1]):ad(n,cd(t,n))},ld=sd,fd=Uo(),dd=function(t){return ld(fd,t)},md=function(t,e){var n=wr(t,"colspan");if(1===n){var r=Va(t);r.each((function(n){var r=n.value/2;ja(t,r,n.unit),ja(e,r,n.unit)}))}},gd=fn("th"),hd=function(t){return X(t,(function(t){return gd(t.element)}))},pd=function(t,e){return t&&e?"sectionCells":t?"section":"cells"},vd=function(t){var e="thead"===t.section,n=rr(bd(t.cells),"th");return e||n?{type:"header",subType:pd(e,n)}:"tfoot"===t.section?{type:"footer"}:{type:"body"}},bd=function(t){var e=V(t,(function(t){return gd(t.element)}));return 0===e.length?A.some("td"):e.length===t.length?A.some("th"):A.none()},yd=function(t){var e=I(t,(function(t){return vd(t).type})),n=z(e,"header"),r=z(e,"footer");if(n||r){var o=z(e,"body");return!n||o||r?n||o||!r?A.none():A.some("footer"):A.some("header")}return A.some("body")},wd=function(t){return rt(t.all,(function(t){var e=vd(t);return"header"===e.type?A.from(e.subType):A.none()}))},xd=function(t,e,n){return Je(n(t.element,e),!0,t.isLocked)},Cd=function(t,e){return t.section!==e?Ze(t.element,t.cells,e,t.isNew):t},Sd=function(){return{transformRow:Cd,transformCell:function(t,e,n){var r=n(t.element,e),o="td"!==nn(r)?ki(r,"td"):r;return Je(o,t.isNew,t.isLocked)}}},kd=function(){return{transformRow:Cd,transformCell:xd}},Td=function(){return{transformRow:function(t,e){var n="thead"===e?"tbody":e;return Cd(t,n)},transformCell:xd}},Od=function(){return{transformRow:b,transformCell:xd}},_d=function(t,e){var n=so.fromTable(t),r=wd(n).getOr(e);switch(r){case"section":return Sd();case"sectionCells":return kd();case"cells":return Td()}},Ed={getTableSectionType:_d,section:Sd,sectionCells:kd,cells:Td,fallback:Od},Ad=function(t,e,n,r){n===r?er(t,e):Yn(t,e,n)},Dd=function(t,e,n){nt(Ln(t,e)).fold((function(){return _o(t,n)}),(function(t){return Oo(t,n)}))},Md=function(t,e){var n=qn(t,e).getOrThunk((function(){var n=ve.fromTag(e,dn(t).dom);return"thead"===e?Dd(t,"caption,colgroup",n):"colgroup"===e?Dd(t,"caption",n):Eo(t,n),n}));return zo(n),n},Nd=function(t,e){var n=[],r=[],o=function(t){return I(t,(function(t){t.isNew&&n.push(t.element);var e=t.element;return zo(e),L(t.cells,(function(t){t.isNew&&r.push(t.element),Ad(t.element,"colspan",t.colspan,1),Ad(t.element,"rowspan",t.rowspan,1),Eo(e,t.element)})),e}))},i=function(t){return K(t,(function(t){return I(t.cells,(function(t){return Ad(t.element,"span",t.colspan,1),t.element}))}))},a=function(e,n){var r=Md(t,n),a="colgroup"===n?i:o,u=a(e);Ro(r,u)},u=function(e){qn(t,e).each(Bo)},c=function(t,e){t.length>0?a(t,e):u(e)},s=[],l=[],f=[],d=[];return L(e,(function(t){switch(t.section){case"thead":s.push(t);break;case"tbody":l.push(t);break;case"tfoot":f.push(t);break;case"colgroup":d.push(t);break}})),c(d,"colgroup"),c(s,"thead"),c(l,"tbody"),c(f,"tfoot"),{newRows:n,newCells:r}},Rd=function(t){return I(t,(function(t){var e=wi(t.element);return L(t.cells,(function(t){var n=xi(t.element);Ad(n,"colspan",t.colspan,1),Ad(n,"rowspan",t.rowspan,1),Eo(e,n)})),e}))},zd=function(t,e){return I(t,(function(t){return Wr(t,e)}))},Bd=function(t,e){return t[e]},Pd=function(t,e){if(0===t.length)return 0;var n=t[0],r=q(t,(function(t){return!e(n.element,t.element)}));return r.getOr(t.length)},Id=function(t,e,n,r){var o=Bd(t,e),i="colgroup"===o.section,a=Pd(o.cells.slice(n),r),u=i?1:Pd(zd(t.slice(e),n),r);return{colspan:a,rowspan:u}},Ld=function(t,e){var n=I(t,(function(t){return I(t.cells,S)})),r=function(t,e,r,o){for(var i=t;i<t+r;i++)for(var a=e;a<e+o;a++)n[i][a]=!0};return I(t,(function(o,i){var a=K(o.cells,(function(o,a){if(!1===n[i][a]){var u=Id(t,i,a,e);return r(i,a,u.rowspan,u.colspan),[Ge(o.element,u.rowspan,u.colspan,o.isNew)]}return[]}));return Ye(o.element,a,o.section,o.isNew)}))},Hd=function(t,e,n){var r=[];L(t.colgroups,(function(o){for(var i=[],a=0;a<t.grid.columns;a++){var u=so.getColumnAt(t,a).map((function(t){return Je(t.element,n,!1)})).getOrThunk((function(){return Je(e.colGap(),!0,!1)}));i.push(u)}r.push(Ze(o.element,i,"colgroup",n))}));for(var o=0;o<t.grid.rows;o++){for(var i=[],a=0;a<t.grid.columns;a++){var u=so.getAt(t,o,a).map((function(t){return Je(t.element,n,t.isLocked)})).getOrThunk((function(){return Je(e.gap(),!0,!1)}));i.push(u)}var c=t.all[o],s=Ze(c.element,i,c.section,n);r.push(s)}return r},Fd=function(t,e){return Hd(t,e,!1)},Vd=function(t){return Ld(t,Ce)},jd=function(t,e){return rt(t.all,(function(t){return $(t.cells,(function(t){return Ce(e,t.element)}))}))},Ud=function(t,e,n){var r=I(e.selection,(function(e){return Ar(e).bind((function(e){return jd(t,e)})).filter(n)})),o=or(r);return cr(o.length>0,o)},Wd=function(t,e,n,r,o){return function(i,a,u,c,s){var l=so.fromTable(a),f=A.from(null===s||void 0===s?void 0:s.section).getOrThunk(Ed.fallback),d=e(l,u).map((function(e){var n=Fd(l,c),r=t(n,e,Ce,o(c),f),i=Jr(r.grid),a=Vd(r.grid);return{info:e,grid:a,cursor:r.cursor,lockedColumns:i}}));return d.bind((function(t){var e=Nd(a,t.grid),o=A.from(null===s||void 0===s?void 0:s.sizing).getOrThunk((function(){return hu.getTableSize(a)})),u=A.from(null===s||void 0===s?void 0:s.resize).getOrThunk(Jc);return n(a,t.grid,t.info,{sizing:o,resize:u,section:f}),r(a),Vl(i,a),er(a,Xr),t.lockedColumns.length>0&&Yn(a,Xr,t.lockedColumns.join(",")),A.some({cursor:t.cursor,newRows:e.newRows,newCells:e.newCells})}))}},$d=function(t,e){return Ar(e.element).bind((function(n){return jd(t,n).map((function(t){var n=ot(ot({},t),{generators:e.generators,clipboard:e.clipboard});return n}))}))},qd=function(t,e){return Ud(t,e,k).map((function(t){return{cells:t,generators:e.generators,clipboard:e.clipboard}}))},Gd=function(t,e){return e.mergable},Kd=function(t,e){return e.unmergable},Xd=function(t,e){return Ud(t,e,k)},Yd=function(t,e){return Ud(t,e,(function(t){return!t.isLocked}))},Jd=function(t,e){return jd(t,e).exists((function(t){return!t.isLocked}))},Zd=function(t,e){return X(e,(function(e){return Jd(t,e)}))},Qd=function(t,e){return Gd(t,e).filter((function(e){return Zd(t,e.cells)}))},tm=function(t,e){return Kd(t,e).filter((function(e){return Zd(t,e)}))},em=function(t,e,n,r){var o=Gr(t).rows;if(0===o.length)return t;for(var i=e.startRow;i<=e.finishRow;i++)for(var a=e.startCol;a<=e.finishCol;a++){var u=o[i],c=Wr(u,a).isLocked;Vr(u,a,Je(r(),!1,c))}return t},nm=function(t,e,n,r){for(var o=Gr(t).rows,i=!0,a=0;a<o.length;a++)for(var u=0;u<qr(o[0]);u++){var c=o[a],s=Wr(c,u),l=s.element,f=n(l,e);!0===f&&!1===i?Vr(c,u,Je(r(),!0,s.isLocked)):!0===f&&(i=!1)}return t},rm=function(t,e){return U(t,(function(t,n){return B(t,(function(t){return e(t.element,n.element)}))?t:t.concat([n])}),[])},om=function(t,e,n,r){return e>0&&e<t[0].cells.length&&L(t,(function(t){var o=t.cells[e-1],i=t.cells[e],a=n(i.element,o.element);a&&Vr(t,e,Je(r(),!0,i.isLocked))})),t},im=function(t,e,n,r){var o=Gr(t).rows;if(e>0&&e<o.length){var i=o[e-1].cells,a=rm(i,n);L(a,(function(t){for(var i=A.none(),a=e;a<o.length;a++)for(var u=function(e){var u=o[a],c=Wr(u,e),s=n(c.element,t.element);s&&(i.isNone()&&(i=A.some(r())),i.each((function(t){Vr(u,e,Je(t,!0,c.isLocked))})))},c=0;c<qr(o[0]);c++)u(c)}))}return t},am=function(t){var e=function(e){return am(t)},n=function(e){return am(t)},r=function(e){return am(e(t))},o=function(e){return am(t)},i=function(e){e(t)},a=function(e){return e(t)},u=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return A.some(t)};return{isValue:k,isError:S,getOr:v(t),getOrThunk:v(t),getOrDie:v(t),or:e,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:c,forall:s,toOptional:l}},um=function(t){var e=function(t){return t()},n=function(){return C(String(t))()},r=b,o=function(t){return t()},i=function(e){return um(t)},a=function(e){return um(e(t))},u=function(e){return um(t)},c=function(e,n){return e(t)};return{isValue:S,isError:k,getOr:b,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:a,each:g,bind:u,exists:S,forall:k,toOptional:A.none}},cm=function(t,e){return t.fold((function(){return um(e)}),am)},sm={value:am,error:um,fromOption:cm},lm=function(t,e,n){if(t.row>=e.length||t.column>qr(e[0]))return sm.error("invalid start address out of table bounds, row: "+t.row+", column: "+t.column);var r=e.slice(t.row),o=r[0].cells.slice(t.column),i=qr(n[0]),a=n.length;return sm.value({rowDelta:r.length-a,colDelta:o.length-i})},fm=function(t,e){var n=qr(t[0]),r=qr(e[0]);return{rowDelta:0,colDelta:n-r}},dm=function(t,e){var n=t.length,r=e.length;return{rowDelta:n-r,colDelta:0}},mm=function(t,e,n,r){var o="colgroup"===e.section?n.col:n.cell;return P(t,(function(t){return Je(o(),!0,r(t))}))},gm=function(t,e,n,r){var o=t[t.length-1];return t.concat(P(e,(function(){var t="colgroup"===o.section?n.colgroup:n.row,e=Kr(o,t,b),i=mm(e.cells.length,e,n,(function(t){return He(r,t.toString())}));return jr(e,i)})))},hm=function(t,e,n,r){return I(t,(function(t){var o=mm(e,t,n,S);return Hr(t,r,o)}))},pm=function(t,e,n){return I(t,(function(t){return U(n,(function(n,r){var o=mm(1,t,e,k)[0];return Fr(n,r,o)}),t)}))},vm=function(t,e,n){var r=e.colDelta<0?hm:b,o=e.rowDelta<0?gm:b,i=Jr(t),a=qr(t[0]),u=B(i,(function(t){return t===a-1})),c=r(t,Math.abs(e.colDelta),n,u?a-1:a),s=Jr(c);return o(c,Math.abs(e.rowDelta),n,J(s,k))},bm=function(t,e,n,r){var o=Wr(t[e],n),i=w(r,o.element),a=t[e];return t.length>1&&qr(a)>1&&(n>0&&i($r(a,n-1))||n<a.cells.length-1&&i($r(a,n+1))||e>0&&i($r(t[e-1],n))||e<t.length-1&&i($r(t[e+1],n)))},ym=function(t,e,n,r,o,i){for(var a=t.row,u=t.column,c=n.length,s=qr(n[0]),l=a+c,f=u+s+i.length,d=J(i,k),m=a;m<l;m++)for(var g=0,h=u;h<f;h++)if(d[h])g++;else{bm(e,m,h,o)&&nm(e,$r(e[m],h),o,r.cell);var p=h-u-g,v=Wr(n[m-a],p),b=v.element,y=r.replace(b);Vr(e[m],h,Je(y,!0,v.isLocked))}return e},wm=function(t,e,n){var r=qr(e[0]),o=Gr(e).cols.length+t.row,i=P(r-t.column,(function(e){return e+t.column})),a=$(i,(function(t){return X(n,(function(e){return e!==t}))})).getOr(r-1);return{row:o,column:a}},xm=function(t,e,n){return V(n,(function(n){return n>=t.column&&n<=qr(e[0])+t.column}))},Cm=function(t,e,n,r,o){var i=Jr(e),a=wm(t,e,i),u=Gr(n).rows,c=xm(a,u,i),s=lm(a,e,u);return s.map((function(t){var n=ot(ot({},t),{colDelta:t.colDelta-c.length}),i=vm(e,n,r),s=Jr(i),l=xm(a,u,s);return ym(a,i,u,r,o,l)}))},Sm=function(t,e,n,r,o){om(e,t,o,r.cell);var i=dm(n,e),a=vm(n,i,r),u=dm(e,a),c=vm(e,u,r);return I(c,(function(e,n){return Hr(e,t,a[n].cells)}))},km=function(t,e,n,r,o){im(e,t,o,r.cell);var i=Jr(e),a=fm(e,n),u=ot(ot({},a),{colDelta:a.colDelta-i.length}),c=vm(e,u,r),s=Gr(c),l=s.cols,f=s.rows,d=Jr(c),m=fm(n,e),g=ot(ot({},m),{colDelta:m.colDelta+d.length}),h=pm(n,r,d),p=vm(h,g,r);return l.concat(f.slice(0,t)).concat(p).concat(f.slice(t,f.length))},Tm=function(t,e,n,r){return Kr(t,(function(t){return r(t,n)}),e)},Om=function(t,e,n,r,o){var i=Gr(t),a=i.rows,u=i.cols,c=a.slice(0,e),s=a.slice(e),l=Tm(a[n],(function(t,n){var i=e>0&&e<a.length&&r($r(a[e-1],n),$r(a[e],n)),u=i?Wr(a[e],n):Je(o(t.element,r),!0,t.isLocked);return u}),r,o);return u.concat(c).concat([l]).concat(s)},_m=function(t,e,n,r,o,i,a){if("colgroup"!==n&&r)return Wr(t,e);var u=Wr(t,o);return Je(a(u.element,i),!0,!1)},Em=function(t,e,n,r,o){return I(t,(function(t){var i=e>0&&e<qr(t)&&r($r(t,e-1),$r(t,e)),a=_m(t,e,t.section,i,n,r,o);return Fr(t,e,a)}))},Am=function(t,e){return K(t,(function(t){var n=t.cells,r=j(e,(function(t,e){return e>=0&&e<t.length?t.slice(0,e).concat(t.slice(e+1)):t}),n);return r.length>0?[Ze(t.element,r,t.section,t.isNew)]:[]}))},Dm=function(t,e,n){var r=Gr(t),o=r.rows,i=r.cols;return i.concat(o.slice(0,e)).concat(o.slice(n+1))},Mm=function(t,e,n,r){return void 0!==$r(t[e],n)&&e>0&&r($r(t[e-1],n),$r(t[e],n))},Nm=function(t,e,n){return e>0&&n($r(t,e-1),$r(t,e))},Rm=function(t,e,n,r){return Mm(t,e,n,r)||Nm(t[e],n,r)},zm=function(t,e){var n=X(e,b)&&hd(t.cells);return n?k:function(t,n,r){var o=nn(t.element);return!("th"===o&&e[r])}},Bm=function(t,e){var n=X(e,b)&&hd(t);return n?k:function(t,n,r){var o=nn(t.element);return!("th"===o&&e[n])}},Pm=function(t,e,n,r){var o=function(t){return"row"===t?Cr(e):xr(e)},i=function(t){return o(t)?t+"group":t};if(t)return gd(e)?i(n):null;if(r&&gd(e)){var a="row"===n?"col":"row";return i(a)}return null},Im=function(t,e){return function(n,r,o){return A.some(Pm(t,n.element,"col",e[o]))}},Lm=function(t,e){return function(n,r){return A.some(Pm(t,n.element,"row",e[r]))}},Hm=function(t,e,n){return Je(n(t.element,e),!0,t.isLocked)},Fm=function(t,e,n,r,o,i,a){var u=function(t){return B(e,(function(e){return n(t.element,e.element)}))};return I(t,(function(t,e){return Ur(t,(function(t,c){if(u(t)){var s=a(t,e,c)?o(t,n,r):t;return i(s,e,c).each((function(t){Zn(s.element,{scope:A.from(t)})})),s}return t}))}))},Vm=function(t,e,n){return K(t,(function(r,o){return Rm(t,o,e,n)?[]:[Wr(r,e)]}))},jm=function(t,e,n){var r=t[e];return K(r.cells,(function(r,o){return Rm(t,e,o,n)?[]:[r]}))},Um=function(t,e,n,r,o){var i=Gr(t).rows,a=K(e,(function(t){return Vm(i,t,r)})),u=I(t,(function(t){return hd(t.cells)})),c=Bm(a,u),s=Lm(n,u);return Fm(t,a,r,o,Hm,s,c)},Wm=function(t,e,n,r,o,i,a){var u=Gr(t),c=u.cols,s=u.rows,l=s[e[0]],f=K(e,(function(t){return jm(s,t,o)})),d=I(l.cells,(function(t,e){return hd(Vm(s,e,o))})),m=it([],s,!0);L(e,(function(t){m[t]=a.transformRow(s[t],n)}));var g=c.concat(m),h=zm(l,d),p=Im(r,d);return Fm(g,f,o,i,a.transformCell,p,h)},$m=function(t,e,n,r){var o=Gr(t).rows,i=I(e,(function(t){return Wr(o[t.row],t.column)}));return Fm(t,i,n,r,Hm,A.none,k)},qm=function(t){var e=function(t,e){var n=B(t,(function(t){return t.column===e.column}));return n?t:t.concat([e])};return U(t,e,[]).sort((function(t,e){return t.column-e.column}))},Gm=fn("col"),Km=fn("colgroup"),Xm=function(t){return"tr"===nn(t)||Km(t)},Ym=function(t){var e=yr(t,"colspan",1),n=yr(t,"rowspan",1);return{element:t,colspan:e,rowspan:n}},Jm=function(t,e){void 0===e&&(e=Ym);var n=function(e){return Gm(e.element)?t.col(e):t.cell(e)},r=function(e){return Km(e.element)?t.colgroup(e):t.row(e)},o=function(t){if(Xm(t))return r({element:t});var o=n(e(t));return i=A.some({item:t,replacement:o}),o},i=A.none(),a=function(t,e){return i.fold((function(){return o(t)}),(function(n){return e(t,n.item)?n.replacement:o(t)}))};return{getOrInit:a}},Zm=function(t){return function(e){var n=[],r=function(t,e){return $(n,(function(n){return e(n.item,t)}))},o=function(r){var o="td"===t?{scope:null}:{},i=e.replace(r,t,o);return n.push({item:r,sub:i}),i},i=function(t,e){return Xm(t)||Gm(t)?t:r(t,e).fold((function(){return o(t)}),(function(n){return e(t,n.item)?n.sub:o(t)}))};return{replaceOrInit:i}}},Qm=function(t){return tr(t,"scope").map((function(t){return t.substr(0,3)}))},tg=function(t){var e=function(e){var n=Qm(e);return n.each((function(t){return Yn(e,"scope",t)})),function(){var r=t.cell({element:e,colspan:1,rowspan:1});return vr(r,"width"),vr(e,"width"),n.each((function(t){return Yn(r,"scope",t)})),r}},n=function(t){var e=function(){var e=or(I(t,Qm));if(0===e.length)return A.none();var n=e[0],r=["row","col"],o=B(e,(function(t){return t!==n&&z(r,t)}));return o?A.none():A.from(n)};return vr(t[0],"width"),e().fold((function(){return er(t[0],"scope")}),(function(e){return Yn(t[0],"scope",e+"group")})),v(t[0])};return{unmerge:e,merge:n}},eg={modification:Jm,transform:Zm,merging:tg},ng=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],rg=function(t,e){var n=t.property().name(e);return z(["ol","ul"],n)},og=function(t,e){var n=t.property().name(e);return z(ng,n)},ig=function(t,e){return z(["br","img","hr","input"],t.property().name(e))},ag=Uo(),ug=function(t){return og(ag,t)},cg=function(t){return rg(ag,t)},sg=function(t){return ig(ag,t)},lg=function(t){var e=function(t){return"br"===nn(t)},n=function(t){return X(t,(function(t){return e(t)||cn(t)&&0===Ho(t).trim().length}))},r=function(t){return"li"===nn(t)||Vn(t,cg).isSome()},o=function(t){return yn(t).map((function(t){return!!ug(t)||!!sg(t)&&"img"!==nn(t)})).getOr(!1)},i=function(t){return Au(t).bind((function(n){var i=o(n);return hn(n).map((function(o){return!0===i||r(o)||e(n)||ug(o)&&!Ce(t,o)?[]:[ve.fromTag("br")]}))})).getOr([])},a=function(){var e=K(t,(function(t){var e=wn(t);return n(e)?[]:e.concat(i(t))}));return 0===e.length?[ve.fromTag("br")]:e},u=a();zo(t[0]),Ro(t[0],u)},fg=function(t){return Cl(t,!0)},dg=function(t){var e=Dr(t);0===e.length&&Bo(t)},mg=function(t,e){return{grid:t,cursor:e}},gg=function(t){return rt(t,(function(t){return rt(t.cells,(function(t){var e=t.element;return cr(fg(e),e)}))}))},hg=function(t,e,n){var r,o,i=Gr(t).rows;return A.from(null===(o=null===(r=i[e])||void 0===r?void 0:r.cells[n])||void 0===o?void 0:o.element).filter(fg).orThunk((function(){return gg(i)}))},pg=function(t,e,n){var r=hg(t,e,n);return mg(t,r)},vg=function(t){var e=function(t,e){var n=B(t,(function(t){return t.row===e.row}));return n?t:t.concat([e])};return U(t,e,[]).sort((function(t,e){return t.row-e.row}))},bg=function(t,e,n,r){var o=e[0].row,i=vg(e),a=j(i,(function(t,e){var i=Om(t.grid,o,e.row+t.delta,n,r.getOrInit);return{grid:i,delta:t.delta+1}}),{grid:t,delta:0}).grid;return pg(a,o,e[0].column)},yg=function(t,e,n,r){var o=vg(e),i=o[o.length-1],a=i.row+i.rowspan,u=j(o,(function(t,e){return Om(t,a,e.row,n,r.getOrInit)}),t);return pg(u,a,e[0].column)},wg=function(t,e,n,r){var o=e.details,i=qm(o),a=i[0].column,u=j(i,(function(t,e){var o=Em(t.grid,a,e.column+t.delta,n,r.getOrInit);return{grid:o,delta:t.delta+1}}),{grid:t,delta:0}).grid;return pg(u,o[0].row,a)},xg=function(t,e,n,r){var o=e.details,i=o[o.length-1],a=i.column+i.colspan,u=qm(o),c=j(u,(function(t,e){return Em(t,a,e.column,n,r.getOrInit)}),t);return pg(c,o[0].row,a)},Cg=function(t,e,n,r){var o=qm(e),i=I(o,(function(t){return t.column})),a=Um(t,i,!0,n,r.replaceOrInit);return pg(a,e[0].row,e[0].column)},Sg=function(t,e,n,r){var o=$m(t,e,n,r.replaceOrInit);return pg(o,e[0].row,e[0].column)},kg=function(t,e,n,r){var o=qm(e),i=I(o,(function(t){return t.column})),a=Um(t,i,!1,n,r.replaceOrInit);return pg(a,e[0].row,e[0].column)},Tg=function(t,e,n,r){var o=$m(t,e,n,r.replaceOrInit);return pg(o,e[0].row,e[0].column)},Og=function(t,e){return function(n,r,o,i,a){var u=vg(r),c=I(u,(function(t){return t.row})),s=Wm(n,c,t,e,o,i.replaceOrInit,a);return pg(s,r[0].row,r[0].column)}},_g=Og("thead",!0),Eg=Og("tbody",!1),Ag=Og("tfoot",!1),Dg=function(t,e,n,r){var o=qm(e.details),i=Am(t,I(o,(function(t){return t.column}))),a=i.length>0?i[0].cells.length-1:0;return pg(i,o[0].row,Math.min(o[0].column,a))},Mg=function(t,e,n,r){var o=vg(e),i=Dm(t,o[0].row,o[o.length-1].row),a=i.length>0?i.length-1:0;return pg(i,Math.min(e[0].row,a),e[0].column)},Ng=function(t,e,n,r){var o=e.cells;lg(o);var i=em(t,e.bounds,n,r.merge(o));return mg(i,A.from(o[0]))},Rg=function(t,e,n,r){var o=function(t,e){return nm(t,e,n,r.unmerge(e))},i=j(e,o,t);return mg(i,A.from(e[0]))},zg=function(t,e,n,r){var o=function(t,e){var n=so.fromTable(t);return Hd(n,e,!0)},i=o(e.clipboard,e.generators),a=$e(e.row,e.column),u=Cm(a,t,i,e.generators,n);return u.fold((function(){return mg(t,A.some(e.element))}),(function(t){return pg(t,e.row,e.column)}))},Bg=function(t,e,n){var r=Lr(t,n.section),o=so.generate(r);return Hd(o,e,!0)},Pg=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[0].column,a=o[e.cells[0].row],u=Bg(e.clipboard,e.generators,a),c=Sm(i,t,u,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Ig=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[e.cells.length-1].column+e.cells[e.cells.length-1].colspan,a=o[e.cells[0].row],u=Bg(e.clipboard,e.generators,a),c=Sm(i,t,u,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Lg=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[0].row,a=o[i],u=Bg(e.clipboard,e.generators,a),c=km(i,t,u,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Hg=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[e.cells.length-1].row+e.cells[e.cells.length-1].rowspan,a=o[e.cells[0].row],u=Bg(e.clipboard,e.generators,a),c=km(i,t,u,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Fg=function(t,e){var n=so.fromTable(t),r=Xd(n,e);return r.bind((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=G(I(n.all,(function(t){return V(t.cells,(function(t){return t.column>=r&&t.column<o}))})));return bd(i)})).getOr("")},Vg=function(t,e){var n=so.fromTable(t),r=Xd(n,e);return r.bind(bd).getOr("")},jg=function(t,e){var n=so.fromTable(t),r=Xd(n,e);return r.bind((function(t){var e=t[t.length-1],r=t[0].row,o=e.row+e.rowspan,i=n.all.slice(r,o);return yd(i)})).getOr("")},Ug=function(t,e,n,r){return Wc(t,e,n,r.sizing)},Wg=function(t,e,n,r){return Uc(t,e,n,r.sizing,r.resize)},$g=function(t,e){return B(e,(function(t){return 0===t.column&&t.isLocked}))},qg=function(t,e){return B(e,(function(e){return e.column+e.colspan>=t.grid.columns&&e.isLocked}))},Gg=function(t,e){var n=Vi(t),r=qm(e);return U(r,(function(t,e){var r=n[e.column],o=r.map(Li).getOr(0);return t+o}),0)},Kg=function(t){return function(e,n){return Xd(e,n).filter((function(n){var r=t?$g:qg;return!r(e,n)})).map((function(t){return{details:t,pixelDelta:Gg(e,t)}}))}},Xg=function(t,e){return Yd(t,e).map((function(e){return{details:e,pixelDelta:-Gg(t,e)}}))},Yg=function(t){return function(e,n){return qd(e,n).filter((function(n){var r=t?$g:qg;return!r(e,n.cells)}))}},Jg=eg.transform("th"),Zg=eg.transform("td"),Qg=Wd(bg,Xd,g,g,eg.modification),th=Wd(yg,Xd,g,g,eg.modification),eh=Wd(wg,Kg(!0),Wg,g,eg.modification),nh=Wd(xg,Kg(!1),Wg,g,eg.modification),rh=Wd(Dg,Xg,Wg,dg,eg.modification),oh=Wd(Mg,Xd,g,dg,eg.modification),ih=Wd(Cg,Yd,g,g,Jg),ah=Wd(kg,Yd,g,g,Zg),uh=Wd(_g,Yd,g,g,Jg),ch=Wd(Eg,Yd,g,g,Zg),sh=Wd(Ag,Yd,g,g,Zg),lh=Wd(Sg,Yd,g,g,Jg),fh=Wd(Tg,Yd,g,g,Zg),dh=Wd(Ng,Qd,Ug,g,eg.merging),mh=Wd(Rg,tm,Ug,g,eg.merging),gh=Wd(zg,$d,Ug,g,eg.modification),hh=Wd(Pg,Yg(!0),g,g,eg.modification),ph=Wd(Ig,Yg(!1),g,g,eg.modification),vh=Wd(Lg,qd,g,g,eg.modification),bh=Wd(Hg,qd,g,g,eg.modification),yh=Fg,wh=Vg,xh=jg,Ch=function(t,e,n){var r=function(t){return"table"===nn($u(t))},o=function(e){return!1===r(t)||ks(e).rows>1},i=function(e){return!1===r(t)||ks(e).columns>1},a=Vf(t),u=Ff(t)?g:md,c=function(e){switch(If(t)){case"section":return Ed.section();case"sectionCells":return Ed.sectionCells();case"cells":return Ed.cells();default:return Ed.getTableSectionType(e,"section")}},s=function(n,r){return r.cursor.fold((function(){var r=Dr(n);return et(r).filter(Mn).map((function(r){e.clear(n);var o=t.dom.createRng();return o.selectNode(r.dom),t.selection.setRng(o),Yn(r,"data-mce-selected","1"),o}))}),(function(r){var o=dd(r),i=t.dom.createRng();return i.setStart(o.element.dom,o.offset),i.setEnd(o.element.dom,o.offset),t.selection.setRng(i),e.clear(n),A.some(i)}))},l=function(e,n,r,o,i){return function(u,l,f){void 0===f&&(f=!1),Ju(u);var d=o(),m=ve.fromDom(t.getDoc()),g=Fu(r,m,a),h={sizing:$f(t,u),resize:Ff(t)?Yc():Jc(),section:c(u)};return n(u)?e(d,u,l,g,h).bind((function(e){L(e.newRows,(function(e){Jl(t,e.dom)})),L(e.newCells,(function(e){Zl(t,e.dom)}));var n=s(u,e);return Mn(u)&&(Ju(u),f||rf(t,u.dom,i)),n.map((function(t){return{rng:t,effect:i}}))})):A.none()}},f=l(oh,o,g,n,af),d=l(rh,i,g,n,af),m=l(Qg,k,g,n,af),h=l(th,k,g,n,af),p=l(eh,k,u,n,af),v=l(nh,k,u,n,af),b=l(dh,k,g,n,af),y=l(mh,k,g,n,af),w=l(hh,k,g,n,af),x=l(ph,k,g,n,af),C=l(vh,k,g,n,af),S=l(bh,k,g,n,af),T=l(gh,k,g,n,uf),O=l(lh,k,g,n,af),_=l(fh,k,g,n,af),E=l(ih,k,g,n,af),D=l(ah,k,g,n,af),M=l(uh,k,g,n,af),N=l(ch,k,g,n,af),R=l(sh,k,g,n,af),z=wh,B=yh,P=xh;return{deleteRow:f,deleteColumn:d,insertRowsBefore:m,insertRowsAfter:h,insertColumnsBefore:p,insertColumnsAfter:v,mergeCells:b,unmergeCells:y,pasteColsBefore:w,pasteColsAfter:x,pasteRowsBefore:C,pasteRowsAfter:S,pasteCells:T,makeCellsHeader:O,unmakeCellsHeader:_,makeColumnsHeader:E,unmakeColumnsHeader:D,makeRowsHeader:M,makeRowsBody:N,makeRowsFooter:R,getTableRowType:P,getTableCellType:z,getTableColType:B}},Sh={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},kh=function(){return ve.fromTag("th")},Th=function(){return ve.fromTag("td")},Oh=function(){return ve.fromTag("col")},_h=function(t,e,n,r){for(var o=ve.fromTag("tr"),i=0;i<t;i++){var a=r<e||i<n?kh():Th();i<n&&Yn(a,"scope","row"),r<e&&Yn(a,"scope","col"),Eo(a,ve.fromTag("br")),Eo(o,a)}return o},Eh=function(t){var e=ve.fromTag("colgroup");return P(t,(function(){return Eo(e,Oh())})),e},Ah=function(t,e,n,r){return P(t,(function(t){return _h(e,n,r,t)}))},Dh=function(t,e,n,r,o,i){void 0===i&&(i=Sh);var a=ve.fromTag("table"),u="cells"!==o;mr(a,i.styles),Jn(a,i.attributes),i.colGroups&&Eo(a,Eh(e));var c=Math.min(t,n);if(u&&n>0){var s=ve.fromTag("thead");Eo(a,s);var l="sectionCells"===o?c:0,f=Ah(n,e,l,r);Ro(s,f)}var d=ve.fromTag("tbody");Eo(a,d);var m=u?t-c:t,g=u?0:n,h=Ah(m,e,g,r);return Ro(d,h),a},Mh=function(t){return t.dom.innerHTML},Nh=function(t){var e=ve.fromTag("div"),n=ve.fromDom(t.dom.cloneNode(!0));return Eo(e,n),Mh(e)},Rh=function(t,e){t.selection.select(e.dom,!0),t.selection.collapse(!0)},zh=function(t,e){Gn(e,"td,th").each(w(Rh,t))},Bh=function(t,e){L(Hn(e,"tr"),(function(e){Jl(t,e.dom),L(Hn(e,"th,td"),(function(e){Zl(t,e.dom)}))}))},Ph=function(t){return o(t)&&-1!==t.indexOf("%")},Ih=function(t,e,n,r,o){var i=wf(t),a={styles:i,attributes:yf(t),colGroups:Pf(t)};return t.undoManager.ignore((function(){var i=Dh(n,e,o,r,If(t),a);Yn(i,"data-mce-id","__mce");var u=Nh(i);t.insertContent(u),t.addVisual()})),Gn($u(t),'table[data-mce-id="__mce"]').map((function(e){return Rf(t)?Jf(e):zf(t)?Zf(e):(Nf(t)||Ph(i.width))&&Yf(e),Ju(e),er(e,"data-mce-id"),Bh(t,e),zh(t,e),e.dom})).getOr(null)},Lh=function(t,e,n,r,o){void 0===r&&(r={});var i=function(t){return m(t)&&t>0};if(i(e)&&i(n)){var a=r.headerRows||0,u=r.headerColumns||0;return Ih(t,n,e,u,a)}return console.error(o),null},Hh=function(t){return function(){return t().fold((function(){return[]}),(function(t){return I(t,(function(t){return t.dom}))}))}},Fh=function(t){return function(e){var n=e.length>0?A.some(Uu(e)):A.none();t(n)}},Vh=function(t){return function(e,n,r){void 0===r&&(r={});var o=Lh(t,n,e,r,"Invalid values for insertTable - rows and columns values are required to insert a table.");return t.undoManager.add(),o}},jh=function(t,e,n,r){return{insertTable:Vh(t),setClipboardRows:Fh(e.setRows),getClipboardRows:Hh(e.getRows),setClipboardCols:Fh(e.setColumns),getClipboardCols:Hh(e.getColumns),resizeHandler:n,selectionTargets:r}},Uh=function(t,e,n){var r=yr(t,e,1);1===n||r<=1?er(t,e):Yn(t,e,Math.min(n,r))},Wh=function(t,e,n){if(so.hasColumns(t)){var r=V(so.justColumns(t),(function(t){return t.column>=e&&t.column<n})),o=I(r,(function(t){var r=xi(t.element);return Uh(r,"span",n-e),r})),i=ve.fromTag("colgroup");return Ro(i,o),[i]}return[]},$h=function(t,e,n){return I(t.all,(function(t){var r=V(t.cells,(function(t){return t.column>=e&&t.column<n})),o=I(r,(function(t){var r=xi(t.element);return Uh(r,"colspan",n-e),r})),i=ve.fromTag("tr");return Ro(i,o),i}))},qh=function(t,e){var n=so.fromTable(t),r=Yd(n,e);return r.map((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=Wh(n,r,o),a=$h(n,r,o);return it(it([],i,!0),a,!0)}))},Gh=function(t,e,n){var r=so.fromTable(t),o=Xd(r,e);return o.bind((function(t){var e=Hd(r,n,!1),o=Gr(e).rows,i=o.slice(t[0].row,t[t.length-1].row+t[t.length-1].rowspan),a=K(i,(function(t){var e=V(t.cells,(function(t){return!t.isLocked}));return e.length>0?[ot(ot({},t),{cells:e})]:[]})),u=Vd(a);return cr(u.length>0,u)})).map((function(t){return Rd(t)}))},Kh=tinymce.util.Tools.resolve("tinymce.util.Tools"),Xh=function(t,e,n){var r,o=t.select("td,th",e),i=function(e,r){for(var o=0;o<r.length;o++){var i=t.getStyle(r[o],n);if("undefined"===typeof e&&(e=i),e!==i)return""}return e};return i(r,o)},Yh=function(t,e,n){n&&t.formatter.apply("align"+n,{},e)},Jh=function(t,e,n){n&&t.formatter.apply("valign"+n,{},e)},Zh=function(t,e){Kh.each("left center right".split(" "),(function(n){t.formatter.remove("align"+n,{},e)}))},Qh=function(t,e){Kh.each("top middle bottom".split(" "),(function(n){t.formatter.remove("valign"+n,{},e)}))},tp=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],ep=function(t){return{value:t}},np=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,rp=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,op=function(t){return np.test(t)||rp.test(t)},ip=function(t){return wt(t,"#").toUpperCase()},ap=function(t){return op(t)?A.some({value:ip(t)}):A.none()},up=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},cp=function(t){var e=up(t.red)+up(t.green)+up(t.blue);return ep(e)},sp=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,lp=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,fp=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},dp=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return fp(o,i,a,u)},mp=function(t){if("transparent"===t)return A.some(fp(0,0,0,0));var e=sp.exec(t);if(null!==e)return A.some(dp(e[1],e[2],e[3],"1"));var n=lp.exec(t);return null!==n?A.some(dp(n[1],n[2],n[3],n[4])):A.none()},gp=function(t){return ap(t).orThunk((function(){return mp(t).map(cp)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return cp(fp(o,i,a,u))}))},hp=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},pp=function(t){var e=hp(A.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(A.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},a=function(t){n(),e.set(A.some(t))};return{clear:r,isSet:o,get:i,set:a}},vp=function(){return pp((function(t){return t.unbind()}))},bp=function(){var t=pp(g),e=function(e){return t.get().each(e)};return ot(ot({},t),{on:e})},yp=function(t,e,n,r){return function(o){var i=vp(),a=_t(r),u=function(){var u=Sc(e),c=function(e){return t.formatter.match(n,{value:r},e.dom,a)};a?(o.setActive(!B(u,c)),i.set(t.formatter.formatChanged(n,(function(t){return o.setActive(!t)}),!0))):(o.setActive(X(u,c)),i.set(t.formatter.formatChanged(n,o.setActive,!1,{value:r})))};return t.initialized?u():t.on("init",u),i.clear}},wp=function(t){return Fe(t,"menu")},xp=function(t){return I(t,(function(t){var e=t.text||t.title;return wp(t)?{text:e,items:xp(t.menu)}:{text:e,value:t.value}}))},Cp=function(t,e,n,r,o){return I(n,(function(n){var i=n.text||n.title;return wp(n)?{type:"nestedmenuitem",text:i,getSubmenuItems:function(){return Cp(t,e,n.menu,r,o)}}:{text:i,type:"togglemenuitem",onAction:function(){return o(n.value)},onSetup:yp(t,e,r,n.value)}}))},Sp=function(t,e){return function(n){var r;t.execCommand("mceTableApplyCellStyle",!1,(r={},r[e]=n,r))}},kp=function(t){return K(t,(function(t){return wp(t)?[ot(ot({},t),{menu:kp(t.menu)})]:Ot(t.value)?[t]:[]}))},Tp=function(t,e,n,r,o){return function(i){return i(Cp(t,e,n,r,o))}},Op=function(t,e,n){var r=I(e,(function(t){return{text:t.title,value:"#"+gp(t.value).value,type:"choiceitem"}}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:r.length>0?r:void 0,allowCustomColors:!1},onAction:function(e){var r,o="remove"===e.value?"":e.value;t.execCommand("mceTableApplyCellStyle",!1,(r={},r[n]=o,r))}}]},_p=function(t){return function(){var e=t.queryCommandValue("mceTableRowType"),n="header"===e?"body":"header";t.execCommand("mceTableRowType",!1,{type:n})}},Ep=function(t){return function(){var e=t.queryCommandValue("mceTableColType"),n="th"===e?"td":"th";t.execCommand("mceTableColType",!1,{type:n})}},Ap=function(t){var e=xp(Af(t));return e.length>0?A.some({name:"class",type:"listbox",label:"Class",items:e}):A.none()},Dp=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:tp}],Mp=function(t){return Dp.concat(Ap(t).toArray())},Np=function(t,e){var n=[{text:"Select...",value:""}],r=[{name:"borderstyle",type:"listbox",label:"Border style",items:n.concat(xp(bf(t)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}],o={name:"borderwidth",type:"input",label:"Border width"},i="cell"===e?[o].concat(r):r;return{title:"Advanced",name:"advanced",items:i}},Rp=function(t){return function(e,n){var r=e.dom,o=function(e,o){t&&!o||r.setAttrib(n,e,o)},i=function(e,o){t&&!o||r.setStyle(n,e,o)},a=function(r,o){t&&!o||(""===o?e.formatter.remove(r,{value:null},n,!0):e.formatter.apply(r,{value:o},n))};return{setAttrib:o,setStyle:i,setFormat:a}}},zp={normal:Rp(!1),ifTruthy:Rp(!0)},Bp=function(t){return function(e){return Ct(e,"rgb")?t.toHex(e):e}},Pp=function(t,e){var n=ve.fromDom(e);return{borderwidth:pr(n,"border-width").getOr(""),borderstyle:pr(n,"border-style").getOr(""),bordercolor:pr(n,"border-color").map(Bp(t)).getOr(""),backgroundcolor:pr(n,"background-color").map(Bp(t)).getOr("")}},Ip=function(t){var e=t[0],n=t.slice(1);return L(n,(function(t){L(_e(e),(function(n){Ae(t,(function(t,r){var o=e[n];""!==o&&n===r&&o!==t&&(e[n]="")}))}))})),e},Lp=function(t,e,n,r){return $(t,(function(t){return!s(n.formatter.matchNode(r,e+t))})).getOr("")},Hp=w(Lp,["left","center","right"],"align"),Fp=w(Lp,["top","middle","bottom"],"valign"),Vp=function(t,e){var n=wf(t),r=yf(t),o=function(t){return{borderstyle:Le(n,"border-style").getOr(""),bordercolor:Bp(t)(Le(n,"border-color").getOr("")),backgroundcolor:Bp(t)(Le(n,"background-color").getOr(""))}},i={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""},a=function(){var e=n["border-width"];return Ef(t)&&e?{border:e}:Le(r,"border").fold((function(){return{}}),(function(t){return{border:t}}))},u=e?o(t.dom):{},c=function(){var t=Le(n,"border-spacing").or(Le(r,"cellspacing")).fold((function(){return{}}),(function(t){return{cellspacing:t}})),e=Le(n,"border-padding").or(Le(r,"cellpadding")).fold((function(){return{}}),(function(t){return{cellpadding:t}}));return ot(ot({},t),e)},s=ot(ot(ot(ot(ot(ot({},i),n),r),u),a()),c());return s},jp=function(t){return Nr(ve.fromDom(t)).map((function(e){var n={selection:Uu(t.cells)};return xh(e,n)})).getOr("")},Up=function(t,e,n){var r=function(e,n){var r=pr(ve.fromDom(n),"border-width");return Ef(t)&&r.isSome()?r.getOr(""):e.getAttrib(n,"border")||Xh(t.dom,n,"border-width")||Xh(t.dom,n,"border")},o=t.dom,i=Ef(t)?o.getStyle(e,"border-spacing")||o.getAttrib(e,"cellspacing"):o.getAttrib(e,"cellspacing")||o.getStyle(e,"border-spacing"),a=Ef(t)?Xh(o,e,"padding")||o.getAttrib(e,"cellpadding"):o.getAttrib(e,"cellpadding")||Xh(o,e,"padding");return ot({width:o.getStyle(e,"width")||o.getAttrib(e,"width"),height:o.getStyle(e,"height")||o.getAttrib(e,"height"),cellspacing:i,cellpadding:a,border:r(o,e),caption:!!o.select("caption",e)[0],class:o.getAttrib(e,"class",""),align:Hp(t,e)},n?Pp(o,e):{})},Wp=function(t,e,n){var r=t.dom;return ot({height:r.getStyle(e,"height")||r.getAttrib(e,"height"),class:r.getAttrib(e,"class",""),type:jp(e),align:Hp(t,e)},n?Pp(r,e):{})},$p=function(t,e,n,r){var o=t.dom,i=r.getOr(e),a=function(t,e){return o.getStyle(t,e)||o.getAttrib(t,e)};return ot({width:a(i,"width"),height:a(e,"height"),scope:o.getAttrib(e,"scope"),celltype:Wu(e),class:o.getAttrib(e,"class",""),halign:Hp(t,e),valign:Fp(t,e)},n?Pp(o,e):{})},qp=function(t,e){var n=so.fromTable(t),r=so.justCells(n),o=V(r,(function(t){return B(e,(function(e){return Ce(t.element,e)}))}));return I(o,(function(t){return{element:t.element.dom,column:so.getColumnAt(n,t.column).map((function(t){return t.element.dom}))}}))},Gp=function(t,e,n){t.setAttrib("scope",n.scope),t.setAttrib("class",n.class),t.setStyle("height",Yu(n.height)),e.setStyle("width",Yu(n.width))},Kp=function(t,e){t.setFormat("tablecellbackgroundcolor",e.backgroundcolor),t.setFormat("tablecellbordercolor",e.bordercolor),t.setFormat("tablecellborderstyle",e.borderstyle),t.setFormat("tablecellborderwidth",Yu(e.borderwidth))},Xp=function(t,e,n){var r=1===e.length;L(e,(function(e){var o=e.element,i=r?zp.normal(t,o):zp.ifTruthy(t,o),a=e.column.map((function(e){return r?zp.normal(t,e):zp.ifTruthy(t,e)})).getOr(i);Gp(i,a,n),Sf(t)&&Kp(i,n),r&&(Zh(t,o),Qh(t,o)),n.halign&&Yh(t,o,n.halign),n.valign&&Jh(t,o,n.valign)}))},Yp=function(t,e){t.execCommand("mceTableCellType",!1,{type:e.celltype,no_events:!0})},Jp=function(t,e,n,r){var o=ze(r,(function(t,e){return n[e]!==t}));Ie(o)>0&&e.length>=1&&Nr(e[0]).each((function(n){var i=qp(n,e),a=Ie(ze(o,(function(t,e){return"scope"!==e&&"celltype"!==e})))>0,u=He(o,"celltype");(a||He(o,"scope"))&&Xp(t,i,r),u&&Yp(t,r),rf(t,n.dom,{structure:u,style:a})}))},Zp=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){Jp(t,e,n,o),t.focus()}))},Qp=function(t,e){var n=Nr(e[0]).map((function(n){return I(qp(n,e),(function(e){return $p(t,e.element,Sf(t),e.column)}))}));return Ip(n.getOrDie())},tv=function(t,e){var n=Sc(e);if(0!==n.length){var r=Qp(t,n),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:Mp(t)},Np(t,"cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Mp(t)}]};t.windowManager.open({title:"Cell Properties",size:"normal",body:Sf(t)?o:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:w(Zp,t,n,r)})}},ev=function(t){var e=xp(Df(t));return e.length>0?A.some({name:"class",type:"listbox",label:"Class",items:e}):A.none()},nv=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],rv=function(t){return nv.concat(ev(t).toArray())},ov=function(t,e){t.setAttrib("class",e.class),t.setStyle("height",Yu(e.height))},iv=function(t,e){t.setStyle("background-color",e.backgroundcolor),t.setStyle("border-color",e.bordercolor),t.setStyle("border-style",e.borderstyle)},av=function(t,e,n,r){var o=1===e.length;L(e,(function(e){var i=o?zp.normal(t,e):zp.ifTruthy(t,e);ov(i,n),kf(t)&&iv(i,n),n.align!==r.align&&(Zh(t,e),Yh(t,e,n.align))}))},uv=function(t,e){t.execCommand("mceTableRowType",!1,{type:e.type,no_events:!0})},cv=function(t,e,n,r){var o=ze(r,(function(t,e){return n[e]!==t}));if(Ie(o)>0){var i=He(o,"type"),a=!i||Ie(o)>1;a&&av(t,e,r,n),i&&uv(t,r),Nr(ve.fromDom(e[0])).each((function(e){return rf(t,e.dom,{structure:i,style:a})}))}},sv=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){cv(t,e,n,o),t.focus()}))},lv=function(t){var e=kc(ec(t),gc.selected);if(0!==e.length){var n=I(e,(function(e){return Wp(t,e.dom,kf(t))})),r=Ip(n),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:rv(t)},Np(t,"row")]},i={type:"panel",items:[{type:"grid",columns:2,items:rv(t)}]};t.windowManager.open({title:"Row Properties",size:"normal",body:kf(t)?o:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:w(sv,t,I(e,(function(t){return t.dom})),r)})}},fv=function(t,e,n){var r=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],o=[{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}],i=Of(t)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],a=[{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}],u=e.length>0?[{type:"listbox",name:"class",label:"Class",items:e}]:[];return r.concat(o).concat(i).concat(a).concat(u)},dv=function(t,e,n,r){if("TD"===e.tagName||"TH"===e.tagName)o(n)?t.setStyle(e,n,r):t.setStyle(e,n);else if(e.children)for(var i=0;i<e.children.length;i++)dv(t,e.children[i],n,r)},mv=function(t,e,n){var r=t.dom,o={},i={};if(o.class=n.class,i.height=Yu(n.height),r.getAttrib(e,"width")&&!Ef(t)?o.width=Xu(n.width):i.width=Yu(n.width),Ef(t)?(i["border-width"]=Yu(n.border),i["border-spacing"]=Yu(n.cellspacing)):(o.border=n.border,o.cellpadding=n.cellpadding,o.cellspacing=n.cellspacing),Ef(t)&&e.children)for(var a=0;a<e.children.length;a++)dv(r,e.children[a],{"border-width":Yu(n.border),padding:Yu(n.cellpadding)}),Tf(t)&&dv(r,e.children[a],{"border-color":n.bordercolor});Tf(t)&&(i["background-color"]=n.backgroundcolor,i["border-color"]=n.bordercolor,i["border-style"]=n.borderstyle),o.style=r.serializeStyle(ot(ot({},wf(t)),i)),r.setAttribs(e,ot(ot({},yf(t)),o))},gv=function(t,e,n,r){var o=t.dom,i=r.getData(),a=ze(i,(function(t,e){return n[e]!==t}));r.close(),""===i.class&&delete i.class,t.undoManager.transact((function(){if(!e){var n=parseInt(i.cols,10)||1,r=parseInt(i.rows,10)||1;e=Ih(t,n,r,0,0)}if(Ie(a)>0){mv(t,e,i);var u=o.select("caption",e)[0];(u&&!i.caption||!u&&i.caption)&&t.execCommand("mceTableToggleCaption"),""===i.align?Zh(t,e):Yh(t,e,i.align)}if(t.focus(),t.addVisual(),Ie(a)>0){var c=He(a,"caption"),s=!c||Ie(a)>1;rf(t,e,{structure:c,style:s})}}))},hv=function(t,e){var n,r=t.dom,o=Vp(t,Tf(t));!1===e?(n=r.getParent(t.selection.getStart(),"table",t.getBody()),n?o=Up(t,n,Tf(t)):Tf(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor="")):(o.cols="1",o.rows="1",Tf(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""));var i=xp(Mf(t));i.length>0&&o.class&&(o.class=o.class.replace(/\s*mce\-item\-table\s*/g,""));var a={type:"grid",columns:2,items:fv(t,i,e)},u=function(){return{type:"panel",items:[a]}},c=function(){return{type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},Np(t,"table")]}},s=Tf(t)?c():u();t.windowManager.open({title:"Table Properties",size:"normal",body:s,onSubmit:w(gv,t,n,o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o})},pv=function(t){return xc(ec(t),Ku(t))},vv=function(t){return Cc(ec(t),Ku(t))},bv=function(t,e,n,r,a){var u=Ku(t),c=function(){return pv(t).each((function(e){Nr(e,u).filter(x(u)).each((function(e){var n=ve.fromText("");if(Oo(e,n),Bo(e),t.dom.isEmpty(t.getBody()))t.setContent(""),t.selection.setCursorLocation();else{var r=t.dom.createRng();r.setStart(n.dom,0),r.setEnd(n.dom,0),t.selection.setRng(r),t.nodeChanged()}}))}))},s=function(e){return pv(t).each((function(n){var r=zf(t)||Rf(t)||Nf(t);r||Nr(n,u).each((function(n){"relative"!==e||xs(n)?"fixed"!==e||Cs(n)?"responsive"!==e||Ss(n)||Zf(n):Jf(n):Yf(n),Ju(n),rf(t,n.dom,af)}))}))},l=function(t){return Nr(t,u)},f=function(e){return vv(t).bind((function(t){return l(t).map((function(n){return e(n,t)}))}))},d=function(e,n){f((function(e){t.formatter.toggle("tableclass",{value:n},e.dom),rf(t,e.dom,of)}))},m=function(e,n){f((function(e){var o=Sc(r),i=X(o,(function(e){return t.formatter.match("tablecellclass",{value:n},e.dom)})),a=i?t.formatter.remove:t.formatter.apply;L(o,(function(t){return a("tablecellclass",{value:n},t.dom)})),rf(t,e.dom,of)}))},h=function(){pv(t).each((function(e){Nr(e,u).each((function(n){qn(n,"caption").fold((function(){var e=ve.fromTag("caption");Eo(e,ve.fromText("Caption")),Ao(n,e,0),t.selection.setCursorLocation(e.dom,0)}),(function(r){fn("caption")(e)&&xe("td",n).each((function(e){return t.selection.setCursorLocation(e.dom,0)})),Bo(r)})),rf(t,n.dom,af)}))}))},p=function(e){t.focus()},v=function(t,e){return void 0===e&&(e=!1),f((function(n,o){var i=pc(r,n,o);t(n,i,e).each(p)}))},b=function(){return f((function(e,n){var o=pc(r,e,n),i=Fu(g,ve.fromDom(t.getDoc()),A.none());return Gh(e,o,i)}))},y=function(){return f((function(t,e){var n=pc(r,t,e);return qh(t,n)}))},C=function(e,n){return n().each((function(n){var o=I(n,(function(t){return xi(t)}));f((function(n,i){var a=Vu(ve.fromDom(t.getDoc())),u=bc(r,i,o,a);e(n,u).each(p)}))}))},S=function(t){return function(e,n){return Le(n,"type").each((function(e){v(t(e),n.no_events)}))}};Ae({mceTableSplitCells:function(){return v(e.unmergeCells)},mceTableMergeCells:function(){return v(e.mergeCells)},mceTableInsertRowBefore:function(){return v(e.insertRowsBefore)},mceTableInsertRowAfter:function(){return v(e.insertRowsAfter)},mceTableInsertColBefore:function(){return v(e.insertColumnsBefore)},mceTableInsertColAfter:function(){return v(e.insertColumnsAfter)},mceTableDeleteCol:function(){return v(e.deleteColumn)},mceTableDeleteRow:function(){return v(e.deleteRow)},mceTableCutCol:function(){return y().each((function(t){a.setColumns(t),v(e.deleteColumn)}))},mceTableCutRow:function(){return b().each((function(t){a.setRows(t),v(e.deleteRow)}))},mceTableCopyCol:function(){return y().each((function(t){return a.setColumns(t)}))},mceTableCopyRow:function(){return b().each((function(t){return a.setRows(t)}))},mceTablePasteColBefore:function(){return C(e.pasteColsBefore,a.getColumns)},mceTablePasteColAfter:function(){return C(e.pasteColsAfter,a.getColumns)},mceTablePasteRowBefore:function(){return C(e.pasteRowsBefore,a.getRows)},mceTablePasteRowAfter:function(){return C(e.pasteRowsAfter,a.getRows)},mceTableDelete:c,mceTableCellToggleClass:m,mceTableToggleClass:d,mceTableToggleCaption:h,mceTableSizingMode:function(t,e){return s(e)},mceTableCellType:S((function(t){return"th"===t?e.makeCellsHeader:e.unmakeCellsHeader})),mceTableColType:S((function(t){return"th"===t?e.makeColumnsHeader:e.unmakeColumnsHeader})),mceTableRowType:S((function(t){switch(t){case"header":return e.makeRowsHeader;case"footer":return e.makeRowsFooter;default:return e.makeRowsBody}}))},(function(e,n){return t.addCommand(n,e)})),Ae({mceTableProps:w(hv,t,!1),mceTableRowProps:w(lv,t),mceTableCellProps:w(tv,t,r)},(function(e,n){return t.addCommand(n,(function(){return e()}))})),t.addCommand("mceInsertTable",(function(e,n){i(n)&&_e(n).length>0?Lh(t,n.rows,n.columns,n.options,"Invalid values for mceInsertTable - rows and columns values are required to insert a table."):hv(t,!0)})),t.addCommand("mceTableApplyCellStyle",(function(e,n){var a=function(t){return"tablecell"+t.toLowerCase().replace("-","")};if(i(n)){var u=Sc(r);if(0!==u.length){var c=ze(n,(function(e,n){return t.formatter.has(a(n))&&o(e)}));Ve(c)||(Ae(c,(function(e,n){L(u,(function(r){zp.normal(t,r.dom).setFormat(a(n),e)}))})),l(u[0]).each((function(e){return rf(t,e.dom,of)})))}}}))},yv=function(t,e,n){var r=Ku(t),o=function(e){return Cc(ec(t)).bind((function(t){return Nr(t,r).map((function(r){var o=pc(n,r,t);return e(r,o)}))})).getOr("")};Ae({mceTableRowType:function(){return o(e.getTableRowType)},mceTableCellType:function(){return o(e.getTableCellType)},mceTableColType:function(){return o(e.getTableColType)}},(function(e,n){return t.addQueryValueHandler(n,e)}))},wv=function(){var t=bp(),e=bp();return{getRows:t.get,setRows:function(n){n.fold(t.clear,t.set),e.clear()},clearRows:t.clear,getColumns:e.get,setColumns:function(n){n.fold(e.clear,e.set),t.clear()},clearColumns:e.clear}},xv={remove_similar:!0,inherit:!1},Cv=ot({selector:"td,th"},xv),Sv={tablecellbackgroundcolor:ot({styles:{backgroundColor:"%value"}},Cv),tablecellverticalalign:ot({styles:{"vertical-align":"%value"}},Cv),tablecellbordercolor:ot({styles:{borderColor:"%value"}},Cv),tablecellclass:ot({classes:["%value"]},Cv),tableclass:ot({selector:"table",classes:["%value"]},xv),tablecellborderstyle:ot({styles:{borderStyle:"%value"}},Cv),tablecellborderwidth:ot({styles:{borderWidth:"%value"}},Cv)},kv=function(t){t.formatter.register(Sv)},Tv=fi.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Ov=function(t){return void 0===t&&(t=void 0),Tv.none(t)},_v=ot(ot({},Tv),{none:Ov}),Ev=function(t,e,n,r,o){void 0===o&&(o=k);var i=1===r;if(!i&&n<=0)return _v.first(t[0]);if(i&&n>=t.length-1)return _v.last(t[t.length-1]);var a=n+r,u=t[a];return o(u)?_v.middle(e,u):Ev(t,e,a,r,o)},Av=function(t,e){return Nr(t,e).bind((function(e){var n=Dr(e),r=q(n,(function(e){return Ce(t,e)}));return r.map((function(t){return{index:t,all:n}}))}))},Dv=function(t,e,n){var r=Av(t,n);return r.fold((function(){return _v.none(t)}),(function(n){return Ev(n.all,t,n.index,1,e)}))},Mv=function(t,e,n){var r=Av(t,n);return r.fold((function(){return _v.none()}),(function(n){return Ev(n.all,t,n.index,-1,e)}))},Nv=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Rv={create:Nv},zv=fi.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Bv=function(t,e,n,r){return t.fold(e,n,r)},Pv=function(t){return t.fold(b,b,b)},Iv=zv.before,Lv=zv.on,Hv=zv.after,Fv={before:Iv,on:Lv,after:Hv,cata:Bv,getStart:Pv},Vv=fi.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),jv=function(t){return Vv.exact(t.start,t.soffset,t.finish,t.foffset)},Uv=function(t){return t.match({domRange:function(t){return ve.fromDom(t.startContainer)},relative:function(t,e){return Fv.getStart(t)},exact:function(t,e,n,r){return t}})},Wv=Vv.domRange,$v=Vv.relative,qv=Vv.exact,Gv=function(t){var e=Uv(t);return gn(e)},Kv=Rv.create,Xv={domRange:Wv,relative:$v,exact:qv,exactFromRange:jv,getWin:Gv,range:Kv},Yv=function(t,e){var n=t.document.createRange();return n.selectNode(e.dom),n},Jv=function(t,e){var n=t.document.createRange();return Zv(n,e),n},Zv=function(t,e){return t.selectNodeContents(e.dom)},Qv=function(t,e){e.fold((function(e){t.setStartBefore(e.dom)}),(function(e,n){t.setStart(e.dom,n)}),(function(e){t.setStartAfter(e.dom)}))},tb=function(t,e){e.fold((function(e){t.setEndBefore(e.dom)}),(function(e,n){t.setEnd(e.dom,n)}),(function(e){t.setEndAfter(e.dom)}))},eb=function(t,e,n){var r=t.document.createRange();return Qv(r,e),tb(r,n),r},nb=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rb=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},ob=function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?A.some(n).map(rb):A.none()},ib=fi.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),ab=function(t,e,n){return e(ve.fromDom(n.startContainer),n.startOffset,ve.fromDom(n.endContainer),n.endOffset)},ub=function(t,e){return e.match({domRange:function(t){return{ltr:v(t),rtl:A.none}},relative:function(e,n){return{ltr:at((function(){return eb(t,e,n)})),rtl:at((function(){return A.some(eb(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:at((function(){return nb(t,e,n,r,o)})),rtl:at((function(){return A.some(nb(t,r,o,e,n))}))}}})},cb=function(t,e){var n=e.ltr();if(n.collapsed){var r=e.rtl().filter((function(t){return!1===t.collapsed}));return r.map((function(t){return ib.rtl(ve.fromDom(t.endContainer),t.endOffset,ve.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return ab(t,ib.ltr,n)}))}return ab(t,ib.ltr,n)},sb=function(t,e){var n=ub(t,e);return cb(t,n)},lb=function(t,e){var n=sb(t,e);return n.match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,n),i}})};ib.ltr,ib.rtl;var fb=function(t,e,n,r,o){if(0===o)return 0;if(e===r)return o-1;for(var i=r,a=1;a<o;a++){var u=t(a),c=Math.abs(e-u.left);if(n<=u.bottom){if(n<u.top||c>i)return a-1;i=c}}return 0},db=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},mb=function(t,e,n,r,o){var i=function(n){var r=t.dom.createRange();return r.setStart(e.dom,n),r.collapse(!0),r},a=function(t){var e=i(t);return e.getBoundingClientRect()},u=Ho(e).length,c=fb(a,n,r,o.right,u);return i(c)},gb=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getClientRects(),a=rt(i,(function(t){return db(t,n,r)?A.some(t):A.none()}));return a.map((function(o){return mb(t,e,n,r,o)}))},hb=function(t,e,n,r){var o=t.dom.createRange(),i=wn(e);return rt(i,(function(e){return o.selectNode(e.dom),db(o.getBoundingClientRect(),n,r)?pb(t,e,n,r):A.none()}))},pb=function(t,e,n,r){return cn(e)?gb(t,e,n,r):hb(t,e,n,r)},vb=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),u=Math.max(i.top,Math.min(i.bottom,r));return pb(t,e,a,u)},bb=!0,yb=!1,wb=function(t,e){return e-t.left<t.right-e?bb:yb},xb=function(t,e,n){var r=t.dom.createRange();return r.selectNode(e.dom),r.collapse(n),r},Cb=function(t,e,n){var r=t.dom.createRange();r.selectNode(e.dom);var o=r.getBoundingClientRect(),i=wb(o,n),a=i===bb?Eu:Au;return a(e).map((function(e){return xb(t,e,i)}))},Sb=function(t,e,n){var r=e.dom.getBoundingClientRect(),o=wb(r,n);return A.some(xb(t,e,o))},kb=function(t,e,n){var r=0===wn(e).length?Sb:Cb;return r(t,e,n)},Tb=function(t,e,n){var r,o;return A.from(null===(o=(r=t.dom).caretPositionFromPoint)||void 0===o?void 0:o.call(r,e,n)).bind((function(e){if(null===e.offsetNode)return A.none();var n=t.dom.createRange();return n.setStart(e.offsetNode,e.offset),n.collapse(),A.some(n)}))},Ob=function(t,e,n){var r,o;return A.from(null===(o=(r=t.dom).caretRangeFromPoint)||void 0===o?void 0:o.call(r,e,n))},_b=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),u=Math.max(i.top,Math.min(i.bottom,r));return vb(t,e,a,u)},Eb=function(t,e,n){return ve.fromPoint(t,e,n).bind((function(r){var o=function(){return kb(t,r,e)};return 0===wn(r).length?o():_b(t,r,e,n).orThunk(o)}))},Ab=function(){return document.caretPositionFromPoint?Tb:document.caretRangeFromPoint?Ob:Eb}(),Db=function(t,e,n){var r=ve.fromDom(t.document);return Ab(r,e,n).map((function(t){return Rv.create(ve.fromDom(t.startContainer),t.startOffset,ve.fromDom(t.endContainer),t.endOffset)}))},Mb=function(t,e){var n=nn(t);return"input"===n?Fv.after(t):z(["br","img"],n)?0===e?Fv.before(t):Fv.after(t):Fv.on(t,e)},Nb=function(t,e){var n=t.fold(Fv.before,Mb,Fv.after),r=e.fold(Fv.before,Mb,Fv.after);return Xv.relative(n,r)},Rb=function(t,e,n,r){var o=Mb(t,e),i=Mb(n,r);return Xv.relative(o,i)},zb=function(t){return t.match({domRange:function(t){var e=ve.fromDom(t.startContainer),n=ve.fromDom(t.endContainer);return Rb(e,t.startOffset,n,t.endOffset)},relative:Nb,exact:Rb})},Bb=function(t,e,n,r){var o=dn(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Pb=function(t,e,n,r){var o=Bb(t,e,n,r),i=Ce(t,n)&&e===r;return o.collapsed&&!i},Ib=function(t){return A.from(t.getSelection())},Lb=function(t,e){Ib(t).each((function(t){t.removeAllRanges(),t.addRange(e)}))},Hb=function(t,e,n,r,o){var i=nb(t,e,n,r,o);Lb(t,i)},Fb=function(t,e,n,r,o,i){e.collapse(n.dom,r),e.extend(o.dom,i)},Vb=function(t,e){return sb(t,e).match({ltr:function(e,n,r,o){Hb(t,e,n,r,o)},rtl:function(e,n,r,o){Ib(t).each((function(i){if(i.setBaseAndExtent)i.setBaseAndExtent(e.dom,n,r.dom,o);else if(i.extend)try{Fb(t,i,e,n,r,o)}catch(a){Hb(t,r,o,e,n)}else Hb(t,r,o,e,n)}))}})},jb=function(t,e,n,r,o){var i=Rb(e,n,r,o);Vb(t,i)},Ub=function(t,e,n){var r=Nb(e,n);Vb(t,r)},Wb=function(t){var e=Xv.getWin(t).dom,n=function(t,n,r,o){return nb(e,t,n,r,o)},r=zb(t);return sb(e,r).match({ltr:n,rtl:n})},$b=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return A.some(Rv.create(ve.fromDom(e.startContainer),e.startOffset,ve.fromDom(n.endContainer),n.endOffset))}return A.none()},qb=function(t){if(null===t.anchorNode||null===t.focusNode)return $b(t);var e=ve.fromDom(t.anchorNode),n=ve.fromDom(t.focusNode);return Pb(e,t.anchorOffset,n,t.focusOffset)?A.some(Rv.create(e,t.anchorOffset,n,t.focusOffset)):$b(t)},Gb=function(t,e,n){void 0===n&&(n=!0);var r=n?Jv:Yv,o=r(t,e);Lb(t,o)},Kb=function(t){return Ib(t).filter((function(t){return t.rangeCount>0})).bind(qb)},Xb=function(t){return Kb(t).map((function(t){return Xv.exact(t.start,t.soffset,t.finish,t.foffset)}))},Yb=function(t,e){var n=lb(t,e);return ob(n)},Jb=function(t,e,n){return Db(t,e,n)},Zb=function(t){Ib(t).each((function(t){return t.removeAllRanges()}))},Qb=tinymce.util.Tools.resolve("tinymce.util.VK"),ty=function(t,e,n){return ry(t,e,Dv(n,Cl))},ey=function(t,e,n){return ry(t,e,Mv(n,Cl))},ny=function(t,e){var n=Xv.exact(e,0,e,0);return Wb(n)},ry=function(t,e,n){return n.fold(A.none,A.none,(function(e,n){return Eu(n).map((function(e){return ny(t,e)}))}),(function(n){return t.execCommand("mceTableInsertRowAfter"),ty(t,e,n)}))},oy=["table","li","dl"],iy=function(t,e,n){if(t.keyCode===Qb.TAB){var r=$u(e),o=function(t){var e=nn(t);return Ce(t,r)||z(oy,e)},i=e.selection.getRng(),a=ve.fromDom(t.shiftKey?i.startContainer:i.endContainer);Ar(a,o).each((function(r){t.preventDefault(),Nr(r,o).each(n.clear),e.selection.collapse(t.shiftKey);var i=t.shiftKey?ey:ty,a=i(e,o,r);a.each((function(t){e.selection.setRng(t)}))}))}},ay=function(t,e){return{selection:t,kill:e}},uy={create:ay},cy=function(t,e,n,r){return{start:Fv.on(t,e),finish:Fv.on(n,r)}},sy={create:cy},ly=function(t,e){var n=lb(t,e);return Rv.create(ve.fromDom(n.startContainer),n.startOffset,ve.fromDom(n.endContainer),n.endOffset)},fy=sy.create,dy=function(t,e,n,r,o,i,a){return Ce(n,o)&&r===i?A.none():Kn(n,"td,th",e).bind((function(n){return Kn(o,"td,th",e).bind((function(r){return my(t,e,n,r,a)}))}))},my=function(t,e,n,r,o){return Ce(n,r)?A.none():ni(n,r,e).bind((function(e){var r=e.boxes.getOr([]);return r.length>1?(o(t,r,e.start,e.finish),A.some(uy.create(A.some(fy(n,0,n,ku(n))),!0))):A.none()}))},gy=function(t,e,n,r,o){var i=function(t){return o.clearBeforeUpdate(n),o.selectRange(n,t.boxes,t.start,t.finish),t.boxes};return ui(r,t,e,o.firstSelectedSelector,o.lastSelectedSelector).map(i)},hy=function(t,e){return{item:t,mode:e}},py=function(t,e,n,r){return void 0===r&&(r=vy),t.property().parent(e).map((function(t){return hy(t,r)}))},vy=function(t,e,n,r){return void 0===r&&(r=by),n.sibling(t,e).map((function(t){return hy(t,r)}))},by=function(t,e,n,r){void 0===r&&(r=by);var o=t.property().children(e),i=n.first(o);return i.map((function(t){return hy(t,r)}))},yy=[{current:py,next:vy,fallback:A.none()},{current:vy,next:by,fallback:A.some(py)},{current:by,next:by,fallback:A.some(vy)}],wy=function(t,e,n,r,o){void 0===o&&(o=yy);var i=$(o,(function(t){return t.current===n}));return i.bind((function(n){return n.current(t,e,r,n.next).orThunk((function(){return n.fallback.bind((function(n){return wy(t,e,n,r)}))}))}))},xy=function(){var t=function(t,e){return t.query().prevSibling(e)},e=function(t){return t.length>0?A.some(t[t.length-1]):A.none()};return{sibling:t,first:e}},Cy=function(){var t=function(t,e){return t.query().nextSibling(e)},e=function(t){return t.length>0?A.some(t[0]):A.none()};return{sibling:t,first:e}},Sy={left:xy,right:Cy},ky=function(t,e,n,r,o,i){var a=wy(t,e,r,o);return a.bind((function(e){return i(e.item)?A.none():n(e.item)?A.some(e.item):ky(t,e.item,n,e.mode,o,i)}))},Ty=function(t,e,n,r){return ky(t,e,n,vy,Sy.left(),r)},Oy=function(t,e,n,r){return ky(t,e,n,vy,Sy.right(),r)},_y=function(t){return function(e){return 0===t.property().children(e).length}},Ey=function(t,e,n){return Dy(t,e,_y(t),n)},Ay=function(t,e,n){return My(t,e,_y(t),n)},Dy=Ty,My=Oy,Ny=Uo(),Ry=function(t,e){return Ey(Ny,t,e)},zy=function(t,e){return Ay(Ny,t,e)},By=function(t,e,n){return Dy(Ny,t,e,n)},Py=function(t,e,n){return My(Ny,t,e,n)},Iy=function(t,e,n){return Vn(t,e,n).isSome()},Ly=fi.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Hy=function(t,e,n){var r=t.getRect(e),o=t.getRect(n);return o.right>r.left&&o.left<r.right},Fy=function(t){return Kn(t,"tr")},Vy=function(t,e,n,r,o,i,a){return Kn(r,"td,th",a).bind((function(n){return Kn(e,"td,th",a).map((function(e){return Ce(n,e)?Ce(r,n)&&ku(n)===o?i(e):Ly.none("in same cell"):Qo(Fy,[n,e]).fold((function(){return Hy(t,e,n)?Ly.success():i(e)}),(function(t){return i(e)}))}))})).getOr(Ly.none("default"))},jy=function(t,e,n,r,o){return t.fold(e,n,r,o)},Uy=ot(ot({},Ly),{verify:Vy,cata:jy}),Wy=function(t,e,n,r){return{parent:t,children:e,element:n,index:r}},$y=function(t){return hn(t).bind((function(e){var n=wn(e);return qy(n,t).map((function(r){return Wy(e,n,t,r)}))}))},qy=function(t,e){return q(t,w(Ce,e))},Gy=function(t){return"br"===nn(t)},Ky=function(t,e,n){return e(t,n).bind((function(t){return cn(t)&&0===Ho(t).trim().length?Ky(t,e,n):A.some(t)}))},Xy=function(t,e,n){return n.traverse(e).orThunk((function(){return Ky(e,n.gather,t)})).map(n.relative)},Yy=function(t,e){return xn(t,e).filter(Gy).orThunk((function(){return xn(t,e-1).filter(Gy)}))},Jy=function(t,e,n,r){return Yy(e,n).bind((function(e){return r.traverse(e).fold((function(){return Ky(e,r.gather,t).map(r.relative)}),(function(t){return $y(t).map((function(t){return Fv.on(t.parent,t.index)}))}))}))},Zy=function(t,e,n,r){var o=Gy(e)?Xy(t,e,r):Jy(t,e,n,r);return o.map((function(t){return{start:t,finish:t}}))},Qy=function(t){return Uy.cata(t,(function(t){return A.none()}),(function(){return A.none()}),(function(t){return A.some(ad(t,0))}),(function(t){return A.some(ad(t,ku(t)))}))},tw=function(t,e){return{left:t.left,top:t.top+e,right:t.right,bottom:t.bottom+e}},ew=function(t,e){return{left:t.left,top:t.top-e,right:t.right,bottom:t.bottom-e}},nw=function(t,e,n){return{left:t.left+e,top:t.top+n,right:t.right+e,bottom:t.bottom+n}},rw=function(t){return t.top},ow=function(t){return t.bottom},iw=function(t,e,n){return n>=0&&n<ku(e)?t.getRangedRect(e,n,e,n+1):n>0?t.getRangedRect(e,n-1,e,n):A.none()},aw=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}},uw=function(t,e){return A.some(t.getRect(e))},cw=function(t,e,n){return un(e)?uw(t,e).map(aw):cn(e)?iw(t,e,n).map(aw):A.none()},sw=function(t,e){return un(e)?uw(t,e).map(aw):cn(e)?t.getRangedRect(e,0,e,ku(e)).map(aw):A.none()},lw=5,fw=100,dw=fi.generate([{none:[]},{retry:["caret"]}]),mw=function(t,e){return t.left<e.left||Math.abs(e.right-t.left)<1||t.left>e.right},gw=function(t,e,n){return jn(e,ug).fold(S,(function(e){return sw(t,e).exists((function(t){return mw(n,t)}))}))},hw=function(t,e,n,r,o){var i=tw(o,lw);return Math.abs(n.bottom-r.bottom)<1||n.top>o.bottom?dw.retry(i):n.top===o.bottom?dw.retry(tw(o,1)):gw(t,e,o)?dw.retry(nw(i,lw,0)):dw.none()},pw=function(t,e,n,r,o){var i=ew(o,lw);return Math.abs(n.top-r.top)<1||n.bottom<o.top?dw.retry(i):n.bottom===o.top?dw.retry(ew(o,1)):gw(t,e,o)?dw.retry(nw(i,lw,0)):dw.none()},vw={point:rw,adjuster:pw,move:ew,gather:Ry},bw={point:ow,adjuster:hw,move:tw,gather:zy},yw=function(t,e,n){return t.elementFromPoint(e,n).filter((function(t){return"table"===nn(t)})).isSome()},ww=function(t,e,n,r,o){return xw(t,e,n,e.move(r,lw),o)},xw=function(t,e,n,r,o){return 0===o?A.some(r):yw(t,r.left,e.point(r))?ww(t,e,n,r,o-1):t.situsFromPoint(r.left,e.point(r)).bind((function(i){return i.start.fold(A.none,(function(i){return sw(t,i).bind((function(a){return e.adjuster(t,i,a,n,r).fold(A.none,(function(r){return xw(t,e,n,r,o-1)}))})).orThunk((function(){return A.some(r)}))}),A.none)}))},Cw=function(t,e){return t.situsFromPoint(e.left,e.bottom+lw)},Sw=function(t,e){return t.situsFromPoint(e.left,e.top-lw)},kw=function(t,e,n){return t.point(e)>n.getInnerHeight()?A.some(t.point(e)-n.getInnerHeight()):t.point(e)<0?A.some(-t.point(e)):A.none()},Tw=function(t,e,n){var r=t.move(n,lw),o=xw(e,t,n,r,fw).getOr(r);return kw(t,o,e).fold((function(){return e.situsFromPoint(o.left,t.point(o))}),(function(n){return e.scrollBy(0,n),e.situsFromPoint(o.left,t.point(o)-n)}))},Ow={tryUp:w(Tw,vw),tryDown:w(Tw,bw),ieTryUp:Sw,ieTryDown:Cw,getJumpSize:v(lw)},_w=20,Ew=function(t,e,n){return t.getSelection().bind((function(r){return Zy(e,r.finish,r.foffset,n).fold((function(){return A.some(ad(r.finish,r.foffset))}),(function(o){var i=t.fromSitus(o),a=Uy.verify(t,r.finish,r.foffset,i.finish,i.foffset,n.failure,e);return Qy(a)}))}))},Aw=function(t,e,n,r,o,i){return 0===i?A.none():Nw(t,e,n,r,o).bind((function(a){var u=t.fromSitus(a),c=Uy.verify(t,n,r,u.finish,u.foffset,o.failure,e);return Uy.cata(c,(function(){return A.none()}),(function(){return A.some(a)}),(function(a){return Ce(n,a)&&0===r?Dw(t,n,r,ew,o):Aw(t,e,a,0,o,i-1)}),(function(a){return Ce(n,a)&&r===ku(a)?Dw(t,n,r,tw,o):Aw(t,e,a,ku(a),o,i-1)}))}))},Dw=function(t,e,n,r,o){return cw(t,e,n).bind((function(e){return Mw(t,o,r(e,Ow.getJumpSize()))}))},Mw=function(t,e,n){var r=oe().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?e.otherRetry(t,n):r.isIE()?e.ieRetry(t,n):A.none()},Nw=function(t,e,n,r,o){return cw(t,n,r).bind((function(e){return Mw(t,o,e)}))},Rw=function(t,e,n){return Ew(t,e,n).bind((function(r){return Aw(t,e,r.element,r.offset,n,_w).map(t.fromSitus)}))},zw=function(t,e){return Iy(t,(function(t){return hn(t).exists((function(t){return Ce(t,e)}))}))},Bw=function(t,e,n,r,o){return Kn(r,"td,th",e).bind((function(r){return Kn(r,"table",e).bind((function(i){return zw(o,i)?Rw(t,e,n).bind((function(t){return Kn(t.finish,"td,th",e).map((function(e){return{start:r,finish:e,range:t}}))})):A.none()}))}))},Pw=function(t,e,n,r,o,i){return oe().browser.isIE()?A.none():i(r,e).orThunk((function(){return Bw(t,e,n,r,o).map((function(t){var e=t.range;return uy.create(A.some(fy(e.start,e.soffset,e.finish,e.foffset)),!0)}))}))},Iw=function(t,e){return Kn(t,"tr",e).bind((function(t){return Kn(t,"table",e).bind((function(n){var r=Hn(n,"tr");return Ce(t,r[0])?By(n,(function(t){return Au(t).isSome()}),e).map((function(t){var e=ku(t);return uy.create(A.some(fy(t,e,t,e)),!0)})):A.none()}))}))},Lw=function(t,e){return Kn(t,"tr",e).bind((function(t){return Kn(t,"table",e).bind((function(n){var r=Hn(n,"tr");return Ce(t,r[r.length-1])?Py(n,(function(t){return Eu(t).isSome()}),e).map((function(t){return uy.create(A.some(fy(t,0,t,0)),!0)})):A.none()}))}))},Hw=function(t,e,n,r,o,i,a){return Bw(t,n,r,o,i).bind((function(t){return my(e,n,t.start,t.finish,a)}))},Fw=function(t,e){return Kn(t,"td,th",e)},Vw=function(t,e,n,r){var o=bp(),i=o.clear,a=function(i){o.on((function(o){r.clearBeforeUpdate(e),Fw(i.target,n).each((function(a){ni(o,a,n).each((function(n){var o=n.boxes.getOr([]);if(1===o.length){var u=o[0],c="false"===Sl(u),s=rr(xl(i.target),u,Ce);c&&s&&(r.selectRange(e,o,u,u),t.selectContents(u))}else o.length>1&&(r.selectRange(e,o,n.start,n.finish),t.selectContents(a))}))}))}))},u=function(t){r.clear(e),Fw(t.target,n).each(o.set)},c=function(t){a(t)},s=function(t){a(t),i()};return{clearstate:i,mousedown:u,mouseover:c,mouseup:s}},jw={traverse:yn,gather:zy,relative:Fv.before,otherRetry:Ow.tryDown,ieRetry:Ow.ieTryDown,failure:Uy.failedDown},Uw={traverse:bn,gather:Ry,relative:Fv.before,otherRetry:Ow.tryUp,ieRetry:Ow.ieTryUp,failure:Uy.failedUp},Ww=function(t){return function(e){return e===t}},$w=Ww(38),qw=Ww(40),Gw=function(t){return t>=37&&t<=40},Kw={isBackward:Ww(37),isForward:Ww(39)},Xw={isBackward:Ww(39),isForward:Ww(37)},Yw=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Zi(n,r)},Jw=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollBy(t,e)},Zw=function(t){var e=function(e,n){return ve.fromPoint(ve.fromDom(t.document),e,n)},n=function(t){return t.dom.getBoundingClientRect()},r=function(e,n,r,o){var i=Xv.exact(e,n,r,o);return Yb(t,i)},o=function(){return Xb(t).map((function(e){return ly(t,e)}))},i=function(e){var n=Xv.relative(e.start,e.finish);return ly(t,n)},a=function(e,n){return Jb(t,e,n).map((function(t){return sy.create(t.start,t.soffset,t.finish,t.foffset)}))},u=function(){Zb(t)},c=function(e){void 0===e&&(e=!1),Xb(t).each((function(n){return n.fold((function(t){return t.collapse(e)}),(function(n,r){var o=e?n:r;Ub(t,o,o)}),(function(n,r,o,i){var a=e?n:o,u=e?r:i;jb(t,a,u,a,u)}))}))},s=function(e){Gb(t,e,!1)},l=function(e){Gb(t,e)},f=function(e){jb(t,e.start,e.soffset,e.finish,e.foffset)},d=function(e,n){Ub(t,e,n)},m=function(){return t.innerHeight},g=function(){var e=Yw(ve.fromDom(t.document));return e.top},h=function(e,n){Jw(e,n,ve.fromDom(t.document))};return{elementFromPoint:e,getRect:n,getRangedRect:r,getSelection:o,fromSitus:i,situsFromPoint:a,clearSelection:u,collapseSelection:c,setSelection:f,setRelativeSelection:d,selectNode:s,selectContents:l,getInnerHeight:m,getScrollY:g,scrollBy:h}},Qw=function(t,e){return{rows:t,cols:e}},tx=function(t,e,n,r){var o=Zw(t),i=Vw(o,e,n,r);return{clearstate:i.clearstate,mousedown:i.mousedown,mouseover:i.mouseover,mouseup:i.mouseup}},ex=function(t,e,n,r){var o=Zw(t),i=function(){return r.clear(e),A.none()},a=function(t,a,u,c,s,l){var f=t.raw,d=f.which,m=!0===f.shiftKey,g=ri(e,r.selectedSelector).fold((function(){return Gw(d)&&!m&&r.clearBeforeUpdate(e),qw(d)&&m?w(Hw,o,e,n,jw,c,a,r.selectRange):$w(d)&&m?w(Hw,o,e,n,Uw,c,a,r.selectRange):qw(d)?w(Pw,o,n,jw,c,a,Lw):$w(d)?w(Pw,o,n,Uw,c,a,Iw):A.none}),(function(t){var n=function(n){return function(){var i=rt(n,(function(n){return gy(n.rows,n.cols,e,t,r)}));return i.fold((function(){return ii(e,r.firstSelectedSelector,r.lastSelectedSelector).map((function(t){var n=qw(d)||l.isForward(d)?Fv.after:Fv.before;return o.setRelativeSelection(Fv.on(t.first,0),n(t.table)),r.clear(e),uy.create(A.none(),!0)}))}),(function(t){return A.some(uy.create(A.none(),!0))}))}};return qw(d)&&m?n([Qw(1,0)]):$w(d)&&m?n([Qw(-1,0)]):l.isBackward(d)&&m?n([Qw(0,-1),Qw(-1,0)]):l.isForward(d)&&m?n([Qw(0,1),Qw(1,0)]):Gw(d)&&!m?i:A.none}));return g()},u=function(t,o,i,a,u){return ri(e,r.selectedSelector).fold((function(){var c=t.raw,s=c.which,l=!0===c.shiftKey;return l&&Gw(s)?dy(e,n,o,i,a,u,r.selectRange):A.none()}),A.none)};return{keydown:a,keyup:u}},nx=function(t,e,n,r){var o=Zw(t);return function(t,i){r.clearBeforeUpdate(e),ni(t,i,n).each((function(t){var n=t.boxes.getOr([]);r.selectRange(e,n,t.start,t.finish),o.selectContents(i),o.collapseSelection()}))}},rx=function(t,e){L(e,(function(e){sl(t,e)}))},ox=function(t){return function(e){ul(e,t)}},ix=function(t){return function(e){rx(e,t)}},ax=function(t){var e=ox(t.selected),n=ix([t.selected,t.lastSelected,t.firstSelected]),r=function(e){var r=Hn(e,t.selectedSelector);L(r,n)},o=function(n,o,i,a){r(n),L(o,e),ul(i,t.firstSelected),ul(a,t.lastSelected)};return{clearBeforeUpdate:r,clear:r,selectRange:o,selectedSelector:t.selectedSelector,firstSelectedSelector:t.firstSelectedSelector,lastSelectedSelector:t.lastSelectedSelector}},ux=function(t,e,n){var r=function(e){er(e,t.selected),er(e,t.firstSelected),er(e,t.lastSelected)},o=function(e){Yn(e,t.selected,"1")},i=function(t){a(t),n()},a=function(e){var n=Hn(e,t.selectedSelector+","+t.firstSelectedSelector+","+t.lastSelectedSelector);L(n,r)},u=function(n,r,a,u){i(n),L(r,o),Yn(a,t.firstSelected,"1"),Yn(u,t.lastSelected,"1"),e(r,a,u)};return{clearBeforeUpdate:a,clear:i,selectRange:u,selectedSelector:t.selectedSelector,firstSelectedSelector:t.firstSelectedSelector,lastSelectedSelector:t.lastSelectedSelector}},cx={byClass:ax,byAttr:ux},sx=function(t,e){var n=t.slice(0,e[e.length-1].row+1),r=Vd(n);return K(r,(function(t){var n=t.cells.slice(0,e[e.length-1].column+1);return I(n,(function(t){return t.element}))}))},lx=function(t,e){var n=t.slice(e[0].row+e[0].rowspan-1,t.length),r=Vd(n);return K(r,(function(t){var n=t.cells.slice(e[0].column+e[0].colspan-1,t.cells.length);return I(n,(function(t){return t.element}))}))},fx=function(t,e,n){var r=so.fromTable(t),o=Xd(r,e);return o.map((function(t){var e=Hd(r,n,!1),o=sx(e,t),i=lx(e,t);return{upOrLeftCells:o,downOrRightCells:i}}))},dx=tinymce.util.Tools.resolve("tinymce.Env"),mx=function(t){return!1===ll(ve.fromDom(t.target),"ephox-snooker-resizer-bar")};function gx(t,e,n){var r=function(e,r,o){n.targets().each((function(n){var i=Nr(r);i.each((function(i){var a=Vf(t),u=Fu(g,ve.fromDom(t.getDoc()),a),c=fx(i,n,u);ef(t,e,r,o,c)}))}))},o=function(){return nf(t)},i=cx.byAttr(gc,r,o);return t.on("init",(function(n){var r=t.getWin(),o=$u(t),a=Ku(t),u=function(){var e=t.selection,n=ve.fromDom(e.getStart()),r=ve.fromDom(e.getEnd()),a=Qo(Nr,[n,r]);a.fold((function(){return i.clear(o)}),g)},c=tx(r,o,a,i),s=ex(r,o,a,i),l=nx(r,o,a,i),f=function(t){return!0===t.raw.shiftKey};t.on("TableSelectorChange",(function(t){return l(t.start,t.finish)}));var d=function(e,n){f(e)&&(n.kill&&e.kill(),n.selection.each((function(e){var n=Xv.relative(e.start,e.finish),o=lb(r,n);t.selection.setRng(o)})))},m=function(e){var n=Qs(e);if(n.raw.shiftKey&&Gw(n.raw.which)){var r=t.selection.getRng(),o=ve.fromDom(r.startContainer),i=ve.fromDom(r.endContainer);s.keyup(n,o,r.startOffset,i,r.endOffset).each((function(t){d(n,t)}))}},h=function(n){var r=Qs(n);e().each((function(t){return t.hideBars()}));var o=t.selection.getRng(),i=ve.fromDom(o.startContainer),a=ve.fromDom(o.endContainer),u=$i(Kw,Xw)(ve.fromDom(t.selection.getStart()));s.keydown(r,i,o.startOffset,a,o.endOffset,u).each((function(t){d(r,t)})),e().each((function(t){return t.showBars()}))},p=function(t){return 0===t.button},v=function(t){return void 0===t.buttons||(!(!dx.browser.isEdge()||0!==t.buttons)||0!==(1&t.buttons))},b=function(t){c.clearstate()},y=function(t){p(t)&&mx(t)&&c.mousedown(Qs(t))},w=function(t){v(t)&&mx(t)&&c.mouseover(Qs(t))},x=function(t){p(t)&&mx(t)&&c.mouseup(Qs(t))},C=function(){var t=hp(ve.fromDom(o)),e=hp(0),n=function(n){var r=ve.fromDom(n.target);if("td"===nn(r)||"th"===nn(r)){var o=t.get(),i=e.get();Ce(o,r)&&n.timeStamp-i<300&&(n.preventDefault(),l(r,r))}t.set(r),e.set(n.timeStamp)};return{touchEnd:n}},S=C();t.on("dragstart",b),t.on("mousedown",y),t.on("mouseover",w),t.on("mouseup",x),t.on("touchend",S.touchEnd),t.on("keyup",m),t.on("keydown",h),t.on("NodeChange",u)})),{clear:i.clear}}var hx=function(t,e){return qn(t,e).isSome()},px=function(t,e){var n=hp(A.none()),r=hp([]),o=A.none(),i=fn("caption"),a=function(t){return o.forall((function(e){return!e[t]}))},u=function(){return xc(ec(t),Ku(t))},c=function(){return xc(nc(t),Ku(t))},s=function(){return u().bind((function(t){return ur(ir(Nr(t),c().bind(Nr),(function(n,r){return Ce(n,r)?i(t)?A.some(hc(t)):A.some(pc(e,n,t)):A.none()})))}))},l=function(t){var e=Nr(t.element);return e.map((function(e){var n=so.fromTable(e),r=Xd(n,t).getOr([]),o=U(r,(function(t,e){return e.isLocked&&(t.onAny=!0,0===e.column?t.onFirst=!0:e.column+e.colspan>=n.grid.columns&&(t.onLast=!0)),t}),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Qd(n,t).isSome(),unmergeable:tm(n,t).isSome(),locked:o}}))},f=function(){n.set(at(s)()),o=n.get().bind(l),L(r.get(),(function(t){return t()}))},d=function(t){return t(),r.set(r.get().concat([t])),function(){r.set(V(r.get(),(function(e){return e!==t})))}},m=function(t,e){return d((function(){return n.get().fold((function(){t.setDisabled(!0)}),(function(n){t.setDisabled(e(n))}))}))},g=function(t,e,r){return d((function(){return n.get().fold((function(){t.setDisabled(!0),t.setActive(!1)}),(function(n){t.setDisabled(e(n)),t.setActive(r(n))}))}))},h=function(t){return o.exists((function(e){return e.locked[t]}))},p=function(t){return m(t,(function(t){return!1}))},v=function(t){return m(t,(function(t){return i(t.element)}))},b=function(t){return function(e){return m(e,(function(e){return i(e.element)||h(t)}))}},y=function(t){return function(e){return m(e,(function(e){return i(e.element)||t().isNone()}))}},w=function(t,e){return function(n){return m(n,(function(n){return i(n.element)||t().isNone()||h(e)}))}},x=function(t){return m(t,(function(t){return a("mergeable")}))},C=function(t){return m(t,(function(t){return a("unmergeable")}))},k=function(e){return g(e,S,(function(e){var n=Nr(e.element,Ku(t));return n.exists((function(t){return hx(t,"caption")}))}))},T=function(e,n){return function(r){return g(r,(function(t){return i(t.element)}),(function(){return t.queryCommandValue(e)===n}))}},O=T("mceTableRowType","header"),_=T("mceTableColType","th");return t.on("NodeChange ExecCommand TableSelectorChange",f),{onSetupTable:p,onSetupCellOrRow:v,onSetupColumn:b,onSetupPasteable:y,onSetupPasteableColumn:w,onSetupMergeable:x,onSetupUnmergeable:C,resetTargets:f,onSetupTableWithCaption:k,onSetupTableRowHeaders:O,onSetupTableColumnHeaders:_,targets:n.get}},vx=function(t,e,n,r){t.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(t){return t("inserttable | cell row column | advtablesort | tableprops deletetable")}});var o=function(e){return function(){return t.execCommand(e)}};t.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:o("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:o("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:o("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:o("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),t.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:o("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),t.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:o("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:o("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:o("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:o("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:o("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:o("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:o("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")}),t.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:o("mceInsertTable"),icon:"table"});var i=kp(Mf(t));0!==i.length&&t.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Tp(t,e,i,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)})),onSetup:n.onSetupTable});var a=kp(Af(t));0!==a.length&&t.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Tp(t,e,a,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)})),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Tp(t,e,tp,"tablecellverticalalign",Sp(t,"vertical-align")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Tp(t,e,vf(t),"tablecellborderwidth",Sp(t,"border-width")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Tp(t,e,bf(t),"tablecellborderstyle",Sp(t,"border-style")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablecaption",{tooltip:"Table caption",onAction:o("mceTableToggleCaption"),icon:"table-caption",onSetup:n.onSetupTableWithCaption}),t.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:function(e){return e(Op(t,Uf(t),"background-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:function(e){return e(Op(t,Wf(t),"border-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablerowheader",{tooltip:"Row header",icon:"table-top-header",onAction:_p(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleButton("tablecolheader",{tooltip:"Column header",icon:"table-left-header",onAction:Ep(t),onSetup:n.onSetupTableColumnHeaders})},bx=function(t){var e=function(e){return t.dom.is(e,"table")&&t.getBody().contains(e)},n=Bf(t);n.length>0&&t.ui.registry.addContextToolbar("table",{predicate:e,items:n,scope:"node",position:"node"})},yx=function(t,e,n,r){var o=function(e){return function(){return t.execCommand(e)}},i=function(e){t.execCommand("mceInsertTable",!1,{rows:e.numRows,columns:e.numColumns})},a={text:"Table properties",onSetup:n.onSetupTable,onAction:o("mceTableProps")},u={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:o("mceTableDelete")};t.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:o("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:o("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:o("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:o("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)});var c={type:"nestedmenuitem",text:"Row",getSubmenuItems:v("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")};t.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:o("mceTableInsertColBefore"),onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:o("mceTableInsertColAfter"),onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:o("mceTableDeleteCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")});var s={type:"nestedmenuitem",text:"Column",getSubmenuItems:v("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")};t.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:o("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:o("mceTableMergeCells"),onSetup:n.onSetupMergeable}),t.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:o("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});var l={type:"nestedmenuitem",text:"Cell",getSubmenuItems:v("tablecellprops tablemergecells tablesplitcells")};!1===_f(t)?t.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTable")}):t.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}]}}),t.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTable")}),t.ui.registry.addMenuItem("tableprops",a),t.ui.registry.addMenuItem("deletetable",u),t.ui.registry.addNestedMenuItem("row",c),t.ui.registry.addNestedMenuItem("column",s),t.ui.registry.addNestedMenuItem("cell",l),t.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(v(""),(function(t){return"caption"===nn(t.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"}))}});var f=kp(Mf(t));0!==f.length&&t.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:function(){return Cp(t,e,f,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)}))},onSetup:n.onSetupTable});var d=kp(Af(t));0!==d.length&&t.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:function(){return Cp(t,e,d,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)}))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:function(){return Cp(t,e,tp,"tablecellverticalalign",Sp(t,"vertical-align"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:function(){return Cp(t,e,vf(t),"tablecellborderwidth",Sp(t,"border-width"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:function(){return Cp(t,e,bf(t),"tablecellborderstyle",Sp(t,"border-style"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablecaption",{icon:"table-caption",text:"Table caption",onAction:o("mceTableToggleCaption"),onSetup:n.onSetupTableWithCaption}),t.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:function(){return Op(t,Uf(t),"background-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:function(){return Op(t,Wf(t),"border-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablerowheader",{text:"Row header",icon:"table-top-header",onAction:_p(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleMenuItem("tablecolheader",{text:"Column header",icon:"table-left-header",onAction:Ep(t),onSetup:n.onSetupTableColumnHeaders})},wx=function(t){var e=vi((function(){return $u(t)}),(function(){return Cc(ec(t),Ku(t))}),gc.selectedSelector),n=px(t,e),r=id(t),o=gx(t,r.lazyResize,n),i=Ch(t,o,r.lazyWire),a=wv();return bv(t,i,o,e,a),yv(t,i,e),Ec(t,e,i),yx(t,e,n,a),vx(t,e,n,a),bx(t),t.on("PreInit",(function(){t.serializer.addTempAttr(gc.firstSelected),t.serializer.addTempAttr(gc.lastSelected),kv(t)})),Cf(t)&&t.on("keydown",(function(e){iy(e,t,o)})),t.on("remove",(function(){r.destroy()})),jh(t,a,r,n)};function xx(){bi.add("table",wx)}xx()})()},"9dd9":function(t,e,n){(function(t){(function(){"use strict";var e=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},i=function(t){return function(e){return o(e)===t}},a=function(t){return function(e){return typeof e===t}},u=i("array"),c=function(t){return null===t||void 0===t},s=function(t){return!c(t)},l=a("function"),f=function(){},d=function(t){return function(){return t}},m=function(t){return t},g=d(!1),h=d(!0),p=function(){return v},v=function(){var t=function(t){return t()},e=m,n={fold:function(t,e){return t()},isSome:g,isNone:h,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:e,orThunk:t,map:p,each:f,bind:p,exists:g,forall:h,filter:function(){return p()},toArray:function(){return[]},toString:d("none()")};return n}(),b=function(t){var e=d(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:h,isNone:g,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return b(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:v},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},y=function(t){return null===t||void 0===t?v:b(t)},w={some:b,none:p,from:y},x={},C={exports:x};(function(e,n,r,o){(function(t,o){"object"===typeof n&&"undefined"!==typeof r?r.exports=o():"function"===typeof e&&e.amd?e(o):(t="undefined"!==typeof globalThis?globalThis:t||self,t.EphoxContactWrapper=o())})(this,(function(){var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},n={exports:{}};(function(t){(function(e){var n=setTimeout;function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function a(t,e){while(3===t._state)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}u(e.promise,r)}else(1===t._state?u:c)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===typeof e||"function"===typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"===typeof n)return void f(o(n,e),t)}t._state=1,t._value=e,s(t)}catch(r){c(t,r)}}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,u(e,t))}),(function(t){n||(n=!0,c(e,t))}))}catch(r){if(n)return;n=!0,c(e,r)}}i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return a(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"===typeof a||"function"===typeof a)){var u=a.then;if("function"===typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0===--r&&t(e)}catch(c){n(c)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},i.resolve=function(t){return t&&"object"===typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},i._immediateFn="function"===typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},t.exports?t.exports=i:e.Promise||(e.Promise=i)})(e)})(n);var r=n.exports,o=function(){return"undefined"!==typeof window?window:Function("return this;")()}(),i={boltExport:o.Promise||r};return i}))})(void 0,x,C);var S=C.exports.boltExport,k=function(t,e){return _(document.createElement("canvas"),t,e)},T=function(t){var e=k(t.width,t.height),n=O(e);return n.drawImage(t,0,0),e},O=function(t){return t.getContext("2d")},_=function(t,e,n){return t.width=e,t.height=n,t},E=function(t){return t.naturalWidth||t.width},A=function(t){return t.naturalHeight||t.height},D=function(t){var e=t.src;return 0===e.indexOf("data:")?z(e):N(e)},M=function(t){return new S((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)}))},N=function(t){return new S((function(e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(){200===this.status&&e(this.response)},r.onerror=function(){var t=this,e=function(){var t=new Error("No access to download image");return t.code=18,t.name="SecurityError",t},r=function(){return new Error("Error "+t.status+" downloading image")};n(0===this.status?e():r())},r.send()}))},R=function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return w.none();for(var r=n[1],o=e[1],i=1024,a=atob(o),u=a.length,c=Math.ceil(u/i),s=new Array(c),l=0;l<c;++l){for(var f=l*i,d=Math.min(f+i,u),m=new Array(d-f),g=f,h=0;g<d;++h,++g)m[h]=a[g].charCodeAt(0);s[l]=new Uint8Array(m)}return w.some(new Blob(s,{type:r}))},z=function(t){return new S((function(e,n){R(t).fold((function(){n("uri is not base64: "+t)}),e)}))},B=function(t,e,n){return e=e||"image/png",l(HTMLCanvasElement.prototype.toBlob)?new S((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):z(t.toDataURL(e,n))},P=function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)},I=function(t){return M(t).then((function(t){H(t);var e=k(E(t),A(t)),n=O(e);return n.drawImage(t,0,0),e}))},L=function(t){return new S((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))},H=function(t){URL.revokeObjectURL(t.src)},F=function(t){return M(t)},V=function(t){return D(t)},j=Array.prototype.indexOf,U=function(t,e){return j.call(t,e)},W=function(t,e){return U(t,e)>-1},$=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},q=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},G=function(t,e,n){return $(t,(function(t,r){n=e(n,t,r)})),n},K=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return w.some(i);if(n(i,r))break}return w.none()},X=function(t,e){return K(t,e,g)},Y=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},J=Object.keys,Z=function(t,e){for(var n=J(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},Q=function(t){if(!u(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return $(t,(function(r,o){var i=J(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],c=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(c))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+i);var u=function(t){var r=J(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=Y(e,(function(t){return W(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:u,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n},tt={generate:Q};tt.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var et=function(t,e,n){var r=e.type,o=d(r),i=function(){return S.resolve(e)},a=d(n),u=function(){return n.split(",")[1]},c=function(e,n){return t.then((function(t){return B(t,e,n)}))},s=function(e,n){return t.then((function(t){return P(t,e,n)}))},l=function(t,e){return s(t,e).then((function(t){return t.split(",")[1]}))},f=function(){return t.then(T)};return{getType:o,toBlob:i,toDataURL:a,toBase64:u,toAdjustedBlob:c,toAdjustedDataURL:s,toAdjustedBase64:l,toCanvas:f}},nt=function(t){return L(t).then((function(e){return et(I(t),t,e)}))},rt=function(t,e){return B(t,e).then((function(e){return et(S.resolve(t),e,t.toDataURL())}))},ot=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},it=function(t,e){return t.toCanvas().then((function(n){return at(n,t.getType(),e)}))},at=function(t,e,n){var r=n<0?360+n:n,o=r*Math.PI/180,i=t.width,a=t.height,u=Math.sin(o),c=Math.cos(o),s=ot(Math.abs(i*c)+Math.abs(a*u)),l=ot(Math.abs(i*u)+Math.abs(a*c)),f=k(s,l),d=O(f);return d.translate(s/2,l/2),d.rotate(o),d.drawImage(t,-i/2,-a/2),rt(f,e)},ut=function(t,e){return t.toCanvas().then((function(n){return ct(n,t.getType(),e)}))},ct=function(t,e,n){var r=k(t.width,t.height),o=O(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),rt(r,e)},st=function(t,e){return ut(t,e)},lt=function(t,e){return it(t,e)},ft=function(t,e,n){return void 0===n&&(n=!1),new S((function(r){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===o.readyState&&r({status:o.status,blob:o.response})},o.open("GET",t,!0),o.withCredentials=n,Z(e,(function(t,e){o.setRequestHeader(e,t)})),o.responseType="blob",o.send()}))},dt=function(t){return new S((function(e,n){var r=new FileReader;r.onload=function(){e(r.result)},r.onerror=function(t){n(t)},r.readAsText(t)}))},mt=function(t){try{return w.some(JSON.parse(t))}catch(e){return w.none()}},gt=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],ht=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],pt=function(t,e){var n=G(e,(function(t,e){return s(t)?t[e]:void 0}),t);return w.from(n)},vt=function(t,e){return"application/json"===(null===e||void 0===e?void 0:e.type)&&(400===t||403===t||404===t||500===t)},bt=function(t){var e=X(gt,(function(e){return t===e.code})).fold(d("Unknown ImageProxy error"),(function(t){return t.message}));return"ImageProxy HTTP error: "+e},yt=function(t){var e=bt(t);return S.reject(e)},wt=function(t){return X(ht,(function(e){return e.type===t})).fold(d("Unknown service error"),(function(t){return t.message}))},xt=function(t){var e=mt(t),n=e.bind((function(t){return pt(t,["error","type"]).map(wt)})).getOr("Invalid JSON in service error message");return"ImageProxy Service error: "+n},Ct=function(t){return dt(t).then((function(t){var e=xt(t);return S.reject(e)}))},St=function(t,e){return vt(t,e)?Ct(e):yt(t)},kt=function(t,e){var n=-1===t.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(t)?t:t+n+"apiKey="+encodeURIComponent(e)},Tt=function(t){return t<200||t>=300},Ot=function(t,e){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return ft(kt(t,e),n).then((function(t){return Tt(t.status)?St(t.status,t.blob):S.resolve(t.blob)}))},_t=function(t,e){return ft(t,{},e).then((function(t){return Tt(t.status)?yt(t.status):S.resolve(t.blob)}))},Et=function(t,e,n){return void 0===n&&(n=!1),e?Ot(t,e):_t(t,n)},At=function(t){return nt(t)},Dt=1,Mt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return zt(r.childNodes[0])},Nt=function(t,e){var n=e||document,r=n.createElement(t);return zt(r)},Rt=function(t,e){var n=e||document,r=n.createTextNode(t);return zt(r)},zt=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},Bt=function(t,e,n){return w.from(t.dom.elementFromPoint(e,n)).map(zt)},Pt={fromHtml:Mt,fromTag:Nt,fromText:Rt,fromDom:zt,fromPoint:Bt},It=function(t,e){var n=t.dom;if(n.nodeType!==Dt)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")};"undefined"!==typeof window?window:Function("return this;")();var Lt=function(t,e){var n=function(t){return e(Pt.fromDom(t))},r=X(t.dom.childNodes,n);return r.map(Pt.fromDom)},Ht=function(t,e){return Lt(t,(function(t){return It(t,e)}))},Ft=tinymce.util.Tools.resolve("tinymce.util.Delay"),Vt=tinymce.util.Tools.resolve("tinymce.util.Promise"),jt=tinymce.util.Tools.resolve("tinymce.util.URI"),Ut=function(t){return t.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")},Wt=function(t){return t.getParam("imagetools_proxy")},$t=function(t){return t.getParam("imagetools_cors_hosts",[],"string[]")},qt=function(t){return t.getParam("imagetools_credentials_hosts",[],"string[]")},Gt=function(t){return w.from(t.getParam("imagetools_fetch_image",null,"function"))},Kt=function(t){return t.getParam("api_key",t.getParam("imagetools_api_key","","string"),"string")},Xt=function(t){return t.getParam("images_upload_timeout",3e4,"number")},Yt=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},Jt=function(t){var e,n,r=function(t){return/^[0-9\.]+px$/.test(t)};return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)},Zt=function(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",String(e.w)),t.setAttribute("height",String(e.h))))},Qt=function(t){return{w:t.naturalWidth,h:t.naturalHeight}},te=0,ee=function(t){return Ht(Pt.fromDom(t),"img")},ne=function(t,e){return t.dom.is(e,"figure")},re=function(t,e){return t.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")},oe=function(t,e){var n=function(e){return re(t,e)&&(se(t,e)||le(t,e)||s(Wt(t)))};return ne(t,e)?ee(e).bind((function(t){return n(t.dom)?w.some(t.dom):w.none()})):n(e)?w.some(e):w.none()},ie=function(t,e){t.notificationManager.open({text:e,type:"error"})},ae=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return null!==n&&ne(t,n)?ee(n):re(t,e)?w.some(Pt.fromDom(e)):w.none()},ue=function(t,e,n){var r=e.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return s(r)?t.dom.encode(r[n]):null},ce=function(){return"imagetools"+te++},se=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new jt(n).host===t.documentBaseURI.host},le=function(t,e){return-1!==r.inArray($t(t),new jt(e.src).host)},fe=function(t,e){return-1!==r.inArray(qt(t),new jt(e.src).host)},de=function(t,e){if(le(t,e))return Et(e.src,null,fe(t,e));if(!se(t,e)){var n=Wt(t),r=n+(-1===n.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),o=Kt(t);return Et(r,o,!1)}return V(e)},me=function(t,e){return Gt(t).fold((function(){return de(t,e)}),(function(t){return t(e)}))},ge=function(t,e){var n=t.editorUpload.blobCache.getByUri(e.src);return n?Vt.resolve(n.blob()):me(t,e)},he=function(t,e){var n=Ft.setEditorTimeout(t,(function(){t.editorUpload.uploadImagesAuto()}),Xt(t));e.set(n)},pe=function(t){Ft.clearTimeout(t.get())},ve=function(t,e,n,r,o,i,a){return n.toBlob().then((function(u){var c,l,f,d,m=t.editorUpload.blobCache;c=i.src;var g=e.type===u.type;return Yt(t)&&(d=m.getByUri(c),s(d)?(c=d.uri(),l=d.name(),f=d.filename()):(l=ue(t,c,2),f=ue(t,c,1))),d=m.create({id:ce(),blob:u,base64:n.toBase64(),uri:c,name:l,filename:g?f:void 0}),m.add(d),t.undoManager.transact((function(){var e=function(){t.$(i).off("load",e),t.nodeChanged(),r?t.editorUpload.uploadImagesAuto():(pe(o),he(t,o))};t.$(i).on("load",e),a&&t.$(i).attr({width:a.w,height:a.h}),t.$(i).attr({src:d.blobUri()}).removeAttr("data-mce-src")})),d}))},be=function(t,e,n,r){return function(){var o=ae(t);return o.fold((function(){ie(t,"Could not find selected image")}),(function(o){return t._scanForImages().then((function(){return ge(t,o.dom)})).then((function(i){return At(i).then(n).then((function(n){return ve(t,i,n,!1,e,o.dom,r)}))})).catch((function(e){ie(t,e)}))}))}},ye=function(t,e,n){return function(){var r=ae(t),o=r.map((function(t){var e=Jt(t.dom);return e?{w:e.h,h:e.w}:null})).getOrNull();return be(t,e,(function(t){return lt(t,n)}),o)()}},we=function(t,e,n){return function(){return be(t,e,(function(t){return st(t,n)}))()}},xe=function(t,e,n,r,o){return F(o).then((function(t){var e=Qt(t);return r.w===e.w&&r.h===e.h||Jt(n)&&Zt(n,e),URL.revokeObjectURL(t.src),o})).then(At).then((function(r){return ve(t,o,r,!0,e,n)}))},Ce="save-state",Se="disable",ke="enable",Te=function(t){return{blob:t,url:URL.createObjectURL(t)}},Oe=function(t,e){return function(){var n=function(n){return{title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:n}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(n){var i=n.getData().imagetools.blob;r.each((function(n){o.each((function(r){xe(t,e,n.dom,r,i)}))})),n.close()},onCancel:f,onAction:function(t,e){switch(e.name){case Ce:e.value?t.enable("save"):t.disable("save");break;case Se:t.disable("save"),t.disable("cancel");break;case ke:t.enable("cancel");break}}}},r=ae(t),o=r.map((function(t){return Qt(t.dom)}));r.each((function(e){oe(t,e.dom).each((function(r){ge(t,e.dom).then((function(e){var r=Te(e);t.windowManager.open(n(r))}))}))}))}},_e=function(t,e){r.each({mceImageRotateLeft:ye(t,e,-90),mceImageRotateRight:ye(t,e,90),mceImageFlipVertical:we(t,e,"v"),mceImageFlipHorizontal:we(t,e,"h"),mceEditImage:Oe(t,e)},(function(e,n){t.addCommand(n,e)}))},Ee=function(t,e,n){t.on("NodeChange",(function(r){var o=n.get(),i=oe(t,r.element);o&&!i.exists((function(t){return o.src===t.src}))&&(pe(e),t.editorUpload.uploadImagesAuto(),n.set(null)),i.each(n.set)}))},Ae=function(t){var e=[],n=function(e){return function(){return t.execCommand(e)}},r=function(){return ae(t).exists((function(e){return oe(t,e.dom).isSome()}))},o=function(t){var n=function(e){return t.setDisabled(!e)};return n(r()),e=e.concat([n]),function(){e=q(e,(function(t){return t!==n}))}};t.on("NodeChange",(function(){var t=r();$(e,(function(e){return e(t)}))})),t.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft"),onSetup:o}),t.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight"),onSetup:o}),t.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical"),onSetup:o}),t.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal"),onSetup:o}),t.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:o}),t.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:n("mceImage")}),t.ui.registry.addContextMenu("imagetools",{update:function(e){return oe(t,e).map((function(t){return{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}})).toArray()}})},De=function(t){t.ui.registry.addContextToolbar("imagetools",{items:Ut(t),predicate:function(e){return oe(t,e).isSome()},position:"node",scope:"node"})};function Me(){n.add("imagetools",(function(t){var n=e(0),r=e(null);_e(t,n),Ae(t),De(t),Ee(t,n,r)}))}Me()})()}).call(this,n("c8ba"))},a376:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return t.getParam("insertdatetime_dateformat",t.translate("%Y-%m-%d"))},n=function(t){return t.getParam("insertdatetime_timeformat",t.translate("%H:%M:%S"))},r=function(t){return t.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},o=function(t){var e=r(t);return e.length>0?e[0]:n(t)},i=function(t){return t.getParam("insertdatetime_element",!1)},a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),u="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),l=function(t,e){if(t=""+t,t.length<e)for(var n=0;n<e-t.length;n++)t="0"+t;return t},f=function(t,e,n){return void 0===n&&(n=new Date),e=e.replace("%D","%m/%d/%Y"),e=e.replace("%r","%I:%M:%S %p"),e=e.replace("%Y",""+n.getFullYear()),e=e.replace("%y",""+n.getYear()),e=e.replace("%m",l(n.getMonth()+1,2)),e=e.replace("%d",l(n.getDate(),2)),e=e.replace("%H",""+l(n.getHours(),2)),e=e.replace("%M",""+l(n.getMinutes(),2)),e=e.replace("%S",""+l(n.getSeconds(),2)),e=e.replace("%I",""+((n.getHours()+11)%12+1)),e=e.replace("%p",n.getHours()<12?"AM":"PM"),e=e.replace("%B",""+t.translate(s[n.getMonth()])),e=e.replace("%b",""+t.translate(c[n.getMonth()])),e=e.replace("%A",""+t.translate(u[n.getDay()])),e=e.replace("%a",""+t.translate(a[n.getDay()])),e=e.replace("%%","%"),e},d=function(t,e,n,r){var o=t.dom.create("time",{datetime:n},r);e.parentNode.insertBefore(o,e),t.dom.remove(e),t.selection.select(o,!0),t.selection.collapse(!1)},m=function(t,e){if(i(t)){var n=f(t,e),r=void 0;r=/%[HMSIp]/.test(e)?f(t,"%Y-%m-%dT%H:%M"):f(t,"%Y-%m-%d");var o=t.dom.getParent(t.selection.getStart(),"time");o?d(t,o,r,n):t.insertContent('<time datetime="'+r+'">'+n+"</time>")}else t.insertContent(f(t,e))},g=function(t){t.addCommand("mceInsertDate",(function(n,r){m(t,null!==r&&void 0!==r?r:e(t))})),t.addCommand("mceInsertTime",(function(e,r){m(t,null!==r&&void 0!==r?r:n(t))}))},h=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},p=tinymce.util.Tools.resolve("tinymce.util.Tools"),v=function(t){var e=r(t),n=h(o(t)),i=function(e){return t.execCommand("mceInsertDate",!1,e)};t.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(t){return t===n.get()},fetch:function(n){n(p.map(e,(function(e){return{type:"choiceitem",text:f(t,e),value:e}})))},onAction:function(t){i(n.get())},onItemAction:function(t,e){n.set(e),i(e)}});var a=function(t){return function(){n.set(t),i(t)}};t.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return p.map(e,(function(e){return{type:"menuitem",text:f(t,e),onAction:a(e)}}))}})};function b(){t.add("insertdatetime",(function(t){g(t),v(t)}))}b()})()},a8b8:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(){},n=function(t){return function(){return t}},r=function(t){return t},o=n(!1),i=n(!0),a=function(){return u},u=function(){var t=function(t){return t()},u=r,c={fold:function(t,e){return t()},isSome:o,isNone:i,getOr:u,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:n(null),getOrUndefined:n(void 0),or:u,orThunk:t,map:a,each:e,bind:a,exists:o,forall:i,filter:function(){return a()},toArray:function(){return[]},toString:n("none()")};return c}(),c=function(t){var e=n(t),r=function(){return s},a=function(e){return e(t)},s={fold:function(e,n){return n(t)},isSome:i,isNone:o,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:r,orThunk:r,map:function(e){return c(e(t))},each:function(e){e(t)},bind:a,exists:a,forall:a,filter:function(e){return e(t)?s:u},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return s},s=function(t){return null===t||void 0===t?u:c(t)},l={some:c,none:a,from:s},f=function(t,e){return e>=0&&e<t.length?l.some(t[e]):l.none()},d=function(t){return f(t,0)},m=function(t,e){return t?l.some(e):l.none()},g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(t){return t&&"PRE"===t.nodeName&&-1!==t.className.indexOf("language-")},p=function(t){return function(e,n){return t(n)}},v="undefined"!==typeof window?window:Function("return this;")(),b={},y={exports:b},w={};(function(t,e,n,r){var o=window.Prism;window.Prism={manual:!0},function(r,o){"object"===typeof e&&"undefined"!==typeof n?n.exports=o():"function"===typeof t&&t.amd?t(o):(r="undefined"!==typeof globalThis?globalThis:r||self,r.EphoxContactWrapper=o())}(this,(function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof w?w:"undefined"!==typeof self?self:{},e={exports:{}};(function(e){var n="undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},r=function(t){var e=/\blang(?:uage)?-([\w-]+)\b/i,n=0,r={},o={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(e){return e instanceof i?new i(e.type,t(e.content),e.alias):Array.isArray(e)?e.map(t):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t["__id"]||Object.defineProperty(t,"__id",{value:++n}),t["__id"]},clone:function t(e,n){var r,i;switch(n=n||{},o.util.type(e)){case"Object":if(i=o.util.objId(e),n[i])return n[i];for(var a in r={},n[i]=r,e)e.hasOwnProperty(a)&&(r[a]=t(e[a],n));return r;case"Array":return i=o.util.objId(e),n[i]?n[i]:(r=[],n[i]=r,e.forEach((function(e,o){r[o]=t(e,n)})),r);default:return e}},getLanguage:function(t){while(t&&!e.test(t.className))t=t.parentElement;return t?(t.className.match(e)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"===typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(t){var e=document.getElementsByTagName("script");for(var n in e)if(e[n].src==t)return e[n]}return null}},isActive:function(t,e,n){var r="no-"+e;while(t){var o=t.classList;if(o.contains(e))return!0;if(o.contains(r))return!1;t=t.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(t,e){var n=o.util.clone(o.languages[t]);for(var r in e)n[r]=e[r];return n},insertBefore:function(t,e,n,r){r=r||o.languages;var i=r[t],a={};for(var u in i)if(i.hasOwnProperty(u)){if(u==e)for(var c in n)n.hasOwnProperty(c)&&(a[c]=n[c]);n.hasOwnProperty(u)||(a[u]=i[u])}var s=r[t];return r[t]=a,o.languages.DFS(o.languages,(function(e,n){n===s&&e!=t&&(this[e]=a)})),a},DFS:function t(e,n,r,i){i=i||{};var a=o.util.objId;for(var u in e)if(e.hasOwnProperty(u)){n.call(e,u,e[u],r||u);var c=e[u],s=o.util.type(c);"Object"!==s||i[a(c)]?"Array"!==s||i[a(c)]||(i[a(c)]=!0,t(c,n,u,i)):(i[a(c)]=!0,t(c,n,null,i))}}},plugins:{},highlightAll:function(t,e){o.highlightAllUnder(document,t,e)},highlightAllUnder:function(t,e,n){var r={callback:n,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===e,r.callback)},highlightElement:function(n,r,i){var a=o.util.getLanguage(n),u=o.languages[a];n.className=n.className.replace(e,"").replace(/\s+/g," ")+" language-"+a;var c=n.parentElement;c&&"pre"===c.nodeName.toLowerCase()&&(c.className=c.className.replace(e,"").replace(/\s+/g," ")+" language-"+a);var s=n.textContent,l={element:n,language:a,grammar:u,code:s};function f(t){l.highlightedCode=t,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),i&&i.call(l.element)}if(o.hooks.run("before-sanity-check",l),c=l.element.parentElement,c&&"pre"===c.nodeName.toLowerCase()&&!c.hasAttribute("tabindex")&&c.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(i&&i.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(r&&t.Worker){var d=new Worker(o.filename);d.onmessage=function(t){f(t.data)},d.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else f(o.highlight(l.code,l.grammar,l.language));else f(o.util.encode(l.code))},highlight:function(t,e,n){var r={code:t,grammar:e,language:n};return o.hooks.run("before-tokenize",r),r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(t,e){var n=e.rest;if(n){for(var r in n)e[r]=n[r];delete e.rest}var o=new c;return s(o,o.head,t),u(t,o,e,o.head,0),f(o)},hooks:{all:{},add:function(t,e){var n=o.hooks.all;n[t]=n[t]||[],n[t].push(e)},run:function(t,e){var n=o.hooks.all[t];if(n&&n.length)for(var r,i=0;r=n[i++];)r(e)}},Token:i};function i(t,e,n,r){this.type=t,this.content=e,this.alias=n,this.length=0|(r||"").length}function a(t,e,n,r){t.lastIndex=e;var o=t.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function u(t,e,n,r,c,f){for(var d in n)if(n.hasOwnProperty(d)&&n[d]){var m=n[d];m=Array.isArray(m)?m:[m];for(var g=0;g<m.length;++g){if(f&&f.cause==d+","+g)return;var h=m[g],p=h.inside,v=!!h.lookbehind,b=!!h.greedy,y=h.alias;if(b&&!h.pattern.global){var w=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,w+"g")}for(var x=h.pattern||h,C=r.next,S=c;C!==e.tail;S+=C.value.length,C=C.next){if(f&&S>=f.reach)break;var k=C.value;if(e.length>t.length)return;if(!(k instanceof i)){var T,O=1;if(b){if(T=a(x,S,t,v),!T)break;var _=T.index,E=T.index+T[0].length,A=S;A+=C.value.length;while(_>=A)C=C.next,A+=C.value.length;if(A-=C.value.length,S=A,C.value instanceof i)continue;for(var D=C;D!==e.tail&&(A<E||"string"===typeof D.value);D=D.next)O++,A+=D.value.length;O--,k=t.slice(S,A),T.index-=S}else if(T=a(x,0,k,v),!T)continue;_=T.index;var M=T[0],N=k.slice(0,_),R=k.slice(_+M.length),z=S+k.length;f&&z>f.reach&&(f.reach=z);var B=C.prev;N&&(B=s(e,B,N),S+=N.length),l(e,B,O);var P=new i(d,p?o.tokenize(M,p):M,y,M);if(C=s(e,B,P),R&&s(e,C,R),O>1){var I={cause:d+","+g,reach:z};u(t,e,n,C.prev,S,I),f&&I.reach>f.reach&&(f.reach=I.reach)}}}}}}function c(){var t={value:null,prev:null,next:null},e={value:null,prev:t,next:null};t.next=e,this.head=t,this.tail=e,this.length=0}function s(t,e,n){var r=e.next,o={value:n,prev:e,next:r};return e.next=o,r.prev=o,t.length++,o}function l(t,e,n){for(var r=e.next,o=0;o<n&&r!==t.tail;o++)r=r.next;e.next=r,r.prev=e,t.length-=o}function f(t){var e=[],n=t.head.next;while(n!==t.tail)e.push(n.value),n=n.next;return e}if(t.Prism=o,i.stringify=function t(e,n){if("string"==typeof e)return e;if(Array.isArray(e)){var r="";return e.forEach((function(e){r+=t(e,n)})),r}var i={type:e.type,content:t(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n},a=e.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var u="";for(var c in i.attributes)u+=" "+c+'="'+(i.attributes[c]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+u+">"+i.content+"</"+i.tag+">"},!t.document)return t.addEventListener?(o.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var n=JSON.parse(e.data),r=n.language,i=n.code,a=n.immediateClose;t.postMessage(o.highlight(i,o.languages[r],r)),a&&t.close()}),!1),o):o;var d=o.util.currentScript();function m(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var g=document.readyState;"loading"===g||"interactive"===g&&d&&d.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return o}(n);e.exports&&(e.exports=r),"undefined"!==typeof t&&(t.Prism=r)})(e),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(t){function e(t,e){return"___"+t.toUpperCase()+e+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,i){if(n.language===r){var a=n.tokenStack=[];n.code=n.code.replace(o,(function(t){if("function"===typeof i&&!i(t))return t;var o,u=a.length;while(-1!==n.code.indexOf(o=e(r,u)))++u;return a[u]=t,o})),n.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=t.languages[r];var o=0,i=Object.keys(n.tokenStack);a(n.tokens)}function a(u){for(var c=0;c<u.length;c++){if(o>=i.length)break;var s=u[c];if("string"===typeof s||s.content&&"string"===typeof s.content){var l=i[o],f=n.tokenStack[l],d="string"===typeof s?s:s.content,m=e(r,l),g=d.indexOf(m);if(g>-1){++o;var h=d.substring(0,g),p=new t.Token(r,t.tokenize(f,n.grammar),"language-"+r,f),v=d.substring(g+m.length),b=[];h&&b.push.apply(b,a([h])),b.push(p),v&&b.push.apply(b,a([v])),"string"===typeof s?u.splice.apply(u,[c,1].concat(b)):s.content=b}}else s.content&&a(s.content)}return u}}}})}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c["string"]],comment:Prism.languages.c["comment"],"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["boolean"],function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return e.source}));t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return e.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:module|import)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])}(Prism),function(t){function e(t,e){return t.replace(/<<(\d+)>>/g,(function(t,n){return"(?:"+e[+n]+")"}))}function n(t,n,r){return RegExp(e(t,n),r||"")}function r(t,e){for(var n=0;n<e;n++)t=t.replace(/<<self>>/g,(function(){return"(?:"+t+")"}));return t.replace(/<<self>>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function i(t){return"\\b(?:"+t.trim().replace(/ /g,"|")+")\\b"}var a=i(o.typeDeclaration),u=RegExp(i(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),c=i(o.typeDeclaration+" "+o.contextual+" "+o.other),s=i(o.type+" "+o.typeDeclaration+" "+o.other),l=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),f=r(/\((?:[^()]|<<self>>)*\)/.source,2),d=/@?\b[A-Za-z_]\w*\b/.source,m=e(/<<0>>(?:\s*<<1>>)?/.source,[d,l]),g=e(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[c,m]),h=/\[\s*(?:,\s*)*\]/.source,p=e(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,h]),v=e(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[l,f,h]),b=e(/\(<<0>>+(?:,<<0>>+)+\)/.source,[v]),y=e(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,g,h]),w={keyword:u,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,C=/"(?:\\.|[^\\"\r\n])*"/.source,S=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[d,y]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[d]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[a,m]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[d]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[p]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[y,s,d]),inside:w}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),t.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),t.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[d]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[d]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|typeof|sizeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[f]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[y,g]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[d,l]),inside:{function:n(/^<<0>>/.source,[d]),generic:{pattern:RegExp(l),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[a,m,d,y,u.source,f,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[m,f]),lookbehind:!0,greedy:!0,inside:t.languages.csharp},keyword:u,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var k=C+"|"+x,T=e(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[k]),O=r(e(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),_=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,E=e(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,O]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[_,E]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[_]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[O]),inside:t.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var A=/:[^}\r\n]+/.source,D=r(e(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),M=e(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[D,A]),N=r(e(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[k]),2),R=e(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,A]);function z(e,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[e]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,A]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:t.languages.csharp}}},string:/[\s\S]+/}}t.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[M]),lookbehind:!0,greedy:!0,inside:z(M,D)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:z(R,N)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp,function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css["atrule"].inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return e.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup["tag"].inside["attr-value"].inside["entity"]=Prism.languages.markup["entity"],Prism.languages.markup["doctype"].inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes["title"]=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,e){var n={};n["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},n["cdata"]=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(t){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},u=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];t.languages.insertBefore("php","variable",{string:u,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:u,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(e){if(/<\?/.test(e.code)){var n=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi;t.languages["markup-templating"].buildPlaceholders(e,"php",n)}})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"php")}))}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside["interpolation"].inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(t){t.languages.ruby=t.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var e={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:t.languages.ruby}};delete t.languages.ruby.function,t.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp(/%r/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:e}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:e}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:t.languages.ruby}}}),t.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),t.languages.ruby.string=[{pattern:RegExp(/%[qQiIwWxs]?/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"),greedy:!0,inside:{interpolation:e}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:e}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?/}},interpolation:e}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?'|'$/}}}}],t.languages.rb=t.languages.ruby}(Prism);var n=e.exports,r={boltExport:n};return r}));var i=window.Prism;window.Prism=o})(void 0,b,y);var x=y.exports.boltExport,C=function(t){return t.getParam("codesample_languages")},S=function(t){return t.getParam("codesample_global_prismjs",!1,"boolean")},k=function(t){return v.Prism&&S(t)?v.Prism:x},T=function(t){var e=t.selection?t.selection.getNode():null;return m(h(e),e)},O=function(t,e,n){t.undoManager.transact((function(){var r=T(t);return n=g.DOM.encode(n),r.fold((function(){t.insertContent('<pre id="__new" class="language-'+e+'">'+n+"</pre>"),t.selection.select(t.$("#__new").removeAttr("id")[0])}),(function(r){t.dom.setAttrib(r,"class","language-"+e),r.innerHTML=n,k(t).highlightElement(r),t.selection.select(r)}))}))},_=function(t){var e=T(t);return e.fold(n(""),(function(t){return t.textContent}))},E=function(t){var e=[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],n=C(t);return n||e},A=function(t,e){var n=T(t);return n.fold((function(){return e}),(function(t){var n=t.className.match(/language-(\w+)/);return n?n[1]:e}))},D=function(t){var e=E(t),r=d(e).fold(n(""),(function(t){return t.value})),o=A(t,r),i=_(t);t.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:e},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:o,code:i},onSubmit:function(e){var n=e.getData();O(t,n.language,n.code),e.close()}})},M=function(t){t.addCommand("codesample",(function(){var e=t.selection.getNode();t.selection.isCollapsed()||h(e)?D(t):t.formatter.toggle("code")}))},N=function(t){var e=t.$;t.on("PreProcess",(function(t){e("pre[contenteditable=false]",t.node).filter(p(h)).each((function(t,n){var r=e(n),o=n.textContent;r.attr("class",e.trim(r.attr("class"))),r.removeAttr("contentEditable"),r.empty().append(e("<code></code>").each((function(){this.textContent=o})))}))})),t.on("SetContent",(function(){var n=e("pre").filter(p(h)).filter((function(t,e){return"false"!==e.contentEditable}));n.length&&t.undoManager.transact((function(){n.each((function(n,r){e(r).find("br").each((function(e,n){n.parentNode.replaceChild(t.getDoc().createTextNode("\n"),n)})),r.contentEditable="false",r.innerHTML=t.dom.encode(r.textContent),k(t).highlightElement(r),r.className=e.trim(r.className)}))}))}))},R=function(t){var e=t.selection.getStart();return t.dom.is(e,'pre[class*="language-"]')},z=function(t){var e=function(){return t.execCommand("codesample")};t.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:e,onSetup:function(e){var n=function(){e.setActive(R(t))};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}),t.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:e})};function B(){t.add("codesample",(function(t){N(t),z(t),M(t),t.on("dblclick",(function(e){h(e.target)&&D(t)}))}))}B()})()},ae68:function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=Object.hasOwnProperty,n=function(t,n){return e.call(t,n)},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),i=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=function(t){return t.fire("ResizeEditor")},u=function(t){return t.getParam("min_height",t.getElement().offsetHeight,"number")},c=function(t){return t.getParam("max_height",0,"number")},s=function(t){return t.getParam("autoresize_overflow_padding",1,"number")},l=function(t){return t.getParam("autoresize_bottom_margin",50,"number")},f=function(t){return t.getParam("autoresize_on_init",!0,"boolean")},d=function(t){return t.plugins.fullscreen&&t.plugins.fullscreen.isFullscreen()},m=function(t,e,n,r,o){i.setEditorTimeout(t,(function(){v(t,e),n--?m(t,e,n,r,o):o&&o()}),r)},g=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},h=function(t,e,n,r){var o=parseInt(t.getStyle(e,n,r),10);return isNaN(o)?0:o},p=function(t){if("setcontent"===(null===t||void 0===t?void 0:t.type.toLowerCase())){var e=t;return!0===e.selection||!0===e.paste}return!1},v=function(t,e,n){var r=t.dom,i=t.getDoc();if(i)if(d(t))g(t,!0);else{var s=i.documentElement,f=l(t),m=u(t),b=h(r,s,"margin-top",!0),y=h(r,s,"margin-bottom",!0),w=s.offsetHeight+b+y+f;w<0&&(w=0);var x=t.getContainer().offsetHeight,C=t.getContentAreaContainer().offsetHeight,S=x-C;w+S>u(t)&&(m=w+S);var k=c(t);if(k&&m>k?(m=k,g(t,!0)):g(t,!1),m!==e.get()){var T=m-e.get();if(r.setStyle(t.getContainer(),"height",m+"px"),e.set(m),a(t),o.browser.isSafari()&&o.mac){var O=t.getWin();O.scrollTo(O.pageXOffset,O.pageYOffset)}t.hasFocus()&&p(n)&&t.selection.scrollIntoView(),o.webkit&&T<0&&v(t,e,n)}}},b=function(t,e){t.on("init",(function(){var e=s(t),n=t.dom;n.setStyles(t.getDoc().documentElement,{height:"auto"}),n.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})})),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(function(n){v(t,e,n)})),f(t)&&t.on("init",(function(){m(t,e,20,100,(function(){m(t,e,5,1e3)}))}))},y=function(t,e){t.addCommand("mceAutoResize",(function(){v(t,e)}))};function w(){r.add("autoresize",(function(e){if(n(e.settings,"resize")||(e.settings.resize=!1),!e.inline){var r=t(0);y(e,r),b(e,r)}}))}w()})()},bc54:function(t,e,n){n("7c4f")},be7f:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.VK"),n=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return function(e){return n(e)===t}},o=function(t){return function(e){return typeof e===t}},i=function(t){return function(e){return t===e}},a=r("string"),u=r("array"),c=i(null),s=o("boolean"),l=o("function"),f=function(){},d=function(t){return function(){return t}},m=function(t){return t},g=function(t,e){return t===e},h=d(!1),p=d(!0),v=function(){return b},b=function(){var t=function(t){return t()},e=m,n={fold:function(t,e){return t()},isSome:h,isNone:p,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:e,orThunk:t,map:v,each:f,bind:v,exists:h,forall:p,filter:function(){return v()},toArray:function(){return[]},toString:d("none()")};return n}(),y=function(t){var e=d(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:h,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return y(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:b},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},w=function(t){return null===t||void 0===t?b:y(t)},x={some:y,none:v,from:w},C=Array.prototype.indexOf,S=Array.prototype.push,k=function(t,e){return C.call(t,e)},T=function(t,e){return k(t,e)>-1},O=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},_=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},E=function(t,e,n){return _(t,(function(t,r){n=e(n,t,r)})),n},A=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);S.apply(e,t[n])}return e},D=function(t,e){return A(O(t,e))},M=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return x.none()},N=function(t,e,n){return void 0===n&&(n=g),t.exists((function(t){return n(t,e)}))},R=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},z=function(t,e){return t?x.some(e):x.none()},B=function(t){var e=t.getParam("link_assume_external_targets",!1);return s(e)&&e?1:!a(e)||"http"!==e&&"https"!==e?0:e},P=function(t){return t.getParam("link_context_toolbar",!1,"boolean")},I=function(t){return t.getParam("link_list")},L=function(t){return t.getParam("default_link_target")},H=function(t){return t.getParam("target_list",!0)},F=function(t){return t.getParam("rel_list",[],"array")},V=function(t){return t.getParam("link_class_list",[],"array")},j=function(t){return t.getParam("link_title",!0,"boolean")},U=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},W=function(t){return t.getParam("link_quicklink",!1,"boolean")},$=function(t){return t.getParam("link_default_protocol","http","string")},q=tinymce.util.Tools.resolve("tinymce.util.Tools"),G=function(t){return a(t.value)?t.value:""},K=function(t){return a(t.text)?t.text:a(t.title)?t.title:""},X=function(t,e){var n=[];return q.each(t,(function(t){var r=K(t);if(void 0!==t.menu){var o=X(t.menu,e);n.push({text:r,items:o})}else{var i=e(t);n.push({text:r,value:i})}})),n},Y=function(t){return void 0===t&&(t=G),function(e){return x.from(e).map((function(e){return X(e,t)}))}},J=function(t){return Y(G)(t)},Z=function(t,e){return function(n){return{name:t,type:"listbox",label:e,items:n}}},Q={sanitize:J,sanitizeWith:Y,createUi:Z,getValue:G},tt=function(){return tt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},tt.apply(this,arguments)},et=Object.keys,nt=Object.hasOwnProperty,rt=function(t,e){for(var n=et(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},ot=function(t){return function(e,n){t[n]=e}},it=function(t,e,n,r){var o={};return rt(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},at=function(t,e){var n={};return it(t,e,ot(n),f),n},ut=function(t,e){return nt.call(t,e)},ct=function(t,e){return ut(t,e)&&void 0!==t[e]&&null!==t[e]},st=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),lt=tinymce.util.Tools.resolve("tinymce.util.URI"),ft=function(t){return t&&"a"===t.nodeName.toLowerCase()},dt=function(t){return ft(t)&&!!ht(t)},mt=function(t,e){if(t.collapsed)return[];var n=t.cloneContents(),r=new st(n.firstChild,n),o=[],i=n.firstChild;do{e(i)&&o.push(i)}while(i=r.next());return o},gt=function(t){return/^\w+:/i.test(t)},ht=function(t){var e=t.getAttribute("data-mce-href");return e||t.getAttribute("href")},pt=function(t,e){var n=["noopener"],r=t?t.split(/\s+/):[],o=function(t){return q.trim(t.sort().join(" "))},i=function(t){return t=a(t),t.length>0?t.concat(n):n},a=function(t){return t.filter((function(t){return-1===q.inArray(n,t)}))},u=e?i(r):a(r);return u.length>0?o(u):""},vt=function(t){return t.replace(/\uFEFF/g,"")},bt=function(t,e){return e=e||t.selection.getNode(),St(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},yt=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return vt(n)},wt=function(t){return q.grep(t,dt).length>0},xt=function(t){return mt(t,dt).length>0},Ct=function(t){var e=t.schema.getTextInlineElements(),n=function(t){return 1===t.nodeType&&!ft(t)&&!ut(e,t.nodeName.toLowerCase())},r=mt(t.selection.getRng(),n);return 0===r.length},St=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},kt=function(t){var e=["title","rel","class","target"];return E(e,(function(e,n){return t[n].each((function(t){e[n]=t.length>0?t:null})),e}),{href:t.href})},Tt=function(t,e){return"http"!==e&&"https"!==e||gt(t)?t:e+"://"+t},Ot=function(t,e){var n=tt({},e);if(!(F(t).length>0)&&!1===U(t)){var r=pt(n.rel,"_blank"===n.target);n.rel=r||null}return x.from(n.target).isNone()&&!1===H(t)&&(n.target=L(t)),n.href=Tt(n.href,B(t)),n},_t=function(t,e,n,r){n.each((function(t){ut(e,"innerText")?e.innerText=t:e.textContent=t})),t.dom.setAttribs(e,r),t.selection.select(e)},Et=function(t,e,n,r){St(e)?It(t,e,r):n.fold((function(){t.execCommand("mceInsertLink",!1,r)}),(function(e){t.insertContent(t.dom.createHTML("a",r,t.dom.encode(e)))}))},At=function(t,e,n){var r=t.selection.getNode(),o=bt(t,r),i=Ot(t,kt(n));t.undoManager.transact((function(){n.href===e.href&&e.attach(),o?(t.focus(),_t(t,o,n.text,i)):Et(t,r,n.text,i)}))},Dt=function(t){var e=t.dom,n=t.selection,r=n.getBookmark(),o=n.getRng().cloneRange(),i=e.getParent(o.startContainer,"a[href]",t.getBody()),a=e.getParent(o.endContainer,"a[href]",t.getBody());i&&o.setStartBefore(i),a&&o.setEndAfter(a),n.setRng(o),t.execCommand("unlink"),n.moveToBookmark(r)},Mt=function(t){t.undoManager.transact((function(){var e=t.selection.getNode();St(e)?Pt(t,e):Dt(t),t.focus()}))},Nt=function(t){var e=t.class,n=t.href,r=t.rel,o=t.target,i=t.text,a=t.title;return at({class:e.getOrNull(),href:n,rel:r.getOrNull(),target:o.getOrNull(),text:i.getOrNull(),title:a.getOrNull()},(function(t,e){return!1===c(t)}))},Rt=function(t,e){var n=e.href;return tt(tt({},e),{href:lt.isDomSafe(n,"a",t.settings)?n:""})},zt=function(t,e,n){var r=Rt(t,n);t.hasPlugin("rtc",!0)?t.execCommand("createlink",!1,Nt(r)):At(t,e,r)},Bt=function(t){t.hasPlugin("rtc",!0)?t.execCommand("unlink"):Mt(t)},Pt=function(t,e){var n=t.dom.select("img",e)[0];if(n){var r=t.dom.getParents(n,"a[href]",e)[0];r&&(r.parentNode.insertBefore(n,r),t.dom.remove(r))}},It=function(t,e,n){var r=t.dom.select("img",e)[0];if(r){var o=t.dom.create("a",n);r.parentNode.insertBefore(o,r),o.appendChild(r)}},Lt=function(t){return ct(t,"items")},Ht=function(t,e){return M(e,(function(e){return Lt(e)?Ht(t,e.items):z(e.value===t,e)}))},Ft=function(t,e,n,r){var o=r[e],i=t.length>0;return void 0!==o?Ht(o,n).map((function(e){return{url:{value:e.value,meta:{text:i?t:e.text,attach:f}},text:i?t:e.text}})):x.none()},Vt=function(t,e){return"link"===e?t.link:"anchor"===e?t.anchor:x.none()},jt=function(t,e){var n={text:t.text,title:t.title},r=function(t){return z(n.title.length<=0,x.from(t.meta.title).getOr(""))},o=function(t){return z(n.text.length<=0,x.from(t.meta.text).getOr(t.value))},i=function(t){var e=o(t.url),n=r(t.url);return e.isSome()||n.isSome()?x.some(tt(tt({},e.map((function(t){return{text:t}})).getOr({})),n.map((function(t){return{title:t}})).getOr({}))):x.none()},a=function(t,r){var o=Vt(e,r.name).getOr([]);return Ft(n.text,r.name,o,t)},u=function(t,e){var r=e.name;return"url"===r?i(t()):T(["anchor","link"],r)?a(t(),e):"text"===r||"title"===r?(n[r]=t()[r],x.none()):x.none()};return{onChange:u}},Ut={init:jt,getDelta:Ft},Wt=tinymce.util.Tools.resolve("tinymce.util.Delay"),$t=tinymce.util.Tools.resolve("tinymce.util.Promise"),qt=function(t,e,n){var r=t.selection.getRng();Wt.setEditorTimeout(t,(function(){t.windowManager.confirm(e,(function(e){t.selection.setRng(r),n(e)}))}))},Gt=function(t){var e=t.href,n=e.indexOf("@")>0&&-1===e.indexOf("/")&&-1===e.indexOf("mailto:");return n?x.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return tt(tt({},t),{href:"mailto:"+e})}}):x.none()},Kt=function(t,e){return function(n){var r=n.href,o=1===t&&!gt(r)||0===t&&/^\s*www(\.|\d\.)/i.test(r);return o?x.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+e+":// prefix?",preprocess:function(t){return tt(tt({},t),{href:e+"://"+r})}}):x.none()}},Xt=function(t,e){return M([Gt,Kt(B(t),$(t))],(function(t){return t(e)})).fold((function(){return $t.resolve(e)}),(function(n){return new $t((function(r){qt(t,n.message,(function(t){r(t?n.preprocess(e):e)}))}))}))},Yt={preprocess:Xt},Jt=function(t){var e=t.dom.select("a:not([href])"),n=D(e,(function(t){var e=t.name||t.id;return e?[{text:e,value:"#"+e}]:[]}));return n.length>0?x.some([{text:"None",value:""}].concat(n)):x.none()},Zt={getAnchors:Jt},Qt=function(t){var e=V(t);return e.length>0?Q.sanitize(e):x.none()},te={getClasses:Qt},ee=tinymce.util.Tools.resolve("tinymce.util.XHR"),ne=function(t){try{return x.some(JSON.parse(t))}catch(e){return x.none()}},re=function(t){var e=function(e){return t.convertURL(e.value||e.url,"href")},n=I(t);return new $t((function(t){a(n)?ee.send({url:n,success:function(e){return t(ne(e))},error:function(e){return t(x.none())}}):l(n)?n((function(e){return t(x.some(e))})):t(x.from(n))})).then((function(t){return t.bind(Q.sanitizeWith(e)).map((function(t){if(t.length>0){var e=[{text:"None",value:""}];return e.concat(t)}return t}))}))},oe={getLinks:re},ie=function(t,e){var n=F(t);if(n.length>0){var r=N(e,"_blank"),o=!1===U(t),i=function(t){return pt(Q.getValue(t),r)},a=o?Q.sanitizeWith(i):Q.sanitize;return a(n)}return x.none()},ae={getRels:ie},ue=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],ce=function(t){var e=H(t);return u(e)?Q.sanitize(e).orThunk((function(){return x.some(ue)})):!1===e?x.none():x.some(ue)},se={getTargets:ce},le=function(t,e,n){var r=t.getAttrib(e,n);return null!==r&&r.length>0?x.some(r):x.none()},fe=function(t,e){var n=t.dom,r=Ct(t),o=r?x.some(yt(t.selection,e)):x.none(),i=e?x.some(n.getAttrib(e,"href")):x.none(),a=e?x.from(n.getAttrib(e,"target")):x.none(),u=le(n,e,"rel"),c=le(n,e,"class"),s=le(n,e,"title");return{url:i,text:o,title:s,target:a,rel:u,linkClass:c}},de=function(t,e){return oe.getLinks(t).then((function(n){var r=fe(t,e);return{anchor:r,catalogs:{targets:se.getTargets(t),rels:ae.getRels(t,r.target),classes:te.getClasses(t),anchor:Zt.getAnchors(t),link:n},optNode:x.from(e),flags:{titleEnabled:j(t)}}}))},me={collect:de},ge=function(t,e){return function(n){var r=n.getData();if(!r.url.value)return Bt(t),void n.close();var o=function(t){return x.from(r[t]).filter((function(n){return!N(e.anchor[t],n)}))},i={href:r.url.value,text:o("text"),target:o("target"),rel:o("rel"),class:o("linkClass"),title:o("title")},a={href:r.url.value,attach:void 0!==r.url.meta&&r.url.meta.attach?r.url.meta.attach:f};Yt.preprocess(t,i).then((function(e){zt(t,a,e)})),n.close()}},he=function(t){var e=bt(t);return me.collect(t,e)},pe=function(t,e){var n=t.anchor,r=n.url.getOr("");return{url:{value:r,meta:{original:{value:r}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:r,link:r,rel:n.rel.getOr(""),target:n.target.or(e).getOr(""),linkClass:n.linkClass.getOr("")}},ve=function(t,e,n){var r=[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],o=t.anchor.text.map((function(){return{name:"text",type:"input",label:"Text to display"}})).toArray(),i=t.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],a=x.from(L(n)),u=pe(t,a),c=t.catalogs,s=Ut.init(u,c),l={type:"panel",items:A([r,o,i,R([c.anchor.map(Q.createUi("anchor","Anchors")),c.rels.map(Q.createUi("rel","Rel")),c.targets.map(Q.createUi("target","Open link in...")),c.link.map(Q.createUi("link","Link list")),c.classes.map(Q.createUi("linkClass","Class"))])])};return{title:"Insert/Edit Link",size:"normal",body:l,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onChange:function(t,e){var n=e.name;s.onChange(t.getData,{name:n}).each((function(e){t.setData(e)}))},onSubmit:e}},be=function(t){var e=he(t);e.then((function(e){var n=ge(t,e);return ve(e,n,t)})).then((function(e){t.windowManager.open(e)}))},ye=function(t,e){document.body.appendChild(t),t.dispatchEvent(e),document.body.removeChild(t)},we=function(t){var e=document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ye(e,n)},xe=function(t,e){return t.dom.getParent(e,"a[href]")},Ce=function(t){return xe(t,t.selection.getStart())},Se=function(t){return!0===t.altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey},ke=function(t,e){if(e){var n=ht(e);if(/^#/.test(n)){var r=t.$(n);r.length&&t.selection.scrollIntoView(r[0],!0)}else we(e.href)}},Te=function(t){return function(){be(t)}},Oe=function(t){return function(){ke(t,Ce(t))}},_e=function(t){t.on("click",(function(n){var r=xe(t,n.target);r&&e.metaKeyPressed(n)&&(n.preventDefault(),ke(t,r))})),t.on("keydown",(function(e){var n=Ce(t);n&&13===e.keyCode&&Se(e)&&(e.preventDefault(),ke(t,n))}))},Ee=function(t,e){return t.on("NodeChange",e),function(){return t.off("NodeChange",e)}},Ae=function(t){return function(e){var n=function(){return e.setActive(!t.mode.isReadOnly()&&null!==bt(t,t.selection.getNode()))};return n(),Ee(t,n)}},De=function(t){return function(e){var n=function(){return e.setDisabled(null===bt(t,t.selection.getNode()))};return n(),Ee(t,n)}},Me=function(t){return function(e){var n=function(e){return wt(e)||xt(t.selection.getRng())},r=t.dom.getParents(t.selection.getStart());return e.setDisabled(!n(r)),Ee(t,(function(t){return e.setDisabled(!n(t.parents))}))}},Ne=function(t){t.addCommand("mceLink",(function(){W(t)?t.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Te(t)()}))},Re=function(t){t.addShortcut("Meta+K","",(function(){t.execCommand("mceLink")}))},ze=function(t){t.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Te(t),onSetup:Ae(t)}),t.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Oe(t),onSetup:De(t)}),t.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return Bt(t)},onSetup:Me(t)})},Be=function(t){t.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Oe(t),onSetup:De(t)}),t.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Te(t)}),t.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return Bt(t)},onSetup:Me(t)})},Pe=function(t){var e="link unlink openlink",n="link";t.ui.registry.addContextMenu("link",{update:function(r){return wt(t.dom.getParents(r,"a"))?e:n}})},Ie=function(t){var e=function(t){t.selection.collapse(!1)},n=function(e){var n=t.selection.getNode();return e.setDisabled(!bt(t,n)),f},r=function(e){var n=bt(t),r=Ct(t);if(!n&&r){var o=yt(t.selection,n);return x.some(o.length>0?o:e)}return x.none()};t.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ae(t)},label:"Link",predicate:function(e){return!!bt(t,e)&&P(t)},initValue:function(){var e=bt(t);return e?ht(e):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(e){var n=t.selection.getNode();return e.setActive(!!bt(t,n)),Ae(t)(e)},onAction:function(n){var o=n.getValue(),i=r(o),a={href:o,attach:f};zt(t,a,{href:o,text:i,title:x.none(),rel:x.none(),target:x.none(),class:x.none()}),e(t),n.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:n,onAction:function(e){Bt(t),e.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:n,onAction:function(e){Oe(t)(),e.hide()}}]})};function Le(){t.add("link",(function(t){ze(t),Be(t),Pe(t),Ie(t),_e(t),Ne(t),Re(t)}))}Le()})()},c361:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=t.getParam("nonbreaking_force_tab",0);return"boolean"===typeof e?!0===e?3:0:e},n=function(t){return t.getParam("nonbreaking_wrap",!0,"boolean")},r=function(t,e){for(var n="",r=0;r<e;r++)n+=t;return n},o=function(t){return!!t.plugins.visualchars&&t.plugins.visualchars.isEnabled()},i=function(t,e){var i=function(){return o(t)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"},a=function(){return'<span class="'+i()+'" contenteditable="false">'+r("&nbsp;",e)+"</span>"},u=n(t),c=u||t.plugins.visualchars?a():r("&nbsp;",e);t.undoManager.transact((function(){return t.insertContent(c)}))},a=function(t){t.addCommand("mceNonBreaking",(function(){i(t,1)}))},u=tinymce.util.Tools.resolve("tinymce.util.VK"),c=function(t){var n=e(t);n>0&&t.on("keydown",(function(e){if(e.keyCode===u.TAB&&!e.isDefaultPrevented()){if(e.shiftKey)return;e.preventDefault(),e.stopImmediatePropagation(),i(t,n)}}))},s=function(t){var e=function(){return t.execCommand("mceNonBreaking")};t.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:e}),t.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:e})};function l(){t.add("nonbreaking",(function(t){a(t),s(t),c(t)}))}l()})()},c3d7:function(t,e,n){n("16f1")},c4a9:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r=function(){return"undefined"!==typeof window?window:t},o=function(){var t=r();return t&&t.tinymce?t.tinymce:null}}).call(this,n("c8ba"))},ca72:function(t,e,n){"use strict";var r=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],o=function(t){return-1!==r.map((function(t){return t.toLowerCase()})).indexOf(t.toLowerCase())},i=function(t,e,n){Object.keys(e).filter(o).forEach((function(r){var o=e[r];"function"===typeof o&&("onInit"===r?o(t,n):n.on(r.substring(2),(function(t){return o(t,n)})))}))},a=function(t,e){var n=t.$props.modelEvents?t.$props.modelEvents:null,r=Array.isArray(n)?n.join(" "):n;e.on(r||"change input undo redo",(function(){t.$emit("input",e.getContent({format:t.$props.outputFormat}))}))},u=function(t,e,n){var r=e.$props.value?e.$props.value:"",o=e.$props.initialValue?e.$props.initialValue:"";n.setContent(r||(e.initialized?e.cache:o)),e.$watch("value",(function(t,r){n&&"string"===typeof t&&t!==r&&t!==n.getContent({format:e.$props.outputFormat})&&n.setContent(t)})),e.$listeners.input&&a(e,n),i(t,e.$listeners,n),e.initialized=!0},c=0,s=function(t){var e=Date.now(),n=Math.floor(1e9*Math.random());return c++,t+"_"+n+c+String(e)},l=function(t){return null!==t&&"textarea"===t.tagName.toLowerCase()},f=function(t){return"undefined"===typeof t||""===t?[]:Array.isArray(t)?t:t.split(" ")},d=function(t,e){return f(t).concat(f(e))},m=function(t){return null===t||void 0===t},g=function(){return{listeners:[],scriptId:s("tiny-script"),scriptLoaded:!1}},h=function(){var t=g(),e=function(t,e,n,r){var o=e.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.id=t,o.src=n;var i=function(){o.removeEventListener("load",i),r()};o.addEventListener("load",i),e.head&&e.head.appendChild(o)},n=function(n,r,o){t.scriptLoaded?o():(t.listeners.push(o),n.getElementById(t.scriptId)||e(t.scriptId,n,r,(function(){t.listeners.forEach((function(t){return t()})),t.scriptLoaded=!0})))},r=function(){t=g()};return{load:n,reinitialize:r}},p=h(),v=n("c4a9"),b={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],value:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(t){return"html"===t||"text"===t}}},y=function(){return y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},y.apply(this,arguments)},w=function(t,e,n){return t(n||"div",{attrs:{id:e}})},x=function(t,e){return t("textarea",{attrs:{id:e},style:{visibility:"hidden"}})},C=function(t){return function(){var e=y(y({},t.$props.init),{readonly:t.$props.disabled,selector:"#"+t.elementId,plugins:d(t.$props.init&&t.$props.init.plugins,t.$props.plugins),toolbar:t.$props.toolbar||t.$props.init&&t.$props.init.toolbar,inline:t.inlineEditor,setup:function(e){t.editor=e,e.on("init",(function(n){return u(n,t,e)})),t.$props.init&&"function"===typeof t.$props.init.setup&&t.$props.init.setup(e)}});l(t.element)&&(t.element.style.visibility="",t.element.style.display=""),Object(v["a"])().init(e)}},S={props:b,created:function(){this.elementId=this.$props.id||s("tiny-vue"),this.inlineEditor=this.$props.init&&this.$props.init.inline||this.$props.inline,this.initialized=!1},watch:{disabled:function(){this.editor.setMode(this.disabled?"readonly":"design")}},mounted:function(){if(this.element=this.$el,null!==Object(v["a"])())C(this)();else if(this.element&&this.element.ownerDocument){var t=this.$props.cloudChannel?this.$props.cloudChannel:"5",e=this.$props.apiKey?this.$props.apiKey:"no-api-key",n=m(this.$props.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/"+e+"/tinymce/"+t+"/tinymce.min.js":this.$props.tinymceScriptSrc;p.load(this.element.ownerDocument,n,C(this))}},beforeDestroy:function(){null!==Object(v["a"])()&&Object(v["a"])().remove(this.editor)},deactivated:function(){var t;this.inlineEditor||(this.cache=this.editor.getContent(),null===(t=Object(v["a"])())||void 0===t||t.remove(this.editor))},activated:function(){!this.inlineEditor&&this.initialized&&C(this)()},render:function(t){return this.inlineEditor?w(t,this.elementId,this.$props.tagName):x(t,this.elementId)}};e["a"]=S},cdd9:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)},n=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return function(e){return n(e)===t}},o=function(t){return function(e){return typeof e===t}},i=function(t){return function(e){return t===e}},a=r("string"),u=r("object"),c=r("array"),s=i(null),l=o("boolean"),f=function(t){return null===t||void 0===t},d=function(t){return!f(t)},m=o("function"),g=o("number"),h=function(){},p=function(t){return function(){return t}},v=function(t){return t},b=p(!1),y=p(!0),w=function(){return x},x=function(){var t=function(t){return t()},e=v,n={fold:function(t,e){return t()},isSome:b,isNone:y,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:p(null),getOrUndefined:p(void 0),or:e,orThunk:t,map:w,each:h,bind:w,exists:b,forall:y,filter:function(){return w()},toArray:function(){return[]},toString:p("none()")};return n}(),C=function(t){var e=p(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:y,isNone:b,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return C(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:x},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},S=function(t){return null===t||void 0===t?x:C(t)},k={some:C,none:w,from:S},T=Object.keys,O=Object.hasOwnProperty,_=function(t,e){for(var n=T(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},E=function(t){return function(e,n){t[n]=e}},A=function(t,e,n,r){var o={};return _(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},D=function(t,e){var n={};return A(t,e,E(n),h),n},M=function(t,e){return O.call(t,e)},N=function(t,e){return M(t,e)&&void 0!==t[e]&&null!==t[e]},R=Array.prototype.push,z=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!c(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);R.apply(e,t[n])}return e},B=function(t,e){return e>=0&&e<t.length?k.some(t[e]):k.none()},P=function(t){return B(t,0)},I=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return k.none()};"undefined"!==typeof window?window:Function("return this;")();var L=function(t,e,n){if(!(a(n)||l(n)||g(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},H=function(t,e,n){L(t.dom,e,n)},F=function(t,e){t.dom.removeAttribute(e)},V=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return W(r.childNodes[0])},j=function(t,e){var n=e||document,r=n.createElement(t);return W(r)},U=function(t,e){var n=e||document,r=n.createTextNode(t);return W(r)},W=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},$=function(t,e,n){return k.from(t.dom.elementFromPoint(e,n)).map(W)},q={fromHtml:V,fromTag:j,fromText:U,fromDom:W,fromPoint:$},G=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),K=tinymce.util.Tools.resolve("tinymce.util.Promise"),X=tinymce.util.Tools.resolve("tinymce.util.URI"),Y=tinymce.util.Tools.resolve("tinymce.util.XHR"),J=function(t){return t.getParam("image_dimensions",!0,"boolean")},Z=function(t){return t.getParam("image_advtab",!1,"boolean")},Q=function(t){return t.getParam("image_uploadtab",!0,"boolean")},tt=function(t){return t.getParam("image_prepend_url","","string")},et=function(t){return t.getParam("image_class_list")},nt=function(t){return t.getParam("image_description",!0,"boolean")},rt=function(t){return t.getParam("image_title",!1,"boolean")},ot=function(t){return t.getParam("image_caption",!1,"boolean")},it=function(t){return t.getParam("image_list",!1)},at=function(t){return d(t.getParam("images_upload_url"))},ut=function(t){return d(t.getParam("images_upload_handler"))},ct=function(t){return t.getParam("a11y_advanced_options",!1,"boolean")},st=function(t){return t.getParam("automatic_uploads",!0,"boolean")},lt=function(t,e){return Math.max(parseInt(t,10),parseInt(e,10))},ft=function(t){return new K((function(e){var n=document.createElement("img"),r=function(t){n.onload=n.onerror=null,n.parentNode&&n.parentNode.removeChild(n),e(t)};n.onload=function(){var t=lt(n.width,n.clientWidth),e=lt(n.height,n.clientHeight),o={width:t,height:e};r(K.resolve(o))},n.onerror=function(){r(K.reject("Failed to get image dimensions for: "+t))};var o=n.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(n),n.src=t}))},dt=function(t){return t&&(t=t.replace(/px$/,"")),t},mt=function(t){return t.length>0&&/^[0-9]+$/.test(t)&&(t+="px"),t},gt=function(t){if(t.margin){var e=String(t.margin).split(" ");switch(e.length){case 1:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[0],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[0];break;case 2:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[1];break;case 3:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[1];break;case 4:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[3]}delete t.margin}return t},ht=function(t,e){var n=it(t);a(n)?Y.send({url:n,success:function(t){e(JSON.parse(t))}}):m(n)?n(e):e(n)},pt=function(t,e,n){var r=function(){n.onload=n.onerror=null,t.selection&&(t.selection.select(n),t.nodeChanged())};n.onload=function(){e.width||e.height||!J(t)||t.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r},vt=function(t){return new K((function(e,n){var r=new FileReader;r.onload=function(){e(r.result)},r.onerror=function(){n(r.error.message)},r.readAsDataURL(t)}))},bt=function(t){return"IMG"===t.nodeName&&(t.hasAttribute("data-mce-object")||t.hasAttribute("data-mce-placeholder"))},yt=function(t,e){return X.isDomSafe(e,"img",t.settings)},wt=G.DOM,xt=function(t){return t.style.marginLeft&&t.style.marginRight&&t.style.marginLeft===t.style.marginRight?dt(t.style.marginLeft):""},Ct=function(t){return t.style.marginTop&&t.style.marginBottom&&t.style.marginTop===t.style.marginBottom?dt(t.style.marginTop):""},St=function(t){return t.style.borderWidth?dt(t.style.borderWidth):""},kt=function(t,e){return t.hasAttribute(e)?t.getAttribute(e):""},Tt=function(t,e){return t.style[e]?t.style[e]:""},Ot=function(t){return null!==t.parentNode&&"FIGURE"===t.parentNode.nodeName},_t=function(t,e,n){""===n?t.removeAttribute(e):t.setAttribute(e,n)},Et=function(t){var e=wt.create("figure",{class:"image"});wt.insertAfter(e,t),e.appendChild(t),e.appendChild(wt.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false"},At=function(t){var e=t.parentNode;wt.insertAfter(t,e),wt.remove(e)},Dt=function(t){Ot(t)?At(t):Et(t)},Mt=function(t,e){var n=t.getAttribute("style"),r=e(null!==n?n:"");r.length>0?(t.setAttribute("style",r),t.setAttribute("data-mce-style",r)):t.removeAttribute("style")},Nt=function(t,e){return function(t,n,r){t.style[n]?(t.style[n]=mt(r),Mt(t,e)):_t(t,n,r)}},Rt=function(t,e){return t.style[e]?dt(t.style[e]):kt(t,e)},zt=function(t,e){var n=mt(e);t.style.marginLeft=n,t.style.marginRight=n},Bt=function(t,e){var n=mt(e);t.style.marginTop=n,t.style.marginBottom=n},Pt=function(t,e){var n=mt(e);t.style.borderWidth=n},It=function(t,e){t.style.borderStyle=e},Lt=function(t){return Tt(t,"borderStyle")},Ht=function(t){return"FIGURE"===t.nodeName},Ft=function(t){return"IMG"===t.nodeName},Vt=function(t){return 0===wt.getAttrib(t,"alt").length&&"presentation"===wt.getAttrib(t,"role")},jt=function(t){return Vt(t)?"":kt(t,"alt")},Ut=function(){return{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}},Wt=function(t,e){var n=document.createElement("img");return _t(n,"style",e.style),(xt(n)||""!==e.hspace)&&zt(n,e.hspace),(Ct(n)||""!==e.vspace)&&Bt(n,e.vspace),(St(n)||""!==e.border)&&Pt(n,e.border),(Lt(n)||""!==e.borderStyle)&&It(n,e.borderStyle),t(n.getAttribute("style"))},$t=function(t,n){var r=document.createElement("img");if(Jt(t,e(e({},n),{caption:!1}),r),Kt(r,n.alt,n.isDecorative),n.caption){var o=wt.create("figure",{class:"image"});return o.appendChild(r),o.appendChild(wt.create("figcaption",{contentEditable:"true"},"Caption")),o.contentEditable="false",o}return r},qt=function(t,e){return{src:kt(e,"src"),alt:jt(e),title:kt(e,"title"),width:Rt(e,"width"),height:Rt(e,"height"),class:kt(e,"class"),style:t(kt(e,"style")),caption:Ot(e),hspace:xt(e),vspace:Ct(e),border:St(e),borderStyle:Tt(e,"borderStyle"),isDecorative:Vt(e)}},Gt=function(t,e,n,r,o){n[r]!==e[r]&&o(t,r,n[r])},Kt=function(t,e,n){if(n){wt.setAttrib(t,"role","presentation");var r=q.fromDom(t);H(r,"alt","")}else{if(s(e)){r=q.fromDom(t);F(r,"alt")}else{r=q.fromDom(t);H(r,"alt",e)}"presentation"===wt.getAttrib(t,"role")&&wt.setAttrib(t,"role","")}},Xt=function(t,e,n){n.alt===e.alt&&n.isDecorative===e.isDecorative||Kt(t,n.alt,n.isDecorative)},Yt=function(t,e){return function(n,r,o){t(n,o),Mt(n,e)}},Jt=function(t,e,n){var r=qt(t,n);Gt(n,r,e,"caption",(function(t,e,n){return Dt(t)})),Gt(n,r,e,"src",_t),Gt(n,r,e,"title",_t),Gt(n,r,e,"width",Nt("width",t)),Gt(n,r,e,"height",Nt("height",t)),Gt(n,r,e,"class",_t),Gt(n,r,e,"style",Yt((function(t,e){return _t(t,"style",e)}),t)),Gt(n,r,e,"hspace",Yt(zt,t)),Gt(n,r,e,"vspace",Yt(Bt,t)),Gt(n,r,e,"border",Yt(Pt,t)),Gt(n,r,e,"borderStyle",Yt(It,t)),Xt(n,r,e)},Zt=function(t,e){var n=t.dom.styles.parse(e),r=gt(n),o=t.dom.styles.parse(t.dom.styles.serialize(r));return t.dom.styles.serialize(o)},Qt=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return n?t.dom.select("img",n)[0]:e&&("IMG"!==e.nodeName||bt(e))?null:e},te=function(t,e){var n=t.dom,r=D(t.schema.getTextBlockElements(),(function(e,n){return!t.schema.isValidChild(n,"figure")})),o=n.getParent(e.parentNode,(function(t){return N(r,t.nodeName)}),t.getBody());return o?n.split(o,e):e},ee=function(t){var e=Qt(t);return e?qt((function(e){return Zt(t,e)}),e):Ut()},ne=function(t,e){var n=$t((function(e){return Zt(t,e)}),e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),Ht(r)){var o=te(t,r);t.selection.select(o)}else t.selection.select(r)},re=function(t,e){t.dom.setAttrib(e,"src",e.getAttribute("src"))},oe=function(t,e){if(e){var n=t.dom.is(e.parentNode,"figure.image")?e.parentNode:e;t.dom.remove(n),t.focus(),t.nodeChanged(),t.dom.isEmpty(t.getBody())&&(t.setContent(""),t.selection.setCursorLocation())}},ie=function(t,e){var n=Qt(t);if(Jt((function(e){return Zt(t,e)}),e,n),re(t,n),Ht(n.parentNode)){var r=n.parentNode;te(t,r),t.selection.select(n.parentNode)}else t.selection.select(n),pt(t,e,n)},ae=function(t,n){var r=n.src;return e(e({},n),{src:yt(t,r)?r:""})},ue=function(t,n){var r=Qt(t);if(r){var o=qt((function(e){return Zt(t,e)}),r),i=e(e({},o),n),a=ae(t,i);i.src?ie(t,a):oe(t,r)}else n.src&&ne(t,e(e({},Ut()),n))},ce=function(t,e){var n=u(t)&&u(e);return n?le(t,e):e},se=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var a in i)M(i,a)&&(r[a]=t(r[a],i[a]))}return r}},le=se(ce),fe=function(t){return t.length>0},de=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),me=tinymce.util.Tools.resolve("tinymce.util.Tools"),ge=function(t){return a(t.value)?t.value:""},he=function(t){return a(t.text)?t.text:a(t.title)?t.title:""},pe=function(t,e){var n=[];return me.each(t,(function(t){var r=he(t);if(void 0!==t.menu){var o=pe(t.menu,e);n.push({text:r,items:o})}else{var i=e(t);n.push({text:r,value:i})}})),n},ve=function(t){return void 0===t&&(t=ge),function(e){return e?k.from(e).map((function(e){return pe(e,t)})):k.none()}},be=function(t){return ve(ge)(t)},ye=function(t){return M(t,"items")},we=function(t,e){return I(t,(function(t){return ye(t)?we(t.items,e):t.value===e?k.some(t):k.none()}))},xe=function(t,e){return t.bind((function(t){return we(t,e)}))},Ce={sanitizer:ve,sanitize:be,findEntry:xe},Se=function(t){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},ke={makeTab:Se},Te=function(t){var e=Ce.sanitizer((function(e){return t.convertURL(e.value||e.url,"src")})),n=new K((function(n){ht(t,(function(t){n(e(t).map((function(t){return z([[{text:"None",value:""}],t])})))}))})),r=Ce.sanitize(et(t)),o=Z(t),i=Q(t),u=at(t),c=ut(t),s=ee(t),l=nt(t),f=rt(t),d=J(t),m=ot(t),g=ct(t),h=st(t),p=k.some(tt(t)).filter((function(t){return a(t)&&t.length>0}));return n.then((function(t){return{image:s,imageList:t,classList:r,hasAdvTab:o,hasUploadTab:i,hasUploadUrl:u,hasUploadHandler:c,hasDescription:l,hasImageTitle:f,hasDimensions:d,hasImageCaption:m,prependURL:p,hasAccessibilityOptions:g,automaticUploads:h}}))},Oe=function(t){var n={name:"src",type:"urlinput",filetype:"image",label:"Source"},r=t.imageList.map((function(t){return{name:"images",type:"listbox",label:"Image list",items:t}})),o={name:"alt",type:"input",label:"Alternative description",disabled:t.hasAccessibilityOptions&&t.image.isDecorative},i={name:"title",type:"input",label:"Image title"},a={name:"dimensions",type:"sizeinput"},u={type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]},c=t.classList.map((function(t){return{name:"classes",type:"listbox",label:"Class",items:t}})),s={type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]},l=function(t){return t?{type:"grid",columns:2}:{type:"panel"}};return z([[n],r.toArray(),t.hasAccessibilityOptions&&t.hasDescription?[u]:[],t.hasDescription?[o]:[],t.hasImageTitle?[i]:[],t.hasDimensions?[a]:[],[e(e({},l(t.classList.isSome()&&t.hasImageCaption)),{items:z([c.toArray(),t.hasImageCaption?[s]:[]])})]])},_e=function(t){return{title:"General",name:"general",items:Oe(t)}},Ee={makeTab:_e,makeItems:Oe},Ae=function(t){var e=[{type:"dropzone",name:"fileinput"}];return{title:"Upload",name:"upload",items:e}},De={makeTab:Ae},Me=function(t){return{prevImage:Ce.findEntry(t.imageList,t.image.src),prevAlt:t.image.alt,open:!0}},Ne=function(t){return{src:{value:t.src,meta:{}},images:t.src,alt:t.alt,title:t.title,dimensions:{width:t.width,height:t.height},classes:t.class,caption:t.caption,style:t.style,vspace:t.vspace,border:t.border,hspace:t.hspace,borderstyle:t.borderStyle,fileinput:[],isDecorative:t.isDecorative}},Re=function(t,e){return{src:t.src.value,alt:0===t.alt.length&&e?null:t.alt,title:t.title,width:t.dimensions.width,height:t.dimensions.height,class:t.classes,style:t.style,caption:t.caption,hspace:t.hspace,vspace:t.vspace,border:t.border,borderStyle:t.borderstyle,isDecorative:t.isDecorative}},ze=function(t,e){return/^(?:[a-zA-Z]+:)?\/\//.test(e)?k.none():t.prependURL.bind((function(t){return e.substring(0,t.length)!==t?k.some(t+e):k.none()}))},Be=function(t,e){var n=e.getData();ze(t,n.src.value).each((function(t){e.setData({src:{value:t,meta:n.src.meta}})}))},Pe=function(t,e,n){t.hasDescription&&a(n.alt)&&(e.alt=n.alt),t.hasAccessibilityOptions&&(e.isDecorative=n.isDecorative||e.isDecorative||!1),t.hasImageTitle&&a(n.title)&&(e.title=n.title),t.hasDimensions&&(a(n.width)&&(e.dimensions.width=n.width),a(n.height)&&(e.dimensions.height=n.height)),a(n.class)&&Ce.findEntry(t.classList,n.class).each((function(t){e.classes=t.value})),t.hasImageCaption&&l(n.caption)&&(e.caption=n.caption),t.hasAdvTab&&(a(n.style)&&(e.style=n.style),a(n.vspace)&&(e.vspace=n.vspace),a(n.border)&&(e.border=n.border),a(n.hspace)&&(e.hspace=n.hspace),a(n.borderstyle)&&(e.borderstyle=n.borderstyle))},Ie=function(t,e){var n=e.getData(),r=n.src.meta;if(void 0!==r){var o=le({},n);Pe(t,o,r),e.setData(o)}},Le=function(t,e,n,r){var o=r.getData(),i=o.src.value,a=o.src.meta||{};a.width||a.height||!e.hasDimensions||(fe(i)?t.imageSize(i).then((function(t){n.open&&r.setData({dimensions:t})})).catch((function(t){return console.error(t)})):r.setData({dimensions:{width:"",height:""}}))},He=function(t,e,n){var r=n.getData(),o=Ce.findEntry(t.imageList,r.src.value);e.prevImage=o,n.setData({images:o.map((function(t){return t.value})).getOr("")})},Fe=function(t,e,n,r){Be(e,r),Ie(e,r),Le(t,e,n,r),He(e,n,r)},Ve=function(t,e,n,r){var o=r.getData(),i=Ce.findEntry(e.imageList,o.images);i.each((function(t){var e=""===o.alt||n.prevImage.map((function(t){return t.text===o.alt})).getOr(!1);e?""===t.value?r.setData({src:t,alt:n.prevAlt}):r.setData({src:t,alt:t.text}):r.setData({src:t})})),n.prevImage=i,Fe(t,e,n,r)},je=function(t){var e=t["margin-top"]&&t["margin-bottom"]&&t["margin-top"]===t["margin-bottom"];return e?dt(String(t["margin-top"])):""},Ue=function(t){var e=t["margin-right"]&&t["margin-left"]&&t["margin-right"]===t["margin-left"];return e?dt(String(t["margin-right"])):""},We=function(t){return t["border-width"]?dt(String(t["border-width"])):""},$e=function(t){return t["border-style"]?String(t["border-style"]):""},qe=function(t,e,n){return e(t(e(n)))},Ge=function(t,e,n){var r=gt(t(n.style)),o=le({},n);return o.vspace=je(r),o.hspace=Ue(r),o.border=We(r),o.borderstyle=$e(r),o.style=qe(t,e,r),o},Ke=function(t,e){var n=e.getData(),r=Ge(t.parseStyle,t.serializeStyle,n);e.setData(r)},Xe=function(t,e,n){var r=le(Ne(e.image),n.getData()),o=Wt(t.normalizeCss,Re(r,!1));n.setData({style:o})},Ye=function(t,e,n,r){var o=r.getData();r.block("Uploading image"),P(o.fileinput).fold((function(){r.unblock()}),(function(o){var i=URL.createObjectURL(o),a=function(){r.unblock(),URL.revokeObjectURL(i)},u=function(o){r.setData({src:{value:o,meta:{}}}),r.showTab("general"),Fe(t,e,n,r)};vt(o).then((function(n){var c=t.createBlobCache(o,i,n);e.automaticUploads?t.uploadImage(c).then((function(t){u(t.url),a()})).catch((function(e){a(),t.alertErr(e)})):(t.addToBlobCache(c),u(c.blobUri()),r.unblock())}))}))},Je=function(t,e,n){return function(r,o){"src"===o.name?Fe(t,e,n,r):"images"===o.name?Ve(t,e,n,r):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?Ke(t,r):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?Xe(t,e,r):"fileinput"===o.name?Ye(t,e,n,r):"isDecorative"===o.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},Ze=function(t){return function(){t.open=!1}},Qe=function(t){if(t.hasAdvTab||t.hasUploadUrl||t.hasUploadHandler){var e={type:"tabpanel",tabs:z([[Ee.makeTab(t)],t.hasAdvTab?[ke.makeTab(t)]:[],t.hasUploadTab&&(t.hasUploadUrl||t.hasUploadHandler)?[De.makeTab(t)]:[]])};return e}var n={type:"panel",items:Ee.makeItems(t)};return n},tn=function(t){return function(e){var n=Me(e);return{title:"Insert/Edit Image",size:"normal",body:Qe(e),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ne(e.image),onSubmit:t.onSubmit(e),onChange:Je(t,e,n),onClose:Ze(n)}}},en=function(t){return function(e){return function(n){var r=le(Ne(e.image),n.getData());t.execCommand("mceUpdateImage",!1,Re(r,e.hasAccessibilityOptions)),t.editorUpload.uploadImagesAuto(),n.close()}}},nn=function(t){return function(e){return yt(t,e)?ft(t.documentBaseURI.toAbsolute(e)).then((function(t){return{width:String(t.width),height:String(t.height)}})):K.resolve({width:"",height:""})}},rn=function(t){return function(e,n,r){return t.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:r.split(",")[1]})}},on=function(t){return function(e){t.editorUpload.blobCache.add(e)}},an=function(t){return function(e){t.windowManager.alert(e)}},un=function(t){return function(e){return Zt(t,e)}},cn=function(t){return function(e){return t.dom.parseStyle(e)}},sn=function(t){return function(e,n){return t.dom.serializeStyle(e,n)}},ln=function(t){return function(e){return de(t).upload([e],!1).then((function(t){return 0===t.length?K.reject("Failed to upload image"):!1===t[0].status?K.reject(t[0].error.message):t[0]}))}},fn=function(t){var e={onSubmit:en(t),imageSize:nn(t),addToBlobCache:on(t),createBlobCache:rn(t),alertErr:an(t),normalizeCss:un(t),parseStyle:cn(t),serializeStyle:sn(t),uploadImage:ln(t)},n=function(){Te(t).then(tn(e)).then(t.windowManager.open)};return{open:n}},dn=function(t){t.addCommand("mceImage",fn(t).open),t.addCommand("mceUpdateImage",(function(e,n){t.undoManager.transact((function(){return ue(t,n)}))}))},mn=function(t){var e=t.attr("class");return e&&/\bimage\b/.test(e)},gn=function(t){return function(e){var n=e.length,r=function(e){e.attr("contenteditable",t?"true":null)};while(n--){var o=e[n];mn(o)&&(o.attr("contenteditable",t?"false":null),me.each(o.getAll("figcaption"),r))}}},hn=function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("figure",gn(!0)),t.serializer.addNodeFilter("figure",gn(!1))}))},pn=function(t){t.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:fn(t).open,onSetup:function(e){return e.setActive(d(Qt(t))),t.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),t.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:fn(t).open}),t.ui.registry.addContextMenu("image",{update:function(t){return Ht(t)||Ft(t)&&!bt(t)?["image"]:[]}})};function vn(){t.add("image",(function(t){hn(t),pn(t),dn(t)}))}vn()})()},cf08:function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){var e=function(){return t.get()};return{isEnabled:e}},r=function(t,e){return t.fire("VisualChars",{state:e})},o=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},i=function(t){return function(e){return o(e)===t}},a=function(t){return function(e){return typeof e===t}},u=i("string"),c=a("boolean"),s=a("number"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=f(!1),g=f(!0),h=function(){return p},p=function(){var t=function(t){return t()},e=d,n={fold:function(t,e){return t()},isSome:m,isNone:g,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:e,orThunk:t,map:h,each:l,bind:h,exists:m,forall:g,filter:function(){return h()},toArray:function(){return[]},toString:f("none()")};return n}(),v=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b=function(t){return null===t||void 0===t?p:v(t)},y={some:v,none:h,from:b},w=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},x=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},C=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},S=Object.keys,k=function(t,e){for(var n=S(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}};"undefined"!==typeof window?window:Function("return this;")();var T=3,O=function(t){return t.dom.nodeType},_=function(t){return t.dom.nodeValue},E=function(t){return function(e){return O(e)===t}},A=E(T),D=function(t,e,n){if(!(u(n)||c(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},M=function(t,e,n){D(t.dom,e,n)},N=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},R=function(t,e){t.dom.removeAttribute(e)},z=function(t,e){var n=N(t,e);return void 0===n||""===n?[]:n.split(" ")},B=function(t,e,n){var r=z(t,e),o=r.concat([n]);return M(t,e,o.join(" ")),!0},P=function(t,e,n){var r=C(z(t,e),(function(t){return t!==n}));return r.length>0?M(t,e,r.join(" ")):R(t,e),!1},I=function(t){return void 0!==t.dom.classList},L=function(t){return z(t,"class")},H=function(t,e){return B(t,"class",e)},F=function(t,e){return P(t,"class",e)},V=function(t,e){I(t)?t.dom.classList.add(e):H(t,e)},j=function(t){var e=I(t)?t.dom.classList:L(t);0===e.length&&R(t,"class")},U=function(t,e){if(I(t)){var n=t.dom.classList;n.remove(e)}else F(t,e);j(t)},W=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return G(r.childNodes[0])},$=function(t,e){var n=e||document,r=n.createElement(t);return G(r)},q=function(t,e){var n=e||document,r=n.createTextNode(t);return G(r)},G=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},K=function(t,e,n){return y.from(t.dom.elementFromPoint(e,n)).map(G)},X={fromHtml:W,fromTag:$,fromText:q,fromDom:G,fromPoint:K},Y={" ":"nbsp","­":"shy"},J=function(t,e){var n="";return k(t,(function(t,e){n+=e})),new RegExp("["+n+"]",e?"g":"")},Z=function(t){var e="";return k(t,(function(t){e&&(e+=","),e+="span.mce-"+t})),e},Q=J(Y),tt=J(Y,!0),et=Z(Y),nt="mce-nbsp",rt=function(t){return'<span data-mce-bogus="1" class="mce-'+Y[t]+'">'+t+"</span>"},ot=function(t){var e=_(t);return A(t)&&void 0!==e&&Q.test(e)},it=function(t,e){var n=[],r=t.dom,o=w(r.childNodes,X.fromDom);return x(o,(function(t){e(t)&&(n=n.concat([t])),n=n.concat(it(t,e))})),n},at=function(t,e){while(t.parentNode){if(t.parentNode===e)return t;t=t.parentNode}},ut=function(t){return t.replace(tt,rt)},ct=function(t){return"span"===t.nodeName.toLowerCase()&&t.classList.contains("mce-nbsp-wrap")},st=function(t,e){var n=it(X.fromDom(e),ot);x(n,(function(e){var n=e.dom.parentNode;if(ct(n))V(X.fromDom(n),nt);else{var r=ut(t.dom.encode(_(e))),o=t.dom.create("div",null,r),i=void 0;while(i=o.lastChild)t.dom.insertAfter(i,e.dom);t.dom.remove(e.dom)}}))},lt=function(t,e){var n=t.dom.select(et,e);x(n,(function(e){ct(e)?U(X.fromDom(e),nt):t.dom.remove(e,!0)}))},ft=function(t){var e=t.getBody(),n=t.selection.getBookmark(),r=at(t.selection.getNode(),e);r=void 0!==r?r:e,lt(t,r),st(t,r),t.selection.moveToBookmark(n)},dt=function(t,e){r(t,e.get());var n=t.getBody();!0===e.get()?st(t,n):lt(t,n)},mt=function(t,e){e.set(!e.get());var n=t.selection.getBookmark();dt(t,e),t.selection.moveToBookmark(n)},gt=function(t,e){t.addCommand("mceVisualChars",(function(){mt(t,e)}))},ht=function(t){return t.getParam("visualchars_default_state",!1)},pt=function(t){return!1!==t.getParam("forced_root_block")},vt=function(t,e){t.on("init",(function(){dt(t,e)}))},bt=tinymce.util.Tools.resolve("tinymce.util.Delay"),yt=function(t,e){var n=bt.debounce((function(){ft(t)}),300);pt(t)&&t.on("keydown",(function(r){!0===e.get()&&(13===r.keyCode?ft(t):n())})),t.on("remove",n.stop)},wt=function(t,e){return function(n){n.setActive(e.get());var r=function(t){return n.setActive(t.state)};return t.on("VisualChars",r),function(){return t.off("VisualChars",r)}}},xt=function(t,e){var n=function(){return t.execCommand("mceVisualChars")};t.ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:n,onSetup:wt(t,e)}),t.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:n,onSetup:wt(t,e)})};function Ct(){e.add("visualchars",(function(e){var r=t(ht(e));return gt(e,r),xt(e,r),yt(e,r),vt(e,r),n(r)}))}Ct()})()},cfb0:function(t,e,n){n("43fc")},d2dc:function(t,e,n){n("169f")},d4c3:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env"),n=function(t){t.addCommand("mcePrint",(function(){e.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}))},r=function(t){var e=function(){return t.execCommand("mcePrint")};t.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:e}),t.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:e})};function o(){t.add("print",(function(t){n(t),r(t),t.addShortcut("Meta+P","","mcePrint")}))}o()})()},dbbc:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){t.addCommand("InsertHorizontalRule",(function(){t.execCommand("mceInsertContent",!1,"<hr />")}))},n=function(t){var e=function(){return t.execCommand("InsertHorizontalRule")};t.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:e}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:e})};function r(){t.add("hr",(function(t){e(t),n(t)}))}r()})()},dcb7:function(t,e,n){n("e704")},e2d6:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=function(t){return function(e){return typeof e===t}},o=n("string"),i=r("boolean"),a=function(t){return null===t||void 0===t},u=function(t){return!a(t)},c=r("function"),s=r("number"),l=function(){},f=function(t,e){return function(n){return t(e(n))}},d=function(t){return function(){return t}},m=function(t){return t},g=d(!1),h=d(!0),p=function(){return v},v=function(){var t=function(t){return t()},e=m,n={fold:function(t,e){return t()},isSome:g,isNone:h,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:e,orThunk:t,map:p,each:l,bind:p,exists:g,forall:h,filter:function(){return p()},toArray:function(){return[]},toString:d("none()")};return n}(),b=function(t){var e=d(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:h,isNone:g,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return b(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:v},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},y=function(t){return null===t||void 0===t?v:b(t)},w={some:b,none:p,from:y},x=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},C=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},S=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},k=9,T=11,O=1,_=3,E=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return M(r.childNodes[0])},A=function(t,e){var n=e||document,r=n.createElement(t);return M(r)},D=function(t,e){var n=e||document,r=n.createTextNode(t);return M(r)},M=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},N=function(t,e,n){return w.from(t.dom.elementFromPoint(e,n)).map(M)},R={fromHtml:E,fromTag:A,fromText:D,fromDom:M,fromPoint:N},z=function(t,e){var n=t.dom;if(n.nodeType!==O)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")};"undefined"!==typeof window?window:Function("return this;")();var B=function(t){var e=t.dom.nodeName;return e.toLowerCase()},P=function(t){return t.dom.nodeType},I=function(t){return function(e){return P(e)===t}},L=I(O),H=I(_),F=I(k),V=I(T),j=function(t){return function(e){return L(e)&&B(e)===t}},U=function(t){return R.fromDom(t.dom.ownerDocument)},W=function(t){return F(t)?t:U(t)},$=function(t){return w.from(t.dom.parentNode).map(R.fromDom)},q=function(t){return x(t.dom.childNodes,R.fromDom)},G=function(t,e,n){if(!(o(n)||i(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},K=function(t,e,n){G(t.dom,e,n)},X=function(t,e){t.dom.removeAttribute(e)},Y=function(t){return V(t)&&u(t.dom.host)},J=c(Element.prototype.attachShadow)&&c(Node.prototype.getRootNode),Z=J?function(t){return R.fromDom(t.dom.getRootNode())}:W,Q=function(t){var e=Z(t);return Y(e)?w.some(e):w.none()},tt=function(t){return R.fromDom(t.dom.host)},et=function(t){var e=H(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return Q(R.fromDom(e)).fold((function(){return n.body.contains(e)}),f(et,tt))},nt=function(t,e,n){var r=t.dom,o=c(n)?n:g;while(r.parentNode){r=r.parentNode;var i=R.fromDom(r);if(e(i))return w.some(i);if(o(i))break}return w.none()},rt=function(t,e,n){return nt(t,(function(t){return z(t,e)}),n)},ot=function(t){return void 0!==t.style&&c(t.style.getPropertyValue)},it=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||et(t)?o:at(n,e)},at=function(t,e){return ot(t)?t.style.getPropertyValue(e):""},ut=function(t){return"rtl"===it(t,"direction")?"rtl":"ltr"},ct=function(t,e){return S(q(t),e)},st=function(t,e){return ct(t,(function(t){return z(t,e)}))},lt=function(t){return $(t).filter(L)},ft=function(t,e){var n=e?rt(t,"ol,ul"):w.some(t);return n.getOr(t)},dt=j("li"),mt=function(t,e){var n=t.selection.getSelectedBlocks();n.length>0&&(C(n,(function(t){var n=R.fromDom(t),r=dt(n),o=ft(n,r),i=lt(o);i.each((function(t){var n=ut(t);if(n!==e?K(o,"dir",e):ut(o)!==e&&X(o,"dir"),r){var i=st(o,"li[dir]");C(i,(function(t){return X(t,"dir")}))}}))})),t.nodeChanged())},gt=function(t){t.addCommand("mceDirectionLTR",(function(){mt(t,"ltr")})),t.addCommand("mceDirectionRTL",(function(){mt(t,"rtl")}))},ht=function(t,e){return function(n){var r=function(t){var r=R.fromDom(t.element);n.setActive(ut(r)===e)};return t.on("NodeChange",r),function(){return t.off("NodeChange",r)}}},pt=function(t){t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return t.execCommand("mceDirectionLTR")},onSetup:ht(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return t.execCommand("mceDirectionRTL")},onSetup:ht(t,"rtl")})};function vt(){t.add("directionality",(function(t){gt(t),pt(t)}))}vt()})()},e455:function(t,e,n){n("6b68")},e562:function(t,e,n){(function(e){(function(){"use strict";var n=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(t)},o=function(t,e){var n=Array.prototype.slice.call(t);return n.sort(e)},i=function(t,e){return a((function(n,r){return t.eq(e(n),e(r))}))},a=function(t){return{eq:t}},u=a((function(t,e){return t===e})),c=u,s=function(t){return a((function(e,n){if(e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t.eq(e[o],n[o]))return!1;return!0}))},l=function(t,e){return i(s(t),(function(t){return o(t,e)}))},f=function(t){return a((function(e,n){var r=Object.keys(e),o=Object.keys(n);if(!l(c).eq(r,o))return!1;for(var i=r.length,a=0;a<i;a++){var u=r[a];if(!t.eq(e[u],n[u]))return!1}return!0}))},d=a((function(t,e){if(t===e)return!0;var o=n(t),i=n(e);return o===i&&(r(o)?t===e:"array"===o?s(d).eq(t,e):"object"===o&&f(d).eq(t,e))})),m=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},g=function(t){return function(e){return m(e)===t}},h=function(t){return function(e){return typeof e===t}},p=function(t){return function(e){return t===e}},v=g("string"),b=g("object"),y=g("array"),w=p(null),x=h("boolean"),C=p(void 0),S=function(t){return null===t||void 0===t},k=function(t){return!S(t)},T=h("function"),O=h("number"),_=function(){},E=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},A=function(t,e){return function(n){return t(e(n))}},D=function(t){return function(){return t}},M=function(t){return t},N=function(t,e){return t===e};function R(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var z=function(t){return function(e){return!t(e)}},B=function(t){return function(){throw new Error(t)}},P=function(t){return t()},I=function(t){t()},L=D(!1),H=D(!0),F=function(){return V},V=function(){var t=function(t){return t()},e=M,n={fold:function(t,e){return t()},isSome:L,isNone:H,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:D(null),getOrUndefined:D(void 0),or:e,orThunk:t,map:F,each:_,bind:F,exists:L,forall:H,filter:function(){return F()},toArray:function(){return[]},toString:D("none()")};return n}(),j=function(t){var e=D(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:H,isNone:L,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return j(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:V},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},U=function(t){return null===t||void 0===t?V:j(t)},W={some:j,none:F,from:U},$=Array.prototype.slice,q=Array.prototype.indexOf,G=Array.prototype.push,K=function(t,e){return q.call(t,e)},X=function(t,e){var n=K(t,e);return-1===n?W.none():W.some(n)},Y=function(t,e){return K(t,e)>-1},J=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},Z=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},Q=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},tt=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},et=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=e(a,o)?n:r;u.push(a)}return{pass:n,fail:r}},nt=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},rt=function(t,e,n){return tt(t,(function(t,r){n=e(n,t,r)})),n},ot=function(t,e,n){return Q(t,(function(t,r){n=e(n,t,r)})),n},it=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return W.some(i);if(n(i,r))break}return W.none()},at=function(t,e){return it(t,e,L)},ut=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return W.some(n)}return W.none()},ct=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!y(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);G.apply(e,t[n])}return e},st=function(t,e){return ct(Z(t,e))},lt=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},ft=function(t){var e=$.call(t,0);return e.reverse(),e},dt=function(t,e){return nt(t,(function(t){return!Y(e,t)}))},mt=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},gt=function(t,e){var n=$.call(t,0);return n.sort(e),n},ht=function(t,e){return e>=0&&e<t.length?W.some(t[e]):W.none()},pt=function(t){return ht(t,0)},vt=function(t){return ht(t,t.length-1)},bt=T(Array.from)?Array.from:function(t){return $.call(t)},yt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return W.none()},wt=Object.keys,xt=Object.hasOwnProperty,Ct=function(t,e){for(var n=wt(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},St=function(t,e){return kt(t,(function(t,n){return{k:n,v:e(t,n)}}))},kt=function(t,e){var n={};return Ct(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Tt=function(t){return function(e,n){t[n]=e}},Ot=function(t,e,n,r){var o={};return Ct(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},_t=function(t,e){var n={},r={};return Ot(t,e,Tt(n),Tt(r)),{t:n,f:r}},Et=function(t,e){var n={};return Ot(t,e,Tt(n),_),n},At=function(t,e){var n=[];return Ct(t,(function(t,r){n.push(e(t,r))})),n},Dt=function(t){return At(t,M)},Mt=function(t,e){return Nt(t,e)?W.from(t[e]):W.none()},Nt=function(t,e){return xt.call(t,e)},Rt=function(t,e){return Nt(t,e)&&void 0!==t[e]&&null!==t[e]},zt=function(t,e,n){return void 0===n&&(n=d),f(n).eq(t,e)},Bt=Array.isArray,Pt=function(t){if(Bt(t))return t;for(var e=[],n=0,r=t.length;n<r;n++)e[n]=t[n];return e},It=function(t,e,n){var r,o;if(!t)return!1;if(n=n||t,void 0!==t.length){for(r=0,o=t.length;r<o;r++)if(!1===e.call(n,t[r],r,t))return!1}else for(r in t)if(Nt(t,r)&&!1===e.call(n,t[r],r,t))return!1;return!0},Lt=function(t,e){var n=[];return It(t,(function(r,o){n.push(e(r,o,t))})),n},Ht=function(t,e){var n=[];return It(t,(function(r,o){e&&!e(r,o,t)||n.push(r)})),n},Ft=function(t,e){if(t)for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},Vt=function(t,e,n,r){for(var o=C(n)?t[0]:n,i=0;i<t.length;i++)o=e.call(r,o,t[i],i);return o},jt=function(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)if(e.call(n,t[r],r,t))return r;return-1},Ut=function(t){return t[t.length-1]},Wt=function(){return Wt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Wt.apply(this,arguments)};function $t(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function qt(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var Gt=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},Kt=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:D(o),isiPhone:D(i),isTablet:D(c),isPhone:D(s),isTouch:D(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:D(l),isDesktop:D(f)}},Xt=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},Yt=function(t,e){var n=Xt(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Qt(r(1),r(2))},Jt=function(t,e){var n=String(e).toLowerCase();return 0===t.length?Zt():Yt(t,n)},Zt=function(){return Qt(0,0)},Qt=function(t,e){return{major:t,minor:e}},te={nu:Qt,detect:Jt,unknown:Zt},ee=function(t,e){return yt(e.brands,(function(e){var n=e.brand.toLowerCase();return at(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:te.nu(parseInt(e.version,10),0)}}))}))},ne=function(t,e){var n=String(e).toLowerCase();return at(t,(function(t){return t.search(n)}))},re=function(t,e){return ne(t,e).map((function(t){var n=te.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},oe=function(t,e){return ne(t,e).map((function(t){var n=te.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},ie=function(t,e){return t.substring(e)},ae=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},ue=function(t,e){return se(t,e)?ie(t,e.length):t},ce=function(t,e){return-1!==t.indexOf(e)},se=function(t,e){return ae(t,e,0)},le=function(t){return function(e){return e.replace(t,"")}},fe=le(/^\s+|\s+$/g),de=le(/^\s+/g),me=le(/\s+$/g),ge=function(t){return t.length>0},he=function(t){return!ge(t)},pe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ve=function(t){return function(e){return ce(e,t)}},be=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return ce(t,"edge/")&&ce(t,"chrome")&&ce(t,"safari")&&ce(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,pe],search:function(t){return ce(t,"chrome")&&!ce(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return ce(t,"msie")||ce(t,"trident")}},{name:"Opera",versionRegexes:[pe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ve("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ve("firefox")},{name:"Safari",versionRegexes:[pe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(ce(t,"safari")||ce(t,"mobile/"))&&ce(t,"applewebkit")}}],ye=[{name:"Windows",search:ve("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return ce(t,"iphone")||ce(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ve("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ve("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ve("linux"),versionRegexes:[]},{name:"Solaris",search:ve("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ve("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ve("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],we={browsers:D(be),oses:D(ye)},xe="Edge",Ce="Chrome",Se="IE",ke="Opera",Te="Firefox",Oe="Safari",_e=function(){return Ee({current:void 0,version:te.unknown()})},Ee=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(xe),isChrome:r(Ce),isIE:r(Se),isOpera:r(ke),isFirefox:r(Te),isSafari:r(Oe)}},Ae={unknown:_e,nu:Ee,edge:D(xe),chrome:D(Ce),ie:D(Se),opera:D(ke),firefox:D(Te),safari:D(Oe)},De="Windows",Me="iOS",Ne="Android",Re="Linux",ze="OSX",Be="Solaris",Pe="FreeBSD",Ie="ChromeOS",Le=function(){return He({current:void 0,version:te.unknown()})},He=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(De),isiOS:r(Me),isAndroid:r(Ne),isOSX:r(ze),isLinux:r(Re),isSolaris:r(Be),isFreeBSD:r(Pe),isChromeOS:r(Ie)}},Fe={unknown:Le,nu:He,windows:D(De),ios:D(Me),android:D(Ne),linux:D(Re),osx:D(ze),solaris:D(Be),freebsd:D(Pe),chromeos:D(Ie)},Ve=function(t,e,n){var r=we.browsers(),o=we.oses(),i=e.bind((function(t){return ee(r,t)})).orThunk((function(){return re(r,t)})).fold(Ae.unknown,Ae.nu),a=oe(o,t).fold(Fe.unknown,Fe.nu),u=Kt(a,i,t,n);return{browser:i,os:a,deviceType:u}},je={detect:Ve},Ue=function(t){return window.matchMedia(t).matches},We=Gt((function(){return je.detect(navigator.userAgent,W.from(navigator.userAgentData),Ue)})),$e=function(){return We()},qe=navigator.userAgent,Ge=$e(),Ke=Ge.browser,Xe=Ge.os,Ye=Ge.deviceType,Je=/WebKit/.test(qe)&&!Ke.isEdge(),Ze="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,Qe=-1!==qe.indexOf("Windows Phone"),tn={opera:Ke.isOpera(),webkit:Je,ie:!(!Ke.isIE()&&!Ke.isEdge())&&Ke.version.major,gecko:Ke.isFirefox(),mac:Xe.isOSX()||Xe.isiOS(),iOS:Ye.isiPad()||Ye.isiPhone(),android:Xe.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ke.isIE()?document.documentMode||7:10,fileApi:Ze,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ke.isIE(),desktop:Ye.isDesktop(),windowsPhone:Qe,browser:{current:Ke.current,version:Ke.version,isChrome:Ke.isChrome,isEdge:Ke.isEdge,isFirefox:Ke.isFirefox,isIE:Ke.isIE,isOpera:Ke.isOpera,isSafari:Ke.isSafari},os:{current:Xe.current,version:Xe.version,isAndroid:Xe.isAndroid,isChromeOS:Xe.isChromeOS,isFreeBSD:Xe.isFreeBSD,isiOS:Xe.isiOS,isLinux:Xe.isLinux,isOSX:Xe.isOSX,isSolaris:Xe.isSolaris,isWindows:Xe.isWindows},deviceType:{isDesktop:Ye.isDesktop,isiPad:Ye.isiPad,isiPhone:Ye.isiPhone,isPhone:Ye.isPhone,isTablet:Ye.isTablet,isTouch:Ye.isTouch,isWebView:Ye.isWebView}},en=/^\s*|\s*$/g,nn=function(t){return null===t||void 0===t?"":(""+t).replace(en,"")},rn=function(t,e){return e?!("array"!==e||!Bt(t))||typeof t===e:void 0!==t},on=function(t,e,n){var r;t=t||[],e=e||",","string"===typeof t&&(t=t.split(e)),n=n||{},r=t.length;while(r--)n[t[r]]={};return n},an=Nt,un=function(t,e,n){var r,o,i,a=this,u=0;t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t);var c=t[3].match(/(^|\.)(\w+)$/i)[2],s=a.createNS(t[3].replace(/\.\w+$/,""),n);if(!s[c]){if("static"===t[2])return s[c]=e,void(this.onCreate&&this.onCreate(t[2],t[3],s[c]));e[c]||(e[c]=function(){},u=1),s[c]=e[c],a.extend(s[c].prototype,e),t[5]&&(r=a.resolve(t[5]).prototype,o=t[5].match(/\.(\w+)$/i)[1],i=s[c],s[c]=u?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},s[c].prototype[c]=s[c],a.each(r,(function(t,e){s[c].prototype[e]=r[e]})),a.each(e,(function(t,e){r[e]?s[c].prototype[e]=function(){return this.parent=r[e],t.apply(this,arguments)}:e!==c&&(s[c].prototype[e]=t)}))),a.each(e.static,(function(t,e){s[c][e]=t}))}},cn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];for(var i in o)if(Nt(o,i)){var a=o[i];void 0!==a&&(t[i]=a)}}return t},sn=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),It(t,(function(t,o){if(!1===e.call(r,t,o,n))return!1;sn(t,e,n,r)})))},ln=function(t,e){var n,r;for(e=e||window,t=t.split("."),n=0;n<t.length;n++)r=t[n],e[r]||(e[r]={}),e=e[r];return e},fn=function(t,e){var n,r;for(e=e||window,t=t.split("."),n=0,r=t.length;n<r;n++)if(e=e[t[n]],!e)break;return e},dn=function(t,e){return!t||rn(t,"array")?t:Lt(t.split(e||","),nn)},mn=function(t){var e=tn.cacheSuffix;return e&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t},gn={trim:nn,isArray:Bt,is:rn,toArray:Pt,makeMap:on,each:It,map:Lt,grep:Ht,inArray:Ft,hasOwn:an,extend:cn,create:un,walk:sn,createNS:ln,resolve:fn,explode:dn,_addCacheSuffix:mn},hn=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return bn(r.childNodes[0])},pn=function(t,e){var n=e||document,r=n.createElement(t);return bn(r)},vn=function(t,e){var n=e||document,r=n.createTextNode(t);return bn(r)},bn=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},yn=function(t,e,n){return W.from(t.dom.elementFromPoint(e,n)).map(bn)},wn={fromHtml:hn,fromTag:pn,fromText:vn,fromDom:bn,fromPoint:yn},xn=function(t,e){var n=[],r=function(t){return n.push(t),e(t)},o=e(t);do{o=o.bind(r)}while(o.isSome());return n},Cn=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},Sn=function(t,e){return Cn(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},kn=8,Tn=9,On=11,_n=1,En=3,An=function(t,e){var n=t.dom;if(n.nodeType!==_n)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Dn=function(t){return t.nodeType!==_n&&t.nodeType!==Tn&&t.nodeType!==On||0===t.childElementCount},Mn=function(t,e){var n=void 0===e?document:e.dom;return Dn(n)?[]:Z(n.querySelectorAll(t),wn.fromDom)},Nn=function(t,e){var n=void 0===e?document:e.dom;return Dn(n)?W.none():W.from(n.querySelector(t)).map(wn.fromDom)},Rn=function(t,e){return t.dom===e.dom},zn=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},Bn=function(t,e){return Sn(t.dom,e.dom)},Pn=function(t,e){return $e().browser.isIE()?Bn(t,e):zn(t,e)};"undefined"!==typeof window?window:Function("return this;")();var In=function(t){var e=t.dom.nodeName;return e.toLowerCase()},Ln=function(t){return t.dom.nodeType},Hn=function(t){return function(e){return Ln(e)===t}},Fn=function(t){return Ln(t)===kn||"#comment"===In(t)},Vn=Hn(_n),jn=Hn(En),Un=Hn(Tn),Wn=Hn(On),$n=function(t){return function(e){return Vn(e)&&In(e)===t}},qn=function(t){return wn.fromDom(t.dom.ownerDocument)},Gn=function(t){return Un(t)?t:qn(t)},Kn=function(t){return wn.fromDom(Gn(t).dom.documentElement)},Xn=function(t){return wn.fromDom(Gn(t).dom.defaultView)},Yn=function(t){return W.from(t.dom.parentNode).map(wn.fromDom)},Jn=function(t,e){var n=T(e)?e:L,r=t.dom,o=[];while(null!==r.parentNode&&void 0!==r.parentNode){var i=r.parentNode,a=wn.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},Zn=function(t){var e=function(e){return nt(e,(function(e){return!Rn(t,e)}))};return Yn(t).map(rr).map(e).getOr([])},Qn=function(t){return W.from(t.dom.previousSibling).map(wn.fromDom)},tr=function(t){return W.from(t.dom.nextSibling).map(wn.fromDom)},er=function(t){return ft(xn(t,Qn))},nr=function(t){return xn(t,tr)},rr=function(t){return Z(t.dom.childNodes,wn.fromDom)},or=function(t,e){var n=t.dom.childNodes;return W.from(n[e]).map(wn.fromDom)},ir=function(t){return or(t,0)},ar=function(t){return or(t,t.dom.childNodes.length-1)},ur=function(t){return t.dom.childNodes.length},cr=function(t){var e=t.dom.head;if(null===e||void 0===e)throw new Error("Head is not available yet");return wn.fromDom(e)},sr=function(t){return Wn(t)&&k(t.dom.host)},lr=T(Element.prototype.attachShadow)&&T(Node.prototype.getRootNode),fr=D(lr),dr=lr?function(t){return wn.fromDom(t.dom.getRootNode())}:Gn,mr=function(t){return sr(t)?t:cr(Gn(t))},gr=function(t){var e=dr(t);return sr(e)?W.some(e):W.none()},hr=function(t){return wn.fromDom(t.dom.host)},pr=function(t){if(fr()&&k(t.target)){var e=wn.fromDom(t.target);if(Vn(e)&&vr(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return pt(n)}}return W.from(t.target)},vr=function(t){return k(t.dom.shadowRoot)},br=function(t,e){var n=Yn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},yr=function(t,e){var n=tr(t);n.fold((function(){var n=Yn(t);n.each((function(t){xr(t,e)}))}),(function(t){br(t,e)}))},wr=function(t,e){var n=ir(t);n.fold((function(){xr(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},xr=function(t,e){t.dom.appendChild(e.dom)},Cr=function(t,e){br(t,e),xr(e,t)},Sr=function(t,e){Q(e,(function(e){br(t,e)}))},kr=function(t,e){Q(e,(function(e){xr(t,e)}))},Tr=function(t){t.dom.textContent="",Q(rr(t),(function(t){Or(t)}))},Or=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},_r=function(t){var e=rr(t);e.length>0&&Sr(t,e),Or(t)},Er=function(t){var e=jn(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return gr(wn.fromDom(e)).fold((function(){return n.body.contains(e)}),A(Er,hr))},Ar=function(t,e){var n=function(n,r){return Ar(t+n,e+r)};return{left:t,top:e,translate:n}},Dr=Ar,Mr=function(t){var e=t.getBoundingClientRect();return Dr(e.left,e.top)},Nr=function(t,e){return void 0!==t?t:void 0!==e?e:0},Rr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Dr(n.offsetLeft,n.offsetTop);var i=Nr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=Nr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=Nr(o.clientTop,n.clientTop),c=Nr(o.clientLeft,n.clientLeft);return zr(t).translate(a-c,i-u)},zr=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?Dr(r.offsetLeft,r.offsetTop):Er(t)?Mr(e):Dr(0,0)},Br=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Dr(n,r)},Pr=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},Ir=function(t,e){var n=$e().browser.isSafari();n&&T(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},Lr=function(t){var e=void 0===t?window:t;return $e().browser.isFirefox()?W.none():W.from(e["visualViewport"])},Hr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Fr=function(t){var e=void 0===t?window:t,n=e.document,r=Br(wn.fromDom(n));return Lr(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Hr(r.left,r.top,n,o)}),(function(t){return Hr(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Vr=function(t){return function(e){return!!e&&e.nodeType===t}},jr=function(t){return!!t&&!Object.getPrototypeOf(t)},Ur=Vr(1),Wr=function(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return Y(e,n)}return!1}},$r=function(t,e){var n=e.toLowerCase().split(" ");return function(e){if(Ur(e))for(var r=0;r<n.length;r++){var o=e.ownerDocument.defaultView.getComputedStyle(e,null),i=o?o.getPropertyValue(t):null;if(i===n[r])return!0}return!1}},qr=function(t){return function(e){return Ur(e)&&e.hasAttribute(t)}},Gr=function(t,e){return function(n){return Ur(n)&&n.getAttribute(t)===e}},Kr=function(t){return Ur(t)&&t.hasAttribute("data-mce-bogus")},Xr=function(t){return Ur(t)&&"all"===t.getAttribute("data-mce-bogus")},Yr=function(t){return Ur(t)&&"TABLE"===t.tagName},Jr=function(t){return function(e){if(Ur(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Zr=Wr(["textarea","input"]),Qr=Vr(3),to=Vr(8),eo=Vr(9),no=Vr(11),ro=Wr(["br"]),oo=Wr(["img"]),io=Jr("true"),ao=Jr("false"),uo=Wr(["td","th"]),co=Wr(["video","audio","object","embed"]),so=function(t,e,n){return void 0===n&&(n=N),t.exists((function(t){return n(t,e)}))},lo=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},fo=function(t,e,n){return t.isSome()&&e.isSome()?W.some(n(t.getOrDie(),e.getOrDie())):W.none()},mo=function(t,e,n,r){return t.isSome()&&e.isSome()&&n.isSome()?W.some(r(t.getOrDie(),e.getOrDie(),n.getOrDie())):W.none()},go=function(t,e){return t?W.some(e):W.none()},ho=function(t){return void 0!==t.style&&T(t.style.getPropertyValue)},po=function(t,e,n){if(!(v(n)||x(n)||O(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},vo=function(t,e,n){po(t.dom,e,n)},bo=function(t,e){var n=t.dom;Ct(e,(function(t,e){po(n,e,t)}))},yo=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},wo=function(t,e){return W.from(yo(t,e))},xo=function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},Co=function(t,e){t.dom.removeAttribute(e)},So=function(t){return ot(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},ko=function(t,e,n){if(!v(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);ho(t)&&t.style.setProperty(e,n)},To=function(t,e){var n=t.dom;Ct(e,(function(t,e){ko(n,e,t)}))},Oo=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||Er(t)?o:_o(n,e)},_o=function(t,e){return ho(t)?t.style.getPropertyValue(e):""},Eo=function(t,e){var n=t.dom,r=_o(n,e);return W.from(r).filter((function(t){return t.length>0}))},Ao=function(t){var e={},n=t.dom;if(ho(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},Do=function(t){return t.dom.offsetWidth},Mo=$e().browser,No=function(t){return at(t,Vn)},Ro=function(t){return Mo.isFirefox()&&"table"===In(t)?No(rr(t)).filter((function(t){return"caption"===In(t)})).bind((function(t){return No(nr(t)).map((function(e){var n=e.dom.offsetTop,r=t.dom.offsetTop,o=t.dom.offsetHeight;return n<=r?-o:0}))})).getOr(0):0},zo=function(t,e){return t.children&&Y(t.children,e)},Bo=function(t,e,n){var r=0,o=0,i=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&"static"===Oo(wn.fromDom(t),"position")){var a=e.getBoundingClientRect();return r=a.left+(i.documentElement.scrollLeft||t.scrollLeft)-i.documentElement.clientLeft,o=a.top+(i.documentElement.scrollTop||t.scrollTop)-i.documentElement.clientTop,{x:r,y:o}}var u=e;while(u&&u!==n&&u.nodeType&&!zo(u,n)){var c=u;r+=c.offsetLeft||0,o+=c.offsetTop||0,u=c.offsetParent}u=e.parentNode;while(u&&u!==n&&u.nodeType&&!zo(u,n))r-=u.scrollLeft||0,o-=u.scrollTop||0,u=u.parentNode;o+=Ro(wn.fromDom(e))}return{x:r,y:o}},Po={},Io={exports:Po};(function(t,n,r,o){(function(e,o){"object"===typeof n&&"undefined"!==typeof r?r.exports=o():"function"===typeof t&&t.amd?t(o):(e="undefined"!==typeof globalThis?globalThis:e||self,e.EphoxContactWrapper=o())})(this,(function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},n={exports:{}};(function(e){(function(t){var n=setTimeout;function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function a(t,e){while(3===t._state)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}u(e.promise,r)}else(1===t._state?u:c)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===typeof e||"function"===typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"===typeof n)return void f(o(n,e),t)}t._state=1,t._value=e,s(t)}catch(r){c(t,r)}}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,u(e,t))}),(function(t){n||(n=!0,c(e,t))}))}catch(r){if(n)return;n=!0,c(e,r)}}i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return a(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"===typeof a||"function"===typeof a)){var u=a.then;if("function"===typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0===--r&&t(e)}catch(c){n(c)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},i.resolve=function(t){return t&&"object"===typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},i._immediateFn="function"===typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},e.exports?e.exports=i:t.Promise||(t.Promise=i)})(t)})(n);var r=n.exports,o=function(){return"undefined"!==typeof window?window:Function("return this;")()}(),i={boltExport:o.Promise||r};return i}))})(void 0,Po,Io);var Lo=Io.exports.boltExport,Ho=function(t){var e=W.none(),n=[],r=function(t){return Ho((function(e){o((function(n){e(t(n))}))}))},o=function(t){a()?c(t):n.push(t)},i=function(t){a()||(e=W.some(t),u(n),n=[])},a=function(){return e.isSome()},u=function(t){Q(t,c)},c=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t(i),{get:o,map:r,isReady:a}},Fo=function(t){return Ho((function(e){e(t)}))},Vo={nu:Ho,pure:Fo},jo=function(t){setTimeout((function(){throw t}),0)},Uo=function(t){var e=function(e){t().then(e,jo)},n=function(e){return Uo((function(){return t().then(e)}))},r=function(e){return Uo((function(){return t().then((function(t){return e(t).toPromise()}))}))},o=function(e){return Uo((function(){return t().then((function(){return e.toPromise()}))}))},i=function(){return Vo.nu(e)},a=function(){var e=null;return Uo((function(){return null===e&&(e=t()),e}))},u=t;return{map:n,bind:r,anonBind:o,toLazy:i,toCached:a,toPromise:u,get:e}},Wo=function(t){return Uo((function(){return new Lo(t)}))},$o=function(t){return Uo((function(){return Lo.resolve(t)}))},qo={nu:Wo,pure:$o},Go=function(t,e){return e((function(e){var n=[],r=0,o=function(o){return function(i){n[o]=i,r++,r>=t.length&&e(n)}};0===t.length?e([]):Q(t,(function(t,e){t.get(o(e))}))}))},Ko=function(t){return Go(t,qo.nu)},Xo=function(t){var e=function(e){return Xo(t)},n=function(e){return Xo(t)},r=function(e){return Xo(e(t))},o=function(e){return Xo(t)},i=function(e){e(t)},a=function(e){return e(t)},u=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return W.some(t)};return{isValue:H,isError:L,getOr:D(t),getOrThunk:D(t),getOrDie:D(t),or:e,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:c,forall:s,toOptional:l}},Yo=function(t){var e=function(t){return t()},n=function(){return B(String(t))()},r=M,o=function(t){return t()},i=function(e){return Yo(t)},a=function(e){return Yo(e(t))},u=function(e){return Yo(t)},c=function(e,n){return e(t)};return{isValue:L,isError:H,getOr:M,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:a,each:_,bind:u,exists:L,forall:H,toOptional:W.none}},Jo=function(t,e){return t.fold((function(){return Yo(e)}),Xo)},Zo={value:Xo,error:Yo,fromOption:Jo},Qo=function(t){if(!y(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return Q(t,(function(r,o){var i=wt(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!y(u))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);var c=function(t){var r=wt(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=lt(e,(function(t){return Y(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:c,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n},ti={generate:Qo};ti.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ei=function(t){return t.fold(M,M)};function ni(t,e,n,r,o){return t(n,r)?W.some(n):T(o)&&o(n)?W.none():e(n,r,o)}var ri,oi,ii,ai,ui,ci,si,li,fi,di,mi,gi,hi,pi,vi,bi,yi,wi,xi,Ci=function(t,e,n){var r=t.dom,o=T(n)?n:L;while(r.parentNode){r=r.parentNode;var i=wn.fromDom(r);if(e(i))return W.some(i);if(o(i))break}return W.none()},Si=function(t,e,n){var r=function(t,e){return e(t)};return ni(r,Ci,t,e,n)},ki=function(t,e){var n=t.dom;return n.parentNode?Ti(wn.fromDom(n.parentNode),(function(n){return!Rn(t,n)&&e(n)})):W.none()},Ti=function(t,e){var n=function(t){return e(wn.fromDom(t))},r=at(t.dom.childNodes,n);return r.map(wn.fromDom)},Oi=function(t,e,n){return Ci(t,(function(t){return An(t,e)}),n)},_i=function(t,e){return Nn(e,t)},Ei=function(t,e,n){var r=function(t,e){return An(t,e)};return ni(r,Oi,t,e,n)},Ai=window.Promise?window.Promise:Lo,Di=function(t,e){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],o=function(t){window.setTimeout(t,0)},i=0;i<r.length&&!n;i++)n=window[r[i]+"RequestAnimationFrame"];n||(n=o),n(t,e)},Mi=function(t,e){return"number"!==typeof e&&(e=0),setTimeout(t,e)},Ni=function(t,e){return"number"!==typeof e&&(e=1),setInterval(t,e)},Ri=function(t){return clearTimeout(t)},zi=function(t){return clearInterval(t)},Bi=function(t,e){var n,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(n),n=Mi((function(){t.apply(this,r)}),e)};return r.stop=function(){clearTimeout(n)},r},Pi={requestAnimationFrame:function(t,e){ri?ri.then(t):ri=new Ai((function(t){e||(e=document.body),Di(t,e)})).then(t)},setTimeout:Mi,setInterval:Ni,setEditorTimeout:function(t,e,n){return Mi((function(){t.removed||e()}),n)},setEditorInterval:function(t,e,n){var r=Ni((function(){t.removed?clearInterval(r):e()}),n);return r},debounce:Bi,throttle:Bi,clearInterval:zi,clearTimeout:Ri},Ii=function(t,e){void 0===e&&(e={});var n=0,r={},o=wn.fromDom(t),i=Gn(o),a=e.maxLoadTime||5e3,u=function(t){e.referrerPolicy=t},c=function(t){xr(mr(o),t)},s=function(t){var e=mr(o);_i(e,"#"+t).each(Or)},l=function(t){return Mt(r,t).getOrThunk((function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}}))},f=function(n,o,u){var s,f=gn._addCacheSuffix(n),d=l(f);r[f]=d,d.count++;var m=function(t,e){var n=t.length;while(n--)t[n]();d.status=e,d.passed=[],d.failed=[],s&&(s.onload=null,s.onerror=null,s=null)},g=function(){return m(d.passed,2)},h=function(){return m(d.failed,3)},p=function(t,e){t()||(Date.now()-y<a?Pi.setTimeout(e):h())},v=function(){p((function(){var e=t.styleSheets,n=e.length;while(n--){var r=e[n],o=r.ownerNode;if(o&&o.id===s.id)return g(),!0}return!1}),v)};if(o&&d.passed.push(o),u&&d.failed.push(u),1!==d.status)if(2!==d.status)if(3!==d.status){d.status=1;var b=wn.fromTag("link",i.dom);bo(b,{rel:"stylesheet",type:"text/css",id:d.id});var y=Date.now();e.contentCssCors&&vo(b,"crossOrigin","anonymous"),e.referrerPolicy&&vo(b,"referrerpolicy",e.referrerPolicy),s=b.dom,s.onload=v,s.onerror=h,c(b),vo(b,"href",f)}else h();else g()},d=function(t){return qo.nu((function(e){f(t,E(e,D(Zo.value(t))),E(e,D(Zo.error(t))))}))},m=function(t,e,n){Ko(Z(t,d)).get((function(t){var r=et(t,(function(t){return t.isValue()}));r.fail.length>0?n(r.fail.map(ei)):e(r.pass.map(ei))}))},g=function(t){var e=gn._addCacheSuffix(t);Mt(r,e).each((function(t){var n=--t.count;0===n&&(delete r[e],s(t.id))}))},h=function(t){Q(t,(function(t){g(t)}))};return{load:f,loadAll:m,unload:g,unloadAll:h,_setReferrerPolicy:u}},Li=function(){var t=new WeakMap,e=function(e,n){var r=dr(e),o=r.dom;return W.from(t.get(o)).getOrThunk((function(){var e=Ii(o,n);return t.set(o,e),e}))};return{forElement:e}},Hi=Li(),Fi=function(){function t(t,e){this.node=t,this.rootNode=e,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return t.prototype.current=function(){return this.node},t.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},t.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},t.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},t.prototype.findSibling=function(t,e,n,r){var o,i;if(t){if(!r&&t[e])return t[e];if(t!==this.rootNode){if(o=t[n],o)return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n],o)return o}}},t.prototype.findPreviousNode=function(t,e,n,r){var o,i,a;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[e];a;a=a[e])if(!a[e])return a;return o}if(i=t.parentNode,i&&i!==this.rootNode)return i}},t}(),Vi=["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"],ji=["td","th"],Ui=["thead","tbody","tfoot"],Wi=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],$i=["h1","h2","h3","h4","h5","h6"],qi=["li","dd","dt"],Gi=["ul","ol","dl"],Ki=["pre","script","textarea","style"],Xi=function(t){var e;return function(n){return e=e||mt(t,H),Nt(e,In(n))}},Yi=Xi($i),Ji=Xi(Vi),Zi=function(t){return"table"===In(t)},Qi=function(t){return Vn(t)&&!Ji(t)},ta=function(t){return Vn(t)&&"br"===In(t)},ea=Xi(Wi),na=Xi(Gi),ra=Xi(qi),oa=Xi(Ui),ia=Xi(ji),aa=Xi(Ki),ua=function(t,e,n){return Oi(t,e,n).isSome()},ca="\ufeff",sa=" ",la=function(t){return t===ca},fa=function(t){return t.replace(/\uFEFF/g,"")},da=ca,ma=la,ga=fa,ha=Ur,pa=Qr,va=function(t){return pa(t)&&(t=t.parentNode),ha(t)&&t.hasAttribute("data-mce-caret")},ba=function(t){return pa(t)&&ma(t.data)},ya=function(t){return va(t)||ba(t)},wa=function(t){return t.firstChild!==t.lastChild||!ro(t.firstChild)},xa=function(t,e){var n=t.ownerDocument,r=n.createTextNode(da),o=t.parentNode;if(e){i=t.previousSibling;if(pa(i)){if(ya(i))return i;if(_a(i))return i.splitText(i.data.length-1)}o.insertBefore(r,t)}else{var i=t.nextSibling;if(pa(i)){if(ya(i))return i;if(Oa(i))return i.splitText(1),i}t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r)}return r},Ca=function(t){var e=t.container();return!!Qr(e)&&(e.data.charAt(t.offset())===da||t.isAtStart()&&ba(e.previousSibling))},Sa=function(t){var e=t.container();return!!Qr(e)&&(e.data.charAt(t.offset()-1)===da||t.isAtEnd()&&ba(e.nextSibling))},ka=function(){var t=document.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},Ta=function(t,e,n){var r=e.ownerDocument,o=r.createElement(t);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(ka());var i=e.parentNode;return n?i.insertBefore(o,e):e.nextSibling?i.insertBefore(o,e.nextSibling):i.appendChild(o),o},Oa=function(t){return pa(t)&&t.data[0]===da},_a=function(t){return pa(t)&&t.data[t.data.length-1]===da},Ea=function(t){var e=t.getElementsByTagName("br"),n=e[e.length-1];Kr(n)&&n.parentNode.removeChild(n)},Aa=function(t){return t&&t.hasAttribute("data-mce-caret")?(Ea(t),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null},Da=function(t){return va(t.startContainer)},Ma=io,Na=ao,Ra=ro,za=Qr,Ba=Wr(["script","style","textarea"]),Pa=Wr(["img","input","textarea","hr","iframe","video","audio","object","embed"]),Ia=Wr(["table"]),La=ya,Ha=function(t){return!La(t)&&(za(t)?!Ba(t.parentNode):Pa(t)||Ra(t)||Ia(t)||Va(t))},Fa=function(t){return Ur(t)&&"true"===t.getAttribute("unselectable")},Va=function(t){return!1===Fa(t)&&Na(t)},ja=function(t,e){for(t=t.parentNode;t&&t!==e;t=t.parentNode){if(Va(t))return!1;if(Ma(t))return!0}return!0},Ua=function(t){return!!Va(t)&&!0!==ot(bt(t.getElementsByTagName("*")),(function(t,e){return t||Ma(e)}),!1)},Wa=function(t){return Pa(t)||Ua(t)},$a=function(t,e){return Ha(t)&&ja(t,e)},qa=/^[ \t\r\n]*$/,Ga=function(t){return qa.test(t)},Ka=function(t,e){var n=wn.fromDom(e),r=wn.fromDom(t);return ua(r,"pre,code",R(Rn,n))},Xa=function(t,e){return Qr(t)&&Ga(t.data)&&!1===Ka(t,e)},Ya=function(t){return Ur(t)&&"A"===t.nodeName&&!t.hasAttribute("href")&&(t.hasAttribute("name")||t.hasAttribute("id"))},Ja=function(t,e){return Ha(t)&&!1===Xa(t,e)||Ya(t)||Za(t)},Za=qr("data-mce-bookmark"),Qa=qr("data-mce-bogus"),tu=Gr("data-mce-bogus","all"),eu=function(t,e){var n=0;if(Ja(t,t))return!1;var r=t.firstChild;if(!r)return!0;var o=new Fi(r,t);do{if(e){if(tu(r)){r=o.next(!0);continue}if(Qa(r)){r=o.next();continue}}if(ro(r))n++,r=o.next();else{if(Ja(r,t))return!1;r=o.next()}}while(r);return n<=1},nu=function(t,e){return void 0===e&&(e=!0),eu(t.dom,e)},ru=function(t){return"span"===t.nodeName.toLowerCase()},ou=function(t,e){return k(t)&&(Ja(t,e)||Qi(wn.fromDom(t)))},iu=function(t,e){var n=new Fi(t,e).prev(!1),r=new Fi(t,e).next(!1),o=C(n)||ou(n,e),i=C(r)||ou(r,e);return o&&i},au=function(t){return ru(t)&&"bookmark"===t.getAttribute("data-mce-type")},uu=function(t,e){return Qr(t)&&t.data.length>0&&iu(t,e)},cu=function(t){return!!Ur(t)&&t.childNodes.length>0},su=function(t){return no(t)||eo(t)},lu=function(t,e,n){var r=n||e;if(Ur(e)&&au(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)lu(t,o[i],r);if(Ur(e)){var a=e.childNodes;1===a.length&&au(a[0])&&e.parentNode.insertBefore(a[0],e)}return su(e)||Ja(e,r)||cu(e)||uu(e,r)||t.remove(e),e},fu=gn.makeMap,du=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mu=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gu=/[<>&\"\']/g,hu=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,pu={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:"Ÿ"},vu={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},bu={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},yu=function(t){var e=wn.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t},wu=function(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n<t.length;n+=2)r=String.fromCharCode(parseInt(t[n],e)),vu[r]||(o="&"+t[n+1]+";",i[r]=o,i[o]=r);return i}},xu=wu("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),Cu=function(t,e){return t.replace(e?du:mu,(function(t){return vu[t]||t}))},Su=function(t){return(""+t).replace(gu,(function(t){return vu[t]||t}))},ku=function(t,e){return t.replace(e?du:mu,(function(t){return t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":vu[t]||"&#"+t.charCodeAt(0)+";"}))},Tu=function(t,e,n){return n=n||xu,t.replace(e?du:mu,(function(t){return vu[t]||n[t]||t}))},Ou=function(t,e){var n=wu(e)||xu,r=function(t,e){return t.replace(e?du:mu,(function(t){return void 0!==vu[t]?vu[t]:void 0!==n[t]?n[t]:t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"}))},o=function(t,e){return Tu(t,e,n)},i=fu(t.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?e?o:Tu:i.numeric?ku:Cu},_u=function(t){return t.replace(hu,(function(t,e){return e?(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10),e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):pu[e]||String.fromCharCode(e)):bu[t]||xu[t]||yu(t)}))},Eu={encodeRaw:Cu,encodeAllRaw:Su,encodeNumeric:ku,encodeNamed:Tu,getEncodeFunc:Ou,decode:_u},Au={},Du={},Mu=gn.makeMap,Nu=gn.each,Ru=gn.extend,zu=gn.explode,Bu=gn.inArray,Pu=function(t,e){return t=gn.trim(t),t?t.split(e||" "):[]},Iu=function(t){var e,n,r,o,i,a,u={},c=function(t,n,r){var o,i,a,c=function(t,e){var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e||{};return o};r=r||[],n=n||"","string"===typeof r&&(r=Pu(r));var s=Pu(t);o=s.length;while(o--)i=Pu([e,n].join(" ")),a={attributes:c(i),attributesOrder:i,children:c(r,Du)},u[s[o]]=a},s=function(t,e){var n,r,o,i,a=Pu(t);n=a.length;var c=Pu(e);while(n--)for(r=u[a[n]],o=0,i=c.length;o<i;o++)r.attributes[c[o]]={},r.attributesOrder.push(c[o])};return Au[t]?Au[t]:(e="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="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"!==t&&(e+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(e+=" xml:lang",a="acronym applet basefont big font strike tt",r=[r,a].join(" "),Nu(Pu(a),(function(t){c(t,"",r)})),i="center dir isindex noframes",n=[n,i].join(" "),o=[n,r].join(" "),Nu(Pu(i),(function(t){c(t,"",o)}))),o=o||[n,r].join(" "),c("html","manifest","head body"),c("head","","base command link meta noscript script style title"),c("title hr noscript br"),c("base","href target"),c("link","href rel media hreflang type sizes hreflang"),c("meta","name http-equiv content charset"),c("style","media type scoped"),c("script","src async defer type charset"),c("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),c("address dt dd div caption","",o),c("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","",r),c("blockquote","cite",o),c("ol","reversed start type","li"),c("ul","","li"),c("li","value",o),c("dl","","dt dd"),c("a","href target rel media hreflang type",r),c("q","cite",r),c("ins del","cite datetime",o),c("img","src sizes srcset alt usemap ismap width height"),c("iframe","src name width height",o),c("embed","src type width height"),c("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),c("param","name value"),c("map","name",[o,"area"].join(" ")),c("area","alt coords shape href target rel media hreflang type"),c("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),c("colgroup","span","col"),c("col","span"),c("tbody thead tfoot","","tr"),c("tr","","td th"),c("td","colspan rowspan headers",o),c("th","colspan rowspan headers scope abbr",o),c("form","accept-charset action autocomplete enctype method name novalidate target",o),c("fieldset","disabled form name",[o,"legend"].join(" ")),c("label","form for",r),c("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"),c("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?o:r),c("select","disabled form multiple name required size","option optgroup"),c("optgroup","disabled label","option"),c("option","disabled label selected value"),c("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),c("menu","type label",[o,"li"].join(" ")),c("noscript","",o),"html4"!==t&&(c("wbr"),c("ruby","",[r,"rt rp"].join(" ")),c("figcaption","",o),c("mark rt rp summary bdi","",r),c("canvas","width height",o),c("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),c("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),c("picture","","img source"),c("source","src srcset type media sizes"),c("track","kind src srclang label default"),c("datalist","",[r,"option"].join(" ")),c("article section nav aside main header footer","",o),c("hgroup","","h1 h2 h3 h4 h5 h6"),c("figure","",[o,"figcaption"].join(" ")),c("time","datetime",r),c("dialog","open",o),c("command","type label icon disabled checked radiogroup command"),c("output","for form name",r),c("progress","value max",r),c("meter","value min max low high optimum",r),c("details","open",[o,"summary"].join(" ")),c("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(s("script","language xml:space"),s("style","xml:space"),s("object","declare classid code codebase codetype archive standby align border hspace vspace"),s("embed","align name hspace vspace"),s("param","valuetype type"),s("a","charset name rev shape coords"),s("br","clear"),s("applet","codebase archive code object alt name width height align hspace vspace"),s("img","name longdesc align border hspace vspace"),s("iframe","longdesc frameborder marginwidth marginheight scrolling align"),s("font basefont","size color face"),s("input","usemap align"),s("select"),s("textarea"),s("h1 h2 h3 h4 h5 h6 div p legend caption","align"),s("ul","type compact"),s("li","type"),s("ol dl menu dir","compact"),s("pre","width xml:space"),s("hr","align noshade size width"),s("isindex","prompt"),s("table","summary width frame rules cellspacing cellpadding align bgcolor"),s("col","width align char charoff valign"),s("colgroup","width align char charoff valign"),s("thead","align char charoff valign"),s("tr","align char charoff valign bgcolor"),s("th","axis align char charoff valign nowrap bgcolor width height"),s("form","accept"),s("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),s("tfoot","align char charoff valign"),s("tbody","align char charoff valign"),s("area","nohref"),s("body","background bgcolor text link vlink alink")),"html4"!==t&&(s("input button select textarea","autofocus"),s("input textarea","placeholder"),s("a","download"),s("link script img","crossorigin"),s("img","loading"),s("iframe","sandbox seamless allowfullscreen loading")),Nu(Pu("a form meter progress dfn"),(function(t){u[t]&&delete u[t].children[t]})),delete u.caption.children.table,delete u.script,Au[t]=u,u)},Lu=function(t,e){var n;return t&&(n={},"string"===typeof t&&(t={"*":t}),Nu(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?Mu(t,/[, ]/):zu(t,/[, ]/)}))),n},Hu=function(t){var e={},n={},r=[],o={},i={},a=function(e,n,r){var o=t[e];return o?o=Mu(o,/[, ]/,Mu(o.toUpperCase(),/[, ]/)):(o=Au[e],o||(o=Mu(n," ",Mu(n.toUpperCase()," ")),o=Ru(o,r),Au[e]=o)),o};t=t||{};var u=Iu(t.schema);!1===t.verify_html&&(t.valid_elements="*[*]");var c=Lu(t.valid_styles),s=Lu(t.invalid_styles,"map"),l=Lu(t.valid_classes,"map"),f=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),d=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),m=a("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),g=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),h="td th iframe video audio object script code",p=a("non_empty_elements",h+" pre",m),v=a("move_caret_before_on_enter_elements",h+" table",m),b=a("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"),y=a("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",b),w=a("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp");Nu((t.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),(function(t){i[t]=new RegExp("</"+t+"[^>]*>","gi")}));var x=function(t){return new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$")},C=function(t){var n,o,i,a,u,c,s,l,f,d,m,g,h,p,v,b,y,w,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,k=/[*?+]/;if(t){var T=Pu(t,",");for(e["@"]&&(b=e["@"].attributes,y=e["@"].attributesOrder),n=0,o=T.length;n<o;n++)if(u=C.exec(T[n]),u){if(p=u[1],f=u[2],v=u[3],l=u[5],g={},h=[],c={attributes:g,attributesOrder:h},"#"===p&&(c.paddEmpty=!0),"-"===p&&(c.removeEmpty=!0),"!"===u[4]&&(c.removeEmptyAttrs=!0),b&&(Ct(b,(function(t,e){g[e]=t})),h.push.apply(h,y)),l)for(l=Pu(l,"|"),i=0,a=l.length;i<a;i++)if(u=S.exec(l[i]),u){if(s={},m=u[1],d=u[2].replace(/[\\:]:/g,":"),p=u[3],w=u[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(d),s.required=!0),"-"===m){delete g[d],h.splice(Bu(h,d),1);continue}p&&("="===p&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:d,value:w}),s.defaultValue=w),":"===p&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:d,value:w}),s.forcedValue=w),"<"===p&&(s.validValues=Mu(w,"?"))),k.test(d)?(c.attributePatterns=c.attributePatterns||[],s.pattern=x(d),c.attributePatterns.push(s)):(g[d]||h.push(d),g[d]=s)}b||"@"!==f||(b=g,y=h),v&&(c.outputName=f,e[v]=c),k.test(f)?(c.pattern=x(f),r.push(c)):e[f]=c}}},S=function(t){e={},r=[],C(t),Nu(u,(function(t,e){n[e]=t.children}))},k=function(t){var r=/^(~)?(.+)$/;t&&(Au.text_block_elements=Au.block_elements=null,Nu(Pu(t,","),(function(t){var i=r.exec(t),a="~"===i[1],u=a?"span":"div",c=i[2];if(n[c]=n[u],o[c]=u,a||(y[c.toUpperCase()]={},y[c]={}),!e[c]){var s=e[u];s=Ru({},s),delete s.removeEmptyAttrs,delete s.removeEmpty,e[c]=s}Nu(n,(function(t,e){t[u]&&(n[e]=t=Ru({},n[e]),t[c]=t[u])}))})))},T=function(e){var r=/^([+\-]?)([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]+)\[([^\]]+)]$/;Au[t.schema]=null,e&&Nu(Pu(e,","),(function(t){var e,o,i=r.exec(t);i&&(o=i[1],e=o?n[i[2]]:n[i[2]]={"#comment":{}},e=n[i[2]],Nu(Pu(i[3],"|"),(function(t){"-"===o?delete e[t]:e[t]={}})))}))},O=function(t){var n,o=e[t];if(o)return o;n=r.length;while(n--)if(o=r[n],o.pattern.test(t))return o};t.valid_elements?S(t.valid_elements):(Nu(u,(function(t,r){e[r]={attributes:t.attributes,attributesOrder:t.attributesOrder},n[r]=t.children})),"html5"!==t.schema&&Nu(Pu("strong/b em/i"),(function(t){var n=Pu(t,"/");e[n[1]].outputName=n[0]})),Nu(Pu("ol ul sub sup blockquote span font a table tbody strong em b i"),(function(t){e[t]&&(e[t].removeEmpty=!0)})),Nu(Pu("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(t){e[t].paddEmpty=!0})),Nu(Pu("span"),(function(t){e[t].removeEmptyAttrs=!0}))),k(t.custom_elements),T(t.valid_children),C(t.extended_valid_elements),T("+ol[ul|ol],+ul[ul|ol]"),Nu({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(t,n){e[n]&&(e[n].parentsRequired=Pu(t))})),t.invalid_elements&&Nu(zu(t.invalid_elements),(function(t){e[t]&&delete e[t]})),O("span")||C("span[!data-mce-type|*]");var _=D(c),E=D(s),A=D(l),M=D(g),N=D(y),R=D(b),z=D(w),B=D(m),P=D(d),I=D(p),L=D(v),H=D(f),F=D(i),V=function(t,e){var r=n[t.toLowerCase()];return!(!r||!r[e.toLowerCase()])},j=function(t,e){var n,r,o=O(t);if(o){if(!e)return!0;if(o.attributes[e])return!0;if(n=o.attributePatterns,n){r=n.length;while(r--)if(n[r].pattern.test(t))return!0}}return!1},U=D(o);return{children:n,elements:e,getValidStyles:_,getValidClasses:A,getBlockElements:N,getInvalidStyles:E,getShortEndedElements:B,getTextBlockElements:R,getTextInlineElements:z,getBoolAttrs:M,getElementRule:O,getSelfClosingElements:P,getNonEmptyElements:I,getMoveCaretBeforeOnEnterElements:L,getWhiteSpaceElements:H,getSpecialElements:F,isValidChild:V,isValid:j,getCustomElements:U,addValidElements:C,setValidElements:S,addCustomElements:k,addValidChildren:T}},Fu=function(t,e,n,r){var o=function(t){return t=parseInt(t,10).toString(16),t.length>1?t:"0"+t};return"#"+o(e)+o(n)+o(r)},Vu=function(t,e){var n,r,o,i=this,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,u=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,l={},f=ca;t=t||{},e&&(r=e.getValidStyles(),o=e.getInvalidStyles());var d=("\\\" \\' \\; \\: ; : "+f).split(" ");for(n=0;n<d.length;n++)l[d[n]]=f+n,l[f+n]=d[n];return{toHex:function(t){return t.replace(a,Fu)},parse:function(e){var r,o,d,m,g={},h=t.url_converter,p=t.url_converter_scope||i,v=function(t,e,r){var o=g[t+"-top"+e];if(o){var i=g[t+"-right"+e];if(i){var a=g[t+"-bottom"+e];if(a){var u=g[t+"-left"+e];if(u){var c=[o,i,a,u];n=c.length-1;while(n--)if(c[n]!==c[n+1])break;n>-1&&r||(g[t+e]=-1===n?c[0]:c.join(" "),delete g[t+"-top"+e],delete g[t+"-right"+e],delete g[t+"-bottom"+e],delete g[t+"-left"+e])}}}}},b=function(t){var e,n=g[t];if(n){n=n.split(" "),e=n.length;while(e--)if(n[e]!==n[0])return!1;return g[t]=n[0],!0}},y=function(t,e,n,r){b(e)&&b(n)&&b(r)&&(g[t]=g[e]+" "+g[n]+" "+g[r],delete g[e],delete g[n],delete g[r])},w=function(t){return m=!0,l[t]},x=function(t,e){return m&&(t=t.replace(/\uFEFF[0-9]/g,(function(t){return l[t]}))),e||(t=t.replace(/\\([\'\";:])/g,"$1")),t},C=function(t){return String.fromCharCode(parseInt(t.slice(1),16))},S=function(t){return t.replace(/\\[0-9a-f]+/gi,C)},k=function(e,n,r,o,i,a){if(i=i||a,i)return i=x(i),"'"+i.replace(/\'/g,"\\'")+"'";if(n=x(n||r||o),!t.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!t.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return h&&(n=h.call(p,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(e){e=e.replace(/[\u0000-\u001F]/g,""),e=e.replace(/\\[\"\';:\uFEFF]/g,w).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(t){return t.replace(/[;:]/g,w)}));while(r=c.exec(e))if(c.lastIndex=r.index+r[0].length,o=r[1].replace(s,"").toLowerCase(),d=r[2].replace(s,""),o&&d){if(o=S(o),d=S(d),-1!==o.indexOf(f)||-1!==o.indexOf('"'))continue;if(!t.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(d)))continue;"font-weight"===o&&"700"===d?d="bold":"color"!==o&&"background-color"!==o||(d=d.toLowerCase()),d=d.replace(a,Fu),d=d.replace(u,k),g[o]=m?x(d,!0):d}v("border","",!0),v("border","-width"),v("border","-color"),v("border","-style"),v("padding",""),v("margin",""),y("border","border-width","border-style","border-color"),"medium none"===g.border&&delete g.border,"none"===g["border-image"]&&delete g["border-image"]}return g},serialize:function(t,e){var n="",i=function(e){var o,i=r[e];if(i)for(var a=0,u=i.length;a<u;a++)e=i[a],o=t[e],o&&(n+=(n.length>0?" ":"")+e+": "+o+";")},a=function(t,e){var n=o["*"];return(!n||!n[t])&&(n=o[e],!(n&&n[t]))};return e&&r?(i("*"),i(e)):Ct(t,(function(t,r){!t||o&&!a(r,e)||(n+=(n.length>0?" ":"")+r+": "+t+";")})),n}}},ju={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Uu=function(t){return t instanceof Event||T(t.initEvent)},Wu=function(t){return t.isDefaultPrevented===H||t.isDefaultPrevented===L},$u=function(t){return S(t.preventDefault)||Uu(t)},qu=function(t,e){var n=null!==e&&void 0!==e?e:{};for(var r in t)Nt(ju,r)||(n[r]=t[r]);return k(n.composedPath)&&(n.composedPath=function(){return t.composedPath()}),n},Gu=function(t,e,n,r){var o,i=qu(e,r);return i.type=t,S(i.target)&&(i.target=null!==(o=i.srcElement)&&void 0!==o?o:n),$u(e)&&(i.preventDefault=function(){i.defaultPrevented=!0,i.isDefaultPrevented=H,T(e.preventDefault)?e.preventDefault():Uu(e)&&(e.returnValue=!1)},i.stopPropagation=function(){i.cancelBubble=!0,i.isPropagationStopped=H,T(e.stopPropagation)?e.stopPropagation():Uu(e)&&(e.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=H,i.stopPropagation()},Wu(i)||(i.isDefaultPrevented=!0===i.defaultPrevented?H:L,i.isPropagationStopped=!0===i.cancelBubble?H:L,i.isImmediatePropagationStopped=L)),i},Ku="mce-data-",Xu=/^(?:mouse|contextmenu)|click/,Yu=function(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent&&t.attachEvent("on"+e,n)},Ju=function(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent&&t.detachEvent("on"+e,n)},Zu=function(t){return k(t)&&Xu.test(t.type)},Qu=function(t,e){var n=Gu(t.type,t,document,e);if(Zu(t)&&C(t.pageX)&&!C(t.clientX)){var r=n.target.ownerDocument||document,o=r.documentElement,i=r.body,a=n;a.pageX=t.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),a.pageY=t.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)}return C(n.metaKey)&&(n.metaKey=!1),n},tc=function(t,e,n){var r=t.document,o={type:"ready"};if(n.domLoaded)e(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){Ju(t,"DOMContentLoaded",a),Ju(t,"load",a),n.domLoaded||(n.domLoaded=!0,e(o)),t=null};i()?a():Yu(t,"DOMContentLoaded",a),n.domLoaded||Yu(t,"load",a)}},ec=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Ku+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return t.prototype.bind=function(t,e,n,r){var o,i,a,u,c,s,l,f=this,d=window,m=function(t){f.executeHandlers(Qu(t||d.event),o)};if(t&&3!==t.nodeType&&8!==t.nodeType){t[f.expando]?o=t[f.expando]:(o=f.count++,t[f.expando]=o,f.events[o]={}),r=r||t;var g=e.split(" ");a=g.length;while(a--)u=g[a],s=m,c=l=!1,"DOMContentLoaded"===u&&(u="ready"),f.domLoaded&&"ready"===u&&"complete"===t.readyState?n.call(r,Qu({type:u})):(f.hasMouseEnterLeave||(c=f.mouseEnterLeave[u],c&&(s=function(t){var e=t.currentTarget,n=t.relatedTarget;if(n&&e.contains)n=e.contains(n);else while(n&&n!==e)n=n.parentNode;n||(t=Qu(t||d.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=e,f.executeHandlers(t,o))})),f.hasFocusIn||"focusin"!==u&&"focusout"!==u||(l=!0,c="focusin"===u?"focus":"blur",s=function(t){t=Qu(t||d.event),t.type="focus"===t.type?"focusin":"focusout",f.executeHandlers(t,o)}),i=f.events[o][u],i?"ready"===u&&f.domLoaded?n(Qu({type:u})):i.push({func:n,scope:r}):(f.events[o][u]=i=[{func:n,scope:r}],i.fakeName=c,i.capture=l,i.nativeHandler=s,"ready"===u?tc(t,s,f):Yu(t,c||u,s,l)));return t=i=null,n}},t.prototype.unbind=function(t,e,n){var r,o,i,a,u;if(!t||3===t.nodeType||8===t.nodeType)return this;var c=t[this.expando];if(c){if(u=this.events[c],e){var s=e.split(" ");o=s.length;while(o--)if(a=s[o],r=u[a],r){if(n){i=r.length;while(i--)if(r[i].func===n){var l=r.nativeHandler,f=r.fakeName,d=r.capture;r=r.slice(0,i).concat(r.slice(i+1)),r.nativeHandler=l,r.fakeName=f,r.capture=d,u[a]=r}}n&&0!==r.length||(delete u[a],Ju(t,r.fakeName||a,r.nativeHandler,r.capture))}}else Ct(u,(function(e,n){Ju(t,e.fakeName||n,e.nativeHandler,e.capture)})),u={};for(a in u)if(Nt(u,a))return this;delete this.events[c];try{delete t[this.expando]}catch(m){t[this.expando]=null}}return this},t.prototype.fire=function(t,e,n){var r;if(!t||3===t.nodeType||8===t.nodeType)return this;var o=Qu({type:e,target:t},n);do{r=t[this.expando],r&&this.executeHandlers(o,r),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!o.isPropagationStopped());return this},t.prototype.clean=function(t){var e,n;if(!t||3===t.nodeType||8===t.nodeType)return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName){this.unbind(t),n=t.getElementsByTagName("*"),e=n.length;while(e--)t=n[e],t[this.expando]&&this.unbind(t)}return this},t.prototype.destroy=function(){this.events={}},t.prototype.cancel=function(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1},t.prototype.executeHandlers=function(t,e){var n=this.events[e],r=n&&n[t.type];if(r)for(var o=0,i=r.length;o<i;o++){var a=r[o];if(a&&!1===a.func.call(a.scope,t)&&t.preventDefault(),t.isImmediatePropagationStopped())return}},t.Event=new t,t}(),nc="sizzle"+-new Date,rc=window.document,oc=0,ic=0,ac=Fc(),uc=Fc(),cc=Fc(),sc=function(t,e){return t===e&&(mi=!0),0},lc="undefined",fc=1<<31,dc={}.hasOwnProperty,mc=[],gc=mc.pop,hc=mc.push,pc=mc.push,vc=mc.slice,bc=mc.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},yc="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",wc="[\\x20\\t\\r\\n\\f]",xc="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Cc="\\["+wc+"*("+xc+")(?:"+wc+"*([*^$|!~]?=)"+wc+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+xc+"))|)"+wc+"*\\]",Sc=":("+xc+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Cc+")*)|.*)\\)|)",kc=new RegExp("^"+wc+"+|((?:^|[^\\\\])(?:\\\\.)*)"+wc+"+$","g"),Tc=new RegExp("^"+wc+"*,"+wc+"*"),Oc=new RegExp("^"+wc+"*([>+~]|"+wc+")"+wc+"*"),_c=new RegExp("="+wc+"*([^\\]'\"]*?)"+wc+"*\\]","g"),Ec=new RegExp(Sc),Ac=new RegExp("^"+xc+"$"),Dc={ID:new RegExp("^#("+xc+")"),CLASS:new RegExp("^\\.("+xc+")"),TAG:new RegExp("^("+xc+"|[*])"),ATTR:new RegExp("^"+Cc),PSEUDO:new RegExp("^"+Sc),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+wc+"*(even|odd|(([+-]|)(\\d*)n|)"+wc+"*(?:([+-]|)"+wc+"*(\\d+)|))"+wc+"*\\)|)","i"),bool:new RegExp("^(?:"+yc+")$","i"),needsContext:new RegExp("^"+wc+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+wc+"*((?:-\\d)?\\d*)"+wc+"*\\)|)(?=[^-]|$)","i")},Mc=/^(?:input|select|textarea|button)$/i,Nc=/^h\d$/i,Rc=/^[^{]+\{\s*\[native \w/,zc=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Bc=/[+~]/,Pc=/'|\\/g,Ic=new RegExp("\\\\([\\da-f]{1,6}"+wc+"?|("+wc+")|.)","ig"),Lc=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{pc.apply(mc=vc.call(rc.childNodes),rc.childNodes),mc[rc.childNodes.length].nodeType}catch(gV){pc={apply:mc.length?function(t,e){hc.apply(t,vc.call(e))}:function(t,e){var n=t.length,r=0;while(t[n++]=e[r++]);t.length=n-1}}}var Hc=function(t,e,n,r){var o,i,a,u,c,s,l,f,d,m;if((e?e.ownerDocument||e:rc)!==hi&&gi(e),e=e||hi,n=n||[],!t||"string"!==typeof t)return n;if(1!==(u=e.nodeType)&&9!==u)return[];if(vi&&!r){if(o=zc.exec(t))if(a=o[1]){if(9===u){if(i=e.getElementById(a),!i||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(e.ownerDocument&&(i=e.ownerDocument.getElementById(a))&&xi(e,i)&&i.id===a)return n.push(i),n}else{if(o[2])return pc.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&oi.getElementsByClassName)return pc.apply(n,e.getElementsByClassName(a)),n}if(oi.qsa&&(!bi||!bi.test(t))){if(f=l=nc,d=e,m=9===u&&t,1===u&&"object"!==e.nodeName.toLowerCase()){s=ci(t),(l=e.getAttribute("id"))?f=l.replace(Pc,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",c=s.length;while(c--)s[c]=f+Kc(s[c]);d=Bc.test(t)&&qc(e.parentNode)||e,m=s.join(",")}if(m)try{return pc.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||e.removeAttribute("id")}}}return li(t.replace(kc,"$1"),e,n,r)};function Fc(){var t=[];function e(n,r){return t.push(n+" ")>ii.cacheLength&&delete e[t.shift()],e[n+" "]=r}return e}function Vc(t){return t[nc]=!0,t}function jc(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||fc)-(~t.sourceIndex||fc);if(r)return r;if(n)while(n=n.nextSibling)if(n===e)return-1;return t?1:-1}function Uc(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function Wc(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function $c(t){return Vc((function(e){return e=+e,Vc((function(n,r){var o,i=t([],n.length,e),a=i.length;while(a--)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function qc(t){return t&&typeof t.getElementsByTagName!==lc&&t}function Gc(){}function Kc(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Xc(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=ic++;return e.first?function(e,n,i){while(e=e[r])if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,a){var u,c,s=[oc,i];if(a){while(e=e[r])if((1===e.nodeType||o)&&t(e,n,a))return!0}else while(e=e[r])if(1===e.nodeType||o){if(c=e[nc]||(e[nc]={}),(u=c[r])&&u[0]===oc&&u[1]===i)return s[2]=u[2];if(c[r]=s,s[2]=t(e,n,a))return!0}}}function Yc(t){return t.length>1?function(e,n,r){var o=t.length;while(o--)if(!t[o](e,n,r))return!1;return!0}:t[0]}function Jc(t,e,n){for(var r=0,o=e.length;r<o;r++)Hc(t,e[r],n);return n}function Zc(t,e,n,r,o){for(var i,a=[],u=0,c=t.length,s=null!=e;u<c;u++)(i=t[u])&&(n&&!n(i,r,o)||(a.push(i),s&&e.push(u)));return a}function Qc(t,e,n,r,o,i){return r&&!r[nc]&&(r=Qc(r)),o&&!o[nc]&&(o=Qc(o,i)),Vc((function(i,a,u,c){var s,l,f,d=[],m=[],g=a.length,h=i||Jc(e||"*",u.nodeType?[u]:u,[]),p=!t||!i&&e?h:Zc(h,d,t,u,c),v=n?o||(i?t:g||r)?[]:a:p;if(n&&n(p,v,u,c),r){s=Zc(v,m),r(s,[],u,c),l=s.length;while(l--)(f=s[l])&&(v[m[l]]=!(p[m[l]]=f))}if(i){if(o||t){if(o){s=[],l=v.length;while(l--)(f=v[l])&&s.push(p[l]=f);o(null,v=[],s,c)}l=v.length;while(l--)(f=v[l])&&(s=o?bc.call(i,f):d[l])>-1&&(i[s]=!(a[s]=f))}}else v=Zc(v===a?v.splice(g,v.length):v),o?o(null,a,v,c):pc.apply(a,v)}))}function ts(t){for(var e,n,r,o=t.length,i=ii.relative[t[0].type],a=i||ii.relative[" "],u=i?1:0,c=Xc((function(t){return t===e}),a,!0),s=Xc((function(t){return bc.call(e,t)>-1}),a,!0),l=[function(t,n,r){var o=!i&&(r||n!==fi)||((e=n).nodeType?c(t,n,r):s(t,n,r));return e=null,o}];u<o;u++)if(n=ii.relative[t[u].type])l=[Xc(Yc(l),n)];else{if(n=ii.filter[t[u].type].apply(null,t[u].matches),n[nc]){for(r=++u;r<o;r++)if(ii.relative[t[r].type])break;return Qc(u>1&&Yc(l),u>1&&Kc(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(kc,"$1"),n,u<r&&ts(t.slice(u,r)),r<o&&ts(t=t.slice(r)),r<o&&Kc(t))}l.push(n)}return Yc(l)}function es(t,e){var n=e.length>0,r=t.length>0,o=function(o,i,a,u,c){var s,l,f,d=0,m="0",g=o&&[],h=[],p=fi,v=o||r&&ii.find.TAG("*",c),b=oc+=null==p?1:Math.random()||.1,y=v.length;for(c&&(fi=i!==hi&&i);m!==y&&null!=(s=v[m]);m++){if(r&&s){l=0;while(f=t[l++])if(f(s,i,a)){u.push(s);break}c&&(oc=b)}n&&((s=!f&&s)&&d--,o&&g.push(s))}if(d+=m,n&&m!==d){l=0;while(f=e[l++])f(g,h,i,a);if(o){if(d>0)while(m--)g[m]||h[m]||(h[m]=gc.call(u));h=Zc(h)}pc.apply(u,h),c&&!o&&h.length>0&&d+e.length>1&&Hc.uniqueSort(u)}return c&&(oc=b,fi=p),g};return n?Vc(o):o}oi=Hc.support={},ui=Hc.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},gi=Hc.setDocument=function(t){var e,n=t?t.ownerDocument||t:rc,r=n.defaultView;function o(t){try{return t.top}catch(e){}return null}return n!==hi&&9===n.nodeType&&n.documentElement?(hi=n,pi=n.documentElement,vi=!ui(n),r&&r!==o(r)&&(r.addEventListener?r.addEventListener("unload",(function(){gi()}),!1):r.attachEvent&&r.attachEvent("onunload",(function(){gi()}))),oi.attributes=!0,oi.getElementsByTagName=!0,oi.getElementsByClassName=Rc.test(n.getElementsByClassName),oi.getById=!0,ii.find.ID=function(t,e){if(typeof e.getElementById!==lc&&vi){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},ii.filter.ID=function(t){var e=t.replace(Ic,Lc);return function(t){return t.getAttribute("id")===e}},ii.find.TAG=oi.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==lc)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){while(n=i[o++])1===n.nodeType&&r.push(n);return r}return i},ii.find.CLASS=oi.getElementsByClassName&&function(t,e){if(vi)return e.getElementsByClassName(t)},yi=[],bi=[],oi.disconnectedMatch=!0,bi=bi.length&&new RegExp(bi.join("|")),yi=yi.length&&new RegExp(yi.join("|")),e=Rc.test(pi.compareDocumentPosition),xi=e||Rc.test(pi.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)while(e=e.parentNode)if(e===t)return!0;return!1},sc=e?function(t,e){if(t===e)return mi=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&r||!oi.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===rc&&xi(rc,t)?-1:e===n||e.ownerDocument===rc&&xi(rc,e)?1:di?bc.call(di,t)-bc.call(di,e):0:4&r?-1:1)}:function(t,e){if(t===e)return mi=!0,0;var r,o=0,i=t.parentNode,a=e.parentNode,u=[t],c=[e];if(!i||!a)return t===n?-1:e===n?1:i?-1:a?1:di?bc.call(di,t)-bc.call(di,e):0;if(i===a)return jc(t,e);r=t;while(r=r.parentNode)u.unshift(r);r=e;while(r=r.parentNode)c.unshift(r);while(u[o]===c[o])o++;return o?jc(u[o],c[o]):u[o]===rc?-1:c[o]===rc?1:0},n):hi},Hc.matches=function(t,e){return Hc(t,null,null,e)},Hc.matchesSelector=function(t,e){if((t.ownerDocument||t)!==hi&&gi(t),e=e.replace(_c,"='$1']"),oi.matchesSelector&&vi&&(!yi||!yi.test(e))&&(!bi||!bi.test(e)))try{var n=wi.call(t,e);if(n||oi.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(gV){}return Hc(e,hi,null,[t]).length>0},Hc.contains=function(t,e){return(t.ownerDocument||t)!==hi&&gi(t),xi(t,e)},Hc.attr=function(t,e){(t.ownerDocument||t)!==hi&&gi(t);var n=ii.attrHandle[e.toLowerCase()],r=n&&dc.call(ii.attrHandle,e.toLowerCase())?n(t,e,!vi):void 0;return void 0!==r?r:oi.attributes||!vi?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},Hc.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},Hc.uniqueSort=function(t){var e,n=[],r=0,o=0;if(mi=!oi.detectDuplicates,di=!oi.sortStable&&t.slice(0),t.sort(sc),mi){while(e=t[o++])e===t[o]&&(r=n.push(o));while(r--)t.splice(n[r],1)}return di=null,t},ai=Hc.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"===typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=ai(t)}else if(3===o||4===o)return t.nodeValue}else while(e=t[r++])n+=ai(e);return n},ii=Hc.selectors={cacheLength:50,createPseudo:Vc,match:Dc,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Ic,Lc),t[3]=(t[3]||t[4]||t[5]||"").replace(Ic,Lc),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Hc.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Hc.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Dc.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Ec.test(n)&&(e=ci(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Ic,Lc).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=ac[t+" "];return e||(e=new RegExp("(^|"+wc+")"+t+"("+wc+"|$)"))&&ac(t,(function(t){return e.test("string"===typeof t.className&&t.className||typeof t.getAttribute!==lc&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var o=Hc.attr(r,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),u="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,c){var s,l,f,d,m,g,h=i!==a?"nextSibling":"previousSibling",p=e.parentNode,v=u&&e.nodeName.toLowerCase(),b=!c&&!u;if(p){if(i){while(h){f=e;while(f=f[h])if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=h="only"===t&&!g&&"nextSibling"}return!0}if(g=[a?p.firstChild:p.lastChild],a&&b){l=p[nc]||(p[nc]={}),s=l[t]||[],m=s[0]===oc&&s[1],d=s[0]===oc&&s[2],f=m&&p.childNodes[m];while(f=++m&&f&&f[h]||(d=m=0)||g.pop())if(1===f.nodeType&&++d&&f===e){l[t]=[oc,m,d];break}}else if(b&&(s=(e[nc]||(e[nc]={}))[t])&&s[0]===oc)d=s[1];else while(f=++m&&f&&f[h]||(d=m=0)||g.pop())if((u?f.nodeName.toLowerCase()===v:1===f.nodeType)&&++d&&(b&&((f[nc]||(f[nc]={}))[t]=[oc,d]),f===e))break;return d-=o,d===r||d%r===0&&d/r>=0}}},PSEUDO:function(t,e){var n,r=ii.pseudos[t]||ii.setFilters[t.toLowerCase()]||Hc.error("unsupported pseudo: "+t);return r[nc]?r(e):r.length>1?(n=[t,t,"",e],ii.setFilters.hasOwnProperty(t.toLowerCase())?Vc((function(t,n){var o,i=r(t,e),a=i.length;while(a--)o=bc.call(t,i[a]),t[o]=!(n[o]=i[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:Vc((function(t){var e=[],n=[],r=si(t.replace(kc,"$1"));return r[nc]?Vc((function(t,e,n,o){var i,a=r(t,null,o,[]),u=t.length;while(u--)(i=a[u])&&(t[u]=!(e[u]=i))})):function(t,o,i){return e[0]=t,r(e,null,i,n),e[0]=null,!n.pop()}})),has:Vc((function(t){return function(e){return Hc(t,e).length>0}})),contains:Vc((function(t){return t=t.replace(Ic,Lc),function(e){return(e.textContent||e.innerText||ai(e)).indexOf(t)>-1}})),lang:Vc((function(t){return Ac.test(t||"")||Hc.error("unsupported lang: "+t),t=t.replace(Ic,Lc).toLowerCase(),function(e){var n;do{if(n=vi?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=window.location&&window.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===pi},focus:function(t){return t===hi.activeElement&&(!hi.hasFocus||hi.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!ii.pseudos.empty(t)},header:function(t){return Nc.test(t.nodeName)},input:function(t){return Mc.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:$c((function(){return[0]})),last:$c((function(t,e){return[e-1]})),eq:$c((function(t,e,n){return[n<0?n+e:n]})),even:$c((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:$c((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:$c((function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t})),gt:$c((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},ii.pseudos.nth=ii.pseudos.eq,Q(["radio","checkbox","file","password","image"],(function(t){ii.pseudos[t]=Uc(t)})),Q(["submit","reset"],(function(t){ii.pseudos[t]=Wc(t)})),Gc.prototype=ii.filters=ii.pseudos,ii.setFilters=new Gc,ci=Hc.tokenize=function(t,e){var n,r,o,i,a,u,c,s=uc[t+" "];if(s)return e?0:s.slice(0);a=t,u=[],c=ii.preFilter;while(a){for(i in n&&!(r=Tc.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=Oc.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(kc," ")}),a=a.slice(n.length)),ii.filter)ii.filter.hasOwnProperty(i)&&(!(r=Dc[i].exec(a))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return e?a.length:a?Hc.error(t):uc(t,u).slice(0)},si=Hc.compile=function(t,e){var n,r=[],o=[],i=cc[t+" "];if(!i){e||(e=ci(t)),n=e.length;while(n--)i=ts(e[n]),i[nc]?r.push(i):o.push(i);i=cc(t,es(o,r)),i.selector=t}return i},li=Hc.select=function(t,e,n,r){var o,i,a,u,c,s="function"===typeof t&&t,l=!r&&ci(t=s.selector||t);if(n=n||[],1===l.length){if(i=l[0]=l[0].slice(0),i.length>2&&"ID"===(a=i[0]).type&&oi.getById&&9===e.nodeType&&vi&&ii.relative[i[1].type]){if(e=(ii.find.ID(a.matches[0].replace(Ic,Lc),e)||[])[0],!e)return n;s&&(e=e.parentNode),t=t.slice(i.shift().value.length)}o=Dc.needsContext.test(t)?0:i.length;while(o--){if(a=i[o],ii.relative[u=a.type])break;if((c=ii.find[u])&&(r=c(a.matches[0].replace(Ic,Lc),Bc.test(i[0].type)&&qc(e.parentNode)||e))){if(i.splice(o,1),t=r.length&&Kc(i),!t)return pc.apply(n,r),n;break}}}return(s||si(t,l))(r,e,!vi,n,Bc.test(t)&&qc(e.parentNode)||e),n},oi.sortStable=nc.split("").sort(sc).join("")===nc,oi.detectDuplicates=!!mi,gi(),oi.sortDetached=!0;var ns=document,rs=Array.prototype.push,os=Array.prototype.slice,is=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,as=ec.Event,us=gn.makeMap("children,contents,next,prev"),cs=function(t){return"undefined"!==typeof t},ss=function(t){return"string"===typeof t},ls=function(t){return t&&t===t.window},fs=function(t,e){e=e||ns;var n,r=e.createElement("div"),o=e.createDocumentFragment();r.innerHTML=t;while(n=r.firstChild)o.appendChild(n);return o},ds=function(t,e,n,r){var o;if(ss(e))e=fs(e,_s(t[0]));else if(e.length&&!e.nodeType){if(e=Ms.makeArray(e),r)for(o=e.length-1;o>=0;o--)ds(t,e[o],n,r);else for(o=0;o<e.length;o++)ds(t,e[o],n,r);return t}if(e.nodeType){o=t.length;while(o--)n.call(t[o],e)}return t},ms=function(t,e){return t&&e&&-1!==(" "+t.className+" ").indexOf(" "+e+" ")},gs=function(t,e,n){var r,o;return e=Ms(e)[0],t.each((function(){var t=this;n&&r===t.parentNode||(r=t.parentNode,o=e.cloneNode(!1),t.parentNode.insertBefore(o,t)),o.appendChild(t)})),t},hs=gn.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),ps=gn.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),vs={for:"htmlFor",class:"className",readonly:"readOnly"},bs={float:"cssFloat"},ys={},ws={},xs=function(t,e){return new Ms.fn.init(t,e)},Cs=function(t,e){var n;if(e.indexOf)return e.indexOf(t);n=e.length;while(n--)if(e[n]===t)return n;return-1},Ss=/^\s*|\s*$/g,ks=function(t){return null===t||void 0===t?"":(""+t).replace(Ss,"")},Ts=function(t,e){var n,r,o,i;if(t)if(n=t.length,void 0===n){for(r in t)if(t.hasOwnProperty(r)&&(i=t[r],!1===e.call(i,r,i)))break}else for(o=0;o<n;o++)if(i=t[o],!1===e.call(i,o,i))break;return t},Os=function(t,e){var n=[];return Ts(t,(function(t,r){e(r,t)&&n.push(r)})),n},_s=function(t){return t?9===t.nodeType?t:t.ownerDocument:ns};xs.fn=xs.prototype={constructor:xs,selector:"",context:null,length:0,init:function(t,e){var n,r,o=this;if(!t)return o;if(t.nodeType)return o.context=o[0]=t,o.length=1,o;if(e&&e.nodeType)o.context=e;else{if(e)return Ms(t).attr(e);o.context=e=document}if(ss(t)){if(o.selector=t,n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:is.exec(t),!n)return Ms(e).find(t);if(n[1]){r=fs(t,_s(e)).firstChild;while(r)rs.call(o,r),r=r.nextSibling}else{if(r=_s(e).getElementById(n[2]),!r)return o;if(r.id!==n[2])return o.find(t);o.length=1,o[0]=r}}else this.add(t,!1);return o},toArray:function(){return gn.toArray(this)},add:function(t,e){var n,r,o=this;if(ss(t))return o.add(Ms(t));if(!1!==e)for(n=Ms.unique(o.toArray().concat(Ms.makeArray(t))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else rs.apply(o,Ms.makeArray(t));return o},attr:function(t,e){var n,r=this;if("object"===typeof t)Ts(t,(function(t,e){r.attr(t,e)}));else{if(!cs(e)){if(r[0]&&1===r[0].nodeType){if(n=ys[t],n&&n.get)return n.get(r[0],t);if(ps[t])return r.prop(t)?t:void 0;e=r[0].getAttribute(t,2),null===e&&(e=void 0)}return e}this.each((function(){var n;if(1===this.nodeType){if(n=ys[t],n&&n.set)return void n.set(this,e);null===e?this.removeAttribute(t,2):this.setAttribute(t,e,2)}}))}return r},removeAttr:function(t){return this.attr(t,null)},prop:function(t,e){var n=this;if(t=vs[t]||t,"object"===typeof t)Ts(t,(function(t,e){n.prop(t,e)}));else{if(!cs(e))return n[0]&&n[0].nodeType&&t in n[0]?n[0][t]:e;this.each((function(){1===this.nodeType&&(this[t]=e)}))}return n},css:function(t,e){var n,r,o=this,i=function(t){return t.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()}))},a=function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t}))};if("object"===typeof t)Ts(t,(function(t,e){o.css(t,e)}));else if(cs(e))t=i(t),"number"!==typeof e||hs[t]||(e=e.toString()+"px"),o.each((function(){var n=this.style;if(r=ws[t],r&&r.set)r.set(this,e);else{try{this.style[bs[t]||t]=e}catch(o){}null!==e&&""!==e||(n.removeProperty?n.removeProperty(a(t)):n.removeAttribute(t))}}));else{if(n=o[0],r=ws[t],r&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(t)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(a(t))}catch(u){return}}return o},remove:function(){var t,e=this,n=this.length;while(n--)t=e[n],as.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){var t,e=this,n=this.length;while(n--){t=e[n];while(t.firstChild)t.removeChild(t.firstChild)}return this},html:function(t){var e,n=this;if(cs(t)){e=n.length;try{while(e--)n[e].innerHTML=t}catch(r){Ms(n[e]).empty().append(t)}return n}return n[0]?n[0].innerHTML:""},text:function(t){var e,n=this;if(cs(t)){e=n.length;while(e--)"innerText"in n[e]?n[e].innerText=t:n[0].textContent=t;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return ds(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)}))},prepend:function(){return ds(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(t,this.firstChild)}),!0)},before:function(){var t=this;return t[0]&&t[0].parentNode?ds(t,arguments,(function(t){this.parentNode.insertBefore(t,this)})):t},after:function(){var t=this;return t[0]&&t[0].parentNode?ds(t,arguments,(function(t){this.parentNode.insertBefore(t,this.nextSibling)}),!0):t},appendTo:function(t){return Ms(t).append(this),this},prependTo:function(t){return Ms(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return gs(this,t)},wrapAll:function(t){return gs(this,t,!0)},wrapInner:function(t){return this.each((function(){Ms(this).contents().wrapAll(t)})),this},unwrap:function(){return this.parent().each((function(){Ms(this).replaceWith(this.childNodes)}))},clone:function(){var t=[];return this.each((function(){t.push(this.cloneNode(!0))})),Ms(t)},addClass:function(t){return this.toggleClass(t,!0)},removeClass:function(t){return this.toggleClass(t,!1)},toggleClass:function(t,e){var n=this;return"string"!==typeof t||(-1!==t.indexOf(" ")?Ts(t.split(" "),(function(){n.toggleClass(this,e)})):n.each((function(n,r){var o=ms(r,t);if(o!==e){var i=r.className;o?r.className=ks((" "+i+" ").replace(" "+t+" "," ")):r.className+=i?" "+t:t}}))),n},hasClass:function(t){return ms(this[0],t)},each:function(t){return Ts(this,t)},on:function(t,e){return this.each((function(){as.bind(this,t,e)}))},off:function(t,e){return this.each((function(){as.unbind(this,t,e)}))},trigger:function(t){return this.each((function(){"object"===typeof t?as.fire(this,t.type,t):as.fire(this,t)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return Ms(os.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(t){var e,n,r=[];for(e=0,n=this.length;e<n;e++)Ms.find(t,this[e],r);return Ms(r)},filter:function(t){return Ms("function"===typeof t?Os(this.toArray(),(function(e,n){return t(n,e)})):Ms.filter(t,this.toArray()))},closest:function(t){var e=[];return t instanceof Ms&&(t=t[0]),this.each((function(n,r){while(r){if("string"===typeof t&&Ms(r).is(t)){e.push(r);break}if(r===t){e.push(r);break}r=r.parentNode}})),Ms(e)},offset:function(t){var e,n,r,o,i=0,a=0;return t?this.css(t):(e=this[0],e&&(n=e.ownerDocument,r=n.documentElement,e.getBoundingClientRect&&(o=e.getBoundingClientRect(),i=o.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:rs,sort:Array.prototype.sort,splice:Array.prototype.splice},gn.extend(xs,{extend:gn.extend,makeArray:function(t){return ls(t)||t.nodeType?[t]:gn.toArray(t)},inArray:Cs,isArray:gn.isArray,each:Ts,trim:ks,grep:Os,find:Hc,expr:Hc.selectors,unique:Hc.uniqueSort,text:Hc.getText,contains:Hc.contains,filter:function(t,e,n){var r=e.length;n&&(t=":not("+t+")");while(r--)1!==e[r].nodeType&&e.splice(r,1);return e=1===e.length?Ms.find.matchesSelector(e[0],t)?[e[0]]:[]:Ms.find.matches(t,e),e}});var Es=function(t,e,n){var r=[],o=t[e];"string"!==typeof n&&n instanceof Ms&&(n=n[0]);while(o&&9!==o.nodeType){if(void 0!==n){if(o===n)break;if("string"===typeof n&&Ms(o).is(n))break}1===o.nodeType&&r.push(o),o=o[e]}return r},As=function(t,e,n,r){var o=[];for(r instanceof Ms&&(r=r[0]);t;t=t[e])if(!n||t.nodeType===n){if(void 0!==r){if(t===r)break;if("string"===typeof r&&Ms(t).is(r))break}o.push(t)}return o},Ds=function(t,e,n){for(t=t[e];t;t=t[e])if(t.nodeType===n)return t;return null};Ts({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Es(t,"parentNode")},next:function(t){return Ds(t,"nextSibling",1)},prev:function(t){return Ds(t,"previousSibling",1)},children:function(t){return As(t.firstChild,"nextSibling",1)},contents:function(t){return gn.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},(function(t,e){xs.fn[t]=function(n){var r=this,o=[];r.each((function(){var t=e.call(o,this,n,o);t&&(Ms.isArray(t)?o.push.apply(o,t):o.push(t))})),this.length>1&&(us[t]||(o=Ms.unique(o)),0===t.indexOf("parents")&&(o=o.reverse()));var i=Ms(o);return n?i.filter(n):i}})),Ts({parentsUntil:function(t,e){return Es(t,"parentNode",e)},nextUntil:function(t,e){return As(t,"nextSibling",1,e).slice(1)},prevUntil:function(t,e){return As(t,"previousSibling",1,e).slice(1)}},(function(t,e){xs.fn[t]=function(n,r){var o=this,i=[];o.each((function(){var t=e.call(i,this,n,i);t&&(Ms.isArray(t)?i.push.apply(i,t):i.push(t))})),this.length>1&&(i=Ms.unique(i),0!==t.indexOf("parents")&&"prevUntil"!==t||(i=i.reverse()));var a=Ms(i);return r?a.filter(r):a}})),xs.fn.is=function(t){return!!t&&this.filter(t).length>0},xs.fn.init.prototype=xs.fn,xs.overrideDefaults=function(t){var e,n=function(r,o){return e=e||t(),0===arguments.length&&(r=e.element),o||(o=e.context),new n.fn.init(r,o)};return Ms.extend(n,this),n},xs.attrHooks=ys,xs.cssHooks=ws;var Ms=xs,Ns=gn.each,Rs=gn.grep,zs=tn.ie,Bs=/^([a-z0-9],?)+$/i,Ps=function(t,e,n){var r=e.keep_values,o={set:function(t,r,o){e.url_converter&&null!==r&&(r=e.url_converter.call(e.url_converter_scope||n(),r,o,t[0])),t.attr("data-mce-"+o,r).attr(o,r)},get:function(t,e){return t.attr("data-mce-"+e)||t.attr(e)}},i={style:{set:function(e,n){null===n||"object"!==typeof n?(r&&e.attr("data-mce-style",n),null!==n&&"string"===typeof n?(e.removeAttr("style"),e.css(t.parse(n))):e.attr("style",n)):e.css(n)},get:function(e){var n=e.attr("data-mce-style")||e.attr("style");return n=t.serialize(t.parse(n),e[0].nodeName),n}}};return r&&(i.href=i.src=o),i},Is=function(t,e){var n=e.attr("style"),r=t.serialize(t.parse(n),e[0].nodeName);r||(r=null),e.attr("data-mce-style",r)},Ls=function(t,e){var n,r,o=0;if(t)for(n=t.nodeType,t=t.previousSibling;t;t=t.previousSibling)r=t.nodeType,(!e||3!==r||r!==n&&t.nodeValue.length)&&(o++,n=r);return o},Hs=function(t,e){void 0===e&&(e={});var n={},r=window,o={},i=0,a=!0,u=!0,c=Hi.forElement(wn.fromDom(t),{contentCssCors:e.contentCssCors,referrerPolicy:e.referrerPolicy}),s=[],l=e.schema?e.schema:Hu({}),f=Vu({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope},e.schema),d=e.ownEvents?new ec:ec.Event,m=l.getBlockElements(),g=Ms.overrideDefaults((function(){return{context:t,element:Mt.getRoot()}})),h=function(t){if("string"===typeof t)return!!m[t];if(t){var e=t.nodeType;if(e)return!(1!==e||!m[t.nodeName])}return!1},p=function(e){return e&&t&&v(e)?t.getElementById(e):e},b=function(t){return g("string"===typeof t?p(t):t)},y=function(t,e,n){var r,o,i=b(t);return i.length&&(r=Nt[e],o=r&&r.get?r.get(i,e):i.attr(e)),"undefined"===typeof o&&(o=n||""),o},w=function(t){var e=p(t);return e?e.attributes:[]},x=function(t,n,r){""===r&&(r=null);var o=b(t),i=o.attr(n);if(o.length){var a=Nt[n];a&&a.set?a.set(o,r,n):o.attr(n,r),i!==r&&e.onSetAttrib&&e.onSetAttrib({attrElm:o,attrName:n,attrValue:r})}},C=function(e,n){if(!zs||1!==e.nodeType||n)return e.cloneNode(n);var r=t.createElement(e.nodeName);return Ns(w(e),(function(t){x(r,t.nodeName,y(e,t.nodeName))})),r},k=function(){return e.root_element||t.body},T=function(t){var e=Fr(t);return{x:e.x,y:e.y,w:e.width,h:e.height}},O=function(e,n){return Bo(t.body,p(e),n)},E=function(t,n,r){var o=v(n)?b(t).css(n,r):b(t).css(n);e.update_styles&&Is(f,o)},A=function(t,n){var r=b(t).css(n);e.update_styles&&Is(f,r)},M=function(t,e,n){var r=b(t);return n?r.css(e):(e=e.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()})),"float"===e&&(e=tn.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[e]:void 0)},N=function(t){var e,n;return t=p(t),e=M(t,"width"),n=M(t,"height"),-1===e.indexOf("px")&&(e=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(e,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}},R=function(t){t=p(t);var e=O(t),n=N(t);return{x:e.x,y:e.y,w:n.w,h:n.h}},z=function(t,e){var n;if(!t)return!1;if(!Array.isArray(t)){if("*"===e)return 1===t.nodeType;if(Bs.test(e)){var r=e.toLowerCase().split(/,/),o=t.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(t.nodeType&&1!==t.nodeType)return!1}var i=Array.isArray(t)?t:[t];return Hc(e,i[0].ownerDocument||i[0],null,i).length>0},B=function(t,e,n,r){var o,i=[],a=p(t);r=void 0===r,n=n||("BODY"!==k().nodeName?k().parentNode:null),gn.is(e,"string")&&(o=e,e="*"===e?function(t){return 1===t.nodeType}:function(t){return z(t,o)});while(a){if(a===n||S(a.nodeType)||eo(a)||no(a))break;if(!e||"function"===typeof e&&e(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},P=function(t,e,n){var r=B(t,e,n,!1);return r&&r.length>0?r[0]:null},I=function(t,e,n){var r=e;if(t)for("string"===typeof e&&(r=function(t){return z(t,e)}),t=t[n];t;t=t[n])if("function"===typeof r&&r(t))return t;return null},L=function(t,e){return I(t,e,"nextSibling")},H=function(t,e){return I(t,e,"previousSibling")},F=function(n,r){return Hc(n,p(r)||e.root_element||t,[])},V=function(t,e,n){var r,o="string"===typeof t?p(t):t;if(!o)return!1;if(gn.isArray(o)&&(o.length||0===o.length))return r=[],Ns(o,(function(t,o){t&&r.push(e.call(n,"string"===typeof t?p(t):t,o))})),r;var i=n||this;return e.call(i,o)},j=function(t,e){b(t).each((function(t,n){Ns(e,(function(t,e){x(n,e,t)}))}))},U=function(t,e){var n=b(t);zs?n.each((function(t,n){if(!1!==n.canHaveHTML){while(n.firstChild)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+e,n.removeChild(n.firstChild)}catch(r){Ms("<div></div>").html("<br>"+e).contents().slice(1).appendTo(n)}return e}})):n.html(e)},W=function(e,n,r,o,i){return V(e,(function(e){var a="string"===typeof n?t.createElement(n):n;return j(a,r),o&&("string"!==typeof o&&o.nodeType?a.appendChild(o):"string"===typeof o&&U(a,o)),i?a:e.appendChild(a)}))},$=function(e,n,r){return W(t.createElement(e),e,n,r,!0)},q=Eu.decode,G=Eu.encodeAllRaw,K=function(t,e,n){var r,o="";for(r in o+="<"+t,e)Rt(e,r)&&(o+=" "+r+'="'+G(e[r])+'"');return"undefined"!==typeof n?o+">"+n+"</"+t+">":o+" />"},X=function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();o.appendChild(r),e&&(r.innerHTML=e);while(n=r.firstChild)o.appendChild(n);return o.removeChild(r),o},Y=function(t,e){var n=b(t);return e?n.each((function(){var t;while(t=this.firstChild)3===t.nodeType&&0===t.data.length?this.removeChild(t):this.parentNode.insertBefore(t,this)})).remove():n.remove(),n.length>1?n.toArray():n[0]},J=function(t){return V(t,(function(t){var e,n=t.attributes;for(e=n.length-1;e>=0;e--)t.removeAttributeNode(n.item(e))}))},Z=function(t){return f.parse(t)},tt=function(t,e){return f.serialize(t,e)},et=function(e){var r,o;if(Mt!==Hs.DOM&&t===document){if(n[e])return;n[e]=!0}o=t.getElementById("mceDefaultStyles"),o||(o=t.createElement("style"),o.id="mceDefaultStyles",o.type="text/css",r=t.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=e:o.appendChild(t.createTextNode(e))},nt=function(t){t||(t=""),Q(t.split(","),(function(t){o[t]=!0,c.load(t,_)}))},rt=function(t,e,n){b(t).toggleClass(e,n).each((function(){""===this.className&&Ms(this).attr("class",null)}))},ot=function(t,e){b(t).addClass(e)},it=function(t,e){rt(t,e,!1)},at=function(t,e){return b(t).hasClass(e)},ut=function(t){b(t).show()},ct=function(t){b(t).hide()},st=function(t){return"none"===b(t).css("display")},lt=function(t){return(t||"mce_")+i++},ft=function(t){var e="string"===typeof t?p(t):t;return Ur(e)?e.outerHTML:Ms("<div></div>").append(Ms(e).clone()).html()},dt=function(t,e){b(t).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=e)}catch(t){}Y(Ms(this).html(e),!0)}))},mt=function(t,e){var n=p(e);return V(t,(function(t){var e=n.parentNode,r=n.nextSibling;return r?e.insertBefore(t,r):e.appendChild(t),t}))},gt=function(t,e,n){return V(e,(function(e){return gn.is(e,"array")&&(t=t.cloneNode(!0)),n&&Ns(Rs(e.childNodes),(function(e){t.appendChild(e)})),e.parentNode.replaceChild(t,e)}))},ht=function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=$(e),Ns(w(t),(function(e){x(n,e.nodeName,y(t,e.nodeName))})),gt(n,t,!0)),n||t},pt=function(t,e){var n,r=t;while(r){n=e;while(n&&r!==n)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&t.ownerDocument?t.ownerDocument.documentElement:r},vt=function(t){return f.toHex(gn.trim(t))},bt=function(t){if(Ur(t)){var e="a"===t.nodeName.toLowerCase()&&!y(t,"href")&&y(t,"id");if(y(t,"name")||y(t,"data-mce-bookmark")||e)return!0}return!1},yt=function(t,e){var n,r,o=0;if(bt(t))return!1;if(t=t.firstChild,t){var i=new Fi(t,t.parentNode),a=l?l.getWhiteSpaceElements():{};e=e||(l?l.getNonEmptyElements():null);do{if(n=t.nodeType,Ur(t)){var u=t.getAttribute("data-mce-bogus");if(u){t=i.next("all"===u);continue}if(r=t.nodeName.toLowerCase(),e&&e[r]){if("br"===r){o++,t=i.next();continue}return!1}if(bt(t))return!1}if(8===n)return!1;if(3===n&&!Ga(t.nodeValue))return!1;if(3===n&&t.parentNode&&a[t.parentNode.nodeName]&&Ga(t.nodeValue))return!1;t=i.next()}while(t)}return o<=1},wt=function(){return t.createRange()},xt=function(t,e,n){var r,o,i,a=wt();if(t&&e)return a.setStart(t.parentNode,Ls(t)),a.setEnd(e.parentNode,Ls(e)),r=a.extractContents(),a=wt(),a.setStart(e.parentNode,Ls(e)+1),a.setEnd(t.parentNode,Ls(t)+1),o=a.extractContents(),i=t.parentNode,i.insertBefore(lu(Mt,r),t),n?i.insertBefore(n,t):i.insertBefore(e,t),i.insertBefore(lu(Mt,o),t),Y(t),n||e},St=function(n,o,i,a){if(gn.isArray(n)){var u=n.length,c=[];while(u--)c[u]=St(n[u],o,i,a);return c}!e.collect||n!==t&&n!==r||s.push([n,o,i,a]);var l=d.bind(n,o,i,a||Mt);return l},kt=function(e,n,o){if(gn.isArray(e)){var i=e.length,a=[];while(i--)a[i]=kt(e[i],n,o);return a}if(s.length>0&&(e===t||e===r)){i=s.length;while(i--){var u=s[i];e!==u[0]||n&&n!==u[1]||o&&o!==u[2]||d.unbind(u[0],u[1],u[2])}}return d.unbind(e,n,o)},Tt=function(t,e,n){return d.fire(t,e,n)},Ot=function(t){if(t&&Ur(t)){var e=t.getAttribute("data-mce-contenteditable");return e&&"inherit"!==e?e:"inherit"!==t.contentEditable?t.contentEditable:null}return null},_t=function(t){for(var e=k(),n=null;t&&t!==e;t=t.parentNode)if(n=Ot(t),null!==n)break;return n},Et=function(){if(s.length>0){var t=s.length;while(t--){var e=s[t];d.unbind(e[0],e[1],e[2])}}Ct(o,(function(t,e){c.unload(e),delete o[e]})),Hc.setDocument&&Hc.setDocument()},At=function(t,e){if(zs){while(t){if(e===t)return!0;t=t.parentNode}return!1}return t===e||e.contains(t)},Dt=function(t){return"startContainer: "+t.startContainer.nodeName+", startOffset: "+t.startOffset+", endContainer: "+t.endContainer.nodeName+", endOffset: "+t.endOffset},Mt={doc:t,settings:e,win:r,files:o,stdMode:a,boxModel:u,styleSheetLoader:c,boundEvents:s,styles:f,schema:l,events:d,isBlock:h,$:g,$$:b,root:null,clone:C,getRoot:k,getViewPort:T,getRect:R,getSize:N,getParent:P,getParents:B,get:p,getNext:L,getPrev:H,select:F,is:z,add:W,create:$,createHTML:K,createFragment:X,remove:Y,setStyle:E,getStyle:M,setStyles:A,removeAllAttribs:J,setAttrib:x,setAttribs:j,getAttrib:y,getPos:O,parseStyle:Z,serializeStyle:tt,addStyle:et,loadCSS:nt,addClass:ot,removeClass:it,hasClass:at,toggleClass:rt,show:ut,hide:ct,isHidden:st,uniqueId:lt,setHTML:U,getOuterHTML:ft,setOuterHTML:dt,decode:q,encode:G,insertAfter:mt,replace:gt,rename:ht,findCommonAncestor:pt,toHex:vt,run:V,getAttribs:w,isEmpty:yt,createRng:wt,nodeIndex:Ls,split:xt,bind:St,unbind:kt,fire:Tt,getContentEditable:Ot,getContentEditableParent:_t,destroy:Et,isChildOf:At,dumpRng:Dt},Nt=Ps(f,e,D(Mt));return Mt};Hs.DOM=Hs(document),Hs.nodeIndex=Ls;var Fs=Hs.DOM,Vs=gn.each,js=gn.grep,Us=0,Ws=1,$s=2,qs=3,Gs=function(){function t(t){void 0===t&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return t.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},t.prototype.loadScript=function(t,e,n){var r,o=Fs,i=function(){o.remove(c),r&&(r.onerror=r.onload=r=null)},a=function(){i(),e()},u=function(){i(),T(n)?n():"undefined"!==typeof console&&console.log&&console.log("Failed to load script: "+t)},c=o.uniqueId();r=document.createElement("script"),r.id=c,r.type="text/javascript",r.src=gn._addCacheSuffix(t),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=a,r.onerror=u,(document.getElementsByTagName("head")[0]||document.body).appendChild(r)},t.prototype.isDone=function(t){return this.states[t]===$s},t.prototype.markDone=function(t){this.states[t]=$s},t.prototype.add=function(t,e,n,r){var o=this.states[t];this.queue.push(t),void 0===o&&(this.states[t]=Us),e&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:e,failure:r,scope:n||this}))},t.prototype.load=function(t,e,n,r){return this.add(t,e,n,r)},t.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},t.prototype.loadQueue=function(t,e,n){this.loadScripts(this.queue,t,e,n)},t.prototype.loadScripts=function(t,e,n,r){var o=this,i=[],a=function(t,e){Vs(o.scriptLoadedCallbacks[e],(function(e){T(e[t])&&e[t].call(e.scope)})),o.scriptLoadedCallbacks[e]=void 0};o.queueLoadedCallbacks.push({success:e,failure:r,scope:n||this});var u=function(){var e=js(t);if(t.length=0,Vs(e,(function(t){o.states[t]!==$s?o.states[t]!==qs?o.states[t]!==Ws&&(o.states[t]=Ws,o.loading++,o.loadScript(t,(function(){o.states[t]=$s,o.loading--,a("success",t),u()}),(function(){o.states[t]=qs,o.loading--,i.push(t),a("failure",t),u()}))):a("failure",t):a("success",t)})),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,Vs(n,(function(t){0===i.length?T(t.success)&&t.success.call(t.scope):T(t.failure)&&t.failure.call(t.scope,i)}))}};u()},t.ScriptLoader=new t,t}(),Ks=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},Xs=function(t){return b(t)&&Nt(t,"raw")},Ys=function(t){return y(t)&&t.length>1},Js={},Zs=Ks("en"),Qs=function(){return Mt(Js,Zs.get())},tl=function(){return St(Js,(function(t){return Wt({},t)}))},el=function(t){t&&Zs.set(t)},nl=function(){return Zs.get()},rl=function(t,e){var n=Js[t];n||(Js[t]=n={}),Ct(e,(function(t,e){n[e.toLowerCase()]=t}))},ol=function(t){var e=Qs().getOr({}),n=function(t){return T(t)?Object.prototype.toString.call(t):r(t)?"":""+t},r=function(t){return""===t||null===t||void 0===t},o=function(t){var r=n(t);return Mt(e,r.toLowerCase()).map(n).getOr(r)},i=function(t){return t.replace(/{context:\w+}$/,"")};if(r(t))return"";if(Xs(t))return n(t.raw);if(Ys(t)){var a=t.slice(1),u=o(t[0]).replace(/\{([0-9]+)\}/g,(function(t,e){return Nt(a,e)?n(a[e]):t}));return i(u)}return i(o(t))},il=function(){return Qs().bind((function(t){return Mt(t,"_dir")})).exists((function(t){return"rtl"===t}))},al=function(t){return Nt(Js,t)},ul={getData:tl,setCode:el,getCode:nl,add:rl,translate:ol,isRtl:il,hasCode:al},cl=function(){var t=[],e={},n={},r=[],o=function(t,e){var n=nt(r,(function(n){return n.name===t&&n.state===e}));Q(n,(function(t){return t.callback()}))},i=function(t){if(n[t])return n[t].instance},a=function(t){var e;return n[t]&&(e=n[t].dependencies),e||[]},u=function(t,n){!1!==cl.languageLoad&&g(t,(function(){var r=ul.getCode(),o=","+(n||"")+",";!r||n&&-1===o.indexOf(","+r+",")||Gs.ScriptLoader.add(e[t]+"/langs/"+r+".js")}),"loaded")},c=function(e,r,i){var a=r;return t.push(a),n[e]={instance:a,dependencies:i},o(e,"added"),a},s=function(t){delete e[t],delete n[t]},l=function(t,e){return"object"===typeof e?e:"string"===typeof t?{prefix:"",resource:e,suffix:""}:{prefix:t.prefix,resource:e,suffix:t.suffix}},f=function(t,n){var r=e[t];Q(n,(function(t){Gs.ScriptLoader.add(r+"/"+t)}))},d=function(t,e,n,r){var o=a(t);Q(o,(function(t){var n=l(e,t);m(n.resource,n,void 0,void 0)})),n&&(r?n.call(r):n.call(Gs))},m=function(t,r,i,a,u){if(!e[t]){var c="string"===typeof r?r:r.prefix+r.resource+r.suffix;0!==c.indexOf("/")&&-1===c.indexOf("://")&&(c=cl.baseURL+"/"+c),e[t]=c.substring(0,c.lastIndexOf("/"));var s=function(){o(t,"loaded"),d(t,r,i,a)};n[t]?s():Gs.ScriptLoader.add(c,s,a,u)}},g=function(t,o,i){void 0===i&&(i="added"),Nt(n,t)&&"added"===i||Nt(e,t)&&"loaded"===i?o():r.push({name:t,state:i,callback:o})};return{items:t,urls:e,lookup:n,_listeners:r,get:i,dependencies:a,requireLangPack:u,add:c,remove:s,createUrl:l,addComponents:f,load:m,waitFor:g}};cl.languageLoad=!0,cl.baseURL="",cl.PluginManager=cl(),cl.ThemeManager=cl();var sl=function(t){var e=Ks(W.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(W.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},a=function(t){n(),e.set(W.some(t))};return{clear:r,isSet:o,get:i,set:a}},ll=function(){var t=sl(_),e=function(e){return t.get().each(e)};return Wt(Wt({},t),{on:e})},fl=function(t,e){var n=null,r=function(){w(n)||(clearTimeout(n),n=null)},o=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];w(n)&&(n=setTimeout((function(){n=null,t.apply(null,r)}),e))};return{cancel:r,throttle:o}},dl=function(t,e){var n=null,r=function(){w(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},ml=function(t,e){var n=yo(t,e);return void 0===n||""===n?[]:n.split(" ")},gl=function(t,e,n){var r=ml(t,e),o=r.concat([n]);return vo(t,e,o.join(" ")),!0},hl=function(t,e,n){var r=nt(ml(t,e),(function(t){return t!==n}));return r.length>0?vo(t,e,r.join(" ")):Co(t,e),!1},pl=function(t){return void 0!==t.dom.classList},vl=function(t){return ml(t,"class")},bl=function(t,e){return gl(t,"class",e)},yl=function(t,e){return hl(t,"class",e)},wl=function(t,e){pl(t)?t.dom.classList.add(e):bl(t,e)},xl=function(t){var e=pl(t)?t.dom.classList:vl(t);0===e.length&&Co(t,"class")},Cl=function(t,e){if(pl(t)){var n=t.dom.classList;n.remove(e)}else yl(t,e);xl(t)},Sl=function(t,e){return pl(t)&&t.dom.classList.contains(e)},kl=function(t,e){var n=[];return Q(rr(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(kl(t,e))})),n},Tl=function(t,e){return Mn(e,t)},Ol=D("mce-annotation"),_l=D("data-mce-annotation"),El=D("data-mce-annotation-uid"),Al=function(t,e){var n=t.selection.getRng(),r=wn.fromDom(n.startContainer),o=wn.fromDom(t.getBody()),i=e.fold((function(){return"."+Ol()}),(function(t){return"["+_l()+'="'+t+'"]'})),a=or(r,n.startOffset).getOr(r),u=Ei(a,i,(function(t){return Rn(t,o)})),c=function(t,e){return xo(t,e)?W.some(yo(t,e)):W.none()};return u.bind((function(e){return c(e,""+El()).bind((function(n){return c(e,""+_l()).map((function(e){var r=Ml(t,n);return{uid:n,name:e,elements:r}}))}))}))},Dl=function(t){return Vn(t)&&Sl(t,Ol())},Ml=function(t,e){var n=wn.fromDom(t.getBody());return Tl(n,"["+El()+'="'+e+'"]')},Nl=function(t,e){var n=wn.fromDom(t.getBody()),r=Tl(n,"["+_l()+'="'+e+'"]'),o={};return Q(r,(function(t){var e=yo(t,El()),n=Mt(o,e).getOr([]);o[e]=n.concat([t])})),o},Rl=function(t,e){var n=Ks({}),r=function(){return{listeners:[],previous:ll()}},o=function(t,e){i(t,(function(t){return e(t),t}))},i=function(t,e){var o=n.get(),i=Mt(o,t).getOrThunk(r),a=e(i);o[t]=a,n.set(o)},a=function(t,e,n){o(t,(function(r){Q(r.listeners,(function(r){return r(!0,t,{uid:e,nodes:Z(n,(function(t){return t.dom}))})}))}))},u=function(t){o(t,(function(e){Q(e.listeners,(function(e){return e(!1,t)}))}))},c=dl((function(){var e=n.get(),r=gt(wt(e));Q(r,(function(e){i(e,(function(n){var r=n.previous.get();return Al(t,W.some(e)).fold((function(){r.isSome()&&(u(e),n.previous.clear())}),(function(t){var e=t.uid,o=t.name,i=t.elements;so(r,e)||(a(o,e,i),n.previous.set(e))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);t.on("remove",(function(){c.cancel()})),t.on("NodeChange",(function(){c.throttle()}));var s=function(t,e){i(t,(function(t){return{previous:t.previous,listeners:t.listeners.concat([e])}}))};return{addListener:s}},zl=function(t,e){var n=function(t){return W.from(t.attr(_l())).bind(e.lookup)};t.on("init",(function(){t.serializer.addNodeFilter("span",(function(t){Q(t,(function(t){n(t).each((function(e){!1===e.persistent&&t.unwrap()}))}))}))}))},Bl=function(){var t={},e=function(e,n){t[e]={name:e,settings:n}},n=function(e){return Mt(t,e).map((function(t){return t.settings}))};return{register:e,lookup:n}},Pl=0,Il=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return Pl++,t+"_"+r+Pl+String(n)},Ll=function(t,e){Q(e,(function(e){wl(t,e)}))},Hl=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,rr(wn.fromDom(r))},Fl=function(t){return Z(t,wn.fromDom)},Vl=function(t){return t.dom.innerHTML},jl=function(t,e){var n=qn(t),r=n.dom,o=wn.fromDom(r.createDocumentFragment()),i=Hl(e,r);kr(o,i),Tr(t),xr(t,o)},Ul=function(t,e){return wn.fromDom(t.dom.cloneNode(e))},Wl=function(t){return Ul(t,!1)},$l=function(t){return Ul(t,!0)},ql=function(t,e,n){void 0===n&&(n=L);var r=new Fi(t,e),o=function(t){var e;do{e=r[t]()}while(e&&!Qr(e)&&!n(e));return W.from(e).filter(Qr)};return{current:function(){return W.from(r.current()).filter(Qr)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},Gl=function(t,e){var n=e||function(e){return t.isBlock(e)||ro(e)||ao(e)},r=function(t,e,n,o){if(Qr(t)){var i=o(t,e,t.data);if(-1!==i)return W.some({container:t,offset:i})}return n().bind((function(t){return r(t.container,t.offset,n,o)}))},o=function(t,e,o,i){var a=ql(t,i,n);return r(t,e,(function(){return a.prev().map((function(t){return{container:t,offset:t.length}}))}),o).getOrNull()},i=function(t,e,o,i){var a=ql(t,i,n);return r(t,e,(function(){return a.next().map((function(t){return{container:t,offset:0}}))}),o).getOrNull()};return{backwards:o,forwards:i}},Kl=Math.round,Xl=function(t){return t?{left:Kl(t.left),top:Kl(t.top),bottom:Kl(t.bottom),right:Kl(t.right),width:Kl(t.width),height:Kl(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Yl=function(t,e){return t=Xl(t),e||(t.left=t.left+t.width),t.right=t.left,t.width=0,t},Jl=function(t,e){return t.left===e.left&&t.top===e.top&&t.bottom===e.bottom&&t.right===e.right},Zl=function(t,e,n){return t>=0&&t<=Math.min(e.height,n.height)/2},Ql=function(t,e){var n=Math.min(e.height/2,t.height/2);return t.bottom-n<e.top||!(t.top>e.bottom)&&Zl(e.top-t.bottom,t,e)},tf=function(t,e){return t.top>e.bottom||!(t.bottom<e.top)&&Zl(e.bottom-t.top,t,e)},ef=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},nf=function(t,e,n){return Math.min(Math.max(t,e),n)},rf=function(t){var e=t.startContainer,n=t.startOffset;return e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null},of=function(t,e){if(Ur(t)&&t.hasChildNodes()){var n=t.childNodes,r=nf(e,0,n.length-1);return n[r]}return t},af=function(t,e){return e<0&&Ur(t)&&t.hasChildNodes()?void 0:of(t,e)},uf=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),cf=function(t){return"string"===typeof t&&t.charCodeAt(0)>=768&&uf.test(t)},sf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(t[n](e))return!0;return!1}},lf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}},ff=Ur,df=Ha,mf=$r("display","block table"),gf=$r("float","left right"),hf=lf(ff,df,z(gf)),pf=z($r("white-space","pre pre-line pre-wrap")),vf=Qr,bf=ro,yf=Hs.nodeIndex,wf=af,xf=function(t){return"createRange"in t?t.createRange():Hs.DOM.createRng()},Cf=function(t){return t&&/[\r\n\t ]/.test(t)},Sf=function(t){return!!t.setStart&&!!t.setEnd},kf=function(t){var e=t.startContainer,n=t.startOffset;if(Cf(t.toString())&&pf(e.parentNode)&&Qr(e)){var r=e.data;if(Cf(r[n-1])||Cf(r[n+1]))return!0}return!1},Tf=function(t){var e=t.ownerDocument,n=xf(e),r=e.createTextNode(sa),o=t.parentNode;o.insertBefore(r,t),n.setStart(r,0),n.setEnd(r,1);var i=Xl(n.getBoundingClientRect());return o.removeChild(r),i},Of=function(t){var e=t.startContainer,n=t.endContainer,r=t.startOffset,o=t.endOffset;if(e===n&&Qr(n)&&0===r&&1===o){var i=t.cloneRange();return i.setEndAfter(n),Ef(i)}return null},_f=function(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom},Ef=function(t){var e,n=t.getClientRects();return e=n.length>0?Xl(n[0]):Xl(t.getBoundingClientRect()),!Sf(t)&&bf(t)&&_f(e)?Tf(t):_f(e)&&Sf(t)?Of(t):e},Af=function(t,e){var n=Yl(t,e);return n.width=1,n.right=n.left+1,n},Df=function(t){var e=[],n=function(t){0!==t.height&&(e.length>0&&Jl(t,e[e.length-1])||e.push(t))},r=function(t,r){var o=xf(t.ownerDocument);if(r<t.data.length){if(cf(t.data[r]))return e;if(cf(t.data[r-1])&&(o.setStart(t,r),o.setEnd(t,r+1),!kf(o)))return n(Af(Ef(o),!1)),e}r>0&&(o.setStart(t,r-1),o.setEnd(t,r),kf(o)||n(Af(Ef(o),!1))),r<t.data.length&&(o.setStart(t,r),o.setEnd(t,r+1),kf(o)||n(Af(Ef(o),!0)))},o=t.container(),i=t.offset();if(vf(o))return r(o,i),e;if(ff(o))if(t.isAtEnd()){var a=wf(o,i);vf(a)&&r(a,a.data.length),hf(a)&&!bf(a)&&n(Af(Ef(a),!1))}else{a=wf(o,i);if(vf(a)&&r(a,0),hf(a)&&t.isAtEnd())return n(Af(Ef(a),!1)),e;var u=wf(t.container(),t.offset()-1);hf(u)&&!bf(u)&&(mf(u)||mf(a)||!hf(a))&&n(Af(Ef(u),!1)),hf(a)&&n(Af(Ef(a),!0))}return e},Mf=function(t,e,n){var r=function(){return vf(t),0===e},o=function(){return vf(t)?e>=t.data.length:e>=t.childNodes.length},i=function(){var n=xf(t.ownerDocument);return n.setStart(t,e),n.setEnd(t,e),n},a=function(){return n||(n=Df(Mf(t,e))),n},u=function(){return a().length>0},c=function(n){return n&&t===n.container()&&e===n.offset()},s=function(n){return wf(t,n?e-1:e)};return{container:D(t),offset:D(e),toRange:i,getClientRects:a,isVisible:u,isAtStart:r,isAtEnd:o,isEqual:c,getNode:s}};Mf.fromRangeStart=function(t){return Mf(t.startContainer,t.startOffset)},Mf.fromRangeEnd=function(t){return Mf(t.endContainer,t.endOffset)},Mf.after=function(t){return Mf(t.parentNode,yf(t)+1)},Mf.before=function(t){return Mf(t.parentNode,yf(t))},Mf.isAbove=function(t,e){return fo(pt(e.getClientRects()),vt(t.getClientRects()),Ql).getOr(!1)},Mf.isBelow=function(t,e){return fo(vt(e.getClientRects()),pt(t.getClientRects()),tf).getOr(!1)},Mf.isAtStart=function(t){return!!t&&t.isAtStart()},Mf.isAtEnd=function(t){return!!t&&t.isAtEnd()},Mf.isTextPosition=function(t){return!!t&&Qr(t.container())},Mf.isElementPosition=function(t){return!1===Mf.isTextPosition(t)};var Nf,Rf=function(t,e){Qr(e)&&0===e.data.length&&t.remove(e)},zf=function(t,e,n){e.insertNode(n),Rf(t,n.previousSibling),Rf(t,n.nextSibling)},Bf=function(t,e,n){var r=W.from(n.firstChild),o=W.from(n.lastChild);e.insertNode(n),r.each((function(e){return Rf(t,e.previousSibling)})),o.each((function(e){return Rf(t,e.nextSibling)}))},Pf=function(t,e,n){no(n)?Bf(t,e,n):zf(t,e,n)},If=Qr,Lf=Kr,Hf=Hs.nodeIndex,Ff=function(t){var e=t.parentNode;return Lf(e)?Ff(e):e},Vf=function(t){return t?Vt(t.childNodes,(function(t,e){return Lf(e)&&"BR"!==e.nodeName?t=t.concat(Vf(e)):t.push(e),t}),[]):[]},jf=function(t,e){while(t=t.previousSibling){if(!If(t))break;e+=t.data.length}return e},Uf=function(t){return function(e){return t===e}},Wf=function(t){var e,n;e=Vf(Ff(t)),n=jt(e,Uf(t),t),e=e.slice(0,n+1);var r=Vt(e,(function(t,n,r){return If(n)&&If(e[r-1])&&t++,t}),0);return e=Ht(e,Wr([t.nodeName])),n=jt(e,Uf(t),t),n-r},$f=function(t){var e;return e=If(t)?"text()":t.nodeName.toLowerCase(),e+"["+Wf(t)+"]"},qf=function(t,e,n){var r=[];for(e=e.parentNode;e!==t;e=e.parentNode){if(n&&n(e))break;r.push(e)}return r},Gf=function(t,e){var n,r,o,i,a,u=[];return n=e.container(),r=e.offset(),If(n)?o=jf(n,r):(i=n.childNodes,r>=i.length?(o="after",r=i.length-1):o="before",n=i[r]),u.push($f(n)),a=qf(t,n),a=Ht(a,z(Kr)),u=u.concat(Lt(a,(function(t){return $f(t)}))),u.reverse().join("/")+","+o},Kf=function(t,e,n){var r=Vf(t);return r=Ht(r,(function(t,e){return!If(t)||!If(r[e-1])})),r=Ht(r,Wr([e])),r[n]},Xf=function(t,e){var n,r=t,o=0;while(If(r)){if(n=r.data.length,e>=o&&e<=o+n){t=r,e-=o;break}if(!If(r.nextSibling)){t=r,e=n;break}o+=n,r=r.nextSibling}return If(t)&&e>t.data.length&&(e=t.data.length),Mf(t,e)},Yf=function(t,e){var n;if(!e)return null;var r=e.split(","),o=r[0].split("/");n=r.length>1?r[1]:"before";var i=Vt(o,(function(t,e){var n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(e);return n?("text()"===n[1]&&(n[1]="#text"),Kf(t,n[1],parseInt(n[2],10))):null}),t);return i?If(i)?Xf(i,parseInt(n,10)):(n="after"===n?Hf(i)+1:Hf(i),Mf(i.parentNode,n)):null},Jf=ao,Zf=function(t,e,n){var r,o;for(o=t(e.data.slice(0,n)).length,r=e.previousSibling;r&&Qr(r);r=r.previousSibling)o+=t(r.data).length;return o},Qf=function(t,e,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,l=t.getRoot();for(Qr(a)?c.push(n?Zf(e,a,u):u):(i=a.childNodes,u>=i.length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(t.nodeIndex(i[u],n)+s));a&&a!==l;a=a.parentNode)c.push(t.nodeIndex(a,n));return c},td=function(t,e,n,r){var o=e.dom,i={};return i.start=Qf(o,t,n,r,!0),e.isCollapsed()||(i.end=Qf(o,t,n,r,!1)),Da(r)&&(i.isFakeCaret=!0),i},ed=function(t,e,n){var r=0;return gn.each(t.select(e),(function(t){if("all"!==t.getAttribute("data-mce-bogus"))return t!==n&&void r++})),r},nd=function(t,e){var n,r,o,i=e?"start":"end";n=t[i+"Container"],r=t[i+"Offset"],Ur(n)&&"TR"===n.nodeName&&(o=n.childNodes,n=o[Math.min(e?r:r-1,o.length-1)],n&&(r=e?0:n.childNodes.length,t["set"+(e?"Start":"End")](n,r)))},rd=function(t){return nd(t,!0),nd(t,!1),t},od=function(t,e){var n;if(Ur(t)&&(t=of(t,e),Jf(t)))return t;if(ya(t)){if(Qr(t)&&va(t)&&(t=t.parentNode),n=t.previousSibling,Jf(n))return n;if(n=t.nextSibling,Jf(n))return n}},id=function(t){return od(t.startContainer,t.startOffset)||od(t.endContainer,t.endOffset)},ad=function(t,e,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Jf(r)||"IMG"===o)return{name:o,index:ed(n.dom,o,r)};var a=id(i);return a?(o=a.tagName,{name:o,index:ed(n.dom,o,a)}):td(t,n,e,i)},ud=function(t){var e=t.getRng();return{start:Gf(t.dom.getRoot(),Mf.fromRangeStart(e)),end:Gf(t.dom.getRoot(),Mf.fromRangeEnd(e))}},cd=function(t){return{rng:t.getRng()}},sd=function(t,e,n){var r={"data-mce-type":"bookmark",id:e,style:"overflow:hidden;line-height:0px"};return n?t.create("span",r,"&#xFEFF;"):t.create("span",r)},ld=function(t,e){var n=t.dom,r=t.getRng(),o=n.uniqueId(),i=t.isCollapsed(),a=t.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:ed(n,u,a)};var c=rd(r.cloneRange());if(!i){c.collapse(!1);var s=sd(n,o+"_end",e);Pf(n,c,s)}r=rd(r),r.collapse(!0);var l=sd(n,o+"_start",e);return Pf(n,r,l),t.moveToBookmark({id:o,keep:!0}),{id:o}},fd=function(t,e,n){return 2===e?ad(ga,n,t):3===e?ud(t):e?cd(t):ld(t,!1)},dd=R(ad,M,!0),md=Hs.DOM,gd="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow",hd=function(t,e,n){var r=t.getParam(e,n);if(-1!==r.indexOf("=")){var o=t.getParam(e,"","hash");return Mt(o,t.id).getOr(n)}return r},pd=function(t){return t.getParam("iframe_attrs",{})},vd=function(t){return t.getParam("doctype","<!DOCTYPE html>")},bd=function(t){return t.getParam("document_base_url","")},yd=function(t){return hd(t,"body_id","tinymce")},wd=function(t){return hd(t,"body_class","")},xd=function(t){return t.getParam("content_security_policy","")},Cd=function(t){return t.getParam("br_in_pre",!0)},Sd=function(t){if(t.getParam("force_p_newlines",!1))return"p";var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},kd=function(t){return t.getParam("forced_root_block_attrs",{})},Td=function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Od=function(t){return t.getParam("no_newline_selector","")},_d=function(t){return t.getParam("keep_styles",!0)},Ed=function(t){return t.getParam("end_container_on_empty_block",!1)},Ad=function(t){return gn.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},Dd=function(t){return gn.explode(t.getParam("font_size_classes",""))},Md=function(t){return t.getParam("images_dataimg_filter",H,"function")},Nd=function(t){return t.getParam("automatic_uploads",!0,"boolean")},Rd=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},zd=function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")},Bd=function(t){return t.getParam("icons","","string")},Pd=function(t){return t.getParam("icons_url","","string")},Id=function(t){return t.getParam("images_upload_url","","string")},Ld=function(t){return t.getParam("images_upload_base_path","","string")},Hd=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},Fd=function(t){return t.getParam("images_upload_handler",null,"function")},Vd=function(t){return t.getParam("content_css_cors",!1,"boolean")},jd=function(t){return t.getParam("referrer_policy","","string")},Ud=function(t){return t.getParam("language","en","string")},Wd=function(t){return t.getParam("language_url","","string")},$d=function(t){return t.getParam("indent_use_margin",!1)},qd=function(t){return t.getParam("indentation","40px","string")},Gd=function(t){var e=t.getParam("content_css");return v(e)?Z(e.split(","),fe):y(e)?e:!1===e||t.inline?[]:["default"]},Kd=function(t){var e=t.getParam("font_css",[]);return y(e)?e:Z(e.split(","),fe)},Xd=function(t){return t.getParam("directionality",ul.isRtl()?"rtl":void 0)},Yd=function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Jd=function(t){var e=t.getParam("object_resizing");return!1!==e&&!tn.iOS&&(v(e)?e:"table,img,figure.image,div,video,iframe")},Zd=function(t){return t.getParam("resize_img_proportional",!0,"boolean")},Qd=function(t){return t.getParam("placeholder",md.getAttrib(t.getElement(),"placeholder"),"string")},tm=function(t){return t.getParam("event_root")},em=function(t){return t.getParam("service_message")},nm=function(t){return t.getParam("theme")},rm=function(t){return t.getParam("validate")},om=function(t){return!1!==t.getParam("inline_boundaries")},im=function(t){return t.getParam("formats")},am=function(t){var e=t.getParam("preview_styles",gd);return v(e)?e:""},um=function(t){return t.getParam("format_empty_lines",!1,"boolean")},cm=function(t){return t.getParam("custom_ui_selector","","string")},sm=function(t){return t.getParam("theme_url")},lm=function(t){return t.getParam("inline")},fm=function(t){return t.getParam("hidden_input")},dm=function(t){return t.getParam("submit_patch")},mm=function(t){return"xml"===t.getParam("encoding")},gm=function(t){return t.getParam("add_form_submit_trigger")},hm=function(t){return t.getParam("add_unload_trigger")},pm=function(t){return""!==Sd(t)},vm=function(t){return t.getParam("custom_undo_redo_levels",0,"number")},bm=function(t){return t.getParam("disable_nodechange")},ym=function(t){return t.getParam("readonly")},wm=function(t){return t.getParam("content_css_cors")},xm=function(t){return t.getParam("plugins","","string")},Cm=function(t){return t.getParam("external_plugins")},Sm=function(t){return t.getParam("block_unsupported_drop",!0,"boolean")},km=function(t){return t.getParam("visual",!0,"boolean")},Tm=function(t){return t.getParam("visual_table_class","mce-item-table","string")},Om=function(t){return t.getParam("visual_anchor_class","mce-item-anchor","string")},_m=function(t){return t.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")},Em=Ur,Am=Qr,Dm=function(t){var e=t.parentNode;e&&e.removeChild(t)},Mm=function(t){var e=ga(t);return{count:t.length-e.length,text:e}},Nm=function(t){var e;while(-1!==(e=t.data.lastIndexOf(da)))t.deleteData(e,1)},Rm=function(t,e){return Hm(t),e},zm=function(t,e){var n=Mm(t.data.substr(0,e.offset())),r=Mm(t.data.substr(e.offset())),o=n.text+r.text;return o.length>0?(Nm(t),Mf(t,e.offset()-n.count)):e},Bm=function(t,e){var n=e.container(),r=X(bt(n.childNodes),t).map((function(t){return t<e.offset()?Mf(n,e.offset()-1):e})).getOr(e);return Hm(t),r},Pm=function(t,e){return Am(t)&&e.container()===t?zm(t,e):Rm(t,e)},Im=function(t,e){return e.container()===t.parentNode?Bm(t,e):Rm(t,e)},Lm=function(t,e){return Mf.isTextPosition(e)?Pm(t,e):Im(t,e)},Hm=function(t){Em(t)&&ya(t)&&(wa(t)?t.removeAttribute("data-mce-caret"):Dm(t)),Am(t)&&(Nm(t),0===t.data.length&&Dm(t))},Fm=$e().browser,Vm=ao,jm=co,Um=uo,Wm="*[contentEditable=false],video,audio,embed,object",$m=function(t,e,n){var r,o,i=Yl(e.getBoundingClientRect(),n);if("BODY"===t.tagName){var a=t.ownerDocument.documentElement;r=t.scrollLeft||a.scrollLeft,o=t.scrollTop||a.scrollTop}else{var u=t.getBoundingClientRect();r=t.scrollLeft-u.left,o=t.scrollTop-u.top}i.left+=r,i.right+=r,i.top+=o,i.bottom+=o,i.width=1;var c=e.offsetWidth-e.clientWidth;return c>0&&(n&&(c*=-1),i.left+=c,i.right+=c),i},qm=function(t){for(var e=Tl(wn.fromDom(t),Wm),n=0;n<e.length;n++){var r=e[n].dom,o=r.previousSibling;if(_a(o)){var i=o.data;1===i.length?o.parentNode.removeChild(o):o.deleteData(i.length-1,1)}if(o=r.nextSibling,Oa(o)){i=o.data;1===i.length?o.parentNode.removeChild(o):o.deleteData(0,1)}}},Gm=function(t,e,n,r){var o,i,a=ll(),u=Sd(t),c=u.length>0?u:"p",s=function(t,r){var o;if(l(),Um(r))return null;if(!n(r))return i=xa(r,t),o=r.ownerDocument.createRange(),Xm(i.nextSibling)?(o.setStart(i,0),o.setEnd(i,0)):(o.setStart(i,1),o.setEnd(i,1)),o;i=Ta(c,r,t);var u=$m(e,r,t);Ms(i).css("top",u.top);var s=Ms('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(Wt({},u)).appendTo(e)[0];return a.set({caret:s,element:r,before:t}),t&&Ms(s).addClass("mce-visual-caret-before"),f(),o=r.ownerDocument.createRange(),o.setStart(i,0),o.setEnd(i,0),o},l=function(){qm(e),i&&(Hm(i),i=null),a.on((function(t){Ms(t.caret).remove(),a.clear()})),o&&(Pi.clearInterval(o),o=void 0)},f=function(){o=Pi.setInterval((function(){r()?Ms("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):Ms("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")}),500)},d=function(){a.on((function(t){var n=$m(e,t.element,t.before);Ms(t.caret).css(Wt({},n))}))},m=function(){return Pi.clearInterval(o)},g=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;}"};return{show:s,hide:l,getCss:g,reposition:d,destroy:m}},Km=function(){return Fm.isIE()||Fm.isEdge()||Fm.isFirefox()},Xm=function(t){return Vm(t)||jm(t)},Ym=function(t){return Xm(t)||Yr(t)&&Km()},Jm=ao,Zm=co,Qm=$r("display","block table table-cell table-caption list-item"),tg=ya,eg=va,ng=Ur,rg=Ha,og=function(t){return t>0},ig=function(t){return t<0},ag=function(t,e){var n;while(n=t(e))if(!eg(n))return n;return null},ug=function(t,e,n,r,o){var i=new Fi(t,r),a=Jm(t)||eg(t);if(ig(e)){if(a&&(t=ag(i.prev.bind(i),!0),n(t)))return t;while(t=ag(i.prev.bind(i),o))if(n(t))return t}if(og(e)){if(a&&(t=ag(i.next.bind(i),!0),n(t)))return t;while(t=ag(i.next.bind(i),o))if(n(t))return t}return null},cg=function(t,e){while(t&&t!==e){if(Qm(t))return t;t=t.parentNode}return null},sg=function(t,e,n){return cg(t.container(),n)===cg(e.container(),n)},lg=function(t,e){if(!e)return null;var n=e.container(),r=e.offset();return ng(n)?n.childNodes[r+t]:null},fg=function(t,e){var n=e.ownerDocument.createRange();return t?(n.setStartBefore(e),n.setEndBefore(e)):(n.setStartAfter(e),n.setEndAfter(e)),n},dg=function(t,e,n){return cg(e,t)===cg(n,t)},mg=function(t,e,n){var r=t?"previousSibling":"nextSibling";while(n&&n!==e){var o=n[r];if(tg(o)&&(o=o[r]),Jm(o)||Zm(o)){if(dg(e,o,n))return o;break}if(rg(o))break;n=n.parentNode}return null},gg=R(fg,!0),hg=R(fg,!1),pg=function(t,e,n){var r,o=R(mg,!0,e),i=R(mg,!1,e),a=n.startContainer,u=n.startOffset;if(va(a)){ng(a)||(a=a.parentNode);var c=a.getAttribute("data-mce-caret");if("before"===c&&(r=a.nextSibling,Ym(r)))return gg(r);if("after"===c&&(r=a.previousSibling,Ym(r)))return hg(r)}if(!n.collapsed)return n;if(Qr(a)){if(tg(a)){if(1===t){if(r=i(a),r)return gg(r);if(r=o(a),r)return hg(r)}if(-1===t){if(r=o(a),r)return hg(r);if(r=i(a),r)return gg(r)}return n}if(_a(a)&&u>=a.data.length-1)return 1===t&&(r=i(a),r)?gg(r):n;if(Oa(a)&&u<=1)return-1===t&&(r=o(a),r)?hg(r):n;if(u===a.data.length)return r=i(a),r?gg(r):n;if(0===u)return r=o(a),r?hg(r):n}return n},vg=function(t,e){return W.from(lg(t?0:-1,e)).filter(Jm)},bg=function(t,e,n){var r=pg(t,e,n);return-1===t?Mf.fromRangeStart(r):Mf.fromRangeEnd(r)},yg=function(t){return W.from(t.getNode()).map(wn.fromDom)},wg=function(t){return W.from(t.getNode(!0)).map(wn.fromDom)},xg=function(t,e){while(e=t(e))if(e.isVisible())return e;return e},Cg=function(t,e){var n=sg(t,e);return!(n||!ro(t.getNode()))||n};(function(t){t[t["Backwards"]=-1]="Backwards",t[t["Forwards"]=1]="Forwards"})(Nf||(Nf={}));var Sg=ao,kg=Qr,Tg=Ur,Og=ro,_g=Ha,Eg=Wa,Ag=$a,Dg=function(t,e){var n=[];while(t&&t!==e)n.push(t),t=t.parentNode;return n},Mg=function(t,e){return t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null},Ng=function(t,e){if(og(t)){if(_g(e.previousSibling)&&!kg(e.previousSibling))return Mf.before(e);if(kg(e))return Mf(e,0)}if(ig(t)){if(_g(e.nextSibling)&&!kg(e.nextSibling))return Mf.after(e);if(kg(e))return Mf(e,e.data.length)}return ig(t)?Og(e)?Mf.before(e):Mf.after(e):Mf.before(e)},Rg=function(t,e){var n=e.nextSibling;return n&&_g(n)?kg(n)?Mf(n,0):Mf.before(n):zg(Nf.Forwards,Mf.after(e),t)},zg=function(t,e,n){var r,o,i,a;if(!Tg(n)||!e)return null;if(e.isEqual(Mf.after(n))&&n.lastChild){if(a=Mf.after(n.lastChild),ig(t)&&_g(n.lastChild)&&Tg(n.lastChild))return Og(n.lastChild)?Mf.before(n.lastChild):a}else a=e;var u=a.container(),c=a.offset();if(kg(u)){if(ig(t)&&c>0)return Mf(u,--c);if(og(t)&&c<u.length)return Mf(u,++c);r=u}else{if(ig(t)&&c>0&&(o=Mg(u,c-1),_g(o)))return!Eg(o)&&(i=ug(o,t,Ag,o),i)?kg(i)?Mf(i,i.data.length):Mf.after(i):kg(o)?Mf(o,o.data.length):Mf.before(o);if(og(t)&&c<u.childNodes.length&&(o=Mg(u,c),_g(o)))return Og(o)?Rg(n,o):!Eg(o)&&(i=ug(o,t,Ag,o),i)?kg(i)?Mf(i,0):Mf.before(i):kg(o)?Mf(o,0):Mf.after(o);r=o||a.getNode()}if((og(t)&&a.isAtEnd()||ig(t)&&a.isAtStart())&&(r=ug(r,t,H,n,!0),Ag(r,n)))return Ng(t,r);o=ug(r,t,Ag,n);var s=Ut(nt(Dg(u,n),Sg));return!s||o&&s.contains(o)?o?Ng(t,o):null:(a=og(t)?Mf.after(s):Mf.before(s),a)},Bg=function(t){return{next:function(e){return zg(Nf.Forwards,e,t)},prev:function(e){return zg(Nf.Backwards,e,t)}}},Pg=function(t,e,n){var r=t?Mf.before(n):Mf.after(n);return Ug(t,e,r)},Ig=function(t){return ro(t)?Mf.before(t):Mf.after(t)},Lg=function(t){return Mf.isTextPosition(t)?0===t.offset():Ha(t.getNode())},Hg=function(t){if(Mf.isTextPosition(t)){var e=t.container();return t.offset()===e.data.length}return Ha(t.getNode(!0))},Fg=function(t,e){return!Mf.isTextPosition(t)&&!Mf.isTextPosition(e)&&t.getNode()===e.getNode(!0)},Vg=function(t){return!Mf.isTextPosition(t)&&ro(t.getNode())},jg=function(t,e,n){return t?!Fg(e,n)&&!Vg(e)&&Hg(e)&&Lg(n):!Fg(n,e)&&Lg(e)&&Hg(n)},Ug=function(t,e,n){var r=Bg(e);return W.from(t?r.next(n):r.prev(n))},Wg=function(t,e,n){return Ug(t,e,n).bind((function(r){return sg(n,r,e)&&jg(t,n,r)?Ug(t,e,r):W.some(r)}))},$g=function(t,e,n,r){return Wg(t,e,n).bind((function(n){return r(n)?$g(t,e,n,r):W.some(n)}))},qg=function(t,e){var n=t?e.firstChild:e.lastChild;return Qr(n)?W.some(Mf(n,t?0:n.data.length)):n?Ha(n)?W.some(t?Mf.before(n):Ig(n)):Pg(t,e,n):W.none()},Gg=R(Ug,!0),Kg=R(Ug,!1),Xg=R(qg,!0),Yg=R(qg,!1),Jg="_mce_caret",Zg=function(t){return Ur(t)&&t.id===Jg},Qg=function(t,e){while(e&&e!==t){if(e.id===Jg)return e;e=e.parentNode}return null},th=function(t){return v(t.start)},eh=function(t){return Nt(t,"rng")},nh=function(t){return Nt(t,"id")},rh=function(t){return Nt(t,"name")},oh=function(t){return gn.isArray(t.start)},ih=function(t,e){return Ur(e)&&t.isBlock(e)&&!e.innerHTML&&!tn.ie&&(e.innerHTML='<br data-mce-bogus="1" />'),e},ah=function(t,e){var n,r=t.createRng();return n=Yf(t.getRoot(),e.start),r.setStart(n.container(),n.offset()),n=Yf(t.getRoot(),e.end),r.setEnd(n.container(),n.offset()),r},uh=function(t,e){var n=t.ownerDocument.createTextNode(da);t.appendChild(n),e.setStart(n,0),e.setEnd(n,0)},ch=function(t){return!1===t.hasChildNodes()},sh=function(t,e){return Yg(t).fold(L,(function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0}))},lh=function(t,e,n){return!(!ch(e)||!Qg(t,e))&&(uh(e,n),!0)},fh=function(t,e,n,r){var o,i,a,u,c=n[e?"start":"end"],s=t.getRoot();if(c){for(a=c[0],i=s,o=c.length-1;o>=1;o--){if(u=i.childNodes,lh(s,i,r))return!0;if(c[o]>u.length-1)return!!lh(s,i,r)||sh(i,r);i=u[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),e?r.setStart(i,a):r.setEnd(i,a)}return!0},dh=function(t){return Qr(t)&&t.data.length>0},mh=function(t,e,n){var r,o,i,a,u,c,s=t.get(n.id+"_"+e),l=n.keep;if(s){if(r=s.parentNode,"start"===e?(l?s.hasChildNodes()?(r=s.firstChild,o=1):dh(s.nextSibling)?(r=s.nextSibling,o=0):dh(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=t.nodeIndex(s)+1):o=t.nodeIndex(s),u=r,c=o):(l?s.hasChildNodes()?(r=s.firstChild,o=1):dh(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=t.nodeIndex(s)):o=t.nodeIndex(s),u=r,c=o),!l){a=s.previousSibling,i=s.nextSibling,gn.each(gn.grep(s.childNodes),(function(t){Qr(t)&&(t.nodeValue=t.nodeValue.replace(/\uFEFF/g,""))}));while(s=t.get(n.id+"_"+e))t.remove(s,!0);a&&i&&a.nodeType===i.nodeType&&Qr(a)&&!tn.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),t.remove(i),u=a,c=o)}return W.some(Mf(u,c))}return W.none()},gh=function(t,e){var n=t.createRng();return fh(t,!0,e,n)&&fh(t,!1,e,n)?W.some(n):W.none()},hh=function(t,e){var n=mh(t,"start",e),r=mh(t,"end",e);return fo(n,r.or(n),(function(e,n){var r=t.createRng();return r.setStart(ih(t,e.container()),e.offset()),r.setEnd(ih(t,n.container()),n.offset()),r}))},ph=function(t,e){return W.from(t.select(e.name)[e.index]).map((function(e){var n=t.createRng();return n.selectNode(e),n}))},vh=function(t,e){var n=t.dom;if(e){if(oh(e))return gh(n,e);if(th(e))return W.some(ah(n,e));if(nh(e))return hh(n,e);if(rh(e))return ph(n,e);if(eh(e))return W.some(e.rng)}return W.none()},bh=function(t,e,n){return fd(t,e,n)},yh=function(t,e){vh(t,e).each((function(e){t.setRng(e)}))},wh=function(t){return Ur(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},xh=function(t){return function(e){return t===e}},Ch=xh(sa),Sh=function(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)},kh=function(t){return!Sh(t)&&!Ch(t)},Th=function(t){return!!t.nodeType},Oh=function(t){return t&&/^(IMG)$/.test(t.nodeName)},_h=function(t,e,n){var r=n.startOffset,o=n.startContainer;if((o!==n.endContainer||!Oh(o.childNodes[r]))&&Ur(o)){var i=o.childNodes,a=void 0;r<i.length?(o=i[r],a=new Fi(o,t.getParent(o,t.isBlock))):(o=i[i.length-1],a=new Fi(o,t.getParent(o,t.isBlock)),a.next(!0));for(var u=a.current();u;u=a.next())if(Qr(u)&&!Mh(u))return n.setStart(u,0),void e.setRng(n)}},Eh=function(t,e,n){if(t){var r=e?"nextSibling":"previousSibling";for(t=n?t:t[r];t;t=t[r])if(Ur(t)||!Mh(t))return t}},Ah=function(t,e){return Th(e)&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]},Dh=function(t,e,n){return t.schema.isValidChild(e,n)},Mh=function(t,e){if(void 0===e&&(e=!1),k(t)&&Qr(t)){var n=e?t.data.replace(/ /g," "):t.data;return Ga(n)}return!1},Nh=function(t){return k(t)&&Qr(t)&&0===t.length},Rh=function(t,e){return T(t)?t=t(e):k(e)&&(t=t.replace(/%(\w+)/g,(function(t,n){return e[n]||t}))),t},zh=function(t,e){return t=t||"",e=e||"",t=""+(t.nodeName||t),e=""+(e.nodeName||e),t.toLowerCase()===e.toLowerCase()},Bh=function(t,e,n){return"color"!==n&&"backgroundColor"!==n||(e=t.toHex(e)),"fontWeight"===n&&700===e&&(e="bold"),"fontFamily"===n&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e},Ph=function(t,e,n){return Bh(t,t.getStyle(e,n),n)},Ih=function(t,e){var n;return t.getParent(e,(function(e){return n=t.getStyle(e,"text-decoration"),n&&"none"!==n})),n},Lh=function(t,e,n){return t.getParents(e,n,t.getRoot())},Hh=function(t,e){var n=function(t){var e=function(t){return t.length>1&&"%"===t.charAt(0)};return J(["styles","attributes"],(function(n){return Mt(t,n).exists((function(t){var n=y(t)?t:Dt(t);return J(n,e)}))}))};return J(t.formatter.get(e),n)},Fh=function(t,e,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(t){return Et(t,(function(t,e){return J(r,(function(t){return t===e}))}))};return J(t.formatter.get(e),(function(e){var r=o(e);return J(t.formatter.get(n),(function(t){var e=o(t);return zt(r,e)}))}))},Vh=function(t){return Rt(t,"block")},jh=function(t){return Rt(t,"selector")},Uh=function(t){return Rt(t,"inline")},Wh=function(t){return jh(t)&&Uh(t)&&so(Mt(t,"mixed"),!0)},$h=function(t){return jh(t)&&!1!==t.expand&&!Uh(t)},qh=wh,Gh=Lh,Kh=Mh,Xh=Ah,Yh=function(t){return ro(t)&&t.getAttribute("data-mce-bogus")&&!t.nextSibling},Jh=function(t,e){var n=e;while(n){if(Ur(n)&&t.getContentEditable(n))return"false"===t.getContentEditable(n)?n:e;n=n.parentNode}return e},Zh=function(t,e,n,r){for(var o=e.data,i=n;t?i>=0:i<o.length;t?i--:i++)if(r(o.charAt(i)))return t?i+1:i;return-1},Qh=function(t,e,n){return Zh(t,e,n,(function(t){return Ch(t)||Sh(t)}))},tp=function(t,e,n){return Zh(t,e,n,kh)},ep=function(t,e,n,r,o,i){var a,u=t.getParent(n,t.isBlock)||e,c=function(e,n,r){var i=Gl(t),c=o?i.backwards:i.forwards;return W.from(c(e,n,(function(t,e){return qh(t.parentNode)?-1:(a=t,r(o,t,e))}),u))},s=c(n,r,Qh);return s.bind((function(t){return i?c(t.container,t.offset+(o?-1:0),tp):W.some(t)})).orThunk((function(){return a?W.some({container:a,offset:o?0:a.length}):W.none()}))},np=function(t,e,n,r,o){Qr(r)&&he(r.data)&&r[o]&&(r=r[o]);for(var i=Gh(t,r),a=0;a<i.length;a++)for(var u=0;u<e.length;u++){var c=e[u];if((!k(c.collapsed)||c.collapsed===n.collapsed)&&(jh(c)&&t.is(i[a],c.selector)))return i[a]}return r},rp=function(t,e,n,r){var o=n,i=t.dom,a=i.getRoot(),u=e[0];if(Vh(u)&&(o=u.wrapper?null:i.getParent(n,u.block,a)),!o){var c=i.getParent(n,"LI,TD,TH");o=i.getParent(Qr(n)?n.parentNode:n,(function(e){return e!==a&&Xh(t,e)}),c)}if(o&&Vh(u)&&u.wrapper&&(o=Gh(i,o,"ul,ol").reverse()[0]||o),!o){o=n;while(o[r]&&!i.isBlock(o[r]))if(o=o[r],zh(o,"br"))break}return o||n},op=function(t,e,n,r){var o=n.parentNode;return!k(n[r])&&(!(o!==e&&!S(o)&&!t.isBlock(o))||op(t,e,o,r))},ip=function(t,e,n,r,o){var i=n,a=o?"previousSibling":"nextSibling",u=t.getRoot();if(Qr(n)&&!Kh(n)&&(o?r>0:r<n.data.length))return n;while(1){if(!e[0].block_expand&&t.isBlock(i))return i;for(var c=i[a];c;c=c[a]){var s=Qr(c)&&!op(t,u,c,a);if(!qh(c)&&!Yh(c)&&!Kh(c,s))return i}if(i===u||i.parentNode===u){n=i;break}i=i.parentNode}return n},ap=function(t){return qh(t.parentNode)||qh(t)},up=function(t,e,n,r){void 0===r&&(r=!1);var o=e.startContainer,i=e.startOffset,a=e.endContainer,u=e.endOffset,c=t.dom,s=n[0];if(Ur(o)&&o.hasChildNodes()&&(o=of(o,i),Qr(o)&&(i=0)),Ur(a)&&a.hasChildNodes()&&(a=of(a,e.collapsed?u:u-1),Qr(a)&&(u=a.nodeValue.length)),o=Jh(c,o),a=Jh(c,a),ap(o)&&(o=qh(o)?o:o.parentNode,o=e.collapsed?o.previousSibling||o:o.nextSibling||o,Qr(o)&&(i=e.collapsed?o.length:0)),ap(a)&&(a=qh(a)?a:a.parentNode,a=e.collapsed?a.nextSibling||a:a.previousSibling||a,Qr(a)&&(u=e.collapsed?0:a.length)),e.collapsed){var l=ep(c,t.getBody(),o,i,!0,r);l.each((function(t){var e=t.container,n=t.offset;o=e,i=n}));var f=ep(c,t.getBody(),a,u,!1,r);f.each((function(t){var e=t.container,n=t.offset;a=e,u=n}))}return(Uh(s)||s.block_expand)&&(Uh(s)&&Qr(o)&&0!==i||(o=ip(c,n,o,i,!0)),Uh(s)&&Qr(a)&&u!==a.nodeValue.length||(a=ip(c,n,a,u,!1))),$h(s)&&(o=np(c,n,e,o,"previousSibling"),a=np(c,n,e,a,"nextSibling")),(Vh(s)||jh(s))&&(o=rp(t,n,o,"previousSibling"),a=rp(t,n,a,"nextSibling"),Vh(s)&&(c.isBlock(o)||(o=ip(c,n,o,i,!0)),c.isBlock(a)||(a=ip(c,n,a,u,!1)))),Ur(o)&&(i=c.nodeIndex(o),o=o.parentNode),Ur(a)&&(u=c.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},cp=function(t,e,n){var r=e.startOffset,o=of(e.startContainer,r),i=e.endOffset,a=of(e.endContainer,i-1),u=function(t){var e=t[0];Qr(e)&&e===o&&r>=e.data.length&&t.splice(0,1);var n=t[t.length-1];return 0===i&&t.length>0&&n===a&&Qr(n)&&t.splice(t.length-1,1),t},c=function(t,e,n){for(var r=[];t&&t!==n;t=t[e])r.push(t);return r},s=function(e,n){return t.getParent(e,(function(t){return t.parentNode===n}),n)},l=function(t,e,r){for(var o=r?"nextSibling":"previousSibling",i=t,a=i.parentNode;i&&i!==e;i=a){a=i.parentNode;var s=c(i===t?i:i[o],o);s.length&&(r||s.reverse(),n(u(s)))}};if(o===a)return n(u([o]));var f=t.findCommonAncestor(o,a);if(t.isChildOf(o,a))return l(o,f,!0);if(t.isChildOf(a,o))return l(a,f);var d=s(o,f)||o,m=s(a,f)||a;l(o,d,!0);var g=c(d===o?d:d.nextSibling,"nextSibling",m===a?m.nextSibling:m);g.length&&n(u(g)),l(a,m)},sp=function(t){var e=[];if(t)for(var n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e},lp=function(t){return st(t,(function(t){var e=rf(t);return e?[wn.fromDom(e)]:[]}))},fp=function(t){return sp(t).length>1},dp=function(t){return nt(lp(t),ia)},mp=function(t){return Tl(t,"td[data-mce-selected],th[data-mce-selected]")},gp=function(t,e){var n=mp(e);return n.length>0?n:dp(t)},hp=function(t){return gp(sp(t.selection.getSel()),wn.fromDom(t.getBody()))},pp=function(t,e){return Oi(t,"table",e)},vp=function(t){var e=t.startContainer,n=t.startOffset;return Qr(e)?0===n?W.some(wn.fromDom(e)):W.none():W.from(e.childNodes[n]).map(wn.fromDom)},bp=function(t){var e=t.endContainer,n=t.endOffset;return Qr(e)?n===e.data.length?W.some(wn.fromDom(e)):W.none():W.from(e.childNodes[n-1]).map(wn.fromDom)},yp=function(t){return ir(t).fold(D([t]),(function(e){return[t].concat(yp(e))}))},wp=function(t){return ar(t).fold(D([t]),(function(e){return"br"===In(e)?Qn(e).map((function(e){return[t].concat(wp(e))})).getOr([]):[t].concat(wp(e))}))},xp=function(t,e){return fo(vp(e),bp(e),(function(e,n){var r=at(yp(t),R(Rn,e)),o=at(wp(t),R(Rn,n));return r.isSome()&&o.isSome()})).getOr(!1)},Cp=function(t,e,n,r){var o=n,i=new Fi(n,o),a=Et(t.schema.getMoveCaretBeforeOnEnterElements(),(function(t,e){return!Y(["td","th","table"],e.toLowerCase())}));do{if(Qr(n)&&0!==gn.trim(n.nodeValue).length)return void(r?e.setStart(n,0):e.setEnd(n,n.nodeValue.length));if(a[n.nodeName])return void(r?e.setStartBefore(n):"BR"===n.nodeName?e.setEndBefore(n):e.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?e.setStart(o,0):e.setEnd(o,o.childNodes.length))},Sp=function(t){var e=t.selection.getSel();return e&&e.rangeCount>0},kp=function(t,e){var n=hp(t);n.length>0?Q(n,(function(n){var r=n.dom,o=t.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),e(o,!0)})):e(t.selection.getRng(),!1)},Tp=function(t,e,n){var r=ld(t,e);n(r),t.moveToBookmark(r)},Op=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?W.from(e.dom.nodeValue):W.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},_p=Op(jn,"text"),Ep=function(t){return _p.get(t)},Ap=function(t){return jn(t)&&Ep(t)===da},Dp=function(t,e,n,r){return Yn(e).fold((function(){return"skipping"}),(function(o){return"br"===r||Ap(e)?"valid":Dl(e)?"existing":Zg(e.dom)?"caret":Dh(t,n,r)&&Dh(t,In(o),n)?"valid":"invalid-child"}))},Mp=function(t,e){var n=up(t,e,[{inline:"span"}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)},Np=function(t,e,n,r){var o=e.uid,i=void 0===o?Il("mce-annotation"):o,a=$t(e,["uid"]),u=wn.fromTag("span",t);wl(u,Ol()),vo(u,""+El(),i),vo(u,""+_l(),n);var c=r(i,a),s=c.attributes,l=void 0===s?{}:s,f=c.classes,d=void 0===f?[]:f;return bo(u,l),Ll(u,d),u},Rp=function(t,e,n,r,o){var i=[],a=Np(t.getDoc(),o,n,r),u=ll(),c=function(){u.clear()},s=function(){return u.get().getOrThunk((function(){var t=Wl(a);return i.push(t),u.set(t),t}))},l=function(t){Q(t,f)},f=function(e){var n=Dp(t,e,"span",In(e));switch(n){case"invalid-child":c();var r=rr(e);l(r),c();break;case"valid":var o=s();Cr(e,o);break}},d=function(t){var e=Z(t,wn.fromDom);l(e)};return cp(t.dom,e,(function(t){c(),d(t)})),i},zp=function(t,e,n,r){t.undoManager.transact((function(){var o=t.selection,i=o.getRng(),a=hp(t).length>0;if(i.collapsed&&!a&&Mp(t,i),o.getRng().collapsed&&!a){var u=Np(t.getDoc(),r,e,n.decorate);jl(u,sa),o.getRng().insertNode(u.dom),o.select(u.dom)}else Tp(o,!1,(function(){kp(t,(function(o){Rp(t,o,e,n.decorate,r)}))}))}))},Bp=function(t){var e=Bl();zl(t,e);var n=Rl(t);return{register:function(t,n){e.register(t,n)},annotate:function(n,r){e.lookup(n).each((function(e){zp(t,n,e,r)}))},annotationChanged:function(t,e){n.addListener(t,e)},remove:function(e){Al(t,W.some(e)).each((function(t){var e=t.elements;Q(e,_r)}))},getAll:function(e){var n=Nl(t,e);return St(n,(function(t){return Z(t,(function(t){return t.dom}))}))}}},Pp=function(t){return{getBookmark:R(bh,t),moveToBookmark:R(yh,t)}};Pp.isBookmarkNode=wh;var Ip=function(t,e){while(e&&e!==t){if(io(e)||ao(e))return e;e=e.parentNode}return null},Lp=function(t,e,n){if(n.collapsed)return!1;if(tn.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(Ur(r))return J(r.getClientRects(),(function(n){return ef(n,t,e)}))}return J(n.getClientRects(),(function(n){return ef(n,t,e)}))},Hp=function(t,e){return t.fire("PreProcess",e)},Fp=function(t,e){return t.fire("PostProcess",e)},Vp=function(t){return t.fire("remove")},jp=function(t){return t.fire("detach")},Up=function(t,e){return t.fire("SwitchMode",{mode:e})},Wp=function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})},$p=function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})},qp=function(t){return t.fire("PreInit")},Gp=function(t){return t.fire("PostRender")},Kp=function(t){return t.fire("Init")},Xp=function(t,e){return t.fire("PlaceholderToggle",{state:e})},Yp=function(t,e,n){return t.fire(e,n)},Jp=function(t,e,n,r){return t.fire("FormatApply",{format:e,node:n,vars:r})},Zp=function(t,e,n,r){return t.fire("FormatRemove",{format:e,node:n,vars:r})},Qp={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(t){return t.shiftKey||t.ctrlKey||t.altKey||Qp.metaKeyPressed(t)},metaKeyPressed:function(t){return tn.mac?t.metaKey:t.ctrlKey&&!t.altKey}},tv=ao,ev=function(t,e){var n,r,o,i,a,u,c,s,l,f,d,m,g,h,p,v,b,y="data-mce-selected",w=e.dom,x=gn.each,C=e.getDoc(),S=document,T=Math.abs,O=Math.round,_=e.getBody(),E={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},A=function(t){return t&&("IMG"===t.nodeName||e.dom.is(t,"figure.image"))},D=function(t){return co(t)||w.hasClass(t,"mce-preview-object")},M=function(t,e){if("longpress"===t.type||0===t.type.indexOf("touch")){var n=t.touches[0];return A(t.target)&&!Lp(n.clientX,n.clientY,e)}return A(t.target)&&!Lp(t.clientX,t.clientY,e)},N=function(t){var n=t.target;M(t,e.selection.getRng())&&!t.isDefaultPrevented()&&e.selection.select(n)},R=function(t){return w.is(t,"figure.image")?[t.querySelector("img")]:w.hasClass(t,"mce-preview-object")&&k(t.firstElementChild)?[t,t.firstElementChild]:[t]},z=function(t){var n=Jd(e);return!!n&&("false"!==t.getAttribute("data-mce-resize")&&(t!==e.getBody()&&(w.hasClass(t,"mce-preview-object")?An(wn.fromDom(t.firstElementChild),n):An(wn.fromDom(t),n))))},B=function(t){return D(t)?w.create("img",{src:tn.transparentSrc}):t.cloneNode(!0)},P=function(t,n,r){if(k(r)){var o=R(t);Q(o,(function(t){t.style[n]||!e.schema.isValid(t.nodeName.toLowerCase(),n)?w.setStyle(t,n,r):w.setAttrib(t,n,""+r)}))}},I=function(t,e,n){P(t,"width",e),P(t,"height",n)},L=function(t){var a,y,x,C,S;a=t.screenX-u,y=t.screenY-c,h=a*i[2]+f,p=y*i[3]+d,h=h<5?5:h,p=p<5?5:p,x=(A(n)||D(n))&&!1!==Zd(e)?!Qp.modifierPressed(t):Qp.modifierPressed(t),x&&(T(a)>T(y)?(p=O(h*m),h=O(p/m)):(h=O(p/m),p=O(h*m))),I(r,h,p),C=i.startPos.x+a,S=i.startPos.y+y,C=C>0?C:0,S=S>0?S:0,w.setStyles(o,{left:C,top:S,display:"block"}),o.innerHTML=h+" &times; "+p,i[2]<0&&r.clientWidth<=h&&w.setStyle(r,"left",s+(f-h)),i[3]<0&&r.clientHeight<=p&&w.setStyle(r,"top",l+(d-p)),a=_.scrollWidth-v,y=_.scrollHeight-b,a+y!==0&&w.setStyles(o,{left:C-a,top:S-y}),g||(Wp(e,n,f,d,"corner-"+i.name),g=!0)},H=function(){var t=g;g=!1,t&&(P(n,"width",h),P(n,"height",p)),w.unbind(C,"mousemove",L),w.unbind(C,"mouseup",H),S!==C&&(w.unbind(S,"mousemove",L),w.unbind(S,"mouseup",H)),w.remove(r),w.remove(o),w.remove(a),F(n),t&&($p(e,n,h,p,"corner-"+i.name),w.setAttrib(n,"style",w.getAttrib(n,"style"))),e.nodeChanged()},F=function(t){W();var s=w.getPos(t,_),l=s.x,g=s.y,k=t.getBoundingClientRect(),T=k.width||k.right-k.left,O=k.height||k.bottom-k.top;n!==t&&(V(),n=t,h=p=0);var A=e.fire("ObjectSelected",{target:t}),D=w.getAttrib(n,y,"1");z(t)&&!A.isDefaultPrevented()?x(E,(function(t,e){var s,h=function(s){var h=R(n)[0];u=s.screenX,c=s.screenY,f=h.clientWidth,d=h.clientHeight,m=d/f,i=t,i.name=e,i.startPos={x:T*t[0]+l,y:O*t[1]+g},v=_.scrollWidth,b=_.scrollHeight,a=w.add(_,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),w.setStyles(a,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),r=B(n),w.addClass(r,"mce-clonedresizable"),w.setAttrib(r,"data-mce-bogus","all"),r.contentEditable="false",w.setStyles(r,{left:l,top:g,margin:0}),I(r,T,O),r.removeAttribute(y),_.appendChild(r),w.bind(C,"mousemove",L),w.bind(C,"mouseup",H),S!==C&&(w.bind(S,"mousemove",L),w.bind(S,"mouseup",H)),o=w.add(_,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},f+" &times; "+d)};s=w.get("mceResizeHandle"+e),s&&w.remove(s),s=w.add(_,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===tn.ie&&(s.contentEditable=!1),w.bind(s,"mousedown",(function(t){t.stopImmediatePropagation(),t.preventDefault(),h(t)})),t.elm=s,w.setStyles(s,{left:T*t[0]+l-s.offsetWidth/2,top:O*t[1]+g-s.offsetHeight/2})})):V(),w.getAttrib(n,y)||n.setAttribute(y,D)},V=function(){W(),n&&n.removeAttribute(y),Ct(E,(function(t,e){var n=w.get("mceResizeHandle"+e);n&&(w.unbind(n),w.remove(n))}))},j=function(n){var r,o,i=function(t,e){if(t)do{if(t===e)return!0}while(t=t.parentNode)};g||e.removed||(x(w.select("img[data-mce-selected],hr[data-mce-selected]"),(function(t){t.removeAttribute(y)})),o="mousedown"===n.type?n.target:t.getNode(),o=w.$(o).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],i(o,_)&&($(),r=t.getStart(!0),i(r,o)&&i(t.getEnd(!0),o))?F(o):V())},U=function(t){return tv(Ip(e.getBody(),t))},W=function(){Ct(E,(function(t){t.elm&&(w.unbind(t.elm),delete t.elm)}))},$=function(){try{e.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(t){}};e.on("init",(function(){if($(),tn.browser.isIE()||tn.browser.isEdge()){e.on("mousedown click",(function(t){var n=t.target,r=n.nodeName;g||!/^(TABLE|IMG|HR)$/.test(r)||U(n)||(2!==t.button&&e.selection.select(n,"TABLE"===r),"mousedown"===t.type&&e.nodeChanged())}));var t=function(t){var n=function(t){Pi.setEditorTimeout(e,(function(){return e.selection.select(t)}))};if(U(t.target)||co(t.target))return t.preventDefault(),void n(t.target);/^(TABLE|IMG|HR)$/.test(t.target.nodeName)&&(t.preventDefault(),"IMG"===t.target.tagName&&n(t.target))};w.bind(_,"mscontrolselect",t),e.on("remove",(function(){return w.unbind(_,"mscontrolselect",t)}))}var r=Pi.throttle((function(t){e.composing||j(t)}));e.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",r),e.on("keyup compositionend",(function(t){n&&"TABLE"===n.nodeName&&r(t)})),e.on("hide blur",V),e.on("contextmenu longpress",N,!0)})),e.on("remove",W);var q=function(){n=r=a=null};return{isResizable:z,showResizeRect:F,hideResizeRect:V,updateResizeRect:j,destroy:q}},nv=function(t){return io(t)||ao(t)},rv=function(t,e,n){while(t&&t!==e){if(n(t))return t;t=t.parentNode}return null},ov=function(t,e,n){var r,o=n.elementFromPoint(t,e),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),r=gn.toArray(i.getClientRects()),r=r.sort((function(t,n){return t=Math.abs(Math.max(t.top-e,t.bottom-e)),n=Math.abs(Math.max(n.top-e,n.bottom-e)),t-n})),r.length>0){e=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(t,e),i.collapse(!0),i}catch(a){}}return null},iv=function(t,e){var n=t&&t.parentElement?t.parentElement():null;return ao(rv(n,e,nv))?null:t},av=function(t,e,n){var r,o,i=n;if(i.caretPositionFromPoint)o=i.caretPositionFromPoint(t,e),o&&(r=n.createRange(),r.setStart(o.offsetNode,o.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(t,e);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,e),r.collapse(!0)}catch(a){r=ov(t,e,n)}return iv(r,n.body)}return r},uv=function(t,e){return t&&e&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset},cv=function(t,e,n){while(t&&t!==e){if(n(t))return t;t=t.parentNode}return null},sv=function(t,e,n){return null!==cv(t,e,n)},lv=function(t,e,n){return sv(t,e,(function(t){return t.nodeName===n}))},fv=function(t){return t&&"TABLE"===t.nodeName},dv=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},mv=function(t,e){return ya(t)&&!1===sv(t,e,Zg)},gv=function(t,e,n){var r=new Fi(e,t.getParent(e.parentNode,t.isBlock)||t.getRoot());while(e=r[n?"prev":"next"]())if(ro(e))return!0},hv=function(t,e){return t.previousSibling&&t.previousSibling.nodeName===e},pv=function(t,e){while(e&&e!==t){if(ao(e))return!0;e=e.parentNode}return!1},vv=function(t,e,n,r,o){var i,a,u=t.getRoot(),c=t.schema.getNonEmptyElements(),s=t.getParent(o.parentNode,t.isBlock)||u;if(r&&ro(o)&&e&&t.isEmpty(s))return W.some(Mf(o.parentNode,t.nodeIndex(o)));var l=new Fi(o,s);while(a=l[r?"prev":"next"]()){if("false"===t.getContentEditableParent(a)||mv(a,u))return W.none();if(Qr(a)&&a.nodeValue.length>0)return!1===lv(a,u,"A")?W.some(Mf(a,r?a.nodeValue.length:0)):W.none();if(t.isBlock(a)||c[a.nodeName.toLowerCase()])return W.none();i=a}return n&&i?W.some(Mf(i,0)):W.none()},bv=function(t,e,n,r){var o,i,a,u,c=t.getRoot(),s=!1;o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var l=Ur(o)&&i===o.childNodes.length,f=t.schema.getNonEmptyElements();if(u=n,ya(o))return W.none();if(Ur(o)&&i>o.childNodes.length-1&&(u=!1),eo(o)&&(o=c,i=0),o===c){if(u&&(a=o.childNodes[i>0?i-1:0],a)){if(ya(a))return W.none();if(f[a.nodeName]||fv(a))return W.none()}if(o.hasChildNodes()){if(i=Math.min(!u&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Qr(o)&&l?o.data.length:0,!e&&o===c.lastChild&&fv(o))return W.none();if(pv(c,o)||ya(o))return W.none();if(o.hasChildNodes()&&!1===fv(o)){a=o;var d=new Fi(o,c);do{if(ao(a)||ya(a)){s=!1;break}if(Qr(a)&&a.nodeValue.length>0){i=u?0:a.nodeValue.length,o=a,s=!0;break}if(f[a.nodeName.toLowerCase()]&&!dv(a)){i=t.nodeIndex(a),o=a.parentNode,u||i++,s=!0;break}}while(a=u?d.next():d.prev())}}}return e&&(Qr(o)&&0===i&&vv(t,l,e,!0,o).each((function(t){o=t.container(),i=t.offset(),s=!0})),Ur(o)&&(a=o.childNodes[i],a||(a=o.childNodes[i-1]),!a||!ro(a)||hv(a,"A")||gv(t,a,!1)||gv(t,a,!0)||vv(t,l,e,!0,a).each((function(t){o=t.container(),i=t.offset(),s=!0})))),u&&!e&&Qr(o)&&i===o.nodeValue.length&&vv(t,l,e,!1,o).each((function(t){o=t.container(),i=t.offset(),s=!0})),s?W.some(Mf(o,i)):W.none()},yv=function(t,e){var n=e.collapsed,r=e.cloneRange(),o=Mf.fromRangeStart(e);return bv(t,n,!0,r).each((function(t){n&&Mf.isAbove(o,t)||r.setStart(t.container(),t.offset())})),n||bv(t,n,!1,r).each((function(t){r.setEnd(t.container(),t.offset())})),n&&r.collapse(!0),uv(e,r)?W.none():W.some(r)},wv=function(t,e){return t.splitText(e)},xv=function(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,o=t.endOffset;return e===r&&Qr(e)?n>0&&n<e.nodeValue.length&&(r=wv(e,n),e=r.previousSibling,o>n?(o-=n,e=r=wv(r,o).previousSibling,o=r.nodeValue.length,n=0):o=0):(Qr(e)&&n>0&&n<e.nodeValue.length&&(e=wv(e,n),n=0),Qr(r)&&o>0&&o<r.nodeValue.length&&(r=wv(r,o).previousSibling,o=r.nodeValue.length)),{startContainer:e,startOffset:n,endContainer:r,endOffset:o}},Cv=function(t){var e=function(e,n){return cp(t,e,n)},n=xv,r=function(e){return yv(t,e).fold(L,(function(t){return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),!0}))};return{walk:e,split:n,normalize:r}};Cv.compareRanges=uv,Cv.getCaretRangeFromPoint=av,Cv.getSelectedNode=rf,Cv.getNode=of;var Sv,kv=function(t,e){var n=function(e,n){if(!O(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;ho(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=Oo(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return ot(e,(function(e,n){var r=Oo(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},a=function(t,e,n){var r=i(t,n),o=e>r?e-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},Tv=kv("height",(function(t){var e=t.dom;return Er(t)?e.getBoundingClientRect().height:e.offsetHeight})),Ov=function(t){return Tv.get(t)},_v=function(t,e){var n=t.view(e);return n.fold(D([]),(function(e){var n=t.owner(e),r=_v(t,n);return[e].concat(r)}))},Ev=function(t,e){var n=e.owner(t);return _v(e,n)},Av=function(t){var e,n=t.dom===document?W.none():W.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement);return n.map(wn.fromDom)},Dv=function(t){return Gn(t)},Mv=Object.freeze({__proto__:null,view:Av,owner:Dv}),Nv=function(t){var e=wn.fromDom(document),n=Br(e),r=Ev(t,Mv),o=zr(t),i=rt(r,(function(t,e){var n=zr(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return Dr(i.left+o.left+n.left,i.top+o.top+n.top)},Rv=function(t){return"textarea"===In(t)},zv=function(t,e){var n=t.fire("ScrollIntoView",e);return n.isDefaultPrevented()},Bv=function(t,e){t.fire("AfterScrollIntoView",e)},Pv=function(t,e){var n=rr(t);if(0===n.length||Rv(t))return{element:t,offset:e};if(e<n.length&&!Rv(n[e]))return{element:n[e],offset:0};var r=n[n.length-1];return Rv(r)?{element:t,offset:e}:"img"===In(r)?{element:r,offset:1}:jn(r)?{element:r,offset:Ep(r).length}:{element:r,offset:rr(r).length}},Iv=function(t,e){var n=Rr(t),r=Ov(t);return{element:t,bottom:n.top+r,height:r,pos:n,cleanup:e}},Lv=function(t,e){var n=Pv(t,e),r=wn.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+da+"</span>");return br(n.element,r),Iv(r,(function(){return Or(r)}))},Hv=function(t){return Iv(wn.fromDom(t),_)},Fv=function(t,e,n,r){Wv(t,(function(o,i){return jv(t,e,n,r)}),n)},Vv=function(t,e,n,r,o){var i={elm:r.element.dom,alignToTop:o};if(!zv(t,i)){var a=Br(e).top;n(e,a,r,o),Bv(t,i)}},jv=function(t,e,n,r){var o=wn.fromDom(t.getBody()),i=wn.fromDom(t.getDoc());Do(o);var a=Lv(wn.fromDom(n.startContainer),n.startOffset);Vv(t,i,e,a,r),a.cleanup()},Uv=function(t,e,n,r){var o=wn.fromDom(t.getDoc());Vv(t,o,n,Hv(e),r)},Wv=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(wn.fromDom(r),wn.fromDom(i));var u=t.dom.createRng();u.setStart(r,o),u.setEnd(i,a),t.selection.setRng(n)},$v=function(t,e,n,r){var o=t.pos;if(n)Pr(o.left,o.top,r);else{var i=o.top-e+t.height;Pr(o.left,i,r)}},qv=function(t,e,n,r,o){var i=n+e,a=r.pos.top,u=r.bottom,c=u-a>=n;if(a<e)$v(r,n,!1!==o,t);else if(a>i){var s=c?!1!==o:!0===o;$v(r,n,s,t)}else u>i&&!c&&$v(r,n,!0===o,t)},Gv=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;qv(t,e,o,n,r)},Kv=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;qv(t,e,o,n,r);var i=Nv(n.element),a=Fr(window);i.top<a.y?Ir(n.element,!1!==r):i.top>a.bottom&&Ir(n.element,!0===r)},Xv=function(t,e,n){return Fv(t,Gv,e,n)},Yv=function(t,e,n){return Uv(t,e,Gv,n)},Jv=function(t,e,n){return Fv(t,Kv,e,n)},Zv=function(t,e,n){return Uv(t,e,Kv,n)},Qv=function(t,e,n){var r=t.inline?Yv:Zv;r(t,e,n)},tb=function(t,e,n){var r=t.inline?Xv:Jv;r(t,e,n)},eb=function(){return wn.fromDom(document)},nb=function(t){return t.dom.focus()},rb=function(t){var e=dr(t).dom;return t.dom===e.activeElement},ob=function(t){return void 0===t&&(t=eb()),W.from(t.dom.activeElement).map(wn.fromDom)},ib=function(t){return ob(dr(t)).filter((function(e){return t.dom.contains(e.dom)}))},ab=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},ub={create:ab},cb=ti.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),sb=function(t,e,n,r){return t.fold(e,n,r)},lb=function(t){return t.fold(M,M,M)},fb=cb.before,db=cb.on,mb=cb.after,gb={before:fb,on:db,after:mb,cata:sb,getStart:lb},hb=ti.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),pb=function(t){return hb.exact(t.start,t.soffset,t.finish,t.foffset)},vb=function(t){return t.match({domRange:function(t){return wn.fromDom(t.startContainer)},relative:function(t,e){return gb.getStart(t)},exact:function(t,e,n,r){return t}})},bb=hb.domRange,yb=hb.relative,wb=hb.exact,xb=function(t){var e=vb(t);return Xn(e)},Cb=ub.create,Sb={domRange:bb,relative:yb,exact:wb,exactFromRange:pb,getWin:xb,range:Cb},kb=$e().browser,Tb=function(t,e){var n=jn(e)?Ep(e).length:rr(e).length+1;return t>n?n:t<0?0:t},Ob=function(t){return Sb.range(t.start,Tb(t.soffset,t.start),t.finish,Tb(t.foffset,t.finish))},_b=function(t,e){return!jr(e.dom)&&(Pn(t,e)||Rn(t,e))},Eb=function(t){return function(e){return _b(t,e.start)&&_b(t,e.finish)}},Ab=function(t){return!0===t.inline||kb.isIE()},Db=function(t){return Sb.range(wn.fromDom(t.startContainer),t.startOffset,wn.fromDom(t.endContainer),t.endOffset)},Mb=function(t){var e=t.getSelection(),n=e&&0!==e.rangeCount?W.from(e.getRangeAt(0)):W.none();return n.map(Db)},Nb=function(t){var e=Xn(t);return Mb(e.dom).filter(Eb(t))},Rb=function(t,e){return W.from(e).filter(Eb(t)).map(Ob)},zb=function(t){var e=document.createRange();try{return e.setStart(t.start.dom,t.soffset),e.setEnd(t.finish.dom,t.foffset),W.some(e)}catch(n){return W.none()}},Bb=function(t){var e=Ab(t)?Nb(wn.fromDom(t.getBody())):W.none();t.bookmark=e.isSome()?e:t.bookmark},Pb=function(t,e){var n=wn.fromDom(t.getBody()),r=Ab(t)?W.from(e):W.none(),o=r.map(Db).filter(Eb(n));t.bookmark=o.isSome()?o:t.bookmark},Ib=function(t){var e=t.bookmark?t.bookmark:W.none();return e.bind((function(e){return Rb(wn.fromDom(t.getBody()),e)})).bind(zb)},Lb=function(t){Ib(t).each((function(e){return t.selection.setRng(e)}))},Hb=function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")},Fb={isEditorUIElement:Hb},Vb=function(t){return"nodechange"===t.type&&t.selectionChange},jb=function(t,e){var n=function(){e.throttle()};Hs.DOM.bind(document,"mouseup",n),t.on("remove",(function(){Hs.DOM.unbind(document,"mouseup",n)}))},Ub=function(t){t.on("focusout",(function(){Bb(t)}))},Wb=function(t,e){t.on("mouseup touchend",(function(t){e.throttle()}))},$b=function(t,e){var n=$e().browser;n.isIE()?Ub(t):Wb(t,e),t.on("keyup NodeChange",(function(e){Vb(e)||Bb(t)}))},qb=function(t){var e=fl((function(){Bb(t)}),0);t.on("init",(function(){t.inline&&jb(t,e),$b(t,e)})),t.on("remove",(function(){e.cancel()}))},Gb=Hs.DOM,Kb=function(t){return Fb.isEditorUIElement(t)},Xb=function(t){var e=t.classList;return void 0!==e&&(e.contains("tox-edit-area")||e.contains("tox-edit-area__iframe")||e.contains("mce-content-body"))},Yb=function(t,e){var n=cm(t),r=Gb.getParent(e,(function(e){return Kb(e)||!!n&&t.dom.is(e,n)}));return null!==r},Jb=function(t){try{var e=dr(wn.fromDom(t.getElement()));return ob(e).fold((function(){return document.body}),(function(t){return t.dom}))}catch(n){return document.body}},Zb=function(t,e){var n=e.editor;qb(n),n.on("focusin",(function(){var e=t.focusedEditor;e!==n&&(e&&e.fire("blur",{focusedEditor:n}),t.setActive(n),t.focusedEditor=n,n.fire("focus",{blurredEditor:e}),n.focus(!0))})),n.on("focusout",(function(){Pi.setEditorTimeout(n,(function(){var e=t.focusedEditor;Yb(n,Jb(n))||e!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null)}))})),Sv||(Sv=function(e){var n=t.activeEditor;n&&pr(e).each((function(e){e.ownerDocument===document&&(e===document.body||Yb(n,e)||t.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null))}))},Gb.bind(document,"focusin",Sv))},Qb=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(Gb.unbind(document,"focusin",Sv),Sv=null)},ty=function(t){t.on("AddEditor",R(Zb,t)),t.on("RemoveEditor",R(Qb,t))},ey=function(t,e){return t.dom.getParent(e,(function(e){return"true"===t.dom.getContentEditable(e)}))},ny=function(t){return t.collapsed?W.from(of(t.startContainer,t.startOffset)).map(wn.fromDom):W.none()},ry=function(t,e){return ny(e).bind((function(e){return oa(e)?W.some(e):!1===Pn(t,e)?W.some(t):W.none()}))},oy=function(t,e){ry(wn.fromDom(t.getBody()),e).bind((function(t){return Xg(t.dom)})).fold((function(){t.selection.normalize()}),(function(e){return t.selection.setRng(e.toRange())}))},iy=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},ay=function(t){return rb(t)||ib(t).isSome()},uy=function(t){return t.iframeElement&&rb(wn.fromDom(t.iframeElement))},cy=function(t){var e=t.getBody();return e&&ay(wn.fromDom(e))},sy=function(t){var e=dr(wn.fromDom(t.getElement()));return ob(e).filter((function(e){return!Xb(e.dom)&&Yb(t,e.dom)})).isSome()},ly=function(t){return t.inline?cy(t):uy(t)},fy=function(t){return ly(t)||sy(t)},dy=function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===ly(t)&&Ib(t).each((function(e){t.selection.setRng(e),r=e}));var o=ey(t,e.getNode());if(t.$.contains(n,o))return iy(o),oy(t,r),void my(t);t.inline||(tn.opera||iy(n),t.getWin().focus()),(tn.gecko||t.inline)&&(iy(n),oy(t,r)),my(t)},my=function(t){return t.editorManager.setActive(t)},gy=function(t,e){t.removed||(e?my(t):dy(t))},hy=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,a=n?e.startOffset:e.endOffset;return W.from(i).map(wn.fromDom).map((function(t){return r&&e.collapsed?t:or(t,o(t,a)).getOr(t)})).bind((function(t){return Vn(t)?W.some(t):Yn(t).filter(Vn)})).map((function(t){return t.dom})).getOr(t)},py=function(t,e,n){return hy(t,e,!0,n,(function(t,e){return Math.min(ur(t),e)}))},vy=function(t,e,n){return hy(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},by=function(t,e){var n=t;while(t&&Qr(t)&&0===t.length)t=e?t.nextSibling:t.previousSibling;return t||n},yy=function(t,e){var n,r,o;if(!e)return t;r=e.startContainer,o=e.endContainer;var i=e.startOffset,a=e.endOffset;return n=e.commonAncestorContainer,!e.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?by(r.nextSibling,!0):r.parentNode,o=0===a?by(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n},wy=function(t,e,n,r){var o,i=[],a=t.getRoot();if(n=t.getParent(n||py(a,e,e.collapsed),t.isBlock),r=t.getParent(r||vy(a,e,e.collapsed),t.isBlock),n&&n!==a&&i.push(n),n&&r&&n!==r){o=n;var u=new Fi(n,a);while((o=u.next())&&o!==r)t.isBlock(o)&&i.push(o)}return r&&n!==r&&r!==a&&i.push(r),i},xy=function(t,e,n){return W.from(e).map((function(e){var r=t.nodeIndex(e),o=t.createRng();return o.setStart(e.parentNode,r),o.setEnd(e.parentNode,r+1),n&&(Cp(t,o,e,!0),Cp(t,o,e,!1)),o}))},Cy=function(t,e){return Z(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Sy={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ky=function(t,e,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(t[r])return t[r];if(t!==e){var i=t[o];if(i)return i;for(var a=t.parent;a&&a!==e;a=a.parent)if(i=a[o],i)return i}},Ty=function(t){if(!Ga(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},Oy=function(t){var e="a"===t.name&&!t.attr("href")&&t.attr("id");return t.attr("name")||t.attr("id")&&!t.firstChild||t.attr("data-mce-bookmark")||e},_y=function(){function t(t,e){this.name=t,this.type=e,1===e&&(this.attributes=[],this.attributes.map={})}return t.create=function(e,n){var r=new t(e,Sy[e]||1);return n&&Ct(n,(function(t,e){r.attr(e,t)})),r},t.prototype.replace=function(t){var e=this;return t.parent&&t.remove(),e.insert(t,e),e.remove(),e},t.prototype.attr=function(t,e){var n,r=this;if("string"!==typeof t)return void 0!==t&&null!==t&&Ct(t,(function(t,e){r.attr(e,t)})),r;if(n=r.attributes){if(void 0!==e){if(null===e){if(t in n.map){delete n.map[t];var o=n.length;while(o--)if(n[o].name===t)return n.splice(o,1),r}return r}if(t in n.map){o=n.length;while(o--)if(n[o].name===t){n[o].value=e;break}}else n.push({name:t,value:e});return n.map[t]=e,r}return n.map[t]}},t.prototype.clone=function(){var e,n=this,r=new t(n.name,n.type);if(e=n.attributes){var o=[];o.map={};for(var i=0,a=e.length;i<a;i++){var u=e[i];"id"!==u.name&&(o[o.length]={name:u.name,value:u.value},o.map[u.name]=u.value)}r.attributes=o}return r.value=n.value,r.shortEnded=n.shortEnded,r},t.prototype.wrap=function(t){var e=this;return e.parent.insert(t,e),t.append(e),e},t.prototype.unwrap=function(){for(var t=this,e=t.firstChild;e;){var n=e.next;t.insert(e,t,!0),e=n}t.remove()},t.prototype.remove=function(){var t=this,e=t.parent,n=t.next,r=t.prev;return e&&(e.firstChild===t?(e.firstChild=n,n&&(n.prev=null)):r.next=n,e.lastChild===t?(e.lastChild=r,r&&(r.next=null)):n.prev=r,t.parent=t.next=t.prev=null),t},t.prototype.append=function(t){var e=this;t.parent&&t.remove();var n=e.lastChild;return n?(n.next=t,t.prev=n,e.lastChild=t):e.lastChild=e.firstChild=t,t.parent=e,t},t.prototype.insert=function(t,e,n){t.parent&&t.remove();var r=e.parent||this;return n?(e===r.firstChild?r.firstChild=t:e.prev.next=t,t.prev=e.prev,t.next=e,e.prev=t):(e===r.lastChild?r.lastChild=t:e.next.prev=t,t.next=e.next,t.prev=e,e.next=t),t.parent=r,t},t.prototype.getAll=function(t){for(var e=this,n=[],r=e.firstChild;r;r=ky(r,e))r.name===t&&n.push(r);return n},t.prototype.children=function(){for(var t=this,e=[],n=t.firstChild;n;n=n.next)e.push(n);return e},t.prototype.empty=function(){var t=this;if(t.firstChild){for(var e=[],n=t.firstChild;n;n=ky(n,t))e.push(n);var r=e.length;while(r--){n=e[r];n.parent=n.firstChild=n.lastChild=n.next=n.prev=null}}return t.firstChild=t.lastChild=null,t},t.prototype.isEmpty=function(t,e,n){void 0===e&&(e={});var r=this,o=r.firstChild;if(Oy(r))return!1;if(o)do{if(1===o.type){if(o.attr("data-mce-bogus"))continue;if(t[o.name])return!1;if(Oy(o))return!1}if(8===o.type)return!1;if(3===o.type&&!Ty(o))return!1;if(3===o.type&&o.parent&&e[o.parent.name]&&Ga(o.value))return!1;if(n&&n(o))return!1}while(o=ky(o,r));return!0},t.prototype.walk=function(t){return ky(this,null,t)},t}(),Ey=function(t){var e,n=/data:[^;]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=Il("img"),a=0,u=0;while(e=n.exec(t)){var c=e[0],s=i+"_"+u++;o[s]=c,a<e.index&&r.push(t.substr(a,e.index-a)),r.push(s),a=e.index+c.length}var l=new RegExp(i+"_[0-9]+","g");return 0===a?{prefix:i,uris:o,html:t,re:l}:(a<t.length&&r.push(t.substr(a)),{prefix:i,uris:o,html:r.join(""),re:l})},Ay=function(t,e){return t.replace(e.re,(function(t){return Mt(e.uris,t).getOr(t)}))},Dy=function(t){var e=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(t);return e?W.some({type:e[1],data:decodeURIComponent(e[2])}):W.none()},My=gn.each,Ny=gn.trim,Ry="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),zy={ftp:21,http:80,https:443,mailto:25},By=["img","video"],Py=function(t,e){return k(t)?!t:!k(e)||!Y(By,e)},Iy=function(t,e,n){return!t.allow_html_data_urls&&(/^data:image\//i.test(e)?Py(t.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(e):/^data:/i.test(e))},Ly=function(){function t(e,n){e=Ny(e),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");if(0!==e.indexOf("/")||i||(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var a=this.settings.base_uri?this.settings.base_uri.path:new t(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+o.toAbsPath(a,e);else{var u=/([^#?]*)([#?]?.*)/.exec(e);e=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(a,u[1])+u[2]}}e=e.replace(/@@/g,"(mce_at)");var c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);My(Ry,(function(t,e){var n=c[e];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[t]=n})),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}return t.parseDataUri=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},t.isDomSafe=function(t,e,n){if(void 0===n&&(n={}),n.allow_script_urls)return!0;var r=Eu.decode(t).replace(/[\s\u0000-\u001F]+/g,"");try{r=decodeURIComponent(r)}catch(o){r=unescape(r)}return!/((java|vb)script|mhtml):/i.test(r)&&!Iy(n,r,e)},t.getDocumentBaseUrl=function(t){var e;return e=0!==t.protocol.indexOf("http")&&"file:"!==t.protocol?t.href:t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},t.prototype.setPath=function(t){var e=/^(.*?)\/?(\w+)?$/.exec(t);this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},t.prototype.toRelative=function(e){var n;if("./"===e)return e;var r=new t(e,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},t.prototype.toAbsolute=function(e,n){var r=new t(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},t.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var e=zy[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},t.prototype.toRelPath=function(t,e){var n,r,o=0,i="",a=t.substring(0,t.lastIndexOf("/")).split("/"),u=e.split("/");if(a.length>=u.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||a[n]!==u[n]){o=n+1;break}if(1===o)return e;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=u.length;n<r;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},t.prototype.toAbsPath=function(t,e){var n,r,o=0,i=[],a=/\/$/.test(e)?"/":"",u=t.split("/"),c=e.split("/");for(My(u,(function(t){t&&i.push(t)})),u=i,n=c.length-1,i=[];n>=0;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?o>0?o--:i.push(c[n]):o++);return n=u.length-o,r=n<=0?ft(i).join("/"):u.slice(0,n).join("/")+"/"+ft(i).join("/"),0!==r.indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},t.prototype.getURI=function(t){var e;return void 0===t&&(t=!1),this.source&&!t||(e="",t||(this.protocol?e+=this.protocol+"://":e+="//",this.userInfo&&(e+=this.userInfo+"@"),this.host&&(e+=this.host),this.port&&(e+=":"+this.port)),this.path&&(e+=this.path),this.query&&(e+="?"+this.query),this.anchor&&(e+="#"+this.anchor),this.source=e),this.source},t}(),Hy=gn.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),Fy=function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")},Vy=function(t,e,n){var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,o=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=t.getShortEndedElements(),a=1,u=n;while(0!==a){r.lastIndex=u;while(1){var c=r.exec(e);if(null===c)return u;if("!"===c[1]){u=se(c[2],"--")?Uy(e,!1,c.index+"!--".length):Uy(e,!0,c.index+1);break}o.lastIndex=r.lastIndex;var s=o.exec(e);if(!w(s)&&s.index===r.lastIndex){"/"===c[1]?a-=1:Nt(i,c[2])||(a+=1),u=r.lastIndex+s[0].length;break}}}return u},jy=function(t,e){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(t.substr(e))},Uy=function(t,e,n){void 0===n&&(n=0);var r=t.toLowerCase();if(-1!==r.indexOf("[if ",n)&&jy(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(e){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/g;a.lastIndex=n;var u=a.exec(t);return u?u.index+u[0].length:r.length},Wy=function(t,e){var n=t.exec(e);if(n){var r=n[1],o=n[2];return"string"===typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null},$y=function(t,e){var n;void 0===e&&(e=Hu()),t=t||{};var r=null!==(n=t.document)&&void 0!==n?n:document,o=r.createElement("form");!1!==t.fix_self_closing&&(t.fix_self_closing=!0);var i=t.comment?t.comment:_,a=t.cdata?t.cdata:_,u=t.text?t.text:_,c=t.start?t.start:_,s=t.end?t.end:_,l=t.pi?t.pi:_,f=t.doctype?t.doctype:_,d=function(n,d){void 0===d&&(d="html");var m,g,h,p,v,b,y,w,x,C,S,k,T,O,_,E,A,D,M,N,R=n.html,z=0,B=[],P=0,I=Eu.decode,L=gn.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),H="html"===d?0:1,F=function(t){var e,n;e=B.length;while(e--)if(B[e].name===t)break;if(e>=0){for(n=B.length-1;n>=e;n--)t=B[n],t.valid&&s(t.name);B.length=e}},V=function(t,e){return u(Ay(t,n),e)},j=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),i(Ay(e,n)))},U=function(t){return Ay(t,n)},W=function(t,e){var n=t||"",r=!se(n,"--"),o=Uy(R,r,e);return t=R.substr(e,o-e),j(r?n+t:t),o+1},$=function(e,n,i,a,u){if(n=n.toLowerCase(),i=U(n in Y?n:I(i||a||u||"")),J&&!w&&!1===Fy(n)){var c=O[n];if(!c&&_){var s=_.length;while(s--)if(c=_[s],c.pattern.test(n))break;-1===s&&(c=null)}if(!c)return;if(c.validValues&&!(i in c.validValues))return}var l="name"===n||"id"===n;l&&e in Hy&&(i in r||i in o)||L[n]&&!Ly.isDomSafe(i,e,t)||w&&(n in L||0===n.indexOf("on"))||(p.map[n]=i,p.push({name:n,value:i}))},q=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"),G=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,K=e.getShortEndedElements(),X=t.self_closing_elements||e.getSelfClosingElements(),Y=e.getBoolAttrs(),J=t.validate,Z=t.remove_internals,Q=t.fix_self_closing,tt=e.getSpecialElements(),et=R+">";while(m=q.exec(et)){var nt=m[0];if(z<m.index&&V(I(R.substr(z,m.index-z))),g=m[7])g=g.toLowerCase(),":"===g.charAt(0)&&(g=g.substr(1)),F(g);else if(g=m[8]){if(m.index+nt.length>R.length){V(I(R.substr(m.index))),z=m.index+nt.length;continue}g=g.toLowerCase(),":"===g.charAt(0)&&(g=g.substr(1)),x=g in K,Q&&X[g]&&B.length>0&&B[B.length-1].name===g&&F(g);var rt=Wy(G,m[9]);if(null!==rt){if("all"===rt){z=Vy(e,R,q.lastIndex),q.lastIndex=z;continue}S=!1}if(!J||(C=e.getElementRule(g))){if(S=!0,J&&(O=C.attributes,_=C.attributePatterns),(T=m[9])?(w=-1!==T.indexOf("data-mce-type"),w&&Z&&(S=!1),p=[],p.map={},T.replace(G,(function(t,e,n,r,o){return $(g,e,n,r,o),""}))):(p=[],p.map={}),J&&!w){if(E=C.attributesRequired,A=C.attributesDefault,D=C.attributesForced,M=C.removeEmptyAttrs,M&&!p.length&&(S=!1),D){v=D.length;while(v--)k=D[v],y=k.name,N=k.value,"{$uid}"===N&&(N="mce_"+P++),p.map[y]=N,p.push({name:y,value:N})}if(A){v=A.length;while(v--)k=A[v],y=k.name,y in p.map||(N=k.value,"{$uid}"===N&&(N="mce_"+P++),p.map[y]=N,p.push({name:y,value:N}))}if(E){v=E.length;while(v--)if(E[v]in p.map)break;-1===v&&(S=!1)}if(k=p.map["data-mce-bogus"]){if("all"===k){z=Vy(e,R,q.lastIndex),q.lastIndex=z;continue}S=!1}}S&&c(g,p,x)}else S=!1;if(h=tt[g]){h.lastIndex=z=m.index+nt.length,(m=h.exec(R))?(S&&(b=R.substr(z,m.index-z)),z=m.index+m[0].length):(b=R.substr(z),z=R.length),S&&(b.length>0&&V(b,!0),s(g)),q.lastIndex=z;continue}x||(T&&T.indexOf("/")===T.length-1?S&&s(g):B.push({name:g,valid:S}))}else if(g=m[1])j(g);else if(g=m[2]){var ot=1===H||t.preserve_cdata||B.length>0&&e.isValidChild(B[B.length-1].name,"#cdata");if(!ot){z=W("",m.index+2),q.lastIndex=z;continue}a(g)}else if(g=m[3])f(g);else{if((g=m[4])||"<!"===nt){z=W(g,m.index+nt.length),q.lastIndex=z;continue}if(g=m[5]){if(1!==H){z=W("?",m.index+2),q.lastIndex=z;continue}l(g,m[6])}}z=m.index+nt.length}for(z<R.length&&V(I(R.substr(z))),v=B.length-1;v>=0;v--)g=B[v],g.valid&&s(g.name)},m=function(t,e){void 0===e&&(e="html"),d(Ey(t),e)};return{parse:m}};$y.findEndTag=Vy;var qy=function(t,e){var n=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return e.replace(n,"")},Gy=function(t,e){var n,r=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,o=t.schema,i=qy(t.getTempAttrs(),e),a=o.getShortEndedElements();while(n=r.exec(i)){var u=r.lastIndex,c=n[0].length,s=void 0;s=a[n[1]]?u:$y.findEndTag(o,i,u),i=i.substring(0,u-c)+i.substring(s),r.lastIndex=u-c}return ga(i)},Ky=Gy,Xy=function(t,e){var n=Sd(t),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return e.replace(r,"")},Yy=function(t,e){return Wt(Wt({},t),{format:e,get:!0,getInner:!0})},Jy=function(t,e,n,r){var o,i=Yy(e,n),a=e.no_events?i:t.fire("BeforeGetContent",i);return o="raw"===a.format?gn.trim(Ky(t.serializer,r.innerHTML)):"text"===a.format?t.dom.isEmpty(r)?"":ga(r.innerText||r.textContent):"tree"===a.format?t.serializer.serialize(r,a):Xy(t,t.serializer.serialize(r,a)),Y(["text","tree"],a.format)||aa(wn.fromDom(r))?a.content=o:a.content=gn.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Zy=function(t,e,n){return W.from(t.getBody()).fold(D("tree"===e.format?new _y("body",11):""),(function(r){return Jy(t,e,n,r)}))},Qy=gn.each,tw=function(t){var e=function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return Qy(t.getAttribs(e),(function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=t.getAttrib(e,o))})),n},o=function(t,e){var n,r;for(r in t)if(Nt(t,r)){if(n=e[r],"undefined"===typeof n)return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(Nt(e,r))return!1;return!0};return!!o(r(e),r(n))&&(!!o(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style")))&&(!wh(e)&&!wh(n)))};return{compare:e}},ew=gn.makeMap,nw=function(t){var e=[];t=t||{};var n=t.indent,r=ew(t.indent_before||""),o=ew(t.indent_after||""),i=Eu.getEncodeFunc(t.entity_encoding||"raw",t.entities),a="html"===t.element_format;return{start:function(t,u,c){var s,l,f,d;if(n&&r[t]&&e.length>0&&(d=e[e.length-1],d.length>0&&"\n"!==d&&e.push("\n")),e.push("<",t),u)for(s=0,l=u.length;s<l;s++)f=u[s],e.push(" ",f.name,'="',i(f.value,!0),'"');e[e.length]=!c||a?">":" />",c&&n&&o[t]&&e.length>0&&(d=e[e.length-1],d.length>0&&"\n"!==d&&e.push("\n"))},end:function(t){var r;e.push("</",t,">"),n&&o[t]&&e.length>0&&(r=e[e.length-1],r.length>0&&"\n"!==r&&e.push("\n"))},text:function(t,n){t.length>0&&(e[e.length]=n?t:i(t))},cdata:function(t){e.push("<![CDATA[",t,"]]>")},comment:function(t){e.push("\x3c!--",t,"--\x3e")},pi:function(t,r){r?e.push("<?",t," ",i(r),"?>"):e.push("<?",t,"?>"),n&&e.push("\n")},doctype:function(t){e.push("<!DOCTYPE",t,">",n?"\n":"")},reset:function(){e.length=0},getContent:function(){return e.join("").replace(/\n$/,"")}}},rw=function(t,e){void 0===e&&(e=Hu());var n=nw(t);t=t||{},t.validate=!("validate"in t)||t.validate;var r=function(r){var o=t.validate,i={3:function(t){n.text(t.value,t.raw)},8:function(t){n.comment(t.value)},7:function(t){n.pi(t.name,t.value)},10:function(t){n.doctype(t.value)},4:function(t){n.cdata(t.value)},11:function(t){if(t=t.firstChild)do{a(t)}while(t=t.next)}};n.reset();var a=function(t){var r=i[t.type];if(r)r(t);else{var u=t.name,c=t.shortEnded,s=t.attributes;if(o&&s&&s.length>1){var l=[];l.map={};var f=e.getElementRule(t.name);if(f){for(var d=0,m=f.attributesOrder.length;d<m;d++){var g=f.attributesOrder[d];if(g in s.map){var h=s.map[g];l.map[g]=h,l.push({name:g,value:h})}}for(d=0,m=s.length;d<m;d++){g=s[d].name;if(!(g in l.map)){h=s.map[g];l.map[g]=h,l.push({name:g,value:h})}}s=l}}if(n.start(t.name,s,c),!c){if(t=t.firstChild)do{a(t)}while(t=t.next);n.end(u)}}};return 1!==r.type||t.inner?i[11](r):a(r),n.getContent()};return{serialize:r}},ow=new Set;(function(){var t=["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"];Q(t,(function(t){ow.add(t)}))})();var iw=["font","text-decoration","text-emphasis"],aw=function(t,e){return wt(t.parseStyle(t.getAttrib(e,"style")))},uw=function(t){return ow.has(t)},cw=function(t,e){return lt(aw(t,e),(function(t){return!uw(t)}))},sw=function(t){return nt(t,(function(t){return J(iw,(function(e){return se(t,e)}))}))},lw=function(t,e,n){var r=aw(t,e),o=aw(t,n),i=function(r){var o=t.getStyle(e,r),i=t.getStyle(n,r);return ge(o)&&ge(i)&&o!==i};return J(r,(function(t){var e=function(e){return J(e,(function(e){return e===t}))};if(!e(o)&&e(iw)){var n=sw(o);return J(n,i)}return i(t)}))},fw=function(t,e,n){return W.from(n.container()).filter(Qr).exists((function(r){var o=t?0:-1;return e(r.data.charAt(n.offset()+o))}))},dw=R(fw,!0,Sh),mw=R(fw,!1,Sh),gw=function(t){var e=t.container();return Qr(e)&&(0===e.data.length||ma(e.data)&&Pp.isBookmarkNode(e.parentNode))},hw=function(t,e){return function(n){return W.from(lg(t?0:-1,n)).filter(e).isSome()}},pw=function(t){return oo(t)&&"block"===Oo(wn.fromDom(t),"display")},vw=function(t){return ao(t)&&!Xr(t)},bw=hw(!0,pw),yw=hw(!1,pw),ww=hw(!0,co),xw=hw(!1,co),Cw=hw(!0,Yr),Sw=hw(!1,Yr),kw=hw(!0,vw),Tw=hw(!1,vw),Ow=function(t){var e=[],n=t.dom;while(n)e.push(wn.fromDom(n)),n=n.lastChild;return e},_w=function(t){var e=Tl(t,"br"),n=nt(Ow(t).slice(-1),ta);e.length===n.length&&Q(n,Or)},Ew=function(t){Tr(t),xr(t,wn.fromHtml('<br data-mce-bogus="1">'))},Aw=function(t){ar(t).each((function(e){Qn(e).each((function(n){Ji(t)&&ta(e)&&Ji(n)&&Or(e)}))}))},Dw=function(t){return t.slice(0,-1)},Mw=function(t,e,n){return Pn(e,t)?Dw(Jn(t,(function(t){return n(t)||Rn(t,e)}))):[]},Nw=function(t,e){return Mw(t,e,L)},Rw=function(t,e){return[t].concat(Nw(t,e))},zw=function(t,e,n){return $g(t,e,n,gw)},Bw=function(t,e){return at(Rw(wn.fromDom(e.container()),t),Ji)},Pw=function(t,e,n){return zw(t,e.dom,n).forall((function(t){return Bw(e,n).fold((function(){return!1===sg(t,n,e.dom)}),(function(r){return!1===sg(t,n,e.dom)&&Pn(r,wn.fromDom(t.container()))}))}))},Iw=function(t,e,n){return Bw(e,n).fold((function(){return zw(t,e.dom,n).forall((function(t){return!1===sg(t,n,e.dom)}))}),(function(e){return zw(t,e.dom,n).isNone()}))},Lw=R(Iw,!1),Hw=R(Iw,!0),Fw=R(Pw,!1),Vw=R(Pw,!0),jw=function(t){return yg(t).exists(ta)},Uw=function(t,e,n){var r=nt(Rw(wn.fromDom(n.container()),e),Ji),o=pt(r).getOr(e);return Ug(t,o.dom,n).filter(jw)},Ww=function(t,e){return yg(e).exists(ta)||Uw(!0,t,e).isSome()},$w=function(t,e){return wg(e).exists(ta)||Uw(!1,t,e).isSome()},qw=R(Uw,!1),Gw=R(Uw,!0),Kw=function(t){return Mf.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Xw=function(t,e){var n=nt(Rw(wn.fromDom(e.container()),t),Ji);return pt(n).getOr(t)},Yw=function(t,e){return Kw(e)?mw(e):mw(e)||Kg(Xw(t,e).dom,e).exists(mw)},Jw=function(t,e){return Kw(e)?dw(e):dw(e)||Gg(Xw(t,e).dom,e).exists(dw)},Zw=function(t){return Y(["pre","pre-wrap"],t)},Qw=function(t){return yg(t).bind((function(t){return Si(t,Vn)})).exists((function(t){return Zw(Oo(t,"white-space"))}))},tx=function(t,e){return Kg(t.dom,e).isNone()},ex=function(t,e){return Gg(t.dom,e).isNone()},nx=function(t,e){return tx(t,e)||ex(t,e)||Lw(t,e)||Hw(t,e)||$w(t,e)||Ww(t,e)},rx=function(t,e){return!Qw(e)&&(nx(t,e)||Yw(t,e)||Jw(t,e))},ox=function(t,e){return!Qw(e)&&(Lw(t,e)||Fw(t,e)||$w(t,e)||Yw(t,e))},ix=function(t){var e=t.container(),n=t.offset();return Qr(e)&&n<e.data.length?Mf(e,n+1):t},ax=function(t,e){return!Qw(e)&&(Hw(t,e)||Vw(t,e)||Ww(t,e)||Jw(t,e))},ux=function(t,e){return ox(t,e)||ax(t,ix(e))},cx=function(t,e){return Ch(t.charAt(e))},sx=function(t){var e=t.container();return Qr(e)&&ce(e.data,sa)},lx=function(t){var e=t.split("");return Z(e,(function(t,n){return Ch(t)&&n>0&&n<e.length-1&&kh(e[n-1])&&kh(e[n+1])?" ":t})).join("")},fx=function(t,e){var n=e.data,r=Mf(e,0);return!(!cx(n,0)||ux(t,r))&&(e.data=" "+n.slice(1),!0)},dx=function(t){var e=t.data,n=lx(e);return n!==e&&(t.data=n,!0)},mx=function(t,e){var n=e.data,r=Mf(e,n.length-1);return!(!cx(n,n.length-1)||ux(t,r))&&(e.data=n.slice(0,-1)+" ",!0)},gx=function(t,e){return W.some(e).filter(sx).bind((function(e){var n=e.container(),r=fx(t,n)||dx(n)||mx(t,n);return r?W.some(e):W.none()}))},hx=function(t){var e=wn.fromDom(t.getBody());t.selection.isCollapsed()&&gx(e,Mf.fromRangeStart(t.selection.getRng())).each((function(e){t.selection.setRng(e.toRange())}))},px=function(t,e,n){var r=ot(t,(function(r,o){return Sh(o)||Ch(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+sa}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}}),{previousCharIsSpace:!1,str:""});return r.str},vx=function(t,e,n){if(0!==n){var r=wn.fromDom(t),o=Ci(r,Ji).getOr(r),i=t.data.slice(e,e+n),a=e+n>=t.data.length&&ax(o,Mf(t,t.data.length)),u=0===e&&ox(o,Mf(t,0));t.replaceData(e,n,px(i,u,a))}},bx=function(t,e){var n=t.data.slice(e),r=n.length-de(n).length;vx(t,e,r)},yx=function(t,e){var n=t.data.slice(0,e),r=n.length-me(n).length;vx(t,e-r,r)},wx=function(t,e,n,r){void 0===r&&(r=!0);var o=me(t.data).length,i=r?t:e,a=r?e:t;return r?i.appendData(a.data):i.insertData(0,a.data),Or(wn.fromDom(a)),n&&bx(i,o),i},xx=function(t,e){var n=t.container(),r=t.offset();return!1===Mf.isTextPosition(t)&&n===e.parentNode&&r>Mf.before(e).offset()},Cx=function(t,e){return xx(e,t)?Mf(e.container(),e.offset()-1):e},Sx=function(t){return Qr(t)?Mf(t,0):Mf.before(t)},kx=function(t){return Qr(t)?Mf(t,t.data.length):Mf.after(t)},Tx=function(t){return Ha(t.previousSibling)?W.some(kx(t.previousSibling)):t.previousSibling?Yg(t.previousSibling):W.none()},Ox=function(t){return Ha(t.nextSibling)?W.some(Sx(t.nextSibling)):t.nextSibling?Xg(t.nextSibling):W.none()},_x=function(t,e){var n=Mf.before(e.previousSibling?e.previousSibling:e.parentNode);return Kg(t,n).fold((function(){return Gg(t,Mf.after(e))}),W.some)},Ex=function(t,e){return Gg(t,Mf.after(e)).fold((function(){return Kg(t,Mf.before(e))}),W.some)},Ax=function(t,e){return Tx(e).orThunk((function(){return Ox(e)})).orThunk((function(){return _x(t,e)}))},Dx=function(t,e){return Ox(e).orThunk((function(){return Tx(e)})).orThunk((function(){return Ex(t,e)}))},Mx=function(t,e,n){return t?Dx(e,n):Ax(e,n)},Nx=function(t,e,n){return Mx(t,e,n).map(R(Cx,n))},Rx=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},zx=function(t){return function(e){return e.dom===t}},Bx=function(t,e){return e&&Nt(t.schema.getBlockElements(),In(e))},Px=function(t){if(nu(t)){var e=wn.fromHtml('<br data-mce-bogus="1">');return Tr(t),xr(t,e),W.some(Mf.before(e.dom))}return W.none()},Ix=function(t,e,n){var r=Qn(t).filter(jn),o=tr(t).filter(jn);return Or(t),mo(r,o,e,(function(t,e,r){var o=t.dom,i=e.dom,a=o.data.length;return wx(o,i,n),r.container()===i?Mf(o,a):r})).orThunk((function(){return n&&(r.each((function(t){return yx(t.dom,t.dom.length)})),o.each((function(t){return bx(t.dom,0)}))),e}))},Lx=function(t,e){return Nt(t.schema.getTextInlineElements(),In(e))},Hx=function(t,e,n,r){void 0===r&&(r=!0);var o=Nx(e,t.getBody(),n.dom),i=Ci(n,R(Bx,t),zx(t.getBody())),a=Ix(n,o,Lx(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):i.bind(Px).fold((function(){r&&Rx(t,e,a)}),(function(n){r&&Rx(t,e,W.some(n))}))},Fx=function(t){return function(e){return Rn(t,e)}},Vx=function(t){return Tl(t,"td,th")},jx=function(t,e){var n=function(t){return pp(wn.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),u=fo(r,o,Rn).getOr(!1),c=!u&&i&&a;return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:u,isMultiTable:c}},Ux=function(t,e){return{start:t,end:e}},Wx=function(t,e,n){return{rng:t,table:e,cells:n}},$x=ti.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),qx=function(t,e){return Ei(wn.fromDom(t),"td,th",e)},Gx=function(t){return!Rn(t.start,t.end)},Kx=function(t,e){return pp(t.start,e).bind((function(n){return pp(t.end,e).bind((function(t){return go(Rn(n,t),n)}))}))},Xx=function(t,e){return!Gx(t)&&Kx(t,e).exists((function(t){var e=t.dom.rows;return 1===e.length&&1===e[0].cells.length}))},Yx=function(t,e){var n=qx(t.startContainer,e),r=qx(t.endContainer,e);return fo(n,r,Ux)},Jx=function(t){return function(e){return pp(e,t).bind((function(t){return vt(Vx(t)).map((function(t){return Ux(e,t)}))}))}},Zx=function(t){return function(e){return pp(e,t).bind((function(t){return pt(Vx(t)).map((function(t){return Ux(t,e)}))}))}},Qx=function(t){return function(e){return Kx(e,t).map((function(t){return Wx(e,t,Vx(t))}))}},tC=function(t,e,n,r){if(n.collapsed||!t.forall(Gx))return W.none();if(e.isSameTable){var o=t.bind(Qx(r));return W.some({start:o,end:o})}var i=qx(n.startContainer,r),a=qx(n.endContainer,r),u=i.bind(Jx(r)).bind(Qx(r)),c=a.bind(Zx(r)).bind(Qx(r));return W.some({start:u,end:c})},eC=function(t,e){return ut(t,(function(t){return Rn(t,e)}))},nC=function(t){return fo(eC(t.cells,t.rng.start),eC(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)}))},rC=function(t,e,n){return t.exists((function(t){return Xx(t,n)&&xp(t.start,e)}))},oC=function(t,e){var n=e.startTable,r=e.endTable,o=t.cloneRange();return n.each((function(t){return o.setStartAfter(t.dom)})),r.each((function(t){return o.setEndBefore(t.dom)})),o},iC=function(t,e,n,r){return tC(t,e,n,r).bind((function(t){var e=t.start,n=t.end;return e.or(n)})).bind((function(t){var r=e.isSameTable,o=nC(t).getOr([]);if(r&&t.cells.length===o.length)return W.some($x.fullTable(t.table));if(o.length>0){if(r)return W.some($x.partialTable(o,W.none()));var i=oC(n,e);return W.some($x.partialTable(o,W.some(Wt(Wt({},e),{rng:i}))))}return W.none()}))},aC=function(t,e,n,r){return tC(t,e,n,r).bind((function(t){var r=t.start,o=t.end,i=r.bind(nC).getOr([]),a=o.bind(nC).getOr([]);if(i.length>0&&a.length>0){var u=oC(n,e);return W.some($x.multiTable(i,a,u))}return W.none()}))},uC=function(t,e){var n=Fx(t),r=Yx(e,n),o=jx(e,n);return rC(r,e,n)?r.map((function(t){return $x.singleCellTable(e,t.start)})):o.isMultiTable?aC(r,o,e,n):iC(r,o,e,n)},cC=function(t){var e=Fn(t)?Qn(t):ar(t);return e.bind(cC).orThunk((function(){return W.some(t)}))},sC=function(t){return Q(t,(function(t){Co(t,"contenteditable"),Ew(t)}))},lC=function(t,e){return W.from(t.dom.getParent(e,t.dom.isBlock)).map(wn.fromDom)},fC=function(t,e,n){n.each((function(n){e?Or(n):(Ew(n),t.selection.setCursorLocation(n.dom,0))}))},dC=function(t,e,n,r){var o=n.cloneRange();r?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(e.dom.lastChild)):(o.setStartBefore(e.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),pC(t,o,e,!1)},mC=function(t){var e=hp(t),n=wn.fromDom(t.selection.getNode());uo(n.dom)&&nu(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&J(e,(function(t){return Rn(t,n)}))&&vo(n,"data-mce-selected","1")},gC=function(t,e,n){var r=t.selection.getRng(),o=n.bind((function(n){var o=n.rng,i=n.isStartInTable,a=lC(t,i?o.endContainer:o.startContainer);o.deleteContents(),fC(t,i,a.filter(nu));var u=i?e[0]:e[e.length-1];return dC(t,u,r,i),nu(u)?W.none():W.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return sC(o),mC(t),!0},hC=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];dC(t,i,o,!0),dC(t,a,o,!1);var u=nu(i)?e:e.slice(1),c=nu(a)?n:n.slice(0,-1);return sC(u.concat(c)),r.deleteContents(),mC(t),!0},pC=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o=cC(n).getOr(n),i=wn.fromDom(t.dom.getParent(o.dom,t.dom.isBlock));if(nu(i)&&(Ew(i),r&&t.selection.setCursorLocation(i.dom,0)),!Rn(n,i)){var a=so(Yn(i),n)?[]:Zn(i);Q(a.concat(rr(n)),(function(t){Rn(t,i)||Pn(t,i)||!nu(t)||Or(t)}))}return!0},vC=function(t,e){return Hx(t,!1,e),!0},bC=function(t,e,n){return uC(e,n).map((function(e){return e.fold(R(pC,t),R(vC,t),R(gC,t),R(hC,t))}))},yC=function(t,e){return TC(t,e)},wC=function(t,e,n,r){return SC(e,r).fold((function(){return bC(t,e,n)}),(function(e){return yC(t,e)})).getOr(!1)},xC=function(t,e,n){var r=wn.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?gC(t,n,W.none()):wC(t,r,o,e)},CC=function(t,e){return at(Rw(e,t),ia)},SC=function(t,e){return at(Rw(e,t),$n("caption"))},kC=function(t,e,n,r,o){return Wg(n,t.getBody(),o).bind((function(t){return CC(e,wn.fromDom(t.getNode())).map((function(t){return!1===Rn(t,r)}))}))},TC=function(t,e){return Ew(e),t.selection.setCursorLocation(e.dom,0),W.some(!0)},OC=function(t,e,n,r){return Xg(t.dom).bind((function(o){return Yg(t.dom).map((function(t){return e?n.isEqual(o)&&r.isEqual(t):n.isEqual(t)&&r.isEqual(o)}))})).getOr(!0)},_C=function(t,e){return TC(t,e)},EC=function(t,e,n){return SC(t,wn.fromDom(n.getNode())).map((function(t){return!1===Rn(t,e)}))},AC=function(t,e,n,r,o){return Wg(n,t.getBody(),o).bind((function(i){return OC(r,n,o,i)?_C(t,r):EC(e,r,i)})).or(W.some(!0))},DC=function(t,e,n,r){var o=Mf.fromRangeStart(t.selection.getRng());return CC(n,r).bind((function(r){return nu(r)?TC(t,r):kC(t,n,e,r,o)})).getOr(!1)},MC=function(t,e,n,r){var o=Mf.fromRangeStart(t.selection.getRng());return nu(r)?TC(t,r):AC(t,n,e,r,o)},NC=function(t,e){return t?Cw(e):Sw(e)},RC=function(t,e){var n=Mf.fromRangeStart(t.selection.getRng());return NC(e,n)||Ug(e,t.getBody(),n).exists((function(t){return NC(e,t)}))},zC=function(t,e,n){var r=wn.fromDom(t.getBody());return SC(r,n).fold((function(){return DC(t,e,r,n)||RC(t,e)}),(function(n){return MC(t,e,r,n).getOr(!1)}))},BC=function(t,e){var n=wn.fromDom(t.selection.getStart(!0)),r=hp(t);return t.selection.isCollapsed()&&0===r.length?zC(t,e,n):xC(t,n,r)},PC=function(t,e,n,r){var o=document.createRange();return o.setStart(t,e),o.setEnd(n,r),o},IC=function(t){var e=Mf.fromRangeStart(t),n=Mf.fromRangeEnd(t),r=t.commonAncestorContainer;return Ug(!1,r,n).map((function(o){return!sg(e,n,r)&&sg(e,o,r)?PC(e.container(),e.offset(),o.container(),o.offset()):t})).getOr(t)},LC=function(t){return t.collapsed?t:IC(t)},HC=function(t){return t.firstChild&&t.firstChild===t.lastChild},FC=function(t){return"br"===t.name||t.value===sa},VC=function(t,e){var n=t.getBlockElements();return n[e.name]&&HC(e)&&FC(e.firstChild)},jC=function(t,e){var n=t.getNonEmptyElements();return e&&(e.isEmpty(n)||VC(t,e))},UC=function(t,e){var n=e.firstChild,r=e.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),jC(t,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},WC=function(t){var e=t.firstChild,n=t.lastChild;return e&&"META"===e.nodeName&&e.parentNode.removeChild(e),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),t},$C=function(t,e,n){var r=e.serialize(n),o=t.createFragment(r);return WC(o)},qC=function(t){return nt(t.childNodes,(function(t){return"LI"===t.nodeName}))},GC=function(t){return t.data===sa||ro(t)},KC=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&GC(t.firstChild)},XC=function(t){return!t.firstChild||KC(t)},YC=function(t){return t.length>0&&XC(t[t.length-1])?t.slice(0,-1):t},JC=function(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null},ZC=function(t,e){return!!JC(t,e)},QC=function(t,e){var n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]},tS=function(t,e){var n=Mf.before(t),r=Bg(e),o=r.next(n);return o?o.toRange():null},eS=function(t,e){var n=Mf.after(t),r=Bg(e),o=r.prev(n);return o?o.toRange():null},nS=function(t,e,n,r){var o=QC(t,r),i=t.parentNode;return i.insertBefore(o[0],t),gn.each(e,(function(e){i.insertBefore(e,t)})),i.insertBefore(o[1],t),i.removeChild(t),eS(e[e.length-1],n)},rS=function(t,e,n){var r=t.parentNode;return gn.each(e,(function(e){r.insertBefore(e,t)})),tS(t,n)},oS=function(t,e,n,r){return r.insertAfter(e.reverse(),t),eS(e[0],n)},iS=function(t,e,n,r){var o=$C(e,t,r),i=JC(e,n.startContainer),a=YC(qC(o.firstChild)),u=1,c=2,s=e.getRoot(),l=function(t){var r=Mf.fromRangeStart(n),o=Bg(e.getRoot()),a=t===u?o.prev(r):o.next(r);return!a||JC(e,a.getNode())!==i};return l(u)?rS(i,a,s):l(c)?oS(i,a,s,e):nS(i,a,s,n)},aS=function(t,e,n){var r=wn.fromDom(t.getRoot());return n=ox(r,Mf.fromRangeStart(e))?n.replace(/^ /,"&nbsp;"):n.replace(/^&nbsp;/," "),n=ax(r,Mf.fromRangeEnd(e))?n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n.replace(/&nbsp;(<br( \/)?>)?$/," "),n},uS=uo,cS=function(t,e,n){if(null!==n){var r=t.getParent(e.endContainer,uS);return n===r&&xp(wn.fromDom(n),e)}return!1},sS=function(t,e,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(t.dom.createFragment(e),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?t.dom.setHTML(n,e):t.selection.setContent(e)}},lS=function(t,e){W.from(t.getParent(e,"td,th")).map(wn.fromDom).each(Aw)},fS=function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=tw(r);gn.each(r.select("*[data-mce-fragment]"),(function(t){var e=k(n[t.nodeName.toLowerCase()]);if(e&&cw(r,t))for(var a=t.parentNode;k(a)&&a!==o;a=a.parentNode){var u=lw(r,t,a);if(u)break;if(i.compare(a,t)){r.remove(t,!0);break}}}))}},dS=function(t){var e=t;while(e=e.walk())1===e.type&&e.attr("data-mce-fragment","1")},mS=function(t){gn.each(t.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")}))},gS=function(t){return!!t.getAttribute("data-mce-fragment")},hS=function(t,e){return e&&!t.schema.getShortEndedElements()[e.nodeName]},pS=function(t,e){var n,r=t.dom,o=t.selection;if(e){o.scrollIntoView(e);var i=Ip(t.getBody(),e);if("false"===r.getContentEditable(i))return r.remove(e),void o.select(i);var a=r.createRng(),u=e.previousSibling;if(Qr(u)){if(a.setStart(u,u.nodeValue.length),!tn.ie){var c=e.nextSibling;Qr(c)&&(u.appendData(c.data),c.parentNode.removeChild(c))}}else a.setStartBefore(e),a.setEndBefore(e);var s=function(e){var n=Mf.fromRangeStart(e),r=Bg(t.getBody());if(n=r.next(n),n)return n.toRange()},l=r.getParent(e,r.isBlock);r.remove(e),l&&r.isEmpty(l)&&(t.$(l).empty(),a.setStart(l,0),a.setEnd(l,0),uS(l)||gS(l)||!(n=s(a))?r.add(l,r.create("br",{"data-mce-bogus":"1"})):(a=n,r.remove(l))),o.setRng(a)}},vS=function(t){var e=t.dom,n=LC(t.selection.getRng());t.selection.setRng(n);var r=e.getParent(n.startContainer,uS);cS(e,n,r)?pC(t,n,wn.fromDom(r)):t.getDoc().execCommand("Delete",!1,null)},bS=function(t,e,n){var r,o,i,a=t.selection,u=t.dom;/^ | $/.test(e)&&(e=aS(u,a.getRng(),e));var c=t.parser,s=n.merge,l=rw({validate:rm(t)},t.schema),f='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',d=t.fire("BeforeSetContent",{content:e,format:"html",selection:!0,paste:n.paste});if(d.isDefaultPrevented())t.fire("SetContent",{content:d.content,format:"html",selection:!0,paste:n.paste});else{e=d.content,-1===e.indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,f),o=a.getRng();var m=o.startContainer||(o.parentElement?o.parentElement():null),g=t.getBody();m===g&&a.isCollapsed()&&u.isBlock(g.firstChild)&&hS(t,g.firstChild)&&u.isEmpty(g.firstChild)&&(o=u.createRng(),o.setStart(g.firstChild,0),o.setEnd(g.firstChild,0),a.setRng(o)),a.isCollapsed()||vS(t),r=a.getNode();var h={context:r.nodeName.toLowerCase(),data:n.data,insert:!0},p=c.parse(e,h);if(!0===n.paste&&UC(t.schema,p)&&ZC(u,r))return o=iS(l,u,a.getRng(),p),a.setRng(o),void t.fire("SetContent",d);if(dS(p),i=p.lastChild,"mce_marker"===i.attr("id")){var v=i;for(i=i.prev;i;i=i.walk(!0))if(3===i.type||!u.isBlock(i.name)){t.schema.isValidChild(i.parent.name,"span")&&i.parent.insert(v,i,"br"===i.name);break}}if(t._selectionOverrides.showBlockCaretContainer(r),h.invalid){t.selection.setContent(f),r=a.getNode();var b=t.getBody();9===r.nodeType?r=i=b:i=r;while(i!==b)r=i,i=i.parentNode;e=r===b?b.innerHTML:u.getOuterHTML(r),e=l.serialize(c.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return l.serialize(p)})))),r===b?u.setHTML(b,e):u.setOuterHTML(r,e)}else e=l.serialize(p),sS(t,e,r);fS(t,s),pS(t,u.get("mce_marker")),mS(t.getBody()),lS(u,a.getStart()),t.fire("SetContent",d),t.addVisual()}},yS=function(t,e){e(t),t.firstChild&&yS(t.firstChild,e),t.next&&yS(t.next,e)},wS=function(t,e,n){var r={},o={},i=[];for(var a in n.firstChild&&yS(n.firstChild,(function(n){Q(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),Q(e,(function(t){"string"===typeof n.attr(t.name)&&(o[t.name]?o[t.name].nodes.push(n):o[t.name]={filter:t,nodes:[n]})}))})),r)Nt(r,a)&&i.push(r[a]);for(var u in o)Nt(o,u)&&i.push(o[u]);return i},xS=function(t,e,n){var r=wS(t,e,n);Q(r,(function(t){Q(t.filter.callbacks,(function(e){e(t.nodes,t.filter.name,{})}))}))},CS="html",SS=function(t){return t instanceof _y},kS=function(t){ly(t)&&Xg(t.getBody()).each((function(e){var n=e.getNode(),r=Yr(n)?Xg(n).getOr(e):e;t.selection.setRng(r.toRange())}))},TS=function(t,e,n){t.dom.setHTML(t.getBody(),e),!0!==n&&kS(t)},OS=function(t,e,n,r){if(0===n.length||/^\s+$/.test(n)){var o='<br data-mce-bogus="1">';"TABLE"===e.nodeName?n="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+o+"</li>");var i=Sd(t);i&&t.schema.isValidChild(e.nodeName.toLowerCase(),i.toLowerCase())?(n=o,n=t.dom.createHTML(i,kd(t),n)):n||(n='<br data-mce-bogus="1">'),TS(t,n,r.no_selection),t.fire("SetContent",r)}else"raw"!==r.format&&(n=rw({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=aa(wn.fromDom(e))?n:gn.trim(n),TS(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r);return r.content},_S=function(t,e,n,r){xS(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=rw({validate:t.validate},t.schema).serialize(n);return r.content=aa(wn.fromDom(e))?o:gn.trim(o),TS(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r),n},ES=function(t,e){return Wt(Wt({format:CS},t),{set:!0,content:SS(e)?"":e})},AS=function(t,e,n){var r=ES(n,e),o=n.no_events?r:t.fire("BeforeSetContent",r);return SS(e)||(e=o.content),W.from(t.getBody()).fold(D(e),(function(n){return SS(e)?_S(t,n,e,o):OS(t,n,e,o)}))},DS=function(t,e){return ki(t,e).isSome()},MS=function(t){return T(t)?t:L},NS=function(t,e,n){var r=t.dom,o=MS(n);while(r.parentNode){r=r.parentNode;var i=wn.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return W.none()},RS=function(t,e,n){var r=e(t),o=MS(n);return r.orThunk((function(){return o(t)?W.none():NS(t,e,o)}))},zS=zh,BS=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o];if(jh(i)&&!1===i.inherit&&t.dom.is(e,i.selector))return!0}return!1},PS=function(t,e,n,r,o){var i=t.dom.getRoot();return e!==i&&(e=t.dom.getParent(e,(function(e){return!!BS(t,e,n)||(e.parentNode===i||!!HS(t,e,n,r,!0))})),!!HS(t,e,n,r,o))},IS=function(t,e,n){return!!zS(e,n.inline)||(!!zS(e,n.block)||(n.selector?1===e.nodeType&&t.is(e,n.selector):void 0))},LS=function(t,e,n,r,o,i){var a=n[r];if(T(n.onmatch))return n.onmatch(e,n,r);if(a)if(C(a.length)){for(var u in a)if(Nt(a,u)){var c="attributes"===r?t.getAttrib(e,u):Ph(t,e,u),s=Rh(a[u],i),l=S(c)||he(c);if(l&&S(s))continue;if(o&&l&&!n.exact)return!1;if((!o||n.exact)&&!zS(c,Bh(t,s,u)))return!1}}else for(var f=0;f<a.length;f++)if("attributes"===r?t.getAttrib(e,a[f]):Ph(t,e,a[f]))return!0;return!0},HS=function(t,e,n,r,o){var i=t.formatter.get(n),a=t.dom;if(i&&e)for(var u=0;u<i.length;u++){var c=i[u];if(IS(t.dom,e,c)&&LS(a,e,c,"attributes",o,r)&&LS(a,e,c,"styles",o,r)){var s=c.classes;if(s)for(var l=0;l<s.length;l++)if(!t.dom.hasClass(e,Rh(s[l],r)))return;return c}}},FS=function(t,e,n,r,o){if(r)return PS(t,r,e,n,o);if(r=t.selection.getNode(),PS(t,r,e,n,o))return!0;var i=t.selection.getStart();return!(i===r||!PS(t,i,e,n,o))},VS=function(t,e,n){var r=[],o={},i=t.selection.getStart();return t.dom.getParent(i,(function(i){for(var a=0;a<e.length;a++){var u=e[a];!o[u]&&HS(t,i,u,n)&&(o[u]=!0,r.push(u))}}),t.dom.getRoot()),r},jS=function(t,e){var n=function(e){return Rn(e,wn.fromDom(t.getBody()))},r=function(e,n){return HS(t,e.dom,n)?W.some(n):W.none()};return W.from(t.selection.getStart(!0)).bind((function(t){return RS(wn.fromDom(t),(function(t){return yt(e,(function(e){return r(t,e)}))}),n)})).getOrNull()},US=function(t,e){var n=t.formatter.get(e),r=t.dom;if(n)for(var o=t.selection.getStart(),i=Lh(r,o),a=n.length-1;a>=0;a--){var u=n[a];if(!jh(u)||k(u.defaultBlock))return!0;for(var c=i.length-1;c>=0;c--)if(r.is(i[c],u.selector))return!0}return!1},WS=function(t,e,n){return ot(n,(function(n,r){var o=Hh(t,r);return t.formatter.matchNode(e,r,{},o)?n.concat([r]):n}),[])},$S=da,qS="_mce_caret",GS=function(t,e){return t.importNode(e,!0)},KS=function(t){var e=[];while(t){if(3===t.nodeType&&t.nodeValue!==$S||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e},XS=function(t){return KS(t).length>0},YS=function(t){if(t){var e=new Fi(t,t);for(t=e.current();t;t=e.next())if(Qr(t))return t}return null},JS=function(t){var e=wn.fromTag("span");return bo(e,{id:qS,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&xr(e,wn.fromText($S)),e},ZS=function(t){var e=YS(t);return e&&e.nodeValue.charAt(0)===$S&&e.deleteData(0,1),e},QS=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(XS(e))Hx(t,!1,wn.fromDom(e),n);else{var i=o.getRng(),a=r.getParent(e,r.isBlock),u=i.startContainer,c=i.startOffset,s=i.endContainer,l=i.endOffset,f=ZS(e);r.remove(e,!0),u===f&&c>0&&i.setStart(f,c-1),s===f&&l>0&&i.setEnd(f,l-1),a&&r.isEmpty(a)&&Ew(wn.fromDom(a)),o.setRng(i)}},tk=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)QS(t,e,n);else if(e=Qg(t.getBody(),o.getStart()),!e)while(e=r.get(qS))QS(t,e,!1)},ek=function(t,e,n){var r=t.dom,o=r.getParent(n,R(Ah,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(_w(wn.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))},nk=function(t,e){return t.appendChild(e),e},rk=function(t,e){var n=rt(t,(function(t,e){return nk(t,e.cloneNode(!1))}),e);return nk(n,n.ownerDocument.createTextNode($S))},ok=function(t,e,n,r,o,i){var a=t.formatter,u=t.dom,c=nt(wt(a.get()),(function(t){return t!==r&&!ce(t,"removeformat")})),s=WS(t,n,c),l=nt(s,(function(e){return!Fh(t,e,r)}));if(l.length>0){var f=n.cloneNode(!1);return u.add(e,f),a.remove(r,o,f,i),u.remove(f),W.some(f)}return W.none()},ik=function(t,e,n){var r,o,i=t.selection,a=i.getRng(),u=a.startOffset,c=a.startContainer,s=c.nodeValue;r=Qg(t.getBody(),i.getStart()),r&&(o=YS(r));var l=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(s&&u>0&&u<s.length&&l.test(s.charAt(u))&&l.test(s.charAt(u-1))){var f=i.getBookmark();a.collapse(!0);var d=up(t,a,t.formatter.get(e));d=xv(d),t.formatter.apply(e,n,d),i.moveToBookmark(f)}else r&&o.nodeValue===$S||(r=GS(t.getDoc(),JS(!0).dom),o=r.firstChild,a.insertNode(r),u=1),t.formatter.apply(e,n,r),i.setCursorLocation(o,u)},ak=function(t,e,n,r){var o,i,a,u=t.dom,c=t.selection,s=[],l=c.getRng(),f=l.startContainer,d=l.startOffset;i=f,3===f.nodeType&&(d!==f.nodeValue.length&&(o=!0),i=i.parentNode);while(i){if(HS(t,i,e,n,r)){a=i;break}i.nextSibling&&(o=!0),s.push(i),i=i.parentNode}if(a)if(o){var m=c.getBookmark();l.collapse(!0);var g=up(t,l,t.formatter.get(e),!0);g=xv(g),t.formatter.remove(e,n,g,r),c.moveToBookmark(m)}else{var h=Qg(t.getBody(),a),p=JS(!1).dom;ek(t,p,null!==h?h:a);var v=ok(t,p,a,e,n,r),b=rk(s.concat(v.toArray()),p);QS(t,h,!1),c.setCursorLocation(b,1),u.isEmpty(a)&&u.remove(a)}},uk=function(t,e){var n=t.selection,r=t.getBody();tk(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==$S||tk(t,Qg(r,n.getStart())),37!==e&&39!==e||tk(t,Qg(r,n.getStart()))},ck=function(t){t.on("mouseup keydown",(function(e){uk(t,e.keyCode)}))},sk=function(t,e){var n=JS(!1),r=rk(e,n.dom);return br(wn.fromDom(t),n),Or(wn.fromDom(t)),Mf(r,0)},lk=function(t,e){var n=t.schema.getTextInlineElements();return Nt(n,In(e))&&!Zg(e.dom)&&!Kr(e.dom)},fk=function(t){return Zg(t.dom)&&XS(t.dom)},dk={},mk=Ht,gk=It,hk=function(t,e){var n=dk[t];n||(dk[t]=[]),dk[t].push(e)},pk=function(t,e){gk(dk[t],(function(t){t(e)}))};hk("pre",(function(t){var e,n=t.selection.getRng(),r=function(t){return i(t.previousSibling)&&-1!==Ft(e,t.previousSibling)},o=function(t,e){Ms(e).remove(),Ms(t).append("<br><br>").append(e.childNodes)},i=Wr(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),gk(mk(mk(e,i),r),(function(t){o(t.previousSibling,t)})))}));var vk=gn.each,bk=function(t){return Ur(t)&&!wh(t)&&!Zg(t)&&!Kr(t)},yk=function(t,e){for(var n=t;n;n=n[e]){if(Qr(n)&&ge(n.data))return t;if(Ur(n)&&!wh(n))return n}return t},wk=function(t,e,n){var r=tw(t);if(e&&n&&(e=yk(e,"previousSibling"),n=yk(n,"nextSibling"),r.compare(e,n))){for(var o=e.nextSibling;o&&o!==n;){var i=o;o=o.nextSibling,e.appendChild(i)}return t.remove(n),gn.each(gn.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},xk=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=wk(t,Eh(r),r);wk(t,o,Eh(o,!0))}},Ck=function(t,e,n){if(e.clear_child_styles){var r=e.links?"*:not(a)":"*";vk(t.select(r,n),(function(n){bk(n)&&vk(e.styles,(function(e,r){t.setStyle(n,r,"")}))}))}},Sk=function(t,e,n){vk(t.childNodes,(function(t){bk(t)&&(e(t)&&n(t),t.hasChildNodes()&&Sk(t,e,n))}))},kk=function(t,e){"SPAN"===e.nodeName&&0===t.getAttribs(e).length&&t.remove(e,!0)},Tk=function(t,e){return function(n){return!(!n||!Ph(t,n,e))}},Ok=function(t,e,n){return function(r){t.setStyle(r,e,n),""===r.getAttribute("style")&&r.removeAttribute("style"),kk(t,r)}},_k=ti.generate([{keep:[]},{rename:["name"]},{removed:[]}]),Ek=/^(src|href|style)$/,Ak=gn.each,Dk=zh,Mk=function(t){return/^(TR|TH|TD)$/.test(t.nodeName)},Nk=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},Rk=function(t,e,n){var r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"];if(Ur(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Qr(r)&&n&&o>=r.nodeValue.length&&(r=new Fi(r,t.getBody()).next()||r),Qr(r)&&!n&&0===o&&(r=new Fi(r,t.getBody()).prev()||r),r},zk=function(t,e){var n=e?"firstChild":"lastChild";if(Mk(t)&&t[n]){var r=t[n];return"TR"===t.nodeName&&r[n]||r}return t},Bk=function(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o},Pk=function(t,e,n,r,o){var i=wn.fromDom(e),a=wn.fromDom(t.create(r,o)),u=n?nr(i):er(i);return kr(a,u),n?(br(i,a),wr(a,i)):(yr(i,a),xr(a,i)),a.dom},Ik=function(t,e,n){return!(!Uh(n)||!Dk(e,n.inline))||(!(!Vh(n)||!Dk(e,n.block))||(jh(n)?Ur(e)&&t.is(e,n.selector):void 0))},Lk=function(t,e){return e.links&&"A"===t.nodeName},Hk=function(t,e,n,r){var o=Eh(e,n,r);return S(o)||"BR"===o.nodeName||t.isBlock(o)},Fk=function(t,e,n){var r,o=e.parentNode,i=t.dom,a=Sd(t);Vh(n)&&(a?o===i.getRoot()&&(n.list_block&&Dk(e,n.list_block)||Q(bt(e.childNodes),(function(e){Dh(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=Bk(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=null}))):i.isBlock(e)&&!i.isBlock(o)&&(Hk(i,e,!1)||Hk(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),Hk(i,e,!0)||Hk(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),Wh(n)&&!Dk(n.inline,e)||i.remove(e,!0)},Vk=function(t,e,n,r,o){var i,a=t.dom;if(!Ik(a,r,e)&&!Lk(r,e))return _k.keep();var u=r;if(Uh(e)&&"all"===e.remove&&y(e.preserve_attributes)){var c=nt(a.getAttribs(u),(function(t){return Y(e.preserve_attributes,t.name.toLowerCase())}));if(a.removeAllAttribs(u),Q(c,(function(t){return a.setAttrib(u,t.name,t.value)})),c.length>0)return _k.rename("span")}if("all"!==e.remove){Ak(e.styles,(function(t,r){t=Bh(a,Rh(t,n),r+""),O(r)&&(r=t,o=null),(e.remove_similar||!o||Dk(Ph(a,o,r),t))&&a.setStyle(u,r,""),i=!0})),i&&""===a.getAttrib(u,"style")&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),Ak(e.attributes,(function(t,r){var i;if(t=Rh(t,n),O(r)&&(r=t,o=null),e.remove_similar||!o||Dk(a.getAttrib(o,r),t)){if("class"===r&&(t=a.getAttrib(u,r),t&&(i="",Q(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i)))return void a.setAttrib(u,r,i);if(Ek.test(r)&&u.removeAttribute("data-mce-"+r),"style"===r&&Wr(["li"])(u)&&"none"===a.getStyle(u,"list-style-type"))return u.removeAttribute(r),void a.setStyle(u,"list-style-type","none");"class"===r&&u.removeAttribute("className"),u.removeAttribute(r)}})),Ak(e.classes,(function(t){t=Rh(t,n),o&&!a.hasClass(o,t)||a.removeClass(u,t)}));for(var s=a.getAttribs(u),l=0;l<s.length;l++){var f=s[l].nodeName;if(0!==f.indexOf("_")&&0!==f.indexOf("data-"))return _k.keep()}}return"none"!==e.remove?(Fk(t,u,e),_k.removed()):_k.keep()},jk=function(t,e,n,r,o){return Vk(t,e,n,r,o).fold(L,(function(e){return t.dom.rename(r,e),!0}),H)},Uk=function(t,e,n,r,o){var i;return Q(Lh(t.dom,e.parentNode).reverse(),(function(e){if(!i&&"_start"!==e.id&&"_end"!==e.id){var a=HS(t,e,n,r,o);a&&!1!==a.split&&(i=e)}})),i},Wk=function(t,e,n,r){return Vk(t,e,n,r,r).fold(D(r),(function(e){var n=t.dom.createFragment();return n.appendChild(r),t.dom.rename(r,e)}),D(null))},$k=function(t,e,n,r,o,i,a,u){var c,s,l,f=t.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){c=f.clone(m,!1);for(var g=0;g<e.length;g++)if(c=Wk(t,e[g],u,c),null===c)break;c&&(s&&c.appendChild(s),l||(l=c),s=c)}!i||a.mixed&&f.isBlock(n)||(r=f.split(n,r)),s&&(o.parentNode.insertBefore(s,o),l.appendChild(o),Uh(a)&&xk(f,a,u,s))}return r},qk=function(t,e,n,r,o){var i=t.formatter.get(e),a=i[0],u=!0,c=t.dom,s=t.selection,l=function(r){var u=Uk(t,r,e,n,o);return $k(t,i,u,r,r,!0,a,n)},f=function(t){return wh(t)&&Ur(t)&&("_start"===t.id||"_end"===t.id)},d=function(e){return J(i,(function(r){return jk(t,r,n,e,e)}))},m=function(e){var n=!0,r=!1;Ur(e)&&c.getContentEditable(e)&&(n=u,u="true"===c.getContentEditable(e),r=!0);var o=bt(e.childNodes);if(u&&!r){var i=d(e),s=e.parentNode;!i&&k(s)&&$h(a)&&d(s)}if(a.deep&&o.length){for(var l=0;l<o.length;l++)m(o[l]);r&&(u=n)}var f=["underline","line-through","overline"];Q(f,(function(n){Ur(e)&&t.dom.getStyle(e,"text-decoration")===n&&e.parentNode&&Ih(c,e.parentNode)===n&&jk(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,e)}))},g=function(t){var e=c.get(t?"_start":"_end"),n=e[t?"firstChild":"lastChild"];return f(n)&&(n=n[t?"firstChild":"lastChild"]),Qr(n)&&0===n.data.length&&(n=t?e.previousSibling||e.nextSibling:e.nextSibling||e.previousSibling),c.remove(e,!0),n},h=function(e){var n,r,o=up(t,e,i,e.collapsed);if(a.split){if(o=xv(o),n=Rk(t,o,!0),r=Rk(t,o),n!==r){if(n=zk(n,!0),r=zk(r,!1),Nk(c,n,r)){var u=W.from(n.firstChild).getOr(n);return l(Pk(c,u,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void g(!0)}if(Nk(c,r,n)){u=W.from(r.lastChild).getOr(r);return l(Pk(c,u,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void g(!1)}n=Bk(c,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=Bk(c,r,"span",{id:"_end","data-mce-type":"bookmark"});var s=c.createRng();s.setStartAfter(n),s.setEndBefore(r),cp(c,s,(function(t){Q(t,(function(t){wh(t)||wh(t.parentNode)||l(t)}))})),l(n),l(r),n=g(!0),r=g()}else n=r=l(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=c.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=c.nodeIndex(r)+1}cp(c,o,(function(t){Q(t,m)}))};if(r){if(Th(r)){var p=c.createRng();p.setStartBefore(r),p.setEndAfter(r),h(p)}else h(r);Zp(t,e,r,n)}else if("false"!==c.getContentEditable(s.getNode()))s.isCollapsed()&&Uh(a)&&!hp(t).length?ak(t,e,n,o):(Tp(s,!0,(function(){kp(t,h)})),Uh(a)&&FS(t,e,n,s.getStart())&&_h(c,s,s.getRng()),t.nodeChanged()),Zp(t,e,r,n);else{r=s.getNode();for(var v=0;v<i.length;v++)if(i[v].ceFalseOverride&&jk(t,i[v],n,r,r))break;Zp(t,e,r,n)}},Gk=gn.each,Kk=function(t,e,n,r){var o=function(e){if(1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType){var n=Ih(t,e.parentNode);t.getStyle(e,"color")&&n?t.setStyle(e,"text-decoration",n):t.getStyle(e,"text-decoration")===n&&t.setStyle(e,"text-decoration",null)}};e.styles&&(e.styles.color||e.styles.textDecoration)&&(gn.walk(r,o,"childNodes"),o(r))},Xk=function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Sk(r,Tk(t,"fontSize"),Ok(t,"backgroundColor",Rh(e.styles.backgroundColor,n)))},Yk=function(t,e,n,r){!Uh(e)||"sub"!==e.inline&&"sup"!==e.inline||(Sk(r,Tk(t,"fontSize"),Ok(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))},Jk=function(t,e,n,r){Gk(e,(function(e){Uh(e)&&Gk(t.dom.select(e.inline,r),(function(r){bk(r)&&jk(t,e,n,r,e.exact?r:null)})),Ck(t.dom,e,r)}))},Zk=function(t,e,n,r,o){HS(t,o.parentNode,n,r)&&jk(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,(function(i){if(HS(t,i,n,r))return jk(t,e,r,o),!0}))},Qk=gn.each,tT=function(t){return Ur(t)&&!wh(t)&&!Zg(t)&&!Kr(t)},eT=function(t,e,n,r){if(um(t)&&Uh(e)){var o=Wt(Wt({},t.schema.getTextBlockElements()),{td:{},th:{},li:{},dt:{},dd:{},figcaption:{},caption:{},details:{},summary:{}}),i=DS(wn.fromDom(n),(function(t){return Zg(t.dom)}));return Rt(o,r)&&nu(wn.fromDom(n.parentNode),!1)&&!i}return!1},nT=function(t,e,n,r){var o=t.formatter.get(e),i=o[0],a=!r&&t.selection.isCollapsed(),u=t.dom,c=t.selection,s=function(t,e){if(void 0===e&&(e=i),T(e.onformat)&&e.onformat(t,e,n,r),Qk(e.styles,(function(e,r){u.setStyle(t,r,Rh(e,n))})),e.styles){var o=u.getAttrib(t,"style");o&&u.setAttrib(t,"data-mce-style",o)}Qk(e.attributes,(function(e,r){u.setAttrib(t,r,Rh(e,n))})),Qk(e.classes,(function(e){e=Rh(e,n),u.hasClass(t,e)||u.addClass(t,e)}))},l=function(t,e){var n=!1;return Qk(t,(function(t){return!!jh(t)&&(k(t.collapsed)&&t.collapsed!==a?void 0:u.is(e,t.selector)&&!Zg(e)?(s(e,t),n=!0,!1):void 0)})),n},f=function(t){if(v(t)){var e=u.create(t);return s(e),e}return null},d=function(r,a,u){var c=[],d=!0,m=i.inline||i.block,g=f(m);cp(r,a,(function(a){var f,h=function(a){var p=!1,v=d,b=a.nodeName.toLowerCase(),y=a.parentNode,w=y.nodeName.toLowerCase();if(Ur(a)&&r.getContentEditable(a)&&(v=d,d="true"===r.getContentEditable(a),p=!0),ro(a)&&!eT(t,i,a,w))return f=null,void(Vh(i)&&r.remove(a));if(Vh(i)&&i.wrapper&&HS(t,a,e,n))f=null;else{if(d&&!p&&Vh(i)&&!i.wrapper&&Ah(t,b)&&Dh(t,w,m)){var x=r.rename(a,m);return s(x),c.push(x),void(f=null)}if(jh(i)){var C=l(o,a);if(!C&&k(y)&&$h(i)&&(C=l(o,y)),!Uh(i)||C)return void(f=null)}!d||p||!Dh(t,m,b)||!Dh(t,w,m)||!u&&Qr(a)&&ma(a.data)||Zg(a)||Uh(i)&&r.isBlock(a)?(f=null,Q(bt(a.childNodes),h),p&&(d=v),f=null):(f||(f=r.clone(g,!1),a.parentNode.insertBefore(f,a),c.push(f)),f.appendChild(a))}};Q(a,h)})),!0===i.links&&Q(c,(function(t){var e=function(t){"A"===t.nodeName&&s(t,i),Q(bt(t.childNodes),e)};e(t)})),Q(c,(function(a){var u=function(t){var e=0;return Q(t.childNodes,(function(t){Nh(t)||wh(t)||e++})),e},l=function(t){var e=at(t.childNodes,tT).filter((function(t){return IS(r,t,i)}));return e.map((function(e){var n=r.clone(e,!1);return s(n),r.replace(n,t,!0),r.remove(e,!0),n})).getOr(t)},f=u(a);!(c.length>1)&&r.isBlock(a)||0!==f?(Uh(i)||Vh(i)&&i.wrapper)&&(i.exact||1!==f||(a=l(a)),Jk(t,o,n,a),Zk(t,i,e,n,a),Xk(r,i,n,a),Kk(r,i,n,a),Yk(r,i,n,a),xk(r,i,n,a)):r.remove(a,!0)}))};if("false"!==u.getContentEditable(c.getNode())){if(i){if(r)if(Th(r)){if(!l(o,r)){var m=u.createRng();m.setStartBefore(r),m.setEndAfter(r),d(u,up(t,m,o),!0)}}else d(u,r,!0);else if(a&&Uh(i)&&!hp(t).length)ik(t,e,n);else{var g=c.getNode(),h=o[0];t.settings.forced_root_block||!h.defaultBlock||u.getParent(g,u.isBlock)||nT(t,h.defaultBlock),c.setRng(LC(c.getRng())),Tp(c,!0,(function(){kp(t,(function(e,n){var r=n?e:up(t,e,o);d(u,r,!1)}))})),_h(u,c,c.getRng()),t.nodeChanged()}pk(e,t)}Jp(t,e,r,n)}else{r=c.getNode();for(var p=0,b=o.length;p<b;p++){var y=o[p];if(y.ceFalseOverride&&jh(y)&&u.is(r,y.selector)){s(r,y);break}}Jp(t,e,r,n)}},rT=function(t){return Nt(t,"vars")},oT=function(t,e){t.set({}),e.on("NodeChange",(function(n){cT(e,n.element,t.get())})),e.on("FormatApply FormatRemove",(function(n){var r=W.from(n.node).map((function(t){return Th(t)?t:t.startContainer})).bind((function(t){return Ur(t)?W.some(t):W.from(t.parentElement)})).getOrThunk((function(){return iT(e)}));cT(e,r,t.get())}))},iT=function(t){return t.selection.getStart()},aT=function(t,e,n,r,o){var i=function(e){var i=t.formatter.matchNode(e,n,null!==o&&void 0!==o?o:{},r);return!C(i)},a=function(e){return!!BS(t,e,n)||!r&&k(t.formatter.matchNode(e,n,o,!0))};return it(e,i,a)},uT=function(t,e){var n=null!==e&&void 0!==e?e:iT(t);return nt(Lh(t.dom,n),(function(t){return Ur(t)&&!Kr(t)}))},cT=function(t,e,n){var r=uT(t,e);Ct(n,(function(n,o){var i=function(n){var i=aT(t,r,o,n.similar,rT(n)?n.vars:void 0),a=i.isSome();if(n.state.get()!==a){n.state.set(a);var u=i.getOr(e);rT(n)?n.callback(a,{node:u,format:o,parents:r}):Q(n.callbacks,(function(t){return t(a,{node:u,format:o,parents:r})}))}};Q([n.withSimilar,n.withoutSimilar],i),Q(n.withVars,i)}))},sT=function(t,e,n,r,o,i){var a=e.get();Q(n.split(","),(function(e){var n=Mt(a,e).getOrThunk((function(){var t={withSimilar:{state:Ks(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Ks(!1),similar:!1,callbacks:[]},withVars:[]};return a[e]=t,t})),u=function(){var n=uT(t);return aT(t,n,e,o,i).isSome()};if(C(i)){var c=o?n.withSimilar:n.withoutSimilar;c.callbacks.push(r),1===c.callbacks.length&&c.state.set(u())}else n.withVars.push({state:Ks(u()),similar:o,vars:i,callback:r})})),e.set(a)},lT=function(t,e,n){var r=t.get();Q(e.split(","),(function(t){return Mt(r,t).each((function(e){r[t]={withSimilar:Wt(Wt({},e.withSimilar),{callbacks:nt(e.withSimilar.callbacks,(function(t){return t!==n}))}),withoutSimilar:Wt(Wt({},e.withoutSimilar),{callbacks:nt(e.withoutSimilar.callbacks,(function(t){return t!==n}))}),withVars:nt(e.withVars,(function(t){return t.callback!==n}))}}))})),t.set(r)},fT=function(t,e,n,r,o,i){return null===e.get()&&oT(e,t),sT(t,e,n,r,o,i),{unbind:function(){return lT(e,n,r)}}},dT=function(t,e,n,r){var o=t.formatter.get(e);!FS(t,e,n,r)||"toggle"in o[0]&&!o[0].toggle?nT(t,e,n,r):qk(t,e,n,r)},mT=function(t,e){var n=e||document,r=n.createDocumentFragment();return Q(t,(function(t){r.appendChild(t.dom)})),wn.fromDom(r)},gT=function(t,e,n){return{element:t,width:e,rows:n}},hT=function(t,e){return{element:t,cells:e}},pT=function(t,e){return{x:t,y:e}},vT=function(t,e){var n=parseInt(yo(t,e),10);return isNaN(n)?1:n},bT=function(t,e,n,r,o){for(var i=vT(o,"rowspan"),a=vT(o,"colspan"),u=t.rows,c=n;c<n+i;c++){u[c]||(u[c]=hT($l(r),[]));for(var s=e;s<e+a;s++){var l=u[c].cells;l[s]=c===n&&s===e?o:Wl(o)}}},yT=function(t,e,n){var r=t.rows,o=r[n]?r[n].cells:[];return!!o[e]},wT=function(t,e,n){while(yT(t,e,n))e++;return e},xT=function(t){return ot(t,(function(t,e){return e.cells.length>t?e.cells.length:t}),0)},CT=function(t,e){for(var n=t.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(Rn(o[i],e))return W.some(pT(i,r));return W.none()},ST=function(t,e,n,r,o){for(var i=[],a=t.rows,u=n;u<=o;u++){var c=a[u].cells,s=e<r?c.slice(e,r+1):c.slice(r,e+1);i.push(hT(a[u].element,s))}return i},kT=function(t,e,n){var r=e.x,o=e.y,i=n.x,a=n.y,u=o<a?ST(t,r,o,i,a):ST(t,r,a,i,o);return gT(t.element,xT(u),u)},TT=function(t,e){var n=Wl(t.element),r=wn.fromTag("tbody");return kr(r,e),xr(n,r),n},OT=function(t){return Z(t.rows,(function(t){var e=Z(t.cells,(function(t){var e=$l(t);return Co(e,"colspan"),Co(e,"rowspan"),e})),n=Wl(t.element);return kr(n,e),n}))},_T=function(t){var e=gT(Wl(t),0,[]);return Q(Tl(t,"tr"),(function(t,n){Q(Tl(t,"td,th"),(function(r,o){bT(e,wT(e,o,n),n,t,r)}))})),gT(e.element,xT(e.rows),e.rows)},ET=function(t){return TT(t,OT(t))},AT=function(t,e,n){return CT(t,e).bind((function(e){return CT(t,n).map((function(n){return kT(t,e,n)}))}))},DT=function(t){return at(t,(function(t){return"ul"===In(t)||"ol"===In(t)}))},MT=function(t,e){return at(t,(function(t){return"li"===In(t)&&xp(t,e)})).fold(D([]),(function(e){return DT(t).map((function(t){var e=wn.fromTag(In(t)),n=Et(Ao(t),(function(t,e){return se(e,"list-style")}));return To(e,n),[wn.fromTag("li"),e]})).getOr([])}))},NT=function(t,e){var n=ot(e,(function(t,e){return xr(e,t),e}),t);return e.length>0?mT([n]):n},RT=function(t){return ra(t)?Yn(t).filter(na).fold(D([]),(function(e){return[t,e]})):na(t)?[t]:[]},zT=function(t,e){var n=wn.fromDom(e.commonAncestorContainer),r=Rw(n,t),o=nt(r,(function(t){return Qi(t)||Yi(t)})),i=MT(r,e),a=o.concat(i.length?i:RT(n));return Z(a,Wl)},BT=function(){return mT([])},PT=function(t,e){return NT(wn.fromDom(e.cloneContents()),zT(t,e))},IT=function(t,e){return Oi(e,"table",R(Rn,t))},LT=function(t,e){return IT(t,e[0]).bind((function(t){var n=e[0],r=e[e.length-1],o=_T(t);return AT(o,n,r).map((function(t){return mT([ET(t)])}))})).getOrThunk(BT)},HT=function(t,e){return e.length>0&&e[0].collapsed?BT():PT(t,e[0])},FT=function(t,e){var n=gp(e,t);return n.length>0?LT(t,n):HT(t,e)},VT=function(t){return t.replace(/^[ \f\n\r\t\v]+/,"")},jT=function(t,e){return e>=0&&e<t.length&&Sh(t.charAt(e))},UT=function(t,e){var n=ga(t.innerText);return e?VT(n):n},WT=function(t){return t.map((function(t){return t.nodeName})).getOr("div").toLowerCase()},$T=function(t){return W.from(t.selection.getRng()).map((function(e){var n=W.from(t.dom.getParent(e.commonAncestorContainer,t.dom.isBlock)),r=t.getBody(),o=WT(n),i=tn.browser.isIE()&&"pre"!==o,a=t.dom.add(r,o,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),u=UT(a,i),c=ga(a.textContent);if(t.dom.remove(a),jT(c,0)||jT(c,c.length-1)){var s=n.getOr(r),l=UT(s,i),f=l.indexOf(u);if(-1===f)return u;var d=jT(l,f-1),m=jT(l,f+u.length);return(d?" ":"")+u+(m?" ":"")}return u})).getOr("")},qT=function(t,e){var n=t.selection.getRng(),r=t.dom.create("body"),o=t.selection.getSel(),i=Cy(t,sp(o)),a=e.contextual?FT(wn.fromDom(t.getBody()),i).dom:n.cloneContents();return a&&r.appendChild(a),t.selection.serializer.serialize(r,e)},GT=function(t,e){return Wt(Wt({},t),{format:e,get:!0,selection:!0})},KT=function(t,e,n){void 0===n&&(n={});var r=GT(n,e),o=t.fire("BeforeGetContent",r);if(o.isDefaultPrevented())return t.fire("GetContent",o),o.content;if("text"===o.format)return $T(t);o.getInner=!0;var i=qT(t,o);return"tree"===o.format?i:(o.content=t.selection.isCollapsed()?"":i,t.fire("GetContent",o),o.content)},XT=0,YT=1,JT=2,ZT=function(t,e){var n=t.length+e.length+2,r=new Array(n),o=new Array(n),i=function(t,e,n){return{start:t,end:e,diag:n}},a=function(n,r,o,i,u){var s=c(n,r,o,i);if(null===s||s.start===r&&s.diag===r-i||s.end===n&&s.diag===n-o){var l=n,f=o;while(l<r||f<i)l<r&&f<i&&t[l]===e[f]?(u.push([XT,t[l]]),++l,++f):r-n>i-o?(u.push([JT,t[l]]),++l):(u.push([YT,e[f]]),++f)}else{a(n,s.start,o,s.start-s.diag,u);for(var d=s.start;d<s.end;++d)u.push([XT,t[d]]);a(s.end,r,s.end-s.diag,i,u)}},u=function(n,r,o,a){var u=n;while(u-r<a&&u<o&&t[u]===e[u-r])++u;return i(n,u,r)},c=function(n,i,a,c){var s=i-n,l=c-a;if(0===s||0===l)return null;var f,d,m,g,h,p=s-l,v=l+s,b=(v%2===0?v:v+1)/2;for(r[1+b]=n,o[1+b]=i+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){m=d+b,d===-f||d!==f&&r[m-1]<r[m+1]?r[m]=r[m+1]:r[m]=r[m-1]+1,g=r[m],h=g-n+a-d;while(g<i&&h<c&&t[g]===e[h])r[m]=++g,++h;if(p%2!==0&&p-f<=d&&d<=p+f&&o[m-p]<=r[m])return u(o[m-p],d+n-a,i,c)}for(d=p-f;d<=p+f;d+=2){m=d+b-p,d===p-f||d!==p+f&&o[m+1]<=o[m-1]?o[m]=o[m+1]-1:o[m]=o[m-1],g=o[m]-1,h=g-n+a-d;while(g>=n&&h>=a&&t[g]===e[h])o[m]=g--,h--;if(p%2===0&&-f<=d&&d<=f&&o[m]<=r[m+p])return u(o[m],d+n-a,i,c)}}},s=[];return a(0,t.length,0,e.length,s),s},QT=function(t){return Ur(t)?t.outerHTML:Qr(t)?Eu.encodeRaw(t.data,!1):to(t)?"\x3c!--"+t.data+"--\x3e":""},tO=function(t){var e,n=document.createElement("div"),r=document.createDocumentFragment();t&&(n.innerHTML=t);while(e=n.firstChild)r.appendChild(e);return r},eO=function(t,e,n){var r=tO(e);if(t.hasChildNodes()&&n<t.childNodes.length){var o=t.childNodes[n];o.parentNode.insertBefore(r,o)}else t.appendChild(r)},nO=function(t,e){if(t.hasChildNodes()&&e<t.childNodes.length){var n=t.childNodes[e];n.parentNode.removeChild(n)}},rO=function(t,e){var n=0;Q(t,(function(t){t[0]===XT?n++:t[0]===YT?(eO(e,t[1],n),n++):t[0]===JT&&nO(e,n)}))},oO=function(t){return nt(Z(bt(t.childNodes),QT),(function(t){return t.length>0}))},iO=function(t,e){var n=Z(bt(e.childNodes),QT);return rO(ZT(n,t),e),e},aO=Gt((function(){return document.implementation.createHTMLDocument("undo")})),uO=function(t){return-1!==t.indexOf("</iframe>")},cO=function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}},sO=function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}},lO=function(t){var e=oO(t.getBody()),n=st(e,(function(e){var n=Gy(t.serializer,e);return n.length>0?[n]:[]})),r=n.join("");return uO(r)?cO(n):sO(r)},fO=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?iO(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!k(r)||!oh(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},dO=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},mO=function(t){var e=wn.fromTag("body",aO());return jl(e,dO(t)),Q(Tl(e,"*[data-mce-bogus]"),_r),Vl(e)},gO=function(t,e){return dO(t)===dO(e)},hO=function(t,e){return mO(t)===mO(e)},pO=function(t,e){return!(!t||!e)&&(!!gO(t,e)||hO(t,e))},vO=function(t){return 0===t.get()},bO=function(t,e,n){vO(n)&&(t.typing=e)},yO=function(t,e){t.typing&&(bO(t,!1,e),t.add())},wO=function(t){t.typing&&(t.typing=!1,t.add())},xO=function(t,e,n){vO(e)&&n.set(dd(t.selection))},CO=function(t,e,n,r,o,i,a){var u=lO(t);if(i=i||{},i=gn.extend(i,u),!1===vO(r)||t.removed)return null;var c=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&pO(c,i))return null;e.data[n.get()]&&o.get().each((function(t){e.data[n.get()].beforeBookmark=t}));var s=vm(t);if(s&&e.data.length>s){for(var l=0;l<e.data.length-1;l++)e.data[l]=e.data[l+1];e.data.length--,n.set(e.data.length)}i.bookmark=dd(t.selection),n.get()<e.data.length-1&&(e.data.length=n.get()+1),e.data.push(i),n.set(e.data.length-1);var f={level:i,lastLevel:c,originalEvent:a};return n.get()>0?(t.setDirty(!0),t.fire("AddUndo",f),t.fire("change",f)):t.fire("AddUndo",f),i},SO=function(t,e,n){e.data=[],n.set(0),e.typing=!1,t.fire("ClearUndos")},kO=function(t,e,n,r,o){if(e.transact(r)){var i=e.data[n.get()].bookmark,a=e.data[n.get()-1];fO(t,a,!0),e.transact(o)&&(e.data[n.get()-1].beforeBookmark=i)}},TO=function(t,e,n){var r;return e.get()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],fO(t,r,!1),t.setDirty(!0),t.fire("Redo",{level:r})),r},OO=function(t,e,n,r){var o;return e.typing&&(e.add(),e.typing=!1,bO(e,!1,n)),r.get()>0&&(r.set(r.get()-1),o=e.data[r.get()],fO(t,o,!0),t.setDirty(!0),t.fire("Undo",{level:o})),o},_O=function(t){t.clear(),t.add()},EO=function(t,e,n){return n.get()>0||e.typing&&e.data[0]&&!pO(lO(t),e.data[0])},AO=function(t,e){return e.get()<t.data.length-1&&!t.typing},DO=function(t,e,n){return yO(t,e),t.beforeChange(),t.ignore(n),t.add()},MO=function(t,e){try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}},NO=function(t,e){var n=t.dom,r=k(e)?e:t.getBody();C(t.hasVisual)&&(t.hasVisual=km(t)),Q(n.select("table,a",r),(function(e){switch(e.nodeName){case"TABLE":var r=Tm(t),o=n.getAttrib(e,"border");o&&"0"!==o||!t.hasVisual?n.removeClass(e,r):n.addClass(e,r);break;case"A":if(!n.getAttrib(e,"href")){var i=n.getAttrib(e,"name")||e.id,a=Om(t);i&&t.hasVisual?n.addClass(e,a):n.removeClass(e,a)}break}})),t.fire("VisualAid",{element:e,hasVisual:t.hasVisual})},RO=function(t){return{undoManager:{beforeChange:function(e,n){return xO(t,e,n)},add:function(e,n,r,o,i,a){return CO(t,e,n,r,o,i,a)},undo:function(e,n,r){return OO(t,e,n,r)},redo:function(e,n){return TO(t,e,n)},clear:function(e,n){return SO(t,e,n)},reset:function(t){return _O(t)},hasUndo:function(e,n){return EO(t,e,n)},hasRedo:function(t,e){return AO(t,e)},transact:function(t,e,n){return DO(t,e,n)},ignore:function(t,e){return MO(t,e)},extra:function(e,n,r,o){return kO(t,e,n,r,o)}},formatter:{match:function(e,n,r,o){return FS(t,e,n,r,o)},matchAll:function(e,n){return VS(t,e,n)},matchNode:function(e,n,r,o){return HS(t,e,n,r,o)},canApply:function(e){return US(t,e)},closest:function(e){return jS(t,e)},apply:function(e,n,r){return nT(t,e,n,r)},remove:function(e,n,r,o){return qk(t,e,n,r,o)},toggle:function(e,n,r){return dT(t,e,n,r)},formatChanged:function(e,n,r,o,i){return fT(t,e,n,r,o,i)}},editor:{getContent:function(e,n){return Zy(t,e,n)},setContent:function(e,n){return AS(t,e,n)},insertContent:function(e,n){return bS(t,e,n)},addVisual:function(e){return NO(t,e)}},selection:{getContent:function(e,n){return KT(t,e,n)}},raw:{getModel:function(){return W.none()}}}},zO=function(t){var e=function(t){return b(t)?t:{}},n=t.undoManager,r=t.formatter,o=t.editor,i=t.selection,a=t.raw;return{undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:function(t,e,r){return n.transact(r)},ignore:function(t,e){return n.ignore(e)},extra:function(t,e,r,o){return n.extra(r,o)}},formatter:{match:function(t,n,o,i){return r.match(t,e(n),i)},matchAll:r.matchAll,matchNode:r.matchNode,canApply:function(t){return r.canApply(t)},closest:function(t){return r.closest(t)},apply:function(t,n,o){return r.apply(t,e(n))},remove:function(t,n,o,i){return r.remove(t,e(n))},toggle:function(t,n,o){return r.toggle(t,e(n))},formatChanged:function(t,e,n,o,i){return r.formatChanged(e,n,o,i)}},editor:{getContent:function(t,e){return o.getContent(t)},setContent:function(t,e){return o.setContent(t,e)},insertContent:function(t,e){return o.insertContent(t)},addVisual:o.addVisual},selection:{getContent:function(t,e){return i.getContent(e)}},raw:{getModel:function(){return W.some(a.getRawModel())}}}},BO=function(){var t=D(null),e=D("");return{undoManager:{beforeChange:_,add:t,undo:t,redo:t,clear:_,reset:_,hasUndo:L,hasRedo:L,transact:t,ignore:_,extra:_},formatter:{match:L,matchAll:D([]),matchNode:D(void 0),canApply:L,closest:e,apply:_,remove:_,toggle:_,formatChanged:D({unbind:_})},editor:{getContent:e,setContent:e,insertContent:_,addVisual:_},selection:{getContent:e},raw:{getModel:D(W.none())}}},PO=function(t){return Nt(t.plugins,"rtc")},IO=function(t){return Mt(t.plugins,"rtc").bind((function(t){return W.from(t.setup)}))},LO=function(t){var e=t;return IO(t).fold((function(){return e.rtcInstance=RO(t),W.none()}),(function(t){return e.rtcInstance=BO(),W.some((function(){return t().then((function(t){return e.rtcInstance=zO(t),t.rtc.isRemote}))}))}))},HO=function(t){return t.rtcInstance?t.rtcInstance:RO(t)},FO=function(t){var e=t.rtcInstance;if(e)return e;throw new Error("Failed to get RTC instance not yet initialized.")},VO=function(t,e,n){FO(t).undoManager.beforeChange(e,n)},jO=function(t,e,n,r,o,i,a){return FO(t).undoManager.add(e,n,r,o,i,a)},UO=function(t,e,n,r){return FO(t).undoManager.undo(e,n,r)},WO=function(t,e,n){return FO(t).undoManager.redo(e,n)},$O=function(t,e,n){FO(t).undoManager.clear(e,n)},qO=function(t,e){FO(t).undoManager.reset(e)},GO=function(t,e,n){return FO(t).undoManager.hasUndo(e,n)},KO=function(t,e,n){return FO(t).undoManager.hasRedo(e,n)},XO=function(t,e,n,r){return FO(t).undoManager.transact(e,n,r)},YO=function(t,e,n){FO(t).undoManager.ignore(e,n)},JO=function(t,e,n,r,o){FO(t).undoManager.extra(e,n,r,o)},ZO=function(t,e,n,r,o){return FO(t).formatter.match(e,n,r,o)},QO=function(t,e,n){return FO(t).formatter.matchAll(e,n)},t_=function(t,e,n,r,o){return FO(t).formatter.matchNode(e,n,r,o)},e_=function(t,e){return FO(t).formatter.canApply(e)},n_=function(t,e){return FO(t).formatter.closest(e)},r_=function(t,e,n,r){FO(t).formatter.apply(e,n,r)},o_=function(t,e,n,r,o){FO(t).formatter.remove(e,n,r,o)},i_=function(t,e,n,r){FO(t).formatter.toggle(e,n,r)},a_=function(t,e,n,r,o,i){return FO(t).formatter.formatChanged(e,n,r,o,i)},u_=function(t,e,n){return HO(t).editor.getContent(e,n)},c_=function(t,e,n){return HO(t).editor.setContent(e,n)},s_=function(t,e,n){return HO(t).editor.insertContent(e,n)},l_=function(t,e,n){return FO(t).selection.getContent(e,n)},f_=function(t,e){return FO(t).editor.addVisual(e)},d_=function(t,e){void 0===e&&(e={});var n=e.format?e.format:"html";return l_(t,n,e)},m_=function(t){return 0===t.dom.length?(Or(t),W.none()):W.some(t)},g_=function(t,e){return t.filter((function(t){return Pp.isBookmarkNode(t.dom)})).bind(e?tr:Qn)},h_=function(t,e,n,r){var o=t.dom,i=e.dom,a=r?o.length:i.length;r?(wx(o,i,!1,!r),n.setStart(i,a)):(wx(i,o,!1,!r),n.setEnd(i,a))},p_=function(t,e){Yn(t).each((function(n){var r=t.dom;e&&ox(n,Mf(r,0))?bx(r,0):!e&&ax(n,Mf(r,r.length))&&yx(r,r.length)}))},v_=function(t,e,n,r){t.bind((function(t){var o=r?yx:bx;return o(t.dom,r?t.dom.length:0),e.filter(jn).map((function(e){return h_(t,e,n,r)}))})).orThunk((function(){var t=g_(e,r).or(e).filter(jn);return t.map((function(t){return p_(t,r)}))}))},b_=function(t,e){var n=W.from(e.firstChild).map(wn.fromDom),r=W.from(e.lastChild).map(wn.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Qn).filter(jn).bind(m_),i=r.bind(tr).filter(jn).bind(m_);v_(o,n,t,!0),v_(i,r,t,!1),t.collapse(!1)},y_=function(t,e){return Wt(Wt({format:"html"},t),{set:!0,selection:!0,content:e})},w_=function(t,e){if("raw"!==e.format){var n=t.selection.getRng(),r=t.dom.getParent(n.commonAncestorContainer,t.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=t.parser.parse(e.content,Wt(Wt({isRootContent:!0,forced_root_block:!1},o),e));return rw({validate:t.validate},t.schema).serialize(i)}return e.content},x_=function(t,e,n){void 0===n&&(n={});var r=y_(n,e),o=r;if(!r.no_events){var i=t.fire("BeforeSetContent",r);if(i.isDefaultPrevented())return void t.fire("SetContent",i);o=i}o.content=w_(t,o);var a=t.selection.getRng();b_(a,a.createContextualFragment(o.content)),t.selection.setRng(a),tb(t,a),o.no_events||t.fire("SetContent",o)},C_=function(t,e,n){if(t&&Nt(t,e)){var r=nt(t[e],(function(t){return t!==n}));0===r.length?delete t[e]:t[e]=r}};function S_(t,e){var n,r,o=function(e,n){return at(n,(function(n){return t.is(n,e)}))},i=function(e){return t.getParents(e,null,t.getRoot())};return{selectorChangedWithUnbind:function(t,a){return n||(n={},r={},e.on("NodeChange",(function(t){var e=t.element,a=i(e),u={};gn.each(n,(function(t,e){o(e,a).each((function(n){r[e]||(Q(t,(function(t){t(!0,{node:n,selector:e,parents:a})})),r[e]=t),u[e]=t}))})),gn.each(r,(function(t,n){u[n]||(delete r[n],gn.each(t,(function(t){t(!1,{node:e,selector:n,parents:a})})))}))}))),n[t]||(n[t]=[]),n[t].push(a),o(t,i(e.selection.getStart())).each((function(){r[t]=n[t]})),{unbind:function(){C_(n,t,a),C_(r,t,a)}}}}}var k_=function(t){return!!t.select},T_=function(t){return!(!t||!t.ownerDocument)&&Pn(wn.fromDom(t.ownerDocument),wn.fromDom(t))},O_=function(t){return!!t&&(!!k_(t)||T_(t.startContainer)&&T_(t.endContainer))},__=function(t,e,n,r){var o,i,a=S_(t,r).selectorChangedWithUnbind,u=function(e,n){var o=t.createRng();k(e)&&k(n)?(o.setStart(e,n),o.setEnd(e,n),y(o),p(!1)):(Cp(t,o,r.getBody(),!0),y(o))},c=function(t){return d_(r,t)},s=function(t,e){return x_(r,t,e)},l=function(t){return py(r.getBody(),b(),t)},f=function(t){return vy(r.getBody(),b(),t)},d=function(t,e){return R.getBookmark(t,e)},m=function(t){return R.moveToBookmark(t)},g=function(e,n){return xy(t,e,n).each(y),e},h=function(){var t=b(),e=v();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},p=function(t){var e=b();e.collapse(!!t),y(e)},v=function(){return e.getSelection?e.getSelection():e.document.selection},b=function(){var n,a,u,c=function(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(r){return-1}},s=e.document;if(void 0!==r.bookmark&&!1===ly(r)){var l=Ib(r);if(l.isSome())return l.map((function(t){return Cy(r,[t])[0]})).getOr(s.createRange())}try{(n=v())&&!jr(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():s.createRange(),a=Cy(r,[a])[0])}catch(f){}return a||(a=s.createRange?s.createRange():s.body.createTextRange()),a.setStart&&9===a.startContainer.nodeType&&a.collapsed&&(u=t.getRoot(),a.setStart(u,0),a.setEnd(u,0)),o&&i&&(0===c(a.START_TO_START,a,o)&&0===c(a.END_TO_END,a,o)?a=i:(o=null,i=null)),a},y=function(t,e){var n;if(O_(t)){var a=k_(t)?t:null;if(a){i=null;try{a.select()}catch(s){}}else{var u=v(),c=r.fire("SetSelectionRange",{range:t,forward:e});if(t=c.range,u){i=t;try{u.removeAllRanges(),u.addRange(t)}catch(s){}!1===e&&u.extend&&(u.collapse(t.endContainer,t.endOffset),u.extend(t.startContainer,t.startOffset)),o=u.rangeCount>0?u.getRangeAt(0):null}t.collapsed||t.startContainer!==t.endContainer||!u.setBaseAndExtent||tn.ie||t.endOffset-t.startOffset<2&&t.startContainer.hasChildNodes()&&(n=t.startContainer.childNodes[t.startOffset],n&&"IMG"===n.tagName&&(u.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset),u.anchorNode===t.startContainer&&u.focusNode===t.endContainer||u.setBaseAndExtent(n,0,n,1))),r.fire("AfterSetSelectionRange",{range:t,forward:e})}}},w=function(e){return s(t.getOuterHTML(e)),e},x=function(){return yy(r.getBody(),b())},C=function(e,n){return wy(t,b(),e,n)},S=function(){var e=v(),n=null===e||void 0===e?void 0:e.anchorNode,r=null===e||void 0===e?void 0:e.focusNode;if(!e||!n||!r||jr(n)||jr(r))return!0;var o=t.createRng();o.setStart(n,e.anchorOffset),o.collapse(!0);var i=t.createRng();return i.setStart(r,e.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0},T=function(){var e=b(),n=v();if(!fp(n)&&Sp(r)){var o=yv(t,e);return o.each((function(t){y(t,S())})),o.getOr(e)}return e},O=function(t,e){return a(t,e),N},_=function(){var e,n=t.getRoot();while(n&&"BODY"!==n.nodeName){if(n.scrollHeight>n.clientHeight){e=n;break}n=n.parentNode}return e},E=function(t,e){k(t)?Qv(r,t,e):tb(r,b(),e)},A=function(t,e){return y(av(t,e,r.getDoc()))},D=function(){var t=b();return t.collapsed?Mf.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},M=function(){e=o=i=null,z.destroy()},N={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:p,setCursorLocation:u,getContent:c,setContent:s,getBookmark:d,moveToBookmark:m,select:g,isCollapsed:h,isForward:S,setNode:w,getNode:x,getSel:v,setRng:y,getRng:b,getStart:l,getEnd:f,getSelectedBlocks:C,normalize:T,selectorChanged:O,selectorChangedWithUnbind:a,getScrollContainer:_,scrollIntoView:E,placeCaretAt:A,getBoundingClientRect:D,destroy:M},R=Pp(N),z=ev(N,r);return N.bookmarkManager=R,N.controlSelection=z,N},E_=function(t,e){Q(e,(function(e){t.attr(e,null)}))},A_=function(t,e,n){t.addNodeFilter("font",(function(t){Q(t,(function(t){var r=e.parse(t.attr("style")),o=t.attr("color"),i=t.attr("face"),a=t.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(t.attr("size"),10)-1]),t.name="span",t.attr("style",e.serialize(r)),E_(t,["color","face","size"])}))}))},D_=function(t,e){t.addNodeFilter("strike",(function(t){Q(t,(function(t){var n=e.parse(t.attr("style"));n["text-decoration"]="line-through",t.name="span",t.attr("style",e.serialize(n))}))}))},M_=function(t,e){var n=Vu();e.convert_fonts_to_spans&&A_(t,n,gn.explode(e.font_size_legacy_values)),D_(t,n)},N_=function(t,e){e.inline_styles&&M_(t,e)},R_=function(t){return new Ai((function(e,n){var r=function(){n("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){200===o.status?e(o.response):r()},o.onerror=r,o.send()}catch(i){r()}}))},z_=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},B_=function(t,e){var n;try{n=atob(e)}catch(gV){return W.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return W.some(new Blob([r],{type:t}))},P_=function(t){return new Ai((function(e){var n=z_(t),r=n.type,o=n.data;B_(r,o).fold((function(){return e(new Blob([]))}),e)}))},I_=function(t){return 0===t.indexOf("blob:")?R_(t):0===t.indexOf("data:")?P_(t):null},L_=function(t){return new Ai((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))},H_=0,F_=function(t){return(t||"blobid")+H_++},V_=function(t,e,n,r){var o,i;if(0===e.src.indexOf("blob:"))return i=t.getByUri(e.src),void(i?n({image:e,blobInfo:i}):I_(e.src).then((function(r){L_(r).then((function(a){o=z_(a).data,i=t.create(F_(),r,o),t.add(i),n({image:e,blobInfo:i})}))}),(function(t){r(t)})));var a=z_(e.src),u=a.data,c=a.type;o=u,i=t.getByData(o,c),i?n({image:e,blobInfo:i}):I_(e.src).then((function(r){i=t.create(F_(),r,o),t.add(i),n({image:e,blobInfo:i})}),(function(t){r(t)}))},j_=function(t){return t?bt(t.getElementsByTagName("img")):[]},U_=function(t,e){var n={},r=function(r,o){o||(o=H);var i=nt(j_(r),(function(e){var n=e.src;return!!tn.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!n||n===tn.transparentSrc)&&(0===n.indexOf("blob:")?!t.isUploaded(n)&&o(e):0===n.indexOf("data:")&&o(e)))))})),a=Z(i,(function(t){if(void 0!==n[t.src])return new Ai((function(e){n[t.src].then((function(n){if("string"===typeof n)return n;e({image:t,blobInfo:n.blobInfo})}))}));var r=new Ai((function(n,r){V_(e,t,n,r)})).then((function(t){return delete n[t.image.src],t})).catch((function(e){return delete n[t.src],e}));return n[t.src]=r,r}));return Ai.all(a)};return{findAll:r}},W_=function(t,e,n,r){var o=t.padd_empty_with_br||e.insert;o&&n[r.name]?r.empty().append(new _y("br",1)).shortEnded=!0:r.empty().append(new _y("#text",3)).value=sa},$_=function(t){return q_(t,"#text")&&t.firstChild.value===sa},q_=function(t,e){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===e},G_=function(t,e){var n=t.getElementRule(e.name);return n&&n.paddEmpty},K_=function(t,e,n,r){return r.isEmpty(e,n,(function(e){return G_(t,e)}))},X_=function(t,e){return t&&(Nt(e,t.name)||"br"===t.name)},Y_=function(t){return k(t.attr("data-mce-bogus"))},J_=function(t){return t.attr("src")===tn.transparentSrc||k(t.attr("data-mce-placeholder"))},Z_=function(t,e){if(e.images_dataimg_filter){var n=new Image;return n.src=t.attr("src"),Ct(t.attributes.map,(function(t,e){n.setAttribute(e,t)})),e.images_dataimg_filter(n)}return!0},Q_=function(t,e){var n=e.blob_cache,r=function(t){var r=t.attr("src");J_(t)||Y_(t)||Dy(r).filter((function(){return Z_(t,e)})).bind((function(t){var e=t.type,r=t.data;return W.from(n.getByData(r,e)).orThunk((function(){return B_(e,r).map((function(t){var e=n.create(F_(),t,r);return n.add(e),e}))}))})).each((function(e){t.attr("src",e.blobUri())}))};n&&t.addAttributeFilter("src",(function(t){return Q(t,r)}))},tE=function(t,e){var n=t.schema;e.remove_trailing_brs&&t.addNodeFilter("br",(function(t,r,o){var i,a,u,c,s,l,f,d,m=t.length,g=gn.extend({},n.getBlockElements()),h=n.getNonEmptyElements(),p=n.getWhiteSpaceElements();for(g.body=1,i=0;i<m;i++)if(a=t[i],u=a.parent,g[a.parent.name]&&a===u.lastChild){s=a.prev;while(s){if(l=s.name,"span"!==l||"bookmark"!==s.attr("data-mce-type")){"br"===l&&(a=null);break}s=s.prev}a&&(a.remove(),K_(n,h,p,u)&&(f=n.getElementRule(u.name),f&&(f.removeEmpty?u.remove():f.paddEmpty&&W_(e,o,g,u))))}else{c=a;while(u&&u.firstChild===c&&u.lastChild===c){if(c=u,g[u.name])break;u=u.parent}c===u&&!0!==e.padd_empty_with_br&&(d=new _y("#text",3),d.value=sa,a.replace(d))}})),t.addAttributeFilter("href",(function(t){var n=t.length,r=function(t){var e=t.split(" ").filter((function(t){return t.length>0}));return e.concat(["noopener"]).sort().join(" ")},o=function(t){var e=t?gn.trim(t):"";return/\b(noopener)\b/g.test(e)?e:r(e)};if(!e.allow_unsafe_link_target)while(n--){var i=t[n];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",o(i.attr("rel")))}})),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",(function(t){var e,n,r,o,i=t.length;while(i--)if(o=t[i],"a"===o.name&&o.firstChild&&!o.attr("href")){r=o.parent,e=o.lastChild;do{n=e.prev,r.insert(e,o),e=n}while(e)}})),e.fix_list_elements&&t.addNodeFilter("ul,ol",(function(t){var e,n,r=t.length;while(r--)if(e=t[r],n=e.parent,"ul"===n.name||"ol"===n.name)if(e.prev&&"li"===e.prev.name)e.prev.append(e);else{var o=new _y("li",1);o.attr("style","list-style-type: none"),e.wrap(o)}})),e.validate&&n.getValidClasses()&&t.addAttributeFilter("class",(function(t){var e=n.getValidClasses(),r=t.length;while(r--){for(var o=t[r],i=o.attr("class").split(" "),a="",u=0;u<i.length;u++){var c=i[u],s=!1,l=e["*"];l&&l[c]&&(s=!0),l=e[o.name],!s&&l&&l[c]&&(s=!0),s&&(a&&(a+=" "),a+=c)}a.length||(a=null),o.attr("class",a)}})),Q_(t,e)},eE=gn.makeMap,nE=gn.each,rE=gn.explode,oE=gn.extend,iE=function(t,e){void 0===e&&(e=Hu());var n={},r=[],o={},i={};t=t||{},t.validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var a=function(t){for(var n=eE("tr,td,th,tbody,thead,tfoot,table"),r=e.getNonEmptyElements(),o=e.getWhiteSpaceElements(),i=e.getTextBlockElements(),a=e.getSpecialElements(),c=function(t,n){if(void 0===n&&(n=t.parent),a[t.name])t.empty().remove();else{for(var r=t.children(),o=0,i=r;o<i.length;o++){var u=i[o];e.isValidChild(n.name,u.name)||c(u,n)}t.unwrap()}},s=0;s<t.length;s++){var l=t[s],f=void 0,d=void 0,m=void 0;if(l.parent&&!l.fixed)if(i[l.name]&&"li"===l.parent.name){var g=l.next;while(g){if(!i[g.name])break;g.name="li",g.fixed=!0,l.parent.insert(g,l.parent),g=g.next}l.unwrap()}else{var h=[l];for(f=l.parent;f&&!e.isValidChild(f.name,l.name)&&!n[f.name];f=f.parent)h.push(f);if(f&&h.length>1)if(e.isValidChild(f.name,l.name)){h.reverse(),d=u(h[0].clone());for(var p=d,v=0;v<h.length-1;v++){e.isValidChild(p.name,h[v].name)?(m=u(h[v].clone()),p.append(m)):m=p;for(var b=h[v].firstChild;b&&b!==h[v+1];){var y=b.next;m.append(b),b=y}p=m}K_(e,r,o,d)?f.insert(l,h[0],!0):(f.insert(d,h[0],!0),f.insert(l,d)),f=h[0],(K_(e,r,o,f)||q_(f,"br"))&&f.empty().remove()}else c(l);else if(l.parent){if("li"===l.name){g=l.prev;if(g&&("ul"===g.name||"ol"===g.name)){g.append(l);continue}if(g=l.next,g&&("ul"===g.name||"ol"===g.name)){g.insert(l,g.firstChild,!0);continue}l.wrap(u(new _y("ul",1)));continue}e.isValidChild(l.parent.name,"div")&&e.isValidChild("div",l.name)?l.wrap(u(new _y("div",1))):c(l)}}}},u=function(t){var e=t.name;if(e in n){var a=o[e];a?a.push(t):o[e]=[t]}var u=r.length;while(u--){var c=r[u].name;if(c in t.attributes.map){a=i[c];a?a.push(t):i[c]=[t]}}return t},c=function(t,e){nE(rE(t),(function(t){var r=n[t];r||(n[t]=r=[]),r.push(e)}))},s=function(){var t=[];for(var e in n)Nt(n,e)&&t.push({name:e,callbacks:n[e]});return t},l=function(t,e){nE(rE(t),(function(t){var n;for(n=0;n<r.length;n++)if(r[n].name===t)return void r[n].callbacks.push(e);r.push({name:t,callbacks:[e]})}))},f=function(){return[].concat(r)},d=function(u,c){var s,l,f,d,m,g,h,p,v=[],b=function(t){return!1===t?"":!0===t?"p":t};c=c||{},o={},i={};var y=oE(eE("script,style,head,html,body,title,meta,param"),e.getBlockElements()),w=e.getNonEmptyElements(),x=e.children,C=t.validate,S="forced_root_block"in c?c.forced_root_block:t.forced_root_block,k=b(S),T=e.getWhiteSpaceElements(),O=/^[ \t\r\n]+/,_=/[ \t\r\n]+$/,E=/[ \t\r\n]+/g,A=/^[ \t\r\n]+$/,D=Nt(T,c.context)||Nt(T,t.root_name),M=function(){var n=P.firstChild,r=null,o=function(t){t&&(n=t.firstChild,n&&3===n.type&&(n.value=n.value.replace(O,"")),n=t.lastChild,n&&3===n.type&&(n.value=n.value.replace(_,"")))};if(e.isValidChild(P.name,k.toLowerCase())){while(n){var i=n.next;3===n.type||1===n.type&&"p"!==n.name&&!y[n.name]&&!n.attr("data-mce-type")?(r||(r=N(k,1),r.attr(t.forced_root_block_attrs),P.insert(r,n)),r.append(n)):(o(r),r=null),n=i}o(r)}},N=function(t,e){var r,i=new _y(t,e);return t in n&&(r=o[t],r?r.push(i):o[t]=[i]),i},R=function(t){for(var n=e.getBlockElements(),r=t.prev;r&&3===r.type;){var o=r.value.replace(_,"");if(o.length>0)return void(r.value=o);var i=r.next;if(i){if(3===i.type&&i.value.length){r=r.prev;continue}if(!n[i.name]&&"script"!==i.name&&"style"!==i.name){r=r.prev;continue}}var a=r.prev;r.remove(),r=a}},z=function(t){var e={};for(var n in t)"li"!==n&&"p"!==n&&(e[n]=t[n]);return e},B=$y({validate:C,document:t.document,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:z(e.getSelfClosingElements()),cdata:function(t){p.append(N("#cdata",4)).value=t},text:function(t,e){var n;D||(t=t.replace(E," "),X_(p.lastChild,y)&&(t=t.replace(O,""))),0!==t.length&&(n=N("#text",3),n.raw=!!e,p.append(n).value=t)},comment:function(t){p.append(N("#comment",8)).value=t},pi:function(t,e){p.append(N(t,7)).value=e,R(p)},doctype:function(t){var e=p.append(N("#doctype",10));e.value=t,R(p)},start:function(t,n,o){var a=C?e.getElementRule(t):{};if(a){var u=N(a.outputName||t,1);u.attributes=n,u.shortEnded=o,p.append(u);var c=x[p.name];c&&x[u.name]&&!c[u.name]&&v.push(u);var s=r.length;while(s--){var l=r[s].name;l in n.map&&(g=i[l],g?g.push(u):i[l]=[u])}y[t]&&R(u),o||(p=u),!D&&T[t]&&(D=!0)}},end:function(n){var r,o,i,a,u=C?e.getElementRule(n):{};if(u){if(y[n]&&!D){if(r=p.firstChild,r&&3===r.type)if(o=r.value.replace(O,""),o.length>0)r.value=o,r=r.next;else{i=r.next,r.remove(),r=i;while(r&&3===r.type)o=r.value,i=r.next,(0===o.length||A.test(o))&&(r.remove(),r=i),r=i}if(r=p.lastChild,r&&3===r.type)if(o=r.value.replace(_,""),o.length>0)r.value=o,r=r.prev;else{i=r.prev,r.remove(),r=i;while(r&&3===r.type)o=r.value,i=r.prev,(0===o.length||A.test(o))&&(r.remove(),r=i),r=i}}if(D&&T[n]&&(D=!1),u.removeEmpty&&K_(e,w,T,p))return a=p.parent,y[p.name]?p.empty().remove():p.unwrap(),void(p=a);u.paddEmpty&&($_(p)||K_(e,w,T,p))&&W_(t,c,y,p),p=p.parent}}},e),P=p=new _y(c.context||t.root_name,11);if(B.parse(u,c.format),C&&v.length&&(c.context?c.invalid=!0:a(v)),k&&("body"===P.name||c.isRootContent)&&M(),!c.invalid){for(h in o)if(Nt(o,h)){g=n[h],s=o[h],d=s.length;while(d--)s[d].parent||s.splice(d,1);for(l=0,f=g.length;l<f;l++)g[l](s,h,c)}for(l=0,f=r.length;l<f;l++)if(g=r[l],g.name in i){s=i[g.name],d=s.length;while(d--)s[d].parent||s.splice(d,1);for(d=0,m=g.callbacks.length;d<m;d++)g.callbacks[d](s,g.name,c)}}return P},m={schema:e,addAttributeFilter:l,getAttributeFilters:f,addNodeFilter:c,getNodeFilters:s,filterNode:u,parse:d};return tE(m,t),N_(m,t),m},aE=function(t,e,n){t.addAttributeFilter("data-mce-tabindex",(function(t,e){var n=t.length;while(n--){var r=t[n];r.attr("tabindex",r.attr("data-mce-tabindex")),r.attr(e,null)}})),t.addAttributeFilter("src,href,style",(function(t,r){var o="data-mce-"+r,i=e.url_converter,a=e.url_converter_scope,u=t.length;while(u--){var c=t[u],s=c.attr(o);void 0!==s?(c.attr(r,s.length>0?s:null),c.attr(o,null)):(s=c.attr(r),"style"===r?s=n.serializeStyle(n.parseStyle(s),c.name):i&&(s=i.call(a,s,r,c.name)),c.attr(r,s.length>0?s:null))}})),t.addAttributeFilter("class",(function(t){var e=t.length;while(e--){var n=t[e],r=n.attr("class");r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}})),t.addAttributeFilter("data-mce-type",(function(t,e,n){var r=t.length;while(r--){var o=t[r];if("bookmark"===o.attr("data-mce-type")&&!n.cleanup){var i=W.from(o.firstChild).exists((function(t){return!ma(t.value)}));i?o.unwrap():o.remove()}}})),t.addNodeFilter("noscript",(function(t){var e=t.length;while(e--){var n=t[e].firstChild;n&&(n.value=Eu.decode(n.value))}})),t.addNodeFilter("script,style",(function(t,n){var r=function(t){return t.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,"")},o=t.length;while(o--){var i=t[o],a=i.firstChild?i.firstChild.value:"";if("script"===n){var u=i.attr("type");u&&i.attr("type","mce-no/type"===u?null:u.replace(/^mce\-/,"")),"xhtml"===e.element_format&&a.length>0&&(i.firstChild.value="// <![CDATA[\n"+r(a)+"\n// ]]>")}else"xhtml"===e.element_format&&a.length>0&&(i.firstChild.value="\x3c!--\n"+r(a)+"\n--\x3e")}})),t.addNodeFilter("#comment",(function(t){var r=t.length;while(r--){var o=t[r];e.preserve_cdata&&0===o.value.indexOf("[CDATA[")?(o.name="#cdata",o.type=4,o.value=n.decode(o.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===o.value.indexOf("mce:protected ")&&(o.name="#text",o.type=3,o.raw=!0,o.value=unescape(o.value).substr(14))}})),t.addNodeFilter("xml:namespace,input",(function(t,e){var n=t.length;while(n--){var r=t[n];7===r.type?r.remove():1===r.type&&("input"!==e||r.attr("type")||r.attr("type","text"))}})),t.addAttributeFilter("data-mce-type",(function(e){Q(e,(function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())}))})),t.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(t,e){var n=t.length;while(n--)t[n].attr(e,null)}))},uE=function(t){var e=function(t){return t&&"br"===t.name},n=t.lastChild;if(e(n)){var r=n.prev;e(r)&&(n.remove(),r.remove())}},cE=function(t,e,n){var r,o=t.dom,i=e.cloneNode(!0),a=document.implementation;if(a.createHTMLDocument){var u=a.createHTMLDocument("");gn.each("BODY"===i.nodeName?i.childNodes:[i],(function(t){u.body.appendChild(u.importNode(t,!0))})),i="BODY"!==i.nodeName?u.body.firstChild:u.body,r=o.doc,o.doc=u}return Hp(t,Wt(Wt({},n),{node:i})),r&&(o.doc=r),i},sE=function(t,e){return t&&t.hasEventListeners("PreProcess")&&!e.no_events},lE=function(t,e,n){return sE(t,n)?cE(t,e,n):e},fE=function(t,e,n){-1===gn.inArray(e,n)&&(t.addAttributeFilter(n,(function(t,e){var n=t.length;while(n--)t[n].attr(e,null)})),e.push(n))},dE=function(t,e,n){if(!e.no_events&&t){var r=Fp(t,Wt(Wt({},e),{content:n}));return r.content}return n},mE=function(t,e,n){var r=ga(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||aa(wn.fromDom(e))?r:gn.trim(r)},gE=function(t,e,n){var r=n.selection?Wt({forced_root_block:!1},n):n,o=t.parse(e,r);return uE(o),o},hE=function(t,e,n){var r=rw(t,e);return r.serialize(n)},pE=function(t,e,n,r,o){var i=hE(e,n,r);return dE(t,o,i)},vE=function(t,e){var n=["data-mce-selected"],r=e&&e.dom?e.dom:Hs.DOM,o=e&&e.schema?e.schema:Hu(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var i=iE(t,o);aE(i,t,r);var a=function(n,a){void 0===a&&(a={});var u=Wt({format:"html"},a),c=lE(e,n,u),s=mE(r,c,u),l=gE(i,s,u);return"tree"===u.format?l:pE(e,t,o,l,u)};return{schema:o,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:a,addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:R(fE,i,n),getTempAttrs:D(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},bE=function(t,e){var n=vE(t,e);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},yE="html",wE=function(t,e){void 0===e&&(e={});var n=e.format?e.format:yE;return u_(t,e,n)},xE=function(t,e,n){return void 0===n&&(n={}),c_(t,e,n)},CE=Hs.DOM,SE=function(t){CE.setStyle(t.id,"display",t.orgDisplay)},kE=function(t){return W.from(t).each((function(t){return t.destroy()}))},TE=function(t){t.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)},OE=function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),CE.unbind(e,"submit reset",t.formEventDelegate))},_E=function(t){if(!t.removed){var e=t._selectionOverrides,n=t.editorUpload,r=t.getBody(),o=t.getElement();r&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&o&&CE.remove(o.nextSibling),Vp(t),t.editorManager.remove(t),!t.inline&&r&&SE(t),jp(t),CE.remove(t.getContainer()),kE(e),kE(n),t.destroy()}},EE=function(t,e){var n=t.selection,r=t.dom;t.destroyed||(e||t.removed?(e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),kE(n),kE(r)),OE(t),TE(t),t.destroyed=!0):t.remove())},AE=function(t,e){var n=b(t)&&b(e);return n?ME(t,e):e},DE=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var a in i)Nt(i,a)&&(r[a]=t(r[a],i[a]))}return r}},ME=DE(AE),NE="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(","),RE="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),zE="imagetools,toc".split(","),BE=function(t){var e=nt(NE,(function(e){return Nt(t,e)})),n=t.forced_root_block;return!1!==n&&""!==n||e.push("forced_root_block (false only)"),gt(e)},PE=function(t){var e=gn.makeMap(t.plugins," "),n=function(t){return Nt(e,t)},r=qt(qt([],nt(RE,n),!0),st(zE,(function(t){return n(t)?[t+" (moving to premium)"]:[]})),!0);return gt(r)},IE=function(t,e){var n=BE(t),r=PE(e),o=r.length>0,i=n.length>0,a="mobile"===e.theme;if(o||i||a){var u="\n- ",c=a?"\n\nThemes:"+u+"mobile":"",s=o?"\n\nPlugins:"+u+r.join(u):"",l=i?"\n\nSettings:"+u+n.join(u):"";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."+c+s+l)}},LE=function(t,e){return{sections:D(t),settings:D(e)}},HE=$e().deviceType,FE=HE.isTouch(),VE=HE.isPhone(),jE=HE.isTablet(),UE=["lists","autolink","autosave"],WE={table_grid:!1,object_resizing:!1,resize:!1},$E=function(t){var e=y(t)?t.join(" "):t,n=Z(v(e)?e.split(" "):[],fe);return nt(n,(function(t){return t.length>0}))},qE=function(t){return nt(t,R(Y,UE))},GE=function(t,e){var n=_t(e,(function(e,n){return Y(t,n)}));return LE(n.t,n.f)},KE=function(t,e,n){void 0===n&&(n={});var r=t.sections(),o=Mt(r,e).getOr({});return gn.extend({},n,o)},XE=function(t,e){return Nt(t.sections(),e)},YE=function(t,e,n){var r=t.sections();return XE(t,e)&&r[e].theme===n},JE=function(t,e){return XE(t,e)?t.sections()[e]:{}},ZE=function(t,e){return Mt(t,"toolbar_mode").orThunk((function(){return Mt(t,"toolbar_drawer").map((function(t){return!1===t?"wrap":t}))})).getOr(e)},QE=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:ZE(t,"floating"),plugins:"",document_base_url:n,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:o.convertURL,url_converter_scope:o};return Wt(Wt({},i),r?WE:{})},tA=function(t,e){var n={resize:!1,toolbar_mode:ZE(t,"scrolling"),toolbar_sticky:!1},r={menubar:!1};return Wt(Wt(Wt({},WE),n),e?r:{})},eA=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?gn.extend({},t.external_plugins,n):n},nA=function(t,e){return[].concat($E(t)).concat($E(e))},rA=function(t,e,n,r){return t&&YE(e,"mobile","mobile")?qE(r):t&&XE(e,"mobile")?r:n},oA=function(t,e,n,r){var o=$E(n.forced_plugins),i=$E(r.plugins),a=JE(e,"mobile"),u=a.plugins?$E(a.plugins):i,c=rA(t,e,i,u),s=nA(o,c);if(tn.browser.isIE()&&Y(s,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return gn.extend(r,{plugins:s.join(" ")})},iA=function(t,e){return t&&XE(e,"mobile")},aA=function(t,e,n,r,o){var i=t?{mobile:tA(o.mobile||{},e)}:{},a=GE(["mobile"],ME(i,o)),u=gn.extend(n,r,a.settings(),iA(t,a)?KE(a,"mobile"):{},{validate:!0,external_plugins:eA(r,a.settings())});return oA(t,a,r,u)},uA=function(t,e,n,r,o){var i=QE(o,e,n,FE,t),a=aA(VE||jE,VE,i,r,o);return!1!==a.deprecation_warnings&&IE(o,a),a},cA=function(t,e,n){return W.from(e.settings[n]).filter(t)},sA=function(t){var e={};return"string"===typeof t?Q(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[gn.trim(n[0])]=gn.trim(n[1]):e[gn.trim(n[0])]=gn.trim(n[0])})):e=t,e},lA=function(t){return function(e){return y(e)&&lt(e,t)}},fA=function(t,e,n,r){var o=e in t.settings?t.settings[e]:n;return"hash"===r?sA(o):"string"===r?cA(v,t,e).getOr(n):"number"===r?cA(O,t,e).getOr(n):"boolean"===r?cA(x,t,e).getOr(n):"object"===r?cA(b,t,e).getOr(n):"array"===r?cA(y,t,e).getOr(n):"string[]"===r?cA(lA(v),t,e).getOr(n):"function"===r?cA(T,t,e).getOr(n):o},dA=function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]?t[e]:{icons:{}}},r=function(e){return Nt(t,e)};return{add:e,get:n,has:r}},mA=dA(),gA=function(t,e){var n=e.dom;return n[t]},hA=function(t,e){return parseInt(Oo(e,t),10)},pA=R(gA,"clientWidth"),vA=R(gA,"clientHeight"),bA=R(hA,"margin-top"),yA=R(hA,"margin-left"),wA=function(t){return t.dom.getBoundingClientRect()},xA=function(t,e,n){var r=pA(t),o=vA(t);return e>=0&&n>=0&&e<=r&&n<=o},CA=function(t,e,n,r){var o=wA(e),i=t?o.left+e.dom.clientLeft+yA(e):0,a=t?o.top+e.dom.clientTop+bA(e):0,u=n-i,c=r-a;return{x:u,y:c}},SA=function(t,e,n){var r=wn.fromDom(t.getBody()),o=t.inline?r:Kn(r),i=CA(t.inline,o,e,n);return xA(o,i.x,i.y)},kA=function(t){return W.from(t).map(wn.fromDom)},TA=function(t){var e=t.inline?t.getBody():t.getContentAreaContainer();return kA(e).map(Er).getOr(!1)},OA=function(){var t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:t,close:t,reposition:t,getArgs:t}},_A=function(t){var e=[],n=function(){var e=t.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():OA()},r=function(){return W.from(e[0])},o=function(t,e){return t.type===e.type&&t.text===e.text&&!t.progressBar&&!t.timeout&&!e.progressBar&&!e.timeout},i=function(){e.length>0&&n().reposition(e)},a=function(t){e.push(t)},u=function(t){ut(e,(function(e){return e===t})).each((function(t){e.splice(t,1)}))},c=function(c,s){if(void 0===s&&(s=!0),!t.removed&&TA(t))return s&&t.fire("BeforeOpenNotification",{notification:c}),at(e,(function(t){return o(n().getArgs(t),c)})).getOrThunk((function(){t.editorManager.setActive(t);var e=n().open(c,(function(){u(e),i(),r().fold((function(){return t.focus()}),(function(t){return nb(wn.fromDom(t.getEl()))}))}));return a(e),i(),t.fire("OpenNotification",{notification:Wt({},e)}),e}))},s=function(){r().each((function(t){n().close(t),u(t),i()}))},l=D(e),f=function(t){t.on("SkinLoaded",(function(){var e=em(t);e&&c({text:e,type:"warning",timeout:0},!1),i()})),t.on("show ResizeEditor ResizeWindow NodeChange",(function(){Pi.requestAnimationFrame(i)})),t.on("remove",(function(){Q(e.slice(),(function(t){n().close(t)}))}))};return f(t),{open:c,close:s,getNotifications:l}},EA=cl.PluginManager,AA=cl.ThemeManager;function DA(){var t=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:t,openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}}var MA=function(t){var e=[],n=function(){var e=t.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():DA()},r=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e?e.apply(t,n):void 0}},o=function(e){t.fire("OpenWindow",{dialog:e})},i=function(e){t.fire("CloseWindow",{dialog:e})},a=function(t){e.push(t),o(t)},u=function(n){i(n),e=nt(e,(function(t){return t!==n})),0===e.length&&t.focus()},c=function(){return W.from(e[e.length-1])},s=function(e){t.editorManager.setActive(t),Bb(t);var n=e();return a(n),n},l=function(t,e){return s((function(){return n().open(t,e,u)}))},f=function(t){return s((function(){return n().openUrl(t,u)}))},d=function(t,e,o){var i=n();i.alert(t,r(o||i,e))},m=function(t,e,o){var i=n();i.confirm(t,r(o||i,e))},g=function(){c().each((function(t){n().close(t),u(t)}))};return t.on("remove",(function(){Q(e,(function(t){n().close(t)}))})),{open:l,openUrl:f,alert:d,confirm:m,close:g}},NA=function(t,e){t.notificationManager.open({type:"error",text:e})},RA=function(t,e){t._skinLoaded?NA(t,e):t.on("SkinLoaded",(function(){NA(t,e)}))},zA=function(t,e){RA(t,ul.translate(["Failed to upload image: {0}",e]))},BA=function(t,e,n){Yp(t,e,{message:n}),console.error(n)},PA=function(t,e,n){return n?"Failed to load "+t+": "+n+" from url "+e:"Failed to load "+t+" url: "+e},IA=function(t,e,n){BA(t,"PluginLoadError",PA("plugin",e,n))},LA=function(t,e,n){BA(t,"IconsLoadError",PA("icons",e,n))},HA=function(t,e,n){BA(t,"LanguageLoadError",PA("language",e,n))},FA=function(t,e,n){var r=ul.translate(["Failed to initialize plugin: {0}",e]);Yp(t,"PluginLoadError",{message:r}),VA(r,n),RA(t,r)},VA=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,qt([t],e,!1)):r.log.apply(r,qt([t],e,!1)))},jA=function(t){return/^[a-z0-9\-]+$/i.test(t)},UA=function(t){return $A(t,Gd(t))},WA=function(t){return $A(t,Kd(t))},$A=function(t,e){var n=t.editorManager.baseURL+"/skins/content",r=t.editorManager.suffix,o="content"+r+".css",i=!0===t.inline;return Z(e,(function(e){return jA(e)&&!i?n+"/"+e+"/"+o:t.documentBaseURI.toAbsolute(e)}))},qA=function(t){t.contentCSS=t.contentCSS.concat(UA(t),WA(t))},GA=function(){var t=1,e=2,n={},r=function(t,e){return{status:t,resultUri:e}},o=function(t){return t in n},i=function(t){var e=n[t];return e?e.resultUri:null},a=function(e){return!!o(e)&&n[e].status===t},u=function(t){return!!o(t)&&n[t].status===e},c=function(e){n[e]=r(t,null)},s=function(t,o){n[t]=r(e,o)},l=function(t){delete n[t]},f=function(){n={}};return{hasBlobUri:o,getResultUri:i,isPending:a,isUploaded:u,markPending:c,markUploaded:s,removeFailed:l,destroy:f}},KA=0,XA=function(){var t=function(){return Math.round(4294967295*Math.random()).toString(36)},e=(new Date).getTime();return"s"+e.toString(36)+t()+t()+t()},YA=function(t){return t+KA+++XA()},JA=function(){var t=[],e=function(t){var e={"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"};return e[t.toLowerCase()]||"dat"},n=function(t,e,n,o,i){if(v(t)){var a=t;return r({id:a,name:o,filename:i,blob:e,base64:n})}if(b(t))return r(t);throw new Error("Unknown input type")},r=function(t){if(!t.blob||!t.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var n=t.id||YA("blobid"),r=t.name||n,o=t.blob;return{id:D(n),name:D(r),filename:D(t.filename||r+"."+e(o.type)),blob:D(o),base64:D(t.base64),blobUri:D(t.blobUri||URL.createObjectURL(o)),uri:D(t.uri)}},o=function(e){a(e.id())||t.push(e)},i=function(e){return at(t,e).getOrUndefined()},a=function(t){return i((function(e){return e.id()===t}))},u=function(t){return i((function(e){return e.blobUri()===t}))},c=function(t,e){return i((function(n){return n.base64()===t&&n.blob().type===e}))},s=function(e){t=nt(t,(function(t){return t.blobUri()!==e||(URL.revokeObjectURL(t.blobUri()),!1)}))},l=function(){Q(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]};return{create:n,add:o,get:a,getByUri:u,getByData:c,findFirst:i,removeByUri:s,destroy:l}},ZA=function(t,e){var n={},r=function(t,e){return t?t.replace(/\/$/,"")+"/"+e.replace(/^\//,""):e},o=function(t,n,o,i){var a=new XMLHttpRequest;a.open("POST",e.url),a.withCredentials=e.credentials,a.upload.onprogress=function(t){i(t.loaded/t.total*100)},a.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+a.status)},a.onload=function(){if(a.status<200||a.status>=300)o("HTTP Error: "+a.status);else{var t=JSON.parse(a.responseText);t&&"string"===typeof t.location?n(r(e.basePath,t.location)):o("Invalid JSON: "+a.responseText)}};var u=new FormData;u.append("file",t.blob(),t.filename()),a.send(u)},i=function(){return new Ai((function(t){t([])}))},a=function(t,e){return{url:e,blobInfo:t,status:!0}},u=function(t,e,n){return{url:"",blobInfo:t,status:!1,error:{message:e,options:n}}},c=function(t,e){gn.each(n[t],(function(t){t(e)})),delete n[t]},s=function(e,n,r){return t.markPending(e.blobUri()),new Ai((function(o){var i,s;try{var l=function(){i&&(i.close(),s=_)},f=function(n){l(),t.markUploaded(e.blobUri(),n),c(e.blobUri(),a(e,n)),o(a(e,n))},d=function(n,r){var i=r||{};l(),t.removeFailed(e.blobUri()),c(e.blobUri(),u(e,n,i)),o(u(e,n,i))};s=function(t){t<0||t>100||W.from(i).orThunk((function(){return W.from(r).map(P)})).each((function(e){i=e,e.progressBar.value(t)}))},n(e,f,d,s)}catch(m){o(u(e,m.message,{}))}}))},l=function(t){return t===o},f=function(t){var e=t.blobUri();return new Ai((function(t){n[e]=n[e]||[],n[e].push(t)}))},d=function(n,r){return n=gn.grep(n,(function(e){return!t.isUploaded(e.blobUri())})),Ai.all(gn.map(n,(function(n){return t.isPending(n.blobUri())?f(n):s(n,e.handler,r)})))},m=function(t,n){return!e.url&&l(e.handler)?i():d(t,n)};return!1===T(e.handler)&&(e.handler=o),{upload:m}},QA=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},tD=function(t,e){return ZA(e,{url:Id(t),basePath:Ld(t),credentials:Hd(t),handler:Fd(t)})},eD=function(t){var e=GA(),n=tD(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?QA(t):void 0)}}},nD=function(t){var e=Ks(null);t.on("change AddUndo",(function(t){e.set(Wt({},t.level))}));var n=function(){var n=t.undoManager.data;vt(n).filter((function(t){return!pO(e.get(),t)})).each((function(e){t.setDirty(!0),t.fire("change",{level:e,lastLevel:ht(n,n.length-2).getOrNull()})}))};return{fireIfChanged:n}},rD=function(t){var e,n,r=JA(),o=GA(),i=[],a=nD(t),u=function(e){return function(n){return t.selection?e(n):[]}},c=function(t){return t+(-1===t.indexOf("?")?"?":"&")+(new Date).getTime()},s=function(t,e,n){var r=0;do{r=t.indexOf(e,r),-1!==r&&(t=t.substring(0,r)+n+t.substr(r+e.length),r+=n.length-e.length+1)}while(-1!==r);return t},l=function(t,e,n){var r='src="'+n+'"'+(n===tn.transparentSrc?' data-mce-placeholder="1"':"");return t=s(t,'src="'+e+'"',r),t=s(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"'),t},f=function(e,n){Q(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=Z(t.fragments,(function(t){return l(t,e,n)})):t.content=l(t.content,e,n)}))},d=function(e,n){var r=t.convertURL(n,"src");f(e.src,n),t.$(e).attr({src:Rd(t)?c(n):n,"data-mce-src":r})},m=function(n){return e||(e=tD(t,o)),v().then(u((function(o){var i=Z(o,(function(t){return t.blobInfo}));return e.upload(i,QA(t)).then(u((function(e){var i=[],u=Z(e,(function(e,n){var a=o[n].blobInfo,u=o[n].image;return e.status&&zd(t)?(r.removeByUri(u.src),PO(t)||d(u,e.url)):e.error&&(e.error.options.remove&&(f(u.getAttribute("src"),tn.transparentSrc),i.push(u)),zA(t,e.error.message)),{element:u,status:e.status,uploadUri:e.url,blobInfo:a}}));return u.length>0&&a.fireIfChanged(),i.length>0&&(PO(t)?console.error("Removing images on failed uploads is currently unsupported for RTC"):t.undoManager.transact((function(){Q(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(u),u})))})))},g=function(e){if(Nd(t))return m(e)},h=function(e){if(!1===lt(i,(function(t){return t(e)})))return!1;if(0===e.getAttribute("src").indexOf("data:")){var n=Md(t);return n(e)}return!0},p=function(t){i.push(t)},v=function(){return n||(n=U_(o,r)),n.findAll(t.getBody(),h).then(u((function(e){return e=nt(e,(function(e){return"string"!==typeof e||(RA(t,e),!1)})),PO(t)||Q(e,(function(t){f(t.image.src,t.blobInfo.blobUri()),t.image.src=t.blobInfo.blobUri(),t.image.removeAttribute("data-mce-src")})),e})))},b=function(){r.destroy(),o.destroy(),n=e=null},y=function(e){return e.replace(/src="(blob:[^"]+)"/g,(function(e,n){var i=o.getResultUri(n);if(i)return'src="'+i+'"';var a=r.getByUri(n);if(a||(a=ot(t.editorManager.get(),(function(t,e){return t||e.editorUpload&&e.editorUpload.blobCache.getByUri(n)}),null)),a){var u=a.blob();return'src="data:'+u.type+";base64,"+a.base64()+'"'}return e}))};return t.on("SetContent",(function(){Nd(t)?g():v()})),t.on("RawSaveContent",(function(t){t.content=y(t.content)})),t.on("GetContent",(function(t){t.source_view||"raw"===t.format||"tree"===t.format||(t.content=y(t.content))})),t.on("PostRender",(function(){t.parser.addNodeFilter("img",(function(t){Q(t,(function(t){var e=t.attr("src");if(!r.getByUri(e)){var n=o.getResultUri(e);n&&t.attr("src",n)}}))}))})),{blobCache:r,addFilter:p,uploadImages:m,uploadImagesAuto:g,scanForImages:v,destroy:b}},oD=function(t){var e={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(t,e,n){return Ur(t)&&t.hasAttribute("href")},onformat:function(e,n,r){gn.each(r,(function(n,r){t.setAttrib(e,r,n)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(t){var e;return null!==(e=null===t||void 0===t?void 0:t.customValue)&&void 0!==e?e: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}]};return gn.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(function(t){e[t]={block:t,remove:"all"}})),e},iD=function(t){var e={},n=function(t){return k(t)?e[t]:e},r=function(t){return Nt(e,t)},o=function(t,n){t&&(v(t)?(y(n)||(n=[n]),Q(n,(function(t){C(t.deep)&&(t.deep=!jh(t)),C(t.split)&&(t.split=!jh(t)||Uh(t)),C(t.remove)&&jh(t)&&!Uh(t)&&(t.remove="none"),jh(t)&&Uh(t)&&(t.mixed=!0,t.block_expand=!0),v(t.classes)&&(t.classes=t.classes.split(/\s+/))})),e[t]=n):Ct(t,(function(t,e){o(e,t)})))},i=function(t){return t&&e[t]&&delete e[t],e};return o(oD(t.dom)),o(im(t)),{get:n,has:r,register:o,unregister:i}},aD=gn.each,uD=Hs.DOM,cD=function(t,e){var n,r,o,i=e&&e.schema||Hu({}),a=function(t,e){e.classes.length&&uD.addClass(t,e.classes.join(" ")),uD.setAttribs(t,e.attrs)},u=function(t){r="string"===typeof t?{name:t,classes:[],attrs:{}}:t;var e=uD.create(r.name);return a(e,r),e},c=function(t,e){var n="string"!==typeof t?t.nodeName.toLowerCase():t,r=i.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(e&&-1!==gn.inArray(o,e)?e:o[0])},s=function(t,e,n){var r,o,i=e.length>0&&e[0],a=i&&i.name,l=c(t,a);if(l)a===l?(o=e[0],e=e.slice(1)):o=l;else if(i)o=e[0],e=e.slice(1);else if(!n)return t;return o&&(r=u(o),r.appendChild(t)),n&&(r||(r=uD.create("div"),r.appendChild(t)),gn.each(n,(function(e){var n=u(e);r.insertBefore(n,t)}))),s(r,e,o&&o.siblings)};return t&&t.length?(r=t[0],n=u(r),o=uD.create("div"),o.appendChild(s(n,t.slice(1),r.siblings)),o):""},sD=function(t){var e,n={classes:[],attrs:{}};return t=n.selector=gn.trim(t),"*"!==t&&(e=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(t,e,r,o,i){switch(e){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==gn.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r);break}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""}))),n.name=e||"div",n},lD=function(t){return t&&"string"===typeof t?(t=t.split(/\s*,\s*/)[0],t=t.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),gn.map(t.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=gn.map(t.split(/(?:~\+|~|\+)/),sD),n=e.pop();return e.length&&(n.siblings=e),n})).reverse()):[]},fD=function(t,e){var n,r,o,i="",a=am(t);if(""===a)return"";var u=function(t){return t.replace(/%(\w+)/g,"")};if("string"===typeof e){if(e=t.formatter.get(e),!e)return;e=e[0]}if("preview"in e){var c=Mt(e,"preview");if(so(c,!1))return"";a=c.getOr(a)}n=e.block||e.inline||"span";var s=lD(e.selector);s.length?(s[0].name||(s[0].name=n),n=e.selector,r=cD(s,t)):r=cD([n],t);var l=uD.select(n,r)[0]||r.firstChild;return aD(e.styles,(function(t,e){var n=u(t);n&&uD.setStyle(l,e,n)})),aD(e.attributes,(function(t,e){var n=u(t);n&&uD.setAttrib(l,e,n)})),aD(e.classes,(function(t){var e=u(t);uD.hasClass(l,e)||uD.addClass(l,e)})),t.fire("PreviewFormats"),uD.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=uD.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,aD(a.split(" "),(function(e){var n=uD.getStyle(l,e,!0);if(("background-color"!==e||!/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)||(n=uD.getStyle(t.getBody(),e,!0),"#ffffff"!==uD.toHex(n).toLowerCase()))&&("color"!==e||"#000000"!==uD.toHex(n).toLowerCase())){if("font-size"===e&&/em|%$/.test(n)){if(0===o)return;var r=parseFloat(n)/(/%$/.test(n)?100:1);n=r*o+"px"}"border"===e&&n&&(i+="padding:0 2px;"),i+=e+":"+n+";"}})),t.fire("AfterPreviewFormats"),uD.remove(r),i},dD=function(t){t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(var e=1;e<=6;e++)t.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("access+7","",["FormatBlock",!1,"p"]),t.addShortcut("access+8","",["FormatBlock",!1,"div"]),t.addShortcut("access+9","",["FormatBlock",!1,"address"])},mD=function(t){var e=iD(t),n=Ks(null);return dD(t),ck(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,n,r){r_(t,e,n,r)},remove:function(e,n,r,o){o_(t,e,n,r,o)},toggle:function(e,n,r){i_(t,e,n,r)},match:function(e,n,r,o){return ZO(t,e,n,r,o)},closest:function(e){return n_(t,e)},matchAll:function(e,n){return QO(t,e,n)},matchNode:function(e,n,r,o){return t_(t,e,n,r,o)},canApply:function(e){return e_(t,e)},formatChanged:function(e,r,o,i){return a_(t,n,e,r,o,i)},getCssText:R(fD,t)}},gD=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},hD=function(t,e,n){var r=Ks(!1),o=function(t){bO(e,!1,n),e.add({},t)};t.on("init",(function(){e.add()})),t.on("BeforeExecCommand",(function(t){var r=t.command;gD(r)||(yO(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;gD(e)||o(t)})),t.on("ObjectResizeStart cut",(function(){e.beforeChange()})),t.on("SaveContent ObjectResized blur",o),t.on("dragend",o),t.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((i>=33&&i<=36||i>=37&&i<=40||45===i||n.ctrlKey)&&(o(),t.nodeChanged()),46!==i&&8!==i||t.nodeChanged(),r.get()&&e.typing&&!1===pO(lO(t),e.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:e.data[0],lastLevel:null})),t.fire("TypingUndo"),r.set(!1),t.nodeChanged()))})),t.on("keydown",(function(t){var i=t.keyCode;if(!t.isDefaultPrevented())if(i>=33&&i<=36||i>=37&&i<=40||45===i)e.typing&&o(t);else{var a=t.ctrlKey&&!t.altKey||t.metaKey;!(i<16||i>20)||224===i||91===i||e.typing||a||(e.beforeChange(),bO(e,!0,n),e.add({},t),r.set(!0))}})),t.on("mousedown",(function(t){e.typing&&o(t)}));var i=function(t){return"insertReplacementText"===t.inputType},a=function(t){return"insertText"===t.inputType&&null===t.data},u=function(t){return"insertFromPaste"===t.inputType||"insertFromDrop"===t.inputType};t.on("input",(function(t){t.inputType&&(i(t)||a(t)||u(t))&&o(t)})),t.on("AddUndo Undo Redo ClearUndos",(function(e){e.isDefaultPrevented()||t.nodeChanged()}))},pD=function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")},vD=function(t){var e=ll(),n=Ks(0),r=Ks(0),o={data:[],typing:!1,beforeChange:function(){VO(t,n,e)},add:function(i,a){return jO(t,o,r,n,e,i,a)},undo:function(){return UO(t,o,n,r)},redo:function(){return WO(t,r,o.data)},clear:function(){$O(t,o,r)},reset:function(){qO(t,o)},hasUndo:function(){return GO(t,o,r)},hasRedo:function(){return KO(t,o,r)},transact:function(e){return XO(t,o,n,e)},ignore:function(e){YO(t,n,e)},extra:function(e,n){JO(t,o,r,e,n)}};return PO(t)||hD(t,o,n),pD(t),o},bD=[9,27,Qp.HOME,Qp.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Qp.DOWN,Qp.UP,Qp.LEFT,Qp.RIGHT].concat(tn.browser.isFirefox()?[224]:[]),yD="data-mce-placeholder",wD=function(t){return"keydown"===t.type||"keyup"===t.type},xD=function(t){var e=t.keyCode;return e===Qp.BACKSPACE||e===Qp.DELETE},CD=function(t){if(wD(t)){var e=t.keyCode;return!xD(t)&&(Qp.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||Y(bD,e))}return!1},SD=function(t){return wD(t)&&!(xD(t)||"keyup"===t.type&&229===t.keyCode)},kD=function(t,e,n){if(nu(wn.fromDom(e),!1)){var r=""===n,o=e.firstElementChild;return!o||!t.getStyle(e.firstElementChild,"padding-left")&&!t.getStyle(e.firstElementChild,"padding-right")&&(r?!t.isBlock(o):n===o.nodeName.toLowerCase())}return!1},TD=function(t){var e=t.dom,n=Sd(t),r=Qd(t),o=function(i,a){if(!CD(i)){var u=t.getBody(),c=!SD(i)&&kD(e,u,n),s=""!==e.getAttrib(u,yD);(s!==c||a)&&(e.setAttrib(u,yD,c?r:null),e.setAttrib(u,"aria-placeholder",c?r:null),Xp(t,c),t.on(c?"keydown":"keyup",o),t.off(c?"keyup":"keydown",o))}};r&&t.on("init",(function(e){o(e,!0),t.on("change SetContent ExecCommand",o),t.on("paste",(function(e){return Pi.setEditorTimeout(t,(function(){return o(e)}))}))}))},OD=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,_D=function(t){return OD.test(t)},ED=function(t,e){return An(wn.fromDom(e),Yd(t))},AD=function(t){return"rtl"===Hs.DOM.getStyle(t,"direction",!0)||_D(t.textContent)},DD=function(t,e,n){return nt(Hs.DOM.getParents(n.container(),"*",e),t)},MD=function(t,e,n){var r=DD(t,e,n);return W.from(r[r.length-1])},ND=function(t,e,n){var r=cg(e,t),o=cg(n,t);return r&&r===o},RD=function(t){return Ca(t)||Sa(t)},zD=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?ba(n)?Qr(n.nextSibling)?Mf(n.nextSibling,0):Mf.after(n):Ca(e)?Mf(n,r+1):e:ba(n)?Qr(n.previousSibling)?Mf(n.previousSibling,n.previousSibling.data.length):Mf.before(n):Sa(e)?Mf(n,r-1):e},BD=R(zD,!0),PD=R(zD,!1),ID=function(t){return function(e){return Rn(t,wn.fromDom(e.dom.parentNode))}},LD=function(t){return ea(t)||ra(t)},HD=function(t,e){return Pn(t,e)?Si(e,LD,ID(t)):W.none()},FD=function(t){var e=t.getBody(),n=e.firstChild&&t.dom.isBlock(e.firstChild)?e.firstChild:e;t.selection.setCursorLocation(n,0)},VD=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),FD(t))},jD=function(t,e,n){return fo(Xg(n),Yg(n),(function(r,o){var i=zD(!0,r),a=zD(!1,o),u=zD(!1,e);return t?Gg(n,u).exists((function(t){return t.isEqual(a)&&e.isEqual(i)})):Kg(n,u).exists((function(t){return t.isEqual(i)&&e.isEqual(a)}))})).getOr(!0)},UD=function(t,e){return{block:t,position:e}},WD=function(t,e){return{from:t,to:e}},$D=function(t,e){var n=wn.fromDom(t),r=wn.fromDom(e.container());return HD(n,r).map((function(t){return UD(t,e)}))},qD=function(t){return!1===Rn(t.from.block,t.to.block)},GD=function(t){return Yn(t.from.block).bind((function(e){return Yn(t.to.block).filter((function(t){return Rn(e,t)}))})).isSome()},KD=function(t){return!1===ao(t.from.block.dom)&&!1===ao(t.to.block.dom)},XD=function(t,e,n){return ro(n.position.getNode())&&!1===nu(n.block)?qg(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Ug(e,t,r).bind((function(e){return $D(t,e)})):W.some(n)})).getOr(n):n},YD=function(t,e,n){var r=$D(t,Mf.fromRangeStart(n)),o=r.bind((function(n){return Ug(e,t,n.position).bind((function(n){return $D(t,n).map((function(n){return XD(t,e,n)}))}))}));return fo(r,o,WD).filter((function(t){return qD(t)&&GD(t)&&KD(t)}))},JD=function(t,e,n){return n.collapsed?YD(t,e,n):W.none()},ZD=function(t){var e=rr(t);return ut(e,Ji).fold(D(e),(function(t){return e.slice(0,t)}))},QD=function(t){var e=ZD(t);return Q(e,Or),e},tM=function(t,e){var n=Rw(e,t);return at(n.reverse(),(function(t){return nu(t)})).each(Or)},eM=function(t){return 0===nt(er(t),(function(t){return!nu(t)})).length},nM=function(t,e,n,r){if(nu(n))return Ew(n),Xg(n.dom);eM(r)&&nu(e)&&br(r,wn.fromTag("br"));var o=Kg(n.dom,Mf.before(r.dom));return Q(QD(e),(function(t){br(r,t)})),tM(t,e),o},rM=function(t,e,n){if(nu(n))return Or(n),nu(e)&&Ew(e),Xg(e.dom);var r=Yg(n.dom);return Q(QD(e),(function(t){xr(n,t)})),tM(t,e),r},oM=function(t,e){var n=Rw(e,t);return W.from(n[n.length-1])},iM=function(t,e){return Pn(e,t)?oM(e,t):W.none()},aM=function(t,e){qg(t,e.dom).map((function(t){return t.getNode()})).map(wn.fromDom).filter(ta).each(Or)},uM=function(t,e,n){return aM(!0,e),aM(!1,n),iM(e,n).fold(R(rM,t,e,n),R(nM,t,e,n))},cM=function(t,e,n,r){return e?uM(t,r,n):uM(t,n,r)},sM=function(t,e){var n=wn.fromDom(t.getBody()),r=JD(n.dom,e,t.selection.getRng()).bind((function(t){return cM(n,e,t.from.block,t.to.block)}));return r.each((function(e){t.selection.setRng(e.toRange())})),r.isSome()},lM=function(t,e){var n=e.getRng();return fo(HD(t,wn.fromDom(n.startContainer)),HD(t,wn.fromDom(n.endContainer)),(function(r,o){return!1===Rn(r,o)&&(n.deleteContents(),cM(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)},fM=function(t,e){var n=wn.fromDom(e),r=R(Rn,t);return Ci(n,ia,r).isSome()},dM=function(t,e){return fM(t,e.startContainer)||fM(t,e.endContainer)},mM=function(t,e){var n=Kg(t.dom,Mf.fromRangeStart(e)).isNone(),r=Gg(t.dom,Mf.fromRangeEnd(e)).isNone();return!dM(t,e)&&n&&r},gM=function(t){return t.setContent(""),t.selection.setCursorLocation(),!0},hM=function(t){var e=wn.fromDom(t.getBody()),n=t.selection.getRng();return mM(e,n)?gM(t):lM(e,t.selection)},pM=function(t,e){return!t.selection.isCollapsed()&&hM(t)},vM=io,bM=ao,yM=function(t,e,n,r,o){return W.from(e._selectionOverrides.showCaret(t,n,r,o))},wM=function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e},xM=function(t,e){var n=t.fire("BeforeObjectSelected",{target:e});return n.isDefaultPrevented()?W.none():W.some(wM(e))},CM=function(t,e,n){var r=pg(1,t.getBody(),e),o=Mf.fromRangeStart(r),i=o.getNode();if(Xm(i))return yM(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Xm(a))return yM(1,t,a,!1,!1);var u=t.dom.getParent(o.getNode(),(function(t){return bM(t)||vM(t)}));return Xm(u)?yM(1,t,u,!1,n):W.none()},SM=function(t,e,n){return e.collapsed?CM(t,e,n).getOr(e):e},kM=function(t){return kw(t)||ww(t)},TM=function(t){return Tw(t)||xw(t)},OM=function(t,e){Qr(e)&&0===e.data.length&&t.remove(e)},_M=function(t,e,n,r,o,i){return yM(r,t,i.getNode(!o),o,!0).each((function(n){if(e.collapsed){var r=e.cloneRange();o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()}else e.deleteContents();t.selection.setRng(n)})),OM(t.dom,n),!0},EM=function(t,e){var n=t.selection.getRng();if(!Qr(n.commonAncestorContainer))return!1;var r=e?Nf.Forwards:Nf.Backwards,o=Bg(t.getBody()),i=R(xg,e?o.next:o.prev),a=e?kM:TM,u=bg(r,t.getBody(),n),c=zD(e,i(u));if(!c||!Cg(u,c))return!1;if(a(c))return _M(t,n,u.getNode(),r,e,c);var s=i(c);return!!(s&&a(s)&&Cg(c,s))&&_M(t,n,u.getNode(),r,e,s)},AM=function(t,e){return EM(t,e)},DM=function(t){return ia(wn.fromDom(t))||ra(wn.fromDom(t))},MM=ti.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),NM=function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return Ur(n)&&n.getAttribute("data-mce-caret")===r},RM=function(t,e,n,r){var o=function(e){return Qi(wn.fromDom(e))&&!sg(n,r,t)};return vg(!e,n).fold((function(){return vg(e,r).fold(L,o)}),o)},zM=function(t,e,n,r){var o=r.getNode(!1===e);return HD(wn.fromDom(t),wn.fromDom(n.getNode())).map((function(t){return nu(t)?MM.remove(t.dom):MM.moveToElement(o)})).orThunk((function(){return W.some(MM.moveToElement(o))}))},BM=function(t,e,n){return Ug(e,t,n).bind((function(r){return DM(r.getNode())||RM(t,e,n,r)?W.none():e&&ao(r.getNode())||!1===e&&ao(r.getNode(!0))?zM(t,e,n,r):e&&Tw(n)||!1===e&&kw(n)?W.some(MM.moveToPosition(r)):W.none()}))},PM=function(t,e){return t&&ao(e.nextSibling)?W.some(MM.moveToElement(e.nextSibling)):!1===t&&ao(e.previousSibling)?W.some(MM.moveToElement(e.previousSibling)):W.none()},IM=function(t,e,n){return n.fold((function(t){return W.some(MM.remove(t))}),(function(t){return W.some(MM.moveToElement(t))}),(function(n){return sg(e,n,t)?W.none():W.some(MM.moveToPosition(n))}))},LM=function(t,e,n){return NM(e,n)?PM(e,n.getNode(!1===e)).fold((function(){return BM(t,e,n)}),W.some):BM(t,e,n).bind((function(e){return IM(t,n,e)}))},HM=function(t,e,n){var r=pg(e?1:-1,t,n),o=Mf.fromRangeStart(r),i=wn.fromDom(t);return!1===e&&Tw(o)?W.some(MM.remove(o.getNode(!0))):e&&kw(o)?W.some(MM.remove(o.getNode())):!1===e&&kw(o)&&$w(i,o)?qw(i,o).map((function(t){return MM.remove(t.getNode())})):e&&Tw(o)&&Ww(i,o)?Gw(i,o).map((function(t){return MM.remove(t.getNode())})):LM(t,e,o)},FM=function(t,e){return function(n){return t._selectionOverrides.hideFakeCaret(),Hx(t,e,wn.fromDom(n)),!0}},VM=function(t,e){return function(n){var r=e?Mf.before(n):Mf.after(n);return t.selection.setRng(r.toRange()),!0}},jM=function(t){return function(e){return t.selection.setRng(e.toRange()),!0}},UM=function(t,e){return W.from(Ip(t.getBody(),e))},WM=function(t,e){var n=t.selection.getNode();return UM(t,n).filter(ao).fold((function(){return HM(t.getBody(),e,t.selection.getRng()).exists((function(n){return n.fold(FM(t,e),VM(t,e),jM(t))}))}),H)},$M=function(t){Q(Tl(t,".mce-offscreen-selection"),Or)},qM=function(t,e){var n=t.selection.getNode();if(ao(n)&&!uo(n)){var r=UM(t,n.parentNode).filter(ao);return r.fold((function(){return $M(wn.fromDom(t.getBody())),Hx(t,e,wn.fromDom(t.selection.getNode())),VD(t),!0}),H)}return!1},GM=function(t){var e=t.dom,n=t.selection,r=Ip(t.getBody(),n.getNode());if(io(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Mf.before(o).toRange())}return!0},KM=function(t,e){return t.selection.isCollapsed()?WM(t,e):qM(t,e)},XM=function(t,e){var n=Mf.fromRangeStart(t.selection.getRng());return Ug(e,t.getBody(),n).filter((function(t){return e?bw(t):yw(t)})).bind((function(t){return W.from(lg(e?0:-1,t))})).exists((function(e){return t.selection.select(e),!0}))},YM=function(t,e){return!!t.selection.isCollapsed()&&XM(t,e)},JM=Qr,ZM=function(t){return JM(t)&&t.data[0]===da},QM=function(t){return JM(t)&&t.data[t.data.length-1]===da},tN=function(t){return t.ownerDocument.createTextNode(da)},eN=function(t){if(JM(t.previousSibling))return QM(t.previousSibling)||t.previousSibling.appendData(da),t.previousSibling;if(JM(t))return ZM(t)||t.insertData(0,da),t;var e=tN(t);return t.parentNode.insertBefore(e,t),e},nN=function(t){if(JM(t.nextSibling))return ZM(t.nextSibling)||t.nextSibling.insertData(0,da),t.nextSibling;if(JM(t))return QM(t)||t.appendData(da),t;var e=tN(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e},rN=function(t,e){return t?eN(e):nN(e)},oN=R(rN,!0),iN=R(rN,!1),aN=function(t,e){return Qr(t.container())?rN(e,t.container()):rN(e,t.getNode())},uN=function(t,e){var n=e.get();return n&&t.container()===n&&ba(n)},cN=function(t,e){return e.fold((function(e){Hm(t.get());var n=oN(e);return t.set(n),W.some(Mf(n,n.length-1))}),(function(e){return Xg(e).map((function(e){if(uN(e,t))return Mf(t.get(),1);Hm(t.get());var n=aN(e,!0);return t.set(n),Mf(n,1)}))}),(function(e){return Yg(e).map((function(e){if(uN(e,t))return Mf(t.get(),t.get().length-1);Hm(t.get());var n=aN(e,!1);return t.set(n),Mf(n,n.length-1)}))}),(function(e){Hm(t.get());var n=iN(e);return t.set(n),W.some(Mf(n,1))}))},sN=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].apply(null,e);if(r.isSome())return r}return W.none()},lN=ti.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),fN=function(t,e){var n=cg(e,t);return n||t},dN=function(t,e,n){var r=BD(n),o=fN(e,r.container());return MD(t,o,r).fold((function(){return Gg(o,r).bind(R(MD,t,o)).map((function(t){return lN.before(t)}))}),W.none)},mN=function(t,e){return null===Qg(t,e)},gN=function(t,e,n){return MD(t,e,n).filter(R(mN,e))},hN=function(t,e,n){var r=PD(n);return gN(t,e,r).bind((function(t){var e=Kg(t,r);return e.isNone()?W.some(lN.start(t)):W.none()}))},pN=function(t,e,n){var r=BD(n);return gN(t,e,r).bind((function(t){var e=Gg(t,r);return e.isNone()?W.some(lN.end(t)):W.none()}))},vN=function(t,e,n){var r=PD(n),o=fN(e,r.container());return MD(t,o,r).fold((function(){return Kg(o,r).bind(R(MD,t,o)).map((function(t){return lN.after(t)}))}),W.none)},bN=function(t){return!1===AD(wN(t))},yN=function(t,e,n){var r=sN([dN,hN,pN,vN],[t,e,n]);return r.filter(bN)},wN=function(t){return t.fold(M,M,M,M)},xN=function(t){return t.fold(D("before"),D("start"),D("end"),D("after"))},CN=function(t){return t.fold(lN.before,lN.before,lN.after,lN.after)},SN=function(t){return t.fold(lN.start,lN.start,lN.end,lN.end)},kN=function(t,e){return xN(t)===xN(e)&&wN(t)===wN(e)},TN=function(t,e,n,r,o,i){return fo(MD(e,n,r),MD(e,n,o),(function(e,r){return e!==r&&ND(n,e,r)?lN.after(t?e:r):i})).getOr(i)},ON=function(t,e){return t.fold(H,(function(t){return!kN(t,e)}))},_N=function(t,e,n,r,o){var i=zD(t,o),a=Ug(t,n,i).map(R(zD,t)),u=a.fold((function(){return r.map(CN)}),(function(o){return yN(e,n,o).map(R(TN,t,e,n,i,o)).filter(R(ON,r))}));return u.filter(bN)},EN=function(t,e){return t?e.fold(E(W.some,lN.start),W.none,E(W.some,lN.after),W.none):e.fold(W.none,E(W.some,lN.before),W.none,E(W.some,lN.end))},AN=function(t,e,n,r){var o=zD(t,r),i=yN(e,n,o);return yN(e,n,o).bind(R(EN,t)).orThunk((function(){return _N(t,e,n,i,r)}))};R(AN,!1),R(AN,!0);var DN,MN=function(t){return T(t.selection.getSel().modify)},NN=function(t,e,n){var r=t?1:-1;return e.setRng(Mf(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0},RN=function(t,e){var n=e.selection.getRng(),r=t?Mf.fromRangeEnd(n):Mf.fromRangeStart(n);return!!MN(e)&&(t&&Ca(r)?NN(!0,e.selection,r):!(t||!Sa(r))&&NN(!1,e.selection,r))};(function(t){t[t["Br"]=0]="Br",t[t["Block"]=1]="Block",t[t["Wrap"]=2]="Wrap",t[t["Eol"]=3]="Eol"})(DN||(DN={}));var zN,BN=function(t,e){return t===Nf.Backwards?ft(e):e},PN=function(t,e,n){return t===Nf.Forwards?e.next(n):e.prev(n)},IN=function(t,e,n,r){return ro(r.getNode(e===Nf.Forwards))?DN.Br:!1===sg(n,r)?DN.Block:DN.Wrap},LN=function(t,e,n,r){var o=Bg(n),i=r,a=[];while(i){var u=PN(e,o,i);if(!u)break;if(ro(u.getNode(!1)))return e===Nf.Forwards?{positions:BN(e,a).concat([u]),breakType:DN.Br,breakAt:W.some(u)}:{positions:BN(e,a),breakType:DN.Br,breakAt:W.some(u)};if(u.isVisible()){if(t(i,u)){var c=IN(n,e,i,u);return{positions:BN(e,a),breakType:c,breakAt:W.some(u)}}a.push(u),i=u}else i=u}return{positions:BN(e,a),breakType:DN.Eol,breakAt:W.none()}},HN=function(t,e,n,r){return e(n,r).breakAt.map((function(r){var o=e(n,r).positions;return t===Nf.Backwards?o.concat(r):[r].concat(o)})).getOr([])},FN=function(t,e){return ot(t,(function(t,n){return t.fold((function(){return W.some(n)}),(function(r){return fo(pt(r.getClientRects()),pt(n.getClientRects()),(function(t,o){var i=Math.abs(e-t.left),a=Math.abs(e-o.left);return a<=i?n:r})).or(t)}))}),W.none())},VN=function(t,e){return pt(e.getClientRects()).bind((function(e){return FN(t,e.left)}))},jN=R(LN,Mf.isAbove,-1),UN=R(LN,Mf.isBelow,1),WN=R(HN,-1,jN),$N=R(HN,1,UN),qN=function(t,e){return jN(t,e).breakAt.isNone()},GN=function(t,e){return UN(t,e).breakAt.isNone()},KN=function(t){return Xg(t).map((function(e){return[e].concat(UN(t,e).positions)})).getOr([])},XN=function(t){return Yg(t).map((function(e){return jN(t,e).positions.concat(e)})).getOr([])},YN=function(t){var e=function(e){return Z(e,(function(e){var n=Xl(e);return n.node=t,n}))};if(Ur(t))return e(t.getClientRects());if(Qr(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}},JN=function(t){return st(t,YN)};(function(t){t[t["Up"]=-1]="Up",t[t["Down"]=1]="Down"})(zN||(zN={}));var ZN,QN,tR=function(t,e,n,r){while(r=ug(r,t,$a,e))if(n(r))return},eR=function(t,e,n,r,o,i){var a=0,u=[],c=function(r){var i=JN([r]);-1===t&&(i=i.reverse());for(var c=0;c<i.length;c++){var l=i[c];if(!n(l,s)){if(u.length>0&&e(l,Ut(u))&&a++,l.line=a,o(l))return!0;u.push(l)}}},s=Ut(i.getClientRects());if(!s)return u;var l=i.getNode();return c(l),tR(t,r,c,l),u},nR=function(t,e){return e.line>t},rR=function(t,e){return e.line===t},oR=R(eR,zN.Up,Ql,tf),iR=R(eR,zN.Down,tf,Ql),aR=function(t,e,n,r){var o,i,a,u,c=Bg(e),s=[],l=0,f=function(t){return Ut(t.getClientRects())};1===t?(o=c.next,i=tf,a=Ql,u=Mf.after(r)):(o=c.prev,i=Ql,a=tf,u=Mf.before(r));var d=f(u);do{if(u.isVisible()){var m=f(u);if(!a(m,d)){s.length>0&&i(m,Ut(s))&&l++;var g=Xl(m);if(g.position=u,g.line=l,n(g))return s;s.push(g)}}}while(u=o(u));return s},uR=function(t){return function(e){return nR(t,e)}},cR=function(t){return function(e){return rR(t,e)}},sR=ao,lR=ug,fR=function(t,e){return Math.abs(t.left-e)},dR=function(t,e){return Math.abs(t.right-e)},mR=function(t,e){return t>=e.left&&t<=e.right},gR=function(t,e){return t>=e.top&&t<=e.bottom},hR=function(t){return Rt(t,"node")},pR=function(t,e,n){return void 0===n&&(n=H),Vt(t,(function(t,r){if(mR(e,r))return n(r)?r:t;if(mR(e,t))return n(t)?t:r;var o=Math.min(fR(t,e),dR(t,e)),i=Math.min(fR(r,e),dR(r,e));return i===o&&hR(r)&&sR(r.node)||i<o?r:t}))},vR=function(t,e,n,r,o){var i=lR(r,t,$a,e,!o);do{if(!i||n(i))return}while(i=lR(i,t,$a,e))},bR=function(t,e,n){void 0===n&&(n=!0);var r=[],o=function(t,n){var o=nt(JN([n]),(function(n){return!t(n,e)}));return r=r.concat(o),0===o.length};return r.push(e),vR(zN.Up,t,R(o,Ql),e.node,n),vR(zN.Down,t,R(o,tf),e.node,n),r},yR=function(t){return nt(bt(t.getElementsByTagName("*")),Ym)},wR=function(t,e){return{node:t.node,before:fR(t,e)<dR(t,e)}},xR=function(t,e,n){var r=JN(yR(t)),o=nt(r,R(gR,n)),i=function(t){return!Yr(t.node)&&!co(t.node)},a=pR(o,e,i);if(a){var u=i(a);if(a=pR(bR(t,a,u),e,i),a&&Ym(a.node))return wR(a,e)}return null},CR=function(t,e){t.selection.setRng(e),tb(t,t.selection.getRng())},SR=function(t,e,n){return W.some(SM(t,e,n))},kR=function(t,e,n,r,o,i){var a=e===Nf.Forwards,u=Bg(t.getBody()),c=R(xg,a?u.next:u.prev),s=a?r:o;if(!n.collapsed){var l=rf(n);if(i(l))return yM(e,t,l,e===Nf.Backwards,!1)}var f=bg(e,t.getBody(),n);if(s(f))return xM(t,f.getNode(!a));var d=zD(a,c(f)),m=Da(n);if(!d)return m?W.some(n):W.none();if(s(d))return yM(e,t,d.getNode(!a),a,!1);var g=c(d);return g&&s(g)&&Cg(d,g)?yM(e,t,g.getNode(!a),a,!1):m?SR(t,d.toRange(),!1):W.none()},TR=function(t,e,n,r,o,i){var a=bg(e,t.getBody(),n),u=Ut(a.getClientRects()),c=e===zN.Down;if(!u)return W.none();var s,l=c?iR:oR,f=l(t.getBody(),uR(1),a),d=nt(f,cR(1)),m=u.left,g=pR(d,m);if(g&&i(g.node)){var h=Math.abs(m-g.left),p=Math.abs(m-g.right);return yM(e,t,g.node,h<p,!1)}if(s=r(a)?a.getNode():o(a)?a.getNode(!0):rf(n),s){var v=aR(e,t.getBody(),uR(1),s),b=pR(nt(v,cR(1)),m);if(b)return SR(t,b.position.toRange(),!1);if(b=Ut(nt(v,cR(0))),b)return SR(t,b.position.toRange(),!1)}return 0===d.length?OR(t,c).filter(c?o:r).map((function(e){return SM(t,e.toRange(),!1)})):W.none()},OR=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Mf.fromRangeEnd(n),i=UN(r,o);return vt(i.positions)}o=Mf.fromRangeStart(n),i=jN(r,o);return pt(i.positions)},_R=function(t,e,n){return OR(t,e).filter(n).exists((function(e){return t.selection.setRng(e.toRange()),!0}))},ER=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},AR=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},DR=function(t,e,n){return cN(e,n).map((function(e){return ER(t,e),n}))},MR=function(t,e,n){var r=t.getBody(),o=Mf.fromRangeStart(t.selection.getRng()),i=R(ED,t),a=AN(n,i,r,o);return a.bind((function(n){return DR(t,e,n)}))},NR=function(t,e,n){var r=Z(Tl(wn.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=nt(r,t),i=nt(n,t);Q(dt(o,i),R(AR,!1)),Q(dt(i,o),R(AR,!0))},RR=function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=Mf.fromRangeStart(t.selection.getRng());Mf.isTextPosition(n)&&!1===RD(n)&&(ER(t,Lm(e.get(),n)),e.set(null))}},zR=function(t,e,n,r){if(e.selection.isCollapsed()){var o=nt(r,t);Q(o,(function(r){var o=Mf.fromRangeStart(e.selection.getRng());yN(t,e.getBody(),o).bind((function(t){return DR(e,n,t)}))}))}},BR=function(t,e,n){return!!om(t)&&MR(t,e,n).isSome()},PR=function(t,e,n){return!!om(e)&&RN(t,e)},IR=function(t){var e=Ks(null),n=R(ED,t);return t.on("NodeChange",(function(r){!om(t)||tn.browser.isIE()&&r.initial||(NR(n,t.dom,r.parents),RR(t,e),zR(n,t,e,r.parents))})),e},LR=R(PR,!0),HR=R(PR,!1),FR=function(t,e,n){if(om(t)){var r=OR(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Mf.fromRangeEnd(n):Mf.fromRangeStart(n)}));return yN(R(ED,t),t.getBody(),r).exists((function(e){var r=CN(e);return cN(n,r).exists((function(e){return ER(t,e),!0}))}))}return!1},VR=function(t,e){var n=document.createRange();return n.setStart(t.container(),t.offset()),n.setEnd(e.container(),e.offset()),n},jR=function(t){return fo(Xg(t),Yg(t),(function(e,n){var r=zD(!0,e),o=zD(!1,n);return Gg(t,r).forall((function(t){return t.isEqual(o)}))})).getOr(!0)},UR=function(t,e){return function(n){return cN(e,n).exists((function(e){return ER(t,e),!0}))}},WR=function(t,e,n,r){var o=t.getBody(),i=R(ED,t);t.undoManager.ignore((function(){t.selection.setRng(VR(n,r)),t.execCommand("Delete"),yN(i,o,Mf.fromRangeStart(t.selection.getRng())).map(SN).map(UR(t,e))})),t.nodeChanged()},$R=function(t,e){var n=cg(e,t);return n||t},qR=function(t,e,n,r){var o=$R(t.getBody(),r.container()),i=R(ED,t),a=yN(i,o,r);return a.bind((function(t){return n?t.fold(D(W.some(SN(t))),W.none,D(W.some(CN(t))),W.none):t.fold(W.none,D(W.some(CN(t))),W.none,D(W.some(SN(t))))})).map(UR(t,e)).getOrThunk((function(){var u=Wg(n,o,r),c=u.bind((function(t){return yN(i,o,t)}));return fo(a,c,(function(){return MD(i,o,r).exists((function(e){return!!jR(e)&&(Hx(t,n,wn.fromDom(e)),!0)}))})).orThunk((function(){return c.bind((function(o){return u.map((function(o){return n?WR(t,e,r,o):WR(t,e,o,r),!0}))}))})).getOr(!1)}))},GR=function(t,e,n){if(t.selection.isCollapsed()&&om(t)){var r=Mf.fromRangeStart(t.selection.getRng());return qR(t,e,n,r)}return!1},KR=function(t,e){var n=Rw(e,t);return ut(n,Ji).fold(D(n),(function(t){return n.slice(0,t)}))},XR=function(t){return 1===ur(t)},YR=function(t,e,n,r){var o=R(lk,e),i=Z(nt(r,o),(function(t){return t.dom}));if(0===i.length)Hx(e,t,n);else{var a=sk(n.dom,i);e.selection.setRng(a.toRange())}},JR=function(t,e){var n=wn.fromDom(t.getBody()),r=wn.fromDom(t.selection.getStart()),o=nt(KR(n,r),XR);return vt(o).exists((function(n){var r=Mf.fromRangeStart(t.selection.getRng());return!(!jD(e,r,n.dom)||fk(n))&&(YR(e,t,n,o),!0)}))},ZR=function(t,e){return!!t.selection.isCollapsed()&&JR(t,e)},QR=function(t,e,n){return t._selectionOverrides.hideFakeCaret(),Hx(t,e,wn.fromDom(n)),!0},tz=function(t,e){var n=e?ww:xw,r=e?Nf.Forwards:Nf.Backwards,o=bg(r,t.getBody(),t.selection.getRng());return n(o)?QR(t,e,o.getNode(!e)):W.from(zD(e,o)).filter((function(t){return n(t)&&Cg(o,t)})).exists((function(n){return QR(t,e,n.getNode(!e))}))},ez=function(t,e){var n=t.selection.getNode();return!!co(n)&&QR(t,e,n)},nz=function(t,e){return t.selection.isCollapsed()?tz(t,e):ez(t,e)},rz=function(t){return Si(t,(function(t){return io(t.dom)||ao(t.dom)})).exists((function(t){return io(t.dom)}))},oz=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},iz=function(t,e){var n=t||Zi(e)?"margin":"padding",r="rtl"===Oo(e,"direction")?"-right":"-left";return n+r},az=function(t,e,n,r,o,i){var a=iz(n,wn.fromDom(i));if("outdent"===e){var u=Math.max(0,oz(i.style[a])-r);t.setStyle(i,a,u?u+o:"")}else{u=oz(i.style[a])+r+o;t.setStyle(i,a,u)}},uz=function(t,e){return lt(e,(function(e){var n=iz($d(t),e),r=Eo(e,n).map(oz).getOr(0),o=t.dom.getContentEditable(e.dom);return"false"!==o&&r>0}))},cz=function(t){var e=fz(t);return!t.mode.isReadOnly()&&(e.length>1||uz(t,e))},sz=function(t){return na(t)||ra(t)},lz=function(t){return Yn(t).exists(sz)},fz=function(t){return nt(Fl(t.selection.getSelectedBlocks()),(function(t){return!sz(t)&&!lz(t)&&rz(t)}))},dz=function(t,e){var n=t.dom,r=t.selection,o=t.formatter,i=qd(t),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=$d(t),s=Sd(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),Q(fz(t),(function(t){az(n,e,c,u,a,t.dom)}))},mz=function(t,e){if(t.selection.isCollapsed()&&cz(t)){var n=t.dom,r=t.selection.getRng(),o=Mf.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Lw(wn.fromDom(i),o))return dz(t,"outdent"),!0}return!1},gz=function(t,e){t.getDoc().execCommand(e,!1,null)},hz=function(t,e){mz(t)||KM(t,!1)||AM(t,!1)||GR(t,e,!1)||sM(t,!1)||BC(t)||YM(t,!1)||nz(t,!1)||pM(t)||ZR(t,!1)||(gz(t,"Delete"),VD(t))},pz=function(t,e){KM(t,!0)||AM(t,!0)||GR(t,e,!0)||sM(t,!0)||BC(t)||YM(t,!0)||nz(t,!0)||pM(t)||ZR(t,!0)||gz(t,"ForwardDelete")},vz=function(t,e){t.addCommand("delete",(function(){hz(t,e)})),t.addCommand("forwardDelete",(function(){pz(t,e)}))},bz=5,yz=400,wz=function(t){return void 0===t.touches||1!==t.touches.length?W.none():W.some(t.touches[0])},xz=function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>bz||r>bz},Cz=function(t){var e=ll(),n=Ks(!1),r=dl((function(e){t.fire("longpress",Wt(Wt({},e),{type:"longpress"})),n.set(!0)}),yz);t.on("touchstart",(function(t){wz(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.throttle(t),n.set(!1),e.set(i)}))}),!0),t.on("touchmove",(function(o){r.cancel(),wz(o).each((function(r){e.on((function(o){xz(r,o)&&(e.clear(),n.set(!1),t.fire("longpresscancel"))}))}))}),!0),t.on("touchend touchcancel",(function(o){r.cancel(),"touchcancel"!==o.type&&e.get().filter((function(t){return t.target.isEqualNode(o.target)})).each((function(){n.get()?o.preventDefault():t.fire("tap",Wt(Wt({},o),{type:"tap"}))}))}),!0)},Sz=function(t,e){return Nt(t,e.nodeName)},kz=function(t,e){return!!Qr(e)||!!Ur(e)&&(!Sz(t,e)&&!wh(e))},Tz=function(t,e,n){return J(Nw(wn.fromDom(n),wn.fromDom(e)),(function(e){return Sz(t,e.dom)}))},Oz=function(t,e){if(Qr(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||Sz(t,e.nextSibling)))return!0}return!1},_z=function(t){var e,n,r,o=t.dom,i=t.selection,a=t.schema,u=a.getBlockElements(),c=i.getStart(),s=t.getBody(),l=Sd(t);if(c&&Ur(c)&&l){var f=s.nodeName.toLowerCase();if(a.isValidChild(f,l.toLowerCase())&&!Tz(u,s,c)){var d=i.getRng(),m=d.startContainer,g=d.startOffset,h=d.endContainer,p=d.endOffset,v=ly(t);c=s.firstChild;while(c)if(kz(u,c)){if(Oz(u,c)){n=c,c=c.nextSibling,o.remove(n);continue}e||(e=o.create(l,kd(t)),c.parentNode.insertBefore(e,c),r=!0),n=c,c=c.nextSibling,e.appendChild(n)}else e=null,c=c.nextSibling;r&&v&&(d.setStart(m,g),d.setEnd(h,p),i.setRng(d),t.nodeChanged())}}},Ez=function(t){Sd(t)&&t.on("NodeChange",R(_z,t))},Az=function(t){return _i(wn.fromDom(t.getBody()),"*[data-mce-caret]").map((function(t){return t.dom})).getOrNull()},Dz=function(t){t.selection.setRng(t.selection.getRng())},Mz=function(t,e){e.hasAttribute("data-mce-caret")&&(Aa(e),Dz(t),t.selection.scrollIntoView(e))},Nz=function(t,e){var n=Az(t);if(n)return"compositionstart"===e.type?(e.preventDefault(),e.stopPropagation(),void Mz(t,n)):void(wa(n)&&(Mz(t,n),t.undoManager.add()))},Rz=function(t){t.on("keyup compositionstart",R(Nz,t))},zz=ao,Bz=function(t,e,n){return kR(e,t,n,kw,Tw,zz)},Pz=function(t,e,n){var r=function(t){return kw(t)||Cw(t)},o=function(t){return Tw(t)||Sw(t)};return TR(e,t,n,r,o,zz)},Iz=function(t){var e=t.dom.create(Sd(t));return(!tn.ie||tn.ie>=11)&&(e.innerHTML='<br data-mce-bogus="1">'),e},Lz=function(t,e,n){var r=Bg(t.getBody()),o=R(xg,1===e?r.next:r.prev);if(n.collapsed&&pm(t)){var i=t.dom.getParent(n.startContainer,"PRE");if(!i)return;var a=o(Mf.fromRangeStart(n));if(!a){var u=Iz(t);1===e?t.$(i).after(u):t.$(i).before(u),t.selection.select(u,!0),t.selection.collapse()}}},Hz=function(t,e){var n=e?Nf.Forwards:Nf.Backwards,r=t.selection.getRng();return Bz(n,t,r).orThunk((function(){return Lz(t,n,r),W.none()}))},Fz=function(t,e){var n=e?1:-1,r=t.selection.getRng();return Pz(n,t,r).orThunk((function(){return Lz(t,n,r),W.none()}))},Vz=function(t,e){return Hz(t,e).exists((function(e){return CR(t,e),!0}))},jz=function(t,e){return Fz(t,e).exists((function(e){return CR(t,e),!0}))},Uz=function(t,e){var n=e?Tw:kw;return _R(t,e,n)},Wz=function(t){return Y(["figcaption"],In(t))},$z=function(t){var e=document.createRange();return e.setStartBefore(t.dom),e.setEndBefore(t.dom),e},qz=function(t,e,n){n?xr(t,e):wr(t,e)},Gz=function(t,e){var n=wn.fromTag("br");return qz(t,n,e),$z(n)},Kz=function(t,e,n,r){var o=wn.fromTag(n),i=wn.fromTag("br");return bo(o,r),xr(o,i),qz(t,o,e),$z(i)},Xz=function(t,e,n,r){return""===e?Gz(t,r):Kz(t,r,e,n)},Yz=function(t,e){var n=R(Rn,e);return Si(wn.fromDom(t.container()),Ji,n).filter(Wz)},Jz=function(t,e,n){return e?GN(t.dom,n):qN(t.dom,n)},Zz=function(t,e){var n=wn.fromDom(t.getBody()),r=Mf.fromRangeStart(t.selection.getRng()),o=Sd(t),i=kd(t);return Yz(r,n).exists((function(){if(Jz(n,e,r)){var a=Xz(n,o,i,e);return t.selection.setRng(a),!0}return!1}))},Qz=function(t,e){return!!t.selection.isCollapsed()&&Zz(t,e)},tB=function(t){return Z(t,(function(t){return Wt({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:_},t)}))},eB=function(t,e){return e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey},nB=function(t,e){return st(tB(t),(function(t){return eB(t,e)?[t]:[]}))},rB=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(null,e)}},oB=function(t,e){return at(nB(t,e),(function(t){return t.action()}))},iB=function(t,e){var n=e?Nf.Forwards:Nf.Backwards,r=t.selection.getRng();return kR(t,n,r,ww,xw,co).exists((function(e){return CR(t,e),!0}))},aB=function(t,e){var n=e?1:-1,r=t.selection.getRng();return TR(t,n,r,ww,xw,co).exists((function(e){return CR(t,e),!0}))},uB=function(t,e){var n=e?xw:ww;return _R(t,e,n)},cB=function(t,e){return{left:t.left-e,top:t.top-e,right:t.right+2*e,bottom:t.bottom+2*e,width:t.width+e,height:t.height+e}},sB=function(t,e){return st(e,(function(e){var n=cB(Xl(e.getBoundingClientRect()),-1);return[{x:n.left,y:t(n),cell:e},{x:n.right,y:t(n),cell:e}]}))},lB=function(t,e,n){return ot(t,(function(t,r){return t.fold((function(){return W.some(r)}),(function(t){var o=Math.sqrt(Math.abs(t.x-e)+Math.abs(t.y-n)),i=Math.sqrt(Math.abs(r.x-e)+Math.abs(r.y-n));return W.some(i<o?r:t)}))}),W.none())},fB=function(t,e,n,r,o){var i=Tl(wn.fromDom(n),"td,th,caption").map((function(t){return t.dom})),a=nt(sB(t,i),(function(t){return e(t,o)}));return lB(a,r,o).map((function(t){return t.cell}))},dB=function(t){return t.bottom},mB=function(t){return t.top},gB=function(t,e){return t.y<e},hB=function(t,e){return t.y>e},pB=R(fB,dB,gB),vB=R(fB,mB,hB),bB=function(t,e){return pt(e.getClientRects()).bind((function(e){return pB(t,e.left,e.top)})).bind((function(t){return VN(XN(t),e)}))},yB=function(t,e){return vt(e.getClientRects()).bind((function(e){return vB(t,e.left,e.top)})).bind((function(t){return VN(KN(t),e)}))},wB=function(t,e,n){return n.breakAt.exists((function(n){return t(e,n).breakAt.isSome()}))},xB=function(t){return t.breakType===DN.Wrap&&0===t.positions.length},CB=function(t){return t.breakType===DN.Br&&1===t.positions.length},SB=function(t,e,n){var r=t(e,n);return xB(r)||!ro(n.getNode())&&CB(r)?!wB(t,e,r):r.breakAt.isNone()},kB=R(SB,jN),TB=R(SB,UN),OB=function(t,e,n){var r=Mf.fromRangeStart(e);return qg(!t,n).exists((function(t){return t.isEqual(r)}))},_B=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Km()||!OB(e,o,n))&&(yM(i,t,n,!e,!1).each((function(e){CR(t,e)})),!0)},EB=function(t,e,n){return bB(e,n).orThunk((function(){return pt(n.getClientRects()).bind((function(n){return FN(WN(t,Mf.before(e)),n.left)}))})).getOr(Mf.before(e))},AB=function(t,e,n){return yB(e,n).orThunk((function(){return pt(n.getClientRects()).bind((function(n){return FN($N(t,Mf.after(e)),n.left)}))})).getOr(Mf.after(e))},DB=function(t,e){var n=e.getNode(t);return Ur(n)&&"TABLE"===n.nodeName?W.some(n):W.none()},MB=function(t,e,n,r){var o=Sd(e);o?e.undoManager.transact((function(){var r=wn.fromTag(o);bo(r,kd(e)),xr(r,wn.fromTag("br")),t?yr(wn.fromDom(n),r):br(wn.fromDom(n),r);var i=e.dom.createRng();i.setStart(r.dom,0),i.setEnd(r.dom,0),CR(e,i)})):CR(e,r.toRange())},NB=function(t,e,n){var r=DB(!!e,n),o=!1===e;r.fold((function(){return CR(t,n.toRange())}),(function(r){return qg(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return CR(t,n.toRange())}),(function(o){return MB(e,t,r,n)}))}))},RB=function(t,e,n,r){var o=t.selection.getRng(),i=Mf.fromRangeStart(o),a=t.getBody();if(!e&&kB(r,i)){var u=EB(a,n,i);return NB(t,e,u),!0}if(e&&TB(r,i)){u=AB(a,n,i);return NB(t,e,u),!0}return!1},zB=function(t,e,n){return W.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(r){return W.from(t.dom.getParent(r,"table")).map((function(o){return n(t,e,o,r)}))})).getOr(!1)},BB=function(t,e){return zB(t,e,_B)},PB=function(t,e){return zB(t,e,RB)},IB=function(t,e,n){var r=$e().os;oB([{keyCode:Qp.RIGHT,action:rB(Vz,t,!0)},{keyCode:Qp.LEFT,action:rB(Vz,t,!1)},{keyCode:Qp.UP,action:rB(jz,t,!1)},{keyCode:Qp.DOWN,action:rB(jz,t,!0)},{keyCode:Qp.RIGHT,action:rB(BB,t,!0)},{keyCode:Qp.LEFT,action:rB(BB,t,!1)},{keyCode:Qp.UP,action:rB(PB,t,!1)},{keyCode:Qp.DOWN,action:rB(PB,t,!0)},{keyCode:Qp.RIGHT,action:rB(iB,t,!0)},{keyCode:Qp.LEFT,action:rB(iB,t,!1)},{keyCode:Qp.UP,action:rB(aB,t,!1)},{keyCode:Qp.DOWN,action:rB(aB,t,!0)},{keyCode:Qp.RIGHT,action:rB(BR,t,e,!0)},{keyCode:Qp.LEFT,action:rB(BR,t,e,!1)},{keyCode:Qp.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:rB(LR,t,e)},{keyCode:Qp.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:rB(HR,t,e)},{keyCode:Qp.UP,action:rB(Qz,t,!1)},{keyCode:Qp.DOWN,action:rB(Qz,t,!0)}],n).each((function(t){n.preventDefault()}))},LB=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&IB(t,e,n)}))},HB=function(t,e,n){oB([{keyCode:Qp.BACKSPACE,action:rB(mz,t,!1)},{keyCode:Qp.BACKSPACE,action:rB(KM,t,!1)},{keyCode:Qp.DELETE,action:rB(KM,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(AM,t,!1)},{keyCode:Qp.DELETE,action:rB(AM,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(GR,t,e,!1)},{keyCode:Qp.DELETE,action:rB(GR,t,e,!0)},{keyCode:Qp.BACKSPACE,action:rB(BC,t,!1)},{keyCode:Qp.DELETE,action:rB(BC,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(YM,t,!1)},{keyCode:Qp.DELETE,action:rB(YM,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(nz,t,!1)},{keyCode:Qp.DELETE,action:rB(nz,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(pM,t,!1)},{keyCode:Qp.DELETE,action:rB(pM,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(sM,t,!1)},{keyCode:Qp.DELETE,action:rB(sM,t,!0)},{keyCode:Qp.BACKSPACE,action:rB(ZR,t,!1)},{keyCode:Qp.DELETE,action:rB(ZR,t,!0)}],n).each((function(t){n.preventDefault()}))},FB=function(t,e){oB([{keyCode:Qp.BACKSPACE,action:rB(GM,t)},{keyCode:Qp.DELETE,action:rB(GM,t)}],e)},VB=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&HB(t,e,n)})),t.on("keyup",(function(e){!1===e.isDefaultPrevented()&&FB(t,e)}))},jB=function(t){while(t){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}},UB=function(t,e){var n,r=e,o=t.dom,i=t.schema.getMoveCaretBeforeOnEnterElements();if(e){if(/^(LI|DT|DD)$/.test(e.nodeName)){var a=jB(e.firstChild);a&&/^(UL|OL|DL)$/.test(a.nodeName)&&e.insertBefore(o.doc.createTextNode(sa),e.firstChild)}var u=o.createRng();if(e.normalize(),e.hasChildNodes()){var c=new Fi(e,e);while(n=c.current()){if(Qr(n)){u.setStart(n,0),u.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}r=n,n=c.next()}n||(u.setStart(r,0),u.setEnd(r,0))}else ro(e)?e.nextSibling&&o.isBlock(e.nextSibling)?(u.setStartBefore(e),u.setEndBefore(e)):(u.setStartAfter(e),u.setEndAfter(e)):(u.setStart(e,0),u.setEnd(e,0));t.selection.setRng(u),tb(t,u)}},WB=function(t,e){var n,r,o=t.getRoot();n=e;while(n!==o&&"false"!==t.getContentEditable(n))"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},$B=function(t){return W.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},qB=function(t){return $B(t).fold(D(""),(function(t){return t.nodeName.toUpperCase()}))},GB=function(t){return $B(t).filter((function(t){return ra(wn.fromDom(t))})).isSome()},KB=function(t,e){return t.firstChild&&t.firstChild.nodeName===e},XB=function(t){var e;return(null===(e=t.parentNode)||void 0===e?void 0:e.firstChild)===t},YB=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},JB=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},ZB=function(t){return JB(t)&&JB(t.parentNode)},QB=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},tP=function(t,e,n){var r=t[n?"firstChild":"lastChild"];while(r){if(Ur(r))break;r=r[n?"nextSibling":"previousSibling"]}return r===e},eP=function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){ZB(n)&&(o="LI");var u=o?e(o):i.create("BR");if(tP(n,r,!0)&&tP(n,r,!1))if(YB(n,"LI")){var c=QB(n);i.insertAfter(u,c),XB(n)?i.remove(c):i.remove(n)}else i.replace(u,n);else if(tP(n,r,!0))YB(n,"LI")?(i.insertAfter(u,QB(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n),i.remove(r);else if(tP(n,r,!1))i.insertAfter(u,QB(n)),i.remove(r);else{n=QB(n);var s=a.cloneRange();s.setStartAfter(r),s.setEndAfter(n);var l=s.extractContents();"LI"===o&&KB(l,"LI")?(u=l.firstChild,i.insertAfter(l,n)):(i.insertAfter(l,n),i.insertAfter(u,n)),i.remove(r)}UB(t,u)}},nP=function(t){Q(kl(wn.fromDom(t),jn),(function(t){var e=t.dom;e.nodeValue=ga(e.nodeValue)}))},rP=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},oP=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},iP=function(t){t.innerHTML='<br data-mce-bogus="1">'},aP=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},uP=function(t,e){return e&&t.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==t.getContentEditable(e)},cP=function(t,e,n){var r,o=n,i=[];if(o){while(o=o.firstChild){if(t.isBlock(o))return;Ur(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}r=i.length;while(r--)o=i[r],(!o.hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||rP(t,o))&&t.remove(o)}},sP=function(t,e,n){return!1===Qr(e)?n:t?1===n&&e.data.charAt(n-1)===da?0:n:n===e.data.length-1&&e.data.charAt(n)===da?e.data.length:n},lP=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,sP(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,sP(!1,t.endContainer,t.endOffset)),e},fP=function(t){do{Qr(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)},dP=function(t,e){var n,r,o=t.getRoot();n=e;while(n!==o&&"false"!==t.getContentEditable(n))"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},mP=function(t,e,n){var r=t.dom;W.from(n.style).map(r.parseStyle).each((function(t){var n=Ao(wn.fromDom(e)),o=Wt(Wt({},n),t);r.setStyles(e,o)}));var o=W.from(n.class).map((function(t){return t.split(/\s+/)})),i=W.from(e.className).map((function(t){return nt(t.split(/\s+/),(function(t){return""!==t}))}));fo(o,i,(function(t,n){var o=nt(n,(function(e){return!Y(t,e)})),i=qt(qt([],t,!0),o,!0);r.setAttrib(e,"class",i.join(" "))}));var a=["style","class"],u=Et(n,(function(t,e){return!Y(a,e)}));r.setAttribs(e,u)},gP=function(t,e){var n=Sd(t);if(n&&n.toLowerCase()===e.tagName.toLowerCase()){var r=kd(t);mP(t,e,r)}},hP=function(t,e,n,r,o){var i,a,u,c,s,l,f=e||"P",d=t.dom,m=dP(d,r);if(a=d.getParent(r,d.isBlock),!a||!uP(d,a)){if(a=a||m,l=a===t.getBody()||oP(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),gP(t,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;c=r;while(c.parentNode!==a)c=c.parentNode;while(c&&!d.isBlock(c))u=c,c=c.previousSibling;if(u&&t.schema.isValidChild(l,f.toLowerCase())){i=d.create(f),gP(t,i),u.parentNode.insertBefore(i,u),c=u;while(c&&!d.isBlock(c))s=c.nextSibling,i.appendChild(c),c=s;n.setStart(r,o),n.setEnd(r,o)}}return r},pP=function(t,e){e.normalize();var n=e.lastChild;n&&!/^(left|right)$/gi.test(t.getStyle(n,"float",!0))||t.add(e,"br")},vP=function(t,e){var n,r,o,i,a,u,c,s,l,f,d=t.dom,m=t.schema,g=m.getNonEmptyElements(),h=t.selection.getRng(),p=function(e){var n,o,a,u=r,c=m.getTextInlineElements();if(n=e||"TABLE"===s||"HR"===s?d.create(e||l):i.cloneNode(!1),a=n,!1===_d(t))d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do{if(c[u.nodeName]){if(Zg(u)||wh(u))continue;o=u.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}}while((u=u.parentNode)&&u!==x);return gP(t,n),iP(a),n},v=function(t){var e,n,a=sP(t,r,o);if(Qr(r)&&(t?a>0:a<r.nodeValue.length))return!1;if(r.parentNode===i&&f&&!t)return!0;if(t&&Ur(r)&&r===i.firstChild)return!0;if(aP(r,"TABLE")||aP(r,"HR"))return f&&!t||!f&&t;var u=new Fi(r,i);Qr(r)&&(t&&0===a?u.prev():t||a!==r.nodeValue.length||u.next());while(e=u.current()){if(Ur(e)){if(!e.getAttribute("data-mce-bogus")&&(n=e.nodeName.toLowerCase(),g[n]&&"br"!==n))return!1}else if(Qr(e)&&!Ga(e.nodeValue))return!1;t?u.prev():u.next()}return!0},b=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==C?p(l):p(),Ed(t)&&uP(d,c)&&d.isEmpty(i)?a=d.split(c,i):d.insertAfter(a,i),UB(t,a)};yv(d,h).each((function(t){h.setStart(t.startContainer,t.startOffset),h.setEnd(t.endContainer,t.endOffset)})),r=h.startContainer,o=h.startOffset,l=Sd(t);var y=!(!e||!e.shiftKey),w=!(!e||!e.ctrlKey);Ur(r)&&r.hasChildNodes()&&(f=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=f&&Qr(r)?r.nodeValue.length:0);var x=dP(d,r);if(x){(l&&!y||!l&&y)&&(r=hP(t,l,h,r,o)),i=d.getParent(r,d.isBlock),c=i?d.getParent(i.parentNode,d.isBlock):null,s=i?i.nodeName.toUpperCase():"";var C=c?c.nodeName.toUpperCase():"";"LI"!==C||w||(i=c,c=c.parentNode,s=C),/^(LI|DT|DD)$/.test(s)&&d.isEmpty(i)?eP(t,p,c,i,l):l&&i===t.getBody()||(l=l||"P",va(i)?(a=Aa(i),d.isEmpty(i)&&iP(i),gP(t,a),UB(t,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(p(),i),UB(t,aP(i,"HR")?a:i)):(n=lP(h).cloneRange(),n.setEndAfter(i),u=n.extractContents(),nP(u),fP(u),a=u.firstChild,d.insertAfter(u,i),cP(d,g,a),pP(d,i),d.isEmpty(i)&&iP(i),a.normalize(),d.isEmpty(a)?(d.remove(a),b()):(gP(t,a),UB(t,a))),d.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},bP=function(t,e,n){var r,o=new Fi(e,n),i=t.getNonEmptyElements();while(r=o.next())if(i[r.nodeName.toLowerCase()]||r.length>0)return!0},yP=function(t,e,n){var r=t.dom.createRng();n?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)),t.selection.setRng(r),tb(t,r)},wP=function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();yv(i,a).each((function(t){a.setStart(t.startContainer,t.startOffset),a.setEnd(t.endContainer,t.endOffset)}));var u=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=u>c.childNodes.length-1;c=c.childNodes[Math.min(u,c.childNodes.length-1)]||c,u=s&&3===c.nodeType?c.nodeValue.length:0}var l=i.getParent(c,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!e||!e.ctrlKey);"LI"!==d||m||(l=f),c&&3===c.nodeType&&u>=c.nodeValue.length&&(bP(t.schema,c,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),Pf(i,a,n),yP(t,n,r),t.undoManager.add()},xP=function(t,e){var n=wn.fromTag("br");br(wn.fromDom(e),n),t.undoManager.add()},CP=function(t,e){kP(t.getBody(),e)||yr(wn.fromDom(e),wn.fromTag("br"));var n=wn.fromTag("br");yr(wn.fromDom(e),n),yP(t,n.dom,!1),t.undoManager.add()},SP=function(t){return ro(t.getNode())},kP=function(t,e){return!!SP(Mf.after(e))||Gg(t,Mf.after(e)).map((function(t){return ro(t.getNode())})).getOr(!1)},TP=function(t){return t&&"A"===t.nodeName&&"href"in t},OP=function(t){return t.fold(L,TP,TP,L)},_P=function(t){var e=R(ED,t),n=Mf.fromRangeStart(t.selection.getRng());return yN(e,t.getBody(),n).filter(OP)},EP=function(t,e){e.fold(_,R(xP,t),R(CP,t),_)},AP=function(t,e){var n=_P(t);n.isSome()?n.each(R(EP,t)):wP(t,e)},DP=function(t,e){return $B(t).filter((function(t){return e.length>0&&An(wn.fromDom(t),e)})).isSome()},MP=function(t){return DP(t,Td(t))},NP=function(t){return DP(t,Od(t))},RP=ti.generate([{br:[]},{block:[]},{none:[]}]),zP=function(t,e){return NP(t)},BP=function(t){return function(e,n){var r=""===Sd(e);return r===t}},PP=function(t){return function(e,n){return GB(e)===t}},IP=function(t,e){return function(n,r){var o=qB(n)===t.toUpperCase();return o===e}},LP=function(t){return IP("pre",t)},HP=function(){return IP("summary",!0)},FP=function(t){return function(e,n){return Cd(e)===t}},VP=function(t,e){return MP(t)},jP=function(t,e){return e},UP=function(t){var e=Sd(t),n=WB(t.dom,t.selection.getStart());return n&&t.schema.isValidChild(n.nodeName,e||"P")},WP=function(t,e){return function(n,r){var o=ot(t,(function(t,e){return t&&e(n,r)}),!0);return o?W.some(e):W.none()}},$P=function(t,e){return sN([WP([zP],RP.none()),WP([HP()],RP.br()),WP([LP(!0),FP(!1),jP],RP.br()),WP([LP(!0),FP(!1)],RP.block()),WP([LP(!0),FP(!0),jP],RP.block()),WP([LP(!0),FP(!0)],RP.br()),WP([PP(!0),jP],RP.br()),WP([PP(!0)],RP.block()),WP([BP(!0),jP,UP],RP.block()),WP([BP(!0)],RP.br()),WP([VP],RP.br()),WP([BP(!1),jP],RP.br()),WP([UP],RP.block())],[t,!(!e||!e.shiftKey)]).getOr(RP.none())},qP=function(t,e){$P(t,e).fold((function(){AP(t,e)}),(function(){vP(t,e)}),_)},GP=function(t,e){e.isDefaultPrevented()||(e.preventDefault(),wO(t.undoManager),t.undoManager.transact((function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),qP(t,e)})))},KP=function(t){t.on("keydown",(function(e){e.keyCode===Qp.ENTER&&GP(t,e)}))},XP=function(t,e,n){oB([{keyCode:Qp.END,action:rB(Uz,t,!0)},{keyCode:Qp.HOME,action:rB(Uz,t,!1)},{keyCode:Qp.END,action:rB(uB,t,!0)},{keyCode:Qp.HOME,action:rB(uB,t,!1)},{keyCode:Qp.END,action:rB(FR,t,!0,e)},{keyCode:Qp.HOME,action:rB(FR,t,!1,e)}],n).each((function(t){n.preventDefault()}))},YP=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&XP(t,e,n)}))},JP=$e().browser,ZP=function(t){var e=fl((function(){t.composing||hx(t)}),0);JP.isIE()&&(t.on("keypress",(function(t){e.throttle()})),t.on("remove",(function(t){e.cancel()})))},QP=function(t){ZP(t),t.on("input",(function(e){!1===e.isComposing&&hx(t)}))},tI=$e(),eI=function(t,e,n){oB([{keyCode:Qp.PAGE_UP,action:rB(FR,t,!1,e)},{keyCode:Qp.PAGE_DOWN,action:rB(FR,t,!0,e)}],n)},nI=function(t){return t.stopImmediatePropagation()},rI=function(t){return t.keyCode===Qp.PAGE_UP||t.keyCode===Qp.PAGE_DOWN},oI=function(t,e,n){n&&!t.get()?e.on("NodeChange",nI,!0):!n&&t.get()&&e.off("NodeChange",nI),t.set(n)},iI=function(t,e){if(!tI.os.isOSX()){var n=Ks(!1);t.on("keydown",(function(e){rI(e)&&oI(n,t,!0)})),t.on("keyup",(function(r){!1===r.isDefaultPrevented()&&eI(t,e,r),rI(r)&&n.get()&&(oI(n,t,!1),t.nodeChanged())}))}},aI=function(t,e){var n=e.container(),r=e.offset();return Qr(n)?(n.insertData(r,t),W.some(Mf(n,r+t.length))):yg(e).map((function(n){var r=wn.fromText(t);return e.isAtEnd()?yr(n,r):br(n,r),Mf(r.dom,t.length)}))},uI=R(aI,sa),cI=R(aI," "),sI=function(t){return function(e){return e.fold((function(e){return Kg(t.dom,Mf.before(e))}),(function(t){return Xg(t)}),(function(t){return Yg(t)}),(function(e){return Gg(t.dom,Mf.after(e))}))}},lI=function(t,e){return function(n){return rx(t,n)?uI(e):cI(e)}},fI=function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}},dI=function(t){var e=Mf.fromRangeStart(t.selection.getRng()),n=wn.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=R(ED,t),o=Mf.fromRangeStart(t.selection.getRng());return yN(r,t.getBody(),o).bind(sI(n)).bind(lI(n,e)).exists(fI(t))}return!1},mI=function(t,e){oB([{keyCode:Qp.SPACEBAR,action:rB(dI,t)}],e).each((function(t){e.preventDefault()}))},gI=function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&mI(t,e)}))},hI=function(t){var e=IR(t);return Rz(t),LB(t,e),VB(t,e),KP(t),gI(t),QP(t),YP(t,e),iI(t,e),e},pI=function(t){return PO(t)?Ks(null):hI(t)},vI=function(){function t(t){var e;this.lastPath=[],this.editor=t;var n=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",(function(n){var r=t.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&uv(o,e)||t.fire("SelectionChange"),e=o})),t.on("contextmenu",(function(){t.fire("SelectionChange")})),t.on("SelectionChange",(function(){var e=t.selection.getStart(!0);!e||!tn.range&&t.selection.isCollapsed()||Sp(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&Sp(t)&&("IMG"===t.selection.getNode().nodeName?Pi.setEditorTimeout(t,(function(){t.nodeChanged()})):t.nodeChanged())}))}return t.prototype.nodeChanged=function(t){var e,n,r,o=this.editor.selection;this.editor.initialized&&o&&!bm(this.editor)&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),e=o.getStart(!0)||r,e.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(e,r)||(e=r),n=[],this.editor.dom.getParent(e,(function(t){if(t===r)return!0;n.push(t)})),t=t||{},t.element=e,t.parents=n,this.editor.fire("NodeChange",t))},t.prototype.isSameElementPath=function(t){var e,n=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t);if(n.length===this.lastPath.length){for(e=n.length;e>=0;e--)if(n[e]!==this.lastPath[e])break;if(-1===e)return this.lastPath=n,!0}return this.lastPath=n,!1},t}(),bI=function(t){t.on("click",(function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}))},yI=function(t){t.parser.addNodeFilter("details",(function(t){Q(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){Q(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",v(e)?e:null),t.attr("data-mce-open",null)}))}))},wI=function(t){bI(t),yI(t)},xI=function(t){return Ur(t)&&ea(wn.fromDom(t))},CI=function(t){var e=t.selection.getRng(),n=Mf.fromRangeStart(e),r=Mf.fromRangeEnd(e);if(Mf.isElementPosition(n)){var o=n.container();xI(o)&&Xg(o).each((function(t){return e.setStart(t.container(),t.offset())}))}if(Mf.isElementPosition(r)){o=n.container();xI(o)&&Yg(o).each((function(t){return e.setEnd(t.container(),t.offset())}))}t.selection.setRng(LC(e))},SI=function(t){t.on("click",(function(e){e.detail>=3&&CI(t)}))},kI=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:e.top+o.pageYOffset-r.clientTop,left:e.left+o.pageXOffset-r.clientLeft}},TI=function(t){return t.inline?kI(t.getBody()):{left:0,top:0}},OI=function(t){var e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}},_I=function(t){var e=t.getBody(),n=t.getDoc().documentElement,r={left:e.scrollLeft,top:e.scrollTop},o={left:e.scrollLeft||n.scrollLeft,top:e.scrollTop||n.scrollTop};return t.inline?r:o},EI=function(t,e){if(e.target.ownerDocument!==t.getDoc()){var n=kI(t.getContentAreaContainer()),r=_I(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}return{left:e.pageX,top:e.pageY}},AI=function(t,e,n){return{pageX:n.left-t.left+e.left,pageY:n.top-t.top+e.top}},DI=function(t,e){return AI(TI(t),OI(t),EI(t,e))},MI=ao,NI=io,RI=function(t,e){return MI(e)&&e!==t},zI=function(t,e,n){return e!==n&&!t.dom.isChildOf(e,n)&&!MI(e)},BI=function(t){var e=t.cloneNode(!0);return e.removeAttribute("data-mce-selected"),e},PI=function(t,e,n,r){var o=t.dom,i=e.cloneNode(!0);o.setStyles(i,{width:n,height:r}),o.setAttrib(i,"data-mce-selected",null);var a=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),o.setStyles(i,{margin:0,boxSizing:"border-box"}),a.appendChild(i),a},II=function(t,e){t.parentNode!==e&&e.appendChild(t)},LI=function(t,e,n,r,o,i){var a=0,u=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>o&&(a=e.pageX+n-o),e.pageY+r>i&&(u=e.pageY+r-i),t.style.width=n-a+"px",t.style.height=r-u+"px"},HI=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},FI=function(t){return 0===t.button},VI=function(t,e){return{pageX:e.pageX-t.relX,pageY:e.pageY+5}},jI=function(t,e){return function(n){if(FI(n)){var r=at(e.dom.getParents(n.target),sf(MI,NI)).getOr(null);if(RI(e.getBody(),r)){var o=e.dom.getPos(r),i=e.getBody(),a=e.getDoc().documentElement;t.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(e.inline?i.scrollWidth:a.offsetWidth)-2,maxY:(e.inline?i.scrollHeight:a.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:r.offsetWidth,height:r.offsetHeight,ghost:PI(e,r,r.offsetWidth,r.offsetHeight)})}}}},UI=function(t,e){var n=Pi.throttle((function(t,n){e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t,n)}),0);return e.on("remove",n.stop),function(r){return t.on((function(t){var o=Math.max(Math.abs(r.screenX-t.screenX),Math.abs(r.screenY-t.screenY));if(!t.dragging&&o>10){var i=e.fire("dragstart",{target:t.element});if(i.isDefaultPrevented())return;t.dragging=!0,e.focus()}if(t.dragging){var a=VI(t,DI(e,r));II(t.ghost,e.getBody()),LI(t.ghost,a,t.width,t.height,t.maxX,t.maxY),n(r.clientX,r.clientY)}}))}},WI=function(t){var e=t.getSel().getRangeAt(0),n=e.startContainer;return 3===n.nodeType?n.parentNode:n},$I=function(t,e){return function(n){t.on((function(t){if(t.dragging){if(zI(e,WI(e.selection),t.element)){var r=BI(t.element),o=e.fire("drop",{clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||e.undoManager.transact((function(){HI(t.element),e.insertContent(e.dom.getOuterHTML(r)),e._selectionOverrides.hideFakeCaret()}))}e.fire("dragend")}})),GI(t)}},qI=function(t,e){return function(){t.on((function(t){t.dragging&&e.fire("dragend")})),GI(t)}},GI=function(t){t.on((function(t){HI(t.ghost)})),t.clear()},KI=function(t){var e=ll(),n=Hs.DOM,r=document,o=jI(e,t),i=UI(e,t),a=$I(e,t),u=qI(e,t);t.on("mousedown",o),t.on("mousemove",i),t.on("mouseup",a),n.bind(r,"mousemove",i),n.bind(r,"mouseup",u),t.on("remove",(function(){n.unbind(r,"mousemove",i),n.unbind(r,"mouseup",u)})),t.on("keydown",(function(t){t.keyCode===Qp.ESC&&u()}))},XI=function(t){t.on("drop",(function(e){var n="undefined"!==typeof e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(MI(n)||"false"===t.dom.getContentEditableParent(n))&&e.preventDefault()}))},YI=function(t){var e=function(e){if(!e.isDefaultPrevented()){var n=e.dataTransfer;n&&(Y(n.types,"Files")||n.files.length>0)&&(e.preventDefault(),"drop"===e.type&&RA(t,"Dropped file type is not supported"))}},n=function(n){Yb(t,n.target)&&e(n)},r=function(){var r=Hs.DOM,o=t.dom,i=document,a=t.inline?t.getBody():t.getDoc(),u=["drop","dragover"];Q(u,(function(t){r.bind(i,t,n),o.bind(a,t,e)})),t.on("remove",(function(){Q(u,(function(t){r.unbind(i,t,n),o.unbind(a,t,e)}))}))};t.on("init",(function(){Pi.setEditorTimeout(t,r,0)}))},JI=function(t){KI(t),XI(t),Sm(t)&&YI(t)},ZI=function(t){var e=fl((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=SM(t,e,!1);t.selection.setRng(n)}}}),0);t.on("focus",(function(){e.throttle()})),t.on("blur",(function(){e.cancel()}))},QI=function(t){t.on("init",(function(){t.on("focusin",(function(e){var n=e.target;if(co(n)){var r=Ip(t.getBody(),n),o=ao(r)?r:n;t.selection.getNode()!==o&&xM(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))},tL=io,eL=ao,nL=function(t,e){return Ip(t.getBody(),e)},rL=function(t){var e,n=t.selection,r=t.dom,o=r.isBlock,i=t.getBody(),a=Gm(t,i,o,(function(){return ly(t)})),u="sel-"+r.uniqueId(),c="data-mce-selected",s=function(t){return r.hasClass(t,"mce-offscreen-selection")},l=function(t){return t!==i&&(eL(t)||co(t))&&r.isChildOf(t,i)},f=function(t){return kw(t)||Tw(t)||ww(t)||xw(t)},d=function(){var t=r.get(u);return t?t.getElementsByTagName("*")[0]:t},m=function(t){t&&n.setRng(t)},g=n.getRng,h=function(e,r,o,i){void 0===i&&(i=!0);var u=t.fire("ShowCaret",{target:r,direction:e,before:o});return u.isDefaultPrevented()?null:(i&&n.scrollIntoView(r,-1===e),a.show(o,r))},p=function(t){t.hasAttribute("data-mce-caret")&&(Aa(t),m(g()),n.scrollIntoView(t))},v=function(){t.on("mouseup",(function(e){var n=g();n.collapsed&&SA(t,e.clientX,e.clientY)&&CM(t,n,!1).each(m)})),t.on("click",(function(e){var o=nL(t,e.target);o&&(eL(o)&&(e.preventDefault(),t.focus()),tL(o)&&r.isChildOf(o,n.getNode())&&T())})),t.on("blur NewBlock",T),t.on("ResizeWindow FullscreenStateChanged",a.reposition);var u=function(t){var e=t.firstChild;if(S(e))return!1;var n=Mf.before(e);if(ro(n.getNode())&&1===t.childNodes.length)return!f(n);var r=Bg(t),o=r.next(n);return o&&!f(o)},c=function(t,e){var n=r.getParent(t,o),i=r.getParent(e,o);return n===i},p=function(e,n){var i=r.getParent(e,o),a=r.getParent(n,o);return!S(i)&&(!(e===a||!r.isChildOf(i,a)||!1!==eL(nL(t,i)))||!r.isChildOf(a,i)&&!c(i,a)&&u(i))};t.on("tap",(function(e){var n=e.target,r=nL(t,n);eL(r)?(e.preventDefault(),xM(t,r).each(k)):l(n)&&xM(t,n).each(k)}),!0),t.on("mousedown",(function(e){var o=e.target;if((o===i||"HTML"===o.nodeName||r.isChildOf(o,i))&&!1!==SA(t,e.clientX,e.clientY)){var a=nL(t,o);if(a)eL(a)?(e.preventDefault(),xM(t,a).each(k)):(T(),tL(a)&&e.shiftKey||Lp(e.clientX,e.clientY,n.getRng())||(_(),n.placeCaretAt(e.clientX,e.clientY)));else if(l(o))xM(t,o).each(k);else if(!1===Ym(o)){T(),_();var u=xR(i,e.clientX,e.clientY);if(u&&!p(o,u.node)){e.preventDefault();var c=h(1,u.node,u.before,!1);m(c),t.getBody().focus()}}}})),t.on("keypress",(function(t){Qp.modifierPressed(t)||eL(n.getNode())&&t.preventDefault()})),t.on("GetSelectionRange",(function(t){var n=t.range;if(e){if(!e.parentNode)return void(e=null);n=n.cloneRange(),n.selectNode(e),t.range=n}})),t.on("SetSelectionRange",(function(t){t.range=w(t.range);var e=k(t.range,t.forward);e&&(t.range=e)}));var v=function(t){return"mcepastebin"===t.id};t.on("AfterSetSelectionRange",(function(t){var e=t.range,n=e.startContainer.parentNode;y(e)||v(n)||_(),s(n)||T()})),t.on("copy",(function(t){var e=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!tn.ie){var n=d();n&&(t.preventDefault(),e.clearData(),e.setData("text/html",n.outerHTML),e.setData("text/plain",n.outerText||n.innerText))}})),JI(t),ZI(t),QI(t)},b=function(t){return ya(t)||Oa(t)||_a(t)},y=function(t){return b(t.startContainer)||b(t.endContainer)},w=function(e){var n=t.schema.getShortEndedElements(),o=r.createRng(),i=e.startContainer,a=e.startOffset,u=e.endContainer,c=e.endOffset;return Nt(n,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),Nt(n,u.nodeName.toLowerCase())?0===c?o.setEndBefore(u):o.setEndAfter(u):o.setEnd(u,c),o},x=function(e,o,i){var a=t.$,c=_i(wn.fromDom(t.getBody()),"#"+u).fold((function(){return a([])}),(function(t){return a([t.dom])}));0===c.length&&(c=a('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",u),c.appendTo(t.getBody()));var s=r.createRng();o===i&&tn.ie?(c.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(o),s.setStartAfter(c[0].firstChild.firstChild),s.setEndAfter(o)):(c.empty().append(sa).append(o).append(sa),s.setStart(c[0].firstChild,1),s.setEnd(c[0].lastChild,0)),c.css({top:r.getPos(e,t.getBody()).y}),c[0].focus();var l=n.getSel();return l.removeAllRanges(),l.addRange(s),s},C=function(n){var o=n.cloneNode(!0),i=t.fire("ObjectSelected",{target:n,targetClone:o});if(i.isDefaultPrevented())return null;var a=x(n,i.targetClone,o),u=wn.fromDom(n);return Q(Tl(wn.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Rn(u,t)||Co(t,c)})),r.getAttrib(n,c)||n.setAttribute(c,"1"),e=n,_(),a},k=function(t,e){if(!t)return null;if(t.collapsed){if(!y(t)){var n=e?1:-1,o=bg(n,i,t),a=o.getNode(!e);if(Ym(a))return h(n,a,!!e&&!o.isAtEnd(),!1);var u=o.getNode(e);if(Ym(u))return h(n,u,!e&&!o.isAtEnd(),!1)}return null}var c=t.startContainer,s=t.startOffset,f=t.endOffset;if(3===c.nodeType&&0===s&&eL(c.parentNode)&&(c=c.parentNode,s=r.nodeIndex(c),c=c.parentNode),1!==c.nodeType)return null;if(f===s+1&&c===t.endContainer){var d=c.childNodes[s];if(l(d))return C(d)}return null},T=function(){e&&e.removeAttribute(c),_i(wn.fromDom(t.getBody()),"#"+u).each(Or),e=null},O=function(){a.destroy(),e=null},_=function(){a.hide()};return tn.ceFalse&&!PO(t)&&v(),{showCaret:h,showBlockCaretContainer:p,hideFakeCaret:_,destroy:O}},oL=function(t){var e=gn.each,n=Qp.BACKSPACE,r=Qp.DELETE,o=t.dom,i=t.selection,a=t.parser,u=tn.gecko,c=tn.ie,s=tn.webkit,l="data:text/mce-internal,",f=c?"Text":"URL",d=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(r){}},m=function(t){return t.isDefaultPrevented()},g=function(e){var n,r;e.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===e.target.tagName&&i.select(e.target),n=t.selection.getContent(),n.length>0&&(r=l+escape(t.id)+","+escape(n),e.dataTransfer.setData(f,r)))},h=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(f),e&&e.indexOf(l)>=0)?(e=e.substr(l.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null},p=function(e,n){t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:e,internal:n}):t.execCommand("mceInsertContent",!1,e)},v=function(){var e=function(t){var e=o.create("body"),n=t.cloneContents();return e.appendChild(n),i.serializer.serialize(e,{format:"html"})},a=function(n){var r=e(n),i=o.createRng();i.selectNode(t.getBody());var a=e(i);return r===a};t.on("keydown",(function(e){var i,u,c=e.keyCode;if(!m(e)&&(c===r||c===n)){if(i=t.selection.isCollapsed(),u=t.getBody(),i&&!o.isEmpty(u))return;if(!i&&!a(t.selection.getRng()))return;e.preventDefault(),t.setContent(""),u.firstChild&&o.isBlock(u.firstChild)?t.selection.setCursorLocation(u.firstChild,0):t.selection.setCursorLocation(u,0),t.nodeChanged()}}))},b=function(){t.shortcuts.add("meta+a",null,"SelectAll")},y=function(){t.inline||o.bind(t.getDoc(),"mousedown mouseup",(function(e){var n;if(e.target===t.getDoc().documentElement)if(n=i.getRng(),t.getBody().focus(),"mousedown"===e.type){if(ya(n.startContainer))return;i.placeCaretAt(e.clientX,e.clientY)}else i.setRng(n)}))},w=function(){t.on("keydown",(function(e){if(!m(e)&&e.keyCode===n){if(!t.getBody().getElementsByTagName("hr").length)return;if(i.isCollapsed()&&0===i.getRng().startOffset){var r=i.getNode(),a=r.previousSibling;if("HR"===r.nodeName)return o.remove(r),void e.preventDefault();a&&a.nodeName&&"hr"===a.nodeName.toLowerCase()&&(o.remove(a),e.preventDefault())}}}))},x=function(){Range.prototype.getClientRects||t.on("mousedown",(function(e){if(!m(e)&&"HTML"===e.target.nodeName){var n=t.getBody();n.blur(),Pi.setEditorTimeout(t,(function(){n.focus()}))}}))},C=function(){t.on("click",(function(e){var n=e.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==o.getContentEditableParent(n)&&(e.preventDefault(),t.selection.select(n),t.nodeChanged()),"A"===n.nodeName&&o.hasClass(n,"mce-item-anchor")&&(e.preventDefault(),i.select(n))}))},S=function(){var n=function(){var n=o.getAttribs(i.getStart().cloneNode(!1));return function(){var r=i.getStart();r!==t.getBody()&&(o.setAttrib(r,"style",null),e(n,(function(t){r.setAttributeNode(t.cloneNode(!0))})))}},r=function(){return!i.isCollapsed()&&o.getParent(i.getStart(),o.isBlock)!==o.getParent(i.getEnd(),o.isBlock)};t.on("keypress",(function(e){var o;if(!m(e)&&(8===e.keyCode||46===e.keyCode)&&r())return o=n(),t.getDoc().execCommand("delete",!1,null),o(),e.preventDefault(),!1})),o.bind(t.getDoc(),"cut",(function(e){var o;!m(e)&&r()&&(o=n(),Pi.setEditorTimeout(t,(function(){o()})))}))},k=function(){t.on("keydown",(function(t){if(!m(t)&&t.keyCode===n&&i.isCollapsed()&&0===i.getRng().startOffset){var e=i.getNode().previousSibling;if(e&&e.nodeName&&"table"===e.nodeName.toLowerCase())return t.preventDefault(),!1}}))},T=function(){t.on("keydown",(function(e){var n,r;if(!m(e)&&e.keyCode===Qp.BACKSPACE){n=i.getRng();var a=n.startContainer,u=n.startOffset,c=o.getRoot();if(r=a,n.collapsed&&0===u){while(r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==c)r=r.parentNode;"BLOCKQUOTE"===r.tagName&&(t.formatter.toggle("blockquote",null,r),n=o.createRng(),n.setStart(a,0),n.setEnd(a,0),i.setRng(n))}}}))},O=function(){var e=function(){d("StyleWithCSS",!1),d("enableInlineTableEditing",!1),Jd(t)||d("enableObjectResizing",!1)};ym(t)||t.on("BeforeExecCommand mousedown",e)},E=function(){var n=function(){e(o.select("a"),(function(t){var e=t.parentNode,n=o.getRoot();if(e.lastChild===t){while(e&&!o.isBlock(e)){if(e.parentNode.lastChild!==e||e===n)return;e=e.parentNode}o.add(e,"br",{"data-mce-bogus":1})}}))};t.on("SetContent ExecCommand",(function(t){"setcontent"!==t.type&&"mceInsertLink"!==t.command||n()}))},A=function(){Sd(t)&&t.on("init",(function(){d("DefaultParagraphSeparator",Sd(t))}))},D=function(){t.on("keyup focusin mouseup",(function(t){Qp.modifierPressed(t)||i.normalize()}),!0)},M=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},N=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},R=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",(function(e){var n;if("HTML"===e.target.nodeName){if(tn.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}})))},z=function(){tn.mac&&t.on("keydown",(function(e){if(Qp.metaKeyPressed(e)&&!e.shiftKey&&(37===e.keyCode||39===e.keyCode)){e.preventDefault();var n=t.selection.getSel();n.modify("move",37===e.keyCode?"backward":"forward","lineboundary")}}))},B=function(){d("AutoUrlDetect",!1)},P=function(){t.on("click",(function(t){var e=t.target;do{if("A"===e.tagName)return void t.preventDefault()}while(e=e.parentNode)})),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},I=function(){t.on("init",(function(){t.dom.bind(t.getBody(),"submit",(function(t){t.preventDefault()}))}))},L=function(){a.addNodeFilter("br",(function(t){var e=t.length;while(e--)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()}))},H=function(){t.on("dragstart",(function(t){g(t)})),t.on("drop",(function(e){if(!m(e)){var n=h(e);if(n&&n.id!==t.id){e.preventDefault();var r=av(e.x,e.y,t.getDoc());i.setRng(r),p(n.html,!0)}}}))},F=_,V=function(){if(!u||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount},j=function(){s&&(y(),C(),I(),b(),tn.iOS&&(N(),R(),P())),u&&(x(),O(),M(),z())},U=function(){T(),v(),tn.windowsPhone||D(),s&&(y(),C(),A(),I(),k(),L(),tn.iOS?(N(),R(),P()):b()),tn.ie>=11&&(R(),k()),tn.ie&&(b(),B(),H()),u&&(w(),x(),S(),O(),E(),M(),z(),k())};return PO(t)?j():U(),{refreshContentEditable:F,isHidden:V}},iL=Hs.DOM,aL=function(t,e){var n=wn.fromDom(t.getBody()),r=mr(dr(n)),o=wn.fromTag("style");vo(o,"type","text/css"),xr(o,wn.fromText(e)),xr(r,o),t.on("remove",(function(){Or(o)}))},uL=function(t){return t.inline?t.getElement().nodeName.toLowerCase():void 0},cL=function(t){return Et(t,(function(t){return!1===C(t)}))},sL=function(t){var e=t.settings,n=t.editorUpload.blobCache;return cL({allow_conditional_comments:e.allow_conditional_comments,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_html_in_named_anchor:e.allow_html_in_named_anchor,allow_script_urls:e.allow_script_urls,allow_unsafe_link_target:e.allow_unsafe_link_target,convert_fonts_to_spans:e.convert_fonts_to_spans,fix_list_elements:e.fix_list_elements,font_size_legacy_values:e.font_size_legacy_values,forced_root_block:e.forced_root_block,forced_root_block_attrs:e.forced_root_block_attrs,padd_empty_with_br:e.padd_empty_with_br,preserve_cdata:e.preserve_cdata,remove_trailing_brs:e.remove_trailing_brs,inline_styles:e.inline_styles,root_name:uL(t),validate:!0,blob_cache:n,document:t.getDoc(),images_dataimg_filter:e.images_dataimg_filter})},lL=function(t){var e=t.settings;return Wt(Wt({},sL(t)),cL({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope,element_format:e.element_format,entities:e.entities,entity_encoding:e.entity_encoding,indent:e.indent,indent_after:e.indent_after,indent_before:e.indent_before,block_elements:e.block_elements,boolean_attributes:e.boolean_attributes,custom_elements:e.custom_elements,extended_valid_elements:e.extended_valid_elements,invalid_elements:e.invalid_elements,invalid_styles:e.invalid_styles,move_caret_before_on_enter_elements:e.move_caret_before_on_enter_elements,non_empty_elements:e.non_empty_elements,schema:e.schema,self_closing_elements:e.self_closing_elements,short_ended_elements:e.short_ended_elements,special:e.special,text_block_elements:e.text_block_elements,text_inline_elements:e.text_inline_elements,valid_children:e.valid_children,valid_classes:e.valid_classes,valid_elements:e.valid_elements,valid_styles:e.valid_styles,verify_html:e.verify_html,whitespace_elements:e.whitespace_elements}))},fL=function(t){var e=iE(sL(t),t.schema);return e.addAttributeFilter("src,href,style,tabindex",(function(e,n){var r,o,i=e.length,a=t.dom,u="data-mce-"+n;while(i--)if(r=e[i],o=r.attr(n),o&&!r.attr(u)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?(o=a.serializeStyle(a.parseStyle(o),r.name),o.length||(o=null),r.attr(u,o),r.attr(n,o)):"tabindex"===n?(r.attr(u,o),r.attr(n,null)):r.attr(u,t.convertURL(o,n,r.name))}})),e.addNodeFilter("script",(function(t){var e=t.length;while(e--){var n=t[e],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}})),t.settings.preserve_cdata&&e.addNodeFilter("#cdata",(function(e){var n=e.length;while(n--){var r=e[n];r.type=8,r.name="#comment",r.value="[CDATA["+t.dom.encode(r.value)+"]]"}})),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){var n=e.length,r=t.schema.getNonEmptyElements();while(n--){var o=e[n];o.isEmpty(r)&&0===o.getAll("br").length&&(o.append(new _y("br",1)).shortEnded=!0)}})),e},dL=function(t){t.settings.auto_focus&&Pi.setEditorTimeout(t,(function(){var e;e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus),e.destroyed||e.focus()}),100)},mL=function(t){var e=t.dom.getRoot();t.inline||Sp(t)&&t.selection.getStart(!0)!==e||Xg(e).each((function(e){var n=e.getNode(),r=Yr(n)?Xg(n).getOr(e):e;tn.browser.isIE()?Pb(t,r.toRange()):t.selection.setRng(r.toRange())}))},gL=function(t){t.bindPendingEventDelegates(),t.initialized=!0,Kp(t),t.focus(!0),mL(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),dL(t)},hL=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},pL=function(t,e,n){var r=[new Ai((function(n,r){return hL(t).loadAll(e,n,r)}))];return t.inline?r:r.concat([new Ai((function(e,r){return t.ui.styleSheetLoader.loadAll(n,e,r)}))])},vL=function(t){var e=hL(t),n=Kd(t),r=t.contentCSS,o=function(){e.unloadAll(r),t.inline||t.ui.styleSheetLoader.unloadAll(n)},i=function(){t.removed?o():t.on("remove",o)};if(t.contentStyles.length>0){var a="";gn.each(t.contentStyles,(function(t){a+=t+"\r\n"})),t.dom.addStyle(a)}var u=Ai.all(pL(t,r,n)).then(i).catch(i);return t.settings.content_style&&aL(t,t.settings.content_style),u},bL=function(t){var e=t.settings,n=t.getDoc(),r=t.getBody();qp(t),e.browser_spellcheck||e.gecko_spellcheck||(n.body.spellcheck=!1,iL.setAttrib(r,"spellcheck","false")),t.quirks=oL(t),Gp(t);var o=Xd(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){gn.each(e.protect,(function(e){t.content=t.content.replace(e,(function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"}))}))})),t.on("SetContent",(function(){t.addVisual(t.getBody())})),t.on("compositionstart compositionend",(function(e){t.composing="compositionstart"===e.type}))},yL=function(t){PO(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})},wL=function(t){!0!==t.removed&&(yL(t),gL(t))},xL=function(t,e){var n=t.settings,r=t.getElement(),o=t.getDoc();n.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(o.open(),o.write(t.iframeHTML),o.close()),t.inline&&(iL.addClass(r,"mce-content-body"),t.contentDocument=o=document,t.contentWindow=window,t.bodyElement=r,t.contentAreaContainer=r);var i=t.getBody();i.disabled=!0,t.readonly=!!n.readonly,t.readonly||(t.inline&&"static"===iL.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=t.getParam("content_editable_state",!0)),i.disabled=!1,t.editorUpload=rD(t),t.schema=Hu(n),t.dom=Hs(o,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:Vd(t),referrerPolicy:jd(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=fL(t),t.serializer=bE(lL(t),t),t.selection=__(t.dom,t.getWin(),t.serializer,t),t.annotator=Bp(t),t.formatter=mD(t),t.undoManager=vD(t),t._nodeChangeDispatcher=new vI(t),t._selectionOverrides=rL(t),Cz(t),wI(t),PO(t)||SI(t);var a=pI(t);vz(t,a),Ez(t),TD(t);var u=LO(t);bL(t),u.fold((function(){vL(t).then((function(){return wL(t)}))}),(function(e){t.setProgressState(!0),vL(t).then((function(){e().then((function(e){t.setProgressState(!1),wL(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),wL(t)}))}))}))},CL=Hs.DOM,SL=function(t,e){if(document.domain!==window.location.hostname&&tn.browser.isIE()){var n=YA("mce");t[n]=function(){xL(t)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return CL.setAttrib(e,"src",r),!0}return!1},kL=function(t,e,n,r){var o=wn.fromTag("iframe");return bo(o,r),bo(o,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",title:e}),wl(o,"tox-edit-area__iframe"),o},TL=function(t){var e=vd(t)+"<html><head>";bd(t)!==t.documentBaseUrl&&(e+='<base href="'+t.documentBaseURI.getURI()+'" />'),e+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=yd(t),r=wd(t),o=t.translate(_m(t));return xd(t)&&(e+='<meta http-equiv="Content-Security-Policy" content="'+xd(t)+'" />'),e+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+t.id+'" aria-label="'+o+'"><br></body></html>',e},OL=function(t,e){var n=t.translate("Rich Text Area"),r=kL(t.id,n,e.height,pd(t)).dom;r.onload=function(){r.onload=null,t.fire("load")};var o=SL(t,r);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=r,t.iframeHTML=TL(t),CL.add(e.iframeContainer,r),o},_L=function(t,e){var n=OL(t,e);e.editorContainer&&(CL.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=CL.isHidden(e.editorContainer)),t.getElement().style.display="none",CL.setAttrib(t.id,"aria-hidden","true"),n||xL(t)},EL=Hs.DOM,AL=function(t,e,n){var r=EA.get(n),o=EA.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=gn.trim(n),r&&-1===gn.inArray(e,n)){if(gn.each(EA.dependencies(n),(function(n){AL(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);t.plugins[n]=i,i.init&&(i.init(t,o),e.push(n))}catch(gV){FA(t,n,gV)}}},DL=function(t){return t.replace(/^\-/,"")},ML=function(t){var e=[];gn.each(xm(t).split(/[ ,]/),(function(n){AL(t,e,DL(n))}))},NL=function(t){var e=gn.trim(Bd(t)),n=t.ui.registry.getAll().icons,r=Wt(Wt({},mA.get("default").icons),mA.get(e).icons);Ct(r,(function(e,r){Nt(n,r)||t.ui.registry.addIcon(r,e)}))},RL=function(t){var e=nm(t);if(v(e)){t.settings.theme=DL(e);var n=AA.get(e);t.theme=new n(t,AA.urls[e]),t.theme.init&&t.theme.init(t,AA.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}},zL=function(t){return t.theme.renderUI()},BL=function(t){var e=t.getElement(),n=nm(t),r=n(t,e);return r.editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||t.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||t.id+"_iframecontainer"),r.height=r.iframeHeight?r.iframeHeight:e.offsetHeight,r},PL=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},IL=function(t){var e=EL.create("div");return EL.insertAfter(e,t),PL(e)},LL=function(t){var e=t.getElement();return t.inline?PL(null):IL(e)},HL=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,v(nm(t))?zL(t):T(nm(t))?BL(t):LL(t)},FL=function(t,e){var n={show:W.from(e.show).getOr(_),hide:W.from(e.hide).getOr(_),disable:W.from(e.disable).getOr(_),isDisabled:W.from(e.isDisabled).getOr(L),enable:function(){t.mode.isReadOnly()||W.from(e.enable).map(I)}};t.ui=Wt(Wt({},t.ui),n)},VL=function(t){t.fire("ScriptsLoaded"),NL(t),RL(t),ML(t);var e=HL(t);FL(t,W.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,qA(t),t.inline?xL(t):_L(t,n)},jL=Hs.DOM,UL=function(t){return"-"===t.charAt(0)},WL=function(t,e){var n=Ud(e),r=Wd(e);if(!1===ul.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,_,void 0,(function(){HA(e,o,n)}))}},$L=function(t,e,n,r){var o=nm(e);if(v(o)){if(!UL(o)&&!Nt(AA.urls,o)){var i=sm(e);i?AA.load(o,e.documentBaseURI.toAbsolute(i)):AA.load(o,"themes/"+o+"/theme"+n+".js")}t.loadQueue((function(){AA.waitFor(o,r)}))}else r()},qL=function(t){return W.from(Pd(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:W.none()}}))},GL=function(t,e,n){return W.from(e).filter((function(t){return t.length>0&&!mA.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:W.some(e)}}))},KL=function(t,e,n){var r=GL(e,"default",n),o=qL(e).orThunk((function(){return GL(e,Bd(e),"")}));Q(lo([r,o]),(function(n){t.add(n.url,_,void 0,(function(){LA(e,n.url,n.name.getOrUndefined())}))}))},XL=function(t,e){gn.each(Cm(t),(function(e,n){EA.load(n,e,_,void 0,(function(){IA(t,e,n)})),t.settings.plugins+=" "+n})),gn.each(xm(t).split(/[ ,]/),(function(n){if(n=gn.trim(n),n&&!EA.urls[n])if(UL(n)){n=n.substr(1,n.length);var r=EA.dependencies(n);gn.each(r,(function(n){var r={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"},o=EA.createUrl(r,n);EA.load(o.resource,o,_,void 0,(function(){IA(t,o.prefix+o.resource+o.suffix,o.resource)}))}))}else{var o={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"};EA.load(n,o,_,void 0,(function(){IA(t,o.prefix+o.resource+o.suffix,n)}))}}))},YL=function(t,e){var n=Gs.ScriptLoader;$L(n,t,e,(function(){WL(n,t),KL(n,t,e),XL(t,e),n.loadQueue((function(){t.removed||VL(t)}),t,(function(){t.removed||VL(t)}))}))},JL=function(t,e){return Hi.forElement(t,{contentCssCors:wm(e),referrerPolicy:jd(e)})},ZL=function(t){var e=t.id;ul.setCode(Ud(t));var n=function(){jL.unbind(window,"ready",n),t.render()};if(ec.Event.domLoaded){if(t.getElement()&&tn.contentEditable){var r=wn.fromDom(t.getElement()),o=So(r);t.on("remove",(function(){tt(r.dom.attributes,(function(t){return Co(r,t.name)})),bo(r,o)})),t.ui.styleSheetLoader=JL(r,t),lm(t)?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var i=t.getElement().form||jL.getParent(e,"form");i&&(t.formElement=i,fm(t)&&!Zr(t.getElement())&&(jL.insertAfter(jL.create("input",{type:"hidden",name:e}),e),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},jL.bind(i,"submit reset",t.formEventDelegate),t.on("reset",(function(){t.resetContent()})),!dm(t)||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),i._mceOldSubmit(i)})),t.windowManager=MA(t),t.notificationManager=_A(t),mm(t)&&t.on("GetContent",(function(t){t.save&&(t.content=jL.encode(t.content))})),gm(t)&&t.on("submit",(function(){t.initialized&&t.save()})),hm(t)&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),YL(t,t.suffix)}}else jL.bind(window,"ready",n)},QL=function(t,e){return f_(t,e)},tH={"font-size":"size","font-family":"face"},eH=function(t,e,n){var r=function(e){return Eo(e,t).orThunk((function(){return"font"===In(e)?Mt(tH,t).bind((function(t){return wo(e,t)})):W.none()}))},o=function(t){return Rn(wn.fromDom(e),t)};return RS(wn.fromDom(n),(function(t){return r(t)}),o)},nH=function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},rH=function(t,e){return W.from(Hs.DOM.getStyle(e,t,!0))},oH=function(t){return function(e,n){return W.from(n).map(wn.fromDom).filter(Vn).bind((function(n){return eH(t,e,n.dom).or(rH(t,n.dom))})).getOr("")}},iH=oH("font-size"),aH=E(nH,oH("font-family")),uH=function(t){return Xg(t.getBody()).map((function(t){var e=t.container();return Qr(e)?e.parentNode:e}))},cH=function(t){return W.from(t.selection.getRng()).bind((function(e){var n=t.getBody(),r=e.startContainer===n&&0===e.startOffset;return r?W.none():W.from(t.selection.getStart(!0))}))},sH=function(t,e){return cH(t).orThunk(R(uH,t)).map(wn.fromDom).filter(Vn).bind(e)},lH=function(t,e){return sH(t,A(W.some,e))},fH=function(t,e){if(/^[0-9.]+$/.test(e)){var n=parseInt(e,10);if(n>=1&&n<=7){var r=Ad(t),o=Dd(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},dH=function(t){var e=t.split(/\s*,\s*/);return Z(e,(function(t){return-1===t.indexOf(" ")||se(t,'"')||se(t,"'")?t:"'"+t+"'"})).join(",")},mH=function(t,e){var n=fH(t,e);t.formatter.toggle("fontname",{value:dH(n)}),t.nodeChanged()},gH=function(t){return lH(t,(function(e){return aH(t.getBody(),e.dom)})).getOr("")},hH=function(t,e){t.formatter.toggle("fontsize",{value:fH(t,e)}),t.nodeChanged()},pH=function(t){return lH(t,(function(e){return iH(t.getBody(),e.dom)})).getOr("")},vH=function(t){return lH(t,(function(e){var n=wn.fromDom(t.getBody()),r=RS(e,(function(t){return Eo(t,"line-height")}),R(Rn,n)),o=function(){var t=parseFloat(Oo(e,"line-height")),n=parseFloat(Oo(e,"font-size"));return String(t/n)};return r.getOrThunk(o)})).getOr("")},bH=function(t,e){t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()},yH=function(t){if("string"!==typeof t){var e=gn.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}},wH=function(t,e){var n=yH(e);s_(t,n.content,n.details)},xH=gn.each,CH=gn.map,SH=gn.inArray,kH=function(){function t(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return t.prototype.execCommand=function(t,e,n,r){var o,i=!1,a=this;if(!a.editor.removed){if("mcefocus"!==t.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?Lb(a.editor):a.editor.focus()),r=a.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n}),r.isDefaultPrevented())return!1;var u=t.toLowerCase();if(o=a.commands.exec[u])return o(u,e,n),a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(xH(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),i=!0,!1})),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{i=a.editor.getDoc().execCommand(t,e,n)}catch(c){}return!!i&&(a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},t.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(n){}return!1}},t.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(n){}}},t.prototype.addCommands=function(t,e){void 0===e&&(e="exec");var n=this;xH(t,(function(t,r){xH(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},t.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,a){return e.call(n||r.editor,o,i,a)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(e){}return!1},t.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},t.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},t.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},t.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},t.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},t.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e),this.editor.nodeChanged()},t.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(t){var e=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":_,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(e,n,r){gy(t,r)},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(a){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");tn.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),xH("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;e.execNativeCommand(n);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(e.storeSelection(),t.dom.split(r,o),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,{value:r})},FontName:function(e,n,r){mH(t,r)},FontSize:function(e,n,r){hH(t,r)},LineHeight:function(e,n,r){bH(t,r)},Lang:function(t,n,r){e.toggleFormat(t,{value:r.code,customValue:r.customCode})},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){wH(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){qP(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){dz(t,e)},mceRepaint:_,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){"string"===typeof r&&(r={href:r});var o=t.dom.getParent(t.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),io);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return AP(t,r),!0}});var n=function(e){return function(){var n=t.selection,r=n.isCollapsed()?[t.dom.getParent(n.getNode(),t.dom.isBlock)]:n.getSelectedBlocks(),o=CH(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==SH(o,!0)}};e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return cz(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return gH(t)}),this),e.addQueryValueHandler("FontSize",(function(){return pH(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return vH(t)}),this)},t}(),TH="data-mce-contenteditable",OH=function(t,e,n){Sl(t,e)&&!1===n?Cl(t,e):n&&wl(t,e)},_H=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(r){}},EH=function(t,e){t.dom.contentEditable=e?"true":"false"},AH=function(t){Q(Tl(t,'*[contenteditable="true"]'),(function(t){vo(t,TH,"true"),EH(t,!1)}))},DH=function(t){Q(Tl(t,"*["+TH+'="true"]'),(function(t){Co(t,TH),EH(t,!0)}))},MH=function(t){W.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))},NH=function(t){t.selection.setRng(t.selection.getRng())},RH=function(t,e){var n=wn.fromDom(t.getBody());OH(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),MH(t),t.readonly=!0,EH(n,!1),AH(n)):(t.readonly=!1,EH(n,!0),DH(n),_H(t,"StyleWithCSS",!1),_H(t,"enableInlineTableEditing",!1),_H(t,"enableObjectResizing",!1),fy(t)&&t.focus(),NH(t),t.nodeChanged())},zH=function(t){return t.readonly},BH=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){zH(t)&&Q(e,(function(t){t.attr(TH,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(TH,(function(e){zH(t)&&Q(e,(function(t){t.attr("contenteditable",t.attr(TH))}))})),t.serializer.addTempAttr(TH)},PH=function(t){t.serializer?BH(t):t.on("PreInit",(function(){BH(t)}))},IH=function(t){return"click"===t.type},LH=function(t,e){var n=function(e){return Rn(e,wn.fromDom(t.getBody()))};return Ei(e,"a",n).bind((function(t){return wo(t,"href")}))},HH=function(t,e){if(IH(e)&&!Qp.metaKeyPressed(e)){var n=wn.fromDom(e.target);LH(t,n).each((function(n){if(e.preventDefault(),/^#/.test(n)){var r=t.dom.select(n+',[name="'+ue(n,"#")+'"]');r.length&&t.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))}},FH=function(t){t.on("ShowCaret",(function(e){zH(t)&&e.preventDefault()})),t.on("ObjectSelected",(function(e){zH(t)&&e.preventDefault()}))},VH=gn.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"," "),jH=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||L}return t.isNative=function(t){return!!VH[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Gu(n,e||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i<a;i++){var u=o[i];if(!u.removed){if(u.once&&this.off(n,u.func),r.isImmediatePropagationStopped())return r;if(!1===u.func.call(this.scope,r))return r.preventDefault(),r}}return r},t.prototype.on=function(t,e,n,r){if(!1===e&&(e=L),e){var o={func:e,removed:!1};r&&gn.extend(o,r);var i=t.toLowerCase().split(" "),a=i.length;while(a--){var u=i[a],c=this.bindings[u];c||(c=[],this.toggleEvent(u,!0)),c=n?qt([o],c,!0):qt(qt([],c,!0),[o],!1),this.bindings[u]=c}}return this},t.prototype.off=function(t,e){var n=this;if(t){var r=t.toLowerCase().split(" "),o=r.length;while(o--){var i=r[o],a=this.bindings[i];if(!i)return Ct(this.bindings,(function(t,e){n.toggleEvent(e,!1),delete n.bindings[e]})),this;if(a){if(e){var u=et(a,(function(t){return t.func===e}));a=u.fail,this.bindings[i]=a,Q(u.pass,(function(t){t.removed=!0}))}else a.length=0;a.length||(this.toggleEvent(t,!1),delete this.bindings[i])}}}else Ct(this.bindings,(function(t,e){n.toggleEvent(e,!1)})),this.bindings={};return this},t.prototype.once=function(t,e,n){return this.on(t,e,n,{once:!0})},t.prototype.has=function(t){return t=t.toLowerCase(),!(!this.bindings[t]||0===this.bindings[t].length)},t}(),UH=function(t){return t._eventDispatcher||(t._eventDispatcher=new jH({scope:t,toggleEvent:function(e,n){jH.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher},WH={fire:function(t,e,n){var r=this;if(r.removed&&"remove"!==t&&"detach"!==t)return e;var o=UH(r).fire(t,e);if(!1!==n&&r.parent){var i=r.parent();while(i&&!o.isPropagationStopped())i.fire(t,o,!1),i=i.parent()}return o},on:function(t,e,n){return UH(this).on(t,e,n)},off:function(t,e){return UH(this).off(t,e)},once:function(t,e){return UH(this).once(t,e)},hasEventListeners:function(t){return UH(this).has(t)}},$H=Hs.DOM,qH=function(t,e){if("selectionchange"===e)return t.getDoc();if(!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(e))return t.getDoc().documentElement;var n=tm(t);return n?(t.eventRoot||(t.eventRoot=$H.select(n)[0]),t.eventRoot):t.getBody()},GH=function(t){return!t.hidden&&!zH(t)},KH=function(t,e,n){GH(t)?t.fire(e,n):zH(t)&&HH(t,n)},XH=function(t,e){var n;if(t.delegates||(t.delegates={}),!t.delegates[e]&&!t.removed){var r=qH(t,e);if(tm(t)){if(ZN||(ZN={},t.editorManager.on("removeEditor",(function(){t.editorManager.activeEditor||ZN&&(Ct(ZN,(function(e,n){t.dom.unbind(qH(t,n))})),ZN=null)}))),ZN[e])return;n=function(n){var r=n.target,o=t.editorManager.get(),i=o.length;while(i--){var a=o[i].getBody();(a===r||$H.isChildOf(r,a))&&KH(o[i],e,n)}},ZN[e]=n,$H.bind(r,e,n)}else n=function(n){KH(t,e,n)},$H.bind(r,e,n),t.delegates[e]=n}},YH=Wt(Wt({},WH),{bindPendingEventDelegates:function(){var t=this;gn.each(t._pendingNativeEvents,(function(e){XH(t,e)}))},toggleNativeEvent:function(t,e){var n=this;"focus"!==t&&"blur"!==t&&(n.removed||(e?n.initialized?XH(n,t):n._pendingNativeEvents?n._pendingNativeEvents.push(t):n._pendingNativeEvents=[t]:n.initialized&&(n.dom.unbind(qH(n,t),t,n.delegates[t]),delete n.delegates[t])))},unbindAllNativeEvents:function(){var t=this,e=t.getBody(),n=t.dom;t.delegates&&(Ct(t.delegates,(function(e,n){t.dom.unbind(qH(t,n),n,e)})),delete t.delegates),!t.inline&&e&&n&&(e.onload=null,n.unbind(t.getWin()),n.unbind(t.getDoc())),n&&(n.unbind(e),n.unbind(t.getContainer()))}}),JH=["design","readonly"],ZH=function(t,e,n,r){var o=n[e.get()],i=n[r];try{i.activate()}catch(gV){return void console.error("problem while activating editor mode "+r+":",gV)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&RH(t,i.editorReadOnly),e.set(r),Up(t,r)},QH=function(t,e,n,r){if(r!==n.get()){if(!Nt(e,r))throw new Error("Editor mode '"+r+"' is invalid");t.initialized?ZH(t,n,e,r):t.on("init",(function(){return ZH(t,n,e,r)}))}},tF=function(t,e,n){var r;if(Y(JH,e))throw new Error("Cannot override default mode "+e);return Wt(Wt({},t),(r={},r[e]=Wt(Wt({},n),{deactivate:function(){try{n.deactivate()}catch(gV){console.error("problem while deactivating editor mode "+e+":",gV)}}}),r))},eF=function(t){var e=Ks("design"),n=Ks({design:{activate:_,deactivate:_,editorReadOnly:!1},readonly:{activate:_,deactivate:_,editorReadOnly:!0}});return PH(t),FH(t),{isReadOnly:function(){return zH(t)},set:function(r){return QH(t,n.get(),e,r)},get:function(){return e.get()},register:function(t,e){n.set(tF(n.get(),t,e))}}},nF=gn.each,rF=gn.explode,oF={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},iF=gn.makeMap("alt,ctrl,shift,meta,access"),aF=function(t){var e,n={};nF(rF(t.toLowerCase(),"+"),(function(t){t in iF?n[t]=!0:/^[0-9]{2,}$/.test(t)?n.keyCode=parseInt(t,10):(n.charCode=t.charCodeAt(0),n.keyCode=oF[t]||t.toUpperCase().charCodeAt(0))}));var r=[n.keyCode];for(e in iF)n[e]?r.push(e):n[e]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,tn.mac?n.ctrl=!0:n.shift=!0),n.meta&&(tn.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},uF=function(){function t(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;var e=this;t.on("keyup keypress keydown",(function(t){!e.hasModifier(t)&&!e.isFunctionKey(t)||t.isDefaultPrevented()||(nF(e.shortcuts,(function(n){if(e.matchShortcut(t,n))return e.pendingPatterns=n.subpatterns.slice(0),"keydown"===t.type&&e.executeShortcutAction(n),!0})),e.matchShortcut(t,e.pendingPatterns[0])&&(1===e.pendingPatterns.length&&"keydown"===t.type&&e.executeShortcutAction(e.pendingPatterns[0]),e.pendingPatterns.shift()))}))}return t.prototype.add=function(t,e,n,r){var o=this,i=o.normalizeCommandFunc(n);return nF(rF(gn.trim(t)),(function(t){var n=o.createShortcut(t,e,i,r);o.shortcuts[n.id]=n})),!0},t.prototype.remove=function(t){var e=this.createShortcut(t);return!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},t.prototype.normalizeCommandFunc=function(t){var e=this,n=t;return"string"===typeof n?function(){e.editor.execCommand(n,!1,null)}:gn.isArray(n)?function(){e.editor.execCommand(n[0],n[1],n[2])}:n},t.prototype.createShortcut=function(t,e,n,r){var o=gn.map(rF(t,">"),aF);return o[o.length-1]=gn.extend(o[o.length-1],{func:n,scope:r||this.editor}),gn.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},t.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},t.prototype.isFunctionKey=function(t){return"keydown"===t.type&&t.keyCode>=112&&t.keyCode<=123},t.prototype.matchShortcut=function(t,e){return!!e&&(e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&(e.alt===t.altKey&&e.shift===t.shiftKey&&(!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0))))},t.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},t}(),cF=function(){var t={},e={},n={},r={},o={},i={},a={},u=function(t,e){return function(n,r){return t[n.toLowerCase()]=Wt(Wt({},r),{type:e})}},c=function(t,e){return r[t.toLowerCase()]=e};return{addButton:u(t,"button"),addGroupToolbarButton:u(t,"grouptoolbarbutton"),addToggleButton:u(t,"togglebutton"),addMenuButton:u(t,"menubutton"),addSplitButton:u(t,"splitbutton"),addMenuItem:u(e,"menuitem"),addNestedMenuItem:u(e,"nestedmenuitem"),addToggleMenuItem:u(e,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:c,getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}},sF=function(){var t=cF();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},lF=Hs.DOM,fF=gn.extend,dF=gn.each,mF=gn.resolve,gF=tn.ie,hF=function(){function t(t,e,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,fF(this,YH),this.settings=uA(this,t,this.documentBaseUrl,n.defaultSettings,e),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(Gs.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Hs.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),cl.languageLoad=this.settings.language_load,cl.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new Ly(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new uF(this),this.editorCommands=new kH(this),this.settings.cache_suffix&&(tn.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sF(),styleSheetLoader:void 0,show:_,hide:_,enable:_,disable:_,isDisabled:L};var o=this,i=eF(o);this.mode=i,this.setMode=i.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Ms.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){ZL(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return ly(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r,o=this,i=o.settings[t];if(i)return o.callbackLookup&&(r=o.callbackLookup[t])&&(i=r.func,r=r.scope),"string"===typeof i&&(r=i.replace(/\.\w+$/,""),r=r?mF(r):0,i=mF(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:i,scope:r}),i.apply(r||o,e)},t.prototype.translate=function(t){return ul.translate(t)},t.prototype.getParam=function(t,e,n){return fA(this,t,e,n)},t.prototype.hasPlugin=function(t,e){var n=Y(xm(this).split(/[ ,]/),t);return!!n&&(!e||void 0!==EA.get(t))},t.prototype.nodeChanged=function(t){this._nodeChangeDispatcher.nodeChanged(t)},t.prototype.addCommand=function(t,e,n){this.editorCommands.addCommand(t,e,n)},t.prototype.addQueryStateHandler=function(t,e,n){this.editorCommands.addQueryStateHandler(t,e,n)},t.prototype.addQueryValueHandler=function(t,e,n){this.editorCommands.addQueryValueHandler(t,e,n)},t.prototype.addShortcut=function(t,e,n,r){this.shortcuts.add(t,e,n,r)},t.prototype.execCommand=function(t,e,n,r){return this.editorCommands.execCommand(t,e,n,r)},t.prototype.queryCommandState=function(t){return this.editorCommands.queryCommandState(t)},t.prototype.queryCommandValue=function(t){return this.editorCommands.queryCommandValue(t)},t.prototype.queryCommandSupported=function(t){return this.editorCommands.queryCommandSupported(t)},t.prototype.show=function(){var t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(lF.show(t.getContainer()),lF.hide(t.id)),t.load(),t.fire("show"))},t.prototype.hide=function(){var t=this,e=t.getDoc();t.hidden||(gF&&e&&!t.inline&&e.execCommand("SelectAll"),t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(lF.hide(t.getContainer()),lF.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.fire("hide"))},t.prototype.isHidden=function(){return!!this.hidden},t.prototype.setProgressState=function(t,e){this.fire("ProgressState",{state:t,time:e})},t.prototype.load=function(t){var e,n=this,r=n.getElement();if(n.removed)return"";if(r){t=t||{},t.load=!0;var o=Zr(r)?r.value:r.innerHTML;return e=n.setContent(o,t),t.element=r,t.no_events||n.fire("LoadContent",t),t.element=r=null,e}},t.prototype.save=function(t){var e,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return t=t||{},t.save=!0,t.element=o,e=t.content=r.getContent(t),t.no_events||r.fire("SaveContent",t),"raw"===t.format&&r.fire("RawSaveContent",t),e=t.content,Zr(o)?o.value=e:(!t.is_removing&&r.inline||(o.innerHTML=e),(n=lF.getParent(r.id,"form"))&&dF(n.elements,(function(t){if(t.name===r.id)return t.value=e,!1}))),t.element=o=null,!1!==t.set_dirty&&r.setDirty(!1),e},t.prototype.setContent=function(t,e){return xE(this,t,e)},t.prototype.getContent=function(t){return wE(this,t)},t.prototype.insertContent=function(t,e){e&&(t=fF({content:t},e)),this.execCommand("mceInsertContent",!1,t)},t.prototype.resetContent=function(t){void 0===t?xE(this,this.startContent,{format:"raw"}):xE(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},t.prototype.isDirty=function(){return!this.isNotDirty},t.prototype.setDirty=function(t){var e=!this.isNotDirty;this.isNotDirty=!t,t&&t!==e&&this.fire("dirty")},t.prototype.getContainer=function(){var t=this;return t.container||(t.container=lF.get(t.editorContainer||t.id+"_parent")),t.container},t.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},t.prototype.getElement=function(){return this.targetElm||(this.targetElm=lF.get(this.id)),this.targetElm},t.prototype.getWin=function(){var t,e=this;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},t.prototype.getDoc=function(){var t,e=this;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},t.prototype.getBody=function(){var t=this.getDoc();return this.bodyElement||(t?t.body:null)},t.prototype.convertURL=function(t,e,n){var r=this,o=r.settings;return o.urlconverter_callback?r.execCallback("urlconverter_callback",t,n,!0,e):!o.convert_urls||n&&"LINK"===n.nodeName||0===t.indexOf("file:")||0===t.length?t:o.relative_urls?r.documentBaseURI.toRelative(t):(t=r.documentBaseURI.toAbsolute(t,o.remove_script_host),t)},t.prototype.addVisual=function(t){QL(this,t)},t.prototype.remove=function(){_E(this)},t.prototype.destroy=function(t){EE(this,t)},t.prototype.uploadImages=function(t){return this.editorUpload.uploadImages(t)},t.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},t.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")},t.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},t.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},t.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},t}(),pF=Hs.DOM,vF=gn.explode,bF=gn.each,yF=gn.extend,wF=0,xF=!1,CF=[],SF=[],kF=function(t){return"length"!==t},TF=function(t){var e=t.type;bF(DF.get(),(function(n){switch(e){case"scroll":n.fire("ScrollWindow",t);break;case"resize":n.fire("ResizeWindow",t);break}}))},OF=function(t){t!==xF&&(t?Ms(window).on("resize scroll",TF):Ms(window).off("resize scroll",TF),xF=t)},_F=function(t){var e=SF;delete CF[t.id];for(var n=0;n<CF.length;n++)if(CF[n]===t){CF.splice(n,1);break}return SF=nt(SF,(function(e){return t!==e})),DF.activeEditor===t&&(DF.activeEditor=SF.length>0?SF[0]:null),DF.focusedEditor===t&&(DF.focusedEditor=null),e.length!==SF.length},EF=function(t){return t&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(_F(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null),t},AF="CSS1Compat"!==document.compatMode,DF=Wt(Wt({},WH),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Ms,majorVersion:"5",minorVersion:"10.2",releaseDate:"2021-11-17",editors:CF,i18n:ul,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=Ly.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/"));var o=window.tinymce||window.tinyMCEPreInit;if(o)t=o.base||o.baseURL,r=o.suffix;else{for(var i=document.getElementsByTagName("script"),a=0;a<i.length;a++){var u=i[a].src||"";if(""!==u){var c=u.substring(u.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(u)){-1!==c.indexOf(".min")&&(r=".min"),t=u.substring(0,u.lastIndexOf("/"));break}}}if(!t&&document.currentScript){u=document.currentScript.src;-1!==u.indexOf(".min")&&(r=".min"),t=u.substring(0,u.lastIndexOf("/"))}}n.baseURL=new Ly(e).toAbsolute(t),n.documentBaseURL=e,n.baseURI=new Ly(n.baseURL),n.suffix=r,ty(n)},overrideDefaults:function(t){var e=t.base_url;e&&this._setBaseUrl(e);var n=t.suffix;t.suffix&&(this.suffix=n),this.defaultSettings=t;var r=t.plugin_base_urls;void 0!==r&&Ct(r,(function(t,e){cl.PluginManager.urls[e]=t}))},init:function(t){var e,n=this,r=gn.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"," "),o=function(t,e){return t.inline&&e.tagName.toLowerCase()in r},i=function(t){var e=t.id;return e||(e=Mt(t,"name").filter((function(t){return!pF.get(t)})).getOrThunk(pF.uniqueId),t.setAttribute("id",e)),e},a=function(e){var r=t[e];if(r)return r.apply(n,[])},u=function(t,e){return e.constructor===RegExp?e.test(t.className):pF.hasClass(t,e)},c=function(t){var e=[];if(tn.browser.isIE()&&tn.browser.version.major<11)return VA("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(AF)return VA("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return bF(t.types,(function(t){e=e.concat(pF.select(t.selector))})),e;if(t.selector)return pF.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":var n=t.elements||"";n.length>0&&bF(vF(n),(function(t){var n=pF.get(t);n?e.push(n):bF(document.forms,(function(n){bF(n.elements,(function(n){n.name===t&&(t="mce_editor_"+wF++,pF.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":bF(pF.select("textarea"),(function(n){t.editor_deselector&&u(n,t.editor_deselector)||t.editor_selector&&!u(n,t.editor_selector)||e.push(n)}));break}return e},s=function(t){e=t},l=function(){var e,r=0,u=[],f=function(t,o,i){var a=new hF(t,o,n);u.push(a),a.on("init",(function(){++r===e.length&&s(u)})),a.targetElm=a.targetElm||i,a.render()};pF.unbind(window,"ready",l),a("onpageload"),e=Ms.unique(c(t)),t.types?bF(t.types,(function(n){gn.each(e,(function(e){return!pF.is(e,n.selector)||(f(i(e),yF({},t,n),e),!1)}))})):(gn.each(e,(function(t){EF(n.get(t.id))})),e=gn.grep(e,(function(t){return!n.get(t.id)})),0===e.length?s([]):bF(e,(function(e){o(t,e)?VA("Could not initialize inline editor on invalid inline target element",e):f(i(e),t,e)})))};return n.settings=t,pF.bind(window,"ready",l),new Ai((function(t){e?t(e):s=function(e){t(e)}}))},get:function(t){return 0===arguments.length?SF.slice(0):v(t)?at(SF,(function(e){return e.id===t})).getOr(null):O(t)&&SF[t]?SF[t]:null},add:function(t){var e=this,n=CF[t.id];return n===t||(null===e.get(t.id)&&(kF(t.id)&&(CF[t.id]=t),CF.push(t),SF.push(t)),OF(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),QN||(QN=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",QN))),t},createEditor:function(t,e){return this.add(new hF(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!v(t))return n=t,w(r.get(n.id))?null:(_F(n)&&r.fire("RemoveEditor",{editor:n}),0===SF.length&&window.removeEventListener("beforeunload",QN),n.remove(),OF(SF.length>0),n);bF(pF.select(t),(function(t){n=r.get(t.id),n&&r.remove(n)}))}else for(e=SF.length-1;e>=0;e--)r.remove(SF[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new hF(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,e,n)},triggerSave:function(){bF(SF,(function(t){t.save()}))},addI18n:function(t,e){ul.add(t,e)},translate:function(t){return ul.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new Ly(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Ly(this.baseURL)}});DF.setup();var MF,NF,RF=Math.min,zF=Math.max,BF=Math.round,PF=function(t,e,n){var r=e.x,o=e.y,i=t.w,a=t.h,u=e.w,c=e.h,s=(n||"").split("");return"b"===s[0]&&(o+=c),"r"===s[1]&&(r+=u),"c"===s[0]&&(o+=BF(c/2)),"c"===s[1]&&(r+=BF(u/2)),"b"===s[3]&&(o-=a),"r"===s[4]&&(r-=i),"c"===s[3]&&(o-=BF(a/2)),"c"===s[4]&&(r-=BF(i/2)),VF(r,o,i,a)},IF=function(t,e,n,r){var o,i;for(i=0;i<r.length;i++)if(o=PF(t,e,r[i]),o.x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},LF=function(t,e,n){return VF(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},HF=function(t,e){var n=zF(t.x,e.x),r=zF(t.y,e.y),o=RF(t.x+t.w,e.x+e.w),i=RF(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:VF(n,r,o-n,i-r)},FF=function(t,e,n){var r=t.x,o=t.y,i=t.x+t.w,a=t.y+t.h,u=e.x+e.w,c=e.y+e.h,s=zF(0,e.x-r),l=zF(0,e.y-o),f=zF(0,i-u),d=zF(0,a-c);return r+=s,o+=l,n&&(i+=s,a+=l,r-=f,o-=d),i-=f,a-=d,VF(r,o,i-r,a-o)},VF=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},jF=function(t){return VF(t.left,t.top,t.width,t.height)},UF={inflate:LF,relativePosition:PF,findBestRelativePosition:IF,intersect:HF,clamp:FF,create:VF,fromClientRect:jF},WF=function(t,e,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(r=!0,null!==o&&(clearTimeout(o),o=null),t.apply(null,e))}},a=i(t),u=i(e),c=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r||null!==o||(o=setTimeout((function(){return u.apply(null,t)}),n))};return{start:c,resolve:a,reject:u}},$F=function(){var t={},e={},n=function(n,r){var o='Script at URL "'+r+'" failed to load',i='Script at URL "'+r+"\" did not call `tinymce.Resource.add('"+n+"', data)` within 1 second";if(void 0!==t[n])return t[n];var a=new Ai((function(t,a){var u=WF(t,a);e[n]=u.resolve,Gs.ScriptLoader.loadScript(r,(function(){return u.start(i)}),(function(){return u.reject(o)}))}));return t[n]=a,a},r=function(n,r){void 0!==e[n]&&(e[n](r),delete e[n]),t[n]=Ai.resolve(r)};return{load:n,add:r}},qF=$F(),GF=gn.each,KF=gn.extend,XF=function(){};XF.extend=MF=function(t){var e=this,n=e.prototype,r=function(){var t,e,n,r=this;if(!NF&&(r.init&&r.init.apply(r,arguments),e=r.Mixins,e)){t=e.length;while(t--)n=e[t],n.init&&n.init.apply(r,arguments)}},o=function(){return this},i=function(t,e){return function(){var r=this,o=r._super;r._super=n[t];var i=e.apply(r,arguments);return r._super=o,i}};NF=!0;var a=new e;return NF=!1,t.Mixins&&(GF(t.Mixins,(function(e){for(var n in e)"init"!==n&&(t[n]=e[n])})),n.Mixins&&(t.Mixins=n.Mixins.concat(t.Mixins))),t.Methods&&GF(t.Methods.split(","),(function(e){t[e]=o})),t.Properties&&GF(t.Properties.split(","),(function(e){var n="_"+e;t[e]=function(t){var e=this;return void 0!==t?(e[n]=t,e):e[n]}})),t.Statics&&GF(t.Statics,(function(t,e){r[e]=t})),t.Defaults&&n.Defaults&&(t.Defaults=KF({},n.Defaults,t.Defaults)),Ct(t,(function(t,e){"function"===typeof t&&n[e]?a[e]=i(e,t):a[e]=t})),r.prototype=a,r.constructor=r,r.extend=MF,r};var YF,JF=Math.min,ZF=Math.max,QF=Math.round,tV=function(t){var e={},n=0,r=0,o=0,i=function(t,e,n){var r,o,i;r=0,o=0,i=0,t/=255,e/=255,n/=255;var a=JF(t,JF(e,n)),u=ZF(t,ZF(e,n));if(a===u)return i=a,{h:0,s:0,v:100*i};var c=t===a?e-n:n===a?t-e:n-t;return r=t===a?3:n===a?1:5,r=60*(r-c/(u-a)),o=(u-a)/u,i=u,{h:QF(r),s:QF(100*o),v:QF(100*i)}},a=function(t,e,i){if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=ZF(0,JF(e,1)),i=ZF(0,JF(i,1)),0!==e){var a=t/60,u=i*e,c=u*(1-Math.abs(a%2-1)),s=i-u;switch(Math.floor(a)){case 0:n=u,r=c,o=0;break;case 1:n=c,r=u,o=0;break;case 2:n=0,r=u,o=c;break;case 3:n=0,r=c,o=u;break;case 4:n=c,r=0,o=u;break;case 5:n=u,r=0,o=c;break;default:n=r=o=0}n=QF(255*(n+s)),r=QF(255*(r+s)),o=QF(255*(o+s))}else n=r=o=QF(255*i)},u=function(){var t=function(t){return t=parseInt(t,10).toString(16),t.length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},c=function(){return{r:n,g:r,b:o}},s=function(){return i(n,r,o)},l=function(t){var i;return"object"===typeof t?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&a(t.h,t.s,t.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,e};return t&&l(t),e.toRgb=c,e.toHsv=s,e.toHex=u,e.parse=l,e},eV=function(t){var e=JSON.stringify(t);return v(e)?e.replace(/[\u0080-\uFFFF]/g,(function(t){var e=t.charCodeAt(0).toString(16);return"\\u"+"0000".substring(e.length)+e})):e},nV={serialize:eV,parse:function(t){try{return JSON.parse(t)}catch(e){}}},rV={callbacks:{},count:0,send:function(t){var e=this,n=Hs.DOM,r=void 0!==t.count?t.count:e.count,o="tinymce_jsonp_"+r;e.callbacks[r]=function(i){n.remove(o),delete e.callbacks[r],t.callback(i)},n.add(n.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),e.count++}},oV=Wt(Wt({},WH),{send:function(t){var e,n=0,r=function(){!t.async||4===e.readyState||n++>1e4?(t.success&&n<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,n>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):Pi.setTimeout(r,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",oV.fire("beforeInitialize",{settings:t}),e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType(t.content_type),e.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(e.withCredentials=!0),t.content_type&&e.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&gn.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e=oV.fire("beforeSend",{xhr:e,settings:t}).xhr,e.send(t.data),!t.async)return r();Pi.setTimeout(r,10)}}),iV=gn.extend,aV=function(){function t(t){this.settings=iV({},t),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(t){var e=t.error,n=t.success,r=iV(this.settings,t);r.success=function(t,o){t=nV.parse(t),"undefined"===typeof t&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=nV.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",oV.send(r)},t}(),uV=function(){return function(){var t={},e=[],n={getItem:function(e){var n=t[e];return n||null},setItem:function(n,r){e.push(n),t[n]=String(r)},key:function(t){return e[t]},removeItem:function(n){e=e.filter((function(t){return t===n})),delete t[n]},clear:function(){e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:function(){return e.length},configurable:!1,enumerable:!1}),n}()};try{var cV="__storage_test__";YF=window.localStorage,YF.setItem(cV,cV),YF.removeItem(cV)}catch(gV){YF=uV()}var sV=YF,lV={geom:{Rect:UF},util:{Promise:Ai,Delay:Pi,Tools:gn,VK:Qp,URI:Ly,Class:XF,EventDispatcher:jH,Observable:WH,I18n:ul,XHR:oV,JSON:nV,JSONRequest:aV,JSONP:rV,LocalStorage:sV,Color:tV,ImageUploader:eD},dom:{EventUtils:ec,Sizzle:Hc,DomQuery:Ms,TreeWalker:Fi,TextSeeker:Gl,DOMUtils:Hs,ScriptLoader:Gs,RangeUtils:Cv,Serializer:bE,StyleSheetLoader:Ii,ControlSelection:ev,BookmarkManager:Pp,Selection:__,Event:ec.Event},html:{Styles:Vu,Entities:Eu,Node:_y,Schema:Hu,SaxParser:$y,DomParser:iE,Writer:nw,Serializer:rw},Env:tn,AddOnManager:cl,Annotator:Bp,Formatter:mD,UndoManager:vD,EditorCommands:kH,WindowManager:MA,NotificationManager:_A,EditorObservable:YH,Shortcuts:uF,Editor:hF,FocusManager:Fb,EditorManager:DF,DOM:Hs.DOM,ScriptLoader:Gs.ScriptLoader,PluginManager:EA,ThemeManager:AA,IconManager:mA,Resource:qF,trim:gn.trim,isArray:gn.isArray,is:gn.is,toArray:gn.toArray,makeMap:gn.makeMap,each:gn.each,map:gn.map,grep:gn.grep,inArray:gn.inArray,extend:gn.extend,create:gn.create,walk:gn.walk,createNS:gn.createNS,resolve:gn.resolve,explode:gn.explode,_addCacheSuffix:gn._addCacheSuffix,isOpera:tn.opera,isWebKit:tn.webkit,isIE:tn.ie,isGecko:tn.gecko,isMac:tn.mac},fV=gn.extend(DF,lV),dV=function(e){try{t.exports=e}catch(n){}},mV=function(t){window.tinymce=t,window.tinyMCE=t};mV(fV),dV(fV)})()}).call(this,n("c8ba"))},e704:function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return!!t.hasPlugin("tinymcespellchecker",!0)&&("undefined"!==typeof window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),!0)},r=Object.hasOwnProperty,o=function(t){for(var e in t)if(r.call(t,e))return!1;return!0},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=tinymce.util.Tools.resolve("tinymce.util.URI"),u=tinymce.util.Tools.resolve("tinymce.util.XHR"),c=function(t){return t.fire("SpellcheckStart")},s=function(t){return t.fire("SpellcheckEnd")},l=function(t){var e="English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";return t.getParam("spellchecker_languages",e)},f=function(t){var e=t.getParam("language","en");return t.getParam("spellchecker_language",e)},d=function(t){return t.getParam("spellchecker_rpc_url")},m=function(t){return t.getParam("spellchecker_callback")},g=function(t){var e=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`§©«®±¶·¸»¼½¾¿×÷¤”“„    ]+',"g");return t.getParam("spellchecker_wordchar_pattern",e)},h=function(t){return t&&1===t.nodeType&&"false"===t.contentEditable},p=function(t,e){var n,r=[],o=e.dom,i=e.schema.getBlockElements(),a=e.schema.getWhiteSpaceElements(),u=e.schema.getShortEndedElements(),c=function(t,e){if(!t[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:t.index,end:t.index+t[0].length,text:t[0],data:e}},s=function(t){if(3===t.nodeType)return t.data;if(a[t.nodeName]&&!i[t.nodeName])return"";if(h(t))return"\n";var e="";if((i[t.nodeName]||u[t.nodeName])&&(e+="\n"),t=t.firstChild)do{e+=s(t)}while(t=t.nextSibling);return e},l=function(t,e,n){var r,o,c,s,l,f=[],d=0,m=t,g=0;e=e.slice(0),e.sort((function(t,e){return t.start-e.start})),l=e.shift();t:while(1){if((i[m.nodeName]||u[m.nodeName]||h(m))&&d++,3===m.nodeType&&(!o&&m.length+d>=l.end?(o=m,s=l.end-d):r&&f.push(m),!r&&m.length+d>l.start&&(r=m,c=l.start-d),d+=m.length),r&&o){if(m=n({startNode:r,startNodeIndex:c,endNode:o,endNodeIndex:s,innerNodes:f,match:l.text,matchIndex:g}),d-=o.length-s,r=null,o=null,f=[],l=e.shift(),g++,!l)break}else if(a[m.nodeName]&&!i[m.nodeName]||!m.firstChild){if(m.nextSibling){m=m.nextSibling;continue}}else if(!h(m)){m=m.firstChild;continue}while(1){if(m.nextSibling){m=m.nextSibling;break}if(m.parentNode===t)break t;m=m.parentNode}}},f=function(t){var e=function(e,n){var i=r[n];i.stencil||(i.stencil=t(i));var a=i.stencil.cloneNode(!1);return a.setAttribute("data-mce-index",""+n),e&&a.appendChild(o.doc.createTextNode(e)),a};return function(t){var n,r,i,a=t.startNode,u=t.endNode,c=t.matchIndex,s=o.doc;if(a===u){var l=a;i=l.parentNode,t.startNodeIndex>0&&(n=s.createTextNode(l.data.substring(0,t.startNodeIndex)),i.insertBefore(n,l));var f=e(t.match,c);return i.insertBefore(f,l),t.endNodeIndex<l.length&&(r=s.createTextNode(l.data.substring(t.endNodeIndex)),i.insertBefore(r,l)),l.parentNode.removeChild(l),f}n=s.createTextNode(a.data.substring(0,t.startNodeIndex)),r=s.createTextNode(u.data.substring(t.endNodeIndex));for(var d=e(a.data.substring(t.startNodeIndex),c),m=0,g=t.innerNodes.length;m<g;++m){var h=t.innerNodes[m],p=e(h.data,c);h.parentNode.replaceChild(p,h)}var v=e(u.data.substring(0,t.endNodeIndex),c);return i=a.parentNode,i.insertBefore(n,a),i.insertBefore(d,a),i.removeChild(a),i=u.parentNode,i.insertBefore(v,u),i.insertBefore(r,u),i.removeChild(u),v}},d=function(t){var e=t.parentNode;while(t.childNodes.length>0)e.insertBefore(t.childNodes[0],t);e.removeChild(t)},m=function(t){return-1!==t.className.indexOf("mce-spellchecker-word")},g=function(e){var n=t.getElementsByTagName("*"),r=[];e="number"===typeof e?""+e:null;for(var o=0;o<n.length;o++){var i=n[o],a=i.getAttribute("data-mce-index");null!==a&&a.length&&m(i)&&(a!==e&&null!==e||r.push(i))}return r},p=function(t){var e=r.length;while(e--)if(r[e]===t)return e;return-1};function v(t){var e=[];return b((function(n,r){t(n,r)&&e.push(n)})),r=e,this}function b(t){for(var e=0,n=r.length;e<n;e++)if(!1===t(r[e],e))break;return this}function y(e){return r.length&&l(t,r,f(e)),this}function w(t,e){if(E&&t.global)while(n=t.exec(E))r.push(c(n,e));return this}function x(t){var e,n=g(t?p(t):null);e=n.length;while(e--)d(n[e]);return this}var C=function(t){return r[t.getAttribute("data-mce-index")]},S=function(t){return g(p(t))[0]};function k(t,e,n){return r.push({start:t,end:t+e,text:E.substr(t,e),data:n}),this}var T=function(t){var n=g(p(t)),r=e.dom.createRng();return r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),r},O=function(t,n){var r=T(t);return r.deleteContents(),n.length>0&&r.insertNode(e.dom.doc.createTextNode(n)),r};function _(){return r.splice(0,r.length),x(),this}var E=s(t);return{text:E,matches:r,each:b,filter:v,reset:_,matchFromElement:C,elementFromMatch:S,find:w,add:k,wrap:y,unwrap:x,replace:O,rangeFromMatch:T,indexOf:p}},v=function(t,e){if(!e.get()){var n=p(t.getBody(),t);e.set(n)}return e.get()},b=function(t,e,n){return function(r,o,c,s){var l={method:r,lang:n.get()},f="";l["addToDictionary"===r?"word":"text"]=o,i.each(l,(function(t,e){f&&(f+="&"),f+=e+"="+encodeURIComponent(t)})),u.send({url:new a(e).toAbsolute(d(t)),type:"post",content_type:"application/x-www-form-urlencoded",data:f,success:function(e){var n=JSON.parse(e);if(n)n.error?s(n.error):c(n);else{var r=t.translate("Server response wasn't proper JSON.");s(r)}},error:function(){var e=t.translate("The spelling service was not found: (")+d(t)+t.translate(")");s(e)}})}},y=function(t,e,n,r,o,i,a){var u=m(t),c=u||b(t,e,n);c.call(t.plugins.spellchecker,r,o,i,a)},w=function(t,e,n,r,o,i){if(!k(t,n,r)){var a=function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),k(t,n,r)},u=function(e){_(t,n,r,o,e)};t.setProgressState(!0),y(t,e,i,"spellcheck",v(t,r).text,u,a),t.focus()}},x=function(t,e,n){t.dom.select("span.mce-spellchecker-word").length||k(t,e,n)},C=function(t,e,n,r,o,i,a){t.setProgressState(!0),y(t,e,o,"addToDictionary",i,(function(){t.setProgressState(!1),t.dom.remove(a,!0),x(t,n,r)}),(function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)}))},S=function(t,e,n,r,o,a){t.selection.collapse(),a?i.each(t.dom.select("span.mce-spellchecker-word"),(function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)})):t.dom.remove(o,!0),x(t,e,n)},k=function(t,e,n){var r=t.selection.getBookmark();if(v(t,n).reset(),t.selection.moveToBookmark(r),n.set(null),e.get())return e.set(!1),s(t),!0},T=function(t){var e=t.getAttribute("data-mce-index");return"number"===typeof e?""+e:e},O=function(t,e){var n=[],r=i.toArray(t.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var a=T(r[o]);null!==a&&a.length&&(a===e.toString()&&n.push(r[o]))}return n},_=function(t,e,n,r,i){var a=!!i.dictionary,u=i.words;if(t.setProgressState(!1),o(u)){var s=t.translate("No misspellings found.");return t.notificationManager.open({text:s,type:"info"}),void e.set(!1)}r.set({suggestions:u,hasDictionarySupport:a});var l=t.selection.getBookmark();v(t,n).find(g(t)).filter((function(t){return!!u[t.text]})).wrap((function(e){return t.dom.create("span",{class:"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":e.text})})),t.selection.moveToBookmark(l),e.set(!0),c(t)},E=function(t,e,n,r,o){var i=function(){return g(t)},a=function(o){_(t,e,r,n,o)};return{getTextMatcher:r.get,getWordCharPattern:i,markErrors:a,getLanguage:o.get}},A=function(t,e,n,r,o,i){t.addCommand("mceSpellCheck",(function(){w(t,e,n,r,o,i)}))},D=function(){return D=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},D.apply(this,arguments)},M="SpellcheckStart SpellcheckEnd",N=function(t,e){var n=[];return i.each(e,(function(t){n.push({selectable:!0,text:t.name,data:t.value})})),n},R=function(t){return i.map(l(t).split(","),(function(t){var e=t.split("=");return{name:e[0],value:e[1]}}))},z=function(t,e,n,r,o,a){var u=N("Language",R(t)),c=function(){w(t,e,n,r,a,o)},s={tooltip:"Spellcheck",onAction:c,icon:"spell-check",onSetup:function(e){var r=function(){e.setActive(n.get())};return t.on(M,r),function(){t.off(M,r)}}},l=D(D({},s),{type:"splitbutton",select:function(t){return t===o.get()},fetch:function(t){var e=i.map(u,(function(t){return{type:"choiceitem",value:t.data,text:t.text}}));t(e)},onItemAction:function(t,e){o.set(e)}});u.length>1?t.ui.registry.addSplitButton("spellchecker",l):t.ui.registry.addToggleButton("spellchecker",s),t.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",icon:"spell-check",onSetup:function(e){e.setActive(n.get());var r=function(){e.setActive(n.get())};return t.on(M,r),function(){t.off(M,r)}},onAction:c})},B=!0,P=function(t,e,n,r,o,a,u,c){var s=[],l=n.get().suggestions[u];i.each(l,(function(e){s.push({text:e,onAction:function(){t.insertContent(t.dom.encode(e)),t.dom.remove(c),x(t,r,o)}})}));var f=n.get().hasDictionarySupport;return f&&(s.push({type:"separator"}),s.push({text:"Add to dictionary",onAction:function(){C(t,e,r,o,a,u,c)}})),s.push.apply(s,[{type:"separator"},{text:"Ignore",onAction:function(){S(t,r,o,u,c)}},{text:"Ignore all",onAction:function(){S(t,r,o,u,c,B)}}]),s},I=function(t,e,n,r,o,i){var a=function(a){var u=a;if("mce-spellchecker-word"!==u.className)return[];var c=O(t,T(u));if(c.length>0){var s=t.dom.createRng();return s.setStartBefore(c[0]),s.setEndAfter(c[c.length-1]),t.selection.setRng(s),P(t,e,n,r,o,i,u.getAttribute("data-mce-word"),c)}};t.ui.registry.addContextMenu("spellchecker",{update:a})};function L(){e.add("spellchecker",(function(e,r){if(!1===n(e)){var o=t(!1),i=t(f(e)),a=t(null),u=t(null);return z(e,r,o,a,i,u),I(e,r,u,o,a,i),A(e,r,o,a,u,i),E(e,o,u,a,i)}}))}L()})()},e8b0:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return t},n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},r="\ufeff",o=function(t){return t.replace(/\uFEFF/g,"")},i=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},a="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]",u={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"[-'\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[\v\f…\u2028\u2029]",extend:"[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",format:"[­؀-؃۝܏឴឵‎‏‪-‮⁠-⁤-\ufeff-]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[=_‿⁀⁔︳︴﹍-﹏_∀-⋿<>]",punctuation:a},c={ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},s=[new RegExp(u.aletter),new RegExp(u.midnumlet),new RegExp(u.midletter),new RegExp(u.midnum),new RegExp(u.numeric),new RegExp(u.cr),new RegExp(u.lf),new RegExp(u.newline),new RegExp(u.extend),new RegExp(u.format),new RegExp(u.katakana),new RegExp(u.extendnumlet),new RegExp("@")],l="",f=new RegExp("^"+u.punctuation+"$"),d=/^\s+$/,m=s,g=c.OTHER,h=function(t){for(var e=g,n=m.length,r=0;r<n;++r){var o=m[r];if(o&&o.test(t)){e=r;break}}return e},p=function(t){var e={};return function(n){if(e[n])return e[n];var r=t(n);return e[n]=r,r}},v=function(t){var e=p(h);return i(t,e)},b=function(t,e){var n=t[e],r=t[e+1];if(e<0||e>t.length-1&&0!==e)return!1;if(n===c.ALETTER&&r===c.ALETTER)return!1;var o=t[e+2];if(n===c.ALETTER&&(r===c.MIDLETTER||r===c.MIDNUMLET||r===c.AT)&&o===c.ALETTER)return!1;var i=t[e-1];return(n!==c.MIDLETTER&&n!==c.MIDNUMLET&&r!==c.AT||r!==c.ALETTER||i!==c.ALETTER)&&((n!==c.NUMERIC&&n!==c.ALETTER||r!==c.NUMERIC&&r!==c.ALETTER)&&((n!==c.MIDNUM&&n!==c.MIDNUMLET||r!==c.NUMERIC||i!==c.NUMERIC)&&((n!==c.NUMERIC||r!==c.MIDNUM&&r!==c.MIDNUMLET||o!==c.NUMERIC)&&(n!==c.EXTEND&&n!==c.FORMAT&&i!==c.EXTEND&&i!==c.FORMAT&&r!==c.EXTEND&&r!==c.FORMAT&&((n!==c.CR||r!==c.LF)&&(n===c.NEWLINE||n===c.CR||n===c.LF||(r===c.NEWLINE||r===c.CR||r===c.LF||(n!==c.KATAKANA||r!==c.KATAKANA)&&((r!==c.EXTENDNUMLET||n!==c.ALETTER&&n!==c.NUMERIC&&n!==c.KATAKANA&&n!==c.EXTENDNUMLET)&&((n!==c.EXTENDNUMLET||r!==c.ALETTER&&r!==c.NUMERIC&&r!==c.KATAKANA)&&n!==c.AT)))))))))},y=l,w=d,x=f,C=function(t){return"http"===t||"https"===t},S=function(t,e){var n;for(n=e;n<t.length;n++)if(w.test(t[n]))break;return n},k=function(t,e){var n=S(t,e+1),r=t.slice(e+1,n).join(y);return"://"===r.substr(0,3)?n:e},T=function(t,e,n,r){for(var o=[],i=[],a=0;a<n.length;++a)if(i.push(t[a]),b(n,a)){var u=e[a];if((r.includeWhitespace||!w.test(u))&&(r.includePunctuation||!x.test(u))){var c=a-i.length+1,s=a+1,l=e.slice(c,s).join(y);if(C(l)){var f=k(e,a),d=t.slice(s,f);Array.prototype.push.apply(i,d),a=f}o.push(i)}i=[]}return o},O=function(){return{includeWhitespace:!1,includePunctuation:!1}},_=function(t,e,o){o=n(n({},O()),o);for(var i=[],a=[],u=0;u<t.length;u++){var c=e(t[u]);c!==r&&(i.push(t[u]),a.push(c))}var s=v(a);return T(i,a,s,o)},E=_,A=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),D=function(t,e){var n=e.getBlockElements(),r=e.getShortEndedElements(),i=function(t){return n[t.nodeName]||r[t.nodeName]},a=[],u="",c=new A(t,t);while(t=c.next())3===t.nodeType?u+=o(t.data):i(t)&&u.length&&(a.push(u),u="");return u.length&&a.push(u),a},M=function(t){return t.replace(/\u200B/g,"")},N=function(t){return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},R=function(t,n){var r=M(D(t,n).join("\n"));return E(r.split(""),e).length},z=function(t,e){var n=D(t,e).join("");return N(n)},B=function(t,e){var n=D(t,e).join("").replace(/\s/g,"");return N(n)},P=function(t,e){return function(){return e(t.getBody(),t.schema)}},I=function(t,e){return function(){return e(t.selection.getRng().cloneContents(),t.schema)}},L=function(t){return P(t,R)},H=function(t){return{body:{getWordCount:L(t),getCharacterCount:P(t,z),getCharacterCountWithoutSpaces:P(t,B)},selection:{getWordCount:I(t,R),getCharacterCount:I(t,z),getCharacterCountWithoutSpaces:I(t,B)},getCount:L(t)}},F=function(t,e){t.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(e.body.getWordCount()),String(e.selection.getWordCount())],["Characters (no spaces)",String(e.body.getCharacterCountWithoutSpaces()),String(e.selection.getCharacterCountWithoutSpaces())],["Characters",String(e.body.getCharacterCount()),String(e.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},V=function(t,e){t.addCommand("mceWordCount",(function(){return F(t,e)}))},j=tinymce.util.Tools.resolve("tinymce.util.Delay"),U=function(t,e){t.fire("wordCountUpdate",{wordCount:{words:e.body.getWordCount(),characters:e.body.getCharacterCount(),charactersWithoutSpaces:e.body.getCharacterCountWithoutSpaces()}})},W=function(t,e){U(t,e)},$=function(t,e,n){var r=j.debounce((function(){return W(t,e)}),n);t.on("init",(function(){W(t,e),j.setEditorTimeout(t,(function(){t.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",r)}),0)}))},q=function(t){var e=function(){return t.execCommand("mceWordCount")};t.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:e}),t.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:e})};function G(e){void 0===e&&(e=300),t.add("wordcount",(function(t){var n=H(t);return V(t,n),q(t),$(t,n,e),n}))}G()})()},ebac:function(t,e,n){n("080b")},ec27:function(t,e,n){n("fc39")},eda9:function(t,e,n){n("c361")},ef1f:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e){t.focus(),t.undoManager.transact((function(){t.setContent(e)})),t.selection.setCursorLocation(),t.nodeChanged()},n=function(t){return t.getContent({source_view:!0})},r=function(t){var r=n(t);t.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:r},onSubmit:function(n){e(t,n.getData().code),n.close()}})},o=function(t){t.addCommand("mceCodeEditor",(function(){r(t)}))},i=function(t){var e=function(){return t.execCommand("mceCodeEditor")};t.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:e}),t.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:e})};function a(){t.add("code",(function(t){return o(t),i(t),{}}))}a()})()},ef37:function(t,e,n){n("fd06")},f034:function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return{isFullscreen:function(){return null!==t.get()}}},r=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},o=function(t){return function(e){return r(e)===t}},i=function(t){return function(e){return typeof e===t}},a=o("string"),u=o("array"),c=i("boolean"),s=function(t){return null===t||void 0===t},l=function(t){return!s(t)},f=i("function"),d=i("number"),m=function(){},g=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},h=function(t,e){return function(n){return t(e(n))}},p=function(t){return function(){return t}},v=function(t){return t};function b(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var y=p(!1),w=p(!0),x=function(){return C},C=function(){var t=function(t){return t()},e=v,n={fold:function(t,e){return t()},isSome:y,isNone:w,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:p(null),getOrUndefined:p(void 0),or:e,orThunk:t,map:x,each:m,bind:x,exists:y,forall:w,filter:function(){return x()},toArray:function(){return[]},toString:p("none()")};return n}(),S=function(t){var e=p(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:w,isNone:y,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return S(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:C},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},k=function(t){return null===t||void 0===t?C:S(t)},T={some:S,none:x,from:k},O=function(){return O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},O.apply(this,arguments)},_=function(e){var n=t(T.none()),r=function(){return n.get().each(e)},o=function(){r(),n.set(T.none())},i=function(){return n.get().isSome()},a=function(){return n.get()},u=function(t){r(),n.set(T.some(t))};return{clear:o,isSet:i,get:a,set:u}},E=function(){return _((function(t){return t.unbind()}))},A=function(){var t=_(m),e=function(e){return t.get().each(e)};return O(O({},t),{on:e})},D=Array.prototype.push,M=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},N=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},R=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},z=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return T.some(i);if(n(i,r))break}return T.none()},B=function(t,e){return z(t,e,y)},P=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);D.apply(e,t[n])}return e},I=function(t,e){return P(M(t,e))},L=function(t,e){return e>=0&&e<t.length?T.some(t[e]):T.none()},H=function(t){return L(t,0)},F=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return T.none()},V=Object.keys,j=function(t,e){for(var n=V(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];e(a,i)}},U=function(t,e){return-1!==t.indexOf(e)},W=function(t){return void 0!==t.style&&f(t.style.getPropertyValue)},$=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return K(r.childNodes[0])},q=function(t,e){var n=e||document,r=n.createElement(t);return K(r)},G=function(t,e){var n=e||document,r=n.createTextNode(t);return K(r)},K=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},X=function(t,e,n){return T.from(t.dom.elementFromPoint(e,n)).map(K)},Y={fromHtml:$,fromTag:q,fromText:G,fromDom:K,fromPoint:X};"undefined"!==typeof window?window:Function("return this;")();var J=9,Z=11,Q=1,tt=3,et=function(t){return t.dom.nodeType},nt=function(t){return function(e){return et(e)===t}},rt=nt(Q),ot=nt(tt),it=nt(J),at=nt(Z),ut=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},ct=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:p(o),isiPhone:p(i),isTablet:p(c),isPhone:p(s),isTouch:p(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:p(l),isDesktop:p(f)}},st=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},lt=function(t,e){var n=st(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return mt(r(1),r(2))},ft=function(t,e){var n=String(e).toLowerCase();return 0===t.length?dt():lt(t,n)},dt=function(){return mt(0,0)},mt=function(t,e){return{major:t,minor:e}},gt={nu:mt,detect:ft,unknown:dt},ht=function(t,e){return F(e.brands,(function(e){var n=e.brand.toLowerCase();return B(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:gt.nu(parseInt(e.version,10),0)}}))}))},pt=function(t,e){var n=String(e).toLowerCase();return B(t,(function(t){return t.search(n)}))},vt=function(t,e){return pt(t,e).map((function(t){var n=gt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},bt=function(t,e){return pt(t,e).map((function(t){var n=gt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},yt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,wt=function(t){return function(e){return U(e,t)}},xt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return U(t,"edge/")&&U(t,"chrome")&&U(t,"safari")&&U(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,yt],search:function(t){return U(t,"chrome")&&!U(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return U(t,"msie")||U(t,"trident")}},{name:"Opera",versionRegexes:[yt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:wt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:wt("firefox")},{name:"Safari",versionRegexes:[yt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(U(t,"safari")||U(t,"mobile/"))&&U(t,"applewebkit")}}],Ct=[{name:"Windows",search:wt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return U(t,"iphone")||U(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:wt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:wt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:wt("linux"),versionRegexes:[]},{name:"Solaris",search:wt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:wt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:wt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],St={browsers:p(xt),oses:p(Ct)},kt="Edge",Tt="Chrome",Ot="IE",_t="Opera",Et="Firefox",At="Safari",Dt=function(){return Mt({current:void 0,version:gt.unknown()})},Mt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(kt),isChrome:r(Tt),isIE:r(Ot),isOpera:r(_t),isFirefox:r(Et),isSafari:r(At)}},Nt={unknown:Dt,nu:Mt,edge:p(kt),chrome:p(Tt),ie:p(Ot),opera:p(_t),firefox:p(Et),safari:p(At)},Rt="Windows",zt="iOS",Bt="Android",Pt="Linux",It="OSX",Lt="Solaris",Ht="FreeBSD",Ft="ChromeOS",Vt=function(){return jt({current:void 0,version:gt.unknown()})},jt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Rt),isiOS:r(zt),isAndroid:r(Bt),isOSX:r(It),isLinux:r(Pt),isSolaris:r(Lt),isFreeBSD:r(Ht),isChromeOS:r(Ft)}},Ut={unknown:Vt,nu:jt,windows:p(Rt),ios:p(zt),android:p(Bt),linux:p(Pt),osx:p(It),solaris:p(Lt),freebsd:p(Ht),chromeos:p(Ft)},Wt=function(t,e,n){var r=St.browsers(),o=St.oses(),i=e.bind((function(t){return ht(r,t)})).orThunk((function(){return vt(r,t)})).fold(Nt.unknown,Nt.nu),a=bt(o,t).fold(Ut.unknown,Ut.nu),u=ct(a,i,t,n);return{browser:i,os:a,deviceType:u}},$t={detect:Wt},qt=function(t){return window.matchMedia(t).matches},Gt=ut((function(){return $t.detect(navigator.userAgent,T.from(navigator.userAgentData),qt)})),Kt=function(){return Gt()},Xt=function(t,e){var n=t.dom;if(n.nodeType!==Q)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Yt=function(t){return t.nodeType!==Q&&t.nodeType!==J&&t.nodeType!==Z||0===t.childElementCount},Jt=function(t,e){var n=void 0===e?document:e.dom;return Yt(n)?[]:M(n.querySelectorAll(t),Y.fromDom)},Zt=function(t,e){return t.dom===e.dom},Qt=function(t){return Y.fromDom(t.dom.ownerDocument)},te=function(t){return it(t)?t:Qt(t)},ee=function(t){return T.from(t.dom.parentNode).map(Y.fromDom)},ne=function(t,e){var n=f(e)?e:y,r=t.dom,o=[];while(null!==r.parentNode&&void 0!==r.parentNode){var i=r.parentNode,a=Y.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},re=function(t){var e=function(e){return R(e,(function(e){return!Zt(t,e)}))};return ee(t).map(oe).map(e).getOr([])},oe=function(t){return M(t.dom.childNodes,Y.fromDom)},ie=function(t){return at(t)&&l(t.dom.host)},ae=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode),ue=p(ae),ce=ae?function(t){return Y.fromDom(t.dom.getRootNode())}:te,se=function(t){var e=ce(t);return ie(e)?T.some(e):T.none()},le=function(t){return Y.fromDom(t.dom.host)},fe=function(t){if(ue()&&l(t.target)){var e=Y.fromDom(t.target);if(rt(e)&&de(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return H(n)}}return T.from(t.target)},de=function(t){return l(t.dom.shadowRoot)},me=function(t){var e=ot(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return se(Y.fromDom(e)).fold((function(){return n.body.contains(e)}),h(me,le))},ge=function(t){var e=t.dom.body;if(null===e||void 0===e)throw new Error("Body is not available yet");return Y.fromDom(e)},he=function(t,e,n){if(!(a(n)||c(n)||d(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},pe=function(t,e,n){he(t.dom,e,n)},ve=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},be=function(t,e){t.dom.removeAttribute(e)},ye=function(t,e,n){if(!a(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);W(t)&&t.style.setProperty(e,n)},we=function(t,e){var n=t.dom;j(e,(function(t,e){ye(n,e,t)}))},xe=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||me(t)?o:Ce(n,e)},Ce=function(t,e){return W(t)?t.style.getPropertyValue(e):""},Se=function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}},ke=function(t){var e=Y.fromDom(fe(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=g(r,n);return Se(e,t.clientX,t.clientY,n,r,o,t)},Te=function(t,e){return function(n){t(n)&&e(ke(n))}},Oe=function(t,e,n,r,o){var i=Te(n,r);return t.dom.addEventListener(e,i,o),{unbind:b(Ee,t,e,i,o)}},_e=function(t,e,n,r){return Oe(t,e,n,r,!1)},Ee=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Ae=w,De=function(t,e,n){return _e(t,e,Ae,n)},Me=function(t,e){var n=function(n,r){return Me(t+n,e+r)};return{left:t,top:e,translate:n}},Ne=Me,Re=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Ne(n,r)},ze=function(t){var e=void 0===t?window:t;return Kt().browser.isFirefox()?T.none():T.from(e["visualViewport"])},Be=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Pe=function(t){var e=void 0===t?window:t,n=e.document,r=Re(Y.fromDom(n));return ze(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Be(r.left,r.top,n,o)}),(function(t){return Be(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Ie=function(t,e,n){return ze(n).map((function(n){var r=function(t){return e(ke(t))};return n.addEventListener(t,r),{unbind:function(){return n.removeEventListener(t,r)}}})).getOrThunk((function(){return{unbind:m}}))},Le=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),He=tinymce.util.Tools.resolve("tinymce.Env"),Fe=tinymce.util.Tools.resolve("tinymce.util.Delay"),Ve=function(t,e){t.fire("FullscreenStateChanged",{state:e})},je=function(t){return t.getParam("fullscreen_native",!1,"boolean")},Ue=function(t){var e=Y.fromDom(t.getElement());return se(e).map(le).getOrThunk((function(){return ge(Qt(e))}))},We=function(t){return void 0!==t.fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null},$e=function(){return void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange"},qe=function(t){var e=t.dom;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},Ge=function(t){var e=t.dom;e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitCancelFullScreen&&e.webkitCancelFullScreen()},Ke=function(t){return t.dom===We(Qt(t).dom)},Xe=function(t,e,n){return R(ne(t,n),e)},Ye=function(t,e){return R(re(t),e)},Je=function(t){return Jt(t)},Ze=function(t,e,n){return Xe(t,(function(t){return Xt(t,e)}),n)},Qe=function(t,e){return Ye(t,(function(t){return Xt(t,e)}))},tn="data-ephox-mobile-fullscreen-style",en="display:none!important;",nn="position:absolute!important;",rn="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",on="background-color:rgb(255,255,255)!important;",an=He.os.isAndroid(),un=function(t){var e=xe(t,"background-color");return void 0!==e&&""!==e?"background-color:"+e+"!important":on},cn=function(t,e,n){var r=function(t){return Qe(t,"*:not(.tox-silver-sink)")},o=function(e){return function(n){var r=ve(n,"style"),o=void 0===r?"no-styles":r.trim();o!==e&&(pe(n,tn,o),we(n,t.parseStyle(e)))}},i=Ze(e,"*"),a=I(i,r),u=un(n);N(a,o(en)),N(i,o(nn+rn+u));var c=!0===an?"":nn;o(c+rn+u)(e)},sn=function(t){var e=Je("["+tn+"]");N(e,(function(e){var n=ve(e,tn);"no-styles"!==n?we(e,t.parseStyle(n)):be(e,"style"),be(e,tn)}))},ln=Le.DOM,fn=function(){return Pe(window)},dn=function(t){return window.scrollTo(t.x,t.y)},mn=ze().fold((function(){return{bind:m,unbind:m}}),(function(t){var e=A(),n=E(),r=E(),o=function(){document.body.scrollTop=0,document.documentElement.scrollTop=0},i=function(){window.requestAnimationFrame((function(){e.on((function(e){return we(e,{top:t.offsetTop+"px",left:t.offsetLeft+"px",height:t.height+"px",width:t.width+"px"})}))}))},a=Fe.throttle((function(){o(),i()}),50),u=function(t){e.set(t),a(),n.set(Ie("resize",a)),r.set(Ie("scroll",a))},c=function(){e.on((function(){n.clear(),r.clear()})),e.clear()};return{bind:u,unbind:c}})),gn=function(t,e){var n=document.body,r=document.documentElement,o=t.getContainer(),i=Y.fromDom(o),a=Ue(t),u=e.get(),c=Y.fromDom(t.getBody()),s=He.deviceType.isTouch(),l=o.style,f=t.iframeElement,d=f.style,m=function(t){t(n,"tox-fullscreen"),t(r,"tox-fullscreen"),t(o,"tox-fullscreen"),se(i).map((function(t){return le(t).dom})).each((function(e){t(e,"tox-fullscreen"),t(e,"tox-shadowhost")}))},g=function(){s&&sn(t.dom),m(ln.removeClass),mn.unbind(),T.from(e.get()).each((function(t){return t.fullscreenChangeHandler.unbind()}))};if(u)u.fullscreenChangeHandler.unbind(),je(t)&&Ke(a)&&Ge(Qt(a)),d.width=u.iframeWidth,d.height=u.iframeHeight,l.width=u.containerWidth,l.height=u.containerHeight,l.top=u.containerTop,l.left=u.containerLeft,dn(u.scrollPos),e.set(null),Ve(t,!1),g(),t.off("remove",g);else{var h=De(Qt(a),$e(),(function(n){je(t)&&(Ke(a)||null===e.get()||gn(t,e))})),p={scrollPos:fn(),containerWidth:l.width,containerHeight:l.height,containerTop:l.top,containerLeft:l.left,iframeWidth:d.width,iframeHeight:d.height,fullscreenChangeHandler:h};s&&cn(t.dom,i,c),d.width=d.height="100%",l.width=l.height="",m(ln.addClass),mn.bind(i),t.on("remove",g),e.set(p),je(t)&&qe(a),Ve(t,!0)}},hn=function(t,e){t.addCommand("mceFullScreen",(function(){gn(t,e)}))},pn=function(t,e){return function(n){n.setActive(null!==e.get());var r=function(t){return n.setActive(t.state)};return t.on("FullscreenStateChanged",r),function(){return t.off("FullscreenStateChanged",r)}}},vn=function(t,e){var n=function(){return t.execCommand("mceFullScreen")};t.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:pn(t,e)}),t.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:pn(t,e)})};function bn(){e.add("fullscreen",(function(e){var r=t(null);return e.inline||(hn(e,r),vn(e,r),e.addShortcut("Meta+Shift+F","","mceFullScreen")),n(r)}))}bn()})()},f962:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),r=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=tinymce.util.Tools.resolve("tinymce.util.VK"),u=function(t){return t.getParam("tabfocus_elements",":prev,:next")},c=function(t){return t.getParam("tab_focus",u(t))},s=e.DOM,l=function(t){t.keyCode!==a.TAB||t.ctrlKey||t.altKey||t.metaKey||t.preventDefault()},f=function(t){var e=function(e){var u;if(!(e.keyCode!==a.TAB||e.ctrlKey||e.altKey||e.metaKey||e.isDefaultPrevented())){var l,f=function(r){var o=s.select(":input:enabled,*[tabindex]:not(iframe)"),a=function(t){var e=t;return"BODY"===t.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&a(t.parentNode)},c=function(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&n.get(e.id)&&-1!==t.tabIndex&&a(t)};if(i.each(o,(function(e,n){if(e.id===t.id)return u=n,!1})),r>0){for(var l=u+1;l<o.length;l++)if(c(o[l]))return o[l]}else for(l=u-1;l>=0;l--)if(c(o[l]))return o[l];return null},d=i.explode(c(t));if(1===d.length&&(d[1]=d[0],d[0]=":prev"),l=e.shiftKey?":prev"===d[0]?f(-1):s.get(d[0]):":next"===d[1]?f(1):s.get(d[1]),l){var m=n.get(l.id||l.name);l.id&&m?m.focus():o.setTimeout((function(){r.webkit||window.focus(),l.focus()}),10),e.preventDefault()}}};t.on("init",(function(){t.inline&&s.setAttrib(t.getBody(),"tabIndex",null),t.on("keyup",l),r.gecko?t.on("keypress keydown",e):t.on("keydown",e)}))};function d(){t.add("tabfocus",(function(t){f(t)}))}d()})()},fbbd:function(t,e,n){n("3744")},fc39:function(t,e){tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="M15.7 2l1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 01-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2zM18 12l-4.5-4L9 12h9zM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 01-2-2v-5h2zm8-7V4h6a2 2 0 012 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1l.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="M13 11l-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="M18.4 8l1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 01-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8zm1.6 7l-3-3-3 3h6z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0110.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 012 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 017 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7zm12.3 5h-3v10h3v-10zM8 13.8h-.3l-.4.2a2.8 2.8 0 00-.7.4v.1a2.8 2.8 0 00-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 00.8-.3 2.4 2.4 0 00.7-.7 2.5 2.5 0 00.3-.8 1.5 1.5 0 000-.8 1 1 0 00-.2-.4 1 1 0 00-.5-.2H8zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zM7 5.8h-.4a1 1 0 00-.5.3 1 1 0 00-.2.5v.7a2.5 2.5 0 00.3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 000-.8 2.6 2.6 0 00-.3-.8A2.5 2.5 0 007.7 6l-.4-.1H7z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l2 2V3h14zM8.5 15.3h-.3a2.6 2.6 0 00-.8.4 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3L9 18V18l.4-.4.2-.4.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2h-.5zm7 0H15a1 1 0 00-.4.3 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4a2.8 2.8 0 00.5.7h.1a2.8 2.8 0 00.8.6l.4.1h.7l.5-.2.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3h-.3zM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zm8.5-7.1h-11v2h11v-2z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16zm-2 2H8v3h12v-3zm-1-6v2H4v5H2V7h17z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3L18 7v1h-5V5H7v14h9a1 1 0 012 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3z"/><path d="M16.4 9.2a1 1 0 011.4.2l2.4 3.6-2.4 3.6a1 1 0 01-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 01.2-1.4z"/></g></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 110 18 9 9 0 010-18zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 003.2-2.1l-.2-.2a6 6 0 00-1-.6zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 01-2-2.8zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 01-.3-2zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1zm3-1.4l-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 00-1.3-3.5zm-9 0l2 .2V5.5a9 9 0 00-2 2.2zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 00-2-2.3zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 011.9-2.5zm4.4 0l.1.1a10 10 0 011.8 2.4l1.1-.7a7.5 7.5 0 00-3-1.8z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zM7 3.6l3.7 3.7a1 1 0 01-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 011.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 011.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 01-1.3 0h-.1a1 1 0 010-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 11v5H8v-5h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 7v5H8V8h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2v-8c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8zm-2 2H5v5h6V6z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 012 2v7h-8v-2h6V6h-6V4z" opacity=".2"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v7h-8v7H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8-7h-6v5h6V6zm-8 0H5v5h6V6z"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 00-2 2v13c0 1.1.9 2 2 2h12a2 2 0 002-2V6a2 2 0 00-2-2H6zm0 12h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 11h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 6h8v3H6V6zm11 0c.6 0 1 .4 1 1v1a1 1 0 11-2 0V7c0-.6.4-1 1-1z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 012 2v13a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2h12zm0 12h-8v3h8v-3zM7 16a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8v-3zM7 11a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8V6zM7 6a1 1 0 00-1 1v1a1 1 0 102 0V7c0-.6-.4-1-1-1z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 011.2 1.5l-.1.1-4.1 3-4-3a1 1 0 011-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8l4 2.9a1 1 0 01-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 01-1-1v-4l-2 1.3a1 1 0 01-1.2-.1l-.1-.1a1 1 0 01.1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}})},fd06:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.util.I18n"),r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(t){return t.getParam("toc_class","mce-toc")},i=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},a=function(t){var e=parseInt(t.getParam("toc_depth","3"),10);return e>=1&&e<=9?e:3},u=function(t){var e=0;return function(){var n=(new Date).getTime().toString(32);return t+n+(e++).toString(32)}},c=u("mcetoc_"),s=function(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")},l=function(t){return f(t).length>0},f=function(t){var e=o(t),n=i(t),u=s(a(t)),l=t.$(u);return l.length&&/^h[1-9]$/i.test(n)&&(l=l.filter((function(n,r){return!t.dom.hasClass(r.parentNode,e)}))),r.map(l,(function(e){var n=e.id;return{id:n||c(),level:parseInt(e.nodeName.replace(/^H/i,""),10),title:t.$.text(e),element:e}}))},d=function(t){for(var e=9,n=0;n<t.length;n++)if(t[n].level<e&&(e=t[n].level),1===e)return e;return e},m=function(t,n){var r="<"+t+' contenteditable="true">',o="</"+t+">";return r+e.DOM.encode(n)+o},g=function(t){var e=h(t);return'<div class="'+t.dom.encode(o(t))+'" contenteditable="false">'+e+"</div>"},h=function(t){var e="",r=f(t),o=d(r)-1;if(!r.length)return"";e+=m(i(t),n.translate("Table of Contents"));for(var a=0;a<r.length;a++){var u=r[a];u.element.id=u.id;var c=r[a+1]&&r[a+1].level;if(o===u.level)e+="<li>";else for(var s=o;s<u.level;s++)e+="<ul><li>";if(e+='<a href="#'+u.id+'">'+u.title+"</a>",c!==u.level&&c)for(s=u.level;s>c;s--)e+=s===c+1?"</li></ul><li>":"</li></ul>";else e+="</li>",c||(e+="</ul>");o=u.level}return e},p=function(t,e){return!e.length||t.dom.getParents(e[0],".mce-offscreen-selection").length>0},v=function(t){var e=o(t),n=t.$("."+e);p(t,n)?t.insertContent(g(t)):b(t)},b=function(t){var e=o(t),n=t.$("."+e);n.length&&t.undoManager.transact((function(){n.html(h(t))}))},y=function(t){t.addCommand("mceInsertToc",(function(){v(t)})),t.addCommand("mceUpdateToc",(function(){b(t)}))},w=function(t){var e=t.$,n=o(t);t.on("PreProcess",(function(t){var r=e("."+n,t.node);r.length&&(r.removeAttr("contentEditable"),r.find("[contenteditable]").removeAttr("contentEditable"))})),t.on("SetContent",(function(){var t=e("."+n);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))}))},x=function(t){return function(e){var n=function(){return e.setDisabled(t.mode.isReadOnly()||!l(t))};return n(),t.on("LoadContent SetContent change",n),function(){return t.on("LoadContent SetContent change",n)}}},C=function(t){return function(e){return e&&t.dom.is(e,"."+o(t))&&t.getBody().contains(e)}},S=function(t){var e=function(){return t.execCommand("mceInsertToc")};t.ui.registry.addButton("toc",{icon:"toc",tooltip:"Table of contents",onAction:e,onSetup:x(t)}),t.ui.registry.addButton("tocupdate",{icon:"reload",tooltip:"Update",onAction:function(){return t.execCommand("mceUpdateToc")}}),t.ui.registry.addMenuItem("toc",{icon:"toc",text:"Table of contents",onAction:e,onSetup:x(t)}),t.ui.registry.addContextToolbar("toc",{items:"tocupdate",predicate:C(t),scope:"node",position:"node"})};function k(){t.add("toc",(function(t){y(t),S(t),w(t)}))}k()})()},ffbe:function(t,e,n){n("8ce1")}}]);