/**
* 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.2 (2021-11-17)
*/
!function(){"use strict";function t(o){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===o;var n,e}}function n(n){return function(t){return typeof t===n}}function e(n){return function(t){return n===t}}function g(t){return null==t}function f(t,n){if(c(t)){for(var e=0,o=t.length;e=n.length&&t.substr(e,e+n.length)===n}function ut(t,n){return-1!==t.indexOf(n)}function at(t){return 0 "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},Qo=r(no,$o),Zo=rt(Jo),tr=oo(u,"number"),nr=oo(y,"string"),er=oo(w,"boolean"),or=oo(S,"function"),rr=function(n){if(Object(n)!==n)return!0;switch({}.toString.call(n).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(n).every(function(t){return rr(n[t])});default:return!1}},ir=Je(function(t){return rr(t)?No(t):Lo("Expected value to be acceptable for sending via postMessage")}),ur=function(t){return"Errors: \n"+M(10<(n=t.errors).length?n.slice(0,10).concat([{path:[],getErrorInfo:rt("... (only showing first ten failures)")}]):n,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}).join("\n")+"\n\nInput object: "+qe(t.input);var n},ar=Ne,cr=function(t,n){return{tag:"custom",newKey:t,instantiator:n}};function sr(t,n){return(e={})[t]=n,e;var e}function lr(t){return n={},St(t,function(t){n[t.key]=t.value}),n;var n}function fr(t){return S(t)?t:T}function dr(t,n,e){for(var o=t.dom,r=fr(e);o.parentNode;){var o=o.parentNode,i=At.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return vt.none()}function mr(t,n,e){var o=n(t),r=fr(e);return o.orThunk(function(){return r(t)?vt.none():dr(t,n,r)})}function gr(t,n){return Lt(t.element,n.event.target)}function pr(t){if(!nt(t,"can")&&!nt(t,"abort")&&!nt(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,n){nu(t,t.element,n,{})}function br(t,n,e){nu(t,t.element,n,e)}function yr(t){vr(t,Ii())}function xr(t,n,e){nu(t,n,e,{})}function wr(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event)}function Sr(t,n){return{key:t,value:pr({abort:n})}}function kr(t){return{key:t,value:pr({run:function(t,n){n.event.prevent()}})}}function Cr(t,n){return{key:t,value:pr({run:n})}}function Or(t,e,o){return{key:t,value:pr({run:function(t,n){e.apply(void 0,[t,n].concat(o))}})}}function _r(t){return function(e){return{key:t,value:pr({run:function(t,n){gr(t,n)&&e(t,n)}})}}}function Tr(t,n,e){var o,r=n.partUids[e];return Cr(o=t,function(t,n){t.getSystem().getByUid(r).each(function(t){wr(t,t.element,o,n)})})}function Er(t,r){return Cr(t,function(n,t){var e=t.event,o=n.getSystem().getByDom(e.target).getOrThunk(function(){return mr(e.target,function(t){return n.getSystem().getByDom(t).toOptional()},T).getOr(n)});r(n,o,t)})}function Dr(t){return Cr(t,function(t,n){n.cut()})}function Br(t,n){return _r(t)(n)}function Mr(t){return t.dom.innerHTML}function Ar(t,n){var e,o,r=Ut(t).dom,i=At.fromDom(r.createDocumentFragment());An(i,(e=n,(o=(r||document).createElement("div")).innerHTML=e,Kt(At.fromDom(o)))),Fn(t),Te(t,i)}function Fr(t){if(Zt(t))return"#shadow-root";var n=At.fromDom(t.dom.cloneNode(!1)),e=At.fromTag("div"),o=At.fromDom(n.dom.cloneNode(!0));return Te(e,o),Mr(e)}function Ir(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++su+String(n)}function Rr(t){var n=Xn(t)?t.dom[mu]:null;return vt.from(n)}function Vr(n){function e(t){return"The component must be in a context to execute: "+t+(n?"\n"+Fr(n().element)+" is not in context.":"")}function t(t){return function(){throw new Error(e(t))}}function o(t){return function(){console.warn(e(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,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:bu(i)}},t}function Hr(t){return sr(yu,t)}function zr(o){return t=function(t){for(var n=[],e=1;e "):r[0].name;return sr(u,{handler:e,purpose:o})})});return n={},e=[],o=[],St(c,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),0<(u={errors:e,values:o}).errors.length?Ve.error(ft(u.errors)):(i=n,0===(r=u.values).length?Ve.value(i):Ve.value(Yo(i,qo.apply(void 0,r))))},ku="alloy.base.behaviour",Cu=$o([ar("dom","dom",Ue(),$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[Bi()]=[ku,"focusing","keying"],ui[Ni()]=[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"],Ye(rt(ui))),Zo()),wo("domModification")]),Ou=function(t){var n=so("external.component",to([mo("element"),wo("uid")]),t),e=Po(Vr()),o=n.uid.getOrThunk(function(){return pu("external")});gu(n.element,o);var r={uid:o,getSystem:e.get,config:vt.none,hasConfigured:T,connect:function(t){e.set(t)},disconnect:function(){e.set(Vr(function(){return r}))},getApis:function(){return{}},element:n.element,spec:t,readState:rt("No state"),syncComponents:st,components:rt([]),events:{}};return Hr(r)},_u=pu,Tu=function(t){return tt(t,yu).getOrThunk(function(){return oi(Tt(t,"uid")?t:lt({uid:_u("")},t)).getOrDie()})},Eu=Hr;function Du(t,n,e,o,r){return t(e,o)?vt.some(e):S(r)&&r(e)?vt.none():n(e,o,r)}function Bu(t,n,e){for(var o=t.dom,r=S(e)?e:T;o.parentNode;){var o=o.parentNode,i=At.fromDom(o);if(n(i))return vt.some(i);if(r(i))break}return vt.none()}function Mu(t,n,e){return Du(function(t,n){return n(t)},Bu,t,n,e)}function Au(t,n,e){return Mu(t,n,e).isSome()}function Fu(t,n,e){return Bu(t,function(t){return zt(t,n)},e)}function Iu(t,n){return e=n,Nt(o=void 0===t?document:t.dom)?vt.none():vt.from(o.querySelector(e)).map(At.fromDom);var e,o}function Ru(t,n,e){return Du(zt,Fu,t,n,e)}function Vu(){var n=Ir("aria-owns");return{id:n,link:function(t){on(t,"aria-owns",n)},unlink:function(t){sn(t,"aria-owns")}}}var Pu,Hu,zu=function(n,t){return Au(t,function(t){return Lt(t,n.element)},T)||(e=n,Mu(t,function(t){if(!Xn(t))return!1;var n=un(t,"id");return void 0!==n&&-1"}),Zo()),Uf=cr("schema",function(){return[wo("preprocess")]}),jf=Eo("defaults",rt({})),Gf=Eo("overrides",rt({})),Xf=$o([zf,Nf,Lf,Wf,jf,Gf]),Yf=$o([zf,Nf,Lf,jf,Gf]),qf=$o([zf,Nf,Lf,Wf,jf,Gf]),Kf=$o([zf,Uf,Lf,mo("unit"),Wf,jf,Gf]),Jf=il(Hf.required,Xf),$f=il(Hf.external,Yf),Qf=il(Hf.optional,qf),Zf=il(Hf.group,Kf),td=rt("entirety"),nd=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}),ed=function(t,n){return{uiType:Pf(),owner:t,name:n}},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,n,e){return n.find(t)}}),cd=xa({fields:[mo("find")],name:"composing",apis:ad}),sd=["input","button","textarea","select"],ld=function(n,t,e){t.disableClass.each(function(t){Yr(n.element,t)}),(Tl(n,t)?function(t){on(t.element,"disabled","disabled")}:function(t){on(t.element,"aria-disabled","true")})(n),t.onDisabled(n)},fd=function(n,t,e){t.disableClass.each(function(t){qr(n.element,t)}),(Tl(n,t)?function(t){sn(t.element,"disabled")}:function(t){on(t.element,"aria-disabled","false")})(n),t.onEnabled(n)},dd=Object.freeze({__proto__:null,enable:fd,disable:ld,isDisabled:El,onLoad:_l,set:function(t,n,e,o){(o?ld:fd)(t,n)}}),md=Object.freeze({__proto__:null,exhibit:function(t,n){return Lr({classes:n.disabled()?n.disableClass.toArray():[]})},events:function(e,t){return eu([Sr(Ii(),function(t,n){return El(t,e)}),ba(e,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,n,e){return Dl(t,n,0,[])},dehighlight:function(t,n,e,o){Yl(0,n,0,o)&&(qr(o.element,n.highlightClass),n.onDehighlight(t,o),vr(o,tu()))},highlight:Bl,highlightFirst:function(n,e,t){ql(n,e).each(function(t){Bl(n,e,0,t)})},highlightLast:function(n,e,t){Kl(n,e).each(function(t){Bl(n,e,0,t)})},highlightAt:function(n,e,t,o){var r,i,u;i=o,u=vs((r=n).element,"."+e.itemClass),vt.from(u[i]).fold(function(){return Ve.error(new Error("No element found with index "+i))},r.getSystem().getByDom).fold(function(t){throw t},function(t){Bl(n,e,0,t)})},highlightBy:function(n,e,t,o){V(Jl(n,e),o).each(function(t){Bl(n,e,0,t)})},isHighlighted:Yl,getHighlighted:function(n,t,e){return Iu(n.element,"."+t.highlightClass).bind(function(t){return n.getSystem().getByDom(t).toOptional()})},getFirst:ql,getLast:Kl,getPrevious:function(t,n,e){return Ml(t,n,0,-1)},getNext:function(t,n,e){return Ml(t,n,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(Hl);function Td(t,n,e,o,a){function c(n,e,t,o,r){var i=t(n,e,o,r),u=e.event;return V(i,function(t){return t.matches(u)}).map(function(t){return t.classification}).bind(function(t){return t(n,e,o,r)})}var r={schema:function(){return t.concat([Eo("focusManager",Wl()),Do("focusInside","onFocus",io(function(t){return wt(["onFocus","onEnterOrSpace","onApi"],t)?Ve.value(t):Ve.error("Invalid value for focusInside")})),ta("handler",r),ta("state",n),ta("sendFocusIn",a)])},processKey:c,toEvents:function(i,u){var t=i.focusInside!==Zl.OnFocusMode?vt.none():a(i).map(function(e){return Cr(Bi(),function(t,n){e(t,i,u),n.stop()})}),n=[Cr(xi(),function(o,r){c(o,r,e,i,u).fold(function(){var n=o,e=r,t=Vl(wd.concat(yd))(e.event);i.focusInside===Zl.OnEnterOrSpaceMode&&t&&gr(n,e)&&a(i).each(function(t){t(n,i,u),e.stop()})},function(t){r.stop()})}),Cr(wi(),function(t,n){c(t,n,o,i,u).each(function(t){n.stop()})})];return eu(t.toArray().concat(n))}};return r}function Ed(t){function a(t,n){return 0',e.getDoc());return Te(t,At.fromDom(n.extractContents())),n.insertNode(t.dom),Yt(t).each(function(t){return t.dom.normalize()}),i=hs,(u=function(t){for(var n=Kt(t),e=n.length-1;0<=e;e--){var o=n[e];if(i(o))return vt.some(o);var r=u(o);if(r.isSome())return r}return vt.none()})(t).map(function(t){var n;e.selection.setCursorLocation(t.dom,"img"===Ft(n=t)?1:ps(n).fold(function(){return Kt(n).length},function(t){return t.length}))}),t})}function xp(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function wp(t){return""!==t&&-1!==" \xa0\f\n\r\t\v".indexOf(t)}function Sp(t,n){return t.substring(n.length)}function kp(o,t,r,n){return void 0===n&&(n=0),Mp(At.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 n=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return bp(t,o.startContainer,o.startOffset,function(t,r,n){return function(t,n){for(var e=r-1;0<=e;e--){var o=t.charAt(e);if(wp(o))return vt.none();if(o===n)break}return vt.some(e)}(n,i).getOr(r)},n).bind(function(t){var n=o.cloneRange();if(n.setStart(t.container,t.offset),n.setEnd(o.endContainer,o.endOffset),n.collapsed)return vt.none();var e=xp(n);return 0!==e.lastIndexOf(i)||Sp(e,i).length=t.minChars&&t.matches.getOrThunk(function(){return e=n.dom,function(t){var n=Ip(t.startContainer,t.startOffset);return!bp(e,n.container,n.offset,function(t,n){return 0===n?-1:n},e.getRoot()).filter(function(t){return!wp(t.container.data.charAt(t.offset-1))}).isSome()};var e})(e.range,i,e.text)});if(0===u.length)return vt.none();var a=Ap.all(M(u,function(n){return n.fetch(e.text,n.maxResults,o).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction,highlightOn:n.highlightOn}})}));return vt.some({lookupData:a,context:e})}var Ep,Dp,Bp=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Mp=function(t){return Ru(t,"[data-mce-autocompleter]")},Ap=tinymce.util.Tools.resolve("tinymce.util.Promise"),Fp=function(t){if(3===t.nodeType)return Cp(t,t.data.length);var n=t.childNodes;return 0o}).getOr(r.length);return vt.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return vt.none()}function ch(t,n,e){t.getSystem().broadcastOn([Jh],{})}function sh(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))}function lh(t){return t.getParam("width",ev.DOM.getStyle(t.getElement(),"width"))}function fh(t){return vt.from(t.getParam("min_width")).filter(u)}function dh(t){return vt.from(t.getParam("min_height")).filter(u)}function mh(t){return vt.from(t.getParam("max_width")).filter(u)}function gh(t){return vt.from(t.getParam("max_height")).filter(u)}function ph(t){return!1!==t.getParam("menubar",!0,"boolean")}function hh(t){var n=t.getParam("toolbar",!0),e=!0===n,o=y(n),r=c(n)&&0'+t+""})}return o}function Mv(t){return{value:t}}function Av(t){return rb.test(t)||ib.test(t)}function Fv(t){var n=t.toString(16);return(1===n.length?"0"+n:n).toUpperCase()}function Iv(t){return Mv(Fv(t.red)+Fv(t.green)+Fv(t.blue))}function Rv(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}}function Vv(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255}function Pv(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100,i=ab(0,ub(i,1)),u=ab(0,ub(u,1));if(0===i)return Rv(n=e=o=cb(255*u),e,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:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return Rv(n=cb(255*(n+l)),e=cb(255*(e+l)),o=cb(255*(o+l)),1)}function Hv(t){var n,e,o=(n={value:t.value.replace(rb,function(t,n,e,o){return n+n+e+e+o+o})},null===(e=ib.exec(n.value))?["FFFFFF","FF","FF","FF"]:e);return Rv(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),1)}function zv(t,n,e,o){return Rv(parseInt(t,10),parseInt(n,10),parseInt(e,10),parseFloat(o))}function Nv(t){if("transparent"===t)return vt.some(Rv(0,0,0,0));var n=sb.exec(t);if(null!==n)return vt.some(zv(n[1],n[2],n[3],"1"));var e=lb.exec(t);return null!==e?vt.some(zv(e[1],e[2],e[3],e[4])):vt.none()}function Lv(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"}function Wv(t,n){return t.fire("ResizeContent",n)}function Uv(t,n,e){return{hue:t,saturation:n,value:e}}function jv(t){var n,e,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?Uv(0,0,100*(o=a)):(e=60*((r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),n=(c-a)/c,o=c,Uv(Math.round(e),Math.round(100*n),Math.round(100*o)))}function Gv(t){return Iv(Pv(t))}function Xv(o){return(Av(n=o)?vt.some({value:(Dt(t=n,"#")?t.substring("#".length):t).toUpperCase()}):vt.none()).orThunk(function(){return Nv(o).map(Iv)}).getOrThunk(function(){var t=document.createElement("canvas");t.height=1,t.width=1;var n=t.getContext("2d");n.clearRect(0,0,t.width,t.height),n.fillStyle="#FFFFFF",n.fillStyle=o,n.fillRect(0,0,1,1);var e=n.getImageData(0,0,1,1).data;return Iv(Rv(e[0],e[1],e[2],e[3]))});var t,n}(yh=bh=bh||{}).default="wrap",yh.floating="floating",yh.sliding="sliding",yh.scrolling="scrolling",(wh=xh=xh||{}).auto="auto",wh.top="top",wh.bottom="bottom";function Yv(t){return gd.config({disabled:t,disableClass:"tox-tbtn--disabled"})}var qv,Kv="silver.readonly",Jv=$o([go("readonly",er)]),$v=function(t){return gd.config({disabled:t})},Qv=function(t){return gd.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Zv=((qv={})[Ii()]=["disabling","alloy.base.behaviour","toggling","item-events"],qv),tb=et,nb=tinymce.util.Tools.resolve("tinymce.Env"),eb=function(t,a){return M(t,function(t){switch(t.type){case"cardcontainer":return r=eb((o=t).items,a),i="vertical"===o.direction?"tox-collection__item-container--column":Fh,u="left"===o.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[Ah,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 e=t.src,{dom:{tag:"img",classes:t.classes,attributes:{src:e,alt:t.alt.getOr("")}}};case"cardtext":var n=t.name.exists(function(t){return wt(a.cardText.highlightOn,t)})?vt.from(a.cardText.matchText).getOr(""):"";return kv(Bv(t.text,n),t.classes)}var e,o,r,i,u})},ob=al(qg(),Kg()),rb=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,ib=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ub=Math.min,ab=Math.max,cb=Math.round,sb=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,lb=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,fb=Rv(255,0,0,1),db=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),mb="tinymce-custom-colors";function gb(t){return!1!==t.getParam("custom_colors")}function pb(t){var n=t.getParam("color_map");return void 0!==n?function(t){for(var n=[],e=0;ee&&i.pop(),db.setItem(mb,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),Fb="#000000",Ib=function(r){return function(e,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,n){"hex-valid"===n.name&&(o=n.value)},onSubmit:function(t){var n=t.getData().colorpicker;o?(e(vt.from(n)),t.close()):r.windowManager.alert(r.translate(["Invalid hex color code: {0}",n]))},onClose:st,onCancel:function(){e(vt.none())}})}},Rb=function(e,o,r,i,u,a,c){return et(M(e,function(n){return"choiceitem"===n.type?ao("choicemenuitem",Uh,n).fold(rh,function(t){return vt.some(function(n,t,e,o,r,i,u,a){void 0===a&&(a=!0);var c=Ev({presets:e,textContent:t?n.text:vt.none(),htmlContent:vt.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:t?n.shortcut:vt.none(),checkMark:t?vt.some(_v(u.icons)):vt.none(),caret:vt.none(),value:n.value},u,a);return Yo(yv({data:xv(n),disabled:n.disabled,getApi:function(n){return{setActive:function(t){Lg.set(n,t)},isActive:function(){return Lg.isOn(n)},isDisabled:function(){return gd.isDisabled(n)},setDisabled:function(t){return gd.set(n,t)}}},onAction:function(t){return o(n.value)},onSetup:function(t){return t.setActive(r),st},triggersSubmenu:!1,itemBehaviours:[]},c,i,u),{toggling:{toggleClass:Th,toggleOnExecute:!1,selected:n.active}})}(t,1===r,i,o,a(n.value),u,c,oh(e)))}):vt.none()}))},Vb=Ir("cell-over"),Pb=Ir("cell-execute"),Hb={inserttable:function(u){var t=Ir("size-label"),a=function(t){for(var n=[],e=0;e<10;e++){for(var o=[],r=0;r<10;r++)o.push(function(n,e,t){function o(t){return br(t,Pb,{row:n,col:e})}function r(t,n){n.stop(),o(t)}var i;return Tu({dom:{tag:"div",attributes:((i={role:"button"})["aria-labelledby"]=t,i)},behaviours:nc([mm("insert-table-picker-cell",[Cr(vi(),Hg.focus),Cr(Ii(),o),Cr(Ci(),r),Cr(Vi(),r)]),Lg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Hg.config({onFocus:function(t){return br(t,Vb,{row:n,col:e})}})])})}(e,r,t));n.push(o)}return n}(t),n=Tb(0,0),c=zm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[n],behaviours:nc([Rg.config({})])});return{type:"widget",data:{value:Ir("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ob.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:z(a,function(t){return M(t,Eu)}).concat(c.asSpec()),behaviours:nc([mm("insert-table-picker",[ou(function(t){Rg.set(c.get(t),[n])}),Er(Vb,function(t,n,e){var o=e.event,r=o.row,i=o.col;!function(t,n,e){for(var o=0;o<10;o++)for(var r=0;r<10;r++)Lg.set(t[o][r],o<=n&&r<=e)}(a,r,i),Rg.set(c.get(t),[Tb(r+1,i+1)])}),Er(Pb,function(t,n,e){var o=e.event,r=o.row,i=o.col;u.onAction({numRows:r+1,numColumns:i+1}),vr(t,Hi())})]),Fg.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(n,t){var e,o,r,i=(o=t,r=(e=n).initData.allowCustomColors&&o.colorinput.hasCustomColors(),e.initData.colors.fold(function(){return xb(o.colorinput.getColors(),r)},function(t){return t.concat(bb(r))})),u=t.colorinput.getColorCols(),a=Ob(Ir("menu-value"),i,function(t){n.onAction({value:t})},u,"color",Sh.CLOSE_ON_EXECUTE,T,t.shared.providers),c=lt(lt({},a),{markers:Qp("color"),movement:_b(u,"color")});return{type:"widget",data:{value:Ir("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ob.widget(tp.sketch(c))]}}},zb=function(t){var n=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:lt({tag:"div",classes:[Ch,"tox-collection__group-heading"]},n),components:[]}},Nb=function(t,n,e,o){void 0===o&&(o=!0);var r=Ev({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,caret:vt.none(),checkMark:vt.none(),shortcutContent:t.shortcut},e,o);return yv({data:xv(t),getApi:function(n){return{isDisabled:function(){return gd.isDisabled(n)},setDisabled:function(t){return gd.set(n,t)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e)},Lb=function(t,n,e,o,r){void 0===o&&(o=!0);var i=(r=void 0!==r&&r)?wv("chevron-down",e.icons,[Bh]):wv("chevron-right",e.icons,[Bh]),u=Ev({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,caret:vt.some(i),checkMark:vt.none(),shortcutContent:t.shortcut},e,o);return yv({data:xv(t),getApi:function(n){return{isDisabled:function(){return gd.isDisabled(n)},setDisabled:function(t){return gd.set(n,t)}}},disabled:t.disabled,onAction:st,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,n,e)},Wb=function(t,n,e,o){void 0===o&&(o=!0);var r=Ev({iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,checkMark:vt.some(_v(e.icons)),caret:vt.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},e,o);return Yo(yv({data:xv(t),disabled:t.disabled,getApi:function(n){return{setActive:function(t){Lg.set(n,t)},isActive:function(){return Lg.isOn(n)},isDisabled:function(){return gd.isDisabled(n)},setDisabled:function(t){return gd.set(n,t)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e),{toggling:{toggleClass:Th,toggleOnExecute:!1,selected:t.active}})},Ub=function(n,e){return tt(Hb,n.fancytype).map(function(t){return t(n,e)})};function jb(t,u,a,n,c,s,l){var e=1===n,o=!e||oh(t);return et(M(t,function(t){switch(t.type){case"separator":return ao("Autocompleter.Separator",Rp,t).fold(rh,function(t){return vt.some(zb(t))});case"cardmenuitem":return ao("cardmenuitem",Wh,t).fold(rh,function(n){return vt.some((t=lt(lt({},n),{onAction:function(t){n.onAction(t),a(n.value,n.meta)}}),e=c,o=s,r={itemBehaviours:Dv(n.meta,s),cardText:{matchText:u,highlightOn:l}},i={dom:Tv(t.label),optComponents:[vt.some({dom:{tag:"div",classes:[Ah,Fh]},components:eb(t.items,r)})]},yv({data:xv(lt({text:vt.none()},t)),disabled:t.disabled,getApi:function(e){return{isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(n){gd.set(e,n),St(vs(e.element,"*"),function(t){e.getSystem().getByDom(t).each(function(t){t.hasConfigured(gd)&&gd.set(t,n)})})}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:vt.from(r.itemBehaviours).getOr([])},i,e,o.providers)));var t,e,o,r,i});default:return ao("Autocompleter.Item",Vp,t).fold(rh,function(t){return vt.some(function(n,e,t,o,r,i,u,a){void 0===a&&(a=!0);var c=Ev({presets:o,textContent:vt.none(),htmlContent:t?n.text.map(function(t){return Bv(t,e)}):vt.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:vt.none(),checkMark:vt.none(),caret:vt.none(),value:n.value},u.providers,a,n.icon);return yv({data:xv(n),disabled:n.disabled,getApi:rt({}),onAction:function(t){return r(n.value,n.meta)},onSetup:rt(st),triggersSubmenu:!1,itemBehaviours:Dv(n.meta,u)},c,i,u.providers)}(t,u,e,"normal",a,c,s,o))})}}))}function Gb(t,n,e,o,r){var i=oh(n),u=et(M(n,function(t){function n(t){return function(t,n,e,o,r){function i(t){return r?lt(lt({},t),{shortcut:vt.none(),icon:t.text.isSome()?vt.none():t.icon}):t}var u=e.shared.providers;switch(t.type){case"menuitem":return ao("menuitem",Xh,t).fold(rh,function(t){return vt.some(Nb(i(t),n,u,o))});case"nestedmenuitem":return ao("nestedmenuitem",Yh,t).fold(rh,function(t){return vt.some(Lb(i(t),n,u,o,r))});case"togglemenuitem":return ao("togglemenuitem",qh,t).fold(rh,function(t){return vt.some(Wb(i(t),n,u,o))});case"separator":return ao("separatormenuitem",Rp,t).fold(rh,function(t){return vt.some(zb(t))});case"fancymenuitem":return ao("fancymenuitem",Gh,t).fold(rh,function(t){return Ub(i(t),e)});default:return console.error("Unknown item in general menu",t),vt.none()}}(t,e,o,r?!Tt(t,"text"):i,r)}return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?n(lt(lt({},t),{disabled:!0})):n(t)}));return(r?ih:uh)(t,i,u,1,"normal")}function Xb(t){return ip.singleData(t.value,t)}function Yb(t,n,e){return Ru(t,n,e).isSome()}function qb(e,o){var r=null;return{cancel:function(){null!==r&&(clearTimeout(r),r=null)},schedule:function(){for(var t=[],n=0;n"}function u0(f,d,m,g){function p(t,n,e,o,r){var i,u,a=f(uS+"range"),c=[my.parts.label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),my.parts.field({data:r,factory:Dy,inputAttributes:lt({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[d("textfield")],inputBehaviours:nc([(i=n,u=t,Ky.config({invalidClass:d("invalid"),notify:{onValidate:function(t){br(t,iS,{type:i})},onValid:function(t){br(t,oS,{type:i,value:Df.getValue(t)})},onInvalid:function(t){br(t,rS,{type:i,value:Df.getValue(t)})}},validator:{validate:function(t){var n=Df.getValue(t),e=u(n)?Ve.value(!0):Ve.error(f("aria.input.invalid"));return Gy(e)},validateOnLoad:!1}})),py.config({})]),onSetValue:function(t){Ky.isInvalid(t)&&Ky.run(t).get(st)}})],s="hex"!==n?[my.parts["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}}function h(t,n){var e=n.red,o=n.green,r=n.blue;Df.setValue(t,{red:e,green:o,blue:r})}function v(t,n){b.getOpt(t).each(function(t){dn(t.element,"background-color","#"+n.value)})}var b=zm({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,n){o[t].set(n)}function n(t,n){var e=n.event;"hex"!==e.type?c(e.type,vt.none()):g(t)}function e(t,n){var r,e,o,i,u=n.event;"hex"===u.type?function(t,n){m(t);var e=Mv(n);c("hex",vt.some(n));var o=Hv(e);h(t,o),s(o),br(t,Qw,{hex:e}),v(t,e)}(t,u.value):(r=t,e=u.type,o=u.value,i=parseInt(o,10),c(e,vt.some(i)),a("red").bind(function(e){return a("green").bind(function(n){return a("blue").map(function(t){return Rv(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=Iv(t),eS.getField(n,"hex").each(function(t){Hg.isFocused(t)||Df.setValue(n,{hex:e.value})}),e);br(r,Qw,{hex:o}),v(r,o)}))}function t(t){return{label:f(uS+t+".label"),description:f(uS+t+".description")}}function s(t){var n=t.red,e=t.green,o=t.blue;c("red",vt.some(n)),c("green",vt.some(e)),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(eS.sketch(function(t){return{dom:{tag:"form",classes:[d("rgb-form")],attributes:{"aria-label":f("aria.color.picker")}},components:[t.field("red",my.sketch(p(Vv,"red",r.label,r.description,255))),t.field("green",my.sketch(p(Vv,"green",i.label,i.description,255))),t.field("blue",my.sketch(p(Vv,"blue",u.label,u.description,255))),t.field("hex",my.sketch(p(Av,"hex",l.label,l.description,"ffffff"))),b.asSpec()],formBehaviours:nc([Ky.config({invalidClass:d("form-invalid")}),mm("rgb-form-events",[Cr(oS,e),Cr(rS,n),Cr(iS,n)])])}}),{apis:{updateHex:function(t,n){var e;Df.setValue(t,{hex:n.value}),h(t,e=Hv(n)),s(e),v(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})}function a0(x,w){return kl({name:"ColourPicker",configFields:[mo("dom"),Eo("onValidHex",st),Eo("onInvalidHex",st)],factory:function(t){function n(t,n,e){v.getOpt(t).each(function(t){g.setHue(t,e)})}function e(t,n){b.getOpt(t).each(function(t){m.updateHex(t,n)})}function r(n,e,o,t){var r=o,i=Hv(e);p.paletteRgba.set(i),p.paletteHue.set(r),St(t,function(t){t(n,e,o)})}var o,i,u,a,c,s,l,f,d,m=u0(x,w,t.onValidHex,t.onInvalidHex),g=(l=w,f=$w.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[l("sv-palette-spectrum")]}}),d=$w.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[l("sv-palette-thumb")],innerHtml:"'}}),kl({factory:function(t){var n=rt({x:0,y:0}),e=nc([cd.config({find:vt.some}),Hg.config({})]);return $w.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[l("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[f,d],onChange:function(t,n,e){br(t,tS,{value:e})},onInit:function(t,n,e,o){y(e.element.dom,Lv(fb))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,n,e){var o=e;y(n.components()[0].element.dom,Lv(Pv(Uv(o,100,100))))},setThumb:function(t,n,e){var o=n,r=jv(Hv(e));$w.setValue(o,{x:r.saturation,y:100-r.value})}},extraApis:{}})),p={paletteRgba:Po(fb),paletteHue:Po(0)},h=zm((i=$w.parts.spectrum({dom:{tag:"div",classes:[(o=w)("hue-slider-spectrum")],attributes:{role:"presentation"}}}),u=$w.parts.thumb({dom:{tag:"div",classes:[o("hue-slider-thumb")],attributes:{role:"presentation"}}}),$w.sketch({dom:{tag:"div",classes:[o("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:rt({y:0})},components:[i,u],sliderBehaviours:nc([Hg.config({})]),onChange:function(t,n,e){br(t,Zw,{value:e})}}))),v=zm(g.sketch({})),b=zm(m.sketch({}));function y(t,n){var e,o,r=t.width,i=t.height,u=t.getContext("2d");null!==u&&(u.fillStyle=n,u.fillRect(0,0,r,i),(e=u.createLinearGradient(0,0,r,0)).addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(1,"rgba(255,255,255,0)"),u.fillStyle=e,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:nc([mm("colour-picker-events",[Cr(Qw,(s=[n,function(t,n,e){h.getOpt(t).each(function(t){$w.setValue(t,{y:100-e/360*100})})},function(t,n){v.getOpt(t).each(function(t){g.setThumb(t,n)})}],function(t,n){var e=n.event.hex;r(t,e,jv(Hv(e)).hue,s)})),Cr(tS,(c=[e],function(t,n){var e=n.event.value,o=p.paletteHue.get();r(t,Gv(Uv(o,e.x,100-e.y)),o,c)})),Cr(Zw,(a=[n,e],function(t,n){var e=(100-n.event.value.y)/100*360,o=jv(p.paletteRgba.get());r(t,Gv(Uv(e,o.saturation,o.value)),e,a)}))]),cd.config({find:function(t){return b.getOpt(t)}}),Fg.config({mode:"acyclic"})])}}})}function c0(t){return sS[t]}function s0(t,n,e){return Df.config(Yo({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))}function l0(r,i){function n(t,n){n.stop()}function e(t){return function(n,e){St(t,function(t){t(n,e)})}}function o(t,n){var e;gd.isDisabled(t)||(e=n.event.raw,a(t,e.dataTransfer.files))}function u(t,n){var e=n.event.raw.target;a(t,e.files)}function a(t,n){var e,o;Df.setValue(t,(e=n,o=fS.explode(i.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),F(kt(e),function(n){return d(o,function(t){return Bt(n.name.toLowerCase(),"."+t.toLowerCase())})}))),br(t,yy,{name:r.name})}var c=zm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:nc([mm("input-file-events",[Dr(Ci()),Dr(Vi())])])});return ey(r.label.map(function(t){return oy(t,i)}),my.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:nc([pS([]),aw(),gd.config({}),Lg.config({toggleClass:"dragenter",toggleOnExecute:!1}),mm("dropzone-events",[Cr("dragenter",e([n,Lg.toggle])),Cr("dragleave",e([n,Lg.toggle])),Cr("dragover",n),Cr("drop",e([n,o])),Cr(ki(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:i.translate("Drop an image here")}},fp.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:nc([py.config({}),$v(i.isDisabled),pv()])})]}]}}}}),["tox-form__group--stretched"],[])}function f0(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:nc([Hg.config({ignore:!0}),py.config({})])}}function d0(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[f0([hS]),t,f0([vS])],behaviours:nc([cS(1)])}}function m0(t,n){br(t,xi(),{raw:{which:9,shiftKey:n}})}function g0(t,n){var e=n.element;Kr(e,hS)?m0(t,!0):Kr(e,vS)&&m0(t,!1)}function p0(t){return Yb(t,["."+hS,"."+vS].join(","),T)}function h0(t,n){return xS(document.createElement("canvas"),t,n)}function v0(t){var n=h0(t.width,t.height);return yS(n).drawImage(t,0,0),n}function b0(t){return t.naturalWidth||t.width}function y0(t){return t.naturalHeight||t.height}function x0(t,o,r){return o=o||"image/png",S(HTMLCanvasElement.prototype.toBlob)?new Ny(function(n,e){t.toBlob(function(t){t?n(t):e()},o,r)}):(g=t.toDataURL(o,r),new Ny(function(t,n){!function(){var t=g.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return vt.none();for(var e=n[1],o=t[1],r=atob(o),i=r.length,u=Math.ceil(i/1024),a=new Array(u),c=0;c",t)}).toArray(),dk("anchor",t.targets),vt.from(t.anchorBottom).map(function(t){return fk("",t)}).toArray()]))],function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(h1,n)},[]):n})),Sh.BUBBLE_TO_SANDBOX,a,!1);return Gy(i)},getHotspot:function(t){return p.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(Ky)&&Ky.run(t).get(st)},typeaheadBehaviours:nc(ft([c.getValidationHandler().map(function(e){return Ky.config({getRoot:function(t){return Yt(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){f.getOpt(t).each(function(t){on(t.element,"title",i.translate(n))})}},validator:{validate:function(t){var n=Df.getValue(t);return p1(function(o){e({type:u.filetype,url:n.value},function(t){var n,e;"invalid"===t.status?(n=Ve.error(t.message),o(n)):(e=Ve.value(t.message),o(e))})})},validateOnLoad:!1}})}).toArray(),[gd.config({disabled:function(){return u.disabled||i.isDisabled()}}),py.config({}),mm("urlinput-events",ft(["file"===u.filetype?[Cr(Si(),function(t){br(t,yy,{name:u.name})})]:[],[Cr(ki(),function(t){br(t,yy,{name:u.name}),r(t)}),Cr(Ai(),function(t){br(t,yy,{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:Zp(0,0,"normal")},onExecute:function(t,n,e){br(n,ky,{})},onItemExecute:function(t,n,e,o){r(t),br(t,yy,{name:u.name})}}),l=u.label.map(function(t){return oy(t,i)}),f=zm((n="invalid",e=vt.some(v1),Xm("warning",{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+n],attributes:lt({title:i.translate(o=void 0===o?n:o),"aria-live":"polite"},e.fold(function(){return{}},function(t){return{id:t}}))},i.icons))),d=zm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[f.asSpec()]}),m=c.getUrlPicker(u.filetype),g=Ir("browser.url.event"),p=zm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[s,d.asSpec()],behaviours:nc([gd.config({disabled:function(){return u.disabled||i.isDisabled()}})])}),h=zm(J0({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 my.sketch({dom:by([]),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:nc([gd.config({disabled:function(){return u.disabled||i.isDisabled()},onDisabled:function(t){my.getField(t).each(gd.disable),h.getOpt(t).each(gd.disable)},onEnabled:function(t){my.getField(t).each(gd.enable),h.getOpt(t).each(gd.enable)}}),pv(),mm("url-input-events",[Cr(g,function(o){cd.getCurrent(o).each(function(n){var t=Df.getValue(n),e=lt({fieldname:u.name},t);m.each(function(t){t(e).get(function(t){Df.setValue(n,t),br(o,yy,{name:u.name})})})})})])])})}function pk(r){return function(n,e,o){return tt(e,"name").fold(function(){return r(e,o)},function(t){return n.field(t,r(e,o))})}}function hk(n,t,e){var o=Yo(e,{shared:{interpreter:function(t){return x1(n,t,o)}}});return x1(n,t,o)}function vk(t,n,e){function o(){return At.fromDom(t.getContentAreaContainer())}function r(){return p||!e()}var i,u,a,c,s,l,f,d,m,g,p=sv(t);return{inlineDialog:(f=o,d=n,m=r,g={maxHeightFunction:Vc()},function(){return m()?{type:"node",root:tn(f()),node:vt.from(f()),bubble:Sc(12,12,w1),layouts:{onRtl:function(){return[Am]},onLtr:function(){return[Mm]}},overrides:g}:{type:"hotspot",hotspot:d(),bubble:Sc(-12,12,w1),layouts:{onRtl:function(){return[Xa]},onLtr:function(){return[Ya]}},overrides:g}}),banner:(c=o,s=n,l=r,function(){return l()?{type:"node",root:tn(c()),node:vt.from(c()),layouts:{onRtl:function(){return[cp]},onLtr:function(){return[cp]}}}:{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(At.fromDom(t.startContainer),t.startOffset,At.fromDom(t.endContainer),t.endOffset))}}}),node:(i=a=function(){return At.fromDom(t.getBody())},function(t){return{type:"node",root:i(),node:t}})}}function bk(i){return vt.from(i.getParam("style_formats")).filter(c).map(function(t){var n,e,o=(n=i,e=k1(t),n.formatter?r(e.customFormats):n.on("init",function(){r(e.customFormats)}),e.formats);function r(t){St(t,function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)})}return i.getParam("style_formats_merge",!1,"boolean")?S1.concat(o):o}).getOr(S1)}function yk(t,n,e){var o={type:"formatter",isSelected:n(t.format),getStylePreview:e(t.format)};return Yo(t,o)}function xk(c,t,s,l){var f=function(t){return M(t,function(t){var n,e,o,r,i,u=Ct(t);if(nt(t,"items")){var a=f(t.items);return Yo(Yo(t,{type:"submenu"}),{getStyleItems:rt(a)})}return nt(t,"format")?yk(t,s,l):1===u.length&&wt(u,"title")?Yo(t,{type:"separator"}):(r={type:"formatter",format:o="custom-"+(e=y((n=t).name)?n.name:Ir(n.title)),isSelected:s(o),getStylePreview:l(o)},i=Yo(n,r),c.formatter.register(e,i),i)})};return f(t)}function wk(e){return function(t){if(k(n=t)&&1===n.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}var n;return!1}}function Sk(t,n,e,o,r){return{type:t,title:n,url:e,level:o,attach:r}}function kk(t){return t.innerText||t.textContent}function Ck(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&JC(t)}function Ok(t){return t&&/^(H[1-6])$/.test(t.nodeName)}function _k(t){return Ok(t)&&JC(t)}function Tk(t){var n,e=t.id||Ir("h");return Sk("header",kk(t),"#"+e,Ok(n=t)?parseInt(n.nodeName.substr(1),10):0,function(){t.id=e})}function Ek(t){var n=t.id||t.name;return Sk("anchor",kk(t)||"#"+n,"#"+n,0,st)}function Dk(t){return 0=e.y}})}function Xk(n,t){return t.getInitialPos().map(function(t){return Me(t.bounds.x,t.bounds.y,On(n),wn(n))})}function Yk(e,o,r){return r.getInitialPos().bind(function(t){switch(r.clearInitialPos(),t.position){case"static":return vt.some(z1.static());case"absolute":var n=Lk(e).map(Ae).getOrThunk(function(){return Ae(be())});return vt.some(z1.absolute(Ea("absolute",tt(t.style,"left").map(function(t){return o.x-n.x}),tt(t.style,"top").map(function(t){return o.y-n.y}),tt(t.style,"right").map(function(t){return n.right-o.right}),tt(t.style,"bottom").map(function(t){return n.bottom-o.bottom}))));default:return vt.none()}})}function qk(t,n,e){var o,r,i,u=t.element;return mt(hn(u,"position"),"fixed")?(r=n,Xk(o=u,i=e).filter(function(t){return Gk(i.getModes(),t,r)}).bind(function(t){return Yk(o,t,i)})):function(t,n,e){var r,o,i=Ae(t);if(Gk(e.getModes(),i,n))return vt.none();r=t,o=i,e.setInitialPos({style:function(){var t={},n=r.dom;if(ct(n))for(var e=0;ei.y;n!==r.isVisible()&&(r.setVisible(n),u&&!n?(Jr(o.element,[e.fadeOutClass]),e.onHide(o)):(n?Uk:jk)(o,e))})})}function Qk(t,n,e){var o,r,i,u,a,c;e.isDocked()&&(r=n,i=e,c=(o=t).element,i.setDocked(!1),Xk(a=o.element,u=i).bind(function(t){return Yk(a,t,u)}).each(function(t){t.fold(function(){return Kk(o,r,i)},function(t){return Jk(o,r,i,t)},st)}),i.setVisible(!0),r.contextual.each(function(t){$r(c,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(o)}),N1(o,r,i))}function Zk(t,n){return wt(U1.getModes(t),n)}function tC(r){var i=r.element;Yt(i).each(function(t){var n,e,o="padding-"+U1.getModes(r)[0];U1.isDocked(r)?(n=On(t),dn(i,"width",n+"px"),dn(t,o,Sn(e=i)+(parseInt(pn(e,"margin-top"),10)||0)+(parseInt(pn(e,"margin-bottom"),10)||0)+"px")):(bn(i,"width"),bn(t,o))})}function nC(t,n){n?(qr(t,G1.fadeOutClass),Jr(t,[G1.transitionClass,G1.fadeInClass])):(qr(t,G1.fadeInClass),Jr(t,[G1.fadeOutClass,G1.transitionClass]))}function eC(t,n){var e=At.fromDom(t.getContainer());n?(Yr(e,X1),qr(e,Y1)):(Yr(e,Y1),qr(e,X1))}function oC(u,t){function o(n){r().each(function(t){return n(t.element)})}function n(t){u.inline||tC(t),eC(u,U1.isDocked(t)),t.getSystem().broadcastOn([xf()],{}),r().each(function(t){return t.getSystem().broadcastOn([xf()],{})})}var e,i=gc(),r=t.getSink,a=u.inline?[]:[ic.config({channels:((e={})[j1()]={onReceive:tC},e)})];return H([Hg.config({}),U1.config({contextual:lt({lazyContext:function(t){var n=Sn(t.element),e=u.inline?u.getContentAreaContainer():u.getContainer(),o=Ae(At.fromDom(e)),r=o.height-n,i=o.y+(Zk(t,"top")?0:n);return vt.some(Me(o.x,i,o.width,r))},onShow:function(){o(function(t){return nC(t,!0)})},onShown:function(r){o(function(t){return $r(t,[G1.transitionClass,G1.fadeInClass])}),i.get().each(function(t){var n,e=r.element,o=Ut(n=t);Oa(o).filter(function(t){return!Lt(n,t)}).filter(function(t){return Lt(t,At.fromDom(o.dom.body))||Wt(e,t)}).each(function(){return ka(n)}),i.clear()})},onHide:function(t){var n=t.element,e=r;_a(n).orThunk(function(){return e().toOptional().bind(function(t){return _a(t.element)})}).fold(i.clear,i.set),o(function(t){return nC(t,!1)})},onHidden:function(){o(function(t){return $r(t,[G1.transitionClass])})}},G1),lazyViewport:function(t){var n=Fe(),e=u.getParam("toolbar_sticky_offset",0,"number"),o=n.y+(Zk(t,"top")?e:0),r=n.height-(Zk(t,"bottom")?e:0);return Me(n.x,o,n.width,r)},modes:[t.header.getDockingMode()],onDocked:n,onUndocked:n})],a,!0)}function rC(t){return ao("menubutton",$1,t)}function iC(n,t){return t.getAnimationRoot.fold(function(){return n.element},function(t){return t(n)})}function uC(t){return t.dimension.property}function aC(t,n){return t.dimension.getDimension(n)}function cC(t,n){$r(iC(t,n),[n.shrinkingClass,n.growingClass])}function sC(t,n){qr(t.element,n.openClass),Yr(t.element,n.closedClass),dn(t.element,uC(n),"0px"),yn(t.element)}function lC(t,n){qr(t.element,n.closedClass),Yr(t.element,n.openClass),bn(t.element,uC(n))}function fC(t,n,e,o){e.setCollapsed(),dn(t.element,uC(n),aC(n,t.element)),yn(t.element),cC(t,n),sC(t,n),n.onStartShrink(t),n.onShrunk(t)}function dC(t,n,e){var o=aC(n,t.element);("0px"===o?fC:function(t,n,e,o){var r=o.getOrThunk(function(){return aC(n,t.element)});e.setCollapsed(),dn(t.element,uC(n),r),yn(t.element);var i=iC(t,n);qr(i,n.growingClass),Yr(i,n.shrinkingClass),sC(t,n),n.onStartShrink(t)})(t,n,e,vt.some(o))}function mC(t,n,e){var o=iC(t,n),r=Kr(o,n.shrinkingClass),i=aC(n,t.element);lC(t,n);var u=aC(n,t.element);(r?function(){dn(t.element,uC(n),i),yn(t.element)}:function(){sC(t,n)})(),qr(o,n.shrinkingClass),Yr(o,n.growingClass),lC(t,n),dn(t.element,uC(n),u),e.setExpanded(),n.onStartGrow(t)}function gC(t,n,e){return!0===Kr(iC(t,n),n.growingClass)}function pC(t,n,e){return!0===Kr(iC(t,n),n.shrinkingClass)}function hC(t){return""}function vC(t){return{element:function(){return t.element.dom}}}function bC(t,e){cd.getCurrent(t).each(function(t){return Rg.set(t,[(n=e,uO.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:(e=t,r=M(Ct(o=n),function(t){var n=o[t],e=co(ao("sidebar",aO,n));return{name:t,getApi:vC,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}}),M(r,function(t){var n=Po(st);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Kh([vv(t,n),bv(t,n),Cr(Ji(),function(n,t){var e=t.event;V(r,function(t){return t.name===e.name}).each(function(t){(e.visible?t.onShow:t.onHide)(t.getApi(n))})})])})})),slotBehaviours:Kh([ou(function(t){return uO.hideAllSlots(t)})])};var e,o,r}))]);var n})}function yC(t){return cd.getCurrent(t).bind(function(t){return eO.isGrowing(t)||eO.hasGrown(t)?cd.getCurrent(t).bind(function(n){return V(uO.getSlotNames(n),function(t){return uO.isShowing(n,t)})}):vt.none()})}function xC(t){var n=At.fromHtml(t),e=Kt(n),o=R(void 0!==n.dom.attributes?n.dom.attributes:[],function(t,n){var e;return"class"===n.name?t:lt(lt({},t),((e={})[n.name]=n.value,e))},{}),r=Array.prototype.slice.call(n.dom.classList,0),i=0===e.length?{}:{innerHtml:Mr(n)};return lt({tag:Ft(n),classes:r,attributes:o},i)}function wC(t){return cd.getCurrent(t).each(function(t){return ka(t.element)})}function SC(f,d,m){function n(t){var n;!g.get()||"focusin"===(n=t).type&&(n.composed?Y(n.composedPath()):vt.from(n.target)).map(At.fromDom).filter(Xn).exists(function(t){return Kr(t,"mce-pastebin")})||(t.preventDefault(),wC(d()),f.editorManager.setActive(f))}var g=Po(!1),e=gc();function o(t){var n,e,o,r,i,u,a,c,s,l;t!==g.get()&&(g.set(t),n=f,e=d(),o=t,r=m.providers,c=e.element,s=o,l="data-mce-"+(i="tabindex"),vt.from(n.iframeElement).map(At.fromDom).each(function(n){s?(an(n,i).each(function(t){return on(n,l,t)}),on(n,i,-1)):(sn(n,i),an(n,l).each(function(t){on(n,i,t),sn(n,l)}))}),o?(fO.block(e,(a=r,function(t,n){return{dom:{tag:"div",attributes:{"aria-label":a.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:xC('')}]}})),bn(c,"display"),sn(c,"aria-hidden"),n.hasFocus()&&wC(e)):(u=cd.getCurrent(e).exists(function(t){return Ca(t.element)}),fO.unblock(e),dn(c,"display","none"),on(c,"aria-hidden","true"),u&&n.focus()),f.fire("AfterProgressState",{state:t}))}f.inline||f.on("PreInit",function(){f.dom.bind(f.getWin(),"focusin",n),f.on("BeforeExecCommand",function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&n(t)})}),f.on("ProgressState",function(t){var n;e.on(lp.clearTimeout),u(t.time)?(n=lp.setEditorTimeout(f,function(){return o(t.state)},t.time),e.set(n)):(o(t.state),e.clear())})}function kC(t,n,e){return{within:t,extra:n,withinWidth:e}}function CC(t,n,o){var e,r=(e=function(t,n){var e=o(t);return vt.some({element:t,start:n,finish:n+e,width:e})},R(t,function(n,t){return e(t,n.len).fold(rt(n),function(t){return{len:t.finish,list:n.list.concat([t])}})},{len:0,list:[]}).list),i=F(r,function(t){return t.finish<=n}),u=I(i,function(t,n){return t+n.width},0);return{within:i,extra:r.slice(i.length),withinWidth:u}}function OC(t){return M(t,function(t){return t.element})}function _C(t,n){var e=M(n,function(t){return Eu(t)});V1.setGroups(t,e)}function TC(t,n,e){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k=n.builtGroups.get();0!==k.length&&(o=gl(t,n,"primary"),r=$y.getCoupled(t,"overflowGroup"),dn(o.element,"visibility","hidden"),u=K(i=k.concat([r]),function(n){return _a(n.element).bind(function(t){return n.getSystem().getByDom(t).toOptional()})}),e([]),_C(o,i),a=On(o.element),0===(s=a,l=n.builtGroups.get(),d=r,y=(0===(m=CC(l,s,f=function(t){return On(t.element)})).extra.length?vt.some(m):vt.none()).getOrThunk(function(){return CC(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,kC(OC(x.concat(w)),[],b)):1<=w.length?(p=w,h=d,v=S,kC(OC(x).concat([h]),OC(p),v)):(g=S,kC(OC(x),[],g))).extra.length)?(Rg.remove(o,r),e([])):(_C(o,c.within),e(c.extra)),bn(o.element,"visibility"),yn(o.element),u.each(Hg.focus))}function EC(t,n){var e=$y.getCoupled(t,"toolbarSandbox");bf.isOpen(e)?bf.close(e):bf.open(e,n.toolbar())}function DC(t,n,e,o){var r=e.getBounds.map(function(t){return t()}),i=e.lazySink(t).getOrDie();ff.positionWithinBounds(i,n,{anchor:{type:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:pO()}}},r)}function BC(t,n,e,o,r){V1.setGroups(n,r),DC(t,n,e,o),Lg.on(t)}function MC(t){return M(t,function(t){return Eu(t)})}function AC(t,e,o){TC(t,o,function(n){o.overflowGroups.set(n),e.getOpt(t).each(function(t){bO.setGroups(t,MC(n))})})}function FC(n,e){ml(n,e,"overflow-button").bind(function(){return ml(n,e,"overflow")}).each(function(t){QC(n,e),eO.toggleGrow(t)})}function IC(t){var n=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:lt({tag:"div",classes:["tox-toolbar__group"]},n),components:[wO.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:nc([py.config({}),Hg.config({})])}}function RC(t){return wO.sketch(IC(t))}function VC(e,t){var n=ou(function(t){var n=M(e.initGroups,RC);V1.setGroups(t,n)});return nc([Qv(e.providers.isDisabled),pv(),Fg.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),mm("toolbar-events",[n])])}function PC(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":IC({title:vt.none(),items:[]}),"overflow-button":Y0({name:"more",icon:vt.some("more-drawer"),disabled:!1,tooltip:vt.some("More..."),primary:!1,borderless:!1},vt.none(),t.providers)},splitToolbarBehaviours:VC(t,n)}}function HC(t){var n=t.cyclicKeying?"cyclic":"acyclic";return V1.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===bh.scrolling?["tox-toolbar--scrolling"]:[])},components:[V1.parts.groups({})],toolbarBehaviours:VC(t,n)})}function zC(t){return"string"==typeof t?t.split(" "):t}function NC(i,u){var a=lt(lt({},IO),u.menus),e=0=r.minChars&&(e=cd.getCurrent(o).bind(function(t){return hd.getHighlighted(t).map(Df.getValue)}),r.previewing.set(!0),nx(r,u(t),t,o,i,function(t){cd.getCurrent(o).each(function(t){e.fold(function(){r.model.selectsOver&&hd.highlightFirst(t)},function(n){hd.highlightBy(t,function(t){return Df.getValue(t).value===n.value}),hd.getHighlighted(t).orThunk(function(){return hd.highlightFirst(t),vt.none()})})})},Hy.HighlightFirst).get(st))},cancelEvent:zi()}),Fg.config({mode:"special",onDown:function(t,n){return e(t,n,hd.highlightFirst),vt.some(!0)},onEscape:function(t){var n=$y.getCoupled(t,"sandbox");return bf.isOpen(n)?(bf.close(n),vt.some(!0)):vt.none()},onUp:function(t,n){return e(t,n,hd.highlightLast),vt.some(!0)},onEnter:function(n){var t=$y.getCoupled(n,"sandbox"),e=bf.isOpen(t);if(e&&!r.previewing.get())return cd.getCurrent(t).bind(function(t){return hd.getHighlighted(t)}).map(function(t){return br(n,l1(),{item:t}),!0});var o=Df.getValue(n);return vr(n,zi()),r.onExecute(t,n,o),e&&bf.close(t),vt.some(!0)}}),Lg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),$y.config({others:{sandbox:function(t){return rx(r,t,{onOpen:function(){return Lg.on(t)},onClose:function(){return Lg.off(t)}})}}}),mm("typeaheadevents",[uu(function(t){ex(r,u(t),t,i,st,Hy.HighlightFirst).get(st)}),Cr(l1(),function(t,n){var e=$y.getCoupled(t,"sandbox");ck(r.model,t,n.event.item),vr(t,zi()),r.onItemExecute(t,e,n.event.item,Df.getValue(t)),bf.close(e),s1(t)})].concat(r.dismissOnBlur?[Cr(Mi(),function(t){var n=$y.getCoupled(t,"sandbox");_a(n.element).isNone()&&bf.close(n)})]:[]))];return{uid:r.uid,dom:iy(Yo(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:lt(lt({},o),nl(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),g1=function(i){return lt(lt({},i),{toCached:function(){return g1(i.toCached())},bindFuture:function(n){return g1(i.bind(function(t){return t.fold(function(t){return Gy(Ve.error(t))},function(t){return n(t)})}))},bindResult:function(n){return g1(i.map(function(t){return t.bind(n)}))},mapResult:function(n){return g1(i.map(function(t){return t.map(n)}))},mapError:function(n){return g1(i.map(function(t){return t.mapError(n)}))},foldResult:function(n,e){return i.map(function(t){return t.fold(n,e)})},withTimeout:function(t,r){return g1(jy(function(n){var e=!1,o=setTimeout(function(){e=!0,n(Ve.error(r()))},t);i.get(function(t){e||(clearTimeout(o),n(t))})}))}})},p1=function(t){return g1(jy(t))},h1={type:"separator"},v1=Ir("aria-invalid"),b1={bar:pk(function(t,n){return e=n.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:M(t.items,e.interpreter)};var e}),collection:pk(function(t,n){return u=t,a=n.shared.providers,c=u.label.map(function(t){return oy(t,a)}),s=e(function(t,n,e,o){n.stop(),a.isDisabled()||br(t,Sy,{name:u.name,value:o})}),l=[Cr(vi(),e(function(t,n,e){ka(e)})),Cr(Ci(),s),Cr(Vi(),s),Cr(bi(),e(function(t,n,e){Iu(t.element,"."+Mh).each(function(t){qr(t,Mh)}),Yr(e,Mh)})),Cr(yi(),e(function(t){Iu(t.element,"."+Mh).each(function(t){qr(t,Mh)})})),uu(e(function(t,n,e,o){br(t,Sy,{name:u.name,value:o})}))],ey(c,my.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==u.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:h},behaviours:nc([gd.config({disabled:a.isDisabled,onDisabled:function(t){o(t,function(t){Yr(t,"tox-collection__item--state-disabled"),on(t,"aria-disabled",!0)})},onEnabled:function(t){o(t,function(t){qr(t,"tox-collection__item--state-disabled"),sn(t,"aria-disabled")})}}),pv(),Rg.config({}),Df.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){var n=o,e=M(t,function(t){var n=dp.translate(t.text),e=1===u.columns?''+n+"
":"",o=''+t.icon+"
",r={_:" "," - ":" ","-":" "},i=n.replace(/\_| \- |\-/g,function(t){return r[t]});return''+o+e+"
"}),r=M("auto"!==u.columns&&1'+t.join("")+""});Ar(n.element,r.join("")),"auto"===u.columns&&ah(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;Fg.setGridSize(o,n,e)}),vr(o,Ty)}}),py.config({}),Fg.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:"."+Ch}}),mm("collection-events",l)]),eventOrder:((r={})[Ii()]=["disabling","alloy.base.behaviour","collection-events"],r)}),["tox-form__group--collection"],[]);function e(o){return function(n,e){Ru(e.event.target,"[data-collection-item-value]").each(function(t){o(n,e,t,un(t,"data-collection-item-value"))})}}function o(t,n){return M(vs(t.element,".tox-collection__item"),n)}var u,a,r,i,c,s,l}),alertbanner:pk(function(t,n){return o=n.shared.providers,ly.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+(e=t).level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[fp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Um(e.icon,o.icons),attributes:{title:o.translate(e.iconTooltip)}},action:function(t){br(t,Sy,{name:"alert-banner",value:e.url})},buttonBehaviours:nc([jm()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(e.text)}}]});var e,o}),input:pk(function(t,n){return o=n.shared.providers,uk({name:(e=t).name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:e.disabled,classname:"tox-textfield",validation:vt.none(),maximized:e.maximized},o);var e,o}),textarea:pk(function(t,n){return o=n.shared.providers,uk({name:(e=t).name,multiline:!0,label:e.label,inputMode:vt.none(),placeholder:e.placeholder,flex:!0,disabled:e.disabled,classname:"tox-textarea",validation:vt.none(),maximized:e.maximized},o);var e,o}),label:pk(function(t,n){return r={dom:{tag:"label",innerHtml:(o=n.shared).providers.translate((e=t).label),classes:["tox-label"]}},i=M(e.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:nc([aw(),Rg.config({}),cw(vt.none()),Fg.config({mode:"acyclic"})])};var e,o,r,i}),iframe:(ZC=function(t,n){return e=t,o=n.shared.providers,u=bS&&e.sandboxed,a=lt(lt({},e.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,n){var e;r?on(t.element,"srcdoc",n):(on(t.element,"src","javascript:''"),(e=t.element.dom.contentWindow.document).open(),e.write(n),e.close()),i.set(n)}},ey(e.label.map(function(t){return oy(t,o)}),my.parts.field({factory:{sketch:function(t){return d0({uid:t.uid,dom:{tag:"iframe",attributes:a},behaviours:nc([py.config({}),Hg.config({}),gS(vt.none(),c.getValue,c.setValue)])})}}}),["tox-form__group--stretched"],[]);var e,o,r,i,u,a,c},function(t,n,e){var o=Yo(n,{source:"dynamic"});return pk(ZC)(t,o,e)}),button:pk(function(t,n){return e=t,o=n.shared.providers,r=$0(e.name,"custom"),ey(vt.none(),my.parts.field(lt({factory:fp},K0(e,vt.some(r),o,[pS(""),aw()]))),[],[]);var e,o,r}),checkbox:pk(function(t,n){return r=t,i=n.shared.providers,u=Df.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,n){t.element.dom.checked=n}}}),a=my.parts.field({factory:{sketch:h},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:nc([aw(),gd.config({disabled:function(){return r.disabled||i.isDisabled()}}),py.config({}),Hg.config({}),u,Fg.config({mode:"special",onEnter:e,onSpace:e,stopSpaceKeyup:!0}),mm("checkbox-events",[Cr(ki(),function(t,n){br(t,yy,{name:r.name})})])])}),c=my.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:i.translate(r.label)},behaviours:nc([vw.config({})])}),s=zm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[o("checked"),o("unchecked")]}),my.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[a,s.asSpec(),c],fieldBehaviours:nc([gd.config({disabled:function(){return r.disabled||i.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){my.getField(t).each(gd.disable)},onEnabled:function(t){my.getField(t).each(gd.enable)}}),pv()])});function e(t){return t.element.dom.click(),vt.some(!0)}function o(t){return Xm("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},i.icons)}var r,i,u,a,c,s}),colorinput:pk(function(t,n){return e=t,r=n.shared,i=n.colorinput,c=my.parts.field({factory:Dy,inputClasses:["tox-textfield"],onSetValue:function(t){return Ky.run(t).get(st)},inputBehaviours:nc([gd.config({disabled:r.providers.isDisabled}),pv(),py.config({}),Ky.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return Yt(t.element)},notify:{onValid:function(t){var n=Df.getValue(t);br(t,bw,{color:n})}},validator:{validateOnLoad:!1,validate:function(t){var n=Df.getValue(t);if(0===n.length)return Gy(Ve.value(!0));var e=At.fromTag("span");dn(e,"background-color",n);var o=hn(e,"background-color").fold(function(){return Ve.error("blah")},function(t){return Ve.value(n)});return Gy(o)}}})]),selectOnFocus:!1}),s=e.label.map(function(t){return oy(t,r.providers)}),l=zm((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:wb(i.getColors(),i.hasCustomColors()),columns:i.getColorCols(),presets:"color",onItemAction:function(t,e){l.getOpt(t).each(function(n){"custom"===e?i.colorPicker(function(t){t.fold(function(){return vr(n,xw)},function(t){o(n,t),hb(t)})},"#ffffff"):o(n,"remove"===e?"":e)})}},hw.sketch({dom:u.dom,components:u.components,toggleClass:"mce-active",dropdownBehaviours:nc([$v((a=r).providers.isDisabled),pv(),vw.config({}),py.config({})]),layouts:u.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:a.getSink,fetch:function(n){return jy(function(t){return u.fetch(t)}).map(function(t){return vt.from(Xb(Yo(Ob(Ir("menu-value"),t,function(t){u.onItemAction(n,t)},u.columns,u.presets,Sh.CLOSE_ON_EXECUTE,T,a.providers),{movement:_b(u.columns,u.presets)})))})},parts:{menu:Zp(0,0,u.presets)}}))),my.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:s.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[c,l.asSpec()]}]),fieldBehaviours:nc([mm("form-field-events",[Cr(bw,function(t,n){l.getOpt(t).each(function(t){dn(t.element,"background-color",n.event.color)}),br(t,yy,{name:e.name})}),Cr(yw,function(n,e){my.getField(n).each(function(t){Df.setValue(t,e.event.value),cd.getCurrent(n).each(Hg.focus)})}),Cr(xw,function(n,t){my.getField(n).each(function(t){cd.getCurrent(n).each(Hg.focus)})})])])});function o(t,n){br(t,yw,{value:n})}var e,r,i,u,a,c,s,l}),colorpicker:pk(function(t){var r=zm(a0(c0,function(t){return"tox-"+t}).sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){br(t,Sy,{name:"hex-valid",value:!0})},onInvalidHex:function(t){br(t,Sy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:nc([Df.config({store:{mode:"manual",getValue:function(t){var n=r.get(t);return cd.getCurrent(n).bind(function(t){return Df.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,n){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),o=r.get(t);cd.getCurrent(o).fold(function(){console.log("Can not find form")},function(t){Df.setValue(t,{hex:vt.from(e[1]).getOr("")}),eS.getField(t,"hex").each(function(t){vr(t,Si())})})}}}),aw()])}}),dropzone:pk(function(t,n){return l0(t,n.shared.providers)}),grid:pk(function(t,n){return e=n.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:M(t.items,e.interpreter)};var e}),listbox:pk(function(t,n){return e=t,r=(o=n).shared.providers,i=Y(e.items).filter(rk),u=e.label.map(function(t){return oy(t,r)}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[my.parts.field({dom:{},factory:{sketch:function(t){return L0({uid:t.uid,text:i.map(function(t){return t.text}),icon:vt.none(),tooltip:e.label,role:vt.none(),fetch:function(t,n){n(U0(o1(t,e.name,e.items,Df.getValue(t)),Sh.CLOSE_ON_EXECUTE,o,!1))},onSetup:rt(st),getApi:rt({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[py.config({}),Df.config({store:{mode:"manual",initialValue:i.map(function(t){return t.value}).getOr(""),getValue:function(t){return un(t.element,e1)},setValue:function(n,t){r1(e.items,t).each(function(t){on(n.element,e1,t.value),br(n,VS,{text:t.text})})}}})]},"tox-listbox",o.shared)}}})]},my.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ft([u.toArray(),[a]]),fieldBehaviours:nc([gd.config({disabled:rt(e.disabled),onDisabled:function(t){my.getField(t).each(gd.disable)},onEnabled:function(t){my.getField(t).each(gd.enable)}})])});var e,o,r,i,u,a}),selectbox:pk(function(t,n){return e=t,o=n.shared.providers,r=M(e.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=e.label.map(function(t){return oy(t,o)}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:ft([[my.parts.field({dom:{},selectAttributes:{size:e.size},options:r,factory:i1,selectBehaviours:nc([gd.config({disabled:function(){return e.disabled||o.isDisabled()}}),py.config({}),mm("selectbox-change",[Cr(ki(),function(t,n){br(t,yy,{name:e.name})})])])})],(1e)return"top";var r=Gt(a),i=Math.max(r.dom.scrollHeight,wn(r));return o.bottom=(e=void 0===e?.01:e)&&t.bottom-n.y>=e}function u_(t){var n=function(t){var n=t.getBoundingClientRect();if(n.height<=0&&n.width<=0){var e=Qt(At.fromDom(t.startContainer),t.startOffset).element;return(Yn(e)?Yt(e):vt.some(e)).filter(Xn).map(function(t){return t.dom.getBoundingClientRect()}).getOr(n)}return n}(t.selection.getRng());if(t.inline){var e=Rn();return Me(e.left+n.left,e.top+n.top,n.width,n.height)}var o=Nn(At.fromDom(t.getBody()));return Me(o.x+n.left,o.y+n.top,n.width,n.height)}function a_(t,n,e,o){void 0===o&&(o=0);var r,i,u,a,c=Hn(window),s=Ae(At.fromDom(t.getContentAreaContainer())),l=ph(t)||hh(t)||rv(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 Me(d,c.y,m,c.height);var g=function(t,n,e,o,r,i){var u=At.fromDom(t.getContainer()),a=Iu(u,".tox-editor-header").getOr(u),c=Ae(a),s=c.y>=n.bottom,l=o&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,e.y),bottom:e.bottom};if(t.inline&&!l)return{y:e.y,bottom:Math.min(c.y-i,e.bottom)};var f="line"===r?Ae(u):n;return l?{y:Math.max(c.bottom+i,e.y),bottom:Math.min(f.bottom-i,e.bottom)}:{y:Math.max(f.y+i,e.y),bottom:Math.min(c.y-i,e.bottom)}}(t,s,c,n.header.isPositionedAtTop(),e,o),p=g.y,h=g.bottom;return Me(d,p,m,h-p)}function c_(t){return"node"===t}function s_(t,r,n,i,e){var u=u_(t),o=i.lastElement().exists(function(t){return Lt(n,t)}),a=n,c=t.selection.getRng(),s=Qt(At.fromDom(c.startContainer),c.startOffset);return c.startContainer===c.endContainer&&c.startOffset===c.endOffset-1&&Lt(s.element,a)?o?Vm:cp:o?function(n,t){var e=hn(n,"position");dn(n,"position",t);var o=i_(u,Ae(r))&&!i.isReposition()?Hm:Vm;return e.each(function(t){return dn(n,"position",t)}),o}(r,i.getMode()):("fixed"===i.getMode()?e.y+Rn().top:e.y)+(wn(r)+12)<=u.y?cp:sp}function l_(n,t){var e=A(F(t,function(t){return t.predicate(n.dom)}),function(t){return"contexttoolbar"===t.type});return{contextToolbars:e.pass,contextForms:e.fail}}function f_(e,t){function o(t){return Lt(t,r)}var n,r=At.fromDom(t.getBody()),i=At.fromDom(t.selection.getNode());return o(n=i)||Wt(r,n)?function(t,n,e){var o=l_(t,n);if(0=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY})}}(f,d)?n():(f.once("selectionchange",n),f.once("touchend",function(){return f.off("selectionchange",n)}))):t()}function aT(t){return"string"==typeof t?t.split(/[ ,]/):t}function cT(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")}function sT(t){return y(t)?"|"===t:"separator"===t.type}function lT(t,n){if(0===n.length)return t;var e=q(t).filter(function(t){return!sT(t)}).fold(function(){return[]},function(t){return[jT]});return t.concat(e).concat(n).concat([jT])}function fT(t,n){return"longpress"!==n.type&&(2!==n.button||n.target===t.getBody()&&""===n.pointerType)}function dT(t,n){return fT(t,n)?t.selection.getStart(!0):n.target}function mT(s,t,n){function e(t){return up.hide(i)}function o(c){var t;cT(s)&&c.preventDefault(),c.ctrlKey&&!cT(s)||!1===s.getParam("contextmenu")||(t=function(t,n){var e=t.getParam("contextmenu_avoid_overlap","","string"),o=fT(t,n)?"selection":"point";if(at(e)){var r=dT(t,n);return Yb(At.fromDom(r),e)?"node":o}return o}(s,c),(r()?uT:function(t,n,e,o,r,i){var u=e(),a=iT(t,n,i);U0(u,Sh.CLOSE_ON_EXECUTE,o,!1).map(function(t){n.preventDefault(),up.showMenuAt(r,{anchor:a},{menu:{markers:Qp("normal")},data:t})})})(s,c,function(){var t,n,e,o=dT(s,c),r=s.ui.registry.getAll(),i=(e=(n=s).ui.registry.getAll().contextMenus,vt.from(n.getParam("contextmenu")).map(aT).getOrThunk(function(){return F(aT("link linkchecker image imagetools table spellchecker configurepermanentpen"),function(t){return Tt(e,t)})})),u=r.contextMenus,a=o;return 0<(t=R(i,function(o,t){return tt(u,t.toLowerCase()).map(function(t){var n=t.update(a);if(y(n))return lT(o,n.split(" "));if(0e;(o||r)&&dn(t.element,"display","none")}(t)}function i(t){return r(h,t,n,"top")}function u(t){return r(v,t,o,"bottom")}var c=Po([]),s=Po([]),t=Po(!1),l=gc(),f=gc(),d=RT(function(){return M(c.get(),n)},l,function(n){f.get().each(function(t){a.fire("TableSelectorChange",{start:n,finish:t})})}),m=RT(function(){return M(s.get(),o)},f,function(n){l.get().each(function(t){a.fire("TableSelectorChange",{start:t,finish:n})})}),g=VT(d),p=VT(m),h=Tu(g.asSpec()),v=Tu(p.asSpec());le().deviceType.isTouch()&&(a.on("TableSelectionChange",function(n){t.get()||(Vs(e,h),Vs(e,v),t.set(!0)),l.set(n.start),f.set(n.finish),n.otherCells.each(function(t){c.set(t.upOrLeftCells),s.set(t.downOrRightCells),i(n.start),u(n.finish)})}),a.on("ResizeEditor ResizeWindow ScrollContent",function(){l.get().each(i),f.get().each(u)}),a.on("TableSelectionClear",function(){t.get()&&(Hs(h),Hs(v),t.set(!1)),l.clear(),f.clear()}))}var HT,zT,NT={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(q_.exec(t)).bind(function(t){var n=Number(t[1]),e=t[2],o=e;return d(r,function(t){return d(Y_[t],function(t){return o===t})})?vt.some({value:n,unit:e}):vt.none()}).map(function(t){return t.value+t.unit}).getOr(t);var r},display:h,watcher:function(t,n,e){return t.formatter.formatChanged("lineheight",e,!1,{value:n}).unbind},getCurrent:function(t){return vt.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,n){return t.execCommand("LineHeight",!1,n)}},LT=function(t){return{type:"selection",root:At.fromDom(t.selection.getNode())}},WT={onLtr:function(){return[$a,Xa,Ya,qa,Ka,Ja,cp,sp,Am,Bm,Mm,Dm]},onRtl:function(){return[$a,Ya,Xa,Ka,qa,Ja,cp,sp,Mm,Dm,Am,Bm]}},UT={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"]},jT={type:"separator"},GT=function(n){function t(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}}var e;if(y(n))return n;switch(n.type){case"separator":return jT;case"submenu":return lt(lt({type:"nestedmenuitem"},t(n)),{getSubmenuItems:function(){var t=n.getSubmenuItems();return y(t)?t:M(t,GT)}});default:return lt(lt({type:"menuitem"},t(n)),{onAction:(e=n.onAction,function(){return e()})})}},XT=Ho([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),YT=XT.offset,qT=XT.absolute,KT=XT.fixed,JT=function(t,n,l,f,d){var e=n.getSnapPoints(t);return CT(e,l,f,d).orThunk(function(){return R(e,function(n,e){var t,o,r,i,u,a,c,s=(t=e.sensor,e.range.left,e.range.top,i=bT(l,o=f,r=d),u=bT(t,o,r),a=Math.abs(i.left-u.left),c=Math.abs(i.top-u.top),ke(a,c));return n.deltas.fold(function(){return{deltas:vt.some(s),snap:vt.some(e)}},function(t){return(s.left+s.top)/2<=(t.left+t.top)/2?{deltas:vt.some(s),snap:vt.some(e)}:n})},{deltas:vt.none(),snap:vt.none()}).snap.map(function(t){return{output:wT(t.output,l,f,d),extra:t.extra}})})},$T=function(t,n,e,o,r){return CT(n.getSnapPoints(t),e,o,r)},QT=Object.freeze({__proto__:null,snapTo:function(t,n,e,o){var r,i,u,a=n.getTarget(t.element);n.repositionTarget&&(r=Rn(Ut(t.element)),i=Wk(a),gn(a,xT({coord:wT((u=o).output,u.output,r,i),extra:u.extra}.coord,0,i)))}}),ZT="data-initial-z-index",tE=To("snaps",[mo("getSnapPoints"),Ju("onSensor"),mo("leftAttr"),mo("topAttr"),Eo("lazyViewport",Fe),Eo("mustSnap",!1)]),nE=[Eo("useFixed",T),mo("blockerClass"),Eo("getTarget",h),Eo("onDrag",st),Eo("repositionTarget",!0),Eo("onDrop",st),Io("getBounds",Fe),tE],eE=Object.freeze({__proto__:null,getData:function(t){return vt.from(ke(t.x,t.y))},getDelta:function(t,n){return ke(n.left-t.left,n.top-t.top)}}),oE=H(H([],nE,!0),[ta("dragger",{handlers:MT(AT)})],!1),rE=Object.freeze({__proto__:null,getData:function(t){var n,e=t.raw.touches;return 1===e.length?(n=e[0],vt.some(ke(n.clientX,n.clientY))):vt.none()},getDelta:function(t,n){return ke(n.left-t.left,n.top-t.top)}}),iE=H(H([],nE,!0),[ta("dragger",{handlers:MT(FT)})],!1),uE=H(H([],nE,!0),[ta("dragger",{handlers:MT(function(t,n,e){return H(H([],AT(t,n,e),!0),FT(t,n,e),!0)})})],!1),aE=wa({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:oE,touch:iE,mouseOrTouch:uE}),name:"dragging",active:{events:function(t,n){return t.dragger.handlers(t,n)}},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(),n=vt.none(),t=rt({});return wu({readState:t,reset:function(){i=vt.none(),n=vt.none()},update:function(r,t){return r.getData(t).bind(function(t){return n=r,e=t,o=i.map(function(t){return n.getDelta(t,e)}),i=vt.some(e),o;var n,e,o})},getStartData:function(){return n},setStartData:function(t){n=vt.some(t)}})}}),apis:QT});function cE(t,n,e){var o,r,i,u,a,c,s=At.fromDom(t.getContainer());J((o=t,r=n,i=e,u=wn(s),a=On(s),(c={}).height=t_(u+r.top,dh(o),gh(o)),i===HT.Both&&(c.width=t_(a+r.left,fh(o),mh(o))),c),function(t,n){return dn(s,n,ZO(t)),0}),t.fire("ResizeEditor")}function sE(t,n,e,o){return cE(t,ke(20*e,20*o),n),vt.some(!0)}function lE(t,n){var e,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=n,(p={}).delimiter||(p.delimiter="\xbb"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:nc([Fg.config({mode:"flow",selector:"div[role=button]"}),gd.config({disabled:h.isDisabled}),pv(),py.config({}),Rg.config({}),mm("elementPathEvents",[ou(function(r,t){g.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Fg.focusIn(r)}),g.on("NodeChange",function(t){var n,o,e=function(t){for(var n=[],e=t.length;0'+l+""}}),e=0=o.dom.offsetLeft+On(o)?Math.max(wn(o),u):u,c=parseInt(pn(n,"margin-top"),10)||0,s=parseInt(pn(n,"margin-bottom"),10)||0,i-(wn(n)+c+s-a)));var n,e,o,r,i,u,a,c,s}).each(function(t){hE(d,t)})})})}function bE(t){return Iu(t,'[role="tabpanel"]')}function yE(t,e){function o(t){var n=pE(Df.getValue(t)).getOr({}),e=i.get(),o=Yo(e,n);i.set(o)}function r(t){var n=i.get();Df.setValue(t,n)}var u,a,i=Po({}),c=Po(null),n=M(t.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[eS.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"]},components:M(t.items,function(t){return hk(n,t,e)}),formBehaviours:nc([Fg.config({mode:"acyclic",useTabstopAt:O(p0)}),mm("TabView.form.events",[ou(r),ru(o)]),ic.config({channels:lr([{key:kB,value:{onReceive:o}},{key:CB,value:{onReceive:r}}])})])}})]}}}),s=(u=n,a=gc(),{extraEvents:[ou(function(t){var o=t.element;bE(o).each(function(n){var e;dn(n,"visibility","hidden"),t.getSystem().getByDom(n).toOptional().each(function(t){var o,r,i;Y(G((r=n,i=t,M(o=u,function(t,n){Rg.set(i,o[n].view());var e=r.dom.getBoundingClientRect();return Rg.set(i,[]),e.height})),function(t,n){return n"+n.translate(t)+"
")}]}]})}function OE(t){return JE.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})}function _E(t,n){return[ly.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),ly.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]}function TE(n){var t,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return JE.sketch({lazySink:n.lazySink,onEscape:function(t){return n.onEscape(t),vt.some(!0)},useTabstopAt:function(t){return!p0(t)},dom:{tag:"div",classes:[e].concat(n.extraClasses),styles:lt({position:"relative"},n.extraStyles)},components:H([n.header,n.body],n.footer.toArray(),!0),parts:{blocker:{dom:xC(''),components:[{dom:{tag:"div",classes:BB?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:nc(H([Hg.config({}),mm("dialog-events",n.dialogEvents.concat([Br(bi(),function(t,n){Fg.focusIn(t)})])),mm("scroll-lock",[ou(function(){Yr(be(),i)}),ru(function(){qr(be(),i)})])],n.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),n.eventOrder)})}function EE(t){return fp.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:[Xm("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){vr(t,wy)}})}function DE(t,n,e){function o(t){return[ri(e.translate(t.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:lt({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:nc([k_.config({channel:_B,renderComponents:o})])}}function BE(){return{dom:xC('')}}function ME(t,n){return e={title:n.shared.providers.translate(t),draggable:n.dialog.isDraggableModal()},o=n.shared.providers,r=JE.parts.title(DE(e,vt.none(),o)),i=JE.parts.draghandle(BE()),u=JE.parts.close(EE(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),ly.sketch({dom:xC(''),components:a});var e,o,r,i,u,a}function AE(t,n,e){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:xC('')}]}}function FE(t,o,n){return{onClose:function(){return n.closeWindow()},onBlock:function(e){JE.setBusy(t(),function(t,n){return AE(e.message,n,o)})},onUnblock:function(){JE.setIdle(t())}}}function IE(t,n,e,o){var r;return Tu(TE(lt(lt({},t),{lazySink:o.shared.getSink,extraBehaviours:H([k_.config({channel:OB,updateState:function(t,n){return vt.some(n)},initialData:n}),pS({})],t.extraBehaviours,!0),onEscape:function(t){vr(t,wy)},dialogEvents:e,eventOrder:((r={})[Fi()]=[k_.name(),ic.name()],r[Gi()]=["scroll-lock",k_.name(),"messages","dialog-events","alloy.base.behaviour"],r[Xi()]=["alloy.base.behaviour","dialog-events","messages",k_.name(),"scroll-lock"],r)})))}function RE(t){return M(t,function(t){return"menu"===t.type?(e=M((n=t).items,function(t){var n=Po(!1);return lt(lt({},t),{storage:n})}),lt(lt({},n),{items:e})):t;var n,e})}function VE(t){return R(t,function(t,n){return"menu"!==n.type?t:R(n.items,function(t,n){return t[n.name]=n.storage,t},t)},{})}function PE(t,e){return[Er(bi(),g0),t(xy,function(t,n){e.onClose(),n.onClose()}),t(wy,function(t,n,e,o){n.onCancel(t),vr(o,xy)}),Cr(Oy,function(t,n){return e.onUnblock()}),Cr(Cy,function(t,n){return e.onBlock(n.event)})]}function HE(t,n){function e(t,n){return ly.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:M(n,function(t){return t.memento.asSpec()})})}var o=A(n.map(function(t){return t.footerButtons}).getOr([]),function(t){return"start"===t.align});return[e("start",o.pass),e("end",o.fail)]}function zE(t,e){return{dom:xC(''),components:[],behaviours:nc([k_.config({channel:EB,initialData:t,updateState:function(t,n){var r=M(n.buttons,function(t){var n=zm(Q0(t,t.type,e));return{name:t.name,align:t.align,memento:n}});return vt.some({lookupByName:function(t,n){return e=t,o=n,V(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(e)});var e,o},footerButtons:r})},renderComponents:HE})])}}function NE(t,n){return JE.parts.footer(zE(t,n))}function LE(n,e){if(n.getRoot().getSystem().isConnected()){var o=cd.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return eS.getField(o,e).fold(function(){var t=n.getFooter();return k_.getState(t).get().bind(function(t){return t.lookupByName(o,e)})},function(t){return vt.some(t)})}return vt.none()}function WE(c,o,s){function t(t){var n=c.getRoot();n.getSystem().isConnected()&&t(n)}var l={getData:function(){var t=c.getRoot(),n=t.getSystem().isConnected()?c.getFormWrapper():t,e=Df.getValue(n),o=dt(s,function(t){return t.get()});return lt(lt({},e),o)},setData:function(a){t(function(t){var n,e,o=l.getData(),r=lt(lt({},o),a),i=(n=r,e=c.getRoot(),k_.getState(e).get().map(function(t){return co(ao("data",t.dataValidator,n))}).getOr(n)),u=c.getFormWrapper();Df.setValue(u,i),J(s,function(t,n){Tt(r,n)&&t.set(r[n])})})},disable:function(t){LE(c,t).each(gd.disable)},enable:function(t){LE(c,t).each(gd.enable)},focus:function(t){LE(c,t).each(Hg.focus)},block:function(n){if(!y(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){br(t,Cy,{message:n})})},unblock:function(){t(function(t){vr(t,Oy)})},showTab:function(e){t(function(t){var n=c.getBody();k_.getState(n).get().exists(function(t){return t.isTabPanel()})&&cd.getCurrent(n).each(function(t){SB.showTab(t,e)})})},redial:function(e){t(function(t){var n=o(e);t.getSystem().broadcastOn([OB],n),t.getSystem().broadcastOn([_B],n.internalDialog),t.getSystem().broadcastOn([TB],n.internalDialog),t.getSystem().broadcastOn([EB],n.internalDialog),l.setData(n.initialData)})},close:function(){t(function(t){vr(t,xy)})}};return l}function UE(t){return x(t)&&-1!==RB.indexOf(t.mceAction)}function jE(o,t,r,n){var e,i,u,a=ME(o.title,n),c=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[d0({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:nc([py.config({}),Hg.config({})])})]}],behaviours:nc([Fg.config({mode:"acyclic",useTabstopAt:O(p0)})])},JE.parts.body(i)),s=o.buttons.bind(function(t){return 0===t.length?vt.none():vt.some(NE({buttons:t},n))}),l=MB(function(){return v},FE(function(){return h},n.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 IB(o.url,{base_uri:new IB(window.location.href)}),g=m.protocol+"://"+m.host+(m.port?":"+m.port:""),p=mc(),h=IE({header:a,body:c,footer:s,extraClasses:d,extraBehaviours:[mm("messages",[ou(function(){var t=pc(At.fromDom(window),"message",function(t){var n,e;m.isSameOrigin(new IB(t.raw.origin))&&(UE(n=t.raw.data)?function(t,n,e){switch(e.mceAction){case"insertContent":t.insertContent(e.content);break;case"setContent":t.setContent(e.content);break;case"execCommand":var o=!!w(e.ui)&&e.ui;t.execCommand(e.cmd,o,e.value);break;case"close":n.close();break;case"block":n.block(e.message);break;case"unblock":n.unblock()}}(r,v,n):!UE(e=n)&&x(e)&&Tt(e,"mceAction")&&o.onMessage(v,n))});p.set(t)}),ru(p.clear)]),ic.config({channels:((e={})[DB]={onReceive:function(t,n){Iu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(n,g)})}},e)})],extraStyles:f},o,l,n),v={block:function(n){if(!y(n))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");b(function(t){br(t,Cy,{message:n})})},unblock:function(){b(function(t){vr(t,Oy)})},close:function(){b(function(t){vr(t,xy)})},sendMessage:function(n){b(function(t){t.getSystem().broadcastOn([DB],n)})}};function b(t){u.getSystem().isConnected()&&t(u)}return{dialog:u=h,instanceApi:v}}function GE(t){function o(t,y){return gB.open(function(t,n,e){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v=n,b=(r={redial:gB.redial,closeWindow:function(){JE.hide(b.dialog),y(b.instanceApi)}},i=R,c=ME((o={dataValidator:e,initialData:v,internalDialog:t}).internalDialog.title,i),u=i,a=xE({body:o.internalDialog.body},vt.none(),u,!1),s=JE.parts.body(a),l=RE(o.internalDialog.buttons),f=VE(l),d=NE({buttons:l},i),m=AB(function(){return h},FE(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=IE({header:c,body:s,footer:vt.some(d),extraClasses:g,extraBehaviours:[],extraStyles:{}},o,m,i),h=WE({getRoot:rt(p),getBody:function(){return JE.getBody(p)},getFooter:function(){return JE.getFooter(p)},getFormWrapper:function(){var t=JE.getBody(p);return cd.getCurrent(t).getOr(t)}},r.redial,f),{dialog:p,instanceApi:h});return JE.show(b.dialog),b.instanceApi.setData(v),b.instanceApi},t)}function r(t,A,F,I){return gB.open(function(t,n,e){function o(){return E.on(function(t){up.reposition(t),U1.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",e,n)),E=gc(),D=R.shared.header.isPositionedAtTop(),B=(i={dataValidator:e,initialData:T,internalDialog:t},u={redial:gB.redial,closeWindow:function(){E.on(up.hide),V.off("ResizeEditor",o),E.clear(),F(B.instanceApi)}},a=R,c=I,v=Ir("dialog-label"),b=Ir("dialog-content"),y=zm((f={title:i.internalDialog.title,draggable:!0},d=v,m=a.shared.providers,ly.sketch({dom:xC(''),components:[DE(f,vt.some(d),m),BE(),EE(m)],containerBehaviours:nc([aE.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=zm((g={body:i.internalDialog.body},p=a,h=c,xE(g,vt.some(b),p,h))),w=RE(i.internalDialog.buttons),S=VE(w),k=zm(FB({buttons:w},a)),C=AB(function(){return _},{onBlock:function(e){fO.block(O,function(t,n){return AE(e.message,n,a.shared.providers)})},onUnblock:function(){fO.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()]=[k_.name(),ic.name()],l[Ii()]=["execute-on-form"],l[Gi()]=["reflecting","execute-on-form"],l),behaviours:nc([Fg.config({mode:"cyclic",onEscape:function(t){return vr(t,xy),vt.some(!0)},useTabstopAt:function(t){return!p0(t)&&("button"!==Ft(t)||"disabled"!==un(t,"disabled"))}}),k_.config({channel:OB,updateState:function(t,n){return vt.some(n)},initialData:i}),Hg.config({}),mm("execute-on-form",C.concat([Br(bi(),function(t,n){Fg.focusIn(t)})])),fO.config({getRoot:function(){return vt.some(O)}}),Rg.config({}),pS({})]),components:[y.asSpec(),x.asSpec(),k.asSpec()]}),_=WE({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:_}),M=Tu(up.sketch(lt(lt({lazySink:R.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},D?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:nc(H([mm("window-manager-inline-events",[Cr(Yi(),function(t,n){vr(B.dialog,wy)})])],(r=V,P&&D?[]:[U1.config({contextual:{lazyContext:function(){return vt.some(Ae(At.fromDom(r.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]),!0)),isExtraPart:function(t,n){return Yb(e=n,".tox-alert-dialog")||Yb(e,".tox-confirm-dialog");var e}})));return E.set(M),up.showWithin(M,Eu(B.dialog),{anchor:A},vt.some(be())),P&&D||(U1.refresh(M),V.on("ResizeEditor",o)),B.instanceApi.setData(T),Fg.focusIn(B.dialog),B.instanceApi},t)}var c,s,l,f,R=t.backstage,V=t.editor,P=dv(V),e=(s=(c=t).backstage.shared,{open:function(t,n){function e(){JE.hide(u),n()}var o=zm(Q0({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:vt.none()},"cancel",c.backstage)),r=kE(),i=SE(e,s.providers),u=Tu(TE({lazySink:function(){return s.getSink()},header:wE(r,i),body:CE(t,s.providers),footer:vt.some(OE(_E([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Cr(wy,e)],eventOrder:{}}));JE.show(u);var a=o.get(u);Hg.focus(a)}}),i=(f=(l=t).backstage.shared,{open:function(t,n){function e(t){JE.hide(a),n(t)}var o=zm(Q0({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:vt.none()},"submit",l.backstage)),r=Q0({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:vt.none()},"cancel",l.backstage),i=kE(),u=SE(function(){return e(!1)},f.providers),a=Tu(TE({lazySink:function(){return f.getSink()},header:wE(i,u),body:CE(t,f.providers),footer:vt.some(OE(_E([],[r,o.asSpec()]))),onEscape:function(){return e(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Cr(wy,function(){return e(!1)}),Cr(ky,function(){return e(!0)})],eventOrder:{}}));JE.show(a);var c=o.get(a);Hg.focus(c)}});return{open:function(t,n,e){return void 0!==n&&"toolbar"===n.inline?r(t,R.shared.anchors.inlineDialog(),e,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?r(t,R.shared.anchors.cursor(),e,n.ariaAttrs):o(t,e)},openUrl:function(t,n){return e=n,gB.openUrl(function(t){var n=jE(t,{closeWindow:function(){JE.hide(n.dialog),e(n.instanceApi)}},V,R);return JE.show(n.dialog),n.instanceApi},t);var e},alert:function(t,n){e.open(t,function(){n()})},close:function(t){t.close()},confirm:function(t,n){i.open(t,function(t){n(t)})}}}(zT=HT=HT||{})[zT.None=0]="None",zT[zT.Both=1]="Both",zT[zT.Vertical=2]="Vertical";var XE,YE=rt([mo("lazySink"),wo("dragBlockClass"),Io("getBounds",Fe),Eo("useTabstopAt",D),Eo("eventOrder",{}),Zs("modalBehaviours",[Fg]),$u("onExecute"),Zu("onEscape")]),qE={sketch:h},KE=rt([Qf({name:"draghandle",overrides:function(t,n){return{behaviours:nc([aE.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(n,null,2)).message),getBounds:t.getDragBounds})])}}}),Jf({schema:[mo("dom")],name:"title"}),Jf({factory:qE,schema:[mo("dom")],name:"close"}),Jf({factory:qE,schema:[mo("dom")],name:"body"}),Qf({factory:qE,schema:[mo("dom")],name:"footer"}),$f({factory:{sketch:function(t,n){return lt(lt({},t),{dom:n.dom,components:n.components})}},schema:[Eo("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Eo("components",[])],name:"blocker"})]),JE=Cl({name:"ModalDialog",configFields:YE(),partFields:KE(),factory:function(a,t,n,r){var e,i=gc(),o=Ir("modal-events"),u=lt(lt({},a.eventOrder),((e={})[Gi()]=[o].concat(a.eventOrder["alloy.system.attached"]||[]),e));return{uid:a.uid,dom:a.dom,components:t,apis:{show:function(t){i.set(t);var n=a.lazySink(t).getOrDie(),e=r.blocker(),o=n.getSystem().build(lt(lt({},e),{components:e.components.concat([Eu(t)]),behaviours:nc([Hg.config({}),mm("dialog-blocker-events",[Br(bi(),function(){Fg.focusIn(t)})])])}));Vs(n,o),Fg.focusIn(t)},hide:function(n){i.clear(),Yt(n.element).each(function(t){n.getSystem().getByDom(t).each(function(t){Hs(t)})})},getBody:function(t){return gl(t,a,"body")},getFooter:function(t){return gl(t,a,"footer")},setIdle:function(t){fO.unblock(t)},setBusy:function(t,n){fO.block(t,n)}},eventOrder:u,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:nl(a.modalBehaviours,[Rg.config({}),Fg.config({mode:"cyclic",onEnter:a.onExecute,onEscape:a.onEscape,useTabstopAt:a.useTabstopAt}),fO.config({getRoot:i.get}),mm(o,[ou(function(t){var n,e,o,r=t.element,i=gl(t,a,"title").element,u=an(r,"id").fold(function(){var t=Ir("dialog-label");return on(i,"id",t),t},h);on(r,"aria-labelledby",u),n=t.element,e=gl(t,a,"body").element,o=vt.from(un(n,"id")).fold(function(){var t=Ir("dialog-describe");return on(e,"id",t),t},h),on(n,"aria-describedby",o)})])])}},apis:{show:function(t,n){t.show(n)},hide:function(t,n){t.hide(n)},getBody:function(t,n){return t.getBody(n)},getFooter:function(t,n){return t.getFooter(n)},setBusy:function(t,n,e){t.setBusy(n,e)},setIdle:function(t,n){t.setIdle(n)}}}),$E=$o([po("type"),po("name")].concat(Lh)),QE=er,ZE=[ar("name","name",je(function(){return Ir("button-name")}),nr),Co("icon"),Ao("align","end",["start","end"]),Fo("primary",!1),Fo("disabled",!1)],tD=H(H([],ZE,!0),[po("text")],!1),nD=H([ho("type",["submit","cancel","custom"])],tD,!0),eD=lo("type",{submit:nD,cancel:nD,custom:nD,menu:H([ho("type",["menu"]),Co("text"),Co("tooltip"),Co("icon"),xo("items",$E)],ZE,!0)}),oD=[po("type"),po("text"),ho("level",["info","warn","error","success"]),po("icon"),Eo("url","")],rD=$o(oD),iD=[po("type"),po("text"),Fo("disabled",!1),Fo("primary",!1),ar("name","name",je(function(){return Ir("button-name")}),nr),Co("icon"),Fo("borderless",!1)],uD=$o(iD),aD=[po("type"),po("name"),po("label"),Fo("disabled",!1)],cD=$o(aD),sD=er,lD=[po("type"),po("name")],fD=lD.concat([Co("label")]),dD=fD.concat([Eo("columns","auto")]),mD=$o(dD),gD=Qo([po("value"),po("text"),po("icon")]),pD=$o(fD),hD=nr,vD=$o(fD),bD=nr,yD=lD.concat([Mo("tag","textarea"),po("scriptId"),po("scriptUrl"),Do("settings",void 0,ir)]),xD=lD.concat([Mo("tag","textarea"),vo("init")]),wD=io(function(t){return ao("customeditor.old",to(xD),t).orThunk(function(){return ao("customeditor.new",to(yD),t)})}),SD=nr,kD=$o(fD),CD=no(Jo),OD=[po("type"),po("html"),Ao("presets","presentation",["presentation","document"])],_D=$o(OD),TD=fD.concat([Fo("sandboxed",!0)]),ED=$o(TD),DD=nr,BD=fD.concat([go("currentState",$o([mo("blob"),po("url")]))]),MD=$o(BD),AD=fD.concat([Co("inputMode"),Co("placeholder"),Fo("maximized",!1),Fo("disabled",!1)]),FD=$o(AD),ID=nr,RD=[po("text"),po("value")],VD=[po("text"),xo("items",(XE=Rt(function(){return PD}),{extract:function(t,n){return XE().extract(t,n)},toString:function(){return XE().toString()}}))],PD=eo([$o(RD),$o(VD)]),HD=fD.concat([xo("items",PD),Fo("disabled",!1)]),zD=$o(HD),ND=nr,LD=fD.concat([yo("items",[po("text"),po("value")]),Bo("size",1),Fo("disabled",!1)]),WD=$o(LD),UD=nr,jD=fD.concat([Fo("constrain",!0),Fo("disabled",!1)]),GD=$o(jD),XD=$o([po("width"),po("height")]),YD=[po("type"),xo("header",nr),xo("cells",no(nr))],qD=$o(YD),KD=fD.concat([Co("placeholder"),Fo("maximized",!1),Fo("disabled",!1)]),JD=$o(KD),$D=nr,QD=fD.concat([Ao("filetype","file",["image","media","file"]),Eo("disabled",!1)]),ZD=$o(QD),tB=$o([po("value"),Eo("meta",{})]),nB=Ze(function(){return ro("type",{alertbanner:rD,bar:$o((e=dE("bar"),[po("type"),e])),button:uD,checkbox:cD,colorinput:pD,colorpicker:vD,dropzone:kD,grid:$o((t=dE("grid"),[po("type"),go("columns",tr),t])),iframe:ED,input:FD,listbox:zD,selectbox:WD,sizeinput:GD,textarea:JD,urlinput:ZD,customeditor:wD,htmlpanel:_D,imagetools:MD,collection:mD,label:$o((n=dE("label"),[po("type"),po("label"),n])),table:qD,panel:oB});var t,n,e}),eB=[po("type"),Eo("classes",[]),xo("items",nB)],oB=$o(eB),rB=[ar("name","name",je(function(){return Ir("tab-name")}),nr),po("title"),xo("items",nB)],iB=[po("type"),yo("tabs",rB)],uB=$o(iB),aB=tD,cB=eD,sB=$o([po("title"),go("body",ro("type",{panel:oB,tabpanel:uB})),Mo("size","normal"),xo("buttons",cB),Eo("initialData",{}),Io("onAction",st),Io("onChange",st),Io("onSubmit",st),Io("onClose",st),Io("onCancel",st),Eo("onTabChange",st)]),lB=$o(H([ho("type",["cancel","custom"])],aB,!0)),fB=$o([po("title"),po("url"),ko("height"),ko("width"),_o("buttons",lB),Io("onAction",st),Io("onCancel",st),Io("onClose",st),Io("onMessage",st)]),dB=function(t){return x(t)?[t].concat(z(Z(t),dB)):c(t)?z(t,dB):[]},mB={checkbox:sD,colorinput:hD,colorpicker:bD,dropzone:CD,input:ID,iframe:DD,sizeinput:XD,selectbox:UD,listbox:ND,size:XD,textarea:$D,urlinput:tB,customeditor:SD,collection:gD,togglemenuitem:QE},gB={open:function(t,n){var e=gE(n);return t(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(t,n){return t(co(ao("dialog",fB,n)))},redial:gE},pB=kl({name:"TabButton",configFields:[Eo("uid",void 0),mo("value"),ar("dom","dom",Ye(function(){return{attributes:{role:"tab",id:Ir("aria"),"aria-selected":"false"}}}),Zo()),wo("action"),Eo("domModification",{}),Zs("tabButtonBehaviours",[Hg,Fg,Df]),mo("view")],factory:function(t,n){return{uid:t.uid,dom:t.dom,components:t.components,events:Sm(t.action),behaviours:nl(t.tabButtonBehaviours,[Hg.config({}),Fg.config({mode:"execution",useSpace:!0,useEnter:!0}),Df.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),hB=rt([mo("tabs"),mo("dom"),Eo("clickToDismiss",!1),Zs("tabbarBehaviours",[hd,Fg]),qu(["tabClass","selectedClass"])]),vB=rt([Zf({factory:pB,name:"tabs",unit:"tab",overrides:function(o){return{action:function(t){var n=t.getSystem().getByUid(o.uid).getOrDie(),e=hd.isHighlighted(n,t);(e&&o.clickToDismiss?function(t,n){hd.dehighlight(t,n),br(t,Qi(),{tabbar:t,button:n})}:e?st:function(t,n){hd.highlight(t,n),br(t,$i(),{tabbar:t,button:n})})(n,t)},domModification:{classes:[o.markers.tabClass]}}}})]),bB=Cl({name:"Tabbar",configFields:hB(),partFields:vB(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:nl(t.tabbarBehaviours,[hd.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,n){on(n.element,"aria-selected","true")},onDehighlight:function(t,n){on(n.element,"aria-selected","false")}}),Fg.config({mode:"flow",getInitial:function(t){return hd.getHighlighted(t).map(function(t){return t.element})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),yB=kl({name:"Tabview",configFields:[Zs("tabviewBehaviours",[Rg])],factory:function(t,n){return{uid:t.uid,dom:t.dom,behaviours:nl(t.tabviewBehaviours,[Rg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),xB=rt([Eo("selectFirst",!0),Ju("onChangeTab"),Ju("onDismissTab"),Eo("tabs",[]),Zs("tabSectionBehaviours",[])]),wB=rt([Jf({factory:bB,schema:[mo("dom"),bo("markers",[mo("tabClass"),mo("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),Jf({factory:yB,name:"tabview"})]),SB=Cl({name:"TabSection",configFields:xB(),partFields:wB(),factory:function(i,t,n,e){function o(t,n){ml(t,i,"tabbar").each(function(t){n(t).each(yr)})}return{uid:i.uid,dom:i.dom,components:t,behaviours:tl(i.tabSectionBehaviours),events:eu(ft([i.selectFirst?[ou(function(t,n){o(t,hd.getFirst)})]:[],[Cr($i(),function(t,n){var o=n.event.button,r=Df.getValue(o);ml(o,i,"tabview").each(function(e){V(i.tabs,function(t){return t.value===r}).each(function(t){var n=t.view();an(o.element,"id").each(function(t){on(e.element,"aria-labelledby",t)}),Rg.set(e,n),i.onChangeTab(e,o,n)})})}),Cr(Qi(),function(t,n){var e=n.event.button;i.onDismissTab(t,e)})]])),apis:{getViewItems:function(t){return ml(t,i,"tabview").map(function(t){return Rg.contents(t)}).getOr([])},showTab:function(t,e){o(t,function(n){return V(hd.getCandidates(n),function(t){return Df.getValue(t)===e}).filter(function(t){return!hd.isHighlighted(n,t)})})}}}},apis:{getViewItems:function(t,n){return t.getViewItems(n)},showTab:function(t,n,e){t.showTab(n,e)}}}),kB="send-data-to-section",CB="send-data-to-view",OB=Ir("update-dialog"),_B=Ir("update-title"),TB=Ir("update-body"),EB=Ir("update-footer"),DB=Ir("body-send-message"),BB=nb.deviceType.isTouch(),MB=function(u,t){function n(t,i){return Cr(t,function(e,o){var n,r;n=e,r=function(t,n){i(u(),t,o.event,e)},k_.getState(n).get().each(function(t){r(t,n)})})}return H(H([],PE(n,t),!0),[n(Sy,function(t,n,e){n.onAction(t,{name:e.name})})],!1)},AB=function(u,t,c){function n(t,i){return Cr(t,function(e,o){var n,r;n=e,r=function(t,n){i(u(),t,o.event,e)},k_.getState(n).get().each(function(t){r(t.internalDialog,n)})})}return H(H([],PE(n,t),!0),[n(ky,function(t,n){return n.onSubmit(t)}),n(yy,function(t,n,e){n.onChange(t,{name:e.name})}),n(Sy,function(t,n,e,o){function r(){return Fg.focusIn(o)}function i(t){return cn(t,"disabled")||an(t,"aria-disabled").exists(function(t){return"true"===t})}var u=ge(o.element),a=Oa(u);n.onAction(t,{name:e.name,value:e.value}),Oa(u).fold(r,function(n){i(n)||a.exists(function(t){return Wt(n,t)&&i(t)})?r():c().toOptional().filter(function(t){return!Wt(t.element,n)}).each(r)})}),n(_y,function(t,n,e){n.onTabChange(t,{newTabName:e.name,oldTabName:e.oldName})}),ru(function(t){var n=u();Df.setValue(t,n.getData())})],!1)},FB=zE,IB=tinymce.util.Tools.resolve("tinymce.util.URI"),RB=["insertContent","setContent","execCommand","close","block","unblock"];o.add("silver",function(t){var n=fE(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;return uy(t,o.shared),{renderUI:r,getWindowManagerImpl:rt(GE({editor:t,backstage:o})),getNotificationManagerImpl:function(){return u=t,r=e,l={backstage:o}.backstage.shared,{open:function(t,n){function e(){n(),up.hide(c)}var o=!t.closeButton&&t.timeout&&(0