diff --git a/apps/mobile/android/app/src/main/assets/dist/main.js b/apps/mobile/android/app/src/main/assets/dist/main.js
index 154b68379..ec95b0bf0 100644
--- a/apps/mobile/android/app/src/main/assets/dist/main.js
+++ b/apps/mobile/android/app/src/main/assets/dist/main.js
@@ -1 +1 @@
-(()=>{var t={2968:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/dark/content.css"},6202:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/dark/content.min.css"},7286:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/default/content.css"},7362:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/default/content.min.css"},287:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/document/content.css"},2271:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/document/content.min.css"},5417:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/writer/content.css"},874:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/content/writer/content.min.css"},3341:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/content.css"},8786:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/content.inline.css"},4243:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/content.inline.min.css"},9702:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/content.min.css"},1389:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/content.mobile.css"},3513:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/content.mobile.min.css"},1064:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/fonts/tinymce-mobile.woff"},8057:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/skin.css"},6332:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/skin.min.css"},4429:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/skin.mobile.css"},18:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/skin.mobile.min.css"},7899:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/skin.shadowdom.css"},7548:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide-dark/skin.shadowdom.min.css"},9506:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/content.css"},8273:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/content.inline.css"},7251:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/content.inline.min.css"},6122:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/content.min.css"},993:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/content.mobile.css"},8215:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/content.mobile.min.css"},9916:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/fonts/tinymce-mobile.woff"},8382:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/skin.css"},4522:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/skin.min.css"},108:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/skin.mobile.css"},8537:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/skin.mobile.min.css"},818:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/skin.shadowdom.css"},6913:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=n.p+"skins/ui/oxide/skin.shadowdom.min.css"},8785:()=>{tinymce.IconManager.add("default",{icons:{"accessibility-check":'',"action-next":'',"action-prev":'',"align-center":'',"align-justify":'',"align-left":'',"align-none":'',"align-right":'',"arrow-left":'',"arrow-right":'',bold:'',bookmark:'',"border-width":'',brightness:'',browse:'',cancel:'',"change-case":'',"character-count":'',"checklist-rtl":'',checklist:'',checkmark:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',close:'',"code-sample":'',"color-levels":'',"color-picker":'',"color-swatch-remove-color":'',"color-swatch":'',"comment-add":'',comment:'',contrast:'',copy:'',crop:'',"cut-column":'',"cut-row":'',cut:'',"document-properties":'',drag:'',"duplicate-column":'',"duplicate-row":'',duplicate:'',"edit-block":'',"edit-image":'',"embed-page":'',embed:'',emoji:'',export:'',fill:'',"flip-horizontally":'',"flip-vertically":'',"format-painter":'',format:'',fullscreen:'',gallery:'',gamma:'',help:'',"highlight-bg-color":'',home:'',"horizontal-rule":'',"image-options":'',image:'',indent:'',info:'',"insert-character":'',"insert-time":'',invert:'',italic:'',"line-height":'',line:'',link:'',"list-bull-circle":'',"list-bull-default":'',"list-bull-square":'',"list-num-default-rtl":'',"list-num-default":'',"list-num-lower-alpha-rtl":'',"list-num-lower-alpha":'',"list-num-lower-greek-rtl":'',"list-num-lower-greek":'',"list-num-lower-roman-rtl":'',"list-num-lower-roman":'',"list-num-upper-alpha-rtl":'',"list-num-upper-alpha":'',"list-num-upper-roman-rtl":'',"list-num-upper-roman":'',lock:'',ltr:'',"more-drawer":'',"new-document":'',"new-tab":'',"non-breaking":'',notice:'',"ordered-list-rtl":'',"ordered-list":'',orientation:'',outdent:'',"page-break":'',paragraph:'',"paste-column-after":'',"paste-column-before":'',"paste-row-after":'',"paste-row-before":'',"paste-text":'',paste:'',"permanent-pen":'',plus:'',preferences:'',preview:'',print:'',quote:'',redo:'',reload:'',"remove-formatting":'',remove:'',"resize-handle":'',resize:'',"restore-draft":'',"rotate-left":'',"rotate-right":'',rtl:'',save:'',search:'',"select-all":'',selected:'',settings:'',sharpen:'',sourcecode:'',"spell-check":'',"strike-through":'',subscript:'',superscript:'',"table-cell-properties":'',"table-cell-select-all":'',"table-cell-select-inner":'',"table-delete-column":'',"table-delete-row":'',"table-delete-table":'',"table-insert-column-after":'',"table-insert-column-before":'',"table-insert-row-above":'',"table-insert-row-after":'',"table-left-header":'',"table-merge-cells":'',"table-row-properties":'',"table-split-cells":'',"table-top-header":'',table:'',template:'',"temporary-placeholder":'',"text-color":'',toc:'',translate:'',underline:'',undo:'',unlink:'',unlock:'',"unordered-list":'',unselected:'',upload:'',user:'',visualblocks:'',visualchars:'',warning:'',"zoom-in":'',"zoom-out":''}})},6890:(t,e,n)=>{n(8785)},4400:(t,e,n)=>{n(2242)},2242:()=>{!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return function(){return t}},a=u(!1),c=u(!0),s=function(){return l},l=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:a,isSome:a,isNone:c,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:n,orThunk:e,map:s,each:function(){},bind:s,exists:a,forall:c,filter:s,equals:t,equals_:t,toArray:function(){return[]},toString:u("none()")}),f=function(t){var e=u(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:c,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return f(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:l},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(a,(function(e){return n(t,e)}))}};return o},d=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},m=function(t,e,n){var r=function(t,e){for(var n=0;n0&&u[0].nodeName===n},g=function(t,e,n,r,u,a){t.ui.registry.addSplitButton(e,{tooltip:n,icon:"OL"===u?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(t){t(i.map(a,(function(t){return{type:"choiceitem",value:"default"===t?"":t,icon:"list-"+("OL"===u?"num":"bull")+"-"+("disc"===t||"decimal"===t?"default":t),text:function(t){return t.replace(/\-/g," ").replace(/\b\w/g,(function(t){return t.toUpperCase()}))}(t)}})))},onAction:function(){return t.execCommand(r)},onItemAction:function(e,n){o(t,u,n)},select:function(e){return function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul");return function(t){return null==t?l:f(t)}(t.dom.getStyle(e,"listStyleType"))}(t).map((function(t){return e===t})).getOr(!1)},onSetup:function(e){var n=function(n){e.setActive(m(t,n,u))};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}})},h=function(t,e,n,r,o,i){i.length>1?g(t,e,n,r,o,i):function(t,e,n,r,o,i){t.ui.registry.addToggleButton(e,{active:!1,tooltip:n,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:function(e){var n=function(n){e.setActive(m(t,n,o))};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}},onAction:function(){return t.execCommand(r)}})}(t,e,n,r,o)};r.add("advlist",(function(t){t.hasPlugin("lists")&&(function(t){h(t,"numlist","Numbered list","InsertOrderedList","OL",function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]}(t)),h(t,"bullist","Bullet list","InsertUnorderedList","UL",function(t){var e=t.getParam("advlist_bullet_styles","default,circle,square");return e?e.split(/[ ,]/):[]}(t))}(t),function(t){t.addCommand("ApplyUnorderedListStyle",(function(e,n){o(t,"UL",n["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",(function(e,n){o(t,"OL",n["list-style-type"])}))}(t))}))}()},6884:(t,e,n)=>{n(7652)},7652:()=>{!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env"),n=function(t,e){if(e<0&&(e=0),3===t.nodeType){var n=t.data.length;e>n&&(e=n)}return e},r=function(t,e,r){1!==e.nodeType||e.hasChildNodes()?t.setStart(e,n(e,r)):t.setStartBefore(e)},o=function(t,e,r){1!==e.nodeType||e.hasChildNodes()?t.setEnd(e,n(e,r)):t.setEndAfter(e)},i=function(t,e,n){var i,u,a,c,s,l,f,d=function(t){return t.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i)}(t),m=function(t){return t.getParam("default_link_target",!1)}(t);if("A"!==t.selection.getNode().tagName){var g=t.selection.getRng().cloneRange();if(g.startOffset<5){if(!(s=g.endContainer.previousSibling)){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;s=g.endContainer.firstChild.nextSibling}if(l=s.length,r(g,s,l),o(g,s,l),g.endOffset<5)return;i=g.endOffset,u=s}else{if(3!==(u=g.endContainer).nodeType&&u.firstChild){for(;3!==u.nodeType&&u.firstChild;)u=u.firstChild;3===u.nodeType&&(r(g,u,0),o(g,u,u.nodeValue.length))}i=1===g.endOffset?2:g.endOffset-1-e}var h=i;do{r(g,u,i>=2?i-2:0),o(g,u,i>=1?i-1:0),i-=1,f=g.toString()}while(" "!==f&&""!==f&&160!==f.charCodeAt(0)&&i-2>=0&&f!==n);!function(t,e){return t===e||" "===t||160===t.charCodeAt(0)}(g.toString(),n)?0===g.startOffset?(r(g,u,0),o(g,u,h)):(r(g,u,i),o(g,u,h)):(r(g,u,i),o(g,u,h),i+=1),"."===(c=g.toString()).charAt(c.length-1)&&o(g,u,h-1);var p=(c=g.toString().trim()).match(d),v=function(t){return t.getParam("link_default_protocol","http","string")}(t);p&&("www."===p[1]?p[1]=v+"://www.":/@$/.test(p[1])&&!/^mailto:/.test(p[1])&&(p[1]="mailto:"+p[1]),a=t.selection.getBookmark(),t.selection.setRng(g),t.execCommand("createlink",!1,p[1]+p[2]),!1!==m&&t.dom.setAttrib(t.selection.getNode(),"target",m),t.selection.moveToBookmark(a),t.nodeChanged())}};t.add("autolink",(function(t){!function(t){var n;t.on("keydown",(function(e){if(13===e.keyCode)return function(t){i(t,-1,"")}(t)})),e.browser.isIE()?t.on("focus",(function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(t){}}})):(t.on("keypress",(function(e){if(41===e.keyCode)return function(t){i(t,-1,"(")}(t)})),t.on("keyup",(function(e){if(32===e.keyCode)return function(t){i(t,0,"")}(t)})))}(t)}))}()},5209:(t,e,n)=>{n(8578)},8578:()=>{!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env"),n=tinymce.util.Tools.resolve("tinymce.util.Delay"),r=function(t){return t.getParam("min_height",t.getElement().offsetHeight,"number")},o=function(t,e,r,i,u){n.setEditorTimeout(t,(function(){a(t,e),r--?o(t,e,r,i,u):u&&u()}),i)},i=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},u=function(t,e,n,r){var o=parseInt(t.getStyle(e,n,r),10);return isNaN(o)?0:o},a=function(t,n){var o=t.dom,c=t.getDoc();if(c)if(function(t){return t.plugins.fullscreen&&t.plugins.fullscreen.isFullscreen()}(t))i(t,!0);else{var s=c.documentElement,l=function(t){return t.getParam("autoresize_bottom_margin",50,"number")}(t),f=r(t),d=u(o,s,"margin-top",!0),m=u(o,s,"margin-bottom",!0),g=s.offsetHeight+d+m+l;g<0&&(g=0);var h=t.getContainer().offsetHeight-t.getContentAreaContainer().offsetHeight;g+h>r(t)&&(f=g+h);var p=function(t){return t.getParam("max_height",0,"number")}(t);if(p&&f>p?(f=p,i(t,!0)):i(t,!1),f!==n.get()){var v=f-n.get();if(o.setStyle(t.getContainer(),"height",f+"px"),n.set(f),function(t){t.fire("ResizeEditor")}(t),e.browser.isSafari()&&e.mac){var b=t.getWin();b.scrollTo(b.pageXOffset,b.pageYOffset)}t.hasFocus()&&t.selection.scrollIntoView(t.selection.getNode()),e.webkit&&v<0&&a(t,n)}}};t.add("autoresize",(function(t){if(t.settings.hasOwnProperty("resize")||(t.settings.resize=!1),!t.inline){var e=(n=0,{get:function(){return n},set:function(t){n=t}});!function(t,e){t.addCommand("mceAutoResize",(function(){a(t,e)}))}(t,e),function(t,e){t.on("init",(function(){var e=function(t){return t.getParam("autoresize_overflow_padding",1,"number")}(t),n=t.dom;n.setStyles(t.getDoc().documentElement,{height:"auto"}),n.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})})),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(function(){a(t,e)})),function(t){return t.getParam("autoresize_on_init",!0,"boolean")}(t)&&t.on("init",(function(){o(t,e,20,100,(function(){o(t,e,5,1e3)}))}))}(t,e)}var n}))}()},8190:(t,e,n)=>{n(7440)},7440:()=>{!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=function(t){return t.getContent({source_view:!0})}(t);t.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){!function(t,e){t.focus(),t.undoManager.transact((function(){t.setContent(e)})),t.selection.setCursorLocation(),t.nodeChanged()}(t,e.getData().code),e.close()}})};t.add("code",(function(t){return function(t){t.addCommand("mceCodeEditor",(function(){e(t)}))}(t),function(t){t.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return e(t)}}),t.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return e(t)}})}(t),{}}))}()},7259:(t,e,n)=>{n(8492)},8492:()=>{!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var n,r=t.dom,i=t.selection.getSelectedBlocks();i.length&&(n=r.getAttrib(i[0],"dir"),o.each(i,(function(t){r.getParent(t.parentNode,'*[dir="'+e+'"]',r.getRoot())||r.setAttrib(t,"dir",n!==e?e:null)})),t.nodeChanged())},u=function(t){return function(){return t}},a=u(!1),c=u(!0),s=function(){return l},l=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:a,isSome:a,isNone:c,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:n,orThunk:e,map:s,each:function(){},bind:s,exists:a,forall:c,filter:s,equals:t,equals_:t,toArray:function(){return[]},toString:u("none()")}),f=function(t){var e=u(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:c,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return f(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:l},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(a,(function(e){return n(t,e)}))}};return o},d={some:f,none:s,from:function(t){return null==t?l:f(t)}},m=function(t){return"function"==typeof t},g=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},h=g,p=("undefined"!=typeof window?window:Function("return this;")(),function(t){return function(e){return function(t){return t.dom.nodeType}(e)===t}}),v=p(3),b=p(9),y=p(11),w=m(Element.prototype.attachShadow)&&m(Node.prototype.getRootNode)?function(t){return h(t.dom.getRootNode())}:function(t){return b(t)?t:h(t.dom.ownerDocument)},x=function(t){return h(t.dom.host)},C=function(t){var e=v(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o,i,u=e.ownerDocument;return(o=h(e),i=w(o),y(i)?d.some(i):d.none()).fold((function(){return u.body.contains(e)}),(n=C,r=x,function(t){return n(r(t))}))},S=function(t){return"rtl"===function(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||C(t)?r:function(t,e){return function(t){return void 0!==t.style&&m(t.style.getPropertyValue)}(t)?t.style.getPropertyValue(e):""}(n,e)}(t,"direction")?"rtl":"ltr"},k=function(t,e){return function(n){var r=function(t){var r=h(t.element);n.setActive(S(r)===e)};return t.on("NodeChange",r),function(){return t.off("NodeChange",r)}}};r.add("directionality",(function(t){!function(t){t.addCommand("mceDirectionLTR",(function(){i(t,"ltr")})),t.addCommand("mceDirectionRTL",(function(){i(t,"rtl")}))}(t),function(t){t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return t.execCommand("mceDirectionLTR")},onSetup:k(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return t.execCommand("mceDirectionRTL")},onSetup:k(t,"rtl")})}(t)}))}()},4926:(t,e,n)=>{n(755)},755:()=>{!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",(function(t){!function(t){t.addCommand("InsertHorizontalRule",(function(){t.execCommand("mceInsertContent",!1,"
")}))}(t),function(t){t.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})}(t)}))}()},2170:(t,e,n)=>{n(3302)},3302:()=>{!function(){"use strict";var t,e,n,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&/^[0-9]+$/.test(t)&&(t+="px"),t},P=function(t){if(t.margin){var e=String(t.margin).split(" ");switch(e.length){case 1:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[0],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[0];break;case 2:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[1];break;case 3:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[1];break;case 4:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[3]}delete t.margin}return t},I=function(t){return"IMG"===t.nodeName&&(t.hasAttribute("data-mce-object")||t.hasAttribute("data-mce-placeholder"))},L=_.DOM,H=function(t){return t.style.marginLeft&&t.style.marginRight&&t.style.marginLeft===t.style.marginRight?D(t.style.marginLeft):""},F=function(t){return t.style.marginTop&&t.style.marginBottom&&t.style.marginTop===t.style.marginBottom?D(t.style.marginTop):""},V=function(t){return t.style.borderWidth?D(t.style.borderWidth):""},j=function(t,e){return t.hasAttribute(e)?t.getAttribute(e):""},U=function(t,e){return t.style[e]?t.style[e]:""},W=function(t){return null!==t.parentNode&&"FIGURE"===t.parentNode.nodeName},q=function(t,e,n){""===n?t.removeAttribute(e):t.setAttribute(e,n)},$=function(t,e){var n=t.getAttribute("style"),r=e(null!==n?n:"");r.length>0?(t.setAttribute("style",r),t.setAttribute("data-mce-style",r)):t.removeAttribute("style")},G=function(t,e){return function(t,n,r){t.style[n]?(t.style[n]=B(r),$(t,e)):q(t,n,r)}},X=function(t,e){return t.style[e]?D(t.style[e]):j(t,e)},K=function(t,e){var n=B(e);t.style.marginLeft=n,t.style.marginRight=n},Y=function(t,e){var n=B(e);t.style.marginTop=n,t.style.marginBottom=n},J=function(t,e){var n=B(e);t.style.borderWidth=n},Q=function(t,e){t.style.borderStyle=e},Z=function(t){return"FIGURE"===t.nodeName},tt=function(t){return 0===L.getAttrib(t,"alt").length&&"presentation"===L.getAttrib(t,"role")},et=function(t){return tt(t)?"":j(t,"alt")},nt=function(t,e){return{src:j(e,"src"),alt:et(e),title:j(e,"title"),width:X(e,"width"),height:X(e,"height"),class:j(e,"class"),style:t(j(e,"style")),caption:W(e),hspace:H(e),vspace:F(e),border:V(e),borderStyle:U(e,"borderStyle"),isDecorative:tt(e)}},rt=function(t,e,n,r,o){n[r]!==e[r]&&o(t,r,n[r])},ot=function(t,e,n){if(n){L.setAttrib(t,"role","presentation");var r=T(t);k(r,"alt","")}else f(e)?("alt",(r=T(t)).dom.removeAttribute("alt")):(r=T(t),k(r,"alt",e)),"presentation"===L.getAttrib(t,"role")&&L.setAttrib(t,"role","")},it=function(t,e){return function(n,r,o){t(n,o),$(n,e)}},ut=function(t,e,n){var r=nt(t,n);rt(n,r,e,"caption",(function(t,e,n){return function(t){W(t)?function(t){var e=t.parentNode;L.insertAfter(t,e),L.remove(e)}(t):function(t){var e=L.create("figure",{class:"image"});L.insertAfter(e,t),e.appendChild(t),e.appendChild(L.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false"}(t)}(t)})),rt(n,r,e,"src",q),rt(n,r,e,"title",q),rt(n,r,e,"width",G(0,t)),rt(n,r,e,"height",G(0,t)),rt(n,r,e,"class",q),rt(n,r,e,"style",it((function(t,e){return q(t,"style",e)}),t)),rt(n,r,e,"hspace",it(K,t)),rt(n,r,e,"vspace",it(Y,t)),rt(n,r,e,"border",it(J,t)),rt(n,r,e,"borderStyle",it(Q,t)),function(t,e,n){n.alt===e.alt&&n.isDecorative===e.isDecorative||ot(t,n.alt,n.isDecorative)}(n,r,e)},at=function(t,e){var n=t.dom.styles.parse(e),r=P(n),o=t.dom.styles.parse(t.dom.styles.serialize(r));return t.dom.styles.serialize(o)},ct=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return n?t.dom.select("img",n)[0]:e&&("IMG"!==e.nodeName||I(e))?null:e},st=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,(function(e){return!!t.schema.getTextBlockElements()[e.nodeName]}),t.getBody());return r?n.split(r,e):e},lt=Object.prototype.hasOwnProperty,ft=(t=function(t,e){return s(t)&&s(e)?ft(t,e):e},function(){for(var e=new Array(arguments.length),n=0;n0}));return r.then((function(t){return{image:l,imageList:t,classList:o,hasAdvTab:i,hasUploadTab:u,hasUploadUrl:a,hasUploadHandler:s,hasDescription:f,hasImageTitle:d,hasDimensions:m,hasImageCaption:g,url:p,basePath:v,credentials:b,handler:y,prependURL:C,hasAccessibilityOptions:h,automaticUploads:w}}))},wt=function(t){var e=t.imageList.map((function(t){return{name:"images",type:"listbox",label:"Image list",items:t}})),n={name:"alt",type:"input",label:"Alternative description",disabled:t.hasAccessibilityOptions&&t.image.isDecorative},r=t.classList.map((function(t){return{name:"classes",type:"listbox",label:"Class",items:t}}));return S([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],e.toArray(),t.hasAccessibilityOptions&&t.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],t.hasDescription?[n]:[],t.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],t.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:S([r.toArray(),t.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])},xt=function(t){return{title:"General",name:"general",items:wt(t)}},Ct=wt,St=function(t){return{src:{value:t.src,meta:{}},images:t.src,alt:t.alt,title:t.title,dimensions:{width:t.width,height:t.height},classes:t.class,caption:t.caption,style:t.style,vspace:t.vspace,border:t.border,hspace:t.hspace,borderstyle:t.borderStyle,fileinput:[],isDecorative:t.isDecorative}},kt=function(t,e){return{src:t.src.value,alt:0===t.alt.length&&e?null:t.alt,title:t.title,width:t.dimensions.width,height:t.dimensions.height,class:t.classes,style:t.style,caption:t.caption,hspace:t.hspace,vspace:t.vspace,border:t.border,borderStyle:t.borderstyle,isDecorative:t.isDecorative}},Ot=function(t,e,n,r){(function(t,e){var n=e.getData();(function(t,e){return/^(?:[a-zA-Z]+:)?\/\//.test(e)?x.none():t.prependURL.bind((function(t){return e.substring(0,t.length)!==t?x.some(t+e):x.none()}))})(t,n.src.value).each((function(t){e.setData({src:{value:t,meta:n.src.meta}})}))})(e,r),function(t,e){var n=e.getData(),r=n.src.meta;if(void 0!==r){var o=ft({},n);!function(t,e,n){t.hasDescription&&c(n.alt)&&(e.alt=n.alt),t.hasAccessibilityOptions&&(e.isDecorative=n.isDecorative||e.isDecorative||!1),t.hasImageTitle&&c(n.title)&&(e.title=n.title),t.hasDimensions&&(c(n.width)&&(e.dimensions.width=n.width),c(n.height)&&(e.dimensions.height=n.height)),c(n.class)&&bt(t.classList,n.class).each((function(t){e.classes=t.value})),t.hasImageCaption&&d(n.caption)&&(e.caption=n.caption),t.hasAdvTab&&(c(n.style)&&(e.style=n.style),c(n.vspace)&&(e.vspace=n.vspace),c(n.border)&&(e.border=n.border),c(n.hspace)&&(e.hspace=n.hspace),c(n.borderstyle)&&(e.borderstyle=n.borderstyle))}(t,o,r),e.setData(o)}}(e,r),function(t,e,n,r){var o=r.getData(),i=o.src.value,u=o.src.meta||{};u.width||u.height||!e.hasDimensions||t.imageSize(i).then((function(t){n.open&&r.setData({dimensions:t})}))}(t,e,n,r),function(t,e,n){var r=n.getData(),o=bt(t.imageList,r.src.value);e.prevImage=o,n.setData({images:o.map((function(t){return t.value})).getOr("")})}(e,n,r)},Tt=function(t,e,n,r){var o,i=r.getData();r.block("Uploading image"),(o=i.fileinput,function(t,e){return 0=300)n("HTTP Error: "+o.status);else{var t,r,i=JSON.parse(o.responseText);i&&"string"==typeof i.location?e((t=u.basePath,r=i.location,t?t.replace(/\/$/,"")+"/"+r.replace(/^\//,""):r)):n("Invalid JSON: "+o.responseText)}};var i=new FormData;i.append("file",t.blob(),t.filename()),o.send(i)},u=dt.extend({credentials:!1,handler:a},u),{upload:function(t){return u.url||u.handler!==a?function(t,e){return new E((function(n,r){try{e(t,n,r,g)}catch(t){r(t.message)}}))}(t,u.handler):E.reject("Upload url missing from the settings.")}}),l=function(){r.unblock(),URL.revokeObjectURL(c)},f=function(o){r.setData({src:{value:o,meta:{}}}),r.showTab("general"),Ot(t,e,n,r)};(i=o,new E((function(t,e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){e(n.error.message)},n.readAsDataURL(i)}))).then((function(n){var i=t.createBlobCache(o,c,n);e.automaticUploads?s.upload(i).then((function(t){f(t),l()})).catch((function(e){l(),t.alertErr(e)})):(t.addToBlobCache(i),f(i.blobUri()),r.unblock())}))}))},_t=function(t,e,n){return function(r,o){"src"===o.name?Ot(t,e,n,r):"images"===o.name?function(t,e,n,r){var o=r.getData(),i=bt(e.imageList,o.images);i.each((function(t){""===o.alt||n.prevImage.map((function(t){return t.text===o.alt})).getOr(!1)?""===t.value?r.setData({src:t,alt:n.prevAlt}):r.setData({src:t,alt:t.text}):r.setData({src:t})})),n.prevImage=i,Ot(t,e,n,r)}(t,e,n,r):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?function(t,e){var n=e.getData(),r=function(t,e,n){var r=P(t(n.style)),o=ft({},n);return o.vspace=function(t){return t["margin-top"]&&t["margin-bottom"]&&t["margin-top"]===t["margin-bottom"]?D(String(t["margin-top"])):""}(r),o.hspace=function(t){return t["margin-right"]&&t["margin-left"]&&t["margin-right"]===t["margin-left"]?D(String(t["margin-right"])):""}(r),o.border=function(t){return t["border-width"]?D(String(t["border-width"])):""}(r),o.borderstyle=function(t){return t["border-style"]?String(t["border-style"]):""}(r),o.style=function(t,e,n){return e(t(e(n)))}(t,e,r),o}(t.parseStyle,t.serializeStyle,n);e.setData(r)}(t,r):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?function(t,e,n){var r=ft(St(e.image),n.getData()),o=function(t,e){var n=document.createElement("img");return q(n,"style",e.style),(H(n)||""!==e.hspace)&&K(n,e.hspace),(F(n)||""!==e.vspace)&&Y(n,e.vspace),(V(n)||""!==e.border)&&J(n,e.border),(function(t){return U(t,"borderStyle")}(n)||""!==e.borderStyle)&&Q(n,e.borderStyle),t(n.getAttribute("style"))}(t.normalizeCss,kt(r,!1));n.setData({style:o})}(t,e,r):"fileinput"===o.name?Tt(t,e,n,r):"isDecorative"===o.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},Et=function(t){return function(){t.open=!1}},At=function(t){return t.hasAdvTab||t.hasUploadUrl||t.hasUploadHandler?{type:"tabpanel",tabs:S([[xt(t)],t.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{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"}]}]}]}]:[],t.hasUploadTab&&(t.hasUploadUrl||t.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Ct(t)}},Nt=function(t){return function(e){return function(n){var r=ft(St(e.image),n.getData());t.execCommand("mceUpdateImage",!1,kt(r,e.hasAccessibilityOptions)),t.editorUpload.uploadImagesAuto(),n.close()}}},Rt=function(t){return function(e){return function(t){return new E((function(e){var n=document.createElement("img"),r=function(t){n.parentNode&&n.parentNode.removeChild(n),e(t)};n.onload=function(){var t={width:z(n.width,n.clientWidth),height:z(n.height,n.clientHeight)};r(E.resolve(t))},n.onerror=function(){r(E.reject("Failed to get image dimensions for: "+t))};var o=n.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(n),n.src=t}))}(t.documentBaseURI.toAbsolute(e)).then((function(t){return{width:String(t.width),height:String(t.height)}}))}},Mt=function(t){return function(e,n,r){return t.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:r.split(",")[1]})}},zt=function(t){return function(e){t.editorUpload.blobCache.add(e)}},Dt=function(t){return function(e){t.windowManager.alert(e)}},Bt=function(t){return function(e){return at(t,e)}},Pt=function(t){return function(e){return t.dom.parseStyle(e)}},It=function(t){return function(e,n){return t.dom.serializeStyle(e,n)}},Lt=function(t){var e={onSubmit:Nt(t),imageSize:Rt(t),addToBlobCache:zt(t),createBlobCache:Mt(t),alertErr:Dt(t),normalizeCss:Bt(t),parseStyle:Pt(t),serializeStyle:It(t)};return{open:function(){yt(t).then(function(t){return function(e){var n=function(t){return{prevImage:bt(t.imageList,t.image.src),prevAlt:t.image.alt,open:!0}}(e);return{title:"Insert/Edit Image",size:"normal",body:At(e),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:St(e.image),onSubmit:t.onSubmit(e),onChange:_t(t,e,n),onClose:Et(n)}}}(e)).then(t.windowManager.open)}}},Ht=function(t){t.addCommand("mceImage",Lt(t).open),t.addCommand("mceUpdateImage",(function(e,n){t.undoManager.transact((function(){return function(t,e){var n=ct(t);if(n){var r=nt((function(e){return at(t,e)}),n),o=i(i({},r),e);o.src?function(t,e){var n=ct(t);if(ut((function(e){return at(t,e)}),e,n),function(t,e){t.dom.setAttrib(e,"src",e.getAttribute("src"))}(t,n),Z(n.parentNode)){var r=n.parentNode;st(t,r),t.selection.select(n.parentNode)}else t.selection.select(n),function(t,e,n){var r=function(){n.onload=n.onerror=null,t.selection&&(t.selection.select(n),t.nodeChanged())};n.onload=function(){e.width||e.height||!N(t)||t.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r}(t,e,n)}(t,o):function(t,e){if(e){var n=t.dom.is(e.parentNode,"figure.image")?e.parentNode:e;t.dom.remove(n),t.focus(),t.nodeChanged(),t.dom.isEmpty(t.getBody())&&(t.setContent(""),t.selection.setCursorLocation())}}(t,n)}else e.src&&function(t,e){var n=function(t,e){var n=document.createElement("img");if(ut(t,i(i({},e),{caption:!1}),n),ot(n,e.alt,e.isDecorative),e.caption){var r=L.create("figure",{class:"image"});return r.appendChild(n),r.appendChild(L.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return n}((function(e){return at(t,e)}),e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),Z(r)){var o=st(t,r);t.selection.select(o)}else t.selection.select(r)}(t,i(i({},{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}),e))}(t,n)}))}))},Ft=function(t){var e=t.attr("class");return e&&/\bimage\b/.test(e)},Vt=function(t){return function(e){for(var n=e.length,r=function(e){e.attr("contenteditable",t?"true":null)};n--;){var o=e[n];Ft(o)&&(o.attr("contenteditable",t?"false":null),dt.each(o.getAll("figcaption"),r))}}};o.add("image",(function(t){!function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("figure",Vt(!0)),t.serializer.addNodeFilter("figure",Vt(!1))}))}(t),function(t){t.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Lt(t).open,onSetup:function(e){return t.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),t.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Lt(t).open}),t.ui.registry.addContextMenu("image",{update:function(t){return Z(t)||"IMG"===t.nodeName&&!I(t)?["image"]:[]}})}(t),Ht(t)}))}()},5053:(t,e,n)=>{n(3253)},3253:()=>{!function(){"use strict";var t,e,n,r=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return function(){return t}},a=u(!1),c=u(!0),s=function(){return l},l=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:a,isSome:a,isNone:c,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:n,orThunk:e,map:s,each:function(){},bind:s,exists:a,forall:c,filter:s,equals:t,equals_:t,toArray:function(){return[]},toString:u("none()")}),f=function(t){var e=u(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:c,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return f(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:l},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(a,(function(e){return n(t,e)}))}};return o},d={some:f,none:s,from:function(t){return null==t?l:f(t)}},m=function(t){return!function(t){return null==t}(t)},g=("function",function(t){return"function"==typeof t});function h(t,e){return b(document.createElement("canvas"),t,e)}function p(t){var e=h(t.width,t.height);return v(e).drawImage(t,0,0),e}function v(t){return t.getContext("2d")}function b(t,e,n){return t.width=e,t.height=n,t}var y=window.Promise?window.Promise:function(){var t=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,r(u,this),r(a,this))},e=window,n=t.immediateFn||"function"==typeof e.setImmediate&&e.setImmediate||function(t){setTimeout(t,1)};function r(t,e){return function(){return t.apply(e,arguments)}}var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t){var e=this;null!==this._state?n((function(){var n=e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void t.reject(e)}t.resolve(r)}else(e._state?t.resolve:t.reject)(e._value)})):this._deferreds.push(t)}function u(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void l(r(e,t),r(u,this),r(a,this))}this._state=!0,this._value=t,c.call(this)}catch(t){a.call(this,t)}}function a(t){this._state=!1,this._value=t,c.call(this)}function c(){for(var t=0,e=this._deferreds;t=300},B=function(t,e,n){return void 0===n&&(n=!1),e?function(t,e){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return E(function(t,e){var n=-1===t.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(t)?t:t+n+"apiKey="+encodeURIComponent(e)}(t,e),n).then((function(t){return D(t.status)?function(t,e){return"application/json"===(null==e?void 0:e.type)&&(400===t||403===t||404===t||500===t)}(e=t.status,n=t.blob)?z(n):R(e):y.resolve(t.blob);var e,n}))}(t,e):function(t,e){return E(t,{},e).then((function(t){return D(t.status)?R(t.status):y.resolve(t.blob)}))}(t,n)},P=function(t){return O(t)},I=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},L=I,H=("undefined"!=typeof window?window:Function("return this;")(),function(t,e){return function(t,n){return S(t.dom.childNodes,(function(t){return function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(L(t),e)})).map(L)}(t)}),F=tinymce.util.Tools.resolve("tinymce.util.Delay"),V=tinymce.util.Tools.resolve("tinymce.util.Promise"),j=tinymce.util.Tools.resolve("tinymce.util.URI"),U=function(t){return t.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")},W=function(t){return t.getParam("imagetools_proxy")};function q(t){var e,n;function r(t){return/^[0-9\.]+px$/.test(t)}return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)}function $(t){return{w:t.naturalWidth,h:t.naturalHeight}}var G=0,X=function(t){return H(L(t),"img")},K=function(t,e){return t.dom.is(e,"figure")},Y=function(t,e){return t.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")},J=function(t,e){var n=function(e){return Y(t,e)&&(et(t,e)||nt(t,e)||m(W(t)))};return K(t,e)?X(e).bind((function(t){return n(t.dom)?d.some(t.dom):d.none()})):n(e)?d.some(e):d.none()},Q=function(t,e){t.notificationManager.open({text:e,type:"error"})},Z=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return null!==n&&K(t,n)?X(n):Y(t,e)?d.some(L(e)):d.none()},tt=function(t,e,n){var r=e.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return m(r)?t.dom.encode(r[n]):null},et=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new j(n).host===t.documentBaseURI.host},nt=function(t,e){return-1!==i.inArray(function(t){return t.getParam("imagetools_cors_hosts",[],"string[]")}(t),new j(e.src).host)},rt=function(t,e){if(nt(t,e))return B(e.src,null,function(t,e){return-1!==i.inArray(function(t){return t.getParam("imagetools_credentials_hosts",[],"string[]")}(t),new j(e.src).host)}(t,e));if(!et(t,e)){var n=W(t),r=n+(-1===n.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),o=function(t){return t.getParam("api_key",t.getParam("imagetools_api_key","","string"),"string")}(t);return B(r,o,!1)}return function(t){var e,n=t.src;return 0===n.indexOf("data:")?x(n):(e=n,new y((function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.onload=function(){200===this.status&&t(this.response)},r.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},r.send()})))}(e)},ot=function(t,e){var n=t.editorUpload.blobCache.getByUri(e.src);return n?V.resolve(n.blob()):function(t,e){return function(t){return d.from(t.getParam("imagetools_fetch_image",null,"function"))}(t).fold((function(){return rt(t,e)}),(function(t){return t(e)}))}(t,e)},it=function(t){F.clearTimeout(t.get())},ut=function(t,e,n,r,o,i,u){return n.toBlob().then((function(a){var c,s,l,f,d=t.editorUpload.blobCache;c=i.src;var g=e.type===a.type;return function(t){return t.getParam("images_reuse_filename",!1,"boolean")}(t)&&(f=d.getByUri(c),m(f)?(c=f.uri(),s=f.name(),l=f.filename()):(s=tt(t,c,2),l=tt(t,c,1))),f=d.create({id:"imagetools"+G++,blob:a,base64:n.toBase64(),uri:c,name:s,filename:g?l:void 0}),d.add(f),t.undoManager.transact((function(){t.$(i).on("load",(function e(){t.$(i).off("load",e),t.nodeChanged(),r?t.editorUpload.uploadImagesAuto():(it(o),function(t,e){var n=F.setEditorTimeout(t,(function(){t.editorUpload.uploadImagesAuto()}),function(t){return t.getParam("images_upload_timeout",3e4,"number")}(t));e.set(n)}(t,o))})),u&&t.$(i).attr({width:u.w,height:u.h}),t.$(i).attr({src:f.blobUri()}).removeAttr("data-mce-src")})),f}))},at=function(t,e,n,r){return function(){return Z(t).fold((function(){Q(t,"Could not find selected image")}),(function(o){return t._scanForImages().then((function(){return ot(t,o.dom)})).then((function(i){return P(i).then(n).then((function(n){return ut(t,i,n,!1,e,o.dom,r)}))})).catch((function(e){Q(t,e)}))}))}},ct=function(t,e,n){return function(){var r=Z(t).fold((function(){return null}),(function(t){var e=q(t.dom);return e?{w:e.h,h:e.w}:null}));return at(t,e,(function(t){return function(t,e){return function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){var r=h(t.width,t.height),o=v(r),i=0,u=0;return 90!==(n=n<0?360+n:n)&&270!==n||b(r,r.height,r.width),90!==n&&180!==n||(i=r.width),270!==n&&180!==n||(u=r.height),o.translate(i,u),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),T(r,e)}(n,t.getType(),e)}))}(t,e)}(t,n)}),r)()}},st=function(t,e,n){return function(){return at(t,e,(function(t){return function(t,e){return function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){var r=h(t.width,t.height),o=v(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),T(r,e)}(n,t.getType(),e)}))}(t,e)}(t,n)}))()}},lt=function(t,e){return function(){var n=Z(t),r=n.map((function(t){return $(t.dom)}));n.each((function(o){J(t,o.dom).each((function(i){ot(t,o.dom).then((function(o){var i=function(t){return{blob:t,url:URL.createObjectURL(t)}}(o);t.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:i}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(o){var i=o.getData().imagetools.blob;n.each((function(n){r.each((function(r){!function(t,e,n,r,o){(function(t){return w(t)})(o).then((function(t){var e=$(t);return r.w===e.w&&r.h===e.h||q(n)&&function(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",String(e.w)),t.setAttribute("height",String(e.h))))}(n,e),URL.revokeObjectURL(t.src),o})).then(P).then((function(r){return ut(t,o,r,!0,e,n)})).catch((function(){}))}(t,e,n.dom,r,i)}))})),o.close()},onCancel:function(){},onAction:function(t,e){switch(e.name){case"save-state":e.value?t.enable("save"):t.disable("save");break;case"disable":t.disable("save"),t.disable("cancel");break;case"enable":t.enable("cancel")}}})}))}))}))}};o.add("imagetools",(function(t){var e=r(0),n=r(null);!function(t,e){i.each({mceImageRotateLeft:ct(t,e,-90),mceImageRotateRight:ct(t,e,90),mceImageFlipVertical:st(t,e,"v"),mceImageFlipHorizontal:st(t,e,"h"),mceEditImage:lt(t,e)},(function(e,n){t.addCommand(n,e)}))}(t,e),function(t){var e=function(e){return function(){return t.execCommand(e)}};t.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:e("mceImageRotateLeft")}),t.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:e("mceImageRotateRight")}),t.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:e("mceImageFlipVertical")}),t.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:e("mceImageFlipHorizontal")}),t.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:e("mceEditImage"),onSetup:function(e){var n=function(){var n=Z(t).forall((function(e){return J(t,e.dom).isNone()}));e.setDisabled(n)};return t.on("NodeChange",n),function(){t.off("NodeChange",n)}}}),t.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:e("mceImage")}),t.ui.registry.addContextMenu("imagetools",{update:function(n){return J(t,n).fold((function(){return[]}),(function(t){return[{text:"Edit image",icon:"edit-image",onAction:e("mceEditImage")}]}))}})}(t),function(t){t.ui.registry.addContextToolbar("imagetools",{items:U(t),predicate:function(e){return J(t,e).isSome()},position:"node",scope:"node"})}(t),function(t,e,n){t.on("NodeChange",(function(r){var o=n.get(),i=J(t,r.element);o&&!i.exists((function(t){return o.src===t.src}))&&(it(e),t.editorUpload.uploadImagesAuto(),n.set(null)),i.each(n.set)}))}(t,e,n)}))}()},2682:(t,e,n)=>{n(7384)},7384:()=>{!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),i=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},u=function(t){return function(e){return typeof e===t}},a=i("string"),c=i("array"),s=(null,function(t){return null===t}),l=u("boolean"),f=u("function"),d=function(t){var e=t.getParam("link_assume_external_targets",!1);return l(e)&&e?1:!a(e)||"http"!==e&&"https"!==e?0:e},m=function(t){return t.getParam("default_link_target")},g=function(t){return t.getParam("target_list",!0)},h=function(t){return t.getParam("rel_list",[],"array")},p=function(t){return t.getParam("link_title",!0,"boolean")},v=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},b=function(t){return t.getParam("link_default_protocol","http","string")},y=function(){},w=function(t){return function(){return t}},x=w(!1),C=w(!0),S=function(){return k},k=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:x,isSome:x,isNone:C,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:w(null),getOrUndefined:w(void 0),or:n,orThunk:e,map:S,each:y,bind:S,exists:x,forall:C,filter:S,equals:t,equals_:t,toArray:function(){return[]},toString:w("none()")}),O=function(t){var e=w(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:C,isNone:x,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return O(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:k},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(x,(function(e){return n(t,e)}))}};return o},T={some:O,none:S,from:function(t){return null==t?k:O(t)}},_=Array.prototype.indexOf,E=Array.prototype.push,A=function(t){for(var e=[],n=0,r=t.length;n0?t.concat(n):n}(r):o(r);return i.length>0?function(t){return z.trim(t.sort().join(" "))}(i):""},Q=function(t,e){return e=e||t.selection.getNode(),nt(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},Z=function(t,e){return(e?e.innerText||e.textContent:t.getContent({format:"text"})).replace(/\uFEFF/g,"")},tt=function(t){return z.grep(t,G).length>0},et=function(t){var e=t.schema.getTextInlineElements();return 0===X(t.selection.getRng(),(function(t){return 1===t.nodeType&&!$(t)&&!W(e,t.nodeName.toLowerCase())})).length},nt=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},rt=function(t,e,n){var r=t.selection.getNode(),o=Q(t,r),i=function(t,e){var n=V({},e);if(!(h(t).length>0)&&!1===v(t)){var r=J(n.rel,"_blank"===n.target);n.rel=r||null}return T.from(n.target).isNone()&&!1===g(t)&&(n.target=m(t)),n.href=function(t,e){return"http"!==e&&"https"!==e||K(t)?t:e+"://"+t}(n.href,d(t)),n}(t,function(t){return e=["title","rel","class","target"],n=function(e,n){return t[n].each((function(t){e[n]=t.length>0?t:null})),e},r={href:t.href},function(t,e){for(var n=0,r=t.length;n0;return void 0!==o?st(o,n).map((function(e){return{url:{value:e.value,meta:{text:i?t:e.text,attach:y}},text:i?t:e.text}})):T.none()}(n.text,r.name,u,t)};return{onChange:function(t,e){var o,i,u,a,c=e.name;return"url"===c?(o=t(),i=o.url,u=M(n.text.length<=0,T.from(i.meta.text).getOr(i.value)),a=function(t){return M(n.title.length<=0,T.from(t.meta.title).getOr(""))}(o.url),u.isSome()||a.isSome()?T.some(V(V({},u.map((function(t){return{text:t}})).getOr({})),a.map((function(t){return{title:t}})).getOr({}))):T.none()):function(t,e){return _.call(t,e)}(["anchor","link"],c)>-1?r(t(),e):"text"===c||"title"===c?(n[c]=t()[c],T.none()):T.none()}}},ft=tinymce.util.Tools.resolve("tinymce.util.Delay"),dt=tinymce.util.Tools.resolve("tinymce.util.Promise"),mt=function(t){var e=t.href;return e.indexOf("@")>0&&-1===e.indexOf("/")&&-1===e.indexOf("mailto:")?T.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return V(V({},t),{href:"mailto:"+e})}}):T.none()},gt=function(t,e){return function(n){var r=n.href;return 1===t&&!K(r)||0===t&&/^\s*www(\.|\d\.)/i.test(r)?T.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+e+":// prefix?",preprocess:function(t){return V(V({},t),{href:e+"://"+r})}}):T.none()}},ht=function(t){var e=t.dom.select("a:not([href])"),n=A(function(t,e){for(var n=t.length,r=new Array(n),o=0;o0?T.some([{text:"None",value:""}].concat(n)):T.none()},pt=function(t){var e=function(t){return t.getParam("link_class_list",[],"array")}(t);return e.length>0?I(e):T.none()},vt=tinymce.util.Tools.resolve("tinymce.util.XHR"),bt=function(t,e){var n=h(t);if(n.length>0){var r=e.is("_blank");return(!1===v(t)?L((function(t){return J(F(t),r)})):I)(n)}return T.none()},yt=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],wt=function(t){var e=g(t);return c(e)?I(e).orThunk((function(){return T.some(yt)})):!1===e?T.none():T.some(yt)},xt=function(t,e,n){var r=t.getAttrib(e,n);return null!==r&&r.length>0?T.some(r):T.none()},Ct=function(t,e){return function(t){var e=function(e){return t.convertURL(e.value||e.url,"href")},n=function(t){return t.getParam("link_list")}(t);return new dt((function(t){a(n)?vt.send({url:n,success:function(e){return t(function(t){try{return T.some(JSON.parse(t))}catch(t){return T.none()}}(e))},error:function(e){return t(T.none())}}):f(n)?n((function(e){return t(T.some(e))})):t(T.from(n))})).then((function(t){return t.bind(L(e)).map((function(t){return t.length>0?[{text:"None",value:""}].concat(t):t}))}))}(t).then((function(n){var r=function(t,e){var n=t.dom,r=et(t)?T.some(Z(t.selection,e)):T.none(),o=e?T.some(n.getAttrib(e,"href")):T.none(),i=e?T.from(n.getAttrib(e,"target")):T.none(),u=xt(n,e,"rel"),a=xt(n,e,"class");return{url:o,text:r,title:xt(n,e,"title"),target:i,rel:u,linkClass:a}}(t,e);return{anchor:r,catalogs:{targets:wt(t),rels:bt(t,r.target),classes:pt(t),anchor:ht(t),link:n},optNode:T.from(e),flags:{titleEnabled:p(t)}}}))},St=function(t){(function(t){var e=Q(t);return Ct(t,e)})(t).then((function(e){var n=function(t,e){return function(n){var r=n.getData();if(!r.url.value)return ut(t),void n.close();var o=function(t){return T.from(r[t]).filter((function(n){return!e.anchor[t].is(n)}))},i={href:r.url.value,text:o("text"),target:o("target"),rel:o("rel"),class:o("linkClass"),title:o("title")},u={href:r.url.value,attach:void 0!==r.url.meta&&r.url.meta.attach?r.url.meta.attach:function(){}};(function(t,e){return N([mt,gt(d(t),b(t))],(function(t){return t(e)})).fold((function(){return dt.resolve(e)}),(function(n){return new dt((function(r){!function(t,e,n){var r=t.selection.getRng();ft.setEditorTimeout(t,(function(){t.windowManager.confirm(e,(function(e){t.selection.setRng(r),n(e)}))}))}(t,n.message,(function(t){r(t?n.preprocess(e):e)}))}))}))})(t,i).then((function(e){it(t,u,e)})),n.close()}}(t,e);return function(t,e,n){var r=t.anchor.text.map((function(){return{name:"text",type:"input",label:"Text to display"}})).toArray(),o=t.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],i=function(t,e){var n=t.anchor,r=n.url.getOr("");return{url:{value:r,meta:{original:{value:r}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:r,link:r,rel:n.rel.getOr(""),target:n.target.or(e).getOr(""),linkClass:n.linkClass.getOr("")}}(t,T.from(m(n))),u=t.catalogs,a=lt(i,u);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:A([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],r,o,R([u.anchor.map(H("anchor","Anchors")),u.rels.map(H("rel","Rel")),u.targets.map(H("target","Open link in...")),u.link.map(H("link","Link list")),u.classes.map(H("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:i,onChange:function(t,e){var n=e.name;a.onChange(t.getData,{name:n}).each((function(e){t.setData(e)}))},onSubmit:e}}(e,n,t)})).then((function(e){t.windowManager.open(e)}))},kt=function(t,e){return t.dom.getParent(e,"a[href]")},Ot=function(t){return kt(t,t.selection.getStart())},Tt=function(t,e){if(e){var n=Y(e);if(/^#/.test(n)){var r=t.$(n);r.length&&t.selection.scrollIntoView(r[0],!0)}else!function(t){var e=document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),function(t,e){document.body.appendChild(t),t.dispatchEvent(e),document.body.removeChild(t)}(e,n)}(e.href)}},_t=function(t){return function(){St(t)}},Et=function(t){return function(){Tt(t,Ot(t))}},At=function(t,e){return t.on("NodeChange",e),function(){return t.off("NodeChange",e)}},Nt=function(t){return function(e){return At(t,(function(){e.setActive(!t.mode.isReadOnly()&&null!==Q(t,t.selection.getNode()))}))}},Rt=function(t){return function(e){var n=function(){return e.setDisabled(null===Q(t,t.selection.getNode()))};return n(),At(t,n)}},Mt=function(t){return function(e){var n=function(e){return tt(e)||(n=t.selection.getRng(),X(n,G).length>0);var n},r=t.dom.getParents(t.selection.getStart());return e.setDisabled(!n(r)),At(t,(function(t){return e.setDisabled(!n(t.parents))}))}};r.add("link",(function(t){!function(t){t.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:_t(t),onSetup:Nt(t)}),t.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Et(t),onSetup:Rt(t)}),t.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return ut(t)},onSetup:Mt(t)})}(t),function(t){t.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Et(t),onSetup:Rt(t)}),t.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:_t(t)}),t.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return ut(t)},onSetup:Mt(t)})}(t),function(t){t.ui.registry.addContextMenu("link",{update:function(e){return tt(t.dom.getParents(e,"a"))?"link unlink openlink":"link"}})}(t),function(t){var e=function(e){var n=t.selection.getNode();return e.setDisabled(!Q(t,n)),function(){}};t.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Nt(t)},label:"Link",predicate:function(e){return!!Q(t,e)&&function(t){return t.getParam("link_context_toolbar",!1,"boolean")}(t)},initValue:function(){var e=Q(t);return e?Y(e):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(e){var n=t.selection.getNode();return e.setActive(!!Q(t,n)),Nt(t)(e)},onAction:function(e){var n=Q(t),r=e.getValue();if(n)t.undoManager.transact((function(){t.dom.setAttrib(n,"href",r),function(t){t.selection.collapse(!1)}(t),e.hide()}));else{var o={href:r,attach:function(){}},i=et(t)?T.some(Z(t.selection,n)).filter((function(t){return t.length>0})).or(T.from(r)):T.none();it(t,o,{href:r,text:i,title:T.none(),rel:T.none(),target:T.none(),class:T.none()}),e.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:e,onAction:function(e){ut(t),e.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:e,onAction:function(e){Et(t)(),e.hide()}}]})}(t),function(t){t.on("click",(function(e){var n=kt(t,e.target);n&&o.metaKeyPressed(e)&&(e.preventDefault(),Tt(t,n))})),t.on("keydown",(function(e){var n=Ot(t);n&&13===e.keyCode&&function(t){return!0===t.altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey}(e)&&(e.preventDefault(),Tt(t,n))}))}(t),function(t){t.addCommand("mceLink",(function(){!function(t){return t.getParam("link_quicklink",!1,"boolean")}(t)?_t(t)():t.fire("contexttoolbar-show",{toolbarKey:"quicklink"})}))}(t),function(t){t.addShortcut("Meta+K","",(function(){t.execCommand("mceLink")}))}(t)}))}()},1236:(t,e,n)=>{n(7585)},7585:()=>{!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){},i=function(t){return function(){return t}},u=function(t){return function(e){return!t(e)}},a=i(!1),c=i(!0),s=function(){return l},l=function(){var t=function(t){return t.isNone()},e=function(t){return t()},n=function(t){return t};return{fold:function(t,e){return t()},is:a,isSome:a,isNone:c,getOr:n,getOrThunk:e,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:n,orThunk:e,map:s,each:o,bind:s,exists:a,forall:c,filter:s,equals:t,equals_:t,toArray:function(){return[]},toString:i("none()")}}(),f=function(t){var e=i(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:c,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return f(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:l},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(a,(function(e){return n(t,e)}))}};return o},d={some:f,none:s,from:function(t){return null==t?l:f(t)}},m=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},g=function(t){return function(e){return typeof e===t}},h=m("string"),p=m("array"),v=g("boolean"),b=g("function"),y=g("number"),w=Array.prototype.slice,x=Array.prototype.push,C=function(t,e){for(var n=t.length,r=new Array(n),o=0;o=0&&e0)&&r},Qt=function(t,e){return t.isChildOf(e,t.getRoot())},Zt=function(t,e){var n,r,o,i=t.dom,u=t.schema.getBlockElements(),a=i.createFragment(),c=function(t){var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e}(t);if(c&&((r=i.create(c)).tagName===c.toUpperCase()&&i.setAttribs(r,function(t){return t.getParam("forced_root_block_attrs",{})}(t)),Yt(e.firstChild,u)||a.appendChild(r)),e)for(;n=e.firstChild;){var s=n.nodeName;o||"SPAN"===s&&"bookmark"===n.getAttribute("data-mce-type")||(o=!0),Yt(n,u)?(a.appendChild(n),r=null):c?(r||(r=i.create(c),a.appendChild(r)),r.appendChild(n)):a.appendChild(n)}return c?o||r.appendChild(i.create("br",{"data-mce-bogus":"1"})):a.appendChild(i.create("br")),a},te=It.DOM,ee=function(t){pt(t,"dt")&&Pt(t,"dd")},ne=function(t,e){if(Vt(t))return{container:t,offset:e};var n=vt.getNode(t,e);return Vt(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&Vt(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Vt(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},re=function(t){var e=t.cloneRange(),n=ne(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);var r=ne(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},oe=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),ie=function(t,e){var n=e||t.selection.getStart(!0);return t.dom.getParent(n,"OL,UL,DL",ae(t,n))},ue=function(t){var e=t.selection.getSelectedBlocks();return Lt.grep(function(t,e){var n=Lt.map(e,(function(e){return t.dom.getParent(e,"li,dd,dt",ae(t,e))||e}));return oe.unique(n)}(t,e),(function(t){return qt(t)}))},ae=function(t,e){var n=t.dom.getParents(e,"TD,TH");return n.length>0?n[0]:t.getBody()},ce=function(t,e){var n=t.dom.getParents(e,"ol,ul",ae(t,e));return M(n)},se=function(t,e){var n=C(e,(function(e){return ce(t,e).getOr(e)}));return oe.unique(n)},le=function(t,e,n){return t.isSome()&&e.isSome()?d.some(n(t.getOrDie(),e.getOrDie())):d.none()},fe=function(t,e,n){return t.fire("ListMutation",{action:e,element:n})},de=function(t,e,n){if(!h(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);(function(t){return void 0!==t.style&&b(t.style.getPropertyValue)})(t)&&t.style.setProperty(e,n)},me=function(t,e){Mt(t.item,e.list)},ge=function(t,e){var n={list:dt(e,t),item:dt("li",t)};return Mt(n.list,n.item),n},he=function(t){return pt(t,"OL,UL")},pe=function(t){return At(t).map(he).getOr(!1)},ve=function(t){return t.depth>0},be=function(t){return t.isSelected},ye=function(t){var e=_t(t),n=Nt(t).map(he).getOr(!1)?e.slice(0,-1):e;return C(n,Bt)},we=function(t){return S(t,(function(e,n){(function(t,e){var n=t[e].depth,r=function(t){return t.depth===n&&!t.dirty},o=function(t){return t.depthe.length?function(t,e,n){var r,o=function(t,e,n){for(var r=[],o=0;o0?function(t,e,n,r,o){if(e.nodeName!==r||Ve(o)){var i=Re(t.selection.getRng(!0));Lt.each([e].concat(n),(function(e){!function(t,e,n,r){if(e.nodeName!==n){var o=t.dom.rename(e,n);Ie(t.dom,o,r),fe(t,ze(n),o)}else Ie(t.dom,e,r),fe(t,ze(n),e)}(t,e,r,o)})),t.selection.setRng(Me(i))}else Ee(t)}(t,r,o,e,n):function(t,e,n,r){if(e!==t.getBody())if(e)if(e.nodeName!==n||Ve(r)||De(e)){var o=Re(t.selection.getRng(!0));Ie(t.dom,e,r);var i=t.dom.rename(e,n);Fe(t.dom,i),t.selection.setRng(Me(o)),fe(t,ze(n),i)}else Ee(t);else(function(t,e,n){void 0===n&&(n={});var r=t.selection.getRng(),o="LI",i=ae(t,t.selection.getStart(!0)),u=t.dom;if("false"!==u.getContentEditable(t.selection.getNode())){"DL"===(e=e.toUpperCase())&&(o="DT");var a=Re(r);Lt.each(function(t,e,n){for(var r,o=[],i=t.dom,u=Le(t,e,!0,n),a=Le(t,e,!1,n),c=[],s=u;s&&(c.push(s),s!==a);s=s.nextSibling);return Lt.each(c,(function(e){if(Kt(t,e))return o.push(e),void(r=null);if(i.isBlock(e)||Xt(e))return Xt(e)&&i.remove(e),void(r=null);var u=e.nextSibling;Ae.isBookmarkNode(e)&&(Kt(t,u)||!u&&e.parentNode===n)?r=null:(r||(r=i.create("p"),e.parentNode.insertBefore(r,e),o.push(r)),r.appendChild(e))})),o}(t,r,i),(function(r){var i,a=r.previousSibling;a&&jt(a)&&a.nodeName===e&&function(t,e,n){var r=t.getStyle(e,"list-style-type"),o=n?n["list-style-type"]:"";return r===(null===o?"":o)}(u,a,n)?(i=a,r=u.rename(r,o),a.appendChild(r)):(i=u.create(e),r.parentNode.insertBefore(i,r),i.appendChild(r),r=u.rename(r,o)),function(t,e,n){Lt.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],(function(n){var r;return t.setStyle(e,((r={})[n]="",r))}))}(u,r),Ie(u,i,n),Fe(t.dom,i)})),t.selection.setRng(Me(a))}})(t,n,r),fe(t,ze(n),e)}(t,r,e,n)},Ue=It.DOM,We=function(t,e,n,r){var o=e.startContainer,i=e.startOffset;if(Vt(o)&&(n?i0))return o;var u=t.schema.getNonEmptyElements();1===o.nodeType&&(o=vt.getNode(o,i));var a=new bt(o,r);for(n&&function(t,e){return!!Xt(e)&&t.isBlock(e.nextSibling)&&!Xt(e.previousSibling)}(t.dom,o)&&a.next();o=a[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(Vt(o)&&o.data.length>0)return o}},qe=function(t,e){var n=e.childNodes;return 1===n.length&&!jt(n[0])&&t.isBlock(n[0])},$e=function(t,e,n){var r,o=e.parentNode;if(Qt(t,e)&&Qt(t,n)){jt(n.lastChild)&&(r=n.lastChild),o===n.lastChild&&Xt(o.previousSibling)&&t.remove(o.previousSibling);var i=n.lastChild;i&&Xt(i)&&e.hasChildNodes()&&t.remove(i),Jt(t,n,!0)&&t.$(n).empty(),function(t,e,n){var r,o=qe(t,n)?n.firstChild:n;if(function(t,e){qe(t,e)&&t.remove(e.firstChild,!0)}(t,e),!Jt(t,e,!0))for(;r=e.firstChild;)o.appendChild(r)}(t,e,n),r&&n.appendChild(r);var u=ht(mt(n),mt(e))?t.getParents(e,jt,n):[];t.remove(e),S(u,(function(e){Jt(t,e)&&e!==t.getRoot()&&t.remove(e)}))}},Ge=function(t,e){var n=t.dom,r=t.selection,o=r.getStart(),i=ae(t,o),u=n.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===t.getBody()&&Jt(n,a))return!0;var c=re(r.getRng()),s=n.getParent(We(t,c,e,i),"LI",i);if(s&&s!==u)return t.undoManager.transact((function(){var n;e?function(t,e,n,r){var o=t.dom;if(o.isEmpty(r))!function(t,e,n){t.dom.$(n).empty(),$e(t.dom,e,n),t.selection.setCursorLocation(n)}(t,n,r);else{var i=Re(e);$e(o,n,r),t.selection.setRng(Me(i))}}(t,c,s,u):(n=u).parentNode.firstChild===n?_e(t):function(t,e,n,r){var o=Re(e);$e(t.dom,n,r);var i=Me(o);t.selection.setRng(i)}(t,c,u,s)})),!0;if(!s&&!e&&0===c.startOffset&&0===c.endOffset)return t.undoManager.transact((function(){Ee(t)})),!0}return!1},Xe=function(t,e){return t.selection.isCollapsed()?function(t,e){return Ge(t,e)||function(t,e){var n=t.dom,r=t.selection.getStart(),o=ae(t,r),i=n.getParent(r,n.isBlock,o);if(i&&n.isEmpty(i)){var u=re(t.selection.getRng()),a=n.getParent(We(t,u,e,o),"LI",o);if(a)return t.undoManager.transact((function(){!function(t,e,n){var r=t.getParent(e.parentNode,t.isBlock,n);t.remove(e),r&&t.isEmpty(r)&&t.remove(r)}(n,i,o),Fe(n,a.parentNode),t.selection.select(a,!0),t.selection.collapse(e)})),!0}return!1}(t,e)}(t,e):function(t){var e=t.selection.getStart(),n=ae(t,e);return!!(t.dom.getParent(e,"LI,DT,DD",n)||ue(t).length>0)&&(t.undoManager.transact((function(){var e,n;t.execCommand("Delete"),e=t.dom,n=t.getBody(),Lt.each(Lt.grep(e.select("ol,ul",n)),(function(t){!function(t,e){var n,r=e.parentNode;"LI"===r.nodeName&&r.firstChild===e&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(e),Jt(t,r)&&Ue.remove(r)):Ue.setStyle(r,"listStyleType","none")),jt(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(e)}(e,t)}))})),!0)}(t)},Ke=function(t){var e=t.dom,n=ie(t);Wt(n)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:e.getAttrib(n,"start")||"1"},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(n){var r=n.getData();t.undoManager.transact((function(){e.setAttrib(ie(t),"start","1"===r.start?"":r.start)})),n.close()}})},Ye=function(t,e){return function(){var n=t.dom.getParent(t.selection.getStart(),"UL,OL,DL");return n&&n.nodeName===e}};r.add("lists",(function(t){return!1===t.hasPlugin("rtc",!0)&&(function(t){(function(t){return t.getParam("lists_indent_on_tab",!0)})(t)&&function(t){t.on("keydown",(function(e){e.keyCode!==yt.TAB||yt.metaKeyPressed(e)||t.undoManager.transact((function(){(e.shiftKey?_e(t):Te(t))&&e.preventDefault()}))}))}(t),function(t){t.on("keydown",(function(e){e.keyCode===yt.BACKSPACE?Xe(t,!1)&&e.preventDefault():e.keyCode===yt.DELETE&&Xe(t,!0)&&e.preventDefault()}))}(t)}(t),function(t){t.on("BeforeExecCommand",(function(e){var n=e.command.toLowerCase();"indent"===n?Te(t):"outdent"===n&&_e(t)})),t.addCommand("InsertUnorderedList",(function(e,n){je(t,"UL",n)})),t.addCommand("InsertOrderedList",(function(e,n){je(t,"OL",n)})),t.addCommand("InsertDefinitionList",(function(e,n){je(t,"DL",n)})),t.addCommand("RemoveList",(function(){Ee(t)})),t.addCommand("mceListProps",(function(){Ke(t)})),t.addQueryStateHandler("InsertUnorderedList",Ye(t,"UL")),t.addQueryStateHandler("InsertOrderedList",Ye(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",Ye(t,"DL"))}(t)),function(t){var e=function(e){return function(){return t.execCommand(e)}};t.hasPlugin("advlist")||(t.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:e("InsertOrderedList"),onSetup:function(e){return Be(t,"OL",e.setActive)}}),t.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:e("InsertUnorderedList"),onSetup:function(e){return Be(t,"UL",e.setActive)}}))}(t),function(t){var e={text:"List properties...",icon:"ordered-list",onAction:function(){return Ke(t)},onSetup:function(e){return Be(t,"OL",(function(t){return e.setDisabled(!t)}))}};t.ui.registry.addMenuItem("listprops",e),t.ui.registry.addContextMenu("lists",{update:function(e){var n=ie(t,e);return Wt(n)?["listprops"]:[]}})}(t),function(t){return{backspaceDelete:function(e){Xe(t,e)}}}(t)}))}()},2540:(t,e,n)=>{n(3167)},3167:()=>{!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n1?"www."===e[1]?"https://":e[1]:"https://"}(e),r=t.regex.exec(e),o=n+t.url,i=function(t){o=o.replace("$"+t,(function(){return r[t]?r[t]:""}))},u=0;u0?T.extend({},o[0],{url:j(o[0],r)}):null);if(i&&(n.source=i.url,n.type=i.type,n.allowFullscreen=i.allowFullscreen,n.width=n.width||String(i.w),n.height=n.height||String(i.h)),n.embed)return F(n.embed,n,!0);var u=A(k(t),n.source);u&&(n.type="script",n.width=String(u.width),n.height=String(u.height));var a=function(t){return t.getParam("audio_template_callback")}(t),c=function(t){return t.getParam("video_template_callback")}(t);return n.width=n.width||"300",n.height=n.height||"150",T.each(n,(function(e,r){n[r]=t.dom.encode(""+e)})),"iframe"===n.type?function(t){var e=t.allowFullscreen?' allowFullscreen="1"':"";return'"}(n):"application/x-shockwave-flash"===n.sourcemime?function(t){var e='"}(n):-1!==n.sourcemime.indexOf("audio")?function(t,e){return e?e(t):'"}(n,a):"script"===n.type?function(t){return'