${Py(e.backstageProvider.translate(e.text))}
`),behaviours:Sa([vf.config({})])}),n=e=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${e}%`}}}),r=e=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${e}%`}}),s=Ob({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},r(0)],behaviours:Sa([vf.config({})])}),a={updateProgress:(e,t)=>{e.getSystem().isConnected()&&s.getOpt(e).each((e=>{vf.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(t)]},r(t)])}))},updateText:(e,t)=>{if(e.getSystem().isConnected()){const n=o.get(e);vf.set(n,[Hl(t)])}}},i=$([e.icon.toArray(),e.level.toArray(),e.level.bind((e=>A.from(Ky[e]))).toArray()]),l=Ob(Eb.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":e.backstageProvider.translate("Close")}},components:[Gy("close",{tag:"span",classes:["tox-icon"]},e.iconProvider)],buttonBehaviours:Sa([Mb.config({}),Zb.config({...e.backstageProvider.tooltips.getConfig({tooltipText:e.backstageProvider.translate("Close")})})]),action:t=>{e.onAction(t)}})),c=((e,t,o)=>{const n=o(),r=j(e,(e=>ve(n,Uy(e,n))));return qy(t,r.getOr(Vy),n,A.none())})(i,{tag:"div",classes:["tox-notification__icon"]},e.iconProvider),d=[c,{dom:{tag:"div",classes:["tox-notification__body"]},components:[o.asSpec()],behaviours:Sa([vf.config({})])}];return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert","aria-labelledby":t},classes:e.level.map((e=>["tox-notification","tox-notification--in",`tox-notification--${e}`])).getOr(["tox-notification","tox-notification--in"])},behaviours:Sa([Mb.config({}),Sf.config({}),lf.config({mode:"special",onEscape:t=>(e.onAction(t),A.some(!0))})]),components:d.concat(e.progress?[s.asSpec()]:[]).concat([l.asSpec()]),apis:a}},configFields:[Sr("level"),hr("progress"),Sr("icon"),hr("onAction"),hr("text"),hr("iconProvider"),hr("backstageProvider")],apis:{updateProgress:(e,t,o)=>{e.updateProgress(t,o)},updateText:(e,t,o)=>{e.updateText(t,o)}}});var Xy=(e,t,o,n)=>{const r=t.backstage.shared,s=()=>{const t=Ko(Be.fromDom(e.getContentAreaContainer()));return A.some(t)},a=e=>{s().each((t=>{F(e,(e=>{Xt(e.element)>t.width&&Mt(e.element,"width",t.width+"px")}))}))};return{open:(t,i,l)=>{const c=()=>{const t=(t,o)=>{dv.hide(t),n.clear(),o&&e.focus()},o=(e,t)=>{t&&lf.focusIn(e)};n.on((e=>{i();const n=l();(e=>{vf.remove(e,d),m()})(e),((e,n)=>{0===at(e.element).length?t(e,n):o(e,n)})(e,n)}))},d=zl(Yy.sketch({text:t.text,level:B(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:t.icon,onAction:c,iconProvider:r.providers.icons,backstageProvider:r.providers}));if(n.isSet()){const e=Vl(d);n.on((t=>{vf.append(t,e),dv.reposition(t),qi.refresh(t),a(t.components())}))}else{const t=zl(dv.sketch({dom:{tag:"div",classes:["tox-notifications-container"],attributes:{"aria-label":"Notifications",role:"region"}},lazySink:r.getSink,fireDismissalEventInstead:{},...r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Sa([lf.config({mode:"cyclic",selector:".tox-notification, .tox-notification a, .tox-notification button"}),vf.config({}),...vb(e)&&!r.header.isPositionedAtTop()?[]:[qi.config({contextual:{lazyContext:()=>A.some(Ko(Be.fromDom(e.getContentAreaContainer()))),fadeInClass:"tox-notification-container-dock-fadein",fadeOutClass:"tox-notification-container-dock-fadeout",transitionClass:"tox-notification-container-dock-transition"},modes:["top"],lazyViewport:t=>kb(e,t.element).map((e=>({bounds:_b(e),optScrollEnv:A.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Gt(e.element).top})}))).getOrThunk((()=>({bounds:Jo(),optScrollEnv:A.none()})))})]])})),a=Vl(d),i={maxHeightFunction:yd()},l={...r.anchors.banner(),overrides:i};n.set(t),o.add(t),dv.showWithinBounds(t,a,{anchor:l},s)}p(t.timeout)&&t.timeout>0&&gv.setEditorTimeout(e,(()=>{c()}),t.timeout);const m=()=>{n.on((e=>{dv.reposition(e),qi.refresh(e),a(e.components())}))};return{close:c,reposition:m,text:e=>{Yy.updateText(d,e)},settings:t,getEl:()=>d.element.dom,progressBar:{value:e=>{Yy.updateProgress(d,e)}}}},close:e=>{e.close()},getArgs:e=>e.settings}};const Jy=(e,t)=>{const o=(e,t)=>{Gs(e,ds(),{raw:t})},n=()=>e.getMenu().bind(mh.getHighlighted);t.on("keydown",(t=>{const r=t.which;e.isActive()&&(e.isMenuOpen()?13===r?(n().each(Ks),t.preventDefault()):40===r?(n().fold((()=>{e.getMenu().each(mh.highlightFirst)}),(e=>{o(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==r&&38!==r&&39!==r||n().each((e=>{o(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==r&&38!==r&&40!==r||e.cancelIfNecessary())})),t.on("NodeChange",(()=>{!e.isActive()||e.isProcessingAction()||t.queryCommandState("mceAutoCompleterInRange")||e.cancelIfNecessary()}))};var Qy;!function(e){e[e.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",e[e.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(Qy||(Qy={}));var ew=Qy;const tw="tox-menu-nav__js",ow="tox-collection__item",nw="tox-swatch",rw={normal:tw,color:nw},sw="tox-collection__item--enabled",aw="tox-collection__item-icon",iw="tox-collection__item-label",lw="tox-collection__item-caret",cw="tox-collection__item--active",dw="tox-collection__item-container",mw="tox-collection__item-container--row",uw=e=>fe(rw,e).getOr(tw),gw=e=>"color"===e?"tox-swatches":"tox-menu",hw=e=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:gw(e),tieredMenu:"tox-tiered-menu"}),pw=e=>{const t=hw(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:uw(e)}},fw=(e,t,o)=>{const n=hw(o);return{tag:"div",classes:$([[n.menu,`tox-menu-${t}-column`],e?[n.hasIcons]:[]])}},vw=[ev.parts.items({})],bw=(e,t,o)=>{const n=hw(o);return{dom:{tag:"div",classes:$([[n.tieredMenu]])},markers:pw(o)}},yw=w([Sr("data"),Mr("inputAttributes",{}),Mr("inputStyles",{}),Mr("tag","input"),Mr("inputClasses",[]),Fi("onSetValue"),Mr("styles",{}),Mr("eventOrder",{}),Nu("inputBehaviours",[Mu,Sf]),Mr("selectOnFocus",!0)]),ww=e=>Sa([Sf.config({onFocus:e.selectOnFocus?e=>{const t=e.element,o=Sl(t);t.dom.setSelectionRange(0,o.length)}:v})]),xw=e=>({...ww(e),...Bu(e.inputBehaviours,[Mu.config({store:{mode:"manual",...e.data.map((e=>({initialValue:e}))).getOr({}),getValue:e=>Sl(e.element),setValue:(e,t)=>{Sl(e.element)!==t&&kl(e.element,t)}},onSetValue:e.onSetValue})])}),Cw=e=>({tag:e.tag,attributes:{type:"text",...e.inputAttributes},styles:e.inputStyles,classes:e.inputClasses}),Sw=Lg({name:"Input",configFields:yw(),factory:(e,t)=>({uid:e.uid,dom:Cw(e),components:[],behaviours:xw(e),eventOrder:e.eventOrder})}),kw=Xi("refetch-trigger-event"),_w=Xi("redirect-menu-item-interaction"),Ew="tox-menu__searcher",Tw=e=>Yl(e.element,`.${Ew}`).bind((t=>e.getSystem().getByDom(t).toOptional())),Ow=Tw,Aw=e=>({fetchPattern:Mu.getValue(e),selectionStart:e.element.dom.selectionStart,selectionEnd:e.element.dom.selectionEnd}),Dw=e=>{const t=(e,t)=>(t.cut(),A.none()),o=(e,t)=>{const o={interactionEvent:t.event,eventType:t.event.raw.type};return Gs(e,_w,o),A.some(!0)},n="searcher-events";return{dom:{tag:"div",classes:[ow]},components:[Sw.sketch({inputClasses:[Ew,"tox-textfield"],inputAttributes:{...e.placeholder.map((t=>({placeholder:e.i18n(t)}))).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:Sa([bf(n,[oa(us(),(e=>{qs(e,kw)})),oa(ds(),((e,t)=>{"Escape"===t.event.raw.key&&t.stop()}))]),lf.config({mode:"special",onLeft:t,onRight:t,onSpace:t,onEnter:o,onEscape:o,onUp:o,onDown:o})]),eventOrder:{keydown:[n,lf.name()]}})]}},Mw="tox-collection--results__js",Nw=e=>{var t;return e.dom?{...e,dom:{...e.dom,attributes:{...null!==(t=e.dom.attributes)&&void 0!==t?t:{},id:Xi("aria-item-search-result-id"),"aria-selected":"false"}}}:e},Rw=(e,t)=>o=>{const n=I(o,t);return P(n,(t=>({dom:e,components:t})))},Bw=(e,t)=>{const o=[];let n=[];return F(e,((e,r)=>{t(e,r)?(n.length>0&&o.push(n),n=[],(ve(e.dom,"innerHtml")||e.components&&e.components.length>0)&&n.push(e)):n.push(e)})),n.length>0&&o.push(n),P(o,(e=>({dom:{tag:"div",classes:["tox-collection__group"]},components:e})))},Lw=(e,t,o)=>ev.parts.items({preprocess:n=>{const r=P(n,o);return"auto"!==e&&e>1?Rw({tag:"div",classes:["tox-collection__group"]},e)(r):Bw(r,((e,o)=>"separator"===t[o].type))}}),Hw=(e,t,o=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Lw(e,t,x)]}),Iw=e=>L(e,(e=>"icon"in e&&void 0!==e.icon)),Pw=e=>(console.error(lr(e)),console.log(e),A.none()),Fw=(e,t,o,n,r)=>{const s=(a=o,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[ev.parts.items({preprocess:e=>Bw(e,((e,t)=>"separator"===a[t].type))})]});var a;return{value:e,dom:s.dom,components:s.components,items:o}},zw=(e,t,o,n,r)=>{const s=()=>"searchable"!==r.menuType?Hw(n,o):"search-with-field"===r.searchMode.searchMode?((e,t,o)=>{const n=Xi("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Dw({i18n:Fy.translate,placeholder:o.placeholder}),{dom:{tag:"div",classes:[...1===e?["tox-collection--list"]:["tox-collection--grid"],Mw],attributes:{id:n}},components:[Lw(e,t,Nw)]}]}})(n,o,r.searchMode):((e,t,o=!0)=>{const n=Xi("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",Mw].concat(1===e?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:n}},components:[Lw(e,t,Nw)]}})(n,o);if("color"===r.menuType){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[ev.parts.items({preprocess:"auto"!==e?Rw({tag:"div",classes:["tox-swatches__row"]},e):x})]}]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType&&"auto"===n){const t=Hw(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType||"searchable"===r.menuType){const t=s();return{value:e,dom:t.dom,components:t.components,items:o}}if("listpreview"===r.menuType&&"auto"!==n){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[ev.parts.items({preprocess:Rw({tag:"div",classes:["tox-collection__group"]},e)})]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}return{value:e,dom:fw(t,n,r.menuType),components:vw,items:o}},Vw=vr("type"),Zw=vr("name"),Uw=vr("label"),jw=vr("text"),Ww=vr("title"),$w=vr("icon"),qw=vr("value"),Gw=yr("fetch"),Kw=yr("getSubmenuItems"),Yw=yr("onAction"),Xw=yr("onItemAction"),Jw=Ir("onSetup",(()=>v)),Qw=Er("name"),ex=Er("text"),tx=Er("role"),ox=Er("icon"),nx=Er("tooltip"),rx=Er("label"),sx=Er("shortcut"),ax=Or("select"),ix=Hr("active",!1),lx=Hr("borderless",!1),cx=Hr("enabled",!0),dx=Hr("primary",!1),mx=e=>Mr("columns",e),ux=Mr("meta",{}),gx=Ir("onAction",v),hx=e=>Br("type",e),px=e=>mr("name","name",Tn((()=>Xi(`${e}-name`))),Yn),fx=Zn([Vw,ex]),vx=Zn([hx("autocompleteitem"),ix,cx,ux,qw,ex,ox]),bx=[cx,nx,ox,ex,Jw],yx=Zn([Vw,Yw,sx].concat(bx)),wx=e=>sr("toolbarbutton",yx,e),xx=[ix].concat(bx),Cx=Zn(xx.concat([Vw,Yw,sx])),Sx=e=>sr("ToggleButton",Cx,e),kx=[Ir("predicate",T),Lr("scope","node",["node","editor"]),Lr("position","selection",["node","selection","line"])],_x=bx.concat([hx("contextformbutton"),dx,Yw,ur("original",x)]),Ex=xx.concat([hx("contextformbutton"),dx,Yw,ur("original",x)]),Tx=bx.concat([hx("contextformbutton")]),Ox=xx.concat([hx("contextformtogglebutton")]),Ax=cr("type",{contextformbutton:_x,contextformtogglebutton:Ex}),Dx=Zn([hx("contextform"),Ir("initValue",w("")),rx,Cr("commands",Ax),kr("launch",cr("type",{contextformbutton:Tx,contextformtogglebutton:Ox}))].concat(kx)),Mx=Zn([hx("contexttoolbar"),vr("items")].concat(kx)),Nx=[Vw,vr("src"),Er("alt"),Pr("classes",[],Yn)],Rx=Zn(Nx),Bx=[Vw,jw,Qw,Pr("classes",["tox-collection__item-label"],Yn)],Lx=Zn(Bx),Hx=Fn((()=>or("type",{cardimage:Rx,cardtext:Lx,cardcontainer:Ix}))),Ix=Zn([Vw,Br("direction","horizontal"),Br("align","left"),Br("valign","middle"),Cr("items",Hx)]),Px=[cx,ex,tx,sx,(Fx="menuitem",mr("value","value",Tn((()=>Xi(`${Fx}-value`))),qn())),ux];var Fx;const zx=Zn([Vw,rx,Cr("items",Hx),Jw,gx].concat(Px)),Vx=Zn([Vw,ix,ox].concat(Px)),Zx=[Vw,vr("fancytype"),gx],Ux=[Mr("initData",{})].concat(Zx),jx=[Or("select"),Fr("initData",{},[Hr("allowCustomColors",!0),Br("storageKey","default"),Ar("colors",qn())])].concat(Zx),Wx=cr("fancytype",{inserttable:Ux,colorswatch:jx}),$x=Zn([Vw,Jw,gx,ox].concat(Px)),qx=Zn([Vw,Kw,Jw,ox].concat(Px)),Gx=Zn([Vw,ox,ix,Jw,Yw].concat(Px)),Kx=(e,t,o)=>{const n=sm(e.element,"."+o);if(n.length>0){const e=W(n,(e=>{const o=e.dom.getBoundingClientRect().top,r=n[0].dom.getBoundingClientRect().top;return Math.abs(o-r)>t})).getOr(n.length);return A.some({numColumns:e,numRows:Math.ceil(n.length/e)})}return A.none()},Yx=(e,t)=>Sa([bf(e,t)]),Xx=e=>Yx(Xi("unnamed-events"),e),Jx="silver.readonly",Qx=Zn([(eC="readonly",pr(eC,Xn))]);var eC;const tC=(e,t)=>{const o=e.mainUi.outerContainer.element,n=[e.mainUi.mothership,...e.uiMotherships];t&&F(n,(e=>{e.broadcastOn([uu()],{target:o})})),F(n,(e=>{e.broadcastOn([Jx],{readonly:t})}))},oC=(e,t)=>{e.on("init",(()=>{e.mode.isReadOnly()&&tC(t,!0)})),e.on("SwitchMode",(()=>tC(t,e.mode.isReadOnly()))),wv(e)&&e.mode.set("readonly")},nC=()=>Pc.config({channels:{[Jx]:{schema:Qx,onReceive:(e,t)=>{eh.set(e,t.readonly)}}}}),rC=e=>eh.config({disabled:e,disableClass:"tox-collection__item--state-disabled"}),sC=e=>eh.config({disabled:e}),aC=e=>eh.config({disabled:e,disableClass:"tox-tbtn--disabled"}),iC=e=>eh.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1}),lC=(e,t)=>{const o=e.getApi(t);return e=>{e(o)}},cC=(e,t)=>da((o=>{lC(e,o)((o=>{const n=e.onSetup(o);h(n)&&t.set(n)}))})),dC=(e,t)=>ma((o=>lC(e,o)(t.get()))),mC=(e,t)=>ga(((o,n)=>{lC(e,o)(e.onAction),e.triggersSubmenu||t!==ew.CLOSE_ON_EXECUTE||(o.getSystem().isConnected()&&qs(o,As()),n.stop())})),uC={[_s()]:["disabling","alloy.base.behaviour","toggling","item-events"]},gC=we,hC=(e,t,o,n)=>{const r=Qo(v);return{type:"item",dom:t.dom,components:gC(t.optComponents),data:e.data,eventOrder:uC,hasSubmenu:e.triggersSubmenu,itemBehaviours:Sa([bf("item-events",[mC(e,o),cC(e,r),dC(e,r)]),rC((()=>!e.enabled||n.isDisabled())),nC(),vf.config({})].concat(e.itemBehaviours))}},pC=e=>({value:e.value,meta:{text:e.text.getOr(""),...e.meta}}),fC=e=>{const t=fv.os.isMacOS()||fv.os.isiOS(),o=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=e.split("+"),r=P(n,(e=>{const t=e.toLowerCase().trim();return ve(o,t)?o[t]:e}));return t?r.join(""):r.join("+")},vC=(e,t,o=[aw])=>Gy(e,{tag:"div",classes:o},t),bC=e=>({dom:{tag:"div",classes:[iw]},components:[Hl(Fy.translate(e))]}),yC=(e,t)=>({dom:{tag:"div",classes:t,innerHtml:e}}),wC=(e,t)=>({dom:{tag:"div",classes:[iw]},components:[{dom:{tag:e.tag,styles:e.styles},components:[Hl(Fy.translate(t))]}]}),xC=e=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[Hl(fC(e))]}),CC=e=>vC("checkmark",e,["tox-collection__item-checkmark"]),SC=(e,t,o)=>{const n=e.value,r=e.iconContent.map((e=>((e,t,o)=>{const n=t();return jy(e,n).or(o).getOrThunk(Zy(n))})(e,t.icons,o))),s=e.ariaLabel.map((e=>({"aria-label":t.translate(e),"data-mce-name":e}))).getOr({});return{dom:(()=>{const e=nw,t=r.getOr(""),o={tag:"div",attributes:s,classes:[e]};return"custom"===n?{...o,tag:"button",classes:[...o.classes,"tox-swatches__picker-btn"],innerHtml:t}:"remove"===n?{...o,classes:[...o.classes,"tox-swatch--remove"],innerHtml:t}:g(n)?{...o,attributes:{...o.attributes,"data-mce-color":n},styles:{"background-color":n},innerHtml:t}:o})(),optComponents:[]}},kC=e=>{const t=e.map((e=>({attributes:{id:Xi("menu-item"),"aria-label":Fy.translate(e)}}))).getOr({});return{tag:"div",classes:[tw,ow],...t}},_C=(e,t,o,n=A.none())=>"color"===e.presets?SC(e,t,n):((e,t,o,n)=>{const r={tag:"div",classes:[aw]},s=o?e.iconContent.map((e=>Gy(e,r,t.icons,n))).orThunk((()=>A.some({dom:r}))):A.none(),a=e.checkMark,i=A.from(e.meta).fold((()=>bC),(e=>ve(e,"style")?S(wC,e.style):bC)),l=e.htmlContent.fold((()=>e.textContent.map(i)),(e=>A.some(yC(e,[iw]))));return{dom:kC(e.ariaLabel),optComponents:[s,l,e.shortcutContent.map(xC),a,e.caret]}})(e,t,o,n),EC=(e,t,o)=>fe(e,"tooltipWorker").map((e=>[Zb.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:e=>({type:"submenu",item:e,overrides:{maxHeightFunction:yd}}),mode:"follow-highlight",onShow:(t,o)=>{e((e=>{Zb.setComponents(t,[Il({element:Be.fromDom(e)})])}))}})])).getOrThunk((()=>o.map((e=>[Zb.config({...t.providers.tooltips.getConfig({tooltipText:e}),mode:"follow-highlight"})])).getOr([]))),TC=(e,t)=>{const o=(e=>hv.DOM.encode(e))(Fy.translate(e));if(t.length>0){const e=new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t),"gi");return o.replace(e,(e=>`${e}`))}return o},OC=(e,t)=>P(e,(e=>{switch(e.type){case"cardcontainer":return((e,t)=>{const o="vertical"===e.direction?"tox-collection__item-container--column":mw,n="left"===e.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[dw,o,n,(()=>{switch(e.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:t}})(e,OC(e.items,t));case"cardimage":return((e,t,o)=>({dom:{tag:"img",classes:t,attributes:{src:e,alt:o.getOr("")}}}))(e.src,e.classes,e.alt);case"cardtext":const o=e.name.exists((e=>B(t.cardText.highlightOn,e))),n=o?A.from(t.cardText.matchText).getOr(""):"";return yC(TC(e.text,n),e.classes)}})),AC=hg(qf(),Gf()),DC=e=>({value:BC(e)}),MC=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,NC=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,RC=e=>MC.test(e)||NC.test(e),BC=e=>_e(e,"#").toUpperCase(),LC=e=>{const t=(e=>{const t=e.value.replace(MC,((e,t,o,n)=>t+t+o+o+n+n));return{value:t}})(e),o=NC.exec(t.value);return null===o?["FFFFFF","FF","FF","FF"]:o},HC=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},IC=e=>{const t=HC(e.red)+HC(e.green)+HC(e.blue);return DC(t)},PC=Math.min,FC=Math.max,zC=Math.round,VC=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,ZC=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,UC=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),jC=e=>{const t=parseInt(e,10);return t.toString()===e&&t>=0&&t<=255},WC=e=>{let t,o,n;const r=(e.hue||0)%360;let s=e.saturation/100,a=e.value/100;if(s=FC(0,PC(s,1)),a=FC(0,PC(a,1)),0===s)return t=o=n=zC(255*a),UC(t,o,n,1);const i=r/60,l=a*s,c=l*(1-Math.abs(i%2-1)),d=a-l;switch(Math.floor(i)){case 0:t=l,o=c,n=0;break;case 1:t=c,o=l,n=0;break;case 2:t=0,o=l,n=c;break;case 3:t=0,o=c,n=l;break;case 4:t=c,o=0,n=l;break;case 5:t=l,o=0,n=c;break;default:t=o=n=0}return t=zC(255*(t+d)),o=zC(255*(o+d)),n=zC(255*(n+d)),UC(t,o,n,1)},$C=e=>{const t=LC(e),o=parseInt(t[1],16),n=parseInt(t[2],16),r=parseInt(t[3],16);return UC(o,n,r,1)},qC=(e,t,o,n)=>{const r=parseInt(e,10),s=parseInt(t,10),a=parseInt(o,10),i=parseFloat(n);return UC(r,s,a,i)},GC=e=>{const t=VC.exec(e);if(null!==t)return A.some(qC(t[1],t[2],t[3],"1"));const o=ZC.exec(e);return null!==o?A.some(qC(o[1],o[2],o[3],o[4])):A.none()},KC=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,YC=UC(255,0,0,1),XC=(e,t)=>{e.dispatch("ResizeContent",t)},JC=(e,t)=>{e.dispatch("TextColorChange",t)},QC=(e,t)=>e.dispatch("ResolveName",{name:t.nodeName.toLowerCase(),target:t}),eS=(e,t)=>()=>{e(),t()},tS=e=>nS(e,"NodeChange",(t=>{t.setEnabled(e.selection.isEditable())})),oS=(e,t)=>o=>{const n=tS(e)(o),r=((e,t)=>o=>{const n=tn(),r=()=>{o.setActive(e.formatter.match(t));const r=e.formatter.formatChanged(t,o.setActive);n.set(r)};return e.initialized?r():e.once("init",r),()=>{e.off("init",r),n.clear()}})(e,t)(o);return()=>{n(),r()}},nS=(e,t,o)=>n=>{const r=()=>o(n),s=()=>{o(n),e.on(t,r)};return e.initialized?s():e.once("init",s),()=>{e.off("init",s),e.off(t,r)}},rS=e=>t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))},sS=(e,t)=>()=>e.execCommand(t);var aS=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const iS={},lS=(e,t=10)=>{const o=aS.getItem(e),n=s(o)?JSON.parse(o):[],r=t-(a=n).length<0?a.slice(0,t):a;var a;const i=e=>{r.splice(e,1)};return{add:o=>{((e,t)=>{const o=R(e,t);return-1===o?A.none():A.some(o)})(r,o).each(i),r.unshift(o),r.length>t&&r.pop(),aS.setItem(e,JSON.stringify(r))},state:()=>r.slice(0)}},cS=e=>fe(iS,e).getOrThunk((()=>{const t=`tinymce-custom-colors-${e}`,o=aS.getItem(t);if(u(o)){const e=aS.getItem("tinymce-custom-colors");aS.setItem(t,g(e)?e:"[]")}const n=lS(t,10);return iS[e]=n,n})),dS=(e,t)=>{cS(e).add(t)},mS=(e,t,o)=>({hue:e,saturation:t,value:o}),uS=e=>{let t=0,o=0,n=0;const r=e.red/255,s=e.green/255,a=e.blue/255,i=Math.min(r,Math.min(s,a)),l=Math.max(r,Math.max(s,a));if(i===l)return n=i,mS(0,0,100*n);return t=r===i?3:a===i?1:5,t=60*(t-(r===i?s-a:a===i?r-s:a-r)/(l-i)),o=(l-i)/l,n=l,mS(Math.round(t),Math.round(100*o),Math.round(100*n))},gS=e=>IC(WC(e)),hS=e=>{return(t=e,RC(t)?A.some({value:BC(t)}):A.none()).orThunk((()=>GC(e).map(IC))).getOrThunk((()=>{const t=document.createElement("canvas");t.height=1,t.width=1;const o=t.getContext("2d");o.clearRect(0,0,t.width,t.height),o.fillStyle="#FFFFFF",o.fillStyle=e,o.fillRect(0,0,1,1);const n=o.getImageData(0,0,1,1).data,r=n[0],s=n[1],a=n[2],i=n[3];return IC(UC(r,s,a,i))}));var t},pS="forecolor",fS="hilitecolor",vS=e=>{const t=[];for(let o=0;o${Py(t.translate(e))}
`)}]}]}),CF=e=>lI.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e}),SF=(e,t)=>[Qk.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),Qk.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})],kF=e=>{const t="tox-dialog",o=t+"-wrap",n=o+"__backdrop",r=t+"__disable-scroll";return lI.sketch({lazySink:e.lazySink,onEscape:t=>(e.onEscape(t),A.some(!0)),useTabstopAt:e=>!QT(e),firstTabstop:e.firstTabstop,dom:{tag:"div",classes:[t].concat(e.extraClasses),styles:{position:"relative",...e.extraStyles}},components:[e.header,e.body,...e.footer.toArray()],parts:{blocker:{dom:Tb(``),components:[{dom:{tag:"div",classes:vF?[n,n+"--opaque"]:[n]}}]}},dragBlockClass:o,modalBehaviours:Sa([Sf.config({}),bf("dialog-events",e.dialogEvents.concat([ca(ls(),((e,t)=>{pN.isBlocked(e)||lf.focusIn(e)})),oa(zs(),((e,t)=>{e.getSystem().broadcastOn([sO],{newFocus:t.event.newFocus})}))])),bf("scroll-lock",[da((()=>{Ba(wt(),r)})),ma((()=>{Ha(wt(),r)}))]),...e.extraBehaviours]),eventOrder:{[_s()]:["dialog-events"],[Hs()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Is()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...e.eventOrder}})},_F=e=>Eb.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:Sa([Mb.config({}),Zb.config(e.tooltips.getConfig({tooltipText:e.translate("Close")}))]),components:[Gy("close",{tag:"span",classes:["tox-icon"]},e.icons)],action:e=>{qs(e,m_)}}),EF=(e,t,o,n)=>({dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...o.map((e=>({id:e}))).getOr({})}},components:[],behaviours:Sa([KP.config({channel:`${tO}-${t}`,initialData:e,renderComponents:e=>[Hl(n.translate(e.title))]})])}),TF=()=>({dom:Tb('')}),OF=(e,t,o)=>((e,t,o)=>{const n=lI.parts.title(EF(e,t,A.none(),o)),r=lI.parts.draghandle(TF()),s=lI.parts.close(_F(o)),a=[n].concat(e.draggable?[r]:[]).concat([s]);return Qk.sketch({dom:Tb(''),components:a})})({title:o.shared.providers.translate(e),draggable:o.dialog.isDraggableModal()},t,o.shared.providers),AF=(e,t,o,n)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":o.translate(e)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${n.getOr(0)}px`,position:"absolute"}},behaviours:t,components:[{dom:Tb('