(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-447a22cc"],{"030f":function(e,t,n){(function(e){!function(t){"use strict";var n=function(){},r=function(e,t){return function(){for(var n=[],r=0;r ")+")\n"+e.getErrorInfo()}))},Dt=function(e,t){return kt.serror([{path:e,getErrorInfo:t}])},_t=function(e,t){return Dt(e,(function(){return'Choice schema did not contain choice key: "'+t+'"'}))},Rt=it([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),Bt=function(e,t,n,r){return n.fold((function(n,i,a,u){function c(t){return t=u.extract(e.concat([n]),r,t),kt.map(t,(function(e){return vt(i,r(e))}))}function s(t){return t.fold((function(){var e=vt(i,r(ye.none()));return kt.svalue(e)}),(function(t){return t=u.extract(e.concat([n]),r,t),kt.map(t,(function(e){return vt(i,r(ye.some(e)))}))}))}return a.fold((function(){return kt.bind(I(e,t,n),c)}),(function(e){return kt.bind(L(t,n,e),c)}),(function(){return kt.bind(kt.svalue(ht(t,n)),s)}),(function(e){return kt.bind(function(e,t,n){return t=ht(e,t).map((function(t){return!0===t?n(e):t})),kt.svalue(t)}(t,n,e),s)}),(function(e){var r=e(t);e=kt.map(L(t,n,o({})),(function(e){return ut(r,e)}));return kt.bind(e,c)}))}),(function(e,n){return n=n(t),kt.svalue(vt(e,r(n)))}))},Mt=function(e){return{extract:function(t,n,r){return kt.bindError(e(r,n),(function(e){return n=e,Dt(t,(function(){return n}));var n}))},toString:function(){return"val"},toDsl:function(){return Et.itemOf(e)}}},Pt=function(e){var t=zt(e),n=Le(e,(function(e,t){return t.fold((function(t){return ut(e,wt(t,!0))}),o(e))}),{});return{extract:function(e,r,o){var i,a,u=ke(o)?[]:(u=Ke(i=o),Ie(u,(function(e){return St(i,e)}))),c=Ie(u,(function(e){return!St(n,e)}));return 0===c.length?t.extract(e,r,o):(a=c,Dt(e,(function(){return"There are unsupported fields: ["+a.join(", ")+"] specified"})))},toString:t.toString,toDsl:t.toDsl}},zt=function(e){return{extract:function(t,n,r){var o=t,i=r,a=(t=e,n);return t=Me(e,(function(e){return Bt(o,i,e,a)})),Tt.consolidateObj(t,{})},toString:function(){return"obj{\n"+Me(e,(function(e){return e.fold((function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))})).join("\n")+"}"},toDsl:function(){return Et.objOf(Me(e,(function(e){return e.fold((function(e,t,n,r){return Ot.field(e,n,r)}),(function(e,t){return Ot.state(e)}))})))}}},It=function(e){return{extract:function(t,n,r){return r=Me(r,(function(r,o){return e.extract(t.concat(["["+o+"]"]),n,r)})),Tt.consolidateArr(r)},toString:function(){return"array("+e.toString()+")"},toDsl:function(){return Et.arrOf(e)}}},Lt=o(Mt(kt.svalue)),Ft=r(It,zt),Ht=Rt.state,Vt=Rt.field,Ut=function(e,t,n,r,o){return yt(r,o).fold((function(){return t=r,n=o,Dt(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Nt(t)}));var t,n}),(function(r){return r.extract(e.concat(["branch: "+o]),t,n)}))},jt=Mt(kt.svalue),Wt=function(e){return{extract:function(t,n,r){return e().extract(t,n,r)},toString:function(){return e().toString()},toDsl:function(){return e().toDsl()}}},qt=function(e){return Mt((function(t){return e(t).fold(kt.serror,kt.svalue)}))},$t=function(e,t,n,r){return t=t.extract([e],n,r),kt.mapError(t,(function(e){return{input:r,errors:e}}))},Gt=function(e,t,n){return kt.toResult($t(e,t,i,n))},Xt=function(e){return e.fold((function(e){throw new Error(Kt(e))}),i)},Yt=function(e,t,n){return Xt(Gt(e,t,n))},Kt=function(e){return"Errors: \n"+At(e.errors)+"\n\nInput object: "+Nt(e.input)},Jt=H,Zt=o(jt),Qt=j(Ee,"number"),en=j(xe,"string"),tn=j(ke,"boolean"),nn=j(Te,"function"),rn=Mt((function(e){return W(e)?kt.svalue(e):kt.serror("Expected value to be acceptable for sending via postMessage")})),on=function(e){return Vt(e,e,lt(),Lt())},an=function(e,t){return Vt(e,e,lt(),t)},un=function(e,t){return Vt(e,e,ft(),t)},cn=function(e,t){return un(e,zt(t))},sn=function(e,t){return un(e,Pt(t))},ln=function(e,t){return Vt(e,e,A(t),Lt())},fn=function(e,t,n){return Vt(e,e,A(t),n)},dn=function(e,t){return Ht(e,t)},mn=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return mn(n)}}},gn={fromHtml:function(e,n){if(n=(n||t.document).createElement("div"),n.innerHTML=e,!n.hasChildNodes()||1 "):e[0].name();return wt(t,Vi(n,r))}))})),Ct(n,{})}function No(e){return Gt("custom.definition",zt([Vt("dom","dom",lt(),zt([on("tag"),ln("styles",{}),ln("classes",[]),ln("attributes",{}),Z("value"),Z("innerHtml")])),on("components"),on("uid"),ln("events",{}),ln("apis",{}),Vt("eventOrder","eventOrder",st.mergeWithThunk(o({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]})),Zt()),Z("domModification")]),e)}function Ao(e,t){return void 0===(e=xi(e,t))||""===e?[]:e.split(" ")}function Do(e,n){var r=e.dom(),o=t.window.getComputedStyle(r).getPropertyValue(n);return null===(e=""!==o||Vo(e)?o:aa(r,n))?void 0:e}function _o(e,t,n){return e=gn.fromTag(e),oa(e,t,n),ua(e,t).isSome()}function Ro(e){var t,n=gn.fromTag(e.tag),r=(r=e.attributes,t=n.dom(),Ze(r,(function(e,n){yi(t,n,e)})),Qi(n,e.classes),ia(n,e.styles),e.innerHtml.each((function(e){return ho(n,e)})),e.domChildren);return hi(n,r),e.value.each((function(e){fa(n,e)})),e.uid,Di(n,e.uid),n}function Bo(e,t){return n=e,t=Me(e=t,(function(e){return cn(e.name(),[on("config"),ln("state",Fi)])})),t=Gt("component.behaviours",zt(t),n.behaviours).fold((function(e){throw new Error(Kt(e)+"\nComplete spec:\n"+JSON.stringify(n,null,2))}),(function(e){return e})),{list:e,data:Qe(t,(function(e){var t=e.map((function(e){return{config:e.config,state:e.state.init(e.config)}}));return function(){return t}}))};var n}function Mo(e){t=R("behaviours",{})(n=e),n=Ie(Ke(t),(function(e){return void 0!==t[e]}));var t,n=Me(n,(function(e){return t[e].me}));return Bo(e,n)}function Po(e,t,n){var r=d(d({},(r=e).dom),{uid:r.uid,domChildren:Me(r.components,(function(e){return e.element()}))});e=e.domModification.fold((function(){return So({})}),So),n=0"})),Zt()),Tc=dn("schema",(function(){return[Z("preprocess")]})),ln("defaults",o({}))),jl=ln("overrides",o({})),Wl=zt([Sc,Pu,lc,Ws,Ul,jl]),ql=zt([Sc,Pu,lc,Ul,jl]),$l=(Pu=zt([Sc,Pu,lc,Ws,Ul,jl]),Sc=zt([Sc,Tc,lc,on("unit"),Ws,Ul,jl]),ys(Ys.required,Wl)),Gl=(Tc=ys(Ys.external,ql),ys(Ys.optional,Pu)),Xl=(lc=ys(Ys.group,Sc),o("entirety")),Yl=(Ws=Object.freeze({required:$l,external:Tc,optional:Gl,group:lc,asNamedPart:vs,name:bs,asCommon:function(e){return e.fold(i,i,i,i)},original:Xl}),function(e,t,n,r){return ut(t.defaults(e,n,r),n,{uid:e.partUids[t.name]},t.overrides(e,n,r))}),Kl=function(e){return je(e,(function(e){return e.fold(ye.none,ye.some,ye.none,ye.none).map((function(e){return Y(e.name,e.schema.concat([Na(Xl())]))})).toArray()}))},Jl=function(e,t,n){return r=t,i={},a={},Pe(n,(function(e){e.fold((function(e){i[e.pname]=Fl(!0,(function(t,n,r){return e.factory.sketch(Yl(t,e,n,r))}))}),(function(e){var t=r.parts[e.name];a[e.name]=o(e.factory.sketch(Yl(r,e,t[Xl()]),t))}),(function(e){i[e.pname]=Fl(!1,(function(t,n,r){return e.factory.sketch(Yl(t,e,n,r))}))}),(function(e){i[e.pname]=Hl(!0,(function(t,n,r){var o=t[e.name];return Me(o,(function(n){return e.factory.sketch(ut(e.defaults(t,n,r),n,e.overrides(t,n)))}))}))}))})),{internals:o(i),externals:o(a)};var r,i,a},Zl=function(e,t,n){var r=ye.some(e),o=t;e=t.components,t=n;return t=Qe(t,(function(e,t){return Ll(t,e)})),e=Il(r,o,e,t),Ze(t,(function(e){if(!1===e.used()&&e.required())throw new Error("Placeholder: "+e.name()+" was not found in components list\nNamespace: "+r.getOr("none")+"\nComponents: "+JSON.stringify(o.components,null,2))})),e},Ql=function(e,t,n){return t=t.partUids[n],e.getSystem().getByUid(t).toOption()},ef=function(e,t){var n=e.getSystem();return Qe(t.partUids,(function(e,t){return o(n.getByUid(e))}))},tf=function(e){return Ke(e.partUids)},nf=function(e){return Vt("partUids","partUids",mt((function(t){return Es(t.uid,e)})),Zt())},rf=(Ul=Object.freeze({generate:ws,generateOne:xs,schemas:Kl,names:Cs,substitutes:Jl,components:Zl,defaultUids:Es,defaultUidsSchema:nf,getAllParts:ef,getAllPartNames:tf,getPart:Ql,getPartOrDie:Ss,getParts:ks,getPartsOrDie:Ts}),function(e,t,n,r,o){return o=o,r=(0<(r=r).length?[Y("parts",r)]:[]).concat([on("uid"),ln("dom",{}),ln("components",[]),Na("originalSpec"),ln("debug.sketcher",{})]).concat(o),Yt(e+" [SpecSchema]",Pt(r.concat(t)),n)}),of=function(e){return e.hasOwnProperty("uid")?e:d(d({},e),{uid:Ri("uid")})};function af(e){var t=Yt("Sketcher for "+e.name,Td,e),n=(e=Qe(t.apis,xo),Qe(t.extraApis,yo));return d(d({name:o(t.name),partFields:o([]),configFields:o(t.configFields),sketch:function(e){var n=t.name,r=t.configFields,o=t.factory;return e=of(e),o(rf(n,r,e,[],[]),e)}},e),n)}function uf(e){var t=Yt("Sketcher for "+e.name,Ed,e),n=(e=ws(t.name,t.partFields),Qe(t.apis,xo)),r=Qe(t.extraApis,yo);return d(d({name:o(t.name),partFields:o(t.partFields),configFields:o(t.configFields),sketch:function(e){return Os(t.name,t.configFields,t.partFields,t.factory,e)},parts:o(e)},n),r)}function cf(e){return"input"===Lo(e)&&"radio"!==xi(e,"type")||"textarea"===Lo(e)}function sf(e,t,n,r){var o=_s(e.element(),"."+t.highlightClass);Pe(o,(function(n){Be(r,(function(e){return e.element()===n}))||(Ji(n,t.highlightClass),e.getSystem().getByDom(n).each((function(n){t.onDehighlight(e,n),Gr(n,$r())})))}))}function lf(e,t,n,r){sf(e,t,0,[r]),ff(0,t,0,r)||(Yi(r.element(),t.highlightClass),t.onHighlight(e,r),Gr(r,qr()))}function ff(e,t,n,r){return Zi(r.element(),t.highlightClass)}function df(e,t,n){return vu(e.element(),"."+t.itemClass).bind((function(t){return e.getSystem().getByDom(t).toOption()}))}function mf(e,t,n){return(0<(t=_s(e.element(),"."+t.itemClass)).length?ye.some(t[t.length-1]):ye.none()).bind((function(t){return e.getSystem().getByDom(t).toOption()}))}function gf(e,t,n,r){var o=_s(e.element(),"."+t.itemClass);return Ve(o,(function(e){return Zi(e,t.highlightClass)})).bind((function(t){return t=Qs(t,r,0,o.length-1),e.getSystem().getByDom(o[t]).toOption()}))}function hf(e,t,n){return t=_s(e.element(),"."+t.itemClass),Cu(Me(t,(function(t){return e.getSystem().getByDom(t).toOption()})))}function pf(e,t,n){var r=qe(e.slice(0,t));e=qe(e.slice(t+1));return He(r.concat(e),n)}function vf(e,t,n){return e=qe(e.slice(0,t)),He(e,n)}function bf(e,t,n){var r=e.slice(0,t);e=e.slice(t+1);return He(e.concat(r),n)}function yf(e,t,n){return e=e.slice(t+1),He(e,n)}function wf(e){return function(t){return We(e,(function(e){return e(t)}))}}function xf(e){return!0===e.raw().shiftKey}function Cf(e){return!0===e.raw().ctrlKey}function Sf(e,t){return{matches:e,classification:t}}function kf(e,t,n,r,o){function i(e,t,n,r,o){return n=n(e,t,r,o),Bd(n,t.event()).bind((function(n){return n(e,t,r,o)}))}var a={schema:function(){return e.concat([ln("focusManager",Pd()),fn("focusInside","onFocus",qt((function(e){return Re(["onFocus","onEnterOrSpace","onApi"],e)?we.value(e):we.error("Invalid value for focusInside")}))),Bu("handler",a),Bu("state",t),Bu("sendFocusIn",o)])},processKey:i,toEvents:function(e,t){var a=e.focusInside!==Sd.OnFocusMode?ye.none():o(e).map((function(n){return Xo(Cr(),(function(r,o){n(r,e,t),o.stop()}))}));return Go(a.toArray().concat([Xo(hr(),(function(r,a){i(r,a,n,e,t).fold((function(){var n,i,u;n=r,i=a,u=_d(Dd().concat(Ad()))(i.event()),e.focusInside===Sd.OnEnterOrSpaceMode&&u&&rr(n,i)&&o(e).each((function(r){r(n,e,t),i.stop()}))}),(function(e){a.stop()}))})),Xo(pr(),(function(n,o){i(n,o,r,e,t).each((function(e){o.stop()}))}))]))}};return a}function Tf(e){function t(e,t){(function(e,t){return e=_s(e.element(),t.selector),e=Ie(e,(function(e){return r(t,e)})),ye.from(e[t.firstTabstop])})(e,t).each((function(n){t.focusManager.set(e,n)}))}function n(e,t,n,r){var o=_s(e.element(),n.selector);return i(e,n).bind((function(t){return Ve(o,a(tr,t)).bind((function(t){return u(e,o,t,n,r)}))}))}e=[Z("onEscape"),Z("onEnter"),ln("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),ln("firstTabstop",0),ln("useTabstopAt",o(!0)),Z("visibilitySelector")].concat([e]);var r=function(e,t){return e=e.visibilitySelector.bind((function(e){return bu(t,e)})).getOr(t),0=t.minChars&&t.matches.getOrThunk((function(){return yg(e.dom)}))(n.range,o,n.text)}));return 0===t.length?ye.none():(t=bg.all(Me(t,(function(e){return e.fetch(n.text,e.maxResults,r).then((function(t){return{matchText:n.text,items:t,columns:e.columns,onAction:e.onAction}}))}))),ye.some({lookupData:t,context:n}))},Cg=zt([$("type"),ee("text")]),Sg=zt([dn("type",(function(){return"autocompleteitem"})),dn("active",(function(){return!1})),dn("disabled",(function(){return!1})),ln("meta",{}),$("value"),ee("text"),ee("icon")]),kg=zt([$("type"),$("ch"),ne("minChars",1),ln("columns",1),ne("maxResults",10),te("matches"),X("fetch"),X("onAction")]),Tg=function(e){return Gt("Autocompleter.Separator",Cg,e)},Eg=function(e){return Gt("Autocompleter.Item",Sg,e)},Og=function(e){return Gt("Autocompleter",kg,e)},Ng=function(e){var t={};return Pe(e,(function(e){t[e]={}})),Ke(t)},Ag=(Gd=[ie("disabled",!1),ee("text"),ee("shortcut"),Vt("value","value",dt((function(){return Oi("menuitem-value")})),Zt()),ln("meta",{})],zt([$("type"),ae("onSetup",(function(){return n})),ae("onAction",n),ee("icon")].concat(Gd))),Dg=zt([$("type"),X("getSubmenuItems"),ae("onSetup",(function(){return n})),ee("icon")].concat(Gd)),_g=zt([$("type"),ie("active",!1),ae("onSetup",(function(){return n})),X("onAction")].concat(Gd)),Rg=zt([$("type"),ie("active",!1),ee("icon")].concat(Gd)),Bg=zt([$("type"),G("fancytype",["inserttable","colorswatch"]),ae("onAction",n)]),Mg=function(e,t,n){var r=_s(e.element(),"."+n);return 0t})).getOr(r.length),ye.some({numColumns:e,numRows:Math.ceil(r.length/e)})):ye.none()},Pg={namedEvents:qm,unnamedEvents:function(e){return qm(Oi("unnamed-events"),e)}},zg=(ql=[on("lazySink"),on("tooltipDom"),ln("exclusive",!0),ln("tooltipComponents",[]),ln("delay",300),oe("mode","normal",["normal","follow-highlight"]),ln("anchor",(function(e){return{anchor:"hotspot",hotspot:e,layouts:{onLtr:o([ec,Qu,Yu,Ju,Ku,Zu]),onRtl:o([ec,Qu,Yu,Ju,Ku,Zu])}}})),ka("onHide"),ka("onShow")],$d=Object.freeze({init:function(){function e(){n.get().each((function(e){t.clearTimeout(e)}))}var n=mn(ye.none()),r=mn(ye.none()),i=o("not-implemented");return Hi({getTooltip:function(){return r.get()},isShowing:function(){return r.get().isSome()},setTooltip:function(e){r.set(ye.some(e))},clearTooltip:function(){r.set(ye.none())},clearTimer:e,resetTimer:function(r,o){e(),n.set(ye.some(t.setTimeout((function(){r()}),o)))},readState:i})}}),Oi("tooltip.exclusive")),Ig=Oi("tooltip.show"),Lg=Oi("tooltip.hide"),Fg=Ba({fields:ql,name:"tooltipping",active:Object.freeze({events:function(e,t){function n(n){t.getTooltip().each((function(r){wl(r),e.onHide(n,r),t.clearTooltip()})),t.clearTimer()}return Go(Ue([[Xo(Ig,(function(n){t.resetTimer((function(){var r,o,i;r=n,t.isShowing()||($m(r),o=e.lazySink(r).getOrDie(),i=r.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:Go("normal"===e.mode?[Xo(dr(),(function(e){Gr(r,Ig)})),Xo(lr(),(function(e){Gr(r,Lg)}))]:[]),behaviours:ac([rm.config({})])}),t.setTooltip(i),vl(o,i),e.onShow(r,i),dl.position(o,e.anchor(r),i))}),e.delay)})),Xo(Lg,(function(r){t.resetTimer((function(){n(r)}),e.delay)})),Xo(Tr(),(function(e,t){Re(t.channels(),zg)&&n(e)})),Qo((function(e){n(e)}))],"normal"===e.mode?[Xo(mr(),(function(e){Gr(e,Ig)})),Xo(Sr(),(function(e){Gr(e,Lg)})),Xo(dr(),(function(e){Gr(e,Ig)})),Xo(lr(),(function(e){Gr(e,Lg)}))]:[Xo(qr(),(function(e,t){Gr(e,Ig)})),Xo($r(),(function(e){Gr(e,Lg)}))]]))}}),state:$d,apis:Object.freeze({hideAllExclusive:$m,setComponents:function(e,t,n,r){n.getTooltip().each((function(e){e.getSystem().isConnected()&&rm.set(e,r)}))}})}),Hg=tinymce.util.Tools.resolve("tinymce.util.I18n"),Vg="tox-menu-nav__js",Ug="tox-collection__item",jg="tox-swatch",Wg={normal:Vg,color:jg},qg="tox-collection__item--enabled",$g="tox-collection__item-icon",Gg="tox-collection__item-label",Xg="tox-collection__item-caret",Yg="tox-collection__item-checkmark",Kg="tox-collection__item--active",Jg=function(e){return yt(Wg,e).getOr(Vg)},Zg=tinymce.util.Tools.resolve("tinymce.Env"),Qg=function(e){var t=Zg.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"};e=e.split("+"),e=Me(e,(function(e){var n=e.toLowerCase().trim();return ot(t,n)?t[n]:e}));return Zg.mac?e.join(""):e.join("+")},eh=function(e){return{dom:{tag:"div",classes:[Gg]},components:[ma(Hg.translate(e))]}},th=function(e,t){return{dom:{tag:"div",classes:[Gg]},components:[{dom:{tag:e.tag,attributes:{style:e.styleAttr}},components:[ma(Hg.translate(t))]}]}},nh=function(e,t,n,r){var o;return{dom:(o=jg,n=n.getOr(""),e=e.map((function(e){return' title="'+r.translate(e)+'"'})).getOr(""),Gm("custom"===t?'":"remove"===t?'
"+n+"
":'
")),optComponents:[]}},rh=function(e,t,n,r,o){n=n?e.checkMark.orThunk((function(){return t.or(ye.some("")).map(Xm)})):ye.none();var i=e.ariaLabel.map((function(e){return{attributes:{title:Hg.translate(e)}}})).getOr({});return{dom:ct({tag:"div",classes:[Vg,Ug].concat(o?["tox-collection__item-icon-rtl"]:[])},i),optComponents:[n,e.htmlContent.fold((function(){return e.textContent.map(r)}),(function(e){return ye.some({dom:{tag:"div",classes:[Gg],innerHtml:e}})})),e.shortcutContent.map(Ym),e.caret]}},oh=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],ih=["list-bull-circle","list-bull-default","list-bull-square"],ah=["input","button","textarea","select"],uh=(Pu=Object.freeze({enable:ig,disable:og,isDisabled:ag,onLoad:Zm,set:function(e,t,n,r){(r?og:ig)(e,t,n)}}),Ys=Object.freeze({exhibit:function(e,t,n){return So({classes:t.disabled?t.disableClass.map(T).getOr([]):[]})},events:function(e,t){return Go([no(Er(),(function(t,n){return ag(t,e)})),Da(e,t,Zm)])}}),jl=[ln("disabled",!1),ln("useNative",!0),Z("disableClass"),ka("onDisabled"),ka("onEnabled")],Ba({fields:jl,name:"disabling",active:Ys,apis:Pu})),ch={item:function(e){return uh.config({disabled:e,disableClass:"tox-collection__item--state-disabled"})},button:function(e){return uh.config({disabled:e})},splitButton:function(e){return uh.config({disabled:e,disableClass:"tox-tbtn--disabled"})},toolbarButton:function(e){return uh.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1})}},sh=function(e,t){var n=e.getApi(t);return function(e){e(n)}},lh=function(e,t){return Zo((function(n){sh(e,n)((function(n){n=e.onSetup(n),null!=n&&t.set(n)}))}))},fh=function(e,t){return Qo((function(n){return sh(e,n)(t.get())}))},dh=((em=oy=oy||{})[em.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",em[em.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX",oy),mh=function(e,t){return ti((function(n,r){sh(e,n)(e.onAction),e.triggersSubmenu||t!==dh.CLOSE_ON_EXECUTE||(Gr(n,_r()),r.stop())}))},gh={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},hh=function(e){return je(e,(function(e){return e.toArray()}))},ph=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),vh=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},bh=function(e){return ph.DOM.encode(e)},yh=o(ws(gd(),gm())),wh=Oi("cell-over"),xh=Oi("cell-execute"),Ch=function(e,t,n){function r(n){return Xr(n,xh,{row:e,col:t})}var o;return pa({dom:{tag:"div",attributes:((o={role:"button"})["aria-labelledby"]=n,o)},behaviours:ac([im("insert-table-picker-cell",[Xo(dr(),am.focus),Xo(Er(),r),Xo(Ar(),r)]),sm.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),am.config({onFocus:function(n){return Xr(n,wh,{row:e,col:t})}})])})};function Sh(e){return _h.test(e)||Rh.test(e)}function kh(e){var t=parseInt(e,10);return t.toString()===e&&0<=t&&t<=255}function Th(e){e=Bh(e);var t=parseInt(e[1],16),n=parseInt(e[2],16);e=parseInt(e[3],16);return Vh(t,n,e,1)}function Eh(e,t,n,r){return e=parseInt(e,10),t=parseInt(t,10),n=parseInt(n,10),r=parseFloat(r),Vh(e,t,n,r)}function Oh(e){return"rgba("+e.red()+","+e.green()+","+e.blue()+","+e.alpha()+")"}var Nh,Ah,Dh=function(e){return{value:o(e)}},_h=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Rh=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Bh=function(e){return e=function(e){return e=e.value().replace(_h,(function(e,t,n,r){return t+t+n+n+r+r})),{value:o(e)}}(e),e=Rh.exec(e.value()),null===e?["FFFFFF","FF","FF","FF"]:e},Mh=function(e){return e=e.toString(16),1===e.length?"0"+e:e},Ph=function(e){return e=Mh(e.red())+Mh(e.green())+Mh(e.blue()),Dh(e)},zh=Math.min,Ih=Math.max,Lh=Math.round,Fh=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Hh=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Vh=function(e,t,n,r){return{red:o(e),green:o(t),blue:o(n),alpha:o(r)}},Uh=function(e){var t,n,r,o=(e.hue()||0)%360,i=e.saturation()/100;e=e.value()/100,i=Ih(0,zh(i,1)),e=Ih(0,zh(e,1));if(0===i)return t=n=r=Lh(255*e),Vh(t,n,r,1);o/=60;var a=e*i,u=a*(1-Math.abs(o%2-1));i=e-a;switch(Math.floor(o)){case 0:t=a,n=u,r=0;break;case 1:t=u,n=a,r=0;break;case 2:t=0,n=a,r=u;break;case 3:t=0,n=u,r=a;break;case 4:t=u,n=0,r=a;break;case 5:t=a,n=0,r=u;break;default:t=n=r=0}return t=Lh(255*(t+i)),n=Lh(255*(n+i)),r=Lh(255*(r+i)),Vh(t,n,r,1)},jh=function(e){if("transparent"===e)return ye.some(Vh(0,0,0,0));var t=Fh.exec(e);return null!==t?ye.some(Eh(t[1],t[2],t[3],"1")):(t=Hh.exec(e),null!==t?ye.some(Eh(t[1],t[2],t[3],t[4])):ye.none())},Wh=o(Vh(255,0,0,1)),qh=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),$h="tinymce-custom-colors",Gh="choiceitem",Xh=[{type:Gh,text:"Light Green",value:"#BFEDD2"},{type:Gh,text:"Light Yellow",value:"#FBEEB8"},{type:Gh,text:"Light Red",value:"#F8CAC6"},{type:Gh,text:"Light Purple",value:"#ECCAFA"},{type:Gh,text:"Light Blue",value:"#C2E0F4"},{type:Gh,text:"Green",value:"#2DC26B"},{type:Gh,text:"Yellow",value:"#F1C40F"},{type:Gh,text:"Red",value:"#E03E2D"},{type:Gh,text:"Purple",value:"#B96AD9"},{type:Gh,text:"Blue",value:"#3598DB"},{type:Gh,text:"Dark Turquoise",value:"#169179"},{type:Gh,text:"Orange",value:"#E67E23"},{type:Gh,text:"Dark Red",value:"#BA372A"},{type:Gh,text:"Dark Purple",value:"#843FA1"},{type:Gh,text:"Dark Blue",value:"#236FA1"},{type:Gh,text:"Light Gray",value:"#ECF0F1"},{type:Gh,text:"Medium Gray",value:"#CED4D9"},{type:Gh,text:"Gray",value:"#95A5A6"},{type:Gh,text:"Dark Gray",value:"#7E8C8D"},{type:Gh,text:"Navy Blue",value:"#34495E"},{type:Gh,text:"Black",value:"#000000"},{type:Gh,text:"White",value:"#ffffff"}],Yh=(void 0===(Nh=10)&&(Nh=10),Wd=qh.getItem($h),Wd=xe(Wd)?JSON.parse(Wd):[],Ah=Nh-(Wd=Wd).length<0?Wd.slice(0,Nh):Wd,{add:function(e){(function(e,t){return e=_e(e,t),-1===e?ye.none():ye.some(e)})(Ah,e).each(Kh),Ah.unshift(e),Ah.length>Nh&&Ah.pop(),qh.setItem($h,JSON.stringify(Ah))},state:function(){return Ah.slice(0)}});function Kh(e){Ah.splice(e,1)}function Jh(e){for(var n=[],r=t.document.createElement("canvas"),o=(r.height=1,r.width=1,r.getContext("2d")),i=function(e,t){return t/=255,("0"+Math.round(e*t+255*(1-t)).toString(16)).slice(-2).toUpperCase()},a=0;a'+e+""}))):e})):ye.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:ye.none(),checkMark:ye.none(),caret:ye.none(),value:e.value},a.providers,u,e.icon);return ug({data:cg(e),disabled:e.disabled,getApi:function(){return{}},onAction:function(t){return o(e.value,e.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:(n=e.meta,c=a,rt(n,"tooltipWorker").map((function(e){return[Fg.config({lazySink:c.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(e){return{anchor:"submenu",item:e,overrides:{maxHeightFunction:cl}}},mode:"follow-highlight",onShow:function(t,n){e((function(e){Fg.setComponents(t,[ga({element:gn.fromDom(e)})])}))}})]})).getOr([]))},r,i)},qp=function(e){return e=e.text.fold((function(){return{}}),(function(e){return{innerHtml:e}})),{type:"separator",dom:d({tag:"div",classes:[Ug,"tox-collection__group-heading"]},e),components:[]}},$p=function(e,t,n,r){return void 0===r&&(r=!0),n=Jm({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:ye.none(),ariaLabel:e.text,caret:ye.none(),checkMark:ye.none(),shortcutContent:e.shortcut},n,r),ug({data:cg(e),getApi:function(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},disabled:e.disabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},n,t)},Gp=function(e,t,r,o,i){return void 0===o&&(o=!0),i=(i=void 0!==i&&i)?(i=r.icons,{dom:{tag:"div",classes:[Xg],innerHtml:Rm("chevron-down",i)}}):(i=r.icons,{dom:{tag:"div",classes:[Xg],innerHtml:Rm("chevron-right",i)}}),i=Jm({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:ye.none(),ariaLabel:e.text,caret:ye.some(i),checkMark:ye.none(),shortcutContent:e.shortcut},r,o),ug({data:cg(e),getApi:function(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},disabled:e.disabled,onAction:n,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},i,t)},Xp=function(e,t,n){return n=Jm({iconContent:ye.none(),textContent:e.text,htmlContent:ye.none(),ariaLabel:e.text,checkMark:ye.some(Km(n.icons)),caret:ye.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},n,!0),ut(ug({data:cg(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){sm.set(e,t)},isActive:function(){return sm.isOn(e)},isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},n,t),{toggling:{toggleClass:qg,toggleOnExecute:!1,selected:e.active}})},Yp=function(e,t){return n=jp,r=e.fancytype,(Object.prototype.hasOwnProperty.call(n,r)?ye.some(n[r]):ye.none()).map((function(n){return n(e,t)}));var n,r},Kp=((Sc=Up=Up||{})[Sc.ContentFocus=0]="ContentFocus",Sc[Sc.UiFocus=1]="UiFocus",function(e){return Be(e,zp)}),Jp=function(e,t,n,r,o){var i=Kp(t);t=Cu(Me(t,(function(e){function t(e){return Ip(e,n,r,a(e),o)}var a=function(e){return o?!e.hasOwnProperty("text"):i};return"nestedmenuitem"===e.type&&e.getSubmenuItems().length<=0?t(ct(e,{disabled:!0})):t(e)})));return(o?up:Rp)(e,i,t,1,"normal")},Zp=function(e){return Sm.singleData(e.value,e)},Qp=function(e,n){function r(r,o){var i=Su(o,(function(e){return ye.from(e.columns)})).getOr(1);return je(o,(function(o){var a,u,s,l,m,h,p=o.items;return p=p,a=o.matchText,u=function(n,i){var a=e.selection.getRng();Vm(e.dom,a,r).fold((function(){return t.console.error("Lost context. Cursor probably moved")}),(function(e){e=e.range;var t={hide:function(){d()},reload:function(e){f(),g(e)}};c.set(!0),o.onAction(t,e,n,i),c.set(!1)}))},s=dh.BUBBLE_TO_SANDBOX,l=n,h=!(m=1===i)||Kp(p),Cu(Me(p,(function(e){return"separator"===e.type?Tg(e).fold(_p,(function(e){return ye.some(qp(e))})):Eg(e).fold(_p,(function(e){return ye.some(Wp(e,a,m,"normal",u,s,l,h))}))})))}))}function o(t){var n,r,o;l()||(r=e,o=t.range,n=mg(gn.fromDom(r.selection.getNode())).getOrThunk((function(){var e=gn.fromHtml('',r.getDoc());return mi(e,gn.fromDom(o.extractContents())),o.insertNode(e.dom()),ii(e).each((function(e){return e.dom().normalize()})),Ds(e).map((function(e){r.selection.setCursorLocation(e.dom(),Ns(e))})),e})),u.set(ye.some({triggerChar:t.triggerChar,element:n,matchLength:t.text.length})),c.set(!1))}function i(t,n,r,o){t.matchLength=n.text.length;var i,a,u;n=Su(r,(function(e){return ye.from(e.columns)})).getOr(1);km.showAt(s,{anchor:"node",root:gn.fromDom(e.getBody()),node:ye.from(t.element)},vm.sketch((r=Rp("autocompleter-value",!0,o,n,"normal"),t=n,o=Up.ContentFocus,n="normal",i=(o===Up.ContentFocus?zd:Pd)(),a=Pp(t,n),u=Ep(n),{dom:r.dom,components:r.components,items:r.items,value:r.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:a,fakeFocus:o===Up.ContentFocus,focusManager:i,menuBehaviours:Pg.unnamedEvents("auto"!==t?[]:[Zo((function(e,t){Mg(e,4,u.item).each((function(t){var n=t.numColumns;t=t.numRows;nm.setGridSize(e,t,n)}))}))])}))),km.getContent(s).each(Nd.highlightFirst)}function a(t){return u.get().map((function(n){return Vm(e.dom,e.selection.getRng(),n.triggerChar).bind((function(n){return xg(e,m,n,t)}))})).getOrThunk((function(){return t=e,r=(n=m)(),o=t.selection.getRng(),wg(t.dom,o,r).bind((function(e){return xg(t,n,e)}));var t,n,r,o}))}var u=mn(ye.none()),c=mn(!1),s=pa(km.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ac([im("dismissAutocompleter",[Xo(Hr(),(function(){return d()}))])]),lazySink:n.getSink})),l=function(){return u.get().isSome()},f=function(){l()&&km.hide(s)},d=function(){var t;l()&&(t=u.get().map((function(e){return e.element})),mg(t.getOr(gn.fromDom(e.selection.getNode()))).each(mo),f(),u.set(ye.none()),c.set(!1))},m=N((function(){return t=(t=e).ui.registry.getAll().popups,t=Qe(t,(function(e){return Og(e).fold((function(e){throw new Error(Kt(e))}),(function(e){return e}))})),n=Ng(tt(t,(function(e){return e.ch}))),r=nt(t),{dataset:t,triggerChars:n,lookupByChar:function(e){return Ie(r,(function(t){return t.ch===e}))}};var t,n,r})),g=function(e){a(e).fold(d,(function(e){o(e.context),e.lookupData.then((function(t){u.get().map((function(n){var o,a=e.context;n.triggerChar===a.triggerChar&&(0<(o=r(a.triggerChar,t)).length?i(n,a,t,o):(10<=a.text.length-n.matchLength?d:f)())}))}))}))},h={onKeypress:Lm((function(e){27!==e.which&&g()}),50),cancelIfNecessary:d,isMenuOpen:function(){return km.isOpen(s)},isActive:l,isProcessingAction:c.get,getView:function(){return km.getContent(s)}};vg(h,e)},ev=function(e,t,n,r){return Fp(e,t,n,r,!1)},tv=o(!0),nv=function(e,t,n){return ev(e,t,tv,n)},rv=function(e,t,n){return Fp(e,t,tv,n,!0)},ov=Lp;function iv(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},schedule:function(){for(var o=[],i=0;i"}function cb(e,t,n){return{uid:e.uid,dom:e.dom,components:t,behaviours:Bl(e.formBehaviours,[_l.config({store:{mode:"manual",getValue:function(t){return t=ef(t,e),Qe(t,(function(e,t){return e().bind((function(e){return e=Od.getCurrent(e),fw(e,"missing current")})).map(_l.getValue)}))},setValue:function(t,n){Ze(n,(function(n,r){Ql(t,e,r).each((function(e){Od.getCurrent(e).each((function(e){_l.setValue(e,n)}))}))}))}}})]),apis:{getField:function(t,n){return Ql(t,e,n).bind(Od.getCurrent)}}}}function sb(e){return kw(e)}function lb(e,t,n){return _l.config(ut({store:{mode:"manual",getValue:t,setValue:n}},e.map((function(e){return{store:{initialValue:e}}})).getOr({})))}function fb(e,t,n){return lb(e,(function(e){return t(e.element())}),(function(e,t){return n(e.element(),t)}))}function db(e,t){function n(e,t){t.stop()}function r(e){return function(t,n){Pe(e,(function(e){e(t,n)}))}}function o(e,t){uh.isDisabled(e)||(t=t.event().raw(),a(e,t.dataTransfer.files))}function i(e,t){t=t.event().raw().target.files,a(e,t)}var a=function(t,n){var r;_l.setValue(t,(n=n,r=new RegExp("("+Nw.split(/\s*,\s*/).join("|")+")$","i"),Ie(Ye(n),(function(e){return r.test(e.name)})))),Xr(t,Rb,{name:e.name})},u=Dm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ac([im("input-file-events",[ao(Ar())])])}),c=e.label.map((function(e){return ty(e,t)})),s=Vb.parts().field({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ac([Ow.memory([]),ww(),uh.config({}),sm.config({toggleClass:"dragenter",toggleOnExecute:!1}),im("dropzone-events",[Xo("dragenter",r([n,sm.toggle])),Xo("dragleave",r([n,sm.toggle])),Xo("dragover",n),Xo("drop",r([n,o])),Xo(br(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},Am.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(e){u.get(e).element().dom().click()},buttonBehaviours:ac([Jb.config({})])})]}]}}}});return Zb(c,s,["tox-form__group--stretched"],[])}function mb(e){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:ac([am.config({ignore:!0}),Jb.config({})])}}function gb(e,t){Xr(e,hr(),{raw:{which:9,shiftKey:t}})}function hb(e,t){var n,r,o=Rw&&e.sandboxed,i=d(d({},e.label.map((function(e){return{title:e}})).getOr({})),o?{sandbox:"allow-scripts allow-same-origin"}:{}),a=(n=o,r=mn(""),{getValue:function(e){return r.get()},setValue:function(e,t){n?wi(e.element(),"srcdoc",t):(wi(e.element(),"src","javascript:''"),(e=e.element().dom().contentWindow.document).open(),e.write(t),e.close()),r.set(t)}});o=e.label.map((function(e){return ty(e,t)})),e=Vb.parts().field({factory:{sketch:function(e){return _w.craft({uid:e.uid,dom:{tag:"iframe",attributes:i},behaviours:ac([Jb.config({}),am.config({}),Ow.withComp(ye.none(),a.getValue,a.setValue)])})}}});return Zb(o,e,["tox-form__group--stretched"],[])}var pb,vb,bb,yb,wb,xb,Cb=af({name:"Container",factory:function(e){var t=e.dom,n=t.attributes;t=m(t,["attributes"]);return{uid:e.uid,dom:d({tag:"div",attributes:d({role:"presentation"},n)},t),components:e.components,behaviours:Rl(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[ln("components",[]),gs("containerBehaviours",[]),ln("events",{}),ln("domModification",{}),ln("eventOrder",{})]}),Sb=tinymce.util.Tools.resolve("tinymce.EditorManager"),kb=function(e){return e.getParam("readonly",!1,"boolean")},Tb=function(e){return!1!==e.getParam("menubar",!0,"boolean")},Eb=function(e){var t=e.getParam("toolbar",!0),n=!0===t,r=xe(t);t=Se(t)&&0'}});return af({factory:function(e){var a=o({x:o(0),y:o(0)}),u=ac([Od.config({find:ye.some}),am.config({})]);return cw.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[r,i],onChange:function(e,t,n){Xr(e,wy(),{value:n})},onInit:function(e,t,r,o){n(r.element().dom(),Oh(Wh()))},sliderBehaviours:u})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(e,t,r){var o=t;o=t.components()[0].element().dom(),n(o,Oh(r))}},extraApis:{}})},yw=function(e,t){return af({name:"ColourPicker",configFields:[on("dom"),ln("onValidHex",n),ln("onInvalidHex",n)],factory:function(n){function r(e,t){d.getOpt(e).each((function(e){var n=Th(t);f.paletteRgba().set(n),l.setRgba(e,n)}))}function i(e,t){m.getOpt(e).each((function(e){s.updateHex(e,t)}))}function a(e,t,n){Pe(n,(function(n){n(e,t)}))}var u,c,s=vw(e,t,n.onValidHex,n.onInvalidHex),l=bw(e,t),f={paletteRgba:o(mn(Wh()))},d=Dm(l.sketch({})),m=Dm(s.sketch({}));return{uid:n.uid,dom:n.dom,components:[d.asSpec(),sw(e,t),m.asSpec()],behaviours:ac([im("colour-picker-events",[Xo(wy(),(c=[i],function(e,t){t=t.event().value();var n=function(e){var t=0,n=e.red()/255,r=e.green()/255,o=(e=e.blue()/255,Math.min(n,Math.min(r,e))),i=Math.max(n,Math.max(r,e));if(o===i)return vy(0,0,100*(t=o));var a=n===o?3:e===o?1:5,u=(i-o)/i;t=i;return vy(Math.round(60*(a-(n===o?r-e:e===o?n-r:e-n)/(i-o))),Math.round(100*u),Math.round(100*t))}(f.paletteRgba().get());n=vy(n.hue(),t.x(),100-t.y()),t=Uh(n),n=Ph(t);a(e,n,c)})),Xo(yy(),(u=[r,i],function(e,t){t=function(e){return e=vy((100-e)/100*360,100,100),e=Uh(e),Ph(e)}(t.event().value().y()),a(e,t,u)}))]),Od.config({find:function(e){return m.getOpt(e)}}),nm.config({mode:"acyclic"})])}}})},ww=function(){return Od.config({find:ye.some})},xw=function(e){return Od.config({find:e.getOpt})},Cw=function(e){return Od.config({find:function(t){return ci(t.element(),e).bind((function(e){return t.getSystem().getByDom(e).toOption()}))}})},Sw={"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"},kw=function(e){return Sw[e]},Tw=tinymce.util.Tools.resolve("tinymce.Resource"),Ew=zt([ln("preprocess",i),ln("postprocess",i)]),Ow={memento:function(e,t){var n=Yt("RepresentingConfigs.memento processors",Ew,t);return _l.config({store:{mode:"manual",getValue:function(t){return t=e.get(t),t=_l.getValue(t),n.postprocess(t)},setValue:function(t,r){r=n.preprocess(r),t=e.get(t),_l.setValue(t,r)}}})},withElement:fb,withComp:lb,domValue:function(e){return fb(e,la,fa)},domHtml:function(e){return fb(e,go,ho)},memory:function(e){return _l.config({store:{mode:"memory",initialValue:e}})}},Nw=".jpg,.jpeg,.png,.gif",Aw=Oi("alloy-fake-before-tabstop"),Dw=Oi("alloy-fake-after-tabstop"),_w={isPseudoStop:function(e){return Vp(e,["."+Aw,"."+Dw].join(","),o(!1))},onFocus:function(e,t){t=t.element(),Zi(t,Aw)?gb(e,!0):Zi(t,Dw)&&gb(e,!1)},craft:function(e){return{dom:{tag:"div",classes:["tox-navobj"]},components:[mb([Aw]),e,mb([Dw])],behaviours:ac([Cw(1)])}}},Rw=!(Xn().browser.isIE()||Xn().browser.isEdge());function Bw(e,n){return zw(t.document.createElement("canvas"),e,n)}function Mw(e){var t=Bw(e.width,e.height);return Pw(t).drawImage(e,0,0),t}function Pw(e){return e.getContext("2d")}function zw(e,t,n){return e.width=t,e.height=n,e}function Iw(e){return e.naturalWidth||e.width}function Lw(e){return e.naturalHeight||e.height}var Fw,Hw,Vw=window.Promise||(Fw=Uw.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){t.setTimeout(e,1)},Hw=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Uw.prototype.catch=function(e){return this.then(null,e)},Uw.prototype.then=function(e,t){var n=this;return new Uw((function(r,o){Ww.call(n,new Xw(e,t,r,o))}))},Uw.all=function(){for(var e=[],t=0;t").css({position:"absolute",top:0,left:0,width:b.width,height:b.height,zIndex:2147483647,opacity:1e-4,cursor:v}).appendTo(u.body),pC(u).on("mousemove touchmove",s).on("mouseup touchend",l),n.start(e)},function(e){if(xC(e),e.button!==o)return l(e);e.deltaX=e.screenX-i,e.deltaY=e.screenY-a,e.preventDefault(),n.drag(e)}),l=function(e){xC(e),pC(u).off("mousemove touchmove",s).off("mouseup touchend",l),r.remove(),n.stop&&n.stop(e)};this.destroy=function(){pC(c).off()},pC(c).on("mousedown touchstart",e)}function SC(e){function t(e,t){s.getOpt(e).each((function(e){var n=o.get(),u=nu(e.element()),c=Ya(e.element()),s=t.dom().naturalWidth*n,l=t.dom().naturalHeight*n,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"};ia(t,m),r.getOpt(e).each((function(e){ia(e.element(),m)})),i.get().each((function(e){var t=a.get();e.setRect({x:t.x*n+f,y:t.y*n+d,w:t.w*n,h:t.h*n}),e.setClampRect({x:f,y:d,w:s,h:l}),e.setViewPortRect({x:0,y:0,w:u,h:c})}))}))}function n(e,n){var r=gn.fromTag("img");return wi(r,"src",n),EC(r.dom()).then((function(){return s.getOpt(e).map((function(e){var n,i=ga({element:r}),c=(i=(rm.replaceAt(e,1,ye.some(i)),u.get()),{x:0,y:0,w:r.dom().naturalWidth,h:r.dom().naturalHeight}),l=(u.set(c),vC.inflate(c,-20,-20));return a.set(l),i.w===c.w&&i.h===c.h||(n=r,s.getOpt(e).each((function(e){var t=nu(e.element()),r=(e=Ya(e.element()),n.dom().naturalWidth),i=n.dom().naturalHeight;t=Math.min(t/r,e/i);1<=t?o.set(1):o.set(t)}))),t(e,r),r}))}))}var r=Dm({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),o=mn(1),i=mn(ye.none()),a=mn({x:0,y:0,w:1,h:1}),u=mn({x:0,y:0,w:1,h:1}),c=Cb.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[r.asSpec(),{dom:{tag:"img",attributes:{src:e}}},{dom:{tag:"div"},behaviours:ac([im("image-panel-crop-events",[Zo((function(e){s.getOpt(e).each((function(e){e=e.element().dom(),e=TC.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,(function(){})),e.toggleVisibility(!1),e.on("updateRect",(function(e){e=e.rect;var t=o.get();e={x:Math.round(e.x/t),y:Math.round(e.y/t),w:Math.round(e.w/t),h:Math.round(e.h/t)};a.set(e)})),i.set(ye.some(e))}))}))])])}],containerBehaviours:ac([rm.config({}),im("image-panel-events",[Zo((function(t){n(t,e)}))])])}),s=Dm(c);return{memContainer:s,updateSrc:n,zoom:function(e,n){var r=o.get();n=0').appendTo(r),yC.each(f,(function(e){pC("#"+s,r).append('"})),ho(r.element(),n.join("")),"auto"===e.columns&&Mg(t,5,"tox-collection__item").each((function(e){var n=e.numRows;e=e.numColumns;nm.setGridSize(t,n,e)})),Gr(t,Hb)}}),Jb.config({}),nm.config((u=e.columns,r="normal",1===u?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===u?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===r?".tox-swatches__row":".tox-collection__group",cell:"color"===r?"."+jg:"."+Ug}})),im("collection-events",a)])});return Zb(o,u,["tox-form__group--collection"],[])}function WC(e,t){function n(e){return{dom:{tag:"tr"},components:Me(e,o)}}var r,o=function(e){return{dom:{tag:"td",innerHtml:t.translate(e)}}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(r=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:Me(r,(function(e){return{dom:{tag:"th",innerHtml:t.translate(e)}}}))}]}),(r=e.cells,{dom:{tag:"tbody"},components:Me(r,n)})],behaviours:ac([Jb.config({}),am.config({})])}}function qC(e){return function(t,n,r){return yt(n,"name").fold((function(){return e(n,r)}),(function(o){return t.field(o,e(n,r))}))}}function $C(e,t,n){var r=ut(n,{shared:{interpreter:function(t){return GC(e,t,r)}}});return GC(e,t,r)}function GC(e,n,r){return yt(kT,n.type).fold((function(){return t.console.error('Unknown factory type "'+n.type+'", defaulting to container: ',n),n}),(function(t){return t(e,n,r)}))}function XC(e){return Fe(e,(function(e,t){var n;return ot(t,"items")?(n=XC(t.items),{customFormats:e.customFormats.concat(n.customFormats),formats:e.formats.concat([{title:t.title,items:n.formats}])}):ot(t,"inline")||ot(t,"block")||ot(t,"selector")?(n="custom-"+t.title.toLowerCase(),{customFormats:e.customFormats.concat([{name:n,format:t}]),formats:e.formats.concat([{title:t.title,format:n,icon:t.icon}])}):d(d({},e),{formats:e.formats.concat(t)})}),{customFormats:[],formats:[]})}function YC(e,t){function n(t){Pe(t,(function(t){e.formatter.has(t.name)||e.formatter.register(t.name,t.format)}))}var r=XC(t);return e.formatter?n(r.customFormats):e.on("init",(function(){n(r.customFormats)})),r.formats}function KC(e,t,n){return t={type:"formatter",isSelected:t(e.format),getStylePreview:n(e.format)},ut(e,t)}function JC(e,t,n,r){function i(t){return Me(t,(function(t){var a,u,c,s=Ke(t);return St(t,"items")?(a=i(t.items),ut((u=t,c={type:"submenu",isSelected:o(!1),getStylePreview:function(){return ye.none()}},ut(u,c)),{getStyleItems:function(){return a}})):St(t,"format")?KC(t,n,r):1===s.length&&Re(s,"title")?ut(t,{type:"separator"}):(c=Oi((u=t).title),s={type:"formatter",format:c,isSelected:n(c),getStylePreview:r(c)},u=ut(u,s),e.formatter.register(c,u),u)}))}return i(t)}function ZC(e){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}function QC(e,t,n,r,o){return{type:e,title:t,url:n,level:r,attach:o}}function eS(e){return e.innerText||e.textContent}function tS(e){return e&&/^(H[1-6])$/.test(e.nodeName)}function nS(e){return LT(e)&&!IT(e)}function rS(e){return 0 .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ac([Jb.config({}),am.config({})])}}function ES(e){return ZT.sketch(TS(e))}function OS(e){var t=xE(e,rE.getOverflow),n=rE.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return rE.sketch(d(d({},t),{lazySink:e.getSink,getAnchor:function(){return e.backstage.shared.anchors.toolbarOverflow()},getOverflowBounds:function(){var t=e.moreDrawerData.lazyHeader().element(),n=mu(t);t=oi(t),t=mu(t);return fu(n.x()+4,t.y(),n.width()-8,t.height())},parts:d(d({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"]}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))}function NS(e){var t=hE.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=hE.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}});e=xE(e,hE.getOverflow);return hE.sketch(d(d({},e),{components:[t,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(e){e.getSystem().broadcastOn([yE()],{type:"opened"})},onClosed:function(e){e.getSystem().broadcastOn([yE()],{type:"closed"})}}))}function AS(e){var t=e.cyclicKeying?"cyclic":"acyclic";return YT.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"]},components:[YT.parts().groups({})],toolbarBehaviours:wE(e,t,o(ye.none()))})}function DS(e){return Gt("toolbarbutton",CE,e)}function _S(e){return Gt("menubutton",SE,e)}function RS(e){return Gt("ToggleButton",TE,e)}function BS(e,t,n,r,o,i){function a(e){return Hg.isRtl()&&Re(ME,e)?e+"-rtl":e}var u=Hg.isRtl()&&e.exists((function(e){return Re(PE,e)}));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]).concat(u?["tox-tbtn__icon-rtl"]:[]),attributes:RE(n,i)},components:hh([e.map((function(e){return Wx(a(e),i.icons)})),t.map((function(e){return $x(e,"tox-tbtn",i)}))]),eventOrder:((u={})[cr()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:ac([im("common-button-display-events",[Xo(cr(),(function(e,t){t.event().prevent(),Gr(e,BE)}))])].concat(r.map((function(n){return NE.config({channel:n,initialData:{icon:e,text:t},renderComponents:function(e,t){return hh([e.icon.map((function(e){return Wx(a(e),i.icons)})),e.text.map((function(e){return $x(e,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}}function MS(e,t,n){return zE(e,{toolbarButtonBehaviours:[].concat(0=r.y()}var r}))}function ek(e,t){return Ci(e,t)?ye.some(parseInt(xi(e,t),10)):ye.none()}function tk(e,t){return ek(e,t.leftAttr).bind((function(n){return ek(e,t.topAttr).map((function(t){var r=nu(e),o=Ya(e);return fu(n,t,r,o)}))}))}function nk(e,t,n){var r=xi(e,t.positionAttr);switch(Si(e=e,(t=t).leftAttr),Si(e,t.topAttr),Si(e,t.positionAttr),r){case"static":return ye.some(LO.static());case"absolute":return ye.some(LO.absolute(n.x(),n.y()));default:return ye.none()}}function rk(e,t,n,r,o){var i,a,u,c=du(e);return QS(t.modes,c,n)?ye.none():(u=Do(e,"position"),e=e,t=t,i=c.x(),a=c.y(),u=u,wi(e,t.leftAttr,i),wi(e,t.topAttr,a),wi(e,t.positionAttr,u),i=zO(c.x(),c.y()),a=XS(i,r,o),e=zO(n.x(),n.y()),t=XS(e,r,o),u=c.y()<=n.y()?t.top():t.top()+n.height()-c.height(),ye.some(LO.fixed(a.left(),u)))}function ok(e,t,r){var o,i,a;r.isDocked()&&(i=t,t=r,a=(o=e).element(),t.setDocked(!1),HO(o,i).each((function(e){e.fold((function(){return VO(o,i)}),(function(e,t){var n=ri(a),r=(n=ou(n),DO(a));UO(o,i,n,r,zO(e,t))}),n)})),t.setVisible(!0),i.contextual.each((function(e){ea(a,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(o)})),WO(o,i,t))}function ik(e){var t=e.element();ii(t).each((function(n){var r;qO.isDocked(e)?(r=nu(n),oa(t,"width",r+"px"),r=Ka(t),oa(n,"padding-top",r+"px")):(ca(t,"width"),ca(n,"padding-top"))}))}function ak(e,t){t?(Ji(e,$O.fadeOutClass),Qi(e,[$O.transitionClass,$O.fadeInClass])):(Ji(e,$O.fadeInClass),Qi(e,[$O.fadeOutClass,$O.transitionClass]))}function uk(e,t){e=gn.fromDom(e.getContainer()),t?(Yi(e,GO),Ji(e,XO)):(Yi(e,XO),Ji(e,GO))}function ck(e,t){function n(e){t().each((function(t){return e(t.element())}))}function r(n){e.inline||ik(n),uk(e,qO.isDocked(n)),n.getSystem().broadcastOn([Tl()],{}),t().each((function(e){return e.getSystem().broadcastOn([Tl()],{})}))}var o,i=mn(ye.none());return[qO.config({leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",contextual:d({lazyContext:function(t){t=Ka(t.element());var n=e.inline?e.getContentAreaContainer():e.getContainer();n=du(gn.fromDom(n)),t=n.height()-t;return ye.some(fu(n.x(),n.y(),n.width(),t))},onShow:function(){n((function(e){return ak(e,!0)}))},onShown:function(e){n((function(e){return ea(e,[$O.transitionClass,$O.fadeInClass])})),i.get().each((function(t){var n,r,o;n=e.element(),o=ri(r=t),mc(o).filter((function(e){return!tr(r,e)})).filter((function(e){return tr(e,gn.fromDom(o.dom().body))||nr(n,e)})).each((function(){return dc(r)})),i.set(ye.none())}))},onHide:function(e){var r;i.set((e=e.element(),r=t,gc(e).orThunk((function(){return r().toOption().bind((function(e){return gc(e.element())}))})))),n((function(e){return ak(e,!1)}))},onHidden:function(){n((function(e){return ea(e,[$O.transitionClass])}))}},$O),modes:["top"],onDocked:r,onUndocked:r}),am.config({}),fc.config({channels:((o={})[yE()]={onReceive:function(e){ik(e)}},o)})]}function sk(e){return""}function lk(e,t,n){function r(t){return tf(e)}function o(t,n){return void 0===n&&(n=void 0),function(r,o){return Ql(r,e,o).map((function(e){return t(e,o)})).getOr(n)}}function i(e,t){return"true"!==xi(e.element(),"aria-hidden")}var a,u=o(i,!1),c=o((function(e,t){var n;i(e)&&(n=e.element(),oa(n,"display","none"),wi(n,"aria-hidden","true"),Xr(e,Ur(),{name:t,visible:!1}))})),s=function(e,t){Pe(t,(function(t){return a(e,t)}))},l=o((function(e,t){var n;i(e)||(n=e.element(),ca(n,"display"),Si(n,"aria-hidden"),Xr(e,Ur(),{name:t,visible:!0}))}));u={getSlotNames:r,getSlot:function(t,n){return Ql(t,e,n)},isShowing:u,hideSlot:a=c,hideAllSlots:function(e){return s(e,r())},showSlot:l};return{uid:e.uid,dom:e.dom,components:t,behaviours:Rl(e.slotBehaviours),apis:u}}function fk(e){return{element:function(){return e.element().dom()}}}function dk(e,t){var r=Me(Ke(t),(function(e){var n=t[e];n=Xt(Gt("sidebar",nN,n));return{name:e,getApi:fk,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return Me(r,(function(t){var o=mn(n);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Pg.unnamedEvents([lh(t,o),fh(t,o),Xo(Ur(),(function(e,t){var n=t.event();He(r,(function(e){return e.name===n.name()})).each((function(t){(n.visible()?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))}function mk(e){return Od.getCurrent(e).bind((function(e){return dE.isGrowing(e)||dE.hasGrown(e)?Od.getCurrent(e).bind((function(e){return He(tN.getSlotNames(e),(function(t){return tN.isShowing(e,t)}))})):ye.none()}))}function gk(e,t,n){function r(e){e!==o.get()&&(aN(t(),e,n.providers),o.set(e))}var o=mn(!1),i=mn(ye.none());e.on("ProgressState",(function(t){var n;i.get().each(zm.clearTimeout),Ee(t.time)?(n=zm.setEditorTimeout(e,(function(){return r(t.state)}),t.time),i.set(ye.some(n))):(r(t.state),i.set(ye.none()))}))}function hk(e,t){var n=ct(sN,t.menus),r=0'+e+""}}};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(r=[],e.getParam("elementpath",!0,"boolean")&&r.push(tA.renderElementPath(e,{})),Vn(e.settings.plugins,"wordcount")&&r.push(nA(e,t)),e.getParam("branding",!0,"boolean")&&r.push(i()),r=0'),components:[],behaviours:ac([NE.config({channel:WA,initialData:e,updateState:function(e,n){var r=Me(n.buttons,(function(e){var n=Dm(uC(e,e.type,t));return{name:e.name,align:e.align,memento:n}}));return ye.some({lookupByName:function(e,t){return n=e,o=t,He(r,(function(e){return e.name===o})).bind((function(e){return e.memento.getOpt(n)}));var n,o},footerButtons:r})},renderComponents:Zk})])}}function eT(e,t){var n;return e.getRoot().getSystem().isConnected()?(n=Od.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper()),dw.getField(n,t).fold((function(){var r=e.getFooter();return NE.getState(r).get().bind((function(e){return e.lookupByName(n,t)}))}),(function(e){return ye.some(e)}))):ye.none()}function tT(e){return Am.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),title:e.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:''}}],action:function(e){Gr(e,Mb)}})}function nT(e,t,n){function r(e){return[ma(n.translate(e.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:d({},t.map((function(e){return{id:e}})).getOr({}))},components:r(e),behaviours:ac([NE.config({channel:UA,renderComponents:r})])}}function rT(){return{dom:Gm('
')}}function oT(e){var t=e.backstage.shared;return{open:function(n,r){function o(e){sA.hide(u),r(e)}var i=Dm(uC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:ye.none()},"submit",e.backstage)),a=uC({name:"no",text:"No",primary:!0,align:"end",disabled:!1,icon:ye.none()},"cancel",e.backstage),u=pa(wD({lazySink:function(){return t.getSink()},headerOverride:ye.some(mD),partSpecs:{title:pD(),close:hD((function(){o(!1)}),t.providers),body:vD(n,t.providers),footer:bD(yD([],[a,i.asSpec()]))},onCancel:function(){return o(!1)},onSubmit:function(){return o(!0)},extraClasses:["tox-confirm-dialog"]}));sA.show(u),n=i.get(u);am.focus(n)}}}var iT,aT,uT,cT=af({name:"HtmlSelect",configFields:[on("options"),gs("selectBehaviours",[am,_l]),ln("selectClasses",[]),ln("selectAttributes",{}),Z("data")],factory:function(e,t){var n=Me(e.options,(function(e){return{dom:{tag:"option",value:e.value,innerHtml:e.text}}})),r=e.data.map((function(e){return wt("initialValue",e)})).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:n,behaviours:Bl(e.selectBehaviours,[am.config({}),_l.config({store:d({mode:"manual",getValue:function(e){return la(e.element())},setValue:function(t,n){He(e.options,(function(e){return e.value===n})).isSome()&&fa(t.element(),n)}},r)})])}}}),sT=(Wd=Object.freeze({events:function(e,t){var n=e.stream.streams.setup(e,t);return Go([Xo(e.event,n),Qo((function(){return t.cancel()}))].concat(e.cancelEvent.map((function(e){return[Xo(e,(function(){return t.cancel()}))]})).getOr([])))}}),Sc=Object.freeze({throttle:BC,init:function(e){return e.stream.streams.state(e)}}),tm=[an("stream",U("mode",{throttle:[on("delay"),ln("stopEvent",!0),Bu("streams",{setup:function(e,t){var n=e.stream,r=Lm(e.onStream,n.delay);return t.setTimer(r),function(e,t){r.throttle(e,t),n.stopEvent&&t.stop()}},state:BC})]})),ln("event","input"),Z("cancelEvent"),Ea("onStream")],Ba({fields:tm,name:"streaming",active:Wd,state:Sc})),lT=function(e,t){e=e.element();var n=la(e),r=e.dom();"number"!==xi(e,"type")&&t(r,n)},fT=o("alloy.typeahead.itemexecute"),dT=(Xd=o([Z("lazySink"),on("fetch"),ln("minChars",5),ln("responseTime",1e3),ka("onOpen"),ln("getHotspot",ye.some),ln("getAnchorOverrides",o({})),ln("layouts",ye.none()),ln("eventOrder",{}),ue("model",{},[ln("getDisplayText",(function(e){return void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value})),ln("selectsOver",!0),ln("populateFromBrowse",!0)]),ka("onSetValue"),Ta("onExecute"),ka("onItemExecute"),ln("inputClasses",[]),ln("inputAttributes",{}),ln("inputStyles",{}),ln("matchWidth",!0),ln("useMinWidth",!1),ln("dismissOnBlur",!0),Ca(["openClass"]),Z("initialData"),gs("typeaheadBehaviours",[am,_l,sT,nm,sm,ny]),dn("previewing",(function(){return mn(!0)}))].concat(qn()).concat(Iv())),Ys=o([Tc({schema:[xa()],name:"menu",overrides:function(e){return{fakeFocus:!0,onHighlight:function(t,n){e.previewing.get()?t.getSystem().getByUid(e.uid).each((function(r){zC(e.model,r,n).fold((function(){return Nd.dehighlight(t,n)}),(function(e){return e()}))})):t.getSystem().getByUid(e.uid).each((function(t){e.model.populateFromBrowse&&MC(e.model,t,n)})),e.previewing.set(!1)},onExecute:function(t,n){return t.getSystem().getByUid(e.uid).toOption().map((function(e){return Xr(e,fT(),{item:n}),!0}))},onHover:function(t,n){e.previewing.set(!1),t.getSystem().getByUid(e.uid).each((function(t){e.model.populateFromBrowse&&MC(e.model,t,n)}))}}}})]),uf({name:"Typeahead",configFields:Xd(),partFields:Ys(),factory:function(e,t,r,o){function i(t,r,i){e.previewing.set(!1);var u=ny.getCoupled(t,"sandbox");Sl.isOpen(u)?Od.getCurrent(u).each((function(e){Nd.getHighlighted(e).fold((function(){i(e)}),(function(){Zr(u,e.element(),"keydown",r)}))})):uy(e,a(t),t,u,o,(function(e){Od.getCurrent(e).each(i)}),xb.HighlightFirst).get(n)}function a(e){return function(t){return t.map((function(t){var n=nt(t.menus);n=je(n,(function(e){return Ie(e.items,(function(e){return"item"===e.type}))}));return _l.getState(e).update(Me(n,(function(e){return e.data}))),t}))}}var u=Ub(e),c=[am.config({}),_l.config({onSetValue:e.onSetValue,store:d({mode:"dataset",getDataKey:function(e){return la(e.element())},getFallbackEntry:function(e){return{value:e,meta:{}}},setValue:function(t,n){fa(t.element(),e.model.getDisplayText(n))}},e.initialData.map((function(e){return wt("initialValue",e)})).getOr({}))}),sT.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:function(t,r){var i,u=ny.getCoupled(t,"sandbox");am.isFocused(t)&&la(t.element()).length>=e.minChars&&(i=Od.getCurrent(u).bind((function(e){return Nd.getHighlighted(e).map(_l.getValue)})),e.previewing.set(!0),uy(e,a(t),t,u,o,(function(t){Od.getCurrent(u).each((function(t){i.fold((function(){e.model.selectsOver&&Nd.highlightFirst(t)}),(function(e){Nd.highlightBy(t,(function(t){return _l.getValue(t).value===e.value})),Nd.getHighlighted(t).orThunk((function(){return Nd.highlightFirst(t),ye.none()}))}))}))}),xb.HighlightFirst).get(n))},cancelEvent:Rr()}),nm.config({mode:"special",onDown:function(e,t){return i(e,t,Nd.highlightFirst),ye.some(!0)},onEscape:function(e){return e=ny.getCoupled(e,"sandbox"),Sl.isOpen(e)?(Sl.close(e),ye.some(!0)):ye.none()},onUp:function(e,t){return i(e,t,Nd.highlightLast),ye.some(!0)},onEnter:function(t){var n,r=ny.getCoupled(t,"sandbox"),o=Sl.isOpen(r);return o&&!e.previewing.get()?Od.getCurrent(r).bind((function(e){return Nd.getHighlighted(e)})).map((function(e){return Xr(t,fT(),{item:e}),!0})):(n=_l.getValue(t),Gr(t,Rr()),e.onExecute(r,t,n),o&&Sl.close(r),ye.some(!0))}}),sm.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),ny.config({others:{sandbox:function(t){return Pv(e,t,{onOpen:function(){return sm.on(t)},onClose:function(){return sm.off(t)}})}}}),im("typeaheadevents",[ti((function(t){Mv(e,a(t),t,o,n,xb.HighlightFirst).get(n)})),Xo(fT(),(function(t,n){var r=ny.getCoupled(t,"sandbox");MC(e.model,t,n.event().item()),Gr(t,Rr()),e.onItemExecute(t,r,n.event().item(),_l.getValue(t)),Sl.close(r),PC(t)}))].concat(e.dismissOnBlur?[Xo(Sr(),(function(e){e=ny.getCoupled(e,"sandbox"),gc(e.element()).isNone()&&Sl.close(e)}))]:[]))];return{uid:e.uid,dom:Ov(ut(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:d(d({},u),Bl(e.typeaheadBehaviours,c)),eventOrder:e.eventOrder}}})),mT=function(e){return d(d({},e),{toCached:function(){return mT(e.toCached())},bindFuture:function(t){return mT(e.bind((function(e){return e.fold((function(e){return Xb.pure(we.error(e))}),(function(e){return t(e)}))})))},bindResult:function(t){return mT(e.map((function(e){return e.bind(t)})))},mapResult:function(t){return mT(e.map((function(e){return e.map(t)})))},mapError:function(t){return mT(e.map((function(e){return e.mapError(t)})))},foldResult:function(t,n){return e.map((function(e){return e.fold(t,n)}))},withTimeout:function(n,r){return mT(Xb.nu((function(o){var i=!1,a=t.setTimeout((function(){i=!0,o(we.error(r()))}),n);e.get((function(e){i||(t.clearTimeout(a),o(e))}))})))}})},gT=IC,hT={type:"separator"},pT=function(e){return HC("header",e.targets)},vT=function(e){return HC("anchor",e.targets)},bT=function(e){return ye.from(e.anchorTop).map((function(e){return FC("",e)})).toArray()},yT=function(e){return ye.from(e.anchorBottom).map((function(e){return FC("",e)})).toArray()},wT=function(e){return Me(e,(function(e){return FC(e,e)}))},xT=function(e){return Fe(e,(function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(hT,t)}),[])},CT=function(e,t){var n=e.toLowerCase();return Ie(t,(function(e){var t=(void 0!==e.meta&&void 0!==e.meta.text?e.meta:e).text;return Vn(t.toLowerCase(),n)||Vn(e.value.toLowerCase(),n)}))},ST=Oi("aria-invalid"),kT={bar:qC((function(e,t){return t=t.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:Me(e.items,t.interpreter)}})),collection:qC((function(e,t){return jC(e,t.shared.providers)})),alertbanner:qC((function(e,t){return n=e,e=t.shared.providers,Cb.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+n.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Am.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Rm(n.icon,e.icons),attributes:{title:e.translate(n.iconTooltip)}},action:function(e){Xr(e,Pb,{name:"alert-banner",value:n.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(n.text)}}]});var n})),input:qC((function(e,t){return e=e,t=t.shared.providers,RC({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:e.disabled,classname:"tox-textfield",validation:ye.none(),maximized:e.maximized},t)})),textarea:qC((function(e,t){return e=e,t=t.shared.providers,RC({name:e.name,multiline:!0,label:e.label,inputMode:ye.none(),placeholder:e.placeholder,flex:!0,disabled:e.disabled,classname:"tox-textarea",validation:ye.none(),maximized:e.maximized},t)})),label:qC((function(e,t){return e=e,t=t.shared,n={dom:{tag:"label",innerHtml:t.providers.translate(e.label),classes:["tox-label"]}},e=Me(e.items,t.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[n].concat(e),behaviours:ac([ww(),rm.config({}),Ow.domHtml(ye.none()),nm.config({mode:"acyclic"})])};var n})),iframe:(iT=function(e,t){return hb(e,t.shared.providers)},function(e,t,n){return t=ut(t,{source:"dynamic"}),qC(iT)(e,t,n)}),button:qC((function(e,t){return _x(e,t.shared.providers)})),checkbox:qC((function(e,t){return UC(e,t.shared.providers)})),colorinput:qC((function(e,t){return Lv(e,t.shared,t.colorinput)})),colorpicker:qC((function(e){function n(e){return"tox-"+e}var r=yw(sb,n),o=Dm(r.sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(e){Xr(e,Pb,{name:"hex-valid",value:!0})},onInvalidHex:function(e){Xr(e,Pb,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[o.asSpec()],behaviours:ac([_l.config({store:{mode:"manual",getValue:function(e){return e=o.get(e),Od.getCurrent(e).bind((function(e){return _l.getValue(e).hex})).map((function(e){return"#"+e})).getOr("")},setValue:function(e,n){var r=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n);n=o.get(e);Od.getCurrent(n).fold((function(){t.console.log("Can not find form")}),(function(e){_l.setValue(e,{hex:ye.from(r[1]).getOr("")}),dw.getField(e,"hex").each((function(e){Gr(e,vr())}))}))}}}),ww()])}})),dropzone:qC((function(e,t){return db(e,t.shared.providers)})),grid:qC((function(e,t){return t=t.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+e.columns+"col"]},components:Me(e.items,t.interpreter)}})),selectbox:qC((function(e,t){return n=e,r=t.shared.providers,e=Me(n.items,(function(e){return{text:r.translate(e.text),value:e.value}})),t=n.label.map((function(e){return ty(e,r)})),e=Vb.parts().field({dom:{},selectAttributes:{size:n.size},options:e,factory:cT,selectBehaviours:ac([uh.config({disabled:n.disabled}),Jb.config({}),im("selectbox-change",[Xo(br(),(function(e,t){Xr(e,Rb,{name:n.name})}))])])}),o=1=t.bottom()?(t=Math.min(i+n,e.y()),fu(o,n,r,t-n)):(t=Math.max(n,e.bottom()),fu(o,t,r,i-(t-n)))},VE=function(e,t,n){t=LS(t,n);var r=t.x;t=t.width;return fu(r,n.y(),t,n.height())},UE=function(e,t){function n(e){return e.dom()===t.getBody()}var r=gn.fromDom(t.selection.getNode());return HS(r,e.inNodeScope).orThunk((function(){return HS(r,e.inEditorScope).orThunk((function(){for(var t=function(t){return HS(t,e.inNodeScope)},i=n,a=r.dom(),u=Te(i)?i:o(!1);a.parentNode;){a=a.parentNode;var c=gn.fromDom(a),s=t(c);if(s.isSome())return s;if(u(c))break}return ye.none()}))}))},jE=function(e,t){function n(e,n){var r=Xt(Gt("ContextForm",EE,n));(o[e]=r).launch.map((function(o){u["form:"+e]=d(d({},n.launch),{type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:function(){t(r)}})})),("editor"===r.scope?a:i).push(r),c[e]=r}function r(e,t){Gt("ContextToolbar",OE,t).each((function(n){("editor"===t.scope?a:i).push(n),c[e]=n}))}var o={},i=[],a=[],u={},c={},s=Ke(e);return Pe(s,(function(t){var o=e[t];"contextform"===o.type?n(t,o):"contexttoolbar"===o.type&&r(t,o)})),{forms:o,inNodeScope:i,inEditorScope:a,lookupTable:c,formNavigators:u}},WE=Oi("forward-slide"),qE=Oi("backward-slide"),$E=Oi("change-slide-event"),GE="tox-pop--resizing",XE=function(e){return function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))}}},YE=function(e,t,n){var r=n.dataset,o="basic"===r.type?function(){return Me(r.data,(function(e){return KC(e,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:US(0,t,n),getStyleItems:o}},KE=function(e){return{type:"basic",data:e}},JE=((Ys=aT=aT||{})[Ys.SemiColon=0]="SemiColon",Ys[Ys.Space=1]="Space",function(e,t,n,r){return e=yt(e.settings,t).getOr(n),t=e,n=r===aT.SemiColon?t.replace(/;$/,"").split(";"):t.split(" "),{type:"basic",data:Me(n,(function(e){var t=e,n=e;e=e.split("=");return 1n;return o||n||v(t)}function a(){km.hide(h)}function u(){b.get().each((function(e){var t=h.element();ca(t,"display"),i()?oa(t,"display","none"):dl.positionWithinBounds(n,e,h,o())}))}function c(t){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:ac([nm.config({mode:"acyclic"}),im("pop-dialog-wrap-events",[Zo((function(t){e.shortcuts.add("ctrl+F9","focus statusbar",(function(){return nm.focusIn(t)}))})),Qo((function(t){e.shortcuts.remove("ctrl+F9")}))])])}}function s(e,t){t="node"===e?r.backstage.shared.anchors.node(t):r.backstage.shared.anchors.cursor();return ut(t,(t=e,e=g(),"line"===t?{bubble:pc(xO,0,CO),layouts:{onLtr:function(){return[tc]},onRtl:function(){return[nc]}},overrides:SO}:{bubble:pc(0,xO,CO),layouts:e?TO:kO,overrides:SO}))}function l(){var t=x();UE(t,e).fold((function(){b.set(ye.none()),km.hide(h)}),(function(e){S(e.toolbarApi,ye.some(e.elem.dom()))}))}function f(e){k(),w.set(e)}var d,m,g=Xn().deviceType.isTouch,h=pa((d={sink:n,onEscape:function(){return e.focus(),ye.some(!0)}},m=mn([]),km.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(e){m.set([]),km.getContent(e).each((function(e){ca(e.element(),"visibility")})),Ji(e.element(),GE),ca(e.element(),"width")},inlineBehaviours:ac([im("context-toolbar-events",[Jo(wr(),(function(e,t){km.getContent(e).each((function(e){})),Ji(e.element(),GE),ca(e.element(),"width")})),Xo($E,(function(e,t){ca(e.element(),"width");var n=nu(e.element()),r=(km.setContent(e,t.event().contents()),Yi(e.element(),GE),nu(e.element()));oa(e.element(),"width",n+"px"),km.getContent(e).each((function(n){t.event().focus().bind((function(t){return dc(t),gc(e.element())})).orThunk((function(){return nm.focusIn(n),mc()}))})),zm.setTimeout((function(){oa(e.element(),"width",r+"px")}),0)})),Xo(WE,(function(e,t){km.getContent(e).each((function(e){m.set(m.get().concat([{bar:e,focus:mc()}]))})),Xr(e,$E,{contents:t.event().forwardContents(),focus:ye.none()})})),Xo(qE,(function(e,t){Xe(m.get()).each((function(t){m.set(m.get().slice(0,m.get().length-1)),Xr(e,$E,{contents:va(t.bar),focus:t.focus})}))}))]),nm.config({mode:"special",onEscape:function(e){return Xe(m.get()).fold((function(){return d.onEscape()}),(function(t){return Gr(e,qE),ye.some(!0)}))}})]),lazySink:function(){return we.value(d.sink)}}))),p=Tb(e)||Eb(e)||Nb(e),v=function(t){var n,r=vu(gn.fromDom(e.getContainer()),".tox-editor-header").getOrDie(),o="fixed"===Do(r,"position");return!(!p||!o)&&(o=r.dom().getBoundingClientRect(),e.inline?t.bottoma.y();i!==n.isVisible()&&(n.setVisible(i),o&&!i?(Qi(e.element(),[t.fadeOutClass]),t.onHide(e)):(i?JS:ZS)(e,t))}))}))},WO=function(e,t,n){var r,o,i,a,u,c,s;e.getSystem().isConnected()&&(r=e,i=n,a=(o=t).lazyViewport(r),e=r.element(),n=ri(e),u=ou(n),c=DO(e),(s=i.isDocked())&&jO(r,o,i,a),FO(r,o,a,u,c).each((function(e){i.setDocked(!s),e.fold((function(){return VO(r,o)}),(function(e,t){return UO(r,o,u,c,zO(e,t))}),(function(e,t){jO(r,o,i,a,!0),UO(r,o,u,c,IO(e,t))}))})))},qO=(ql=Object.freeze({refresh:WO,reset:ok,isDocked:function(e,t,n){return n.isDocked()}}),qd=Object.freeze({events:function(e,t){return Go([Jo(wr(),(function(n,r){e.contextual.each((function(e){Zi(n.element(),e.transitionClass)&&(ea(n.element(),[e.transitionClass,e.fadeInClass]),(t.isVisible()?e.onShown:e.onHidden)(n)),r.stop()}))})),Xo(zr(),(function(n,r){WO(n,e,t)})),Xo(Ir(),(function(n,r){ok(n,e,t)}))])}}),$d=[cn("contextual",[$("fadeInClass"),$("fadeOutClass"),$("transitionClass"),X("lazyContext"),ka("onShow"),ka("onShown"),ka("onHide"),ka("onHidden")]),ae("lazyViewport",gu),$("leftAttr"),$("topAttr"),$("positionAttr"),fn("modes",["top","bottom"],It(en)),ka("onDocked"),ka("onUndocked")],Ba({fields:$d,name:"docking",active:qd,apis:ql,state:Object.freeze({init:function(){var e=mn(!1),t=mn(!0);return Hi({isDocked:function(){return e.get()},setDocked:function(t){return e.set(t)},isVisible:function(){return t.get()},setVisible:function(e){return t.set(e)},readState:function(){return"docked: "+e.get()+", visible: "+t.get()}})}})})),$O={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},GO="tox-tinymce--toolbar-sticky-on",XO="tox-tinymce--toolbar-sticky-off",YO=Object.freeze({setup:function(e,t){e.inline||(e.on("ResizeWindow ResizeEditor ResizeContent",(function(){t().each(ik)})),e.on("SkinLoaded",(function(){t().each(qO.reset)}))),e.on("PostRender",(function(){uk(e,!1)}))},isDocked:function(e){return e().map(qO.isDocked).getOr(!1)},getBehaviours:ck}),KO=(em=n,Pu=s,o([])),JO=Object.freeze({setup:em,isDocked:Pu,getBehaviours:KO}),ZO=af({factory:function(e,t){var n={focus:nm.focusIn,setMenus:function(e,n){n=Me(n,(function(e){var n={type:"menubutton",text:e.text,fetch:function(t){t(e.getItems())}};n=_S(n).mapError((function(e){return Kt(e)})).getOrDie();return Ox(n,"tox-mbtn",t.backstage,ye.some("menuitem"))})),rm.set(e,n)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:ac([rm.config({}),im("menubar-events",[Zo((function(t){e.onSetup(t)})),Xo(dr(),(function(e,t){vu(e.element(),".tox-mbtn--active").each((function(n){bu(t.event().target(),".tox-mbtn").each((function(t){tr(n,t)||e.getSystem().getByDom(n).each((function(n){e.getSystem().getByDom(t).each((function(e){dy.expand(e),dy.close(n),am.focus(e)}))}))}))}))})),Xo(Vr(),(function(e,t){t.event().prevFocus().bind((function(t){return e.getSystem().getByDom(t).toOption()})).each((function(n){t.event().newFocus().bind((function(t){return e.getSystem().getByDom(t).toOption()})).each((function(e){dy.isOpen(n)&&(dy.expand(e),dy.close(n))}))}))}))]),nm.config({mode:"flow",selector:".tox-mbtn",onEscape:function(t){return e.onEscape(t),ye.some(!0)}}),Jb.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[on("dom"),on("uid"),on("onEscape"),on("backstage"),ln("onSetup",n)],apis:{focus:function(e,t){e.focus(t)},setMenus:function(e,t,n){e.setMenus(t,n)}}}),QO="container",eN=[gs("slotBehaviours",[])],tN=(Yn=Qe({getSlotNames:function(e,t){return e.getSlotNames(t)},getSlot:function(e,t,n){return e.getSlot(t,n)},isShowing:function(e,t,n){return e.isShowing(t,n)},hideSlot:function(e,t,n){return e.hideSlot(t,n)},hideAllSlots:function(e,t){return e.hideAllSlots(t)},showSlot:function(e,t,n){return e.showSlot(t,n)}},xo),d(d({},Yn),{sketch:function(e){t=[];var t,n={slot:function(e,n){return t.push(e),xs(QO,sk(e),n)},record:function(){return t}};e=e(n),n=n.record(),n=Me(n,(function(e){return $l({name:e,pname:sk(e)})}));return Os(QO,eN,n,lk,e)}})),nN=zt([ee("icon"),ee("tooltip"),ae("onShow",n),ae("onHide",n),ae("onSetup",(function(){return n}))]),rN=function(e){return tN.sketch((function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:dk(t,e),slotBehaviours:Pg.unnamedEvents([Zo((function(e){return tN.hideAllSlots(e)}))])}}))},oN=Oi("FixSizeEvent"),iN=Oi("AutoSizeEvent"),aN=function(e,t,n){var r=e.element();!0===t?(rm.set(e,[{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:Gm('
')}],behaviours:ac([nm.config({mode:"special",onTab:function(){return ye.some(!0)},onShiftTab:function(){return ye.some(!0)}}),am.config({})])}]),ca(r,"display"),Si(r,"aria-hidden")):(rm.set(e,[]),oa(r,"display","none"),wi(r,"aria-hidden","true"))},uN=(Sc=Wl.optional({factory:ZO,name:"menubar",schema:[on("backstage")]}),Xd=Wl.optional({factory:{sketch:function(e){return NO.sketch({uid:e.uid,dom:e.dom,listBehaviours:ac([nm.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return AS({uid:Oi("multiple-toolbar-item"),backstage:e.backstage,cyclicKeying:!1,getSink:e.getSink,initGroups:[],onEscape:function(){return ye.none()}})},setupItem:function(e,t,n,r){YT.setGroups(t,n)},shell:!0})}},name:"multiple-toolbar",schema:[on("dom"),on("onEscape")]}),oy=Wl.optional({factory:{sketch:function(e){var t;return((t=e).split===pb.sliding?NS:t.split===pb.floating?OS:AS)({uid:e.uid,onEscape:function(){return e.onEscape(),ye.some(!0)},cyclicKeying:!1,initGroups:[],getSink:e.getSink,backstage:e.backstage,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader}})}},name:"toolbar",schema:[on("dom"),on("onEscape"),on("getSink")]}),Wd=Wl.optional({factory:{sketch:function(e){var t=e.editor,n=e.sticky?ck:KO;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:ac(n(t,e.getSink))}}},name:"header",schema:[on("dom")]}),qn=Wl.optional({name:"socket",schema:[on("dom")]}),Ys=Wl.optional({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ac([Jb.config({}),am.config({}),dE.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(e){Od.getCurrent(e).each(tN.hideAllSlots),Gr(e,iN)},onGrown:function(e){Gr(e,iN)},onStartGrow:function(e){Xr(e,oN,{width:ua(e.element(),"width").getOr("")})},onStartShrink:function(e){Xr(e,oN,{width:nu(e.element())+"px"})}}),rm.config({}),Od.config({find:function(e){return e=rm.contents(e),Ge(e)}})])}],behaviours:ac([Cw(0),im("sidebar-sliding-events",[Xo(oN,(function(e,t){oa(e.element(),"width",t.event().width())})),Xo(iN,(function(e,t){ca(e.element(),"width")}))])])}}},name:"sidebar",schema:[on("dom")]}),jl=Wl.optional({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ac([rm.config({})]),components:[]}}},name:"throbber",schema:[on("dom")]}),uf({name:"OuterContainer",factory:function(e,t,n){return{uid:e.uid,dom:e.dom,components:t,apis:{getSocket:function(t){return AO.getPart(t,e,"socket")},setSidebar:function(t,n){AO.getPart(t,e,"sidebar").each((function(e){var t;t=n,Od.getCurrent(e).each((function(e){return rm.set(e,[rN(t)])}))}))},toggleSidebar:function(t,n){AO.getPart(t,e,"sidebar").each((function(e){var t;t=n,Od.getCurrent(e).each((function(e){Od.getCurrent(e).each((function(n){dE.hasGrown(e)?tN.isShowing(n,t)?dE.shrink(e):(tN.hideAllSlots(n),tN.showSlot(n,t)):(tN.hideAllSlots(n),tN.showSlot(n,t),dE.grow(e))}))}))}))},whichSidebar:function(t){return AO.getPart(t,e,"sidebar").bind(mk).getOrNull()},getHeader:function(t){return AO.getPart(t,e,"header")},getToolbar:function(t){return AO.getPart(t,e,"toolbar")},setToolbar:function(t,n){AO.getPart(t,e,"toolbar").each((function(e){e.getApis().setGroups(e,n)}))},setToolbars:function(t,n){AO.getPart(t,e,"multiple-toolbar").each((function(e){NO.setItems(e,n)}))},refreshToolbar:function(t){AO.getPart(t,e,"toolbar").each((function(e){return e.getApis().refresh(e)}))},getMoreButton:function(t){return AO.getPart(t,e,"toolbar").bind((function(e){return e.getApis().getMoreButton(e)}))},getThrobber:function(t){return AO.getPart(t,e,"throbber")},focusToolbar:function(t){AO.getPart(t,e,"toolbar").orThunk((function(){return AO.getPart(t,e,"multiple-toolbar")})).each((function(e){nm.focusIn(e)}))},setMenubar:function(t,n){AO.getPart(t,e,"menubar").each((function(e){ZO.setMenus(e,n)}))},focusMenubar:function(t){AO.getPart(t,e,"menubar").each((function(e){ZO.focus(e)}))}},behaviours:e.behaviours}},configFields:[on("dom"),on("behaviours")],partFields:[Wd,Sc,oy,Xd,qn,Ys,jl],apis:{getSocket:function(e,t){return e.getSocket(t)},setSidebar:function(e,t,n){e.setSidebar(t,n)},toggleSidebar:function(e,t,n){e.toggleSidebar(t,n)},whichSidebar:function(e,t){return e.whichSidebar(t)},getHeader:function(e,t){return e.getHeader(t)},getToolbar:function(e,t){return e.getToolbar(t)},setToolbar:function(e,t,n){n=Me(n,ES),e.setToolbar(t,n)},setToolbars:function(e,t,n){n=Me(n,(function(e){return Me(e,ES)})),e.setToolbars(t,n)},getMoreButton:function(e,t){return e.getMoreButton(t)},refreshToolbar:function(e,t){return e.refreshToolbar(t)},getThrobber:function(e,t){return e.getThrobber(t)},setMenubar:function(e,t,n){e.setMenubar(t,n)},focusMenubar:function(e,t){e.focusMenubar(t)},focusToolbar:function(e,t){e.focusToolbar(t)}}})),cN="file edit view insert format tools table help",sN={file:{title:"File",items:"newdocument restoredraft | preview | 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 | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable tableprops deletetable row column cell"},help:{title:"Help",items:"help"}},lN=function(e,t,n){var r=n.getParam("removed_menuitems","").split(/[ ,]/);return{text:e.title,getItems:function(){return je(e.items,(function(e){var n=e.toLowerCase();return 0===n.trim().length||Be(r,(function(e){return e===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:t.menuItems[n]?[t.menuItems[n]]:[]}))}}},fN=function(e){return"string"==typeof e?e.split(" "):e},dN=function(e){function t(){e._skinLoaded=!0,sp.fireSkinLoaded(e)}return function(){e.initialized?t():e.on("init",t)}},mN=a(pk,!1),gN=a(pk,!0),hN=ph.DOM,pN=(Wn=Xn(),Wn.os.isiOS()&&Wn.os.version.major<=12),vN={render:function(e,n,r,o,i){var a,u,c,s=mn(0),l=(i=(mN(e),i=gn.fromDom(i.targetNode),l=n.mothership,Cl(i,l,di),ts(Uo(),n.uiMothership),e.on("PostRender",(function(){vk(e,n,r,o),s.set(e.getWin().innerWidth),uN.setMenubar(n.outerContainer,hk(e,r)),uN.setSidebar(n.outerContainer,r.sidebar),bk(e)})),uN.getSocket(n.outerContainer).getOrDie("Could not find expected socket element")),!0===pN&&(ia(i.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"}),a=function(){e.fire("ScrollContent")},u=20,c=null,l={cancel:function(){null!==c&&(t.clearTimeout(c),c=null)},throttle:function(){for(var e=[],n=0;n=c.clientX&&e.top()<=c.clientY&&e.bottom()>=c.clientY})))?(e.once("selectionchange",u),e.once("touchend",(function(){return e.off("selectionchange",u)}))):u())},IN=function(e){return"string"==typeof e?e.split(/[ ,]/):e},LN={shouldNeverUseNative:function(e){return e.settings.contextmenu_never_use_native||!1},getContextMenu:function(e){return t="contextmenu",n="link linkchecker image imagetools table spellchecker configurepermanentpen",r=(e=e).ui.registry.getAll().contextMenus,rt(e.settings,t).map(IN).getOrThunk((function(){return Ie(IN(n),(function(e){return ot(r,e)}))}));var t,n,r},isContextMenuDisabled:function(e){return!1===e.getParam("contextmenu")}},FN={type:"separator"},HN=function(e,t,n){return t=Fe(t,(function(t,r){var o;return ot(e,r)?(o=e[r].update(n),xe(o)?Ak(t,o.split(" ")):0t}))}function a(e){var t=r(e);QN.snapTo(g,t),o(g,e,(function(e){return e.bottom<0}),(function(e,t){return e.bottom>t}))}var u=mn([]),c=mn([]),s={getSnapPoints:function(){return Me(u.get(),n)},leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,n){p.set(n.td),e.fire("tableselectorchange",{start:p.get(),finish:v.get()})},mustSnap:!0},l={getSnapPoints:function(){return Me(c.get(),r)},leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,n){v.set(n.td),e.fire("tableselectorchange",{start:p.get(),finish:v.get()})},mustSnap:!0},f=Dm(Am.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ac([QN.config(rA.deviceType.isTouch()?{mode:"touch",snaps:s}:{mode:"mouse",blockerClass:"blocker",snaps:s}),my.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"]}})),d=Dm(Am.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ac([QN.config(rA.deviceType.isTouch()?{mode:"touch",snaps:l}:{mode:"mouse",blockerClass:"blocker",snaps:l}),my.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"]}})),m=pa(f.asSpec()),g=pa(d.asSpec()),h=mn(!1),p=mn(null),v=mn(null);rA.deviceType.isTouch()&&(e.on("tableselectionchange",(function(e){h.get()||(vl(t,m),vl(t,g),h.set(!0)),p.set(e.start),v.set(e.finish),e.otherCells.each((function(t){u.set(t.upOrLeftCells),c.set(t.downOrRightCells),i(e.start),a(e.finish)}))})),e.on("resize ScrollContent",(function(){var e;e=p.get(),i(e),e=v.get(),a(e)})),e.on("tableselectionclear",(function(){h.get()&&(wl(m),wl(g),h.set(!1))})))},iA=5,aA=function(e){var t=mn(ye.none()),n=mn(!1),r=Lm((function(t){e.fire("longpress",d(d({},t),{type:"longpress"})),n.set(!0)}),400);e.on("touchstart",(function(e){Fk(e).each((function(i){r.cancel(),i={x:o(i.clientX),y:o(i.clientY),target:o(e.target)},r.throttle(e),n.set(!1),t.set(ye.some(i))}))}),!0),e.on("touchmove",(function(o){r.cancel(),Fk(o).each((function(r){t.get().each((function(o){var i,a;i=r,o=o,a=Math.abs(i.clientX-o.x()),i=Math.abs(i.clientY-o.y()),(iA'),components:[nT(e,ye.some(t),n),rT(),tT(n)],containerBehaviours:ac([QN.config({mode:"mouse",blockerClass:"blocker",getTarget:function(e){return bu(e,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})},eD=Zg.deviceType.isTouch(),tD=function(e,t){return e={title:t.shared.providers.translate(e),draggable:t.dialog.isDraggableModal()},t=t.shared.providers,n=sA.parts().title(nT(e,ye.none(),t)),r=sA.parts().draghandle(rT()),t=sA.parts().close(tT(t)),n=[n].concat(e.draggable?[r]:[]).concat([t]),Cb.sketch({dom:Gm('
'),components:n});var n,r},nD=function(e,t){return{onClose:function(){return t.closeWindow()},onBlock:function(t){sA.setBusy(e(),(function(e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":t.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:Gm('
')}]}}))},onUnblock:function(){sA.setIdle(e())}}},rD=function(e,t,n,r){return pa(sA.sketch({lazySink:r.shared.getSink,onEscape:function(e){return Gr(e,Mb),ye.some(!0)},useTabstopAt:function(e){return!_w.isPseudoStop(e)},modalBehaviours:ac(g([NE.config({channel:VA,updateState:function(e,t){return ye.some(t)},initialData:t}),Ow.memory({}),am.config({}),im("execute-on-form",n.concat([Jo(mr(),(function(e,t){nm.focusIn(e)}))])),im("scroll-lock",[Zo((function(){Yi(Uo(),"tox-dialog__disable-scroll")})),Qo((function(){Ji(Uo(),"tox-dialog__disable-scroll")}))])],e.extraBehaviours)),eventOrder:((r={})[Er()]=["execute-on-form"],r[Tr()]=["reflecting","receiving"],r[Lr()]=["scroll-lock","reflecting","messages","execute-on-form","alloy.base.behaviour"],r[Fr()]=["alloy.base.behaviour","execute-on-form","messages","reflecting","scroll-lock"],r),dom:{tag:"div",classes:["tox-dialog"].concat(e.extraClasses),styles:d({position:"relative"},e.extraStyles)},components:g([e.header,e.body],e.footer.toArray()),dragBlockClass:"tox-dialog-wrap",parts:{blocker:{dom:Gm('
'),components:[{dom:{tag:"div",classes:eD?["tox-dialog-wrap__backdrop","tox-dialog-wrap__backdrop--opaque"]:["tox-dialog-wrap__backdrop"]}}]}}}))},oD=function(e){return Me(e,(function(e){return"menu"===e.type?(n=Me((t=e).items,(function(e){var t=mn(!1);return d(d({},e),{storage:t})})),d(d({},t),{items:n})):e;var t,n}))},iD=function(e){return Fe(e,(function(e,t){return"menu"===t.type?Fe(t.items,(function(e,t){return e[t.name]=t.storage,e}),e):e}),{})},aD=tinymce.util.Tools.resolve("tinymce.util.URI"),uD=function(e){function t(t){e.getSystem().isConnected()&&t(e)}return{block:function(e){if(!xe(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t((function(t){Xr(t,Ib,{message:e})}))},unblock:function(){t((function(e){Gr(e,Lb)}))},close:function(){t((function(e){Gr(e,Bb)}))},sendMessage:function(e){t((function(t){t.getSystem().broadcastOn([qA],e)}))}}},cD=["insertContent","setContent","execCommand","close","block","unblock"],sD=function(e){return Ce(e)&&-1!==cD.indexOf(e.mceAction)},lD=function(e){return!sD(e)&&Ce(e)&&ot(e,"mceAction")},fD=function(e,t,n){switch(n.mceAction){case"insertContent":e.insertContent(n.content);break;case"setContent":e.setContent(n.content);break;case"execCommand":var r=!!ke(n.ui)&&n.ui;e.execCommand(n.cmd,r,n.value);break;case"close":t.close();break;case"block":t.block(n.message);break;case"unblock":t.unblock()}},dD=Zg.deviceType.isTouch(),mD={dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]}},gD={dom:{tag:"div",classes:["tox-dialog__header"]}},hD=function(e,t){return sA.parts().close(Am.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:ac([Jb.config({})])}))},pD=function(){return sA.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},vD=function(e,t){return sA.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Gm("

"+t.translate(e)+"

")}]}]})},bD=function(e){return sA.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e})},yD=function(e,t){return[Cb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),Cb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]},wD=function(e){return sA.sketch({lazySink:e.lazySink,onEscape:function(){return e.onCancel(),ye.some(!0)},dom:{tag:"div",classes:["tox-dialog"].concat(e.extraClasses)},components:[ut(e.headerOverride.getOr(gD),{components:[e.partSpecs.title,e.partSpecs.close]}),e.partSpecs.body,e.partSpecs.footer],parts:{blocker:{dom:Gm('
'),components:[{dom:{tag:"div",classes:dD?["tox-dialog-wrap__backdrop","tox-dialog-wrap__backdrop--opaque"]:["tox-dialog-wrap__backdrop"]}}]}},modalBehaviours:ac([im("basic-dialog-events",[Xo(Mb,(function(t,n){e.onCancel()})),Xo(zb,(function(t,n){e.onSubmit()}))])])})},xD=function(e){function r(e,t,n,r){return zA.open((function(e,o,i){function s(){return C.on((function(e){qO.refresh(e)}))}o=Xt(Gt("data",i,o));var l,f,d,m,h,p,v,b,y,w,x,C=(l=mn(ye.none()),{clear:function(){l.set(ye.none())},set:function(e){l.set(ye.some(e))},isSet:function(){return l.get().isSome()},on:function(e){l.get().each(e)}}),S=(i={dataValidator:i,initialData:o,internalDialog:e},f={redial:zA.redial,closeWindow:function(){C.on(km.hide),u.off("ResizeEditor",s),C.clear(),n(S.instanceApi)}},e=a,d=r,m=Oi("dialog-label"),k=Oi("dialog-content"),h=Dm(QA({title:i.internalDialog.title,draggable:!0},m,e.shared.providers)),p=Dm($A({body:i.internalDialog.body},k,e,d)),d=oD(i.internalDialog.buttons),v=iD(d),b=Dm(KA({buttons:d},e)),d=YA.initDialog((function(){return w}),{onBlock:function(){},onUnblock:function(){},onClose:function(){return f.closeWindow()}}),y=pa({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((e={role:"dialog"})["aria-labelledby"]=m,e["aria-describedby"]=""+k,e)},eventOrder:((m={})[Tr()]=[NE.name(),fc.name()],m[Er()]=["execute-on-form"],m[Lr()]=["reflecting","execute-on-form"],m),behaviours:ac([nm.config({mode:"cyclic",onEscape:function(e){return Gr(e,Bb),ye.some(!0)},useTabstopAt:function(e){return!_w.isPseudoStop(e)&&("button"!==Lo(e)||"disabled"!==xi(e,"disabled"))}}),NE.config({channel:VA,updateState:function(e,t){return ye.some(t)},initialData:i}),am.config({}),im("execute-on-form",d.concat([Jo(mr(),(function(e,t){nm.focusIn(e)}))])),Ow.memory({})]),components:[h.asSpec(),p.asSpec(),b.asSpec()]}),w=ZA({getRoot:function(){return y},getFooter:function(){return b.get(y)},getBody:function(){return p.get(y)},getFormWrapper:function(){var e=p.get(y);return Od.getCurrent(e).getOr(e)}},f.redial,v),{dialog:y,instanceApi:w}),k=pa(km.sketch({lazySink:a.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},inlineBehaviours:ac(g([im("window-manager-inline-events",[Xo(Hr(),(function(e,t){Gr(S.dialog,Mb)}))])],(x=u,c?[]:[qO.config({contextual:{lazyContext:function(){return ye.some(du(gn.fromDom(x.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",modes:["top"],lazyViewport:function(){var e=gu(),t=vu(gn.fromDom(x.getContainer()),".tox-editor-header").getOrDie();t=mu(t),t=Math.max(e.y(),t.bottom());return fu(e.x(),t,e.width(),e.bottom()-t)}})])))}));return C.set(k),km.showWithin(k,t,va(S.dialog),ye.some(Uo())),c||(qO.refresh(k),u.on("ResizeEditor",s)),S.instanceApi.setData(o),nm.focusIn(S.dialog),S.instanceApi}),e)}var o,i,a=e.backstage,u=e.editor,c=Ev(u),s=(i=(o=e).backstage.shared,{open:function(e,t){function r(){sA.hide(u),t()}var a=Dm(uC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:ye.none()},"cancel",o.backstage)),u=pa(wD({lazySink:function(){return i.getSink()},headerOverride:ye.some(mD),partSpecs:{title:pD(),close:hD((function(){r()}),i.providers),body:vD(e,i.providers),footer:bD(yD([],[a.asSpec()]))},onCancel:r,onSubmit:n,extraClasses:["tox-alert-dialog"]}));sA.show(u),e=a.get(u);am.focus(e)}}),l=oT(e);return{open:function(e,t,n){return void 0!==t&&"toolbar"===t.inline?r(e,a.shared.anchors.toolbar(),n,t.ariaAttrs):void 0!==t&&"cursor"===t.inline?r(e,a.shared.anchors.cursor(),n,t.ariaAttrs):(o=n,zA.open((function(e,t,n){r={redial:zA.redial,closeWindow:function(){sA.hide(g.dialog),o(g.instanceApi)}},i=a,e=tD((n={dataValidator:n,initialData:t,internalDialog:e}).internalDialog.title,i),u=GA({body:n.internalDialog.body},i),c=oD(n.internalDialog.buttons),s=iD(c),c=JA({buttons:c},i),l=YA.initDialog((function(){return m}),nD((function(){return d}),r)),f="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],e={header:e,body:u,footer:ye.some(c),extraClasses:f,extraBehaviours:[],extraStyles:{}},d=rD(e,n,l,i),m=ZA({getRoot:function(){return d},getBody:function(){return sA.getBody(d)},getFooter:function(){return sA.getFooter(d)},getFormWrapper:function(){var e=sA.getBody(d);return Od.getCurrent(e).getOr(e)}},r.redial,s);var r,i,u,c,s,l,f,d,m,g={dialog:d,instanceApi:m};return sA.show(g.dialog),g.instanceApi.setData(t),g.instanceApi}),e));var o},openUrl:function(e,n){return r=n,zA.openUrl((function(e){o={closeWindow:function(){sA.hide(w.dialog),r(w.instanceApi)}},i=u,c=a,e=tD((n=e).title,c),s=XA(n),l=n.buttons.bind((function(e){return 0===e.length?ye.none():ye.some(JA({buttons:e},c))})),o=YA.initUrlDialog((function(){return y}),nD((function(){return b}),o)),f=d(d({},n.height.fold((function(){return{}}),(function(e){return{height:e+"px","max-height":e+"px"}}))),n.width.fold((function(){return{}}),(function(e){return{width:e+"px","max-width":e+"px"}}))),m=n.width.isNone()&&n.height.isNone()?["tox-dialog--width-lg"]:[],g=new aD(n.url,{base_uri:new aD(t.window.location.href)}),h=g.protocol+"://"+g.host+(g.port?":"+g.port:""),p=mn(ye.none()),v=[im("messages",[Zo((function(){var e=nv(gn.fromDom(t.window),"message",(function(e){g.isSameOrigin(new aD(e.raw().origin))&&(e=e.raw().data,sD(e)?fD(i,y,e):lD(e)&&n.onMessage(y,e))}));p.set(ye.some(e))})),Qo((function(){p.get().each((function(e){return e.unbind()}))}))]),fc.config({channels:((v={})[qA]={onReceive:function(e,t){vu(e.element(),"iframe").each((function(e){e.dom().contentWindow.postMessage(t,h)}))}},v)})],b=rD({header:e,body:s,footer:l,extraClasses:m,extraBehaviours:v,extraStyles:f},n,o,c),y=uD(b);var n,o,i,c,s,l,f,m,g,h,p,v,b,y,w={dialog:b,instanceApi:y};return sA.show(w.dialog),w.instanceApi}),e);var r},alert:function(e,t){s.open(e,(function(){t()}))},close:function(e){e.close()},confirm:function(e,t){l.open(e,(function(e){t(e)}))}}};f.add("silver",(function(e){var t=uA(e),n=t.uiMothership,r=t.backstage,i=t.renderUI;t=t.getUi,Qp(e,r.shared),e=xD({editor:e,backstage:r});return{renderUI:i,getWindowManagerImpl:o(e),getNotificationManagerImpl:function(){return Im(0,{backstage:r},n)},ui:t()}}))}(window)}).call(this,n("c8ba"))},"0335":function(e,t,n){n("0f58")},"07d1":function(e,t,n){n("94ce")},"07d7":function(e,t,n){n("a8b8")},"080b":function(e,t){!function(){"use strict";function e(){return''}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),r=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},o=function(e){return e.getParam("pagebreak_split_block",!1)},i=function(){return"mce-pagebreak"},a=function(t){var n=r(t),i=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(function(e){return"\\"+e})),"gi");t.on("BeforeSetContent",(function(t){t.content=t.content.replace(i,e())})),t.on("PreInit",(function(){t.serializer.addNodeFilter("img",(function(e){for(var r,i,a=e.length;a--;)(i=(r=e[a]).attr("class"))&&-1!==i.indexOf("mce-pagebreak")&&(i=r.parent,t.schema.getBlockElements()[i.name]&&o(t)?(i.type=3,i.value=n,i.raw=!0,r.remove()):(r.type=3,r.value=n,r.raw=!0))}))}))},u=e,c=i,s=function(e){e.addCommand("mcePageBreak",(function(){e.settings.pagebreak_split_block?e.insertContent("

"+u()+"

"):e.insertContent(u())}))},l=function(e){e.on("ResolveName",(function(t){"IMG"===t.target.nodeName&&e.dom.hasClass(t.target,c())&&(t.name="pagebreak")}))},f=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};t.add("pagebreak",(function(e){s(e),f(e),a(e),l(e)}))}()},"0902":function(e,t,n){n("88b6")},"09cf":function(e,t){!function(e){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",(function(){e.console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")}))}(window)},"0a9d":function(e,t,n){n("69a4")},"0efa":function(e,t,n){n("4bdc")},"0f58":function(e,t){!function(){"use strict";function e(){}function t(e){return function(){return e}}var n=tinymce.util.Tools.resolve("tinymce.PluginManager");function r(e,t){if((e=""+e).length":">","&":"&","'":"'"},D={open:function(e,t){function n(e){for(var t=e,n=function(e){return{text:e.text,value:e.text}},r=t.length,o=new Array(r),i=0;i")&&(i="",l.each(o.contentCSS,(function(e){i+=''})),-1!==(s=o.settings.body_class||"").indexOf("=")&&(s=(s=o.getParam("body_class","","hash"))[o.id]||""),c=o.dom.encode,f=(f=o.getBody().dir)?' dir="'+c(f)+'"':"",r=""+i+'"+r+"");var o,i,c=g.replaceTemplateValues(r,d.getPreviewReplaceValues(o)),s=[{type:"selectbox",name:"template",label:"Templates",items:a},{type:"htmlpanel",html:'

'+n.value.description.replace(/["'<>&]/g,(function(e){return N(A,e).getOr(e)}))+"

"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],f={template:n.text,preview:c};t.unblock(),t.redial(u(s,f)),t.focus("template")}var a=n(t),u=function(n,a){return{title:"Insert Template",size:"large",body:{type:"panel",items:n},initialData:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var n=t.getData();r(s,n.template).each((function(n){o(n).then((function(n){g.insertTemplate(e,!1,n),t.close()}))}))},onChange:(u=s=t,c=i,function(e,t){"template"===t.name&&(t=e.getData().template,r(u,t).each((function(t){e.block("Loading..."),o(t).then((function(n){c(e,t,n),e.unblock()}))})))})};var u,c,s},c=e.windowManager.open(u([],{template:"",preview:""}));c.block("Loading..."),o(t[0]).then((function(e){i(c,t[0],e)}))}))}},_=function(e){e.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:g.createTemplateList(e.settings,C(e))}),e.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:g.createTemplateList(e.settings,C(e))})};n.add("template",(function(e){_(e),h(e),p(e)}))}()},"169f":function(e,t){!function(){"use strict";function e(e){return function(t){for(var n=0;nt.length?Q:Z)(e,t,n)}),[]),p(t).map((function(e){return e.list}))}(e.contentDocument,t).toArray()}function ue(e,t){g(He(e,ne),(function(e){var n=e;switch(t){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}))}function ce(e){return e=Fe(zt(e),yt),A(Ve(e,n(ee)),Ve(function(e){return e=Ie.call(e,0),e.reverse(),e}(e),n(ee)),(function(e,t){return{start:e,end:t}}))}function se(e,t,n){t=t,r=ce(e),o=y(!1);var r,o;t=Fe(t,(function(e){return{sourceList:e,entries:Wt(0,r,o,e)}}));g(t,(function(t){ue(t.entries,n),r=e,i=t.entries;var r,o,i=Ue(function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i=e.childNodes.length?n.data.length:0}:n.previousSibling&&_t.isTextNode(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&_t.isTextNode(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}}function me(e,t){Dt.each(t,(function(t,n){e.setAttribute(n,t)}))}function ge(e,t,n,r){var o=t[n?"startContainer":"endContainer"];t=t[n?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(t,o.childNodes.length-1)]||o),!n&&_t.isBr(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(_t.isTextBlock(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o}function he(e,t,n){return an(t,n)&&un(e,t,n)&&cn(t,n)}function pe(e,t){var n,r=t.parentNode;"LI"===r.nodeName&&r.firstChild===t&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),_t.isEmpty(e,r)&&gn.remove(r)):gn.setStyle(r,"listStyleType","none")),_t.isListNode(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)}function ve(e,t,n,r){var o=t.startContainer;t=t.startOffset;if(_t.isTextNode(o)&&(n?t=O[1]?(b=E,w=O[1]-T):v&&k.push(E),!v&&E.length+T>O[0]&&(v=E,y=O[0]-T),T+=E.length),v&&b){if(E=S({startNode:v,startNodeIndex:y,endNode:b,endNodeIndex:w,innerNodes:k,match:O[2],matchIndex:N}),T-=b.length-w,b=v=null,k=[],N++,!(O=C.shift()))break}else if(l[E.nodeName]&&!s[E.nodeName]||!E.firstChild){if(E.nextSibling){E=E.nextSibling;continue}}else if(!o(E)){E=E.firstChild;continue}for(;;){if(E.nextSibling){E=E.nextSibling;break}if(E.parentNode===x)break e;E=E.parentNode}}}return h}}},d=function(e){return e=e.getAttribute("data-mce-index"),"number"==typeof e?""+e:e},m=function(e,t,n){var r,o=e.dom.create("span",{"data-mce-bogus":1});return o.className="mce-match-marker",r=e.getBody(),c(e,t,!1),f.findAndReplaceDOMText(n,r,o,!1,e.schema)},g=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},h=function(e,t,n){t=t.get();var r=t.index,o=e.dom;(n=!1!==n)?r+1===t.count?r=0:r++:r-1==-1?r=t.count-1:r--,o.removeClass(i(e,t.index),"mce-match-marker-selected"),n=i(e,r);return n.length?(o.addClass(i(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(n[0]),r):-1},p=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},v=function(e,t){e=h(e,t,!0),t.set(n(n({},t.get()),{index:e}))},b=function(e,t){e=h(e,t,!1),t.set(n(n({},t.get()),{index:e}))},y=function(e){return e=d(e),null!==e&&0"},te=function(e){var t='';return e.poster&&(t+=''),t+""},ne=function(e,t){return t?t(e):'"},re=function(e,t){return t?t(e):'"},oe=function(e){return'