Fe(e,"*:not(.tox-silver-sink)")))),c=qe(o);x(i,n("display:none!important;")),x(r,n(Ve+Ze+c)),n((!0===Ue?"":Ve)+Ze+c)(t)})(e.dom,i,u),f.width=f.height="100%",p.width=p.height="",y(We.addClass),$e.bind(i),e.on("remove",v),t.set(n),Ie(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(c),Le(e,!0)}var k},Ke=(e,t)=>o=>{o.setActive(null!==t.get());const n=e=>o.setActive(e.state);return e.on("FullscreenStateChanged",n),()=>e.off("FullscreenStateChanged",n)};t.add("fullscreen",(t=>{const o=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Ge(e,t)}))})(t,o),((e,t)=>{const o=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:o,onSetup:Ke(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:o,onSetup:Ke(e,t)})})(t,o),t.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(o)}))}()},82419:(e,t,o)=>{o(91884)},56398:()=>{tinymce.Resource.add("tinymce.html-i18n.help-keynav.de","Grundlagen der Tastaturnavigation
\n\n\n - Fokus auf Menüleiste
\n - Windows oder Linux: ALT+F9
\n - macOS: ⌥F9
\n - Fokus auf Symbolleiste
\n - Windows oder Linux: ALT+F10
\n - macOS: ⌥F10
\n - Fokus auf Fußzeile
\n - Windows oder Linux: ALT+F11
\n - macOS: ⌥F11
\n - Fokus auf kontextbezogene Symbolleiste
\n - Windows, Linux oder macOS: STRG+F9\n
\n\nDie Navigation beginnt beim ersten Benutzeroberflächenelement, welches hervorgehoben ist. Falls sich das erste Element im Pfad der Fußzeile befindet,\n ist es unterstrichen.
\n\nZwischen Abschnitten der Benutzeroberfläche navigieren
\n\nUm von einem Abschnitt der Benutzeroberfläche zum nächsten zu wechseln, drücken Sie TAB.
\n\nUm von einem Abschnitt der Benutzeroberfläche zum vorherigen zu wechseln, drücken Sie UMSCHALT+TAB.
\n\nDie Abschnitte der Benutzeroberfläche haben folgende TAB-Reihenfolge:\n\n
\n - Menüleiste
\n - Einzelne Gruppen der Symbolleiste
\n - Randleiste
\n - Elementpfad in der Fußzeile
\n - Umschaltfläche „Wörter zählen“ in der Fußzeile
\n - Branding-Link in der Fußzeile
\n - Editor-Ziehpunkt zur Größenänderung in der Fußzeile
\n
\n\nFalls ein Abschnitt der Benutzeroberflächen nicht vorhanden ist, wird er übersprungen.
\n\nWenn in der Fußzeile die Tastaturnavigation fokussiert ist und keine Randleiste angezeigt wird, wechselt der Fokus durch Drücken von UMSCHALT+TAB\n zur ersten Gruppe der Symbolleiste, nicht zur letzten.\n\n
Innerhalb von Abschnitten der Benutzeroberfläche navigieren
\n\nUm von einem Element der Benutzeroberfläche zum nächsten zu wechseln, drücken Sie die entsprechende Pfeiltaste.
\n\nDie Pfeiltasten Links und Rechts
\n\n\n - wechseln zwischen Menüs in der Menüleiste.
\n - öffnen das Untermenü eines Menüs.
\n - wechseln zwischen Schaltflächen in einer Gruppe der Symbolleiste.
\n - wechseln zwischen Elementen im Elementpfad der Fußzeile.
\n
\n\nDie Pfeiltasten Abwärts und Aufwärts\n\n
\n - wechseln zwischen Menüelementen in einem Menü.
\n - wechseln zwischen Elementen in einem Popupmenü der Symbolleiste.
\n
\n\nDie Pfeiltasten rotieren innerhalb des fokussierten Abschnitts der Benutzeroberfläche.
\n\nUm ein geöffnetes Menü, ein geöffnetes Untermenü oder ein geöffnetes Popupmenü zu schließen, drücken Sie die ESC-Taste.\n\n
Wenn sich der aktuelle Fokus ganz oben in einem bestimmten Abschnitt der Benutzeroberfläche befindet, wird durch Drücken der ESC-Taste auch\n die Tastaturnavigation beendet.
\n\nEin Menüelement oder eine Symbolleistenschaltfläche ausführen
\n\nWenn das gewünschte Menüelement oder die gewünschte Symbolleistenschaltfläche hervorgehoben ist, drücken Sie Zurück, Eingabe\n oder die Leertaste, um das Element auszuführen.\n\n
In Dialogfeldern ohne Registerkarten navigieren
\n\nIn Dialogfeldern ohne Registerkarten ist beim Öffnen eines Dialogfelds die erste interaktive Komponente fokussiert.
\n\nNavigieren Sie zwischen den interaktiven Komponenten eines Dialogfelds, indem Sie TAB oder UMSCHALT+TAB drücken.
\n\nIn Dialogfeldern mit Registerkarten navigieren
\n\nIn Dialogfeldern mit Registerkarten ist beim Öffnen eines Dialogfelds die erste Schaltfläche eines Registerkartenmenüs fokussiert.
\n\nNavigieren Sie zwischen den interaktiven Komponenten auf dieser Registerkarte des Dialogfelds, indem Sie TAB oder\n UMSCHALT+TAB drücken.
\n\nWechseln Sie zu einer anderen Registerkarte des Dialogfelds, indem Sie den Fokus auf das Registerkartenmenü legen und dann die entsprechende Pfeiltaste\n drücken, um durch die verfügbaren Registerkarten zu rotieren.
\n")},96480:()=>{tinymce.Resource.add("tinymce.html-i18n.help-keynav.en","Begin keyboard navigation
\n\n\n - Focus the Menu bar
\n - Windows or Linux: Alt+F9
\n - macOS: ⌥F9
\n - Focus the Toolbar
\n - Windows or Linux: Alt+F10
\n - macOS: ⌥F10
\n - Focus the footer
\n - Windows or Linux: Alt+F11
\n - macOS: ⌥F11
\n - Focus a contextual toolbar
\n - Windows, Linux or macOS: Ctrl+F9\n
\n\nNavigation will start at the first UI item, which will be highlighted, or underlined in the case of the first item in\n the Footer element path.
\n\nNavigate between UI sections
\n\nTo move from one UI section to the next, press Tab.
\n\nTo move from one UI section to the previous, press Shift+Tab.
\n\nThe Tab order of these UI sections is:\n\n
\n - Menu bar
\n - Each toolbar group
\n - Sidebar
\n - Element path in the footer
\n - Word count toggle button in the footer
\n - Branding link in the footer
\n - Editor resize handle in the footer
\n
\n\nIf a UI section is not present, it is skipped.
\n\nIf the footer has keyboard navigation focus, and there is no visible sidebar, pressing Shift+Tab\n moves focus to the first toolbar group, not the last.\n\n
Navigate within UI sections
\n\nTo move from one UI element to the next, press the appropriate Arrow key.
\n\nThe Left and Right arrow keys
\n\n\n - move between menus in the menu bar.
\n - open a sub-menu in a menu.
\n - move between buttons in a toolbar group.
\n - move between items in the footer’s element path.
\n
\n\nThe Down and Up arrow keys\n\n
\n - move between menu items in a menu.
\n - move between items in a toolbar pop-up menu.
\n
\n\nArrow keys cycle within the focused UI section.
\n\nTo close an open menu, an open sub-menu, or an open pop-up menu, press the Esc key.\n\n
If the current focus is at the ‘top’ of a particular UI section, pressing the Esc key also exits\n keyboard navigation entirely.
\n\nExecute a menu item or toolbar button
\n\nWhen the desired menu item or toolbar button is highlighted, press Return, Enter,\n or the Space bar to execute the item.\n\n
Navigate non-tabbed dialogs
\n\nIn non-tabbed dialogs, the first interactive component takes focus when the dialog opens.
\n\nNavigate between interactive dialog components by pressing Tab or Shift+Tab.
\n\nNavigate tabbed dialogs
\n\nIn tabbed dialogs, the first button in the tab menu takes focus when the dialog opens.
\n\nNavigate between interactive components of this dialog tab by pressing Tab or\n Shift+Tab.
\n\nSwitch to another dialog tab by giving the tab menu focus and then pressing the appropriate Arrow\n key to cycle through the available tabs.
\n")},70081:()=>{tinymce.Resource.add("tinymce.html-i18n.help-keynav.zh_CN","开始键盘导航
\n\n\n - 聚焦于菜单栏
\n - Windows 或 Linux:Alt+F9
\n - macOS:⌥F9
\n - 聚焦于工具栏
\n - Windows 或 Linux:Alt+F10
\n - macOS:⌥F10
\n - 聚焦于页脚
\n - Windows 或 Linux:Alt+F11
\n - macOS:⌥F11
\n - 聚焦于上下文工具栏
\n - Windows、Linux 或 macOS:Ctrl+F9\n
\n\n导航将在第一个 UI 项上开始,其中突出显示该项,或者对于页脚元素路径中的第一项,将为其添加下划线。
\n\n在 UI 部分之间导航
\n\n要从一个 UI 部分移至下一个,请按 Tab。
\n\n要从一个 UI 部分移至上一个,请按 Shift+Tab。
\n\n这些 UI 部分的 Tab 顺序为:\n\n
\n - 菜单栏
\n - 每个工具栏组
\n - 边栏
\n - 页脚中的元素路径
\n - 页脚中的字数切换按钮
\n - 页脚中的品牌链接
\n - 页脚中的编辑器调整大小图柄
\n
\n\n如果不存在某个 UI 部分,则跳过它。
\n\n如果键盘导航焦点在页脚,并且没有可见的边栏,则按 Shift+Tab 将焦点移至第一个工具栏组而非最后一个。\n\n
在 UI 部分内导航
\n\n要从一个 UI 元素移至下一个,请按相应的箭头键。
\n\n左和右箭头键
\n\n\n - 在菜单栏中的菜单之间移动。
\n - 打开菜单中的子菜单。
\n - 在工具栏组中的按钮之间移动。
\n - 在页脚的元素路径中的各项之间移动。
\n
\n\n下和上箭头键\n\n
\n - 在菜单中的菜单项之间移动。
\n - 在工具栏弹出菜单中的各项之间移动。
\n
\n\n箭头键在具有焦点的 UI 部分内循环。
\n\n要关闭打开的菜单、打开的子菜单或打开的弹出菜单,请按 Esc 键。\n\n
如果当前的焦点在特定 UI 部分的“顶部”,则按 Esc 键还将完全退出键盘导航。
\n\n执行菜单项或工具栏按钮
\n\n当突出显示所需的菜单项或工具栏按钮时,按 Return、Enter 或空格以执行该项。\n\n
在非标签页式对话框中导航
\n\n在非标签页式对话框中,当对话框打开时,第一个交互组件获得焦点。
\n\n通过按 Tab 或 Shift+Tab,在交互对话框组件之间导航。
\n\n在标签页式对话框中导航
\n\n在标签页式对话框中,当对话框打开时,标签页菜单中的第一个按钮获得焦点。
\n\n通过按 Tab 或 Shift+Tab,在此对话框的交互组件之间导航。
\n\n通过将焦点移至另一对话框标签页的菜单,然后按相应的箭头键以在可用的标签页间循环,从而切换到该对话框标签页。
\n")},91884:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const o=e=>{const o=(new Date).getTime(),n=Math.floor(1e9*Math.random());return t++,e+"_"+n+t+String(o)},n=e=>t=>t.options.get(e),r=n("help_tabs"),a=n("forced_plugins"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(e));const i=(void 0,e=>undefined===e);const l=e=>"function"==typeof e,c=(!1,()=>false);class d{constructor(e,t){this.tag=e,this.value=t}static some(e){return new d(!0,e)}static none(){return d.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?d.some(e(this.value)):d.none()}bind(e){return this.tag?e(this.value):d.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:d.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?d.none():d.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}d.singletonNone=new d(!1);const u=Array.prototype.slice,m=Array.prototype.indexOf,g=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r{const o=[];for(let n=0,r=e.length;n{const o=u.call(e,0);return o.sort(t),o},f=Object.keys,y=Object.hasOwnProperty,b=(e,t)=>y.call(e,t);var v=tinymce.util.Tools.resolve("tinymce.Resource"),k=tinymce.util.Tools.resolve("tinymce.util.I18n");const w=(e,t)=>v.load(`tinymce.html-i18n.help-keynav.${t}`,`${e}/js/i18n/keynav/${t}.js`),_=e=>w(e,k.getCode()).catch((()=>w(e,"en")));var x=tinymce.util.Tools.resolve("tinymce.Env");const C=e=>{const t=x.os.isMacOS()||x.os.isiOS(),o=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},n=e.split("+"),r=g(n,(e=>{const t=e.toLowerCase().trim();return b(o,t)?o[t]:e}));return t?r.join("").replace(/\s/,""):r.join("+")},S=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],z=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:g(S,(e=>{const t=g(e.shortcuts,C).join(" or ");return[e.action,t]}))}]}),O=g([{key:"accordion",name:"Accordion"},{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"advtemplate",name:"Advanced Templates",type:"premium",slug:"advanced-templates"},{key:"ai",name:"AI Assistant",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"typography",name:"Advanced Typography",type:"premium",slug:"advanced-typography"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"inlinecss",name:"Inline CSS",type:"premium",slug:"inline-css"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tableofcontents",name:"Table of Contents",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),E=e=>{const t=e=>`${e.name}`,o=(e,o)=>{return(n=O,r=e=>e.key===o,((e,t,o)=>{for(let n=0,r=e.length;n((e,o)=>{const n=e.plugins[o].getMetadata;if(l(n)){const e=n();return{name:e.name,html:t(e)}}return{name:o,html:o}})(e,o)),(e=>{const o="premium"===e.type?`${e.name}*`:e.name;return{name:o,html:t({name:o,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}}));var n,r},n=e=>{const t=(e=>{const t=f(e.plugins),o=a(e);return i(o)?t:p(t,(e=>!(((e,t)=>m.call(e,t))(o,e)>-1)))})(e),n=h(g(t,(t=>o(e,t))),((e,t)=>e.name.localeCompare(t.name))),r=g(n,(e=>""+e.html+"")),s=r.length,l=r.join("");return""+k.translate(["Plugins installed ({0}):",s])+"
"},r={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":""+n(e)+"
")(e),(()=>{const e=p(O,(({type:e})=>"premium"===e)),t=h(g(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),o=g(t,(e=>`${e}`)).join("");return""+k.translate("Premium plugins:")+"
"})()].join("")};return{name:"plugins",title:"Plugins",items:[r]}};var T=tinymce.util.Tools.resolve("tinymce.EditorManager");const A=(e,t,n)=>()=>{(async(e,t,n)=>{const a=z(),i=await(async e=>({name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:await _(e)}]}))(n),l=E(e),c=(()=>{var e,t;const o='TinyMCE '+(e=T.majorVersion,t=T.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:""+k.translate(["You are using {0}",o])+"
",presets:"document"}]}})(),u={[a.name]:a,[i.name]:i,[l.name]:l,[c.name]:c,...t.get()};return d.from(r(e)).fold((()=>(e=>{const t=f(e),o=t.indexOf("versions");return-1!==o&&(t.splice(o,1),t.push("versions")),{tabs:e,names:t}})(u)),(e=>((e,t)=>{const n={},r=g(e,(e=>{var r;if(s(e))return b(t,e)&&(n[e]=t[e]),e;{const t=null!==(r=e.name)&&void 0!==r?r:o("tab-name");return n[t]=e,t}}));return{tabs:n,names:r}})(e,u)))})(e,t,n).then((({tabs:t,names:o})=>{const n={type:"tabpanel",tabs:(e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t{return b(o=t,n=e)?d.from(o[n]):d.none();var o,n})))};e.windowManager.open({title:"Help",size:"medium",body:n,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}))};e.add("help",((e,t)=>{const n=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),r=(e=>({addTab:t=>{var n;const r=null!==(n=t.name)&&void 0!==n?n:o("tab-name"),a=e.get();a[r]=t,e.set(a)}}))(n);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const a=A(e,n,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,a),((e,t)=>{e.addCommand("mceHelp",t)})(e,a),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),((e,t)=>{e.on("init",(()=>{_(t)}))})(e,t),r}))}()},55552:(e,t,o)=>{o(72004)},72004:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,o=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&o(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,r=e=>t=>typeof t===e,a=n("string"),s=n("object"),i=e=>((e,n)=>s(e)&&o(e,n,((e,o)=>t(e)===o)))(e,Object),l=n("array"),c=(null,e=>null===e);const d=r("boolean"),u=e=>!(e=>null==e)(e),m=r("function"),g=r("number"),p=()=>{};class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return u(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const f=Object.keys,y=Object.hasOwnProperty,b=(e,t)=>y.call(e,t),v=Array.prototype.push,k=e=>{const t=[];for(let o=0,n=e.length;o{((e,t,o)=>{if(!(a(o)||d(o)||g(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)},_=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},x=_;var C=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S=tinymce.util.Tools.resolve("tinymce.util.URI");const z=e=>e.length>0,O=e=>t=>t.options.get(e),E=O("image_dimensions"),T=O("image_advtab"),A=O("image_uploadtab"),M=O("image_prepend_url"),N=O("image_class_list"),R=O("image_description"),D=O("image_title"),B=O("image_caption"),L=O("image_list"),I=O("a11y_advanced_options"),H=O("automatic_uploads"),P=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),j=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),V=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),Z=(e,t)=>{const o=e.options.get;return S.isDomSafe(t,"img",{allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")})},U=C.DOM,q=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",W=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",$=e=>e.style.borderWidth?F(e.style.borderWidth):"",G=(e,t)=>{var o;return e.hasAttribute(t)&&null!==(o=e.getAttribute(t))&&void 0!==o?o:""},K=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,Y=(e,t,o)=>{""===o||null===o?e.removeAttribute(t):e.setAttribute(t,o)},X=(e,t)=>{const o=e.getAttribute("style"),n=t(null!==o?o:"");n.length>0?(e.setAttribute("style",n),e.setAttribute("data-mce-style",n)):e.removeAttribute("style")},J=(e,t)=>(e,o,n)=>{const r=e.style;r[o]?(r[o]=j(n),X(e,t)):Y(e,o,n)},Q=(e,t)=>e.style[t]?F(e.style[t]):G(e,t),ee=(e,t)=>{const o=j(t);e.style.marginLeft=o,e.style.marginRight=o},te=(e,t)=>{const o=j(t);e.style.marginTop=o,e.style.marginBottom=o},oe=(e,t)=>{const o=j(t);e.style.borderWidth=o},ne=(e,t)=>{e.style.borderStyle=t},re=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},ae=e=>u(e)&&"FIGURE"===e.nodeName,se=e=>0===U.getAttrib(e,"alt").length&&"presentation"===U.getAttrib(e,"role"),ie=e=>se(e)?"":G(e,"alt"),le=(e,t)=>{var o;const n=document.createElement("img");return Y(n,"style",t.style),(q(n)||""!==t.hspace)&&ee(n,t.hspace),(W(n)||""!==t.vspace)&&te(n,t.vspace),($(n)||""!==t.border)&&oe(n,t.border),(re(n)||""!==t.borderStyle)&&ne(n,t.borderStyle),e(null!==(o=n.getAttribute("style"))&&void 0!==o?o:"")},ce=(e,t)=>({src:G(t,"src"),alt:ie(t),title:G(t,"title"),width:Q(t,"width"),height:Q(t,"height"),class:G(t,"class"),style:e(G(t,"style")),caption:K(t),hspace:q(t),vspace:W(t),border:$(t),borderStyle:re(t),isDecorative:se(t)}),de=(e,t,o,n,r)=>{o[n]!==t[n]&&r(e,n,String(o[n]))},ue=(e,t,o)=>{if(o){U.setAttrib(e,"role","presentation");const t=x(e);w(t,"alt","")}else{if(c(t)){"alt",x(e).dom.removeAttribute("alt")}else{const o=x(e);w(o,"alt",t)}"presentation"===U.getAttrib(e,"role")&&U.setAttrib(e,"role","")}},me=(e,t)=>(o,n,r)=>{e(o,r),X(o,t)},ge=(e,t,o)=>{const n=ce(e,o);de(o,n,t,"caption",((e,t,o)=>(e=>{K(e)?(e=>{const t=e.parentNode;u(t)&&(U.insertAfter(e,t),U.remove(t))})(e):(e=>{const t=U.create("figure",{class:"image"});U.insertAfter(t,e),t.appendChild(e),t.appendChild(U.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),de(o,n,t,"src",Y),de(o,n,t,"title",Y),de(o,n,t,"width",J(0,e)),de(o,n,t,"height",J(0,e)),de(o,n,t,"class",Y),de(o,n,t,"style",me(((e,t)=>Y(e,"style",t)),e)),de(o,n,t,"hspace",me(ee,e)),de(o,n,t,"vspace",me(te,e)),de(o,n,t,"border",me(oe,e)),de(o,n,t,"borderStyle",me(ne,e)),((e,t,o)=>{o.alt===t.alt&&o.isDecorative===t.isDecorative||ue(e,o.alt,o.isDecorative)})(o,n,t)},pe=(e,t)=>{const o=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),n=e.dom.styles.parse(e.dom.styles.serialize(o));return e.dom.styles.serialize(n)},he=e=>{const t=e.selection.getNode(),o=e.dom.getParent(t,"figure.image");return o?e.dom.select("img",o)[0]:t&&("IMG"!==t.nodeName||V(t))?null:t},fe=(e,t)=>{var o;const n=e.dom,r=((t,o)=>{const n={};var r;return((e,t,o,n)=>{((e,t)=>{const o=f(e);for(let n=0,r=o.length;n{(t(e,r)?o:n)(e,r)}))})(t,((t,o)=>!e.schema.isValidChild(o,"figure")),(r=n,(e,t)=>{r[t]=e}),p),n})(e.schema.getTextBlockElements()),a=n.getParent(t.parentNode,(e=>{return t=r,o=e.nodeName,b(t,o)&&void 0!==t[o]&&null!==t[o];var t,o}),e.getBody());return a&&null!==(o=n.split(a,t))&&void 0!==o?o:t},ye=(e,t)=>{const o=((t,o)=>{const n=document.createElement("img");if(ge((t=>pe(e,t)),{...o,caption:!1},n),ue(n,o.alt,o.isDecorative),o.caption){const e=U.create("figure",{class:"image"});return e.appendChild(n),e.appendChild(U.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return n})(0,t);e.dom.setAttrib(o,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(o.outerHTML);const n=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(n,"data-mce-id",null),ae(n)){const t=fe(e,n);e.selection.select(t)}else e.selection.select(n)},be=(e,t)=>{const o=he(e);if(o){const n={...ce((t=>pe(e,t)),o),...t},r=((e,t)=>{const o=t.src;return{...t,src:Z(e,o)?o:""}})(e,n);n.src?((e,t)=>{const o=he(e);if(o)if(ge((t=>pe(e,t)),t,o),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,o),ae(o.parentNode)){const t=o.parentNode;fe(e,t),e.selection.select(o.parentNode)}else e.selection.select(o),((e,t,o)=>{const n=()=>{o.onload=o.onerror=null,e.selection&&(e.selection.select(o),e.nodeChanged())};o.onload=()=>{t.width||t.height||!E(e)||e.dom.setAttribs(o,{width:String(o.clientWidth),height:String(o.clientHeight)}),n()},o.onerror=n})(e,t,o)})(e,r):((e,t)=>{if(t){const o=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(o),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,o)}else t.src&&ye(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})},ve=(ke=(e,t)=>i(e)&&i(t)?ve(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let o=0;oa(e.value)?e.value:"",Ce=(e,t)=>{const o=[];return _e.each(e,(e=>{const n=(e=>a(e.text)?e.text:a(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=Ce(e.menu,t);o.push({text:n,items:r})}else{const r=t(e);o.push({text:n,value:r})}})),o},Se=(e=xe)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),ze=(e,t)=>((e,o)=>{for(let o=0;ob(e,"items"))(n=e[o])?ze(n.items,t):n.value===t?h.some(n):h.none();if(r.isSome())return r}var n;return h.none()})(e),Oe=Se,Ee=(e,t)=>e.bind((e=>ze(e,t))),Te=e=>{const t=Oe((t=>e.convertURL(t.value||t.url||"","src"))),o=new Promise((o=>{((e,t)=>{const o=L(e);a(o)?fetch(o).then((e=>{e.ok&&e.json().then(t)})):m(o)?o(t):t(o)})(e,(e=>{o(t(e).map((e=>k([[{text:"None",value:""}],e]))))}))})),n=(w=N(e),Se(xe)(w)),r=T(e),s=A(e),i=(e=>z(e.options.get("images_upload_url")))(e),l=(e=>u(e.options.get("images_upload_handler")))(e),c=(e=>{const t=he(e);return t?ce((t=>pe(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),d=R(e),g=D(e),p=E(e),f=B(e),y=I(e),b=H(e),v=h.some(M(e)).filter((e=>a(e)&&e.length>0));var w;return o.then((e=>({image:c,imageList:e,classList:n,hasAdvTab:r,hasUploadTab:s,hasUploadUrl:i,hasUploadHandler:l,hasDescription:d,hasImageTitle:g,hasDimensions:p,hasImageCaption:f,prependURL:v,hasAccessibilityOptions:y,automaticUploads:b})))},Ae=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),o={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},n=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return k([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[o]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(r=e.classList.isSome()&&e.hasImageCaption,r?{type:"grid",columns:2}:{type:"panel"}),items:k([n.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var r},Me=e=>({title:"General",name:"general",items:Ae(e)}),Ne=Ae,Re=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),De=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Be=(e,t,o,n)=>{((e,t)=>{const o=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,o.src.value).each((e=>{t.setData({src:{value:e,meta:o.src.meta}})}))})(t,n),((e,t)=>{const o=t.getData(),n=o.src.meta;if(void 0!==n){const r=ve({},o);((e,t,o)=>{e.hasDescription&&a(o.alt)&&(t.alt=o.alt),e.hasAccessibilityOptions&&(t.isDecorative=o.isDecorative||t.isDecorative||!1),e.hasImageTitle&&a(o.title)&&(t.title=o.title),e.hasDimensions&&(a(o.width)&&(t.dimensions.width=o.width),a(o.height)&&(t.dimensions.height=o.height)),a(o.class)&&Ee(e.classList,o.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&d(o.caption)&&(t.caption=o.caption),e.hasAdvTab&&(a(o.style)&&(t.style=o.style),a(o.vspace)&&(t.vspace=o.vspace),a(o.border)&&(t.border=o.border),a(o.hspace)&&(t.hspace=o.hspace),a(o.borderstyle)&&(t.borderstyle=o.borderstyle))})(e,r,n),t.setData(r)}})(t,n),((e,t,o,n)=>{const r=n.getData(),a=r.src.value,s=r.src.meta||{};s.width||s.height||!t.hasDimensions||(z(a)?e.imageSize(a).then((e=>{o.open&&n.setData({dimensions:e})})).catch((e=>console.error(e))):n.setData({dimensions:{width:"",height:""}}))})(e,t,o,n),((e,t,o)=>{const n=o.getData(),r=Ee(e.imageList,n.src.value);t.prevImage=r,o.setData({images:r.map((e=>e.value)).getOr("")})})(t,o,n)},Le=(e,t,o,n)=>{const r=n.getData();var a;n.block("Uploading image"),(a=r.fileinput,((e,t)=>0{n.unblock()}),(r=>{const a=URL.createObjectURL(r),s=()=>{n.unblock(),URL.revokeObjectURL(a)},i=r=>{n.setData({src:{value:r,meta:{}}}),n.showTab("general"),Be(e,t,o,n)};var l;(l=r,new Promise(((e,t)=>{const o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{var e;t(null===(e=o.error)||void 0===e?void 0:e.message)},o.readAsDataURL(l)}))).then((o=>{const l=e.createBlobCache(r,a,o);t.automaticUploads?e.uploadImage(l).then((e=>{i(e.url),s()})).catch((t=>{s(),e.alertErr(t)})):(e.addToBlobCache(l),i(l.blobUri()),n.unblock())}))}))},Ie=(e,t,o)=>(n,r)=>{"src"===r.name?Be(e,t,o,n):"images"===r.name?((e,t,o,n)=>{const r=n.getData(),a=Ee(t.imageList,r.images);a.each((e=>{const t=""===r.alt||o.prevImage.map((e=>e.text===r.alt)).getOr(!1);t?""===e.value?n.setData({src:e,alt:o.prevAlt}):n.setData({src:e,alt:e.text}):n.setData({src:e})})),o.prevImage=a,Be(e,t,o,n)})(e,t,o,n):"alt"===r.name?o.prevAlt=n.getData().alt:"fileinput"===r.name?Le(e,t,o,n):"isDecorative"===r.name&&n.setEnabled("alt",!n.getData().isDecorative)},He=e=>()=>{e.open=!1},Pe=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:k([[Me(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Ne(e)},Fe=(e,t,o)=>n=>{const r=ve(Re(t.image),n.getData()),a={...r,style:le(o.normalizeCss,De(r,!1))};e.execCommand("mceUpdateImage",!1,De(a,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),n.close()},je=e=>t=>Z(e,t)?(e=>new Promise((t=>{const o=document.createElement("img"),n=e=>{o.onload=o.onerror=null,o.parentNode&&o.parentNode.removeChild(o),t(e)};o.onload=()=>{const e={width:P(o.width,o.clientWidth),height:P(o.height,o.clientHeight)};n(Promise.resolve(e))},o.onerror=()=>{n(Promise.reject(`Failed to get image dimensions for: ${e}`))};const r=o.style;r.visibility="hidden",r.position="fixed",r.bottom=r.left="0px",r.width=r.height="auto",document.body.appendChild(o),o.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Ve=e=>(t,o,n)=>{var r;return e.editorUpload.blobCache.create({blob:t,blobUri:o,name:null===(r=t.name)||void 0===r?void 0:r.replace(/\.[^\.]+$/,""),filename:t.name,base64:n.split(",")[1]})},Ze=e=>t=>{e.editorUpload.blobCache.add(t)},Ue=e=>t=>{e.windowManager.alert(t)},qe=e=>t=>pe(e,t),We=e=>t=>e.dom.parseStyle(t),$e=e=>(t,o)=>e.dom.serializeStyle(t,o),Ge=e=>t=>we(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),Ke=e=>{const t={imageSize:je(e),addToBlobCache:Ze(e),createBlobCache:Ve(e),alertErr:Ue(e),normalizeCss:qe(e),parseStyle:We(e),serializeStyle:$e(e),uploadImage:Ge(e)};return{open:()=>{Te(e).then((o=>{const n=(e=>({prevImage:Ee(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(o);return{title:"Insert/Edit Image",size:"normal",body:Pe(o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Re(o.image),onSubmit:Fe(e,o,t),onChange:Ie(t,o,n),onClose:He(n)}})).then(e.windowManager.open)}}},Ye=e=>{const t=e.attr("class");return u(t)&&/\bimage\b/.test(t)},Xe=e=>t=>{let o=t.length;const n=t=>{t.attr("contenteditable",e?"true":null)};for(;o--;){const r=t[o];Ye(r)&&(r.attr("contenteditable",e?"false":null),_e.each(r.getAll("figcaption"),n))}},Je=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||a(e)||((e,t)=>{if(l(e)){for(let o=0,n=e.length;o{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Xe(!0)),e.serializer.addNodeFilter("figure",Xe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Ke(e).open,onSetup:t=>{t.setActive(u(he(e)));const o=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,n=Je(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Ke(e).open,onSetup:Je(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(ae(t)||"IMG"===t.nodeName&&!V(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",Ke(e).open),e.addCommand("mceUpdateImage",((t,o)=>{e.undoManager.transact((()=>be(e,o)))}))})(e)}))}()},65500:(e,t,o)=>{o(92076)},92076:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),o=t("insertdatetime_dateformat"),n=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),a=t("insertdatetime_element"),s="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" "),d=(e,t)=>{if((e=""+e).length(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+o.getFullYear())).replace("%y",""+o.getYear())).replace("%m",d(o.getMonth()+1,2))).replace("%d",d(o.getDate(),2))).replace("%H",""+d(o.getHours(),2))).replace("%M",""+d(o.getMinutes(),2))).replace("%S",""+d(o.getSeconds(),2))).replace("%I",""+((o.getHours()+11)%12+1))).replace("%p",o.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[o.getMonth()]))).replace("%b",""+e.translate(l[o.getMonth()]))).replace("%A",""+e.translate(i[o.getDay()]))).replace("%a",""+e.translate(s[o.getDay()]))).replace("%%","%"),m=(e,t)=>{if(a(e)){const o=u(e,t);let n;n=/%[HMSIp]/.test(t)?u(e,"%Y-%m-%dT%H:%M"):u(e,"%Y-%m-%d");const r=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,o,n)=>{const r=e.dom.create("time",{datetime:o},n);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,n,o):e.insertContent('")}else e.insertContent(u(e,t))};var g=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,n)=>{m(e,null!=n?n:o(e))})),e.addCommand("mceInsertTime",((t,o)=>{m(e,null!=o?o:n(e))}))})(e),(e=>{const t=r(e),o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=r(e);return t.length>0?t[0]:n(e)})(e)),a=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===o.get(),fetch:o=>{o(g.map(t,(t=>({type:"choiceitem",text:u(e,t),value:t}))))},onAction:e=>{a(o.get())},onItemAction:(e,t)=>{o.set(t),a(t)},onSetup:p(e)});const s=e=>()=>{o.set(e),a(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>g.map(t,(t=>({type:"menuitem",text:u(e,t),onAction:s(t)}))),onSetup:p(e)})})(e)}))}()},80450:(e,t,o)=>{o(5e4)},5e4:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=t("array"),s=(null,e=>null===e);const i=o("boolean"),l=e=>!(e=>null==e)(e),c=o("function"),d=(e,t)=>{if(a(e)){for(let o=0,n=e.length;o{},m=(e,t)=>e===t;class g{constructor(e,t){this.tag=e,this.value=t}static some(e){return new g(!0,e)}static none(){return g.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?g.some(e(this.value)):g.none()}bind(e){return this.tag?e(this.value):g.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:g.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return l(e)?g.some(e):g.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(!1);const p=Array.prototype.indexOf,h=Array.prototype.push,f=e=>{const t=[];for(let o=0,n=e.length;o{for(let o=0;oe.exists((e=>o(e,t))),v=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;te?g.some(t):g.none(),w=e=>t=>t.options.get(e),_=w("link_assume_external_targets"),x=w("link_context_toolbar"),C=w("link_list"),S=w("link_default_target"),z=w("link_default_protocol"),O=w("link_target_list"),E=w("link_rel_list"),T=w("link_class_list"),A=w("link_title"),M=w("allow_unsafe_link_target"),N=w("link_quicklink");var R=tinymce.util.Tools.resolve("tinymce.util.Tools");const D=e=>n(e.value)?e.value:"",B=(e,t)=>{const o=[];return R.each(e,(e=>{const r=(e=>n(e.text)?e.text:n(e.title)?e.title:"")(e);if(void 0!==e.menu){const n=B(e.menu,t);o.push({text:r,items:n})}else{const n=t(e);o.push({text:r,value:n})}})),o},L=(e=D)=>t=>g.from(t).map((t=>B(t,e))),I=e=>L(D)(e),H=L,P=(e,t)=>o=>({name:e,type:"listbox",label:t,items:o}),F=D,j=Object.keys,V=Object.hasOwnProperty,Z=(e,t)=>V.call(e,t);var U=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),q=tinymce.util.Tools.resolve("tinymce.util.URI");const W=e=>l(e)&&"a"===e.nodeName.toLowerCase(),$=e=>W(e)&&!!Y(e),G=(e,t)=>{if(e.collapsed)return[];{const o=e.cloneContents(),n=o.firstChild,r=new U(n,o),a=[];let s=n;do{t(s)&&a.push(s)}while(s=r.next());return a}},K=e=>/^\w+:/i.test(e),Y=e=>{var t,o;return null!==(o=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==o?o:""},X=(e,t)=>{const o=["noopener"],n=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===R.inArray(o,e))),a=t?(e=>(e=r(e)).length>0?e.concat(o):o)(n):r(n);return a.length>0?(e=>R.trim(e.sort().join(" ")))(a):""},J=(e,t)=>(t=t||te(e.selection.getRng())[0]||e.selection.getNode(),ae(t)?g.from(e.dom.select("a[href]",t)[0]):g.from(e.dom.getParent(t,"a[href]"))),Q=(e,t)=>J(e,t).isSome(),ee=(e,t)=>t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||"")).replace(/\uFEFF/g,""),te=e=>G(e,$),oe=e=>R.grep(e,$),ne=e=>oe(e).length>0,re=e=>{const t=e.schema.getTextInlineElements();if(J(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const o=e.selection.getRng();return!!o.collapsed||0===G(o,(e=>1===e.nodeType&&!W(e)&&!Z(t,e.nodeName.toLowerCase()))).length},ae=e=>l(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),se=(e,t,o)=>{const n=e.selection.getNode(),r=J(e,n),a=((e,t)=>{const o={...t};if(0===E(e).length&&!M(e)){const e=X(o.rel,"_blank"===o.target);o.rel=e||null}return g.from(o.target).isNone()&&!1===O(e)&&(o.target=S(e)),o.href=((e,t)=>"http"!==t&&"https"!==t||K(e)?e:t+"://"+e)(o.href,_(e)),o})(e,(e=>{return t=["title","rel","class","target"],o=(t,o)=>(e[o].each((e=>{t[o]=e.length>0?e:null})),t),n={href:e.href},((e,t)=>{for(let o=0,n=e.length;o{n=o(n,e)})),n;var t,o,n})(o));e.undoManager.transact((()=>{o.href===t.href&&t.attach(),r.fold((()=>{((e,t,o,n)=>{const r=e.dom;ae(t)?ue(r,t,n):o.fold((()=>{e.execCommand("mceInsertLink",!1,n)}),(t=>{e.insertContent(r.createHTML("a",n,r.encode(t)))}))})(e,n,o.text,a)}),(t=>{e.focus(),((e,t,o,n)=>{o.each((e=>{Z(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,n),e.selection.select(t)})(e,t,o.text,a)}))}))},ie=e=>{const{class:t,href:o,rel:n,target:r,text:a,title:i}=e;return((e,t)=>{const o={};var n;return((e,t,o,n)=>{((e,t)=>{const o=j(e);for(let n=0,r=o.length;n{(t(e,r)?o:n)(e,r)}))})(e,((e,t)=>!1===s(e)),(n=o,(e,t)=>{n[t]=e}),u),o})({class:t.getOrNull(),href:o,rel:n.getOrNull(),target:r.getOrNull(),text:a.getOrNull(),title:i.getOrNull()})},le=(e,t,o)=>{const n=((e,t)=>{const o=e.options.get,n={allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")},r=t.href;return{...t,href:q.isDomSafe(r,"a",n)?r:""}})(e,o);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ie(n)):se(e,t,n)},ce=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ae(t)?de(e,t):(e=>{const t=e.dom,o=e.selection,n=o.getBookmark(),r=o.getRng().cloneRange(),a=t.getParent(r.startContainer,"a[href]",e.getBody()),s=t.getParent(r.endContainer,"a[href]",e.getBody());a&&r.setStartBefore(a),s&&r.setEndAfter(s),o.setRng(r),e.execCommand("unlink"),o.moveToBookmark(n)})(e),e.focus()}))})(e)},de=(e,t)=>{var o;const n=e.dom.select("img",t)[0];if(n){const r=e.dom.getParents(n,"a[href]",t)[0];r&&(null===(o=r.parentNode)||void 0===o||o.insertBefore(n,r),e.dom.remove(r))}},ue=(e,t,o)=>{var n;const r=e.select("img",t)[0];if(r){const t=e.create("a",o);null===(n=r.parentNode)||void 0===n||n.insertBefore(t,r),t.appendChild(r)}},me=(e,t)=>y(t,(t=>(e=>{return Z(t=e,o="items")&&void 0!==t[o]&&null!==t[o];var t,o})(t)?me(e,t.items):k(t.value===e,t))),ge=(e,t)=>{const o={text:e.text,title:e.title},n=(e,n)=>{const r=(a=t,s=n,"link"===s?a.link:"anchor"===s?a.anchor:g.none()).getOr([]);var a,s;return((e,t,o,n)=>{const r=n[t],a=e.length>0;return void 0!==r?me(r,o).map((t=>({url:{value:t.value,meta:{text:a?e:t.text,attach:u}},text:a?e:t.text}))):g.none()})(o.text,n,r,e)};return{onChange:(e,t)=>{const r=t.name;return"url"===r?(e=>{const t=(n=e.url,k(o.text.length<=0,g.from(null===(r=n.meta)||void 0===r?void 0:r.text).getOr(n.value)));var n,r;const a=(e=>{var t;return k(o.title.length<=0,g.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||a.isSome()?g.some({...t.map((e=>({text:e}))).getOr({}),...a.map((e=>({title:e}))).getOr({})}):g.none()})(e()):((e,t)=>p.call(e,t))(["anchor","link"],r)>-1?n(e(),r):"text"===r||"title"===r?(o[r]=e()[r],g.none()):g.none()}}};var pe=tinymce.util.Tools.resolve("tinymce.util.Delay");const he=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?g.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):g.none()},fe=(e,t)=>o=>{const n=o.href;return 1===e&&!K(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?g.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+n})}):g.none()},ye=e=>{const t=e.dom.select("a:not([href])"),o=f(((e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]})));return o.length>0?g.some([{text:"None",value:""}].concat(o)):g.none()},be=e=>{const t=T(e);return t.length>0?I(t):g.none()},ve=e=>{try{return g.some(JSON.parse(e))}catch(e){return g.none()}},ke=(e,t)=>{const o=E(e);if(o.length>0){const n=b(t,"_blank"),r=e=>X(F(e),n);return(!1===M(e)?H(r):I)(o)}return g.none()},we=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],_e=e=>{const t=O(e);return a(t)?I(t).orThunk((()=>g.some(we))):!1===t?g.none():g.some(we)},xe=(e,t,o)=>{const n=e.getAttrib(t,o);return null!==n&&n.length>0?g.some(n):g.none()},Ce=(e,t)=>(e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),o=C(e);return new Promise((e=>{n(o)?fetch(o).then((e=>e.ok?e.text().then(ve):Promise.reject())).then(e,(()=>e(g.none()))):c(o)?o((t=>e(g.some(t)))):e(g.from(o))})).then((e=>e.bind(H(t)).map((e=>e.length>0?[{text:"None",value:""}].concat(e):e))))})(e).then((o=>{const n=((e,t)=>{const o=e.dom,n=re(e)?g.some(ee(e.selection,t)):g.none(),r=t.bind((e=>g.from(o.getAttrib(e,"href")))),a=t.bind((e=>g.from(o.getAttrib(e,"target")))),s=t.bind((e=>xe(o,e,"rel"))),i=t.bind((e=>xe(o,e,"class")));return{url:r,text:n,title:t.bind((e=>xe(o,e,"title"))),target:a,rel:s,linkClass:i}})(e,t);return{anchor:n,catalogs:{targets:_e(e),rels:ke(e,n.target),classes:be(e),anchor:ye(e),link:o},optNode:t,flags:{titleEnabled:A(e)}}})),Se=e=>{const t=(e=>{const t=J(e);return Ce(e,t)})(e);t.then((t=>{const o=((e,t)=>o=>{const n=o.getData();if(!n.url.value)return ce(e),void o.close();const r=e=>g.from(n[e]).filter((o=>!b(t.anchor[e],o))),a={href:n.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},s={href:n.url.value,attach:void 0!==n.url.meta&&n.url.meta.attach?n.url.meta.attach:u};((e,t)=>y([he,fe(_(e),z(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(o=>new Promise((n=>{((e,t,o)=>{const n=e.selection.getRng();pe.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(n),o(t)}))}))})(e,o.message,(e=>{n(e?o.preprocess(t):t)}))})))))(e,a).then((t=>{le(e,s,t)})),o.close()})(e,t);return((e,t,o)=>{const n=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],a=((e,t)=>{const o=e.anchor,n=o.url.getOr("");return{url:{value:n,meta:{original:{value:n}}},text:o.text.getOr(""),title:o.title.getOr(""),anchor:n,link:n,rel:o.rel.getOr(""),target:o.target.or(t).getOr(""),linkClass:o.linkClass.getOr("")}})(e,g.from(S(o))),s=e.catalogs,i=ge(a,s);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:f([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],n,r,v([s.anchor.map(P("anchor","Anchors")),s.rels.map(P("rel","Rel")),s.targets.map(P("target","Open link in...")),s.link.map(P("link","Link list")),s.classes.map(P("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:a,onChange:(e,{name:t})=>{i.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,o,e)})).then((t=>{e.windowManager.open(t)}))};var ze=tinymce.util.Tools.resolve("tinymce.util.VK");const Oe=(e,t)=>e.dom.getParent(t,"a[href]"),Ee=e=>Oe(e,e.selection.getStart()),Te=(e,t)=>{if(t){const o=Y(t);if(/^#/.test(o)){const t=e.dom.select(o);t.length&&e.selection.scrollIntoView(t[0],!0)}else(e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,o)})(t.href)}},Ae=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},Me=e=>()=>{Te(e,Ee(e))},Ne=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Re=e=>t=>{const o=()=>{t.setActive(!e.mode.isReadOnly()&&Q(e,e.selection.getNode())),t.setEnabled(e.selection.isEditable())};return o(),Ne(e,o)},De=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return o(),Ne(e,o)},Be=e=>t=>{const o=()=>t.setEnabled((e=>1===(e.selection.isCollapsed()?oe(e.dom.getParents(e.selection.getStart())):te(e.selection.getRng())).length)(e));return o(),Ne(e,o)},Le=e=>t=>{const o=e.dom.getParents(e.selection.getStart()),n=o=>{t.setEnabled((t=>{return ne(t)||(o=e.selection.getRng(),te(o).length>0);var o})(o)&&e.selection.isEditable())};return n(o),Ne(e,(e=>n(e.parents)))};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=n(e)||i(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>n(e)||c(e)||d(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>i(e)||d(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ae(e),onSetup:Re(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Me(e),onSetup:Be(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ce(e),onSetup:Le(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Me(e),onSetup:Be(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onSetup:De(e),onAction:Ae(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ce(e),onSetup:Le(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?ne(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),(e=>{const t=t=>{const o=e.selection.getNode();return t.setEnabled(Q(e,o)),u};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Re(e)},label:"Link",predicate:t=>x(e)&&Q(e,t),initValue:()=>J(e).fold((()=>""),Y),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const o=e.selection.getNode();return t.setActive(Q(e,o)),Re(e)(t)},onAction:t=>{const o=t.getValue(),n=(t=>{const o=J(e),n=re(e);if(o.isNone()&&n){const n=ee(e.selection,o);return k(0===n.length,t)}return g.none()})(o);le(e,{href:o,attach:u},{href:o,text:n,title:g.none(),rel:g.none(),target:g.none(),class:g.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ce(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{Me(e)(),t.hide()}}]})})(e),(e=>{e.on("click",(t=>{const o=Oe(e,t.target);o&&ze.metaKeyPressed(t)&&(t.preventDefault(),Te(e,o))})),e.on("keydown",(t=>{if(!t.isDefaultPrevented()&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)){const o=Ee(e);o&&(t.preventDefault(),Te(e,o))}}))})(e),(e=>{e.addCommand("mceLink",((t,o)=>{!0!==(null==o?void 0:o.dialog)&&N(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Se(e)}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}()},18327:(e,t,o)=>{o(26559)},26559:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=t("array"),s=o("boolean"),i=e=>!(e=>null==e)(e),l=o("function"),c=o("number"),d=()=>{},u=(e,t)=>e===t,m=e=>t=>!e(t),g=(!1,()=>false);class p{constructor(e,t){this.tag=e,this.value=t}static some(e){return new p(!0,e)}static none(){return p.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?p.some(e(this.value)):p.none()}bind(e){return this.tag?e(this.value):p.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:p.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return i(e)?p.some(e):p.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}p.singletonNone=new p(!1);const h=Array.prototype.slice,f=Array.prototype.indexOf,y=Array.prototype.push,b=(e,t)=>{return o=e,n=t,f.call(o,n)>-1;var o,n},v=(e,t)=>{for(let o=0,n=e.length;o{const o=e.length,n=new Array(o);for(let r=0;r{for(let o=0,n=e.length;o{const o=[];for(let n=0,r=e.length;n(w(e,((e,n)=>{o=t(o,e,n)})),o),C=(e,t,o)=>{for(let n=0,r=e.length;nC(e,t,g),z=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o{const t=h.call(e,0);return t.reverse(),t},E=(e,t)=>t>=0&&tE(e,0),A=e=>E(e,e.length-1),M=(e,t)=>{const o=[],n=l(t)?e=>v(o,(o=>t(o,e))):e=>b(o,e);for(let t=0,r=e.length;te.exists((e=>o(e,t))),R=(e,t,o)=>e.isSome()&&t.isSome()?p.some(o(e.getOrDie(),t.getOrDie())):p.none(),D=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},B=(e,t)=>{const o=(t||document).createElement(e);return D(o)},L=D,I=(e,t)=>e.dom===t.dom;"undefined"!=typeof window?window:Function("return this;")();const H=e=>e.dom.nodeName.toLowerCase(),P=(1,e=>1===(e=>e.dom.nodeType)(e));const F=e=>t=>P(t)&&H(t)===e,j=e=>p.from(e.dom.parentNode).map(L),V=e=>k(e.dom.childNodes,L),Z=(e,t)=>{const o=e.dom.childNodes;return p.from(o[t]).map(L)},U=e=>Z(e,0),q=e=>Z(e,e.dom.childNodes.length-1),W=(e,t,o)=>{let n=e.dom;const r=l(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=L(n);if(t(e))return p.some(e);if(r(e))break}return p.none()},$=(e,t,o)=>((e,t,o,n,r)=>n(o)?p.some(o):l(r)&&r(o)?p.none():t(o,n,r))(0,W,e,t,o),G=(e,t)=>{j(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},K=(e,t)=>{e.dom.appendChild(t.dom)},Y=(e,t)=>{w(t,(t=>{K(e,t)}))},X=e=>{e.dom.textContent="",w(V(e),(e=>{J(e)}))},J=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)};var Q=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),ee=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),te=tinymce.util.Tools.resolve("tinymce.util.VK");const oe=e=>k(e,L),ne=Object.keys,re=(e,t)=>{const o=ne(e);for(let n=0,r=o.length;n{const o=e.dom;re(t,((e,t)=>{((e,t,o)=>{if(!(n(o)||s(o)||c(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(o,t,e)}))},se=e=>x(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ie=e=>((e,t)=>L(e.dom.cloneNode(!0)))(e),le=(e,t)=>{const o=((e,t)=>{const o=B(t),n=se(e);return ae(o,n),o})(e,t);var n,r;r=o,(e=>p.from(e.dom.nextSibling).map(L))(n=e).fold((()=>{j(n).each((e=>{K(e,r)}))}),(e=>{G(e,r)}));const a=V(e);return Y(o,a),J(e),o};var ce=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),de=tinymce.util.Tools.resolve("tinymce.util.Tools");const ue=e=>t=>i(t)&&t.nodeName.toLowerCase()===e,me=e=>t=>i(t)&&e.test(t.nodeName),ge=e=>i(e)&&3===e.nodeType,pe=e=>i(e)&&1===e.nodeType,he=me(/^(OL|UL|DL)$/),fe=me(/^(OL|UL)$/),ye=ue("ol"),be=me(/^(LI|DT|DD)$/),ve=me(/^(DT|DD)$/),ke=me(/^(TH|TD)$/),we=ue("br"),_e=(e,t)=>i(t)&&t.nodeName in e.schema.getTextBlockElements(),xe=(e,t)=>i(e)&&e.nodeName in t,Ce=(e,t)=>i(t)&&t.nodeName in e.schema.getVoidElements(),Se=(e,t,o)=>{const n=e.isEmpty(t);return!(o&&e.select("span[data-mce-type=bookmark]",t).length>0)&&n},ze=(e,t)=>e.isChildOf(t,e.getRoot()),Oe=e=>t=>t.options.get(e),Ee=Oe("lists_indent_on_tab"),Te=Oe("forced_root_block"),Ae=Oe("forced_root_block_attrs"),Me=(e,t)=>{const o=e.dom,n=e.schema.getBlockElements(),r=o.createFragment(),a=Te(e),s=Ae(e);let i,l,c=!1;for(l=o.create(a,s),xe(t.firstChild,n)||r.appendChild(l);i=t.firstChild;){const e=i.nodeName;c||"SPAN"===e&&"bookmark"===i.getAttribute("data-mce-type")||(c=!0),xe(i,n)?(r.appendChild(i),l=null):(l||(l=o.create(a,s),r.appendChild(l)),l.appendChild(i))}return!c&&l&&l.appendChild(o.create("br",{"data-mce-bogus":"1"})),r},Ne=ce.DOM,Re=F("dd"),De=F("dt"),Be=(e,t)=>{var o;Re(t)?le(t,"dt"):De(t)&&(o=t,p.from(o.dom.parentElement).map(L)).each((o=>((e,t,o)=>{const n=Ne.select('span[data-mce-type="bookmark"]',t),r=Me(e,o),a=Ne.createRng();a.setStartAfter(o),a.setEndAfter(t);const s=a.extractContents();for(let t=s.firstChild;t;t=t.firstChild)if("LI"===t.nodeName&&e.dom.isEmpty(t)){Ne.remove(t);break}e.dom.isEmpty(s)||Ne.insertAfter(s,t),Ne.insertAfter(r,t);const i=o.parentElement;i&&Se(e.dom,i)&&(e=>{const t=e.parentNode;t&&de.each(n,(e=>{t.insertBefore(e,o.parentNode)})),Ne.remove(e)})(i),Ne.remove(o),Se(e.dom,t)&&Ne.remove(t)})(e,o.dom,t.dom)))},Le=e=>{De(e)&&le(e,"dd")},Ie=(e,t)=>{if(ge(e))return{container:e,offset:t};const o=Q.getNode(e,t);return ge(o)?{container:o,offset:t>=e.childNodes.length?o.data.length:0}:o.previousSibling&&ge(o.previousSibling)?{container:o.previousSibling,offset:o.previousSibling.data.length}:o.nextSibling&&ge(o.nextSibling)?{container:o.nextSibling,offset:0}:{container:e,offset:t}},He=e=>{const t=e.cloneRange(),o=Ie(e.startContainer,e.startOffset);t.setStart(o.container,o.offset);const n=Ie(e.endContainer,e.endOffset);return t.setEnd(n.container,n.offset),t},Pe=["OL","UL","DL"],Fe=Pe.join(","),je=(e,t)=>{const o=t||e.selection.getStart(!0);return e.dom.getParent(o,Fe,Ue(e,o))},Ve=e=>{const t=e.selection.getSelectedBlocks();return _(((e,t)=>{const o=de.map(t,(t=>e.dom.getParent(t,"li,dd,dt",Ue(e,t))||t));return M(o)})(e,t),be)},Ze=(e,t)=>{const o=e.dom.getParents(t,"TD,TH");return o.length>0?o[0]:e.getBody()},Ue=(e,t)=>{const o=e.dom.getParents(t,e.dom.isBlock),n=S(o,(t=>{return o=e.schema,!he(n=t)&&!be(n)&&v(Pe,(e=>o.isValidChild(n.nodeName,e)));var o,n}));return n.getOr(e.getBody())},qe=(e,t)=>{const o=e.dom.getParents(t,"ol,ul",Ue(e,t));return A(o)},We=(e,t)=>{const o=k(t,(t=>qe(e,t).getOr(t)));return M(o)},$e=e=>/\btox\-/.test(e.className),Ge=(e,t)=>C(e,he,ke).exists((e=>e.nodeName===t&&!$e(e))),Ke=(e,t)=>null!==t&&!e.dom.isEditable(t),Ye=(e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return Ke(e,o)},Xe=(e,t)=>{const o=e.selection.getNode();return t({parents:e.dom.getParents(o),element:o}),e.on("NodeChange",t),()=>e.off("NodeChange",t)},Je=(e,t,o)=>e.dispatch("ListMutation",{action:t,element:o}),Qe=(et=/^\s+|\s+$/g,e=>e.replace(et,""));var et;const tt=(e,t,o)=>{((e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);(e=>void 0!==e.style&&l(e.style.getPropertyValue))(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},ot=(e,t)=>{K(e.item,t.list)},nt=(e,t)=>{const o={list:B(t,e),item:B("li",e)};return K(o.list,o.item),o},rt=e=>((e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}})(e,"OL,UL"),at=e=>U(e).exists(rt),st=e=>e.depth>0,it=e=>e.isSelected,lt=e=>{const t=V(e),o=q(e).exists(rt)?t.slice(0,-1):t;return k(o,ie)},ct=e=>(w(e,((t,o)=>{((e,t)=>{const o=e[t].depth,n=e=>e.depth===o&&!e.dirty,r=e=>e.depthC(e.slice(t+1),n,r)))})(e,o).fold((()=>{t.dirty&&(e=>{e.listAttributes=((e,t)=>{const o={};var n;return((e,t,o,n)=>{re(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(n=o,(e,t)=>{n[t]=e}),d),o})(e.listAttributes,((e,t)=>"start"!==t))})(t)}),(e=>{return n=e,(o=t).listType=n.listType,void(o.listAttributes={...n.listAttributes});var o,n}))})),e),dt=(e,t,o,n)=>U(n).filter(rt).fold((()=>{t.each((e=>{I(e.start,n)&&o.set(!0)}));const r=((e,t,o)=>j(e).filter(P).map((n=>({depth:t,dirty:!1,isSelected:o,content:lt(e),itemAttributes:se(e),listAttributes:se(n),listType:H(n)}))))(n,e,o.get());t.each((e=>{I(e.end,n)&&o.set(!1)}));const a=q(n).filter(rt).map((n=>ut(e,t,o,n))).getOr([]);return r.toArray().concat(a)}),(n=>ut(e,t,o,n))),ut=(e,t,o,n)=>z(V(n),(n=>(rt(n)?ut:dt)(e+1,t,o,n))),mt=(e,t)=>{const o=ct(t);return((e,t)=>{const o=x(t,((t,o)=>o.depth>t.length?((e,t,o)=>{const n=((e,t,o)=>{const n=[];for(let r=0;r{for(let t=1;t{for(let t=0;t{ae(e.list,t.listAttributes),ae(e.item,t.itemAttributes),Y(e.item,t.content)}))})(n,o),r=n,R(A(t),T(r),ot),t.concat(n)})(e,t,o):((e,t,o)=>{const n=t.slice(0,o.depth);return A(n).each((t=>{const n=((e,t,o)=>{const n=B("li",e);return ae(n,t),Y(n,o),n})(e,o.itemAttributes,o.content);((e,t)=>{K(e.list,t),e.item=t})(t,n),((e,t)=>{H(e.list)!==t.listType&&(e.list=le(e.list,t.listType)),ae(e.list,t.listAttributes)})(t,o)})),n})(e,t,o)),[]);return T(o).map((e=>e.list))})(e.contentDocument,o).toArray()},gt=(e,t,o)=>{const n=((e,t)=>{const o=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return k(e,(e=>({sourceList:e,entries:ut(0,t,o,e)})))})(t,(e=>{const t=k(Ve(e),L);return R(S(t,m(at)),S(O(t),m(at)),((e,t)=>({start:e,end:t})))})(e));w(n,(t=>{((e,t)=>{w(_(e,it),(e=>((e,t)=>{switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}t.dirty=!0})(t,e)))})(t.entries,o);const n=((e,t)=>z(((e,t)=>{if(0===e.length)return[];{let o=t(e[0]);const n=[];let r=[];for(let a=0,s=e.length;aT(t).exists(st)?mt(e,t):((e,t)=>{const o=ct(t);return k(o,(t=>{const o=((e,t)=>{const o=document.createDocumentFragment();return w(e,(e=>{o.appendChild(e.dom)})),L(o)})(t.content);return L(Me(e,o.dom))}))})(e,t))))(e,t.entries);var r;w(n,(t=>{Je(e,"Indent"===o?"IndentList":"OutdentList",t.dom)})),r=t.sourceList,w(n,(e=>{G(r,e)})),J(t.sourceList)}))},pt=(e,t)=>{const o=oe((e=>{const t=(e=>{const t=qe(e,e.selection.getStart()),o=_(e.selection.getSelectedBlocks(),fe);return t.toArray().concat(o)})(e);return We(e,t)})(e)),n=oe((e=>_(Ve(e),ve))(e));let r=!1;if(o.length||n.length){const a=e.selection.getBookmark();gt(e,o,t),((e,t,o)=>{w(o,"Indent"===t?Le:t=>Be(e,t))})(e,t,n),e.selection.moveToBookmark(a),e.selection.setRng(He(e.selection.getRng())),e.nodeChanged(),r=!0}return r},ht=(e,t)=>!(e=>{const t=je(e);return Ke(e,t)})(e)&&pt(e,t),ft=e=>ht(e,"Indent"),yt=e=>ht(e,"Outdent"),bt=e=>ht(e,"Flatten"),vt=e=>"\ufeff"===e;var kt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const wt=ce.DOM,_t=e=>{const t={},o=o=>{let n=e[o?"startContainer":"endContainer"],r=e[o?"startOffset":"endOffset"];if(pe(n)){const e=wt.create("span",{"data-mce-type":"bookmark"});n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),o?n.insertBefore(e,n.childNodes[r]):wt.insertAfter(e,n.childNodes[r])):n.appendChild(e),n=e,r=0}t[o?"startContainer":"endContainer"]=n,t[o?"startOffset":"endOffset"]=r};return o(!0),e.collapsed||o(),t},xt=e=>{const t=t=>{let o=e[t?"startContainer":"endContainer"],n=e[t?"startOffset":"endOffset"];if(o){if(pe(o)&&o.parentNode){const e=o;n=(e=>{var t;let o=null===(t=e.parentNode)||void 0===t?void 0:t.firstChild,n=0;for(;o;){if(o===e)return n;pe(o)&&"bookmark"===o.getAttribute("data-mce-type")||n++,o=o.nextSibling}return-1})(o),o=o.parentNode,wt.remove(e),!o.hasChildNodes()&&wt.isBlock(o)&&o.appendChild(wt.create("br"))}e[t?"startContainer":"endContainer"]=o,e[t?"startOffset":"endOffset"]=n}};t(!0),t();const o=wt.createRng();return o.setStart(e.startContainer,e.startOffset),e.endContainer&&o.setEnd(e.endContainer,e.endOffset),He(o)},Ct=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},St=(e,t)=>{de.each(t,((t,o)=>{e.setAttribute(o,t)}))},zt=(e,t,o)=>{((e,t,o)=>{const n=o["list-style-type"]?o["list-style-type"]:null;e.setStyle(t,"list-style-type",n)})(e,t,o),((e,t,o)=>{St(t,o["list-attributes"]),de.each(e.select("li",t),(e=>{St(e,o["list-item-attributes"])}))})(e,t,o)},Ot=(e,t)=>i(t)&&!xe(t,e.schema.getBlockElements()),Et=(e,t,o,n)=>{let r=t[o?"startContainer":"endContainer"];const a=t[o?"startOffset":"endOffset"];pe(r)&&(r=r.childNodes[Math.min(a,r.childNodes.length-1)]||r),!o&&we(r.nextSibling)&&(r=r.nextSibling);const s=(t,o)=>{var r;const a=new ee(t,(t=>{for(;!e.dom.isBlock(t)&&t.parentNode&&n!==t;)t=t.parentNode;return t})(t)),s=o?"next":"prev";let i;for(;i=a[s]();)if(!Ce(e,i)&&!vt(i.textContent)&&0!==(null===(r=i.textContent)||void 0===r?void 0:r.length))return p.some(i);return p.none()};if(o&&ge(r))if(vt(r.textContent))r=s(r,!1).getOr(r);else for(null!==r.parentNode&&Ot(e,r.parentNode)&&(r=r.parentNode);null!==r.previousSibling&&(Ot(e,r.previousSibling)||ge(r.previousSibling));)r=r.previousSibling;if(!o&&ge(r))if(vt(r.textContent))r=s(r,!0).getOr(r);else for(null!==r.parentNode&&Ot(e,r.parentNode)&&(r=r.parentNode);null!==r.nextSibling&&(Ot(e,r.nextSibling)||ge(r.nextSibling));)r=r.nextSibling;for(;r.parentNode!==n;){const t=r.parentNode;if(_e(e,r))return r;if(/^(TD|TH)$/.test(t.nodeName))return r;r=t}return r},Tt=(e,t,o)=>{const n=e.selection.getRng();let r="LI";const a=Ue(e,((e,t)=>{const o=e.selection.getStart(!0),n=Et(e,t,!0,e.getBody());return r=L(n),a=L(t.commonAncestorContainer),s=r,i=function(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}(I,a),W(s,i,void 0).isSome()?t.commonAncestorContainer:o;var r,a,s,i})(e,n)),s=e.dom;if("false"===s.getContentEditable(e.selection.getNode()))return;"DL"===(t=t.toUpperCase())&&(r="DT");const i=_t(n),l=_(((e,t,o)=>{const n=[],r=e.dom,a=Et(e,t,!0,o),s=Et(e,t,!1,o);let i;const l=[];for(let e=a;e&&(l.push(e),e!==s);e=e.nextSibling);return de.each(l,(t=>{var a;if(_e(e,t))return n.push(t),void(i=null);if(r.isBlock(t)||we(t))return we(t)&&r.remove(t),void(i=null);const s=t.nextSibling;kt.isBookmarkNode(t)&&(he(s)||_e(e,s)||!s&&t.parentNode===o)?i=null:(i||(i=r.create("p"),null===(a=t.parentNode)||void 0===a||a.insertBefore(i,t),n.push(i)),i.appendChild(t))})),n})(e,n,a),e.dom.isEditable);de.each(l,(n=>{let a;const i=n.previousSibling,l=n.parentNode;be(l)||(i&&he(i)&&i.nodeName===t&&((e,t,o)=>{const n=e.getStyle(t,"list-style-type");let r=o?o["list-style-type"]:"";return r=null===r?"":r,n===r})(s,i,o)?(a=i,n=s.rename(n,r),i.appendChild(n)):(a=s.create(t),l.insertBefore(a,n),a.appendChild(n),n=s.rename(n,r)),((e,t,o)=>{de.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],(o=>e.setStyle(t,o,"")))})(s,n),zt(s,a,o),Mt(e.dom,a))})),e.selection.setRng(xt(i))},At=(e,t,o)=>{return((e,t)=>he(e)&&e.nodeName===(null==t?void 0:t.nodeName))(t,o)&&((e,t,o)=>e.getStyle(t,"list-style-type",!0)===e.getStyle(o,"list-style-type",!0))(e,t,o)&&(n=o,t.className===n.className);var n},Mt=(e,t)=>{let o,n=t.nextSibling;if(At(e,t,n)){const r=n;for(;o=r.firstChild;)t.appendChild(o);e.remove(r)}if(n=t.previousSibling,At(e,t,n)){const r=n;for(;o=r.lastChild;)t.insertBefore(o,t.firstChild);e.remove(r)}},Nt=(e,t,o,n)=>{if(t.nodeName!==o){const r=e.dom.rename(t,o);zt(e.dom,r,n),Je(e,Ct(o),r)}else zt(e.dom,t,n),Je(e,Ct(o),t)},Rt=(e,t,o,n)=>{if(t.classList.forEach(((e,o,n)=>{e.startsWith("tox-")&&(n.remove(e),0===n.length&&t.removeAttribute("class"))})),t.nodeName!==o){const r=e.dom.rename(t,o);zt(e.dom,r,n),Je(e,Ct(o),r)}else zt(e.dom,t,n),Je(e,Ct(o),t)},Dt=e=>"list-style-type"in e,Bt=(e,t,o)=>{const n=je(e);if(Ye(e,n))return;const a=(e=>{const t=je(e),o=e.selection.getSelectedBlocks();return((e,t)=>i(e)&&1===t.length&&t[0]===e)(t,o)?(e=>_(e.querySelectorAll(Fe),he))(t):_(o,(e=>he(e)&&t!==e))})(e),s=r(o)?o:{};a.length>0?((e,t,o,n,r)=>{const a=he(t);if(!a||t.nodeName!==n||Dt(r)||$e(t)){Tt(e,n,r);const s=_t(e.selection.getRng()),i=a?[t,...o]:o,l=a&&$e(t)?Rt:Nt;de.each(i,(t=>{l(e,t,n,r)})),e.selection.setRng(xt(s))}else bt(e)})(e,n,a,t,s):((e,t,o,n)=>{if(t!==e.getBody())if(t)if(t.nodeName!==o||Dt(n)||$e(t)){const r=_t(e.selection.getRng());$e(t)&&t.classList.forEach(((e,o,n)=>{e.startsWith("tox-")&&(n.remove(e),0===n.length&&t.removeAttribute("class"))})),zt(e.dom,t,n);const a=e.dom.rename(t,o);Mt(e.dom,a),e.selection.setRng(xt(r)),Tt(e,o,n),Je(e,Ct(o),a)}else bt(e);else Tt(e,o,n),Je(e,Ct(o),t)})(e,n,t,s)},Lt=ce.DOM,It=(e,t)=>{const o=de.grep(e.select("ol,ul",t));de.each(o,(t=>{((e,t)=>{const o=t.parentElement;if(o&&"LI"===o.nodeName&&o.firstChild===t){const n=o.previousSibling;n&&"LI"===n.nodeName?(n.appendChild(t),Se(e,o)&&Lt.remove(o)):Lt.setStyle(o,"listStyleType","none")}if(he(o)){const e=o.previousSibling;e&&"LI"===e.nodeName&&e.appendChild(t)}})(e,t)}))},Ht=(e,t,o,n)=>{let r=t.startContainer;const a=t.startOffset;if(ge(r)&&(o?a0))return r;const s=e.schema.getNonEmptyElements();pe(r)&&(r=Q.getNode(r,a));const i=new ee(r,n);o&&((e,t)=>!!we(t)&&e.isBlock(t.nextSibling)&&!we(t.previousSibling))(e.dom,r)&&i.next();const l=o?i.next.bind(i):i.prev2.bind(i);for(;r=l();){if("LI"===r.nodeName&&!r.hasChildNodes())return r;if(s[r.nodeName])return r;if(ge(r)&&r.data.length>0)return r}return null},Pt=(e,t)=>{const o=t.childNodes;return 1===o.length&&!he(o[0])&&e.isBlock(o[0])},Ft=(e,t,o)=>{let n;const r=t.parentNode;if(!ze(e,t)||!ze(e,o))return;he(o.lastChild)&&(n=o.lastChild),r===o.lastChild&&we(r.previousSibling)&&e.remove(r.previousSibling);const a=o.lastChild;a&&we(a)&&t.hasChildNodes()&&e.remove(a),Se(e,o,!0)&&X(L(o)),((e,t,o)=>{let n;const r=Pt(e,o)?o.firstChild:o;if(((e,t)=>{Pt(e,t)&&e.remove(t.firstChild,!0)})(e,t),!Se(e,t,!0))for(;n=t.firstChild;)r.appendChild(n)})(e,t,o),n&&o.appendChild(n);const s=((e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)})(L(o),L(t))?e.getParents(t,he,o):[];e.remove(t),w(s,(t=>{Se(e,t)&&t!==e.getRoot()&&e.remove(t)}))},jt=(e,t)=>{const o=e.dom,n=e.selection,r=n.getStart(),a=Ze(e,r),s=o.getParent(n.getStart(),"LI",a);if(s){const r=s.parentElement;if(r===e.getBody()&&Se(o,r))return!0;const i=He(n.getRng()),l=o.getParent(Ht(e,i,t,a),"LI",a);if(l&&l!==s)return e.undoManager.transact((()=>{var o,n;t?((e,t,o,n)=>{const r=e.dom;if(r.isEmpty(n))((e,t,o)=>{X(L(o)),Ft(e.dom,t,o),e.selection.setCursorLocation(o,0)})(e,o,n);else{const a=_t(t);Ft(r,o,n),e.selection.setRng(xt(a))}})(e,i,l,s):(null===(n=(o=s).parentNode)||void 0===n?void 0:n.firstChild)===o?yt(e):((e,t,o,n)=>{const r=_t(t);Ft(e.dom,o,n);const a=xt(r);e.selection.setRng(a)})(e,i,s,l)})),!0;if(!l&&!t&&0===i.startOffset&&0===i.endOffset)return e.undoManager.transact((()=>{bt(e)})),!0}return!1},Vt=e=>{const t=e.selection.getStart(),o=Ze(e,t);return e.dom.getParent(t,"LI,DT,DD",o)||Ve(e).length>0},Zt=(e,t)=>{const o=e.selection;return!Ye(e,o.getNode())&&(o.isCollapsed()?((e,t)=>jt(e,t)||((e,t)=>{const o=e.dom,n=e.selection.getStart(),r=Ze(e,n),a=o.getParent(n,o.isBlock,r);if(a&&o.isEmpty(a)){const n=He(e.selection.getRng()),s=o.getParent(Ht(e,n,t,r),"LI",r);if(s){const i=e=>b(["td","th","caption"],H(e)),l=e=>e.dom===r;return!!((e,t,o=u)=>R(e,t,o).getOr(e.isNone()&&t.isNone()))($(L(s),i,l),$(L(n.startContainer),i,l),I)&&(e.undoManager.transact((()=>{const n=s.parentNode;((e,t,o)=>{const n=e.getParent(t.parentNode,e.isBlock,o);e.remove(t),n&&e.isEmpty(n)&&e.remove(n)})(o,a,r),Mt(o,n),e.selection.select(s,!0),e.selection.collapse(t)})),!0)}}return!1})(e,t))(e,t):(e=>!!Vt(e)&&(e.undoManager.transact((()=>{e.execCommand("Delete"),It(e.dom,e.getBody())})),!0))(e))},Ut=e=>{const t=O(Qe(e).split("")),o=k(t,((e,t)=>{const o=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*o}));return x(o,((e,t)=>e+t),0)},qt=e=>{if(--e<0)return"";{const t=e%26,o=Math.floor(e/26);return qt(o)+String.fromCharCode("A".charCodeAt(0)+t)}},Wt=e=>{const t=parseInt(e.start,10);return N(e.listStyleType,"upper-alpha")?qt(t):N(e.listStyleType,"lower-alpha")?qt(t).toLowerCase():e.start},$t=(e,t)=>()=>{const o=je(e);return i(o)&&o.nodeName===t},Gt=e=>{e.addCommand("mceListProps",(()=>{(e=>{const t=je(e);ye(t)&&!Ye(e,t)&&e.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Wt({start:e.dom.getAttrib(t,"start","1"),listStyleType:p.from(e.dom.getStyle(t,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{(e=>{switch((e=>/^[0-9]+$/.test(e)?2:/^[A-Z]+$/.test(e)?0:/^[a-z]+$/.test(e)?1:e.length>0?4:3)(e)){case 2:return p.some({listStyleType:p.none(),start:e});case 0:return p.some({listStyleType:p.some("upper-alpha"),start:Ut(e).toString()});case 1:return p.some({listStyleType:p.some("lower-alpha"),start:Ut(e).toString()});case 3:return p.some({listStyleType:p.none(),start:""});case 4:return p.none()}})(t.getData().start).each((t=>{e.execCommand("mceListUpdate",!1,{attrs:{start:"1"===t.start?"":t.start},styles:{"list-style-type":t.listStyleType.getOr("")}})})),t.close()}})})(e)}))};var Kt=tinymce.util.Tools.resolve("tinymce.html.Node");const Yt=e=>3===e.type,Xt=e=>0===e.length,Jt=e=>{const t=(t,o)=>{const n=Kt.create("li");w(t,(e=>n.append(e))),o?e.insert(n,o,!0):e.append(n)},o=x(e.children(),((e,o)=>Yt(o)?[...e,o]:Xt(e)||Yt(o)?e:(t(e,o),[])),[]);Xt(o)||t(o)},Qt=(e,t)=>o=>(o.setEnabled(e.selection.isEditable()),Xe(e,(n=>{o.setActive(Ge(n.parents,t)),o.setEnabled(!Ye(e,n.element)&&e.selection.isEditable())}))),eo=(e,t)=>o=>Xe(e,(n=>o.setEnabled(Ge(n.parents,t)&&!Ye(e,n.element))));e.add("lists",(e=>((e=>{(0,e.options.register)("lists_indent_on_tab",{processor:"boolean",default:!0})})(e),(e=>{e.on("PreInit",(()=>{const{parser:t}=e;t.addNodeFilter("ul,ol",(e=>w(e,Jt)))}))})(e),e.hasPlugin("rtc",!0)?Gt(e):((e=>{Ee(e)&&(e=>{e.on("keydown",(t=>{t.keyCode!==te.TAB||te.metaKeyPressed(t)||e.undoManager.transact((()=>{(t.shiftKey?yt(e):ft(e))&&t.preventDefault()}))}))})(e),(e=>{e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!Vt(e)||It(e.dom,e.getBody())})),e.on("keydown",(t=>{t.keyCode===te.BACKSPACE?Zt(e,!1)&&t.preventDefault():t.keyCode===te.DELETE&&Zt(e,!0)&&t.preventDefault()}))})(e)})(e),(e=>{e.on("BeforeExecCommand",(t=>{const o=t.command.toLowerCase();"indent"===o?ft(e):"outdent"===o&&yt(e)})),e.addCommand("InsertUnorderedList",((t,o)=>{Bt(e,"UL",o)})),e.addCommand("InsertOrderedList",((t,o)=>{Bt(e,"OL",o)})),e.addCommand("InsertDefinitionList",((t,o)=>{Bt(e,"DL",o)})),e.addCommand("RemoveList",(()=>{bt(e)})),Gt(e),e.addCommand("mceListUpdate",((t,o)=>{r(o)&&((e,t)=>{const o=je(e);null===o||Ye(e,o)||e.undoManager.transact((()=>{r(t.styles)&&e.dom.setStyles(o,t.styles),r(t.attrs)&&re(t.attrs,((t,n)=>e.dom.setAttrib(o,n,t)))}))})(e,o)})),e.addQueryStateHandler("InsertUnorderedList",$t(e,"UL")),e.addQueryStateHandler("InsertOrderedList",$t(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",$t(e,"DL"))})(e)),(e=>{const t=t=>()=>e.execCommand(t);e.hasPlugin("advlist")||(e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:Qt(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:Qt(e,"UL")}))})(e),(e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:eo(e,"OL")};e.ui.registry.addMenuItem("listprops",t),e.ui.registry.addContextMenu("lists",{update:t=>{const o=je(e,t);return ye(o)?["listprops"]:[]}})})(e),(e=>({backspaceDelete:t=>{Zt(e,t)}}))(e))))}()},5099:(e,t,o)=>{o(75263)},75263:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=t("string"),n=t("object"),r=t("array"),a=e=>!(e=>null==e)(e);class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:s.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?s.some(e):s.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const i=Array.prototype.push,l=(e,t)=>{for(let o=0,n=e.length;o{const t=[];for(let o=0,n=e.length;og(e,t)?s.from(e[t]):s.none(),g=(e,t)=>u.call(e,t),p=e=>t=>t.options.get(e),h=p("audio_template_callback"),f=p("video_template_callback"),y=p("iframe_template_callback"),b=p("media_live_embeds"),v=p("media_filter_html"),k=p("media_url_resolver"),w=p("media_alt_source"),_=p("media_poster"),x=p("media_dimensions");var C=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.html.DomParser");const O=S.DOM,E=e=>e.replace(/px$/,""),T=e=>{const t=e.attr("style"),o=t?O.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.attr("data-ephox-embed-iri"),altsource:"",poster:"",width:m(o,"max-width").map(E).getOr(""),height:m(o,"max-height").map(E).getOr("")}},A=(e,t)=>{let o={};for(let n=z({validate:!1,forced_root_block:!1},t).parse(e);n;n=n.walk())if(1===n.type){const e=n.name;if(n.attr("data-ephox-embed-iri")){o=T(n);break}o.source||"param"!==e||(o.source=n.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=C.extend(n.attributes.map,o)),"source"===e&&(o.source?o.altsource||(o.altsource=n.attr("src")):o.source=n.attr("src")),"img"!==e||o.poster||(o.poster=n.attr("src"))}return o.source=o.source||o.src||"",o.altsource=o.altsource||"",o.poster=o.poster||"",o},M=e=>{var t;const o=null!==(t=e.toLowerCase().split(".").pop())&&void 0!==t?t:"";return m({mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},o).getOr("")};var N=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Serializer");const D=(e,t={})=>z({forced_root_block:!1,validate:!1,allow_conditional_comments:!0,...t},e),B=S.DOM,L=e=>/^[0-9.]+$/.test(e)?e+"px":e,I=(e,t)=>{const o=t.attr("style"),n=o?B.parseStyle(o):{};a(e.width)&&(n["max-width"]=L(e.width)),a(e.height)&&(n["max-height"]=L(e.height)),t.attr("style",B.serializeStyle(n))},H=["source","altsource"],P=(e,t,o,n)=>{let r=0,a=0;const s=D(n);s.addNodeFilter("source",(e=>r=e.length));const i=s.parse(e);for(let e=i;e;e=e.walk())if(1===e.type){const n=e.name;if(e.attr("data-ephox-embed-iri")){I(t,e);break}switch(n){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&(e.attr("width",t.width),e.attr("height",t.height))}if(o)switch(n){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let o=r;o<2;o++)if(t[H[o]]){const n=new N("source",1);n.attr("src",t[H[o]]),n.attr("type",t[H[o]+"mime"]||null),e.append(n)}break;case"iframe":e.attr("src",t.source);break;case"object":const o=e.getAll("img").length>0;if(t.poster&&!o){e.attr("src",t.poster);const o=new N("img",1);o.attr("src",t.poster),o.attr("width",t.width),o.attr("height",t.height),e.append(o)}break;case"source":if(a<2&&(e.attr("src",t[H[a]]),e.attr("type",t[H[a]+"mime"]||null),!t[H[a]])){e.remove();continue}a++;break;case"img":t.poster||e.remove()}}return R({},n).serialize(i)},F=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)\?h=(\w+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?h=$2&title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)\?h=(\w+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?h=$3&title=0&byline=0",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],j=(e,t)=>{const o=(e=>{const t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"})(t),n=e.regex.exec(t);let r=o+e.url;if(a(n))for(let e=0;en[e]?n[e]:""));return r.replace(/\?$/,"")},V=e=>{const t=F.filter((t=>t.regex.test(e)));return t.length>0?C.extend({},t[0],{url:j(t[0],e)}):null},Z=(e,t)=>{var o;const n=C.extend({},t);if(!n.source&&(C.extend(n,A(null!==(o=n.embed)&&void 0!==o?o:"",e.schema)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=e.convertURL(n.source,"source"),n.altsource=e.convertURL(n.altsource,"source"),n.sourcemime=M(n.source),n.altsourcemime=M(n.altsource),n.poster=e.convertURL(n.poster,"poster");const r=V(n.source);if(r&&(n.source=r.url,n.type=r.type,n.allowfullscreen=r.allowFullscreen,n.width=n.width||String(r.w),n.height=n.height||String(r.h)),n.embed)return P(n.embed,n,!0,e.schema);{const t=h(e),o=f(e),r=y(e);return n.width=n.width||"300",n.height=n.height||"150",C.each(n,((t,o)=>{n[o]=e.dom.encode(""+t)})),"iframe"===n.type?((e,t)=>{if(t)return t(e);{const t=e.allowfullscreen?' allowFullscreen="1"':"";return'"}})(n,r):"application/x-shockwave-flash"===n.sourcemime?(e=>{let t='",t})(n):-1!==n.sourcemime.indexOf("audio")?((e,t)=>t?t(e):'")(n,t):((e,t)=>t?t(e):'")(n,o)}},U=e=>e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri"),q={},W=e=>t=>Z(e,t),$=(e,t)=>{const o=k(e);return o?((e,t,o)=>new Promise(((n,r)=>{const a=o=>(o.html&&(q[e.source]=o),n({url:e.source,html:o.html?o.html:t(e)}));q[e.source]?a(q[e.source]):o({url:e.source},a,r)})))(t,W(e),o):((e,t)=>Promise.resolve({html:t(e),url:e.source}))(t,W(e))},G=(e,t)=>{const o={};return m(e,"dimensions").each((e=>{l(["width","height"],(n=>{m(t,n).orThunk((()=>m(e,n))).each((e=>o[n]=e))}))})),o},K=(e,t)=>{const o=t&&"dimensions"!==t?((e,t)=>m(t,e).bind((e=>m(e,"meta"))))(t,e).getOr({}):{},r=((e,t,o)=>r=>{const a=()=>m(e,r),i=()=>m(t,r),l=e=>m(e,"value").bind((e=>e.length>0?s.some(e):s.none()));return{[r]:(r===o?a().bind((e=>n(e)?l(e).orThunk(i):i().orThunk((()=>s.from(e))))):i().orThunk((()=>a().bind((e=>n(e)?l(e):s.from(e)))))).getOr("")}})(e,o,t);return{...r("source"),...r("altsource"),...r("poster"),...r("embed"),...G(e,o)}},Y=e=>{const t={...e,source:{value:m(e,"source").getOr("")},altsource:{value:m(e,"altsource").getOr("")},poster:{value:m(e,"poster").getOr("")}};return l(["width","height"],(o=>{m(e,o).each((e=>{const n=t.dimensions||{};n[o]=e,t.dimensions=n}))})),t},X=e=>t=>{const o=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:o})},J=(e,t)=>n=>{if(o(n.url)&&n.url.trim().length>0){const o=n.html,r={...A(o,t.schema),source:n.url,embed:o};e.setData(Y(r))}},Q=(e,t)=>{const o=e.dom.select("*[data-mce-object]");e.insertContent(t),((e,t)=>{const o=e.dom.select("*[data-mce-object]");for(let e=0;e=0;n--)t[e]===o[n]&&o.splice(n,1);e.selection.select(o[0])})(e,o),e.nodeChanged()},ee=(e,t)=>a(t)&&"ephox-embed-iri"===t&&a(V(e)),te=(e,t)=>((e,t)=>e.width!==t.width||e.height!==t.height)(e,t)&&ee(t.source,e.type),oe=e=>{const t=(e=>{const t=e.selection.getNode(),o=U(t)?e.serializer.serialize(t,{selection:!0}):"",n=A(o,e.schema),r=(()=>{if(ee(n.source,n.type)){const o=e.dom.getRect(t);return{width:o.w.toString().replace(/px$/,""),height:o.h.toString().replace(/px$/,"")}}return{}})();return{embed:o,...n,...r}})(e),o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(t),n=Y(t),r=x(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],a={title:"General",name:"general",items:c([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],r])},s=[];w(e)&&s.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),_(e)&&s.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});const i={title:"Advanced",name:"advanced",items:s},l=[a,{title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]}];s.length>0&&l.push(i);const d={type:"tabpanel",tabs:l},u=e.windowManager.open({title:"Insert/Edit Media",size:"normal",body:d,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{const n=K(t.getData());((e,t,o)=>{var n,r;t.embed=te(e,t)&&x(o)?Z(o,{...t,embed:""}):P(null!==(n=t.embed)&&void 0!==n?n:"",t,!1,o.schema),t.embed&&(e.source===t.source||(r=t.source,g(q,r)))?Q(o,t.embed):$(o,t).then((e=>{Q(o,e.html)})).catch(X(o))})(o.get(),n,e),t.close()},onChange:(t,n)=>{switch(n.name){case"source":((t,o)=>{const n=K(o.getData(),"source");t.source!==n.source&&(J(u,e)({url:n.source,html:""}),$(e,n).then(J(u,e)).catch(X(e)))})(o.get(),t);break;case"embed":(t=>{var o;const n=K(t.getData()),r=A(null!==(o=n.embed)&&void 0!==o?o:"",e.schema);t.setData(Y(r))})(t);break;case"dimensions":case"altsource":case"poster":((t,o,n)=>{const r=K(t.getData(),o),a=te(n,r)&&x(e)?{...r,embed:""}:r,s=Z(e,a);t.setData(Y({...a,embed:s}))})(t,n.name,o.get())}o.set(K(t.getData()))},initialData:n})};var ne=tinymce.util.Tools.resolve("tinymce.Env");const re=e=>{const t=e.name;return"iframe"===t||"video"===t||"audio"===t},ae=(e,t,o,n=null)=>{const r=e.attr(o);return a(r)?r:g(t,o)?null:n},se=(e,t,o)=>{const n="img"===t.name||"video"===e.name,r=n?"300":null,a="audio"===e.name?"30":"150",s=n?a:null;t.attr({width:ae(e,o,"width",r),height:ae(e,o,"height",s)})},ie=(e,t)=>{const o=t.name,n=new N("img",1);return ce(e,t,n),se(t,n,{}),n.attr({style:t.attr("style"),src:ne.transparentSrc,"data-mce-object":o,class:"mce-object mce-object-"+o}),n},le=(e,t)=>{var o;const n=t.name,r=new N("span",1);r.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":n,class:"mce-preview-object mce-object-"+n}),ce(e,t,r);const s=e.dom.parseStyle(null!==(o=t.attr("style"))&&void 0!==o?o:""),i=new N(n,1);if(se(t,i,s),i.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===n)i.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0"});else{l(["controls","crossorigin","currentTime","loop","muted","poster","preload"],(e=>{i.attr(e,t.attr(e))}));const o=r.attr("data-mce-html");a(o)&&((e,t,o,n)=>{const r=D(e.schema).parse(n,{context:t});for(;r.firstChild;)o.append(r.firstChild)})(e,n,i,unescape(o))}const c=new N("span",1);return c.attr("class","mce-shim"),r.append(i),r.append(c),r},ce=(e,t,o)=>{var n;const r=null!==(n=t.attributes)&&void 0!==n?n:[];let a=r.length;for(;a--;){const t=r[a].name;let n=r[a].value;"width"===t||"height"===t||"style"===t||(i="data-mce-",(s=t).length>=9&&s.substr(0,9)===i)||("data"!==t&&"src"!==t||(n=e.convertURL(n,t)),o.attr("data-mce-p-"+t,n))}var s,i;const c=R({inner:!0},e.schema),d=new N("div",1);l(t.children(),(e=>d.append(e)));const u=c.serialize(d);u&&(o.attr("data-mce-html",escape(u)),o.empty())},de=e=>{const t=e.attr("class");return o(t)&&/\btiny-pageembed\b/.test(t)},ue=e=>{let t=e;for(;t=t.parent;)if(t.attr("data-ephox-embed-iri")||de(t))return!0;return!1},me=(e,t,o)=>{const n=(0,e.options.get)("xss_sanitization"),r=v(e);return D(e.schema,{sanitize:n,validate:r}).parse(o,{context:t})},ge=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("media",(e=>((e=>{const t=e.options.register;t("audio_template_callback",{processor:"function"}),t("video_template_callback",{processor:"function"}),t("iframe_template_callback",{processor:"function"}),t("media_live_embeds",{processor:"boolean",default:!0}),t("media_filter_html",{processor:"boolean",default:!0}),t("media_url_resolver",{processor:"function"}),t("media_alt_source",{processor:"boolean",default:!0}),t("media_poster",{processor:"boolean",default:!0}),t("media_dimensions",{processor:"boolean",default:!0})})(e),(e=>{e.addCommand("mceMedia",(()=>{oe(e)}))})(e),(e=>{const t=()=>e.execCommand("mceMedia");e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:t,onSetup:t=>{const o=e.selection;t.setActive(U(o.getNode()));const n=o.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",t.setActive).unbind,r=ge(e)(t);return()=>{n(),r()}}}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:t,onSetup:ge(e)})})(e),(e=>{e.on("ResolveName",(e=>{let t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}))})(e),(e=>{e.on("PreInit",(()=>{const{schema:t,serializer:o,parser:n}=e,r=t.getBoolAttrs();l("webkitallowfullscreen mozallowfullscreen".split(" "),(e=>{r[e]={}})),((e,t)=>{const o=d(e);for(let n=0,r=o.length;n{const n=t.getElementRule(o);n&&l(e,(e=>{n.attributes[e]={},n.attributesOrder.push(e)}))})),n.addNodeFilter("iframe,video,audio,object,embed",(e=>t=>{let o,n=t.length;for(;n--;)o=t[n],o.parent&&(o.parent.attr("data-mce-object")||(re(o)&&b(e)?ue(o)||o.replace(le(e,o)):ue(o)||o.replace(ie(e,o))))})(e)),o.addAttributeFilter("data-mce-object",((t,o)=>{var n;let r=t.length;for(;r--;){const a=t[r];if(!a.parent)continue;const s=a.attr(o),i=new N(s,1);if("audio"!==s){const e=a.attr("class");e&&-1!==e.indexOf("mce-preview-object")&&a.firstChild?i.attr({width:a.firstChild.attr("width"),height:a.firstChild.attr("height")}):i.attr({width:a.attr("width"),height:a.attr("height")})}i.attr({style:a.attr("style")});const c=null!==(n=a.attributes)&&void 0!==n?n:[];let d=c.length;for(;d--;){const e=c[d].name;0===e.indexOf("data-mce-p-")&&i.attr(e.substr(11),c[d].value)}const u=a.attr("data-mce-html");if(u){const t=me(e,s,unescape(u));l(t.children(),(e=>i.append(e)))}a.replace(i)}}))})),e.on("SetContent",(()=>{const t=e.dom;l(t.select("span.mce-preview-object"),(e=>{0===t.select("span.mce-shim",e).length&&t.add(e,"span",{class:"mce-shim"})}))}))})(e),(e=>{e.on("click keyup touchend",(()=>{const t=e.selection.getNode();t&&e.dom.hasClass(t,"mce-preview-object")&&e.dom.getAttrib(t,"data-mce-selected")&&t.setAttribute("data-mce-selected","2")})),e.on("ObjectResized",(t=>{const o=t.target;if(o.getAttribute("data-mce-object")){let n=o.getAttribute("data-mce-html");n&&(n=unescape(n),o.setAttribute("data-mce-html",escape(P(n,{width:String(t.width),height:String(t.height)},!1,e.schema))))}}))})(e),(e=>({showDialog:()=>{oe(e)}}))(e))))}()},91414:(e,t,o)=>{o(99926)},99926:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=t("boolean"),n=t("number"),r=e=>t=>t.options.get(e),a=r("nonbreaking_force_tab"),s=r("nonbreaking_wrap"),i=(e,t)=>{let o="";for(let n=0;n{const o=s(e)||e.plugins.visualchars?`${i(" ",t)}`:i(" ",t);e.undoManager.transact((()=>e.insertContent(o)))};var c=tinymce.util.Tools.resolve("tinymce.util.VK");const d=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("nonbreaking",(e=>{(e=>{const t=e.options.register;t("nonbreaking_force_tab",{processor:e=>o(e)?{value:e?3:0,valid:!0}:n(e)?{value:e,valid:!0}:{valid:!1,message:"Must be a boolean or number."},default:!1}),t("nonbreaking_wrap",{processor:"boolean",default:!0})})(e),(e=>{e.addCommand("mceNonBreaking",(()=>{l(e,1)}))})(e),(e=>{const t=()=>e.execCommand("mceNonBreaking");e.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:t,onSetup:d(e)}),e.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:t,onSetup:d(e)})})(e),(e=>{const t=a(e);t>0&&e.on("keydown",(o=>{if(o.keyCode===c.TAB&&!o.isDefaultPrevented()){if(o.shiftKey)return;o.preventDefault(),o.stopImmediatePropagation(),l(e,t)}}))})(e)}))}()},88504:(e,t,o)=>{o(92654)},92654:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("pagebreak_separator"),r=o("pagebreak_split_block"),a="mce-pagebreak",s=e=>{const o=``;return e?`${o}
`:o},i=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("pagebreak",(e=>{(e=>{const t=e.options.register;t("pagebreak_separator",{processor:"string",default:"\x3c!-- pagebreak --\x3e"}),t("pagebreak_split_block",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mcePageBreak",(()=>{e.insertContent(s(r(e)))}))})(e),(e=>{const t=()=>e.execCommand("mcePageBreak");e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:t,onSetup:i(e)}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:t,onSetup:i(e)})})(e),(e=>{const t=n(e),o=()=>r(e),i=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(e=>"\\"+e)),"gi");e.on("BeforeSetContent",(e=>{e.content=e.content.replace(i,s(o()))})),e.on("PreInit",(()=>{e.serializer.addNodeFilter("img",(n=>{let r,s,i=n.length;for(;i--;)if(r=n[i],s=r.attr("class"),s&&-1!==s.indexOf(a)){const n=r.parent;if(n&&e.schema.getBlockElements()[n.name]&&o()){n.type=3,n.value=t,n.raw=!0,r.remove();continue}r.type=3,r.value=t,r.raw=!0}}))}))})(e),(e=>{e.on("ResolveName",(t=>{"IMG"===t.target.nodeName&&e.dom.hasClass(t.target,a)&&(t.name="pagebreak")}))})(e)}))}()},74368:(e,t,o)=>{o(80922)},80922:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),r=n("content_style"),a=n("content_css_cors"),s=n("body_class"),i=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const c=e.dom.encode,d=null!==(n=r(e))&&void 0!==n?n:"";l+='';const u=a(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='"})),d&&(l+='");const m=i(e),g=s(e),p='