/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.10.9 (2023-11-15)
*/
!function(){"use strict";function t(o){return function(t){return n=typeof(e=t),(null===e?"null":"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n)===o;var e,n}}function e(e){return function(t){return typeof t===e}}function n(e){return function(t){return e===t}}function g(t){return null==t}function f(t,e){if(c(t)){for(var n=0,o=t.length;n=e.length&&t.substr(n,n+e.length)===e}function ut(t,e){return-1!==t.indexOf(e)}function at(t){return 0 "+o.toString()},function(t,e){return"state("+t+")"})}).join("\n")+"}"}}},Qo=r(eo,$o),Zo=rt(Jo),tr=oo(u,"number"),er=oo(y,"string"),nr=oo(w,"boolean"),or=oo(S,"function"),rr=function(e){if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every(function(t){return rr(e[t])});default:return!1}},ir=Jn(function(t){return rr(t)?Lo(t):zo("Expected value to be acceptable for sending via postMessage")}),ur=function(t){return"Errors: \n"+B(10<(e=t.errors).length?e.slice(0,10).concat([{path:[],getErrorInfo:rt("... (only showing first ten failures)")}]):e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}).join("\n")+"\n\nInput object: "+qn(t.input);var e},ar=Ln,cr=function(t,e){return{tag:"custom",newKey:t,instantiator:e}};function sr(t,e){return(n={})[t]=e,n;var n}function lr(t){return e={},St(t,function(t){e[t.key]=t.value}),e;var e}function fr(t){return S(t)?t:T}function dr(t,e,n){for(var o=t.dom,r=fr(n);o.parentNode;){var o=o.parentNode,i=Mt.fromDom(o),u=e(i);if(u.isSome())return u;if(r(i))break}return vt.none()}function mr(t,e,n){var o=e(t),r=fr(n);return o.orThunk(function(){return r(t)?vt.none():dr(t,e,r)})}function gr(t,e){return zt(t.element,e.event.target)}function pr(t){if(!et(t,"can")&&!et(t,"abort")&&!et(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return lt(lt({},ai),t)}function hr(t){return rt("alloy."+t)}function vr(t,e){eu(t,t.element,e,{})}function br(t,e,n){eu(t,t.element,e,n)}function yr(t){vr(t,Ii())}function xr(t,e,n){eu(t,e,n,{})}function wr(t,e,n,o){t.getSystem().triggerEvent(n,e,o.event)}function Sr(t,e){return{key:t,value:pr({abort:e})}}function kr(t){return{key:t,value:pr({run:function(t,e){e.event.prevent()}})}}function Cr(t,e){return{key:t,value:pr({run:e})}}function Or(t,n,o){return{key:t,value:pr({run:function(t,e){n.apply(void 0,[t,e].concat(o))}})}}function _r(t){return function(n){return{key:t,value:pr({run:function(t,e){gr(t,e)&&n(t,e)}})}}}function Tr(t,e,n){var o,r=e.partUids[n];return Cr(o=t,function(t,e){t.getSystem().getByUid(r).each(function(t){wr(t,t.element,o,e)})})}function Er(t,r){return Cr(t,function(e,t){var n=t.event,o=e.getSystem().getByDom(n.target).getOrThunk(function(){return mr(n.target,function(t){return e.getSystem().getByDom(t).toOptional()},T).getOr(e)});r(e,o,t)})}function Dr(t){return Cr(t,function(t,e){e.cut()})}function Ar(t,e){return _r(t)(e)}function Br(t){return t.dom.innerHTML}function Mr(t,e){var n,o,r=jt(t).dom,i=Mt.fromDom(r.createDocumentFragment());Be(i,(n=e,(o=(r||document).createElement("div")).innerHTML=n,Kt(Mt.fromDom(o)))),Me(t),Tn(t,i)}function Fr(t){if(Zt(t))return"#shadow-root";var e=Mt.fromDom(t.dom.cloneNode(!1)),n=Mt.fromTag("div"),o=Mt.fromDom(e.dom.cloneNode(!0));return Tn(n,o),Br(n)}function Ir(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++su+String(e)}function Rr(t){var e=Ge(t)?t.dom[mu]:null;return vt.from(e)}function Nr(e){function n(t){return"The component must be in a context to execute: "+t+(e?"\n"+Fr(e().element)+" is not in context.":"")}function t(t){return function(){throw new Error(n(t))}}function o(t){return function(){console.warn(n(t))}}return{debugInfo:rt("fake"),triggerEvent:o("triggerEvent"),triggerFocus:o("triggerFocus"),triggerEscape:o("triggerEscape"),broadcast:o("broadcast"),broadcastOn:o("broadcastOn"),broadcastEvent:o("broadcastEvent"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),isConnected:T}}function Pr(t,e){var n=t.toString(),o=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:bu(i)}},t}function Vr(t){return sr(yu,t)}function Hr(o){return t=function(t){for(var e=[],n=1;n "):r[0].name;return sr(u,{handler:n,purpose:o})})});return e={},n=[],o=[],St(c,function(t){t.fold(function(t){n.push(t)},function(t){o.push(t)})}),0<(u={errors:n,values:o}).errors.length?Nn.error(ft(u.errors)):(i=e,0===(r=u.values).length?Nn.value(i):Nn.value(Yo(i,qo.apply(void 0,r))))},ku="alloy.base.behaviour",Cu=$o([ar("dom","dom",jn(),$o([mo("tag"),Eo("styles",{}),Eo("classes",[]),Eo("attributes",{}),wo("value"),wo("innerHtml")])),mo("components"),mo("uid"),Eo("events",{}),Eo("apis",{}),ar("eventOrder","eventOrder",((ui={})[Ii()]=["disabling",ku,"toggling","typeaheadevents"],ui[Ai()]=[ku,"focusing","keying"],ui[Li()]=[ku,"disabling","toggling","representing"],ui[Si()]=[ku,"representing","streaming","invalidating"],ui[Xi()]=[ku,"representing","item-events","tooltipping"],ui[mi()]=["focusing",ku,"item-type-events"],ui[si()]=["focusing",ku,"item-type-events"],ui[vi()]=["item-type-events","tooltipping"],ui[Fi()]=["receiving","reflecting","tooltipping"],Yn(rt(ui))),Zo()),wo("domModification")]),Ou=function(t){var e=so("external.component",to([mo("element"),wo("uid")]),t),n=Po(Nr()),o=e.uid.getOrThunk(function(){return pu("external")});gu(e.element,o);var r={uid:o,getSystem:n.get,config:vt.none,hasConfigured:T,connect:function(t){n.set(t)},disconnect:function(){n.set(Nr(function(){return r}))},getApis:function(){return{}},element:e.element,spec:t,readState:rt("No state"),syncComponents:st,components:rt([]),events:{}};return Vr(r)},_u=pu,Tu=function(t){return tt(t,yu).getOrThunk(function(){return oi(Tt(t,"uid")?t:lt({uid:_u("")},t)).getOrDie()})},Eu=Vr;function Du(t,e,n,o,r){return t(n,o)?vt.some(n):S(r)&&r(n)?vt.none():e(n,o,r)}function Au(t,e,n){for(var o=t.dom,r=S(n)?n:T;o.parentNode;){var o=o.parentNode,i=Mt.fromDom(o);if(e(i))return vt.some(i);if(r(i))break}return vt.none()}function Bu(t,e,n){return Du(function(t,e){return e(t)},Au,t,e,n)}function Mu(t,e,n){return Bu(t,e,n).isSome()}function Fu(t,e,n){return Au(t,function(t){return Ht(t,e)},n)}function Iu(t,e){return n=e,Lt(o=void 0===t?document:t.dom)?vt.none():vt.from(o.querySelector(n)).map(Mt.fromDom);var n,o}function Ru(t,e,n){return Du(Ht,Fu,t,e,n)}function Nu(){var e=Ir("aria-owns");return{id:e,link:function(t){oe(t,"aria-owns",e)},unlink:function(t){ce(t,"aria-owns")}}}var Pu,Vu,Hu=function(e,t){return Mu(t,function(t){return zt(t,e.element)},T)||(n=e,Bu(t,function(t){if(!Ge(t))return!1;var e=ie(t,"id");return void 0!==e&&-1"}),Zo()),jf=cr("schema",function(){return[wo("preprocess")]}),Wf=Eo("defaults",rt({})),Gf=Eo("overrides",rt({})),Xf=$o([Hf,Lf,zf,Uf,Wf,Gf]),Yf=$o([Hf,Lf,zf,Wf,Gf]),qf=$o([Hf,Lf,zf,Uf,Wf,Gf]),Kf=$o([Hf,jf,zf,mo("unit"),Uf,Wf,Gf]),Jf=il(Vf.required,Xf),$f=il(Vf.external,Yf),Qf=il(Vf.optional,qf),Zf=il(Vf.group,Kf),td=rt("entirety"),ed=Object.freeze({__proto__:null,required:Jf,external:$f,optional:Qf,group:Zf,asNamedPart:ol,name:rl,asCommon:function(t){return t.fold(h,h,h,h)},original:td}),nd=function(t,e){return{uiType:Pf(),owner:t,name:e}},od=Object.freeze({__proto__:null,generate:al,generateOne:cl,schemas:sl,names:ll,substitutes:fl,components:dl,defaultUids:yl,defaultUidsSchema:xl,getAllParts:hl,getAllPartNames:vl,getPart:ml,getPartOrDie:gl,getParts:pl,getPartsOrDie:bl}),rd=function(t){return Tt(t,"uid")?t:lt(lt({},t),{uid:pu("uid")})},id=to([mo("name"),mo("factory"),mo("configFields"),Eo("apis",{}),Eo("extraApis",{})]),ud=to([mo("name"),mo("factory"),mo("configFields"),mo("partFields"),Eo("apis",{}),Eo("extraApis",{})]),ad=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),cd=xa({fields:[mo("find")],name:"composing",apis:ad}),sd=["input","button","textarea","select"],ld=function(e,t,n){t.disableClass.each(function(t){Yr(e.element,t)}),(Tl(e,t)?function(t){oe(t.element,"disabled","disabled")}:function(t){oe(t.element,"aria-disabled","true")})(e),t.onDisabled(e)},fd=function(e,t,n){t.disableClass.each(function(t){qr(e.element,t)}),(Tl(e,t)?function(t){ce(t.element,"disabled")}:function(t){oe(t.element,"aria-disabled","false")})(e),t.onEnabled(e)},dd=Object.freeze({__proto__:null,enable:fd,disable:ld,isDisabled:El,onLoad:_l,set:function(t,e,n,o){(o?ld:fd)(t,e)}}),md=Object.freeze({__proto__:null,exhibit:function(t,e){return zr({classes:e.disabled()?e.disableClass.toArray():[]})},events:function(n,t){return nu([Sr(Ii(),function(t,e){return El(t,n)}),ba(n,t,_l)])}}),gd=xa({fields:[Io("disabled",T),Eo("useNative",!0),wo("disableClass"),Ju("onDisabled"),Ju("onEnabled")],name:"disabling",active:md,apis:dd}),pd=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return Dl(t,e,0,[])},dehighlight:function(t,e,n,o){Yl(0,e,0,o)&&(qr(o.element,e.highlightClass),e.onDehighlight(t,o),vr(o,tu()))},highlight:Al,highlightFirst:function(e,n,t){ql(e,n).each(function(t){Al(e,n,0,t)})},highlightLast:function(e,n,t){Kl(e,n).each(function(t){Al(e,n,0,t)})},highlightAt:function(e,n,t,o){var r,i,u;i=o,u=vs((r=e).element,"."+n.itemClass),vt.from(u[i]).fold(function(){return Nn.error(new Error("No element found with index "+i))},r.getSystem().getByDom).fold(function(t){throw t},function(t){Al(e,n,0,t)})},highlightBy:function(e,n,t,o){N(Jl(e,n),o).each(function(t){Al(e,n,0,t)})},isHighlighted:Yl,getHighlighted:function(e,t,n){return Iu(e.element,"."+t.highlightClass).bind(function(t){return e.getSystem().getByDom(t).toOptional()})},getFirst:ql,getLast:Kl,getPrevious:function(t,e,n){return Bl(t,e,0,-1)},getNext:function(t,e,n){return Bl(t,e,0,1)},getCandidates:Jl}),hd=xa({fields:[mo("highlightClass"),mo("itemClass"),Ju("onHighlight"),Ju("onDehighlight")],name:"highlighting",apis:pd}),vd=[8],bd=[9],yd=[13],xd=[27],wd=[32],Sd=[37],kd=[38],Cd=[39],Od=[40],_d=O(Vl);function Td(t,e,n,o,a){function c(e,n,t,o,r){var i=t(e,n,o,r),u=n.event;return N(i,function(t){return t.matches(u)}).map(function(t){return t.classification}).bind(function(t){return t(e,n,o,r)})}var r={schema:function(){return t.concat([Eo("focusManager",Ul()),Do("focusInside","onFocus",io(function(t){return wt(["onFocus","onEnterOrSpace","onApi"],t)?Nn.value(t):Nn.error("Invalid value for focusInside")})),ta("handler",r),ta("state",e),ta("sendFocusIn",a)])},processKey:c,toEvents:function(i,u){var t=i.focusInside!==Zl.OnFocusMode?vt.none():a(i).map(function(n){return Cr(Ai(),function(t,e){n(t,i,u),e.stop()})}),e=[Cr(xi(),function(o,r){c(o,r,n,i,u).fold(function(){var e=o,n=r,t=Nl(wd.concat(yd))(n.event);i.focusInside===Zl.OnEnterOrSpaceMode&&t&&gr(e,n)&&a(i).each(function(t){t(e,i,u),n.stop()})},function(t){r.stop()})}),Cr(wi(),function(t,e){c(t,e,o,i,u).each(function(t){e.stop()})})];return nu(t.toArray().concat(e))}};return r}function Ed(t){function a(t,e){return 0t.length)&&(e=t.length);for(var n=0,o=new Array(e);n/gm),Jp=bp(/^data-[\-\w.\u00B7-\uFFFF]/),$p=bp(/^aria-[\-\w]+$/),Qp=bp(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zp=bp(/^(?:\w+script|data):/i),th=bp(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eh=bp(/^html$/i);function nh(t){return lh().sanitize(t)}function oh(t){return function(){return tt(t,mh).getOr("!not found!")}}function rh(t,e){var n,o=t.toLowerCase();if(fh.isRtl()){var r=At(n=o,"-rtl")?n:n+"-rtl";return Tt(e,r)?r:o}return o}function ih(t,e){return tt(e,rh(t,e))}function uh(t,e){var n=e();return ih(t,n).getOrThunk(oh(n))}function ah(){return mm("add-focusable",[ou(function(t){var e,n,o;e=t.element,n="svg",o=function(t){return Ht(t,n)},N(e.dom.childNodes,function(t){return o(Mt.fromDom(t))}).map(Mt.fromDom).each(function(t){return oe(t,"focusable","false")})})])}function ch(t,e,n,o){var r,i,u,a=(u=e,fh.isRtl()&&Tt(dh,u)?["tox-icon--flip"]:[]),c=tt(n,rh(e,n)).or(o).getOrThunk(oh(n));return{dom:{tag:t.tag,attributes:null!==(r=t.attributes)&&void 0!==r?r:{},classes:t.classes.concat(a),innerHtml:c},behaviours:ec(V(V([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[ah()],!1))}}function sh(t,e,n,o){return void 0===o&&(o=vt.none()),ch(e,t,n(),o)}var lh=function e(t){function l(t){return e(t)}var f=0"+t:o=(n=Tp(t,/^[\r\n\t ]+/))&&n[0],"application/xhtml+xml"===R&&(t=''+t+"");var r=S?S.createHTML(t):t;if(xt===yt)try{e=(new p).parseFromString(r,R)}catch(t){}if(!e||!e.documentElement){e=O.createDocument(xt,"template",null);try{e.documentElement.innerHTML=P?"":r}catch(t){}}var i=e.body||e.documentElement;return t&&o&&i.insertBefore(u.createTextNode(o),i.childNodes[0]||null),xt===yt?E.call(e,nt?"html":"body")[0]:nt?e.documentElement:i}function Mt(t){return _.call(t.ownerDocument||t,t,r.SHOW_ELEMENT|r.SHOW_COMMENT|r.SHOW_TEXT,null,!1)}function Ft(t){return"object"===up(g)?t instanceof g:t&&"object"===up(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}function It(t,e,n){B[t]&&kp(B[t],function(t){t.call(l,e,n,St)})}function Rt(t){var e;if(It("beforeSanitizeElements",t,null),t instanceof s&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof c)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore))return Dt(t),1;if(Bp(/[\u0080-\uFFFF]/,t.nodeName))return Dt(t),1;var n=N(t.nodeName);if(It("uponSanitizeElement",t,{tagName:n,allowedTags:G}),t.hasChildNodes()&&!Ft(t.firstElementChild)&&(!Ft(t.content)||!Ft(t.content.firstElementChild))&&Bp(/<[/\w]/g,t.innerHTML)&&Bp(/<[/\w]/g,t.textContent))return Dt(t),1;if("select"===n&&Bp(//i,a))At(i,t);else if(et&&(a=Ep(a,V," "),a=Ep(a,H," ")),Nt(N(t.nodeName),c,a))try{u?t.setAttributeNS(u,i,a):t.setAttribute(i,a),Cp(l.removed)}catch(t){}}It("afterSanitizeAttributes",t,null)}}Ip(Et,Up);var Vt=function(t){return 0\n"+s),et&&(s=Ep(s,V," "),s=Ep(s,H," ")),S&&at?S.createHTML(s):s},l.setConfig=function(t){F(t),ot=!0},l.clearConfig=function(){St=null,ot=!1},l.isValidAttribute=function(t,e,n){return St||F({}),Nt(N(t),N(e),n)},l.addHook=function(t,e){"function"==typeof e&&(B[t]=B[t]||[],Op(B[t],e))},l.removeHook=function(t){if(B[t])return Cp(B[t])},l.removeHooks=function(t){B[t]&&(B[t]=[])},l.removeAllHooks=function(){B={}},l}(),fh=tinymce.util.Tools.resolve("tinymce.util.I18n"),dh={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},mh="temporary-placeholder",gh={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},ph=kl({name:"Notification",factory:function(e){function n(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}}function o(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}}var t,r,i,u,a=Lm({dom:Hm(""+nh(e.translationProvider(e.text))+"
"),behaviours:ec([Dg.config({})])}),c=Lm({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},o(0)],behaviours:ec([Dg.config({})])}),s={updateProgress:function(t,e){t.getSystem().isConnected()&&c.getOpt(t).each(function(t){Dg.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},o(e)])})},updateText:function(t,e){var n;t.getSystem().isConnected()&&(n=a.get(t),Dg.set(n,[ri(e)]))}},l=ft([e.icon.toArray(),e.level.toArray(),e.level.bind(function(t){return vt.from(gh[t])}).toArray()]),f=Lm(ip.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[sh("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":e.translationProvider("Close")}},e.iconProvider)],action:function(t){e.onAction(t)}})),d=[(t=l,r={tag:"div",classes:["tox-notification__icon"]},i=e.iconProvider,u=i(),ch(r,N(t,function(t){return Tt(u,rh(t,u))}).getOr(mh),u,vt.none())),{dom:{tag:"div",classes:["tox-notification__body"]},components:[a.asSpec()],behaviours:ec([Dg.config({})])}];return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert"},classes:e.level.map(function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]}).getOr(["tox-notification","tox-notification--in"])},behaviours:ec([Mg.config({}),mm("notification-events",[Cr(bi(),function(t){f.getOpt(t).each(Mg.focus)})])]),components:d.concat(e.progress?[c.asSpec()]:[]).concat(e.closeButton?[f.asSpec()]:[]),apis:s}},configFields:[wo("level"),mo("progress"),mo("icon"),mo("onAction"),mo("text"),mo("iconProvider"),mo("translationProvider"),Fo("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function hh(n,o){function r(){b(i)||(clearTimeout(i),i=null)}var i=null;return{cancel:r,throttle:function(){for(var t=[],e=0;e',n.getDoc());return Tn(t,Mt.fromDom(e.extractContents())),e.insertNode(t.dom),Yt(t).each(function(t){return t.dom.normalize()}),i=hs,(u=function(t){for(var e=Kt(t),n=e.length-1;0<=n;n--){var o=e[n];if(i(o))return vt.some(o);var r=u(o);if(r.isSome())return r}return vt.none()})(t).map(function(t){var e;n.selection.setCursorLocation(t.dom,"img"===Ft(e=t)?1:ps(e).fold(function(){return Kt(e).length},function(t){return t.length}))}),t})}function yh(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function xh(t){return""!==t&&-1!==" \xa0\f\n\r\t\v".indexOf(t)}function wh(t,e){return t.substring(e.length)}function Sh(o,t,r,e){return void 0===e&&(e=0),Ah(Mt.fromDom(t.startContainer)).fold(function(){return function(t,o,i,r){if(void 0===r&&(r=0),!o.collapsed||3!==o.startContainer.nodeType)return vt.none();var e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return vh(t,o.startContainer,o.startOffset,function(t,r,e){return function(t,e){for(var n=r-1;0<=n;n--){var o=t.charAt(n);if(xh(o))return vt.none();if(o===e)break}return vt.some(n)}(e,i).getOr(r)},e).bind(function(t){var e=o.cloneRange();if(e.setStart(t.container,t.offset),e.setEnd(o.endContainer,o.endOffset),e.collapsed)return vt.none();var n=yh(e);return 0!==n.lastIndexOf(i)||wh(n,i).length=t.minChars&&t.matches.getOrThunk(function(){return n=e.dom,function(t){var e=Fh(t.startContainer,t.startOffset);return!vh(n,e.container,e.offset,function(t,e){return 0===e?-1:e},n.getRoot()).filter(function(t){return!xh(t.container.data.charAt(t.offset-1))}).isSome()};var n})(n.range,i,n.text)});if(0===u.length)return vt.none();var a=Bh.all(B(u,function(e){return e.fetch(n.text,e.maxResults,o).then(function(t){return{matchText:n.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}})}));return vt.some({lookupData:a,context:n})}var Th,Eh,Dh=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Ah=function(t){return Ru(t,"[data-mce-autocompleter]")},Bh=tinymce.util.Tools.resolve("tinymce.util.Promise"),Mh=function(t){if(3===t.nodeType)return kh(t,t.data.length);var e=t.childNodes;return 0o}).getOr(r.length);return vt.some({numColumns:n,numRows:Math.ceil(r.length/n)})}return vt.none()}function av(t,e,n){t.getSystem().broadcastOn([Kv],{})}function cv(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))}function sv(t){return t.getParam("width",eb.DOM.getStyle(t.getElement(),"width"))}function lv(t){return vt.from(t.getParam("min_width")).filter(u)}function fv(t){return vt.from(t.getParam("min_height")).filter(u)}function dv(t){return vt.from(t.getParam("max_width")).filter(u)}function mv(t){return vt.from(t.getParam("max_height")).filter(u)}function gv(t){return!1!==t.getParam("menubar",!0,"boolean")}function pv(t){var e=t.getParam("toolbar",!0),n=!0===e,o=y(e),r=c(e)&&0'+t+""})}return o}function Ab(t){return{value:t}}function Bb(t){return oy.test(t)||ry.test(t)}function Mb(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()}function Fb(t){return Ab(Mb(t.red)+Mb(t.green)+Mb(t.blue))}function Ib(t,e,n,o){return{red:t,green:e,blue:n,alpha:o}}function Rb(t){var e=parseInt(t,10);return e.toString()===t&&0<=e&&e<=255}function Nb(t){var e,n,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100,i=uy(0,iy(i,1)),u=uy(0,iy(u,1));if(0===i)return Ib(e=n=o=ay(255*u),n,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:e=c,n=s,o=0;break;case 1:e=s,n=c,o=0;break;case 2:e=0,n=c,o=s;break;case 3:e=0,n=s,o=c;break;case 4:e=s,n=0,o=c;break;case 5:e=c,n=0,o=s;break;default:e=n=o=0}return Ib(e=ay(255*(e+l)),n=ay(255*(n+l)),o=ay(255*(o+l)),1)}function Pb(t){var e,n,o=(e={value:t.value.replace(oy,function(t,e,n,o){return e+e+n+n+o+o})},null===(n=ry.exec(e.value))?["FFFFFF","FF","FF","FF"]:n);return Ib(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),1)}function Vb(t,e,n,o){return Ib(parseInt(t,10),parseInt(e,10),parseInt(n,10),parseFloat(o))}function Hb(t){if("transparent"===t)return vt.some(Ib(0,0,0,0));var e=cy.exec(t);if(null!==e)return vt.some(Vb(e[1],e[2],e[3],"1"));var n=sy.exec(t);return null!==n?vt.some(Vb(n[1],n[2],n[3],n[4])):vt.none()}function Lb(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"}function zb(t,e){return t.fire("ResizeContent",e)}function Ub(t,e,n){return{hue:t,saturation:e,value:n}}function jb(t){var e,n,o=0,r=t.red/255,i=t.green/255,u=t.blue/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?Ub(0,0,100*(o=a)):(n=60*((r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),e=(c-a)/c,o=c,Ub(Math.round(n),Math.round(100*e),Math.round(100*o)))}function Wb(t){return Fb(Nb(t))}function Gb(o){return(Bb(e=o)?vt.some({value:(Dt(t=e,"#")?t.substring("#".length):t).toUpperCase()}):vt.none()).orThunk(function(){return Hb(o).map(Fb)}).getOrThunk(function(){var t=document.createElement("canvas");t.height=1,t.width=1;var e=t.getContext("2d");e.clearRect(0,0,t.width,t.height),e.fillStyle="#FFFFFF",e.fillStyle=o,e.fillRect(0,0,1,1);var n=e.getImageData(0,0,1,1).data;return Fb(Ib(n[0],n[1],n[2],n[3]))});var t,e}(bv=vv=vv||{}).default="wrap",bv.floating="floating",bv.sliding="sliding",bv.scrolling="scrolling",(xv=yv=yv||{}).auto="auto",xv.top="top",xv.bottom="bottom";function Xb(t){return gd.config({disabled:t,disableClass:"tox-tbtn--disabled"})}var Yb,qb="silver.readonly",Kb=$o([go("readonly",nr)]),Jb=function(t){return gd.config({disabled:t})},$b=function(t){return gd.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Qb=((Yb={})[Ii()]=["disabling","alloy.base.behaviour","toggling","item-events"],Yb),Zb=nt,ty=tinymce.util.Tools.resolve("tinymce.Env"),ey=function(t,a){return B(t,function(t){switch(t.type){case"cardcontainer":return r=ey((o=t).items,a),i="vertical"===o.direction?"tox-collection__item-container--column":Mv,u="left"===o.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[Bv,i,u,function(){switch(o.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:r};case"cardimage":return n=t.src,{dom:{tag:"img",classes:t.classes,attributes:{src:n,alt:t.alt.getOr("")}}};case"cardtext":var e=t.name.exists(function(t){return wt(a.cardText.highlightOn,t)})?vt.from(a.cardText.matchText).getOr(""):"";return Sb(Db(t.text,e),t.classes)}var n,o,r,i,u})},ny=al(Ug(),jg()),oy=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,ry=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,iy=Math.min,uy=Math.max,ay=Math.round,cy=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,sy=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,ly=Ib(255,0,0,1),fy=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),dy="tinymce-custom-colors";function my(t){return!1!==t.getParam("custom_colors")}function gy(t){var e=t.getParam("color_map");return void 0!==e?function(t){for(var e=[],n=0;nn&&i.pop(),fy.setItem(dy,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),My="#000000",Fy=function(r){return function(n,t){var o=!1;r.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{colorpicker:t},onAction:function(t,e){"hex-valid"===e.name&&(o=e.value)},onSubmit:function(t){var e=t.getData().colorpicker;o?(n(vt.from(e)),t.close()):r.windowManager.alert(r.translate(["Invalid hex color code: {0}",e]))},onClose:st,onCancel:function(){n(vt.none())}})}},Iy=function(n,o,r,i,u,a,c){return nt(B(n,function(e){return"choiceitem"===e.type?ao("choicemenuitem",Uv,e).fold(ov,function(t){return vt.some(function(e,t,n,o,r,i,u,a){void 0===a&&(a=!0);var c=Tb({presets:n,textContent:t?e.text:vt.none(),htmlContent:vt.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:vt.none(),checkMark:t?vt.some(Ob(u.icons)):vt.none(),caret:vt.none(),value:e.value},u,a);return Yo(bb({data:yb(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){Rg.set(e,t)},isActive:function(){return Rg.isOn(e)},isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},onAction:function(t){return o(e.value)},onSetup:function(t){return t.setActive(r),st},triggersSubmenu:!1,itemBehaviours:[]},c,i,u),{toggling:{toggleClass:_v,toggleOnExecute:!1,selected:e.active}})}(t,1===r,i,o,a(e.value),u,c,nv(n)))}):vt.none()}))},Ry=Ir("cell-over"),Ny=Ir("cell-execute"),Py={inserttable:function(u){var t=Ir("size-label"),a=function(t){for(var e=[],n=0;n<10;n++){for(var o=[],r=0;r<10;r++)o.push(function(e,n,t){function o(t){return br(t,Ny,{row:e,col:n})}function r(t,e){e.stop(),o(t)}var i;return Tu({dom:{tag:"div",attributes:((i={role:"button"})["aria-labelledby"]=t,i)},behaviours:ec([mm("insert-table-picker-cell",[Cr(vi(),Mg.focus),Cr(Ii(),o),Cr(Ci(),r),Cr(Ni(),r)]),Rg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Mg.config({onFocus:function(t){return br(t,Ry,{row:e,col:n})}})])})}(n,r,t));e.push(o)}return e}(t),e=_y(0,0),c=Lm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[e],behaviours:ec([Dg.config({})])});return{type:"widget",data:{value:Ir("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ny.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:H(a,function(t){return B(t,Eu)}).concat(c.asSpec()),behaviours:ec([mm("insert-table-picker",[ou(function(t){Dg.set(c.get(t),[e])}),Er(Ry,function(t,e,n){var o=n.event,r=o.row,i=o.col;!function(t,e,n){for(var o=0;o<10;o++)for(var r=0;r<10;r++)Rg.set(t[o][r],o<=e&&r<=n)}(a,r,i),Dg.set(c.get(t),[_y(r+1,i+1)])}),Er(Ny,function(t,e,n){var o=n.event,r=o.row,i=o.col;u.onAction({numRows:r+1,numColumns:i+1}),vr(t,Vi())})]),Tg.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(e,t){var n,o,r,i=(o=t,r=(n=e).initData.allowCustomColors&&o.colorinput.hasCustomColors(),n.initData.colors.fold(function(){return yy(o.colorinput.getColors(),r)},function(t){return t.concat(vy(r))})),u=t.colorinput.getColorCols(),a=Cy(Ir("menu-value"),i,function(t){e.onAction({value:t})},u,"color",wv.CLOSE_ON_EXECUTE,T,t.shared.providers),c=lt(lt({},a),{markers:$h("color"),movement:Oy(u,"color")});return{type:"widget",data:{value:Ir("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ny.widget(qg.sketch(c))]}}},Vy=function(t){var e=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:lt({tag:"div",classes:[kv,"tox-collection__group-heading"]},e),components:[]}},Hy=function(t,e,n,o){void 0===o&&(o=!0);var r=Tb({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,caret:vt.none(),checkMark:vt.none(),shortcutContent:t.shortcut},n,o);return bb({data:yb(t),getApi:function(e){return{isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,e,n)},Ly=function(t,e,n,o,r){void 0===o&&(o=!0);var i=(r=void 0!==r&&r)?xb("chevron-down",n.icons,[Dv]):xb("chevron-right",n.icons,[Dv]),u=Tb({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,caret:vt.some(i),checkMark:vt.none(),shortcutContent:t.shortcut},n,o);return bb({data:yb(t),getApi:function(e){return{isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},disabled:t.disabled,onAction:st,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,e,n)},zy=function(t,e,n,o){void 0===o&&(o=!0);var r=Tb({iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,checkMark:vt.some(Ob(n.icons)),caret:vt.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,o);return Yo(bb({data:yb(t),disabled:t.disabled,getApi:function(e){return{setActive:function(t){Rg.set(e,t)},isActive:function(){return Rg.isOn(e)},isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,e,n),{toggling:{toggleClass:_v,toggleOnExecute:!1,selected:t.active}})},Uy=function(e,n){return tt(Py,e.fancytype).map(function(t){return t(e,n)})};function jy(t,u,a,e,c,s,l){var n=1===e,o=!n||nv(t);return nt(B(t,function(t){switch(t.type){case"separator":return ao("Autocompleter.Separator",Ih,t).fold(ov,function(t){return vt.some(Vy(t))});case"cardmenuitem":return ao("cardmenuitem",zv,t).fold(ov,function(e){return vt.some((t=lt(lt({},e),{onAction:function(t){e.onAction(t),a(e.value,e.meta)}}),n=c,o=s,r={itemBehaviours:Eb(e.meta,s),cardText:{matchText:u,highlightOn:l}},i={dom:_b(t.label),optComponents:[vt.some({dom:{tag:"div",classes:[Bv,Mv]},components:ey(t.items,r)})]},bb({data:yb(lt({text:vt.none()},t)),disabled:t.disabled,getApi:function(n){return{isDisabled:function(){return gd.isDisabled(n)},setDisabled:function(e){gd.set(n,e),St(vs(n.element,"*"),function(t){n.getSystem().getByDom(t).each(function(t){t.hasConfigured(gd)&&gd.set(t,e)})})}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:vt.from(r.itemBehaviours).getOr([])},i,n,o.providers)));var t,n,o,r,i});default:return ao("Autocompleter.Item",Rh,t).fold(ov,function(t){return vt.some(function(e,n,t,o,r,i,u,a){void 0===a&&(a=!0);var c=Tb({presets:o,textContent:vt.none(),htmlContent:t?e.text.map(function(t){return Db(t,n)}):vt.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:vt.none(),checkMark:vt.none(),caret:vt.none(),value:e.value},u.providers,a,e.icon);return bb({data:yb(e),disabled:e.disabled,getApi:rt({}),onAction:function(t){return r(e.value,e.meta)},onSetup:rt(st),triggersSubmenu:!1,itemBehaviours:Eb(e.meta,u)},c,i,u.providers)}(t,u,n,"normal",a,c,s,o))})}}))}function Wy(t,e,n,o,r){var i=nv(e),u=nt(B(e,function(t){function e(t){return function(t,e,n,o,r){function i(t){return r?lt(lt({},t),{shortcut:vt.none(),icon:t.text.isSome()?vt.none():t.icon}):t}var u=n.shared.providers;switch(t.type){case"menuitem":return ao("menuitem",Gv,t).fold(ov,function(t){return vt.some(Hy(i(t),e,u,o))});case"nestedmenuitem":return ao("nestedmenuitem",Xv,t).fold(ov,function(t){return vt.some(Ly(i(t),e,u,o,r))});case"togglemenuitem":return ao("togglemenuitem",Yv,t).fold(ov,function(t){return vt.some(zy(i(t),e,u,o))});case"separator":return ao("separatormenuitem",Ih,t).fold(ov,function(t){return vt.some(Vy(t))});case"fancymenuitem":return ao("fancymenuitem",Wv,t).fold(ov,function(t){return Uy(i(t),n)});default:return console.error("Unknown item in general menu",t),vt.none()}}(t,n,o,r?!Tt(t,"text"):i,r)}return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?e(lt(lt({},t),{disabled:!0})):e(t)}));return(r?rv:iv)(t,i,u,1,"normal")}function Gy(t){return Zg.singleData(t.value,t)}function Xy(t,e,n){return Ru(t,e,n).isSome()}function Yy(n,o){var r=null;return{cancel:function(){null!==r&&(clearTimeout(r),r=null)},schedule:function(){for(var t=[],e=0;e"}function iw(f,d,m,g){function p(t,e,n,o,r){var i,u,a=f(ik+"range"),c=[dx.parts.label({dom:{tag:"label",innerHtml:n,attributes:{"aria-label":o}}}),dx.parts.field({data:r,factory:Ex,inputAttributes:lt({type:"text"},"hex"===e?{"aria-live":"polite"}:{}),inputClasses:[d("textfield")],inputBehaviours:ec([(i=e,u=t,qx.config({invalidClass:d("invalid"),notify:{onValidate:function(t){br(t,rk,{type:i})},onValid:function(t){br(t,nk,{type:i,value:Df.getValue(t)})},onInvalid:function(t){br(t,ok,{type:i,value:Df.getValue(t)})}},validator:{validate:function(t){var e=Df.getValue(t),n=u(e)?Nn.value(!0):Nn.error(f("aria.input.invalid"));return Wx(n)},validateOnLoad:!1}})),gx.config({})]),onSetValue:function(t){qx.isInvalid(t)&&qx.run(t).get(st)}})],s="hex"!==e?[dx.parts["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}}function h(t,e){var n=e.red,o=e.green,r=e.blue;Df.setValue(t,{red:n,green:o,blue:r})}function v(t,e){b.getOpt(t).each(function(t){fe(t.element,"background-color","#"+e.value)})}var b=Lm({dom:{tag:"div",classes:[d("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return kl({factory:function(){function a(t){return o[t].get()}function c(t,e){o[t].set(e)}function e(t,e){var n=e.event;"hex"!==n.type?c(n.type,vt.none()):g(t)}function n(t,e){var r,n,o,i,u=e.event;"hex"===u.type?function(t,e){m(t);var n=Ab(e);c("hex",vt.some(e));var o=Pb(n);h(t,o),s(o),br(t,$S,{hex:n}),v(t,n)}(t,u.value):(r=t,n=u.type,o=u.value,i=parseInt(o,10),c(n,vt.some(i)),a("red").bind(function(n){return a("green").bind(function(e){return a("blue").map(function(t){return Ib(n,e,t,1)})})}).each(function(t){var e,n,o=(e=r,n=Fb(t),ek.getField(e,"hex").each(function(t){Mg.isFocused(t)||Df.setValue(e,{hex:n.value})}),n);br(r,$S,{hex:o}),v(r,o)}))}function t(t){return{label:f(ik+t+".label"),description:f(ik+t+".description")}}function s(t){var e=t.red,n=t.green,o=t.blue;c("red",vt.some(e)),c("green",vt.some(n)),c("blue",vt.some(o))}var o={red:Po(vt.some(255)),green:Po(vt.some(255)),blue:Po(vt.some(255)),hex:Po(vt.some("ffffff"))},r=t("red"),i=t("green"),u=t("blue"),l=t("hex");return Yo(ek.sketch(function(t){return{dom:{tag:"form",classes:[d("rgb-form")],attributes:{"aria-label":f("aria.color.picker")}},components:[t.field("red",dx.sketch(p(Rb,"red",r.label,r.description,255))),t.field("green",dx.sketch(p(Rb,"green",i.label,i.description,255))),t.field("blue",dx.sketch(p(Rb,"blue",u.label,u.description,255))),t.field("hex",dx.sketch(p(Bb,"hex",l.label,l.description,"ffffff"))),b.asSpec()],formBehaviours:ec([qx.config({invalidClass:d("form-invalid")}),mm("rgb-form-events",[Cr(nk,n),Cr(ok,e),Cr(rk,e)])])}}),{apis:{updateHex:function(t,e){var n;Df.setValue(t,{hex:e.value}),h(t,n=Pb(e)),s(n),v(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})}function uw(x,w){return kl({name:"ColourPicker",configFields:[mo("dom"),Eo("onValidHex",st),Eo("onInvalidHex",st)],factory:function(t){function e(t,e,n){v.getOpt(t).each(function(t){g.setHue(t,n)})}function n(t,e){b.getOpt(t).each(function(t){m.updateHex(t,e)})}function r(e,n,o,t){var r=o,i=Pb(n);p.paletteRgba.set(i),p.paletteHue.set(r),St(t,function(t){t(e,n,o)})}var o,i,u,a,c,s,l,f,d,m=iw(x,w,t.onValidHex,t.onInvalidHex),g=(l=w,f=JS.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[l("sv-palette-spectrum")]}}),d=JS.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[l("sv-palette-thumb")],innerHtml:"'}}),kl({factory:function(t){var e=rt({x:0,y:0}),n=ec([cd.config({find:vt.some}),Mg.config({})]);return JS.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[l("sv-palette")]},model:{mode:"xy",getInitialValue:e},rounded:!1,components:[f,d],onChange:function(t,e,n){br(t,ZS,{value:n})},onInit:function(t,e,n,o){y(n.element.dom,Lb(ly))},sliderBehaviours:n})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){var o=n;y(e.components()[0].element.dom,Lb(Nb(Ub(o,100,100))))},setThumb:function(t,e,n){var o=e,r=jb(Pb(n));JS.setValue(o,{x:r.saturation,y:100-r.value})}},extraApis:{}})),p={paletteRgba:Po(ly),paletteHue:Po(0)},h=Lm((i=JS.parts.spectrum({dom:{tag:"div",classes:[(o=w)("hue-slider-spectrum")],attributes:{role:"presentation"}}}),u=JS.parts.thumb({dom:{tag:"div",classes:[o("hue-slider-thumb")],attributes:{role:"presentation"}}}),JS.sketch({dom:{tag:"div",classes:[o("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:rt({y:0})},components:[i,u],sliderBehaviours:ec([Mg.config({})]),onChange:function(t,e,n){br(t,QS,{value:n})}}))),v=Lm(g.sketch({})),b=Lm(m.sketch({}));function y(t,e){var n,o,r=t.width,i=t.height,u=t.getContext("2d");null!==u&&(u.fillStyle=e,u.fillRect(0,0,r,i),(n=u.createLinearGradient(0,0,r,0)).addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),u.fillStyle=n,u.fillRect(0,0,r,i),(o=u.createLinearGradient(0,0,0,i)).addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),u.fillStyle=o,u.fillRect(0,0,r,i))}return{uid:t.uid,dom:t.dom,components:[v.asSpec(),h.asSpec(),b.asSpec()],behaviours:ec([mm("colour-picker-events",[Cr($S,(s=[e,function(t,e,n){h.getOpt(t).each(function(t){JS.setValue(t,{y:100-n/360*100})})},function(t,e){v.getOpt(t).each(function(t){g.setThumb(t,e)})}],function(t,e){var n=e.event.hex;r(t,n,jb(Pb(n)).hue,s)})),Cr(ZS,(c=[n],function(t,e){var n=e.event.value,o=p.paletteHue.get();r(t,Wb(Ub(o,n.x,100-n.y)),o,c)})),Cr(QS,(a=[e,n],function(t,e){var n=(100-e.event.value.y)/100*360,o=jb(p.paletteRgba.get());r(t,Wb(Ub(n,o.saturation,o.value)),n,a)}))]),cd.config({find:function(t){return b.getOpt(t)}}),Tg.config({mode:"acyclic"})])}}})}function aw(t){return ck[t]}function cw(t,e,n){return Df.config(Yo({store:{mode:"manual",getValue:e,setValue:n}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))}function sw(r,i){function e(t,e){e.stop()}function n(t){return function(e,n){St(t,function(t){t(e,n)})}}function o(t,e){var n;gd.isDisabled(t)||(n=e.event.raw,a(t,n.dataTransfer.files))}function u(t,e){var n=e.event.raw.target;a(t,n.files)}function a(t,e){var n,o;Df.setValue(t,(n=e,o=lk.explode(i.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),F(kt(n),function(e){return d(o,function(t){return At(e.name.toLowerCase(),"."+t.toLowerCase())})}))),br(t,bx,{name:r.name})}var c=Lm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ec([mm("input-file-events",[Dr(Ci()),Dr(Ni())])])});return ex(r.label.map(function(t){return nx(t,i)}),dx.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ec([gk([]),uS(),gd.config({}),Rg.config({toggleClass:"dragenter",toggleOnExecute:!1}),mm("dropzone-events",[Cr("dragenter",n([e,Rg.toggle])),Cr("dragleave",n([e,Rg.toggle])),Cr("dragover",e),Cr("drop",n([e,o])),Cr(ki(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:i.translate("Drop an image here")}},ip.sketch({dom:{tag:"button",innerHtml:i.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element.dom.click()},buttonBehaviours:ec([gx.config({}),Jb(i.isDisabled),gb()])})]}]}}}}),["tox-form__group--stretched"],[])}function lw(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:ec([Mg.config({ignore:!0}),gx.config({})])}}function fw(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[lw([pk]),t,lw([hk])],behaviours:ec([ak(1)])}}function dw(t,e){br(t,xi(),{raw:{which:9,shiftKey:e}})}function mw(t,e){var n=e.element;Kr(n,pk)?dw(t,!0):Kr(n,hk)&&dw(t,!1)}function gw(t){return Xy(t,["."+pk,"."+hk].join(","),T)}function pw(t,e){return yk(document.createElement("canvas"),t,e)}function hw(t){var e=pw(t.width,t.height);return bk(e).drawImage(t,0,0),e}function vw(t){return t.naturalWidth||t.width}function bw(t){return t.naturalHeight||t.height}function yw(t,o,r){return o=o||"image/png",S(HTMLCanvasElement.prototype.toBlob)?new Hx(function(e,n){t.toBlob(function(t){t?e(t):n()},o,r)}):(g=t.toDataURL(o,r),new Hx(function(t,e){!function(){var t=g.split(","),e=/data:([^;]+)/.exec(t[0]);if(!e)return vt.none();for(var n=e[1],o=t[1],r=atob(o),i=r.length,u=Math.ceil(i/1024),a=new Array(u),c=0;c",t)}).toArray(),fC("anchor",t.targets),vt.from(t.anchorBottom).map(function(t){return lC("",t)}).toArray()]))],function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(gO,e)},[]):e})),wv.BUBBLE_TO_SANDBOX,a,!1);return Wx(i)},getHotspot:function(t){return p.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(qx)&&qx.run(t).get(st)},typeaheadBehaviours:ec(ft([c.getValidationHandler().map(function(n){return qx.config({getRoot:function(t){return Yt(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){f.getOpt(t).each(function(t){oe(t.element,"title",i.translate(e))})}},validator:{validate:function(t){var e=Df.getValue(t);return mO(function(o){n({type:u.filetype,url:e.value},function(t){var e,n;"invalid"===t.status?(e=Nn.error(t.message),o(e)):(n=Nn.value(t.message),o(n))})})},validateOnLoad:!1}})}).toArray(),[gd.config({disabled:function(){return u.disabled||i.isDisabled()}}),gx.config({}),mm("urlinput-events",ft(["file"===u.filetype?[Cr(Si(),function(t){br(t,bx,{name:u.name})})]:[],[Cr(ki(),function(t){br(t,bx,{name:u.name}),r(t)}),Cr(Mi(),function(t){br(t,bx,{name:u.name}),r(t)})]]))]])),eventOrder:((t={})[Si()]=["streaming","urlinput-events","invalidating"],t),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:a.shared.getSink,parts:{menu:Qh(0,0,"normal")},onExecute:function(t,e,n){br(e,Sx,{})},onItemExecute:function(t,e,n,o){r(t),br(t,bx,{name:u.name})}}),l=u.label.map(function(t){return nx(t,i)}),f=Lm((e="invalid",n=vt.some(pO),sh("warning",{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:lt({title:i.translate(o=void 0===o?e:o),"aria-live":"polite"},n.fold(function(){return{}},function(t){return{id:t}}))},i.icons))),d=Lm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[f.asSpec()]}),m=c.getUrlPicker(u.filetype),g=Ir("browser.url.event"),p=Lm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[s,d.asSpec()],behaviours:ec([gd.config({disabled:function(){return u.disabled||i.isDisabled()}})])}),h=Lm(Kw({name:u.name,icon:vt.some("browse"),text:u.label.getOr(""),disabled:u.disabled,primary:!1,borderless:!0},function(t){return vr(t,g)},i,[],["tox-browse-url"]));return dx.sketch({dom:vx([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:ft([[p.asSpec()],m.map(function(){return h.asSpec()}).toArray()])}]),fieldBehaviours:ec([gd.config({disabled:function(){return u.disabled||i.isDisabled()},onDisabled:function(t){dx.getField(t).each(gd.disable),h.getOpt(t).each(gd.disable)},onEnabled:function(t){dx.getField(t).each(gd.enable),h.getOpt(t).each(gd.enable)}}),gb(),mm("url-input-events",[Cr(g,function(o){cd.getCurrent(o).each(function(e){var t=Df.getValue(e),n=lt({fieldname:u.name},t);m.each(function(t){t(n).get(function(t){Df.setValue(e,t),br(o,bx,{name:u.name})})})})})])])})}function gC(r){return function(e,n,o){return tt(n,"name").fold(function(){return r(n,o)},function(t){return e.field(t,r(n,o))})}}function pC(e,t,n){var o=Yo(n,{shared:{interpreter:function(t){return bO(e,t,o)}}});return bO(e,t,o)}function hC(t,e,n){function o(){return Mt.fromDom(t.getContentAreaContainer())}function r(){return p||!n()}var i,u,a,c,s,l,f,d,m,g,p=cb(t);return{inlineDialog:(f=o,d=e,m=r,g={maxHeightFunction:Nc()},function(){return m()?{type:"node",root:te(f()),node:vt.from(f()),bubble:Sc(12,12,yO),layouts:{onRtl:function(){return[Mm]},onLtr:function(){return[Bm]}},overrides:g}:{type:"hotspot",hotspot:d(),bubble:Sc(-12,12,yO),layouts:{onRtl:function(){return[Xa]},onLtr:function(){return[Ya]}},overrides:g}}),banner:(c=o,s=e,l=r,function(){return l()?{type:"node",root:te(c()),node:vt.from(c()),layouts:{onRtl:function(){return[np]},onLtr:function(){return[np]}}}:{type:"hotspot",hotspot:s(),layouts:{onRtl:function(){return[$a]},onLtr:function(){return[$a]}}}}),cursor:(u=t,function(){return{type:"selection",root:a(),getSelection:function(){var t=u.selection.getRng();return vt.some(ms.range(Mt.fromDom(t.startContainer),t.startOffset,Mt.fromDom(t.endContainer),t.endOffset))}}}),node:(i=a=function(){return Mt.fromDom(t.getBody())},function(t){return{type:"node",root:i(),node:t}})}}function vC(i){return vt.from(i.getParam("style_formats")).filter(c).map(function(t){var e,n,o=(e=i,n=wO(t),e.formatter?r(n.customFormats):e.on("init",function(){r(n.customFormats)}),n.formats);function r(t){St(t,function(t){e.formatter.has(t.name)||e.formatter.register(t.name,t.format)})}return i.getParam("style_formats_merge",!1,"boolean")?xO.concat(o):o}).getOr(xO)}function bC(t,e,n){var o={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return Yo(t,o)}function yC(c,t,s,l){var f=function(t){return B(t,function(t){var e,n,o,r,i,u=Ct(t);if(et(t,"items")){var a=f(t.items);return Yo(Yo(t,{type:"submenu"}),{getStyleItems:rt(a)})}return et(t,"format")?bC(t,s,l):1===u.length&&wt(u,"title")?Yo(t,{type:"separator"}):(r={type:"formatter",format:o="custom-"+(n=y((e=t).name)?e.name:Ir(e.title)),isSelected:s(o),getStylePreview:l(o)},i=Yo(e,r),c.formatter.register(n,i),i)})};return f(t)}function xC(n){return function(t){if(k(e=t)&&1===e.nodeType){if(t.contentEditable===n)return!0;if(t.getAttribute("data-mce-contenteditable")===n)return!0}var e;return!1}}function wC(t,e,n,o,r){return{type:t,title:e,url:n,level:o,attach:r}}function SC(t){return t.innerText||t.textContent}function kC(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&q1(t)}function CC(t){return t&&/^(H[1-6])$/.test(t.nodeName)}function OC(t){return CC(t)&&q1(t)}function _C(t){var e,n=t.id||Ir("h");return wC("header",SC(t),"#"+n,CC(e=t)?parseInt(e.nodeName.substr(1),10):0,function(){t.id=n})}function TC(t){var e=t.id||t.name;return wC("anchor",SC(t)||"#"+e,"#"+e,0,st)}function EC(t){return 0=n.y}})}function GC(e,t){return t.getInitialPos().map(function(t){return Bn(t.bounds.x,t.bounds.y,Ce(e),xe(e))})}function XC(n,o,r){return r.getInitialPos().bind(function(t){switch(r.clearInitialPos(),t.position){case"static":return vt.some(PO.static());case"absolute":var e=LC(n).map(Mn).getOrThunk(function(){return Mn(bn())});return vt.some(PO.absolute(Ea("absolute",tt(t.style,"left").map(function(t){return o.x-e.x}),tt(t.style,"top").map(function(t){return o.y-e.y}),tt(t.style,"right").map(function(t){return e.right-o.right}),tt(t.style,"bottom").map(function(t){return e.bottom-o.bottom}))));default:return vt.none()}})}function YC(t,e,n){var o,r,i,u=t.element;return mt(pe(u,"position"),"fixed")?(r=e,GC(o=u,i=n).filter(function(t){return WC(i.getModes(),t,r)}).bind(function(t){return XC(o,t,i)})):function(t,e,n){var r,o,i=Mn(t);if(WC(n.getModes(),i,e))return vt.none();r=t,o=i,n.setInitialPos({style:function(){var t={},e=r.dom;if(ct(e))for(var n=0;ni.y;e!==r.isVisible()&&(r.setVisible(e),u&&!e?(Jr(o.element,[n.fadeOutClass]),n.onHide(o)):(e?UC:jC)(o,n))})})}function $C(t,e,n){var o,r,i,u,a,c;n.isDocked()&&(r=e,i=n,c=(o=t).element,i.setDocked(!1),GC(a=o.element,u=i).bind(function(t){return XC(a,t,u)}).each(function(t){t.fold(function(){return qC(o,r,i)},function(t){return KC(o,r,i,t)},st)}),i.setVisible(!0),r.contextual.each(function(t){$r(c,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(o)}),VO(o,r,i))}function QC(t,e){return wt(zO.getModes(t),e)}function ZC(r){var i=r.element;Yt(i).each(function(t){var e,n,o="padding-"+zO.getModes(r)[0];zO.isDocked(r)?(e=Ce(t),fe(i,"width",e+"px"),fe(t,o,we(n=i)+(parseInt(ge(n,"margin-top"),10)||0)+(parseInt(ge(n,"margin-bottom"),10)||0)+"px")):(ve(i,"width"),ve(t,o))})}function t1(t,e){e?(qr(t,jO.fadeOutClass),Jr(t,[jO.transitionClass,jO.fadeInClass])):(qr(t,jO.fadeInClass),Jr(t,[jO.fadeOutClass,jO.transitionClass]))}function e1(t,e){var n=Mt.fromDom(t.getContainer());e?(Yr(n,WO),qr(n,GO)):(Yr(n,GO),qr(n,WO))}function n1(u,t){function o(e){r().each(function(t){return e(t.element)})}function e(t){u.inline||ZC(t),e1(u,zO.isDocked(t)),t.getSystem().broadcastOn([xf()],{}),r().each(function(t){return t.getSystem().broadcastOn([xf()],{})})}var n,i=gc(),r=t.getSink,a=u.inline?[]:[ic.config({channels:((n={})[UO()]={onReceive:ZC},n)})];return V([Mg.config({}),zO.config({contextual:lt({lazyContext:function(t){var e=we(t.element),n=u.inline?u.getContentAreaContainer():u.getContainer(),o=Mn(Mt.fromDom(n)),r=o.height-e,i=o.y+(QC(t,"top")?0:e);return vt.some(Bn(o.x,i,o.width,r))},onShow:function(){o(function(t){return t1(t,!0)})},onShown:function(r){o(function(t){return $r(t,[jO.transitionClass,jO.fadeInClass])}),i.get().each(function(t){var e,n=r.element,o=jt(e=t);Oa(o).filter(function(t){return!zt(e,t)}).filter(function(t){return zt(t,Mt.fromDom(o.dom.body))||Ut(n,t)}).each(function(){return ka(e)}),i.clear()})},onHide:function(t){var e=t.element,n=r;_a(e).orThunk(function(){return n().toOptional().bind(function(t){return _a(t.element)})}).fold(i.clear,i.set),o(function(t){return t1(t,!1)})},onHidden:function(){o(function(t){return $r(t,[jO.transitionClass])})}},jO),lazyViewport:function(t){var e=Fn(),n=u.getParam("toolbar_sticky_offset",0,"number"),o=e.y+(QC(t,"top")?n:0),r=e.height-(QC(t,"bottom")?n:0);return Bn(e.x,o,e.width,r)},modes:[t.header.getDockingMode()],onDocked:e,onUndocked:e})],a,!0)}function o1(t){return ao("menubutton",KO,t)}function r1(e,t){return t.getAnimationRoot.fold(function(){return e.element},function(t){return t(e)})}function i1(t){return t.dimension.property}function u1(t,e){return t.dimension.getDimension(e)}function a1(t,e){$r(r1(t,e),[e.shrinkingClass,e.growingClass])}function c1(t,e){qr(t.element,e.openClass),Yr(t.element,e.closedClass),fe(t.element,i1(e),"0px"),be(t.element)}function s1(t,e){qr(t.element,e.closedClass),Yr(t.element,e.openClass),ve(t.element,i1(e))}function l1(t,e,n,o){n.setCollapsed(),fe(t.element,i1(e),u1(e,t.element)),be(t.element),a1(t,e),c1(t,e),e.onStartShrink(t),e.onShrunk(t)}function f1(t,e,n){var o=u1(e,t.element);("0px"===o?l1:function(t,e,n,o){var r=o.getOrThunk(function(){return u1(e,t.element)});n.setCollapsed(),fe(t.element,i1(e),r),be(t.element);var i=r1(t,e);qr(i,e.growingClass),Yr(i,e.shrinkingClass),c1(t,e),e.onStartShrink(t)})(t,e,n,vt.some(o))}function d1(t,e,n){var o=r1(t,e),r=Kr(o,e.shrinkingClass),i=u1(e,t.element);s1(t,e);var u=u1(e,t.element);(r?function(){fe(t.element,i1(e),i),be(t.element)}:function(){c1(t,e)})(),qr(o,e.shrinkingClass),Yr(o,e.growingClass),s1(t,e),fe(t.element,i1(e),u),n.setExpanded(),e.onStartGrow(t)}function m1(t,e,n){return!0===Kr(r1(t,e),e.growingClass)}function g1(t,e,n){return!0===Kr(r1(t,e),e.shrinkingClass)}function p1(t){return""}function h1(t){return{element:function(){return t.element.dom}}}function v1(t,n){cd.getCurrent(t).each(function(t){return Dg.set(t,[(e=n,r_.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:(n=t,r=B(Ct(o=e),function(t){var e=o[t],n=co(ao("sidebar",i_,e));return{name:t,getApi:h1,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}),B(r,function(t){var e=Po(st);return n.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:qv([hb(t,e),vb(t,e),Cr(Ji(),function(e,t){var n=t.event;N(r,function(t){return t.name===n.name}).each(function(t){(n.visible?t.onShow:t.onHide)(t.getApi(e))})})])})})),slotBehaviours:qv([ou(function(t){return r_.hideAllSlots(t)})])};var n,o,r}))]);var e})}function b1(t){return cd.getCurrent(t).bind(function(t){return t_.isGrowing(t)||t_.hasGrown(t)?cd.getCurrent(t).bind(function(e){return N(r_.getSlotNames(e),function(t){return r_.isShowing(e,t)})}):vt.none()})}function y1(t){return cd.getCurrent(t).each(function(t){return ka(t.element)})}function x1(f,d,m){function e(t){var e;!g.get()||"focusin"===(e=t).type&&(e.composed?Y(e.composedPath()):vt.from(e.target)).map(Mt.fromDom).filter(Ge).exists(function(t){return Kr(t,"mce-pastebin")})||(t.preventDefault(),y1(d()),f.editorManager.setActive(f))}var g=Po(!1),n=gc();function o(t){var e,n,o,r,i,u,a,c,s,l;t!==g.get()&&(g.set(t),e=f,n=d(),o=t,r=m.providers,c=n.element,s=o,l="data-mce-"+(i="tabindex"),vt.from(e.iframeElement).map(Mt.fromDom).each(function(e){s?(ue(e,i).each(function(t){return oe(e,l,t)}),oe(e,i,-1)):(ce(e,i),ue(e,l).each(function(t){oe(e,i,t),ce(e,l)}))}),o?(s_.block(n,(a=r,function(t,e){return{dom:{tag:"div",attributes:{"aria-label":a.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:Hm('')}]}})),ve(c,"display"),ce(c,"aria-hidden"),e.hasFocus()&&y1(n)):(u=cd.getCurrent(n).exists(function(t){return Ca(t.element)}),s_.unblock(n),fe(c,"display","none"),oe(c,"aria-hidden","true"),u&&e.focus()),f.fire("AfterProgressState",{state:t}))}f.inline||f.on("PreInit",function(){f.dom.bind(f.getWin(),"focusin",e),f.on("BeforeExecCommand",function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&e(t)})}),f.on("ProgressState",function(t){var e;n.on(rp.clearTimeout),u(t.time)?(e=rp.setEditorTimeout(f,function(){return o(t.state)},t.time),n.set(e)):(o(t.state),n.clear())})}function w1(t,e,n){return{within:t,extra:e,withinWidth:n}}function S1(t,e,o){var n,r=(n=function(t,e){var n=o(t);return vt.some({element:t,start:e,finish:e+n,width:n})},R(t,function(e,t){return n(t,e.len).fold(rt(e),function(t){return{len:t.finish,list:e.list.concat([t])}})},{len:0,list:[]}).list),i=F(r,function(t){return t.finish<=e}),u=I(i,function(t,e){return t+e.width},0);return{within:i,extra:r.slice(i.length),withinWidth:u}}function k1(t){return B(t,function(t){return t.element})}function C1(t,e){var n=B(e,function(t){return Eu(t)});IO.setGroups(t,n)}function O1(t,e,n){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k=e.builtGroups.get();0!==k.length&&(o=gl(t,e,"primary"),r=Jx.getCoupled(t,"overflowGroup"),fe(o.element,"visibility","hidden"),u=K(i=k.concat([r]),function(e){return _a(e.element).bind(function(t){return e.getSystem().getByDom(t).toOptional()})}),n([]),C1(o,i),a=Ce(o.element),0===(s=a,l=e.builtGroups.get(),d=r,y=(0===(m=S1(l,s,f=function(t){return Ce(t.element)})).extra.length?vt.some(m):vt.none()).getOrThunk(function(){return S1(l,s-f(d),f)}),x=y.within,w=y.extra,S=y.withinWidth,(c=1===w.length&&w[0].width<=f(d)?(b=S,w1(k1(x.concat(w)),[],b)):1<=w.length?(p=w,h=d,v=S,w1(k1(x).concat([h]),k1(p),v)):(g=S,w1(k1(x),[],g))).extra.length)?(Dg.remove(o,r),n([])):(C1(o,c.within),n(c.extra)),ve(o.element,"visibility"),be(o.element),u.each(Mg.focus))}function _1(t,e){var n=Jx.getCoupled(t,"toolbarSandbox");bf.isOpen(n)?bf.close(n):bf.open(n,e.toolbar())}function T1(t,e,n,o){var r=n.getBounds.map(function(t){return t()}),i=n.lazySink(t).getOrDie();ff.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:m_()}}},r)}function E1(t,e,n,o,r){IO.setGroups(e,r),T1(t,e,n,o),Rg.on(t)}function D1(t){return B(t,function(t){return Eu(t)})}function A1(t,n,o){O1(t,o,function(e){o.overflowGroups.set(e),n.getOpt(t).each(function(t){h_.setGroups(t,D1(e))})})}function B1(e,n){ml(e,n,"overflow-button").bind(function(){return ml(e,n,"overflow")}).each(function(t){J1(e,n),t_.toggleGrow(t)})}function M1(t){var e=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:lt({tag:"div",classes:["tox-toolbar__group"]},e),components:[y_.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ec([gx.config({}),Mg.config({})])}}function F1(t){return y_.sketch(M1(t))}function I1(n,t){var e=ou(function(t){var e=B(n.initGroups,F1);IO.setGroups(t,e)});return ec([$b(n.providers.isDisabled),gb(),Tg.config({mode:t,onEscape:n.onEscape,selector:".tox-toolbar__group"}),mm("toolbar-events",[e])])}function R1(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":M1({title:vt.none(),items:[]}),"overflow-button":Xw({name:"more",icon:vt.some("more-drawer"),disabled:!1,tooltip:vt.some("More..."),primary:!1,borderless:!1},vt.none(),t.providers)},splitToolbarBehaviours:I1(t,e)}}function N1(t){var e=t.cyclicKeying?"cyclic":"acyclic";return IO.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===vv.scrolling?["tox-toolbar--scrolling"]:[])},components:[IO.parts.groups({})],toolbarBehaviours:I1(t,e)})}function P1(t){return"string"==typeof t?t.split(" "):t}function V1(i,u){var a=lt(lt({},M_),u.menus),n=0=r.minChars&&(n=cd.getCurrent(o).bind(function(t){return hd.getHighlighted(t).map(Df.getValue)}),r.previewing.set(!0),t0(r,u(t),t,o,i,function(t){cd.getCurrent(o).each(function(t){n.fold(function(){r.model.selectsOver&&hd.highlightFirst(t)},function(e){hd.highlightBy(t,function(t){return Df.getValue(t).value===e.value}),hd.getHighlighted(t).orThunk(function(){return hd.highlightFirst(t),vt.none()})})})},Px.HighlightFirst).get(st))},cancelEvent:Hi()}),Tg.config({mode:"special",onDown:function(t,e){return n(t,e,hd.highlightFirst),vt.some(!0)},onEscape:function(t){var e=Jx.getCoupled(t,"sandbox");return bf.isOpen(e)?(bf.close(e),vt.some(!0)):vt.none()},onUp:function(t,e){return n(t,e,hd.highlightLast),vt.some(!0)},onEnter:function(e){var t=Jx.getCoupled(e,"sandbox"),n=bf.isOpen(t);if(n&&!r.previewing.get())return cd.getCurrent(t).bind(function(t){return hd.getHighlighted(t)}).map(function(t){return br(e,cO(),{item:t}),!0});var o=Df.getValue(e);return vr(e,Hi()),r.onExecute(t,e,o),n&&bf.close(t),vt.some(!0)}}),Rg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),Jx.config({others:{sandbox:function(t){return o0(r,t,{onOpen:function(){return Rg.on(t)},onClose:function(){return Rg.off(t)}})}}}),mm("typeaheadevents",[uu(function(t){e0(r,u(t),t,i,st,Px.HighlightFirst).get(st)}),Cr(cO(),function(t,e){var n=Jx.getCoupled(t,"sandbox");aC(r.model,t,e.event.item),vr(t,Hi()),r.onItemExecute(t,n,e.event.item,Df.getValue(t)),bf.close(n),aO(t)})].concat(r.dismissOnBlur?[Cr(Bi(),function(t){var e=Jx.getCoupled(t,"sandbox");_a(e.element).isNone()&&bf.close(e)})]:[]))];return{uid:r.uid,dom:rx(Yo(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:lt(lt({},o),el(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),dO=function(i){return lt(lt({},i),{toCached:function(){return dO(i.toCached())},bindFuture:function(e){return dO(i.bind(function(t){return t.fold(function(t){return Wx(Nn.error(t))},function(t){return e(t)})}))},bindResult:function(e){return dO(i.map(function(t){return t.bind(e)}))},mapResult:function(e){return dO(i.map(function(t){return t.map(e)}))},mapError:function(e){return dO(i.map(function(t){return t.mapError(e)}))},foldResult:function(e,n){return i.map(function(t){return t.fold(e,n)})},withTimeout:function(t,r){return dO(jx(function(e){var n=!1,o=setTimeout(function(){n=!0,e(Nn.error(r()))},t);i.get(function(t){n||(clearTimeout(o),e(t))})}))}})},mO=function(t){return dO(jx(t))},gO={type:"separator"},pO=Ir("aria-invalid"),hO={bar:gC(function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:B(t.items,n.interpreter)};var n}),collection:gC(function(t,e){return u=t,a=e.shared.providers,c=u.label.map(function(t){return nx(t,a)}),s=n(function(t,e,n,o){e.stop(),a.isDisabled()||br(t,wx,{name:u.name,value:o})}),l=[Cr(vi(),n(function(t,e,n){ka(n)})),Cr(Ci(),s),Cr(Ni(),s),Cr(bi(),n(function(t,e,n){Iu(t.element,"."+Av).each(function(t){qr(t,Av)}),Yr(n,Av)})),Cr(yi(),n(function(t){Iu(t.element,"."+Av).each(function(t){qr(t,Av)})})),uu(n(function(t,e,n,o){br(t,wx,{name:u.name,value:o})}))],ex(c,dx.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==u.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:h},behaviours:ec([gd.config({disabled:a.isDisabled,onDisabled:function(t){o(t,function(t){Yr(t,"tox-collection__item--state-disabled"),oe(t,"aria-disabled",!0)})},onEnabled:function(t){o(t,function(t){qr(t,"tox-collection__item--state-disabled"),ce(t,"aria-disabled")})}}),gb(),Dg.config({}),Df.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){var e=o,n=B(t,function(t){var e=fh.translate(t.text),n=1===u.columns?''+e+"
":"",o=''+t.icon+"
",r={_:" "," - ":" ","-":" "},i=e.replace(/\_| \- |\-/g,function(t){return r[t]});return''+o+n+"
"}),r=B("auto"!==u.columns&&1'+t.join("")+""});Mr(e.element,r.join("")),"auto"===u.columns&&uv(o,5,"tox-collection__item").each(function(t){var e=t.numRows,n=t.numColumns;Tg.setGridSize(o,e,n)}),vr(o,_x)}}),gx.config({}),Tg.config(1===(i=u.columns)?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===i?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+kv}}),mm("collection-events",l)]),eventOrder:((r={})[Ii()]=["disabling","alloy.base.behaviour","collection-events"],r)}),["tox-form__group--collection"],[]);function n(o){return function(e,n){Ru(n.event.target,"[data-collection-item-value]").each(function(t){o(e,n,t,ie(t,"data-collection-item-value"))})}}function o(t,e){return B(vs(t.element,".tox-collection__item"),e)}var u,a,r,i,c,s,l}),alertbanner:gC(function(t,e){return o=e.shared.providers,sx.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+(n=t).level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[ip.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:uh(n.icon,o.icons),attributes:{title:o.translate(n.iconTooltip)}},action:function(t){br(t,wx,{name:"alert-banner",value:n.url})},buttonBehaviours:ec([ah()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(n.text)}}]});var n,o}),input:gC(function(t,e){return o=e.shared.providers,iC({name:(n=t).name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:vt.none(),maximized:n.maximized},o);var n,o}),textarea:gC(function(t,e){return o=e.shared.providers,iC({name:(n=t).name,multiline:!0,label:n.label,inputMode:vt.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:vt.none(),maximized:n.maximized},o);var n,o}),label:gC(function(t,e){return r={dom:{tag:"label",innerHtml:(o=e.shared).providers.translate((n=t).label),classes:["tox-label"]}},i=B(n.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:ec([uS(),Dg.config({}),aS(vt.none()),Tg.config({mode:"acyclic"})])};var n,o,r,i}),iframe:($1=function(t,e){return n=t,o=e.shared.providers,u=vk&&n.sandboxed,a=lt(lt({},n.label.map(function(t){return{title:t}}).getOr({})),u?{sandbox:"allow-scripts allow-same-origin"}:{}),r=u,i=Po(""),c={getValue:function(t){return i.get()},setValue:function(t,e){var n;r?oe(t.element,"srcdoc",e):(oe(t.element,"src","javascript:''"),(n=t.element.dom.contentWindow.document).open(),n.write(e),n.close()),i.set(e)}},ex(n.label.map(function(t){return nx(t,o)}),dx.parts.field({factory:{sketch:function(t){return fw({uid:t.uid,dom:{tag:"iframe",attributes:a},behaviours:ec([gx.config({}),Mg.config({}),mk(vt.none(),c.getValue,c.setValue)])})}}}),["tox-form__group--stretched"],[]);var n,o,r,i,u,a,c},function(t,e,n){var o=Yo(e,{source:"dynamic"});return gC($1)(t,o,n)}),button:gC(function(t,e){return n=t,o=e.shared.providers,r=Jw(n.name,"custom"),ex(vt.none(),dx.parts.field(lt({factory:ip},qw(n,vt.some(r),o,[gk(""),uS()]))),[],[]);var n,o,r}),checkbox:gC(function(t,e){return r=t,i=e.shared.providers,u=Df.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,e){t.element.dom.checked=e}}}),a=dx.parts.field({factory:{sketch:h},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ec([uS(),gd.config({disabled:function(){return r.disabled||i.isDisabled()}}),gx.config({}),Mg.config({}),u,Tg.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),mm("checkbox-events",[Cr(ki(),function(t,e){br(t,bx,{name:r.name})})])])}),c=dx.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:i.translate(r.label)},behaviours:ec([hS.config({})])}),s=Lm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[o("checked"),o("unchecked")]}),dx.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[a,s.asSpec(),c],fieldBehaviours:ec([gd.config({disabled:function(){return r.disabled||i.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){dx.getField(t).each(gd.disable)},onEnabled:function(t){dx.getField(t).each(gd.enable)}}),gb()])});function n(t){return t.element.dom.click(),vt.some(!0)}function o(t){return sh("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},i.icons)}var r,i,u,a,c,s}),colorinput:gC(function(t,e){return n=t,r=e.shared,i=e.colorinput,c=dx.parts.field({factory:Ex,inputClasses:["tox-textfield"],onSetValue:function(t){return qx.run(t).get(st)},inputBehaviours:ec([gd.config({disabled:r.providers.isDisabled}),gb(),gx.config({}),qx.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return Yt(t.element)},notify:{onValid:function(t){var e=Df.getValue(t);br(t,vS,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=Df.getValue(t);if(0===e.length)return Wx(Nn.value(!0));var n=Mt.fromTag("span");fe(n,"background-color",e);var o=pe(n,"background-color").fold(function(){return Nn.error("blah")},function(t){return Nn.value(e)});return Wx(o)}}})]),selectOnFocus:!1}),s=n.label.map(function(t){return nx(t,r.providers)}),l=Lm((u={dom:{tag:"span",attributes:{"aria-label":r.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Ya,Xa,$a]},onLtr:function(){return[Xa,Ya,$a]}},components:[],fetch:xy(i.getColors(),i.hasCustomColors()),columns:i.getColorCols(),presets:"color",onItemAction:function(t,n){l.getOpt(t).each(function(e){"custom"===n?i.colorPicker(function(t){t.fold(function(){return vr(e,yS)},function(t){o(e,t),py(t)})},"#ffffff"):o(e,"remove"===n?"":n)})}},pS.sketch({dom:u.dom,components:u.components,toggleClass:"mce-active",dropdownBehaviours:ec([Jb((a=r).providers.isDisabled),gb(),hS.config({}),gx.config({})]),layouts:u.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:a.getSink,fetch:function(e){return jx(function(t){return u.fetch(t)}).map(function(t){return vt.from(Gy(Yo(Cy(Ir("menu-value"),t,function(t){u.onItemAction(e,t)},u.columns,u.presets,wv.CLOSE_ON_EXECUTE,T,a.providers),{movement:Oy(u.columns,u.presets)})))})},parts:{menu:Qh(0,0,u.presets)}}))),dx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:s.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[c,l.asSpec()]}]),fieldBehaviours:ec([mm("form-field-events",[Cr(vS,function(t,e){l.getOpt(t).each(function(t){fe(t.element,"background-color",e.event.color)}),br(t,bx,{name:n.name})}),Cr(bS,function(e,n){dx.getField(e).each(function(t){Df.setValue(t,n.event.value),cd.getCurrent(e).each(Mg.focus)})}),Cr(yS,function(e,t){dx.getField(e).each(function(t){cd.getCurrent(e).each(Mg.focus)})})])])});function o(t,e){br(t,bS,{value:e})}var n,r,i,u,a,c,s,l}),colorpicker:gC(function(t){var r=Lm(uw(aw,function(t){return"tox-"+t}).sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){br(t,wx,{name:"hex-valid",value:!0})},onInvalidHex:function(t){br(t,wx,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:ec([Df.config({store:{mode:"manual",getValue:function(t){var e=r.get(t);return cd.getCurrent(e).bind(function(t){return Df.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,e){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(e),o=r.get(t);cd.getCurrent(o).fold(function(){console.log("Can not find form")},function(t){Df.setValue(t,{hex:vt.from(n[1]).getOr("")}),ek.getField(t,"hex").each(function(t){vr(t,Si())})})}}}),uS()])}}),dropzone:gC(function(t,e){return sw(t,e.shared.providers)}),grid:gC(function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:B(t.items,n.interpreter)};var n}),listbox:gC(function(t,e){return n=t,r=(o=e).shared.providers,i=Y(n.items).filter(oC),u=n.label.map(function(t){return nx(t,r)}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[dx.parts.field({dom:{},factory:{sketch:function(t){return Lw({uid:t.uid,text:i.map(function(t){return t.text}),icon:vt.none(),tooltip:n.label,role:vt.none(),fetch:function(t,e){e(Uw(eO(t,n.name,n.items,Df.getValue(t)),wv.CLOSE_ON_EXECUTE,o,!1))},onSetup:rt(st),getApi:rt({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[gx.config({}),Df.config({store:{mode:"manual",initialValue:i.map(function(t){return t.value}).getOr(""),getValue:function(t){return ie(t.element,tO)},setValue:function(e,t){nO(n.items,t).each(function(t){oe(e.element,tO,t.value),br(e,Rk,{text:t.text})})}}})]},"tox-listbox",o.shared)}}})]},dx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ft([u.toArray(),[a]]),fieldBehaviours:ec([gd.config({disabled:rt(n.disabled),onDisabled:function(t){dx.getField(t).each(gd.disable)},onEnabled:function(t){dx.getField(t).each(gd.enable)}})])});var n,o,r,i,u,a}),selectbox:gC(function(t,e){return n=t,o=e.shared.providers,r=B(n.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=n.label.map(function(t){return nx(t,o)}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:ft([[dx.parts.field({dom:{},selectAttributes:{size:n.size},options:r,factory:oO,selectBehaviours:ec([gd.config({disabled:function(){return n.disabled||o.isDisabled()}}),gx.config({}),mm("selectbox-change",[Cr(ki(),function(t,e){br(t,bx,{name:n.name})})])])})],(1n)return"top";var r=Gt(a),i=Math.max(r.dom.scrollHeight,xe(r));return o.bottom=(n=void 0===n?.01:n)&&t.bottom-e.y>=n}function rT(t){var e=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=Qt(Mt.fromDom(t.startContainer),t.startOffset).element;return(Xe(n)?Yt(n):vt.some(n)).filter(Ge).map(function(t){return t.dom.getBoundingClientRect()}).getOr(e)}return e}(t.selection.getRng());if(t.inline){var n=Ie();return Bn(n.left+e.left,n.top+e.top,e.width,e.height)}var o=He(Mt.fromDom(t.getBody()));return Bn(o.x+e.left,o.y+e.top,e.width,e.height)}function iT(t,e,n,o){void 0===o&&(o=0);var r,i,u,a,c=Pe(window),s=Mn(Mt.fromDom(t.getContentAreaContainer())),l=gv(t)||pv(t)||ob(t),f=(r=s,i=c,u=o,{x:a=Math.max(r.x+u,i.x),width:Math.min(r.right-u,i.right)-a}),d=f.x,m=f.width;if(t.inline&&!l)return Bn(d,c.y,m,c.height);var g=function(t,e,n,o,r,i){var u=Mt.fromDom(t.getContainer()),a=Iu(u,".tox-editor-header").getOr(u),c=Mn(a),s=c.y>=e.bottom,l=o&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===r?Mn(u):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}}(t,s,c,e.header.isPositionedAtTop(),n,o),p=g.y,h=g.bottom;return Bn(d,p,m,h-p)}function uT(t){return"node"===t}function aT(t,r,e,i,n){var u=rT(t),o=i.lastElement().exists(function(t){return zt(e,t)}),a=e,c=t.selection.getRng(),s=Qt(Mt.fromDom(c.startContainer),c.startOffset);return c.startContainer===c.endContainer&&c.startOffset===c.endOffset-1&&zt(s.element,a)?o?Nm:np:o?function(e,t){var n=pe(e,"position");fe(e,"position",t);var o=oT(u,Mn(r))&&!i.isReposition()?Vm:Nm;return n.each(function(t){return fe(e,"position",t)}),o}(r,i.getMode()):("fixed"===i.getMode()?n.y+Ie().top:n.y)+(xe(r)+12)<=u.y?np:op}function cT(e,t){var n=M(F(t,function(t){return t.predicate(e.dom)}),function(t){return"contexttoolbar"===t.type});return{contextToolbars:n.pass,contextForms:n.fail}}function sT(n,t){function o(t){return zt(t,r)}var e,r=Mt.fromDom(t.getBody()),i=Mt.fromDom(t.selection.getNode());return o(e=i)||Ut(r,e)?function(t,e,n){var o=cT(t,e);if(0=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY})}}(f,d)?e():(f.once("selectionchange",e),f.once("touchend",function(){return f.off("selectionchange",e)}))):t()}function iE(t){return"string"==typeof t?t.split(/[ ,]/):t}function uE(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")}function aE(t){return y(t)?"|"===t:"separator"===t.type}function cE(t,e){if(0===e.length)return t;var n=q(t).filter(function(t){return!aE(t)}).fold(function(){return[]},function(t){return[UE]});return t.concat(n).concat(e).concat([UE])}function sE(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)}function lE(t,e){return sE(t,e)?t.selection.getStart(!0):e.target}function fE(s,t,e){function n(t){return tp.hide(i)}function o(c){var t;uE(s)&&c.preventDefault(),c.ctrlKey&&!uE(s)||!1===s.getParam("contextmenu")||(t=function(t,e){var n=t.getParam("contextmenu_avoid_overlap","","string"),o=sE(t,e)?"selection":"point";if(at(n)){var r=lE(t,e);return Xy(Mt.fromDom(r),n)?"node":o}return o}(s,c),(r()?rE:function(t,e,n,o,r,i){var u=n(),a=oE(t,e,i);Uw(u,wv.CLOSE_ON_EXECUTE,o,!1).map(function(t){e.preventDefault(),tp.showMenuAt(r,{anchor:a},{menu:{markers:$h("normal")},data:t})})})(s,c,function(){var t,e,n,o=lE(s,c),r=s.ui.registry.getAll(),i=(n=(e=s).ui.registry.getAll().contextMenus,vt.from(e.getParam("contextmenu")).map(iE).getOrThunk(function(){return F(iE("link linkchecker image imagetools table spellchecker configurepermanentpen"),function(t){return Tt(n,t)})})),u=r.contextMenus,a=o;return 0<(t=R(i,function(o,t){return tt(u,t.toLowerCase()).map(function(t){var e=t.update(a);if(y(e))return cE(o,e.split(" "));if(0n;(o||r)&&fe(t.element,"display","none")}(t)}function i(t){return r(h,t,e,"top")}function u(t){return r(v,t,o,"bottom")}var c=Po([]),s=Po([]),t=Po(!1),l=gc(),f=gc(),d=FE(function(){return B(c.get(),e)},l,function(e){f.get().each(function(t){a.fire("TableSelectorChange",{start:e,finish:t})})}),m=FE(function(){return B(s.get(),o)},f,function(e){l.get().each(function(t){a.fire("TableSelectorChange",{start:t,finish:e})})}),g=IE(d),p=IE(m),h=Tu(g.asSpec()),v=Tu(p.asSpec());ln().deviceType.isTouch()&&(a.on("TableSelectionChange",function(e){t.get()||(Ns(n,h),Ns(n,v),t.set(!0)),l.set(e.start),f.set(e.finish),e.otherCells.each(function(t){c.set(t.upOrLeftCells),s.set(t.downOrRightCells),i(e.start),u(e.finish)})}),a.on("ResizeEditor ResizeWindow ScrollContent",function(){l.get().each(i),f.get().each(u)}),a.on("TableSelectionClear",function(){t.get()&&(Vs(h),Vs(v),t.set(!1)),l.clear(),f.clear()}))}var NE,PE,VE={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return r=["fixed","relative","empty"],vt.from(XT.exec(t)).bind(function(t){var e=Number(t[1]),n=t[2],o=n;return d(r,function(t){return d(GT[t],function(t){return o===t})})?vt.some({value:e,unit:n}):vt.none()}).map(function(t){return t.value+t.unit}).getOr(t);var r},display:h,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return vt.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},HE=function(t){return{type:"selection",root:Mt.fromDom(t.selection.getNode())}},LE={onLtr:function(){return[$a,Xa,Ya,qa,Ka,Ja,np,op,Mm,Am,Bm,Dm]},onRtl:function(){return[$a,Ya,Xa,Ka,qa,Ja,np,op,Bm,Dm,Mm,Am]}},zE={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},UE={type:"separator"},jE=function(e){function t(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}}var n;if(y(e))return e;switch(e.type){case"separator":return UE;case"submenu":return lt(lt({type:"nestedmenuitem"},t(e)),{getSubmenuItems:function(){var t=e.getSubmenuItems();return y(t)?t:B(t,jE)}});default:return lt(lt({type:"menuitem"},t(e)),{onAction:(n=e.onAction,function(){return n()})})}},WE=Vo([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),GE=WE.offset,XE=WE.absolute,YE=WE.fixed,qE=function(t,e,l,f,d){var n=e.getSnapPoints(t);return SE(n,l,f,d).orThunk(function(){return R(n,function(e,n){var t,o,r,i,u,a,c,s=(t=n.sensor,n.range.left,n.range.top,i=hE(l,o=f,r=d),u=hE(t,o,r),a=Math.abs(i.left-u.left),c=Math.abs(i.top-u.top),kn(a,c));return e.deltas.fold(function(){return{deltas:vt.some(s),snap:vt.some(n)}},function(t){return(s.left+s.top)/2<=(t.left+t.top)/2?{deltas:vt.some(s),snap:vt.some(n)}:e})},{deltas:vt.none(),snap:vt.none()}).snap.map(function(t){return{output:yE(t.output,l,f,d),extra:t.extra}})})},KE=function(t,e,n,o,r){return SE(e.getSnapPoints(t),n,o,r)},JE=Object.freeze({__proto__:null,snapTo:function(t,e,n,o){var r,i,u,a=e.getTarget(t.element);e.repositionTarget&&(r=Ie(jt(t.element)),i=zC(a),me(a,bE({coord:yE((u=o).output,u.output,r,i),extra:u.extra}.coord,0,i)))}}),$E="data-initial-z-index",QE=To("snaps",[mo("getSnapPoints"),Ju("onSensor"),mo("leftAttr"),mo("topAttr"),Eo("lazyViewport",Fn),Eo("mustSnap",!1)]),ZE=[Eo("useFixed",T),mo("blockerClass"),Eo("getTarget",h),Eo("onDrag",st),Eo("repositionTarget",!0),Eo("onDrop",st),Io("getBounds",Fn),QE],tD=Object.freeze({__proto__:null,getData:function(t){return vt.from(kn(t.x,t.y))},getDelta:function(t,e){return kn(e.left-t.left,e.top-t.top)}}),eD=V(V([],ZE,!0),[ta("dragger",{handlers:DE(AE)})],!1),nD=Object.freeze({__proto__:null,getData:function(t){var e,n=t.raw.touches;return 1===n.length?(e=n[0],vt.some(kn(e.clientX,e.clientY))):vt.none()},getDelta:function(t,e){return kn(e.left-t.left,e.top-t.top)}}),oD=V(V([],ZE,!0),[ta("dragger",{handlers:DE(BE)})],!1),rD=V(V([],ZE,!0),[ta("dragger",{handlers:DE(function(t,e,n){return V(V([],AE(t,e,n),!0),BE(t,e,n),!0)})})],!1),iD=wa({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:eD,touch:oD,mouseOrTouch:rD}),name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:vt.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var i=vt.none(),e=vt.none(),t=rt({});return wu({readState:t,reset:function(){i=vt.none(),e=vt.none()},update:function(r,t){return r.getData(t).bind(function(t){return e=r,n=t,o=i.map(function(t){return e.getDelta(t,n)}),i=vt.some(n),o;var e,n,o})},getStartData:function(){return e},setStartData:function(t){e=vt.some(t)}})}}),apis:JE});function uD(t,e,n){var o,r,i,u,a,c,s=Mt.fromDom(t.getContainer());J((o=t,r=e,i=n,u=xe(s),a=Ce(s),(c={}).height=Q_(u+r.top,fv(o),mv(o)),i===NE.Both&&(c.width=Q_(a+r.left,lv(o),dv(o))),c),function(t,e){return fe(s,e,$_(t)),0}),t.fire("ResizeEditor")}function aD(t,e,n,o){return uD(t,kn(20*n,20*o),e),vt.some(!0)}function cD(t,e){var n,o,r,i,u,a,c,s,l,f,d,m,g,p,h,v;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(v=[],t.getParam("elementpath",!0,"boolean")&&v.push((g=t,h=e,(p={}).delimiter||(p.delimiter="\xbb"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ec([Tg.config({mode:"flow",selector:"div[role=button]"}),gd.config({disabled:h.isDisabled}),gb(),gx.config({}),Dg.config({}),mm("elementPathEvents",[ou(function(r,t){g.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Tg.focusIn(r)}),g.on("NodeChange",function(t){var e,o,n=function(t){for(var e=[],n=t.length;0'+l+""}}),n=0=o.dom.offsetLeft+Ce(o)?Math.max(xe(o),u):u,c=parseInt(ge(e,"margin-top"),10)||0,s=parseInt(ge(e,"margin-bottom"),10)||0,i-(xe(e)+c+s-a)));var e,n,o,r,i,u,a,c,s}).each(function(t){gD(d,t)})})})}function hD(t){return Iu(t,'[role="tabpanel"]')}function vD(t,n){function o(t){var e=mD(Df.getValue(t)).getOr({}),n=i.get(),o=Yo(n,e);i.set(o)}function r(t){var e=i.get();Df.setValue(t,e)}var u,a,i=Po({}),c=Po(null),e=B(t.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:n.shared.providers.translate(t.title)},view:function(){return[ek.sketch(function(e){return{dom:{tag:"div",classes:["tox-form"]},components:B(t.items,function(t){return pC(e,t,n)}),formBehaviours:ec([Tg.config({mode:"acyclic",useTabstopAt:O(gw)}),mm("TabView.form.events",[ou(r),ru(o)]),ic.config({channels:lr([{key:wB,value:{onReceive:o}},{key:SB,value:{onReceive:r}}])})])}})]}}}),s=(u=e,a=gc(),{extraEvents:[ou(function(t){var o=t.element;hD(o).each(function(e){var n;fe(e,"visibility","hidden"),t.getSystem().getByDom(e).toOptional().each(function(t){var o,r,i;Y(G((r=e,i=t,B(o=u,function(t,e){Dg.set(i,o[e].view());var n=r.dom.getBoundingClientRect();return Dg.set(i,[]),n.height})),function(t,e){return e"+nh(e.translate(t))+"
")}]}]})}function kD(t){return qD.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})}function CD(t,e){return[sx.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),sx.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]}function OD(e){var t,n="tox-dialog",o=n+"-wrap",r=o+"__backdrop",i=n+"__disable-scroll";return qD.sketch({lazySink:e.lazySink,onEscape:function(t){return e.onEscape(t),vt.some(!0)},useTabstopAt:function(t){return!gw(t)},dom:{tag:"div",classes:[n].concat(e.extraClasses),styles:lt({position:"relative"},e.extraStyles)},components:V([e.header,e.body],e.footer.toArray(),!0),parts:{blocker:{dom:Hm(''),components:[{dom:{tag:"div",classes:EB?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:ec(V([Mg.config({}),mm("dialog-events",e.dialogEvents.concat([Ar(bi(),function(t,e){Tg.focusIn(t)})])),mm("scroll-lock",[ou(function(){Yr(bn(),i)}),ru(function(){qr(bn(),i)})])],e.extraBehaviours,!0)),eventOrder:lt(((t={})[Ii()]=["dialog-events"],t[Gi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[Xi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),e.eventOrder)})}function _D(t){return ip.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[sh("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){vr(t,xx)}})}function TD(t,e,n){function o(t){return[ri(n.translate(t.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:lt({},e.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:ec([wT.config({channel:CB,renderComponents:o})])}}function ED(){return{dom:Hm('')}}function DD(t,e){return n={title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},o=e.shared.providers,r=qD.parts.title(TD(n,vt.none(),o)),i=qD.parts.draghandle(ED()),u=qD.parts.close(_D(o)),a=[r].concat(n.draggable?[i]:[]).concat([u]),sx.sketch({dom:Hm(''),components:a});var n,o,r,i,u,a}function AD(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:Hm('')}]}}function BD(t,o,e){return{onClose:function(){return e.closeWindow()},onBlock:function(n){qD.setBusy(t(),function(t,e){return AD(n.message,e,o)})},onUnblock:function(){qD.setIdle(t())}}}function MD(t,e,n,o){var r;return Tu(OD(lt(lt({},t),{lazySink:o.shared.getSink,extraBehaviours:V([wT.config({channel:kB,updateState:function(t,e){return vt.some(e)},initialData:e}),gk({})],t.extraBehaviours,!0),onEscape:function(t){vr(t,xx)},dialogEvents:n,eventOrder:((r={})[Fi()]=[wT.name(),ic.name()],r[Gi()]=["scroll-lock",wT.name(),"messages","dialog-events","alloy.base.behaviour"],r[Xi()]=["alloy.base.behaviour","dialog-events","messages",wT.name(),"scroll-lock"],r)})))}function FD(t){return B(t,function(t){return"menu"===t.type?(n=B((e=t).items,function(t){var e=Po(!1);return lt(lt({},t),{storage:e})}),lt(lt({},e),{items:n})):t;var e,n})}function ID(t){return R(t,function(t,e){return"menu"!==e.type?t:R(e.items,function(t,e){return t[e.name]=e.storage,t},t)},{})}function RD(t,n){return[Er(bi(),mw),t(yx,function(t,e){n.onClose(),e.onClose()}),t(xx,function(t,e,n,o){e.onCancel(t),vr(o,yx)}),Cr(Cx,function(t,e){return n.onUnblock()}),Cr(kx,function(t,e){return n.onBlock(e.event)})]}function ND(t,e){function n(t,e){return sx.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:B(e,function(t){return t.memento.asSpec()})})}var o=M(e.map(function(t){return t.footerButtons}).getOr([]),function(t){return"start"===t.align});return[n("start",o.pass),n("end",o.fail)]}function PD(t,n){return{dom:Hm(''),components:[],behaviours:ec([wT.config({channel:_B,initialData:t,updateState:function(t,e){var r=B(e.buttons,function(t){var e=Lm($w(t,t.type,n));return{name:t.name,align:t.align,memento:e}});return vt.some({lookupByName:function(t,e){return n=t,o=e,N(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(n)});var n,o},footerButtons:r})},renderComponents:ND})])}}function VD(t,e){return qD.parts.footer(PD(t,e))}function HD(e,n){if(e.getRoot().getSystem().isConnected()){var o=cd.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return ek.getField(o,n).fold(function(){var t=e.getFooter();return wT.getState(t).get().bind(function(t){return t.lookupByName(o,n)})},function(t){return vt.some(t)})}return vt.none()}function LD(c,o,s){function t(t){var e=c.getRoot();e.getSystem().isConnected()&&t(e)}var l={getData:function(){var t=c.getRoot(),e=t.getSystem().isConnected()?c.getFormWrapper():t,n=Df.getValue(e),o=dt(s,function(t){return t.get()});return lt(lt({},n),o)},setData:function(a){t(function(t){var e,n,o=l.getData(),r=lt(lt({},o),a),i=(e=r,n=c.getRoot(),wT.getState(n).get().map(function(t){return co(ao("data",t.dataValidator,e))}).getOr(e)),u=c.getFormWrapper();Df.setValue(u,i),J(s,function(t,e){Tt(r,e)&&t.set(r[e])})})},disable:function(t){HD(c,t).each(gd.disable)},enable:function(t){HD(c,t).each(gd.enable)},focus:function(t){HD(c,t).each(Mg.focus)},block:function(e){if(!y(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){br(t,kx,{message:e})})},unblock:function(){t(function(t){vr(t,Cx)})},showTab:function(n){t(function(t){var e=c.getBody();wT.getState(e).get().exists(function(t){return t.isTabPanel()})&&cd.getCurrent(e).each(function(t){xB.showTab(t,n)})})},redial:function(n){t(function(t){var e=o(n);t.getSystem().broadcastOn([kB],e),t.getSystem().broadcastOn([CB],e.internalDialog),t.getSystem().broadcastOn([OB],e.internalDialog),t.getSystem().broadcastOn([_B],e.internalDialog),l.setData(e.initialData)})},close:function(){t(function(t){vr(t,yx)})}};return l}function zD(t){return x(t)&&-1!==FB.indexOf(t.mceAction)}function UD(o,t,r,e){var n,i,u,a=DD(o.title,e),c=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[fw({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:ec([gx.config({}),Mg.config({})])})]}],behaviours:ec([Tg.config({mode:"acyclic",useTabstopAt:O(gw)})])},qD.parts.body(i)),s=o.buttons.bind(function(t){return 0===t.length?vt.none():vt.some(VD({buttons:t},e))}),l=DB(function(){return v},BD(function(){return h},e.shared.providers,t)),f=lt(lt({},o.height.fold(function(){return{}},function(t){return{height:t+"px","max-height":t+"px"}})),o.width.fold(function(){return{}},function(t){return{width:t+"px","max-width":t+"px"}})),d=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],m=new MB(o.url,{base_uri:new MB(window.location.href)}),g=m.protocol+"://"+m.host+(m.port?":"+m.port:""),p=mc(),h=MD({header:a,body:c,footer:s,extraClasses:d,extraBehaviours:[mm("messages",[ou(function(){var t=pc(Mt.fromDom(window),"message",function(t){var e,n;m.isSameOrigin(new MB(t.raw.origin))&&(zD(e=t.raw.data)?function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var o=!!w(n.ui)&&n.ui;t.execCommand(n.cmd,o,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock()}}(r,v,e):!zD(n=e)&&x(n)&&Tt(n,"mceAction")&&o.onMessage(v,e))});p.set(t)}),ru(p.clear)]),ic.config({channels:((n={})[TB]={onReceive:function(t,e){Iu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(e,g)})}},n)})],extraStyles:f},o,l,e),v={block:function(e){if(!y(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");b(function(t){br(t,kx,{message:e})})},unblock:function(){b(function(t){vr(t,Cx)})},close:function(){b(function(t){vr(t,yx)})},sendMessage:function(e){b(function(t){t.getSystem().broadcastOn([TB],e)})}};function b(t){u.getSystem().isConnected()&&t(u)}return{dialog:u=h,instanceApi:v}}function jD(t){function o(t,y){return dB.open(function(t,e,n){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v=e,b=(r={redial:dB.redial,closeWindow:function(){qD.hide(b.dialog),y(b.instanceApi)}},i=R,c=DD((o={dataValidator:n,initialData:v,internalDialog:t}).internalDialog.title,i),u=i,a=bD({body:o.internalDialog.body},vt.none(),u,!1),s=qD.parts.body(a),l=FD(o.internalDialog.buttons),f=ID(l),d=VD({buttons:l},i),m=AB(function(){return h},BD(function(){return p},i.shared.providers,r),i.shared.getSink),g=function(){switch(o.internalDialog.size){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(),p=MD({header:c,body:s,footer:vt.some(d),extraClasses:g,extraBehaviours:[],extraStyles:{}},o,m,i),h=LD({getRoot:rt(p),getBody:function(){return qD.getBody(p)},getFooter:function(){return qD.getFooter(p)},getFormWrapper:function(){var t=qD.getBody(p);return cd.getCurrent(t).getOr(t)}},r.redial,f),{dialog:p,instanceApi:h});return qD.show(b.dialog),b.instanceApi.setData(v),b.instanceApi},t)}function r(t,M,F,I){return dB.open(function(t,e,n){function o(){return E.on(function(t){tp.reposition(t),zO.refresh(t)})}var r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k,C,O,_,T=co(ao("data",n,e)),E=gc(),D=R.shared.header.isPositionedAtTop(),A=(i={dataValidator:n,initialData:T,internalDialog:t},u={redial:dB.redial,closeWindow:function(){E.on(tp.hide),N.off("ResizeEditor",o),E.clear(),F(A.instanceApi)}},a=R,c=I,v=Ir("dialog-label"),b=Ir("dialog-content"),y=Lm((f={title:i.internalDialog.title,draggable:!0},d=v,m=a.shared.providers,sx.sketch({dom:Hm(''),components:[TD(f,vt.some(d),m),ED(),_D(m)],containerBehaviours:ec([iD.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Ru(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),x=Lm((g={body:i.internalDialog.body},p=a,h=c,bD(g,vt.some(b),p,h))),w=FD(i.internalDialog.buttons),S=ID(w),k=Lm(BB({buttons:w},a)),C=AB(function(){return _},{onBlock:function(n){s_.block(O,function(t,e){return AD(n.message,e,a.shared.providers)})},onUnblock:function(){s_.unblock(O)},onClose:function(){return u.closeWindow()}},a.shared.getSink),O=Tu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((s={role:"dialog"})["aria-labelledby"]=v,s["aria-describedby"]=b,s)},eventOrder:((l={})[Fi()]=[wT.name(),ic.name()],l[Ii()]=["execute-on-form"],l[Gi()]=["reflecting","execute-on-form"],l),behaviours:ec([Tg.config({mode:"cyclic",onEscape:function(t){return vr(t,yx),vt.some(!0)},useTabstopAt:function(t){return!gw(t)&&("button"!==Ft(t)||"disabled"!==ie(t,"disabled"))}}),wT.config({channel:kB,updateState:function(t,e){return vt.some(e)},initialData:i}),Mg.config({}),mm("execute-on-form",C.concat([Ar(bi(),function(t,e){Tg.focusIn(t)})])),s_.config({getRoot:function(){return vt.some(O)}}),Dg.config({}),gk({})]),components:[y.asSpec(),x.asSpec(),k.asSpec()]}),_=LD({getRoot:rt(O),getFooter:function(){return k.get(O)},getBody:function(){return x.get(O)},getFormWrapper:function(){var t=x.get(O);return cd.getCurrent(t).getOr(t)}},u.redial,S),{dialog:O,instanceApi:_}),B=Tu(tp.sketch(lt(lt({lazySink:R.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},D?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:ec(V([mm("window-manager-inline-events",[Cr(Yi(),function(t,e){vr(A.dialog,xx)})])],(r=N,P&&D?[]:[zO.config({contextual:{lazyContext:function(){return vt.some(Mn(Mt.fromDom(r.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]),!0)),isExtraPart:function(t,e){return Xy(n=e,".tox-alert-dialog")||Xy(n,".tox-confirm-dialog");var n}})));return E.set(B),tp.showWithin(B,Eu(A.dialog),{anchor:M},vt.some(bn())),P&&D||(zO.refresh(B),N.on("ResizeEditor",o)),A.instanceApi.setData(T),Tg.focusIn(A.dialog),A.instanceApi},t)}var c,s,l,f,R=t.backstage,N=t.editor,P=fb(N),n=(s=(c=t).backstage.shared,{open:function(t,e){function n(){qD.hide(u),e()}var o=Lm($w({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:vt.none()},"cancel",c.backstage)),r=wD(),i=xD(n,s.providers),u=Tu(OD({lazySink:function(){return s.getSink()},header:yD(r,i),body:SD(t,s.providers),footer:vt.some(kD(CD([],[o.asSpec()]))),onEscape:n,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Cr(xx,n)],eventOrder:{}}));qD.show(u);var a=o.get(u);Mg.focus(a)}}),i=(f=(l=t).backstage.shared,{open:function(t,e){function n(t){qD.hide(a),e(t)}var o=Lm($w({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:vt.none()},"submit",l.backstage)),r=$w({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:vt.none()},"cancel",l.backstage),i=wD(),u=xD(function(){return n(!1)},f.providers),a=Tu(OD({lazySink:function(){return f.getSink()},header:yD(i,u),body:SD(t,f.providers),footer:vt.some(kD(CD([],[r,o.asSpec()]))),onEscape:function(){return n(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Cr(xx,function(){return n(!1)}),Cr(Sx,function(){return n(!0)})],eventOrder:{}}));qD.show(a);var c=o.get(a);Mg.focus(c)}});return{open:function(t,e,n){return void 0!==e&&"toolbar"===e.inline?r(t,R.shared.anchors.inlineDialog(),n,e.ariaAttrs):void 0!==e&&"cursor"===e.inline?r(t,R.shared.anchors.cursor(),n,e.ariaAttrs):o(t,n)},openUrl:function(t,e){return n=e,dB.openUrl(function(t){var e=UD(t,{closeWindow:function(){qD.hide(e.dialog),n(e.instanceApi)}},N,R);return qD.show(e.dialog),e.instanceApi},t);var n},alert:function(t,e){n.open(t,function(){e()})},close:function(t){t.close()},confirm:function(t,e){i.open(t,function(t){e(t)})}}}(PE=NE=NE||{})[PE.None=0]="None",PE[PE.Both=1]="Both",PE[PE.Vertical=2]="Vertical";var WD,GD=rt([mo("lazySink"),wo("dragBlockClass"),Io("getBounds",Fn),Eo("useTabstopAt",D),Eo("eventOrder",{}),Zs("modalBehaviours",[Tg]),$u("onExecute"),Zu("onEscape")]),XD={sketch:h},YD=rt([Qf({name:"draghandle",overrides:function(t,e){return{behaviours:ec([iD.config({mode:"mouse",getTarget:function(t){return Fu(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),Jf({schema:[mo("dom")],name:"title"}),Jf({factory:XD,schema:[mo("dom")],name:"close"}),Jf({factory:XD,schema:[mo("dom")],name:"body"}),Qf({factory:XD,schema:[mo("dom")],name:"footer"}),$f({factory:{sketch:function(t,e){return lt(lt({},t),{dom:e.dom,components:e.components})}},schema:[Eo("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Eo("components",[])],name:"blocker"})]),qD=Cl({name:"ModalDialog",configFields:GD(),partFields:YD(),factory:function(a,t,e,r){var n,i=gc(),o=Ir("modal-events"),u=lt(lt({},a.eventOrder),((n={})[Gi()]=[o].concat(a.eventOrder["alloy.system.attached"]||[]),n));return{uid:a.uid,dom:a.dom,components:t,apis:{show:function(t){i.set(t);var e=a.lazySink(t).getOrDie(),n=r.blocker(),o=e.getSystem().build(lt(lt({},n),{components:n.components.concat([Eu(t)]),behaviours:ec([Mg.config({}),mm("dialog-blocker-events",[Ar(bi(),function(){Tg.focusIn(t)})])])}));Ns(e,o),Tg.focusIn(t)},hide:function(e){i.clear(),Yt(e.element).each(function(t){e.getSystem().getByDom(t).each(function(t){Vs(t)})})},getBody:function(t){return gl(t,a,"body")},getFooter:function(t){return gl(t,a,"footer")},setIdle:function(t){s_.unblock(t)},setBusy:function(t,e){s_.block(t,e)}},eventOrder:u,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:el(a.modalBehaviours,[Dg.config({}),Tg.config({mode:"cyclic",onEnter:a.onExecute,onEscape:a.onEscape,useTabstopAt:a.useTabstopAt}),s_.config({getRoot:i.get}),mm(o,[ou(function(t){var e,n,o,r=t.element,i=gl(t,a,"title").element,u=ue(r,"id").fold(function(){var t=Ir("dialog-label");return oe(i,"id",t),t},h);oe(r,"aria-labelledby",u),e=t.element,n=gl(t,a,"body").element,o=vt.from(ie(e,"id")).fold(function(){var t=Ir("dialog-describe");return oe(n,"id",t),t},h),oe(e,"aria-describedby",o)})])])}},apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),KD=$o([po("type"),po("name")].concat(Lv)),JD=nr,$D=[ar("name","name",Wn(function(){return Ir("button-name")}),er),Co("icon"),Mo("align","end",["start","end"]),Fo("primary",!1),Fo("disabled",!1)],QD=V(V([],$D,!0),[po("text")],!1),ZD=V([ho("type",["submit","cancel","custom"])],QD,!0),tA=lo("type",{submit:ZD,cancel:ZD,custom:ZD,menu:V([ho("type",["menu"]),Co("text"),Co("tooltip"),Co("icon"),xo("items",KD)],$D,!0)}),eA=[po("type"),po("text"),ho("level",["info","warn","error","success"]),po("icon"),Eo("url","")],nA=$o(eA),oA=[po("type"),po("text"),Fo("disabled",!1),Fo("primary",!1),ar("name","name",Wn(function(){return Ir("button-name")}),er),Co("icon"),Fo("borderless",!1)],rA=$o(oA),iA=[po("type"),po("name"),po("label"),Fo("disabled",!1)],uA=$o(iA),aA=nr,cA=[po("type"),po("name")],sA=cA.concat([Co("label")]),lA=sA.concat([Eo("columns","auto")]),fA=$o(lA),dA=Qo([po("value"),po("text"),po("icon")]),mA=$o(sA),gA=er,pA=$o(sA),hA=er,vA=cA.concat([Bo("tag","textarea"),po("scriptId"),po("scriptUrl"),Do("settings",void 0,ir)]),bA=cA.concat([Bo("tag","textarea"),vo("init")]),yA=io(function(t){return ao("customeditor.old",to(bA),t).orThunk(function(){return ao("customeditor.new",to(vA),t)})}),xA=er,wA=$o(sA),SA=eo(Jo),kA=[po("type"),po("html"),Mo("presets","presentation",["presentation","document"])],CA=$o(kA),OA=sA.concat([Fo("sandboxed",!0)]),_A=$o(OA),TA=er,EA=sA.concat([go("currentState",$o([mo("blob"),po("url")]))]),DA=$o(EA),AA=sA.concat([Co("inputMode"),Co("placeholder"),Fo("maximized",!1),Fo("disabled",!1)]),BA=$o(AA),MA=er,FA=[po("text"),po("value")],IA=[po("text"),xo("items",(WD=Rt(function(){return RA}),{extract:function(t,e){return WD().extract(t,e)},toString:function(){return WD().toString()}}))],RA=no([$o(FA),$o(IA)]),NA=sA.concat([xo("items",RA),Fo("disabled",!1)]),PA=$o(NA),VA=er,HA=sA.concat([yo("items",[po("text"),po("value")]),Ao("size",1),Fo("disabled",!1)]),LA=$o(HA),zA=er,UA=sA.concat([Fo("constrain",!0),Fo("disabled",!1)]),jA=$o(UA),WA=$o([po("width"),po("height")]),GA=[po("type"),xo("header",er),xo("cells",eo(er))],XA=$o(GA),YA=sA.concat([Co("placeholder"),Fo("maximized",!1),Fo("disabled",!1)]),qA=$o(YA),KA=er,JA=sA.concat([Mo("filetype","file",["image","media","file"]),Eo("disabled",!1)]),$A=$o(JA),QA=$o([po("value"),Eo("meta",{})]),ZA=Zn(function(){return ro("type",{alertbanner:nA,bar:$o((n=lD("bar"),[po("type"),n])),button:rA,checkbox:uA,colorinput:mA,colorpicker:pA,dropzone:wA,grid:$o((t=lD("grid"),[po("type"),go("columns",tr),t])),iframe:_A,input:BA,listbox:PA,selectbox:LA,sizeinput:jA,textarea:qA,urlinput:$A,customeditor:yA,htmlpanel:CA,imagetools:DA,collection:fA,label:$o((e=lD("label"),[po("type"),po("label"),e])),table:XA,panel:eB});var t,e,n}),tB=[po("type"),Eo("classes",[]),xo("items",ZA)],eB=$o(tB),nB=[ar("name","name",Wn(function(){return Ir("tab-name")}),er),po("title"),xo("items",ZA)],oB=[po("type"),yo("tabs",nB)],rB=$o(oB),iB=QD,uB=tA,aB=$o([po("title"),go("body",ro("type",{panel:eB,tabpanel:rB})),Bo("size","normal"),xo("buttons",uB),Eo("initialData",{}),Io("onAction",st),Io("onChange",st),Io("onSubmit",st),Io("onClose",st),Io("onCancel",st),Eo("onTabChange",st)]),cB=$o(V([ho("type",["cancel","custom"])],iB,!0)),sB=$o([po("title"),po("url"),ko("height"),ko("width"),_o("buttons",cB),Io("onAction",st),Io("onCancel",st),Io("onClose",st),Io("onMessage",st)]),lB=function(t){return x(t)?[t].concat(H(Z(t),lB)):c(t)?H(t,lB):[]},fB={checkbox:aA,colorinput:gA,colorpicker:hA,dropzone:SA,input:MA,iframe:TA,sizeinput:WA,selectbox:zA,listbox:VA,size:WA,textarea:KA,urlinput:QA,customeditor:xA,collection:dA,togglemenuitem:JD},dB={open:function(t,e){var n=dD(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){return t(co(ao("dialog",sB,e)))},redial:dD},mB=kl({name:"TabButton",configFields:[Eo("uid",void 0),mo("value"),ar("dom","dom",Yn(function(){return{attributes:{role:"tab",id:Ir("aria"),"aria-selected":"false"}}}),Zo()),wo("action"),Eo("domModification",{}),Zs("tabButtonBehaviours",[Mg,Tg,Df]),mo("view")],factory:function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:Sm(t.action),behaviours:el(t.tabButtonBehaviours,[Mg.config({}),Tg.config({mode:"execution",useSpace:!0,useEnter:!0}),Df.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),gB=rt([mo("tabs"),mo("dom"),Eo("clickToDismiss",!1),Zs("tabbarBehaviours",[hd,Tg]),qu(["tabClass","selectedClass"])]),pB=rt([Zf({factory:mB,name:"tabs",unit:"tab",overrides:function(o){return{action:function(t){var e=t.getSystem().getByUid(o.uid).getOrDie(),n=hd.isHighlighted(e,t);(n&&o.clickToDismiss?function(t,e){hd.dehighlight(t,e),br(t,Qi(),{tabbar:t,button:e})}:n?st:function(t,e){hd.highlight(t,e),br(t,$i(),{tabbar:t,button:e})})(e,t)},domModification:{classes:[o.markers.tabClass]}}}})]),hB=Cl({name:"Tabbar",configFields:gB(),partFields:pB(),factory:function(t,e,n,o){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:el(t.tabbarBehaviours,[hd.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){oe(e.element,"aria-selected","true")},onDehighlight:function(t,e){oe(e.element,"aria-selected","false")}}),Tg.config({mode:"flow",getInitial:function(t){return hd.getHighlighted(t).map(function(t){return t.element})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),vB=kl({name:"Tabview",configFields:[Zs("tabviewBehaviours",[Dg])],factory:function(t,e){return{uid:t.uid,dom:t.dom,behaviours:el(t.tabviewBehaviours,[Dg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),bB=rt([Eo("selectFirst",!0),Ju("onChangeTab"),Ju("onDismissTab"),Eo("tabs",[]),Zs("tabSectionBehaviours",[])]),yB=rt([Jf({factory:hB,schema:[mo("dom"),bo("markers",[mo("tabClass"),mo("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),Jf({factory:vB,name:"tabview"})]),xB=Cl({name:"TabSection",configFields:bB(),partFields:yB(),factory:function(i,t,e,n){function o(t,e){ml(t,i,"tabbar").each(function(t){e(t).each(yr)})}return{uid:i.uid,dom:i.dom,components:t,behaviours:tl(i.tabSectionBehaviours),events:nu(ft([i.selectFirst?[ou(function(t,e){o(t,hd.getFirst)})]:[],[Cr($i(),function(t,e){var o=e.event.button,r=Df.getValue(o);ml(o,i,"tabview").each(function(n){N(i.tabs,function(t){return t.value===r}).each(function(t){var e=t.view();ue(o.element,"id").each(function(t){oe(n.element,"aria-labelledby",t)}),Dg.set(n,e),i.onChangeTab(n,o,e)})})}),Cr(Qi(),function(t,e){var n=e.event.button;i.onDismissTab(t,n)})]])),apis:{getViewItems:function(t){return ml(t,i,"tabview").map(function(t){return Dg.contents(t)}).getOr([])},showTab:function(t,n){o(t,function(e){return N(hd.getCandidates(e),function(t){return Df.getValue(t)===n}).filter(function(t){return!hd.isHighlighted(e,t)})})}}}},apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),wB="send-data-to-section",SB="send-data-to-view",kB=Ir("update-dialog"),CB=Ir("update-title"),OB=Ir("update-body"),_B=Ir("update-footer"),TB=Ir("body-send-message"),EB=ty.deviceType.isTouch(),DB=function(u,t){function e(t,i){return Cr(t,function(n,o){var e,r;e=n,r=function(t,e){i(u(),t,o.event,n)},wT.getState(e).get().each(function(t){r(t,e)})})}return V(V([],RD(e,t),!0),[e(wx,function(t,e,n){e.onAction(t,{name:n.name})})],!1)},AB=function(u,t,c){function e(t,i){return Cr(t,function(n,o){var e,r;e=n,r=function(t,e){i(u(),t,o.event,n)},wT.getState(e).get().each(function(t){r(t.internalDialog,e)})})}return V(V([],RD(e,t),!0),[e(Sx,function(t,e){return e.onSubmit(t)}),e(bx,function(t,e,n){e.onChange(t,{name:n.name})}),e(wx,function(t,e,n,o){function r(){return Tg.focusIn(o)}function i(t){return ae(t,"disabled")||ue(t,"aria-disabled").exists(function(t){return"true"===t})}var u=gn(o.element),a=Oa(u);e.onAction(t,{name:n.name,value:n.value}),Oa(u).fold(r,function(e){i(e)||a.exists(function(t){return Ut(e,t)&&i(t)})?r():c().toOptional().filter(function(t){return!Ut(t.element,e)}).each(r)})}),e(Ox,function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})}),ru(function(t){var e=u();Df.setValue(t,e.getData())})],!1)},BB=PD,MB=tinymce.util.Tools.resolve("tinymce.util.URI"),FB=["insertContent","setContent","execCommand","close","block","unblock"];o.add("silver",function(t){var e=sD(t),n=e.uiMothership,o=e.backstage,r=e.renderUI,i=e.getUi;return ix(t,o.shared),{renderUI:r,getWindowManagerImpl:rt(jD({editor:t,backstage:o})),getNotificationManagerImpl:function(){return u=t,r=n,l={backstage:o}.backstage.shared,{open:function(t,e){function n(){e(),tp.hide(c)}var o=!t.closeButton&&t.timeout&&(0