!function(){"use strict";conste=e=>parseInt(e,10),t=(e,t)=>{consto=e-t;return0===o?0:o>0?1:-1},o=(e,t,o)=>({major:e,minor:t,patch:o}),n=t=>{constn=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(t);returnn?o(e(n[1]),e(n[2]),e(n[3])):o(0,0,0)},r=e=>t=>typeoft===e,s=("string",e=>"string"===(e=>{constt=typeofe;returnnull===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(s=n.constructor)||void0===s?void0:s.name)===r.name)?"string":t;varo,n,r,s})(e));consti=r("boolean"),c=r("function"),a=r("number");classd{constructor(e,t){this.tag=e,this.value=t}staticsome(e){returnnewd(!0,e)}staticnone(){returnd.singletonNone}fold(e,t){returnthis.tag?t(this.value):e()}isSome(){returnthis.tag}isNone(){return!this.tag}map(e){returnthis.tag?d.some(e(this.value)):d.none()}bind(e){returnthis.tag?e(this.value):d.none()}exists(e){returnthis.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){returnthis.tag?this.value:e}or(e){returnthis.tag?this:e}getOrThunk(e){returnthis.tag?this.value:e()}orThunk(e){returnthis.tag?this:e()}getOrDie(e){if(this.tag)returnthis.value;thrownewError(null!=e?e:"Called getOrDie on None")}staticfrom(e){returnnull==e?d.none():d.some(e)}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(e){this.tag&&e(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}d.singletonNone=newd(!1);letl=0;constu=e=>{constt=(newDate).getTime(),o=Math.floor(1e9*Math.random());returnl++,e+"_"+o+l+String(t)},m=e=>t=>t.options.get(e),g=m("codemirror_script"),h=m("codemirror_linewrapping"),p=m("codemirror_linenumbers"),f=m("codemirror_foldgutter"),v=m("codemirror_gutter"),y=m("advcode_headless"),b=m("advcode_inline"),_=(e,t,o)=>({customEditorScriptUrl:t+"/customeditor.min.js",codeMirrorScriptUrl:g(e),lineWrapping:h(e),lineNumbers:p(e),foldGutter:f(e),gutter:v(e),editorId:e.id,advcodeInstanceId:u("advcode_instance"),currentAdvStatus:o}),S=()=>{},w=()=>!1,C=e=>{if(null==e)thrownewError("Node cannot be null or undefined");return{dom:e}},k=(e,t)=>{consto=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){constt="HTML does not have a single root node";throwconsole.error(t,e),newError(t)}returnC(o.childNodes[0])},x=(e,t)=>{consto=(t||document).createElement(e);returnC(o)},z=C;"undefined"!=typeofwindow?window:Function("return this;")();constA=(e,t,o)=>{letn=e.dom;constr=c(o)?o:w;for(;n.parentNode;){n=n.parentNode;conste=z(n);if(t(e))returnd.some(e);if(r(e))break}returnd.none()},I=Object.hasOwnProperty,N=(e,t)=>I.call(e,t),T=e=>{constt=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},F="\x3c!--mce_cursor--\x3e",M=(e,t)=>{consto=e.dom,n=e.selection,r=n.getBookmark(),s=(e=>N(e,"name"))(r)?o.select(r.name)[r.index]:o.select(`#${r.id}_start`)[0],i=d.from(s).map((t=>{consto=z(e.getBody());return((e,t)=>{constn=k(F),r=z(e),s=((e,t,o)=>((e,t,o,n,r)=>n(o)?d.some(o):c(r)&&r(o)?d.none():t(o,n,r))(0,A,e,t,o))(r,(e=>((e,t)=>{consto=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(e)),(e=>{returnt=o,e.dom===t.dom;vart})).getOr(r);return((e,t)=>{consto=(e=>d.from(e.dom.parentNode).map(z))(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))})(s,n),n})(t)})),a=t();returni.each(T),n.moveToBookmark(r),a},E=e=>{constt=(e=>{constt=e.indexOf(F);return-1===t?0:t})(M(e,(()=>e.getContent({source_view:!0}))));return{content:e.getContent({source_view:!0}),cursor:t}},j=e=>{lett=e;return{get:()=>t,set:e=>{t=e}}},D=()=>{conste=(e=>{constt=j(d.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(d.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(d.some(e))}}})(S);return{...e,on:t=>e.get().each(t)}},O=(e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()},V=e=>{return(t=tinymce,"get",N(t,"get")?d.from(t.get):d.none()).bind((t=>d.from(t.c