var aw=I.ea($v,"AdfDhtmlRichTextCKEditorPeer",!1);m("AdfDhtmlRichTextCKEditorPeer",aw);window.Qsb=q.b.fP()+A.c.ml("/afr/3rdparty/ckeditor/4.18.0/");aw.Gqb=void 0;m("AdfDhtmlRichTextCKEditorPeer.initInline",aw.Gqb);aw.C=function(){$v.C.call(this);I.sb(this,"editMode");this.Fl()};m("AdfDhtmlRichTextCKEditorPeer.InitSubclass",aw.C);
aw.Fl=function(){$v.Fl.call(this);this.hYa="ckinit";this.It={font:{name:"font",items:["Font","FontSize"]},history:{name:"clipboard",items:["Undo","Redo","RemoveFormat"]},mode:{name:"mode",items:["Source"]},color:{name:"mode",items:["TextColor","BGColor"]},formatAll:{name:"basicstyles",items:"Bold Italic Underline - Subscript Superscript Strike".split(" ")},formatCommon:{name:"basicstyles",items:["Bold","Italic","Underline"]},formatUncommon:{name:"basicstyles",items:["Subscript","Superscript","Strike"]},
justify:{name:"justify",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"]},list:{name:"list",items:["NumberedList","BulletedList"]},indent:{name:"indent",items:["Outdent","Indent"]},link:{name:"link",items:["Link","Unlink"]},newline:"/",extra:{name:"extra",items:"Find Replace CopyFormatting Styles Format Cut Copy Paste PasteText PasteFromWord".split(" ")}};this.fAa=1;this.eAa=2;this.gAa=3;this.m0a="Arial/Arial,Helvetica,sans-serif;Courier New/Courier New,Courier,Monaco,monospace;Comic Sans/Comic Sans MS,Comic Sans,cursive;Georgia/Georgia,Hoefler Text,Times New Roman,Times,serif;Helvetica/Helvetica,Arial,sans-serif;Impact/Impact,sans-serif;Tahoma/Tahoma,Verdana,sans-serif;Times New Roman/Times New Roman,Times,serif";
this.n0a="1/x-small;2/small;3/medium;4/large;5/x-large;6/xx-large;7/400%";this.b0a="a abbr acronym address area b basefont bdo big blockquote br caption center cite code col colgroup dd del dfn dir div dl dt em fieldset font h1 h2 h3 h4 h5 h6 hr i iframe ins kbd legend li map menu ol p param pre q s samp small span strike strong style sup sub table tbody td tfoot th thead tr tt u ul var ; img[!src]";this.HAa="2";this.cAa="cke_reset_all";this.bAa="cke_button";this.dAa="cke_toolbar";this.ZCa="no_reset_all";
this.vXa="_afrToolbox";this.Ada="_tbr_";this.n3a="none"};m("AdfDhtmlRichTextCKEditorPeer.InitConstants",aw.Fl);aw.prototype.Init=function(a){aw.h.Init.call(this,a)};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.Init",{Init:aw.prototype.Init});aw.prototype.G=function(a,b){a.getReadOnly()||A.c.jv(a);aw.h.G.call(this,a,b);this.Zd=q.b.Dd();if(a.getReadOnly()){var d=bw(a);d.innerHTML=d.textContent}this.Ola=!1};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.InitDomElement",{G:aw.prototype.G});
aw.prototype.focus=function(a){u.assert(a);aw.ZLa(a)||(aw.pNa(a)?(a.ig=null,cw(this,a)):null!=a.ig&&a.ig.focus())};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.focus",{focus:aw.prototype.focus});aw.prototype.je=function(a){return a.ig.getSelection().Vvb()};aw.prototype.getSelectionRange=aw.prototype.je;r.a("AdfDhtmlRichTextCKEditorPeer.prototype.getSelectionRange",{je:aw.prototype.je});aw.prototype.mI=function(){v.l.warning("Call to this method is not expected.")};
r.a("AdfDhtmlRichTextCKEditorPeer.prototype.setCodeEditingMode",{mI:aw.prototype.mI});aw.prototype.ko=function(a){return null!=a.ig?a.ig.getData():null};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.getCurrentContent",{ko:aw.prototype.ko});aw.prototype.kw=function(a){a.getEditMode()};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.HandleCodeEditingModeChange",{kw:aw.prototype.kw});
aw.prototype.Bj=function(){var a=this.f();if(null!=a.ig&&aw.Rgb(a))return v.l.fine("AdfDhtmlRichTextCKEditorPeer.GetReadyState: RTE loaded"),G.st;v.l.fine("AdfDhtmlRichTextCKEditorPeer.GetReadyState: richTextEditor's onload has not yet fired");return G.tt};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.GetReadyState",{Bj:aw.prototype.Bj});
aw.prototype.Sa=function(a,b,d,e){a=this.f();aw.ZLa(a)||(aw.pNa(a)?(this.f().ig=null,cw(this,this.f())):(a=a.o().Qp().getBoundingClientRect(),b=this.f().ig.qRa.GI.getBoundingClientRect(),d-=a.width-b.width,e-=a.height-b.height,this.f().ig.resize(d,e)))};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.ResizeNotify",{Sa:aw.prototype.Sa});
aw.prototype.Wa=function(a,b){if(this.Zd&&this.Ll(a)&&null!=a.ig){var d=this.ko(a),e=this.Vc(a),e=q.b.yh(e,$e.NK),f=dw(0,a);e!=d&&void 0!==e&&f.value!=d&&this.Jj()}return a.getReadOnly()?O.da(a,b).innerHTML:this.Vc(a).value};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.GetSubmittedValue",{Wa:aw.prototype.Wa});aw.prototype.mK=function(a,b){this.Vc(a).value=b;a.ig.setData(b)};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.SetContentFieldValue",{mK:aw.prototype.mK});
aw.prototype.fJ=function(a){null!=a.ig&&(a.ZW&&a.yG.removeEventListener(Xb.Hl,a.ZW),a.ig.Jd())};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.DestroyEditor",{fJ:aw.prototype.fJ});aw.prototype.Ck=function(a,b){var d=this.i();a.getReadOnly()?d.scrollIntoView():a.ig.document.GI.firstElementChild.scrollIntoView();b&&a.ig.focus()};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.ScrollIntoView",{Ck:aw.prototype.Ck});aw.prototype.Jj=function(){var a=this.f(),b=this.ko(a);this.Vc(a).value=b};
r.a("AdfDhtmlRichTextCKEditorPeer.prototype.UpdateValue",{Jj:aw.prototype.Jj});aw.prototype.ywa=function(a){a.getEditMode()!=a.ig.mode&&a.ig.setMode(a.getEditMode())};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.ComponentEditModeChanged",{ywa:aw.prototype.ywa});
function cw(a,b){if(!b.getReadOnly()){var d=b.getRows(),d=null==d||void 0==d?"100%":""+1.4*d+"em",e=b.getColumns(),e=null==e||void 0==e?"100%":""+e/2+"em",f=I.j(b.g(),aw.y2);b.jU=aw.fAa;var g=b.getExtraPlugins(),h="";null!=g&&0<g.length&&((h=g.reduce(function(a,b){return""==a?b:a+","+b},""),window.E_)?window.E_&&!window.F_.UGa&&(v.l.severe("Found another version of ckeditor library loaded in browser. Replacing it with ADF version."),window.F_.UGa=window.E_,window.E_=window.F_):(window.E_=window.F_,
window.F_.UGa="None"));g=b.getLabel();g||(g=b.getShortDesc())||(g=A.c.H().Z("af_richTextEditor.IFRAME_TITLE"));try{CKEDITOR4.Lvb.ctb.kvb=0;var l=CKEDITOR4.replace(f,{toolbar:ew(a,b),Nwb:b.getEditMode(),readOnly:b.getDisabled(),width:e,height:d,Dvb:"",Qvb:aw.m0a,Pvb:"Tahoma",Ovb:aw.n0a,ivb:!1,hvb:!1,jvb:2147483646,Fvb:aw.b0a,Gvb:h,Nvb:aw.HAa,title:g,Mta:{awb:function(a){fw(b.o(),b,a.I8)},focus:function(a){b.o().gV(a)},blur:function(a){b.o().tn(a)},mode:function(a){gw(b.o(),a)},resize:function(a){b.o().Kx(a)}}});
hw(a,l)}catch(n){v.l.severe("error in ckeditor initialization"),v.l.severe(n)}}}function iw(a){a.CIa||(a.CIa=[]);return a.CIa}function hw(a,b){for(var d=iw(a),e=0;e<d.length;e++)b.Cva.add(d[e],CKEDITOR4.atb,{toolbar:d[e]})}k=aw.prototype;k.gV=function(a){a=A.c.m(a.I8.Id);var b=a.o().Vc(a);q.b.tg(b,$e.NK,b.value);a.o().Tq()};k.tn=function(a){a=a.I8;var b=A.c.m(a.Id),d=dw(b.o(),b),e=b.o();if(d.value!=a.getData()||e.Ola)e.Ola=!0,e.Vc(b).value=a.getData(),e.cc(b)};
function gw(a,b){var d=b.I8,e=A.c.m(d.Id);null!=e&&(e.setProperty("editMode",d.mode),jw(e.o(),e));var f;"wysiwyg"==d.mode?f=d.document:d.qRa.hasListeners("keyup")||(f=d.qRa);f&&f.Mta("keyup",function(a){var b=A.c.m(d.Id);a=b.o().w8(b,a.data.GI);b.Hg(a)})}k.Kx=function(a){a=a.I8;var b=A.c.m(a.Id);kw(b.o(),b,a)};
function fw(a,b,d){d.Id=b.g();b.ig=d;qf.$().hI(b);var e=d.Cva.wVa(d.u8.FVa).GI;b.getDisabled()||0==d.toolbar.length?e.style.display="none":(e=e.getElementsByClassName("cke_combo__fontsize"))&&0<e.length&&(e=e[0].getElementsByClassName("cke_combo_inlinelabel cke_combo_text"))&&0<e.length&&(e[0].innerText=aw.HAa);"lazy"==b.getContentDelivery()?(e=document.createElement("iframe"),e.src=A.c.p9(b.g()),e.id="rteLazyFrame",e.style.display="none",e.onload=function(){v.l.info("loaded data for lazy Fetch mode");
d.setData(this.contentDocument.body.innerHTML);lw(b.o(),b,d.getData());this.parentNode.removeChild(this)},document.body.appendChild(e)):lw(b.o(),b,d.getData());1==C.CTa(b)&&(b.yG=C.msa(b),b.ZW=function(){b.o().Nka();b.yG.removeEventListener(Xb.Hl,b.ZW);b.ZW=null},b.yG.addEventListener(Xb.Hl,b.ZW));jw(b.o(),b);0<iw(a).length&&mw(a,b,d);b.jU=aw.eAa}
function jw(a,b){var d=b.o().i(),e=window.getComputedStyle(d).getPropertyValue("font-size"),d=d.getElementsByTagName("iframe");null!=d&&0<d.length&&C.jm(d[0].contentDocument.body,"font-size:"+e,!0)}
function mw(a,b,d){var e=A.c.R(),f=d.Cva.wVa(d.u8.FVa);f&&f.GI.classList.remove(aw.cAa);var f=window.getComputedStyle(f.GI,null).getPropertyValue("width"),g=b.o().Qp(),h=b.g()+aw.Ada;a=iw(a);for(i=0;i<a.length;i++){var l=a[i].toLowerCase(),n=e.getElementById(h+l);n.classList.add(aw.bAa);n.style.maxWidth=f;n.style.overflow="hidden";for(var l=g.getElementsByClassName(aw.bAa+"__"+l)[0],t=l.parentElement;null!=t&&t!=g&&!t.classList.contains(aw.dAa);)t=t.parentElement;null!=t&&t.classList.add(aw.ZCa);
l.parentElement.replaceChild(n,l)}f=g.getElementsByClassName(aw.dAa);for(i=0;i<f.length;i++)f[i].classList.contains(aw.ZCa)||f[i].classList.add(aw.cAa);kw(b.o(),b,d);if(b=e.getElementById(b.g()+aw.vXa))b.style.display="none"}
function kw(a,b,d){d=d.Cva.wVa(d.u8.FVa);d=window.getComputedStyle(d.GI,null).getPropertyValue("width");var e=A.c.R();b=b.g()+aw.Ada;a=iw(a);for(i=0;i<a.length;i++){var f=e.getElementById(b+a[i].toLowerCase());f.style.maxWidth=d;30<f.offsetHeight&&(f.style.zoom=30/f.offsetHeight);A.c.m(f.id).Qe()}}function lw(a,b,d){a.Vc(b).value=d;dw(0,b).value=d;a.Ola=!1}
function ew(a,b){if(a.VB)return a.VB;var d=b.getToolboxLayout();null==d&&(d="all");var e=b.g()+aw.Ada,f=A.c.R();a.VB=[];if(Array.isArray(d)){for(var g=!1,h=0;h<d.length;h++)if("formatAll"==d[h]){g=!0;break}for(h=0;h<d.length;h++){var l=d[h];if(!g||"formatCommon"!=l&&"formatUncommon"!=l)if("all"==l)for(var l=nw(),n=0;n<l.length;n++)a.VB.push(l[n]);else n=aw.It[l],null!=n?a.VB.push(n):ow(a,l,f,e)}}else l=aw.It[d],null!=l?a.VB.push(l):"all"==d?a.VB=nw():ow(a,l,f,e);return a.VB}
function ow(a,b,d,e){aw.n3a!=b&&(a.VB.push({name:b,items:[b]}),d.getElementById(e+b.toLowerCase())&&iw(a).push(b))}function nw(){var a=[];a.push(aw.It.font);a.push(aw.It.color);a.push(aw.It.formatCommon);a.push(aw.It.mode);a.push(aw.It.history);a.push(aw.It.justify);a.push(aw.It.list);a.push(aw.It.link);return a}function dw(a,b){var d=I.j(b.g(),aw.hYa),d=q.b.getElementById(d);u.u(d);return d}
k.ne=function(a,b){var d=q.b;u.J(a);var e=this.f(),f=e.ig;if(null==f)v.l.severe("Not executing command as ckeditor does not exists");else switch(a){case aw.iD:e=this.Vc(e);this.Zd&&d.S()==q.Sc&&e.focus();f.$vb(b);break;case aw.G_:f.setMode("wysiwyg");break;case aw.pba:f.setMode("source");break;case aw.TI:f.execCommand("undo");break;case aw.RI:f.execCommand("redo");break;case aw.KQ:f.execCommand("link");break;case aw.qba:f.execCommand("unlink");break;case aw.oba:f.execCommand("removeFormat");break;
case aw.PR:f.execCommand("bold");break;case aw.RR:f.execCommand("italic");break;case aw.VR:f.execCommand("underline");break;case aw.SR:f.execCommand("strike");break;case aw.cda:f.execCommand("bulletedlist");break;case aw.bda:f.execCommand("numberedlist");break;case aw.K0:f.execCommand("indent");break;case aw.P0:f.execCommand("outdent");break;case aw.N0:f.execCommand("justifyleft");break;case aw.L0:f.execCommand("justifycenter");break;case aw.O0:f.execCommand("justifyright");break;case aw.M0:f.execCommand("justifyblock");
break;case aw.UR:f.execCommand("subscript");break;case aw.TR:f.execCommand("superscript");break;default:v.l.severe("unsupported command")}};k.Nka=function(){v.l.info("popup closed. Destroying CKEditor");this.gb&&(this.gb.ig.Jd(),this.gb.jU=aw.gAa)};k.Vc=function(a){a=I.j(a.g(),$v.y2);a=q.b.getElementById(a);u.u(a);return a};aw.Rgb=function(a){return a.jU==aw.eAa};aw.ZLa=function(a){return a.jU==aw.fAa};aw.pNa=function(a){return null==a.ig||a.jU==aw.gAa};aw.prototype.zOa=function(){};