var Z=M.U(xe,"AdfDhtmlCodeEditorPeer",p);v("AdfDhtmlCodeEditorPeer",Z);Z.m=function(){z.kb(AdfRichCodeEditor);M.ha(this,I.Dd,bb.Lc,I.ec,I.tc);this.xE()};v("AdfDhtmlCodeEditorPeer.InitSubclass",Z.m);
Z.xE=function(){this.cna="AdfCodeEditorMarkers";this.QHa="/afr/codemirror/codemirror.css";this.h6a="/afr/codemirror/default.css";this.tK="cmd_undo";this.sK="cmd_redo";this.fz="cmd_search_next";this.ND="cmd_search_previous";this.HS="cmd_replace_all";this.IS="cmd_replace_next";this.MD="cmd_jump";this.bU="cc";this.hHa="ci";this.dna="hsp";this.ena="ll";this.EHa="llv";this.LHa="_afrSearchPopup";this.m5="tb";this.kIa="_afrUndo";this.eIa="_afrRedo";this.fU="_afrSearchNext";this.s5="_afrSearchPrevious";this.jna=
"_afrJump";this.jIa="_afrSearchPopupShow";this.hIa="_afrSearchNextPopup";this.iIa="_afrSearchPreviousPopup";this.fIa="_afrReplaceAllPopup";this.gIa="_afrReplaceNextPopup";this.gU="_afrSearchPopupField";this.kna="_afrReplacePopupField";this.dU="_afrCaseSensitivePopupField";this.iU="_afrWholeWordsPopupField";this.t5="_afrWrapPopupField";this.hU="_afrSearchToolbarField";this.eU="_afrJumpField";this.l5=", ";this.GHa="af|codeEditor::markers-content-container";this.FHa="af|codeEditor::markers-content";
this.HHa="af|codeEditor::markers-label";this.IHa="af|codeEditor::markers-text";this.wHa="af|codeEditor::editor-lines";this.CHa="af|codeEditor::editor-scroll";this.sHa="af|codeEditor::editor-gutter";this.tHa="af|codeEditor::editor-gutter-linenumbers";this.ml="af|codeEditor::editor-search-highlight";this.AHa="af|codeEditor::editor-jump-highlight";this.xHa="af|codeEditor::editor-marker-error";this.yHa="af|codeEditor::editor-marker-fatal";this.BHa="af|codeEditor::editor-marker-warning";this.zHa="af|codeEditor::editor-marker-info";
this.DHa="af|codeEditor::editor-text";this.lHa="af|codeEditor::editor-disabled-text";this.NHa="af|codeEditor::small-fatal-icon";this.MHa="af|codeEditor::small-error-icon";this.PHa="af|codeEditor::small-warning-icon";this.OHa="af|codeEditor::small-info-icon";this.KHa="af|codeEditor::message-summary-text";this.JHa="af|codeEditor::message-icon-style";this.rHa="af|codeEditor::editor-fold-marker";this.mHa="af|codeEditor::editor-fold-gutter";this.qHa="af|codeEditor::editor-fold-gutter-open";this.oHa="af|codeEditor::editor-fold-gutter-folded";
this.pHa="af|codeEditor::editor-fold-gutter-open-after";this.nHa="af|codeEditor::editor-fold-gutter-folded-after";this.iHa="af|codeEditor::editor-breakpoints";this.jHa="af|codeEditor::editor-codemirror";this.kHa="af|codeEditor::editor-code-completions";this.vHa="af|codeEditor::editor-code-hint";this.uHa="af|codeEditor::editor-code-hint-active";this.Dh=[];this.Dh[Z.wHa]=".CodeMirror-lines";this.Dh[Z.CHa]=".CodeMirror-scroll";this.Dh[Z.sHa]=".CodeMirror-gutter";this.Dh[Z.tHa]=".CodeMirror-gutter-text";
this.Dh[Z.DHa]=".CodeMirror pre";this.Dh[Z.rHa]=".CodeMirror-foldmarker";this.Dh[Z.mHa]=".CodeMirror-foldgutter";this.Dh[Z.qHa]=".CodeMirror-foldgutter-open";this.Dh[Z.oHa]=".CodeMirror-foldgutter-folded";this.Dh[Z.pHa]=".CodeMirror-foldgutter-open:after";this.Dh[Z.nHa]=".CodeMirror-foldgutter-folded:after";this.Dh[Z.iHa]=".breakpoints";this.Dh[Z.jHa]=".CodeMirror";this.Dh[Z.kHa]=".CodeMirror-hints";this.Dh[Z.vHa]=".CodeMirror-hint";this.Dh[Z.uHa]="li.CodeMirror-hint-active"};
v("AdfDhtmlCodeEditorPeer.InitConstants",Z.xE);Z.prototype.qe=r("YN");z.a("AdfDhtmlCodeEditorPeer.prototype.getEditorInstance",{qe:Z.prototype.qe});
Z.prototype.q=function(a,b){Z.f.q.call(this,a,b);if(a){var d=a.getId();this.aH=p;F.c.Zy(a);F.c.jD(a);a:{var e=F.c.Dp(Z.QHa),f=w.b,g=f.w();this.bu||(this.bu=[]);if(this.bu[e]!=l){this.bu[e]=p;for(var h=H.Ua(g.documentElement,"HEAD"),m=h.getElementsByTagName("LINK"),q=n,s=0;s<m.length;s++){var y=m[s];if(y.getAttribute("href")!=e){q=y;break}}for(s=0;s<m.length;s++)if(y=m[s],y.getAttribute("href")==e)break a;f.G()==w.aa&&11>f.nb()?g.createStyleSheet(e):(y=g.createElement("link"),y.setAttribute("type",
"text/css"),y.setAttribute("rel","stylesheet"),y.setAttribute("href",e),q?h.insertBefore(y,q):h.appendChild(y))}}this.rxa=[];"lazy"==a.getContentDelivery()&&this.H9(a);a.getSimple()||("auto"==b.style.height&&(b.style.height=""),"auto"==b.style.width&&(b.style.width=""));this.yg(d+Z.kIa,Z.tK,n);this.yg(d+Z.eIa,Z.sK,n);this.yg(d+Z.fU,Z.fz,[d+Z.hU,n,n,n]);this.yg(d+Z.s5,Z.ND,[d+Z.hU,n,n,n]);this.yg(d+Z.fIa,Z.HS,[d+Z.gU,d+Z.kna,d+Z.dU,d+Z.iU]);this.yg(d+Z.gIa,Z.IS,[d+Z.gU,d+Z.kna,d+Z.dU,d+Z.iU,d+Z.t5]);
this.yg(d+Z.hIa,Z.fz,[d+Z.gU,d+Z.dU,d+Z.iU,d+Z.t5]);this.yg(d+Z.iIa,Z.ND,[d+Z.gU,d+Z.dU,d+Z.iU,d+Z.t5]);this.yg(d+Z.jna,Z.MD,d+Z.eU);this.H8(a);Z.OAa(a,b)}};z.a("AdfDhtmlCodeEditorPeer.prototype.InitDomElement",{q:Z.prototype.q});Z.prototype.yg=function(a,b,d){B.s(a);B.s(b);"cmd"==b.substring(0,3)?this.G8(a,b,d):D.i.severe("Unable to add binding [",b,"] for ",a," to ",this.d().e())};z.a("AdfDhtmlCodeEditorPeer.prototype.addBinding",{yg:Z.prototype.yg});
Z.prototype.PQ=function(a,b){for(var d=this.Tg,e=d.length,f=0;f<e;f++){var g=d[f];if(g.Pe==a&&!(b&&b!=g.be)){if(g.Pe==Z.FFa||g.Pe==Z.fz||g.Pe==Z.ND||g.Pe==Z.HS||g.Pe==Z.IS||g.Pe==Z.MD){d=n;if(g.Pe==Z.FFa||g.Pe==Z.fz||g.Pe==Z.ND){var d=F.c.j(g.oe[0]),h=U.W(d,d.k().h()),m=f=e=p;if(g.oe[1]!=n){var q=F.c.j(g.oe[1]);q&&(e=q.getValue())}g.oe[2]!=n&&(q=F.c.j(g.oe[2]))&&(f=q.getValue());g.oe[3]!=n&&(q=F.c.j(g.oe[3]))&&(m=q.getValue());q=h.value;if(h.value==n||0==h.value.length)q=d.getValue();d=[q,e,f,m]}else g.Pe==
Z.HS||g.Pe==Z.IS?(d=F.c.j(g.oe[0]),h=F.c.j(g.oe[1]),m=f=e=p,g.oe[2]!=n&&(q=F.c.j(g.oe[2]))&&(e=q.getValue()),g.oe[3]!=n&&(q=F.c.j(g.oe[3]))&&(f=q.getValue()),g.oe[4]!=n&&(q=F.c.j(g.oe[4]))&&(m=q.getValue()),d=[d.getValue(),h.getValue(),e,f,m]):g.Pe==Z.MD&&(d=F.c.j(g.oe),d=U.W(d,d.k().h()).value);return this.Sd(g.Pe,d)}return this.Sd(g.Pe,g.oe)}}return n};z.a("AdfDhtmlCodeEditorPeer.prototype.executeBinding",{PQ:Z.prototype.PQ});Z.prototype.cm=function(){return this.aH?J.mt:J.Wz};
z.a("AdfDhtmlCodeEditorPeer.prototype.getReadyState",{cm:Z.prototype.cm});Z.prototype.Eb=function(a){if(a.dd()==Ta.ue){var b=this.d();this.l$&&F.c.ff(b.e());a={be:b.e(),B5a:a.Q()};this.VF=page.oa(this,this.RZa,a,10)}else Z.f.Eb.call(this,a)};z.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentBlur",{Eb:Z.prototype.Eb});
Z.prototype.gi=function(a){if(this.Tg!=k){a.Cc(l);var b=a.getSource().e(),d=this.d().getId();b==d+Z.jIa&&(Z.Jl(this.d(),d+Z.LHa),a.cancel());for(var e=this.Tg,f=e.length,g=0;g<f;g++){var h=e[g];if(h.be==b){b=this.PQ(h.Pe,h.be);this.or();if((h.be==d+Z.fU||h.be==d+Z.s5)&&!b)F.c.j(h.be).setProperty("disabled",l,p,p),this.AY=n;a.cancel();break}}}};z.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentAction",{gi:Z.prototype.gi});
Z.prototype.Ha=function(a){Z.f.Ha.call(this,a);var b=this.d();!b.getReadOnly()&&Z.Mwa(b,a)&&(a=Z.nO(b),xe.aq(a),Z.lda(b,this.qe()))};z.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentFocus",{Ha:Z.prototype.Ha});
Z.prototype.ba=function(a){var b=this.d(),d=a.ia(),e=a.L();if(Z.Mwa(b,a))if(b=this.qe(),E.DK==d&&(this.Bwa=l,a.cancel()),this.Bwa)if(E.xh==d)this.Bwa=p;else{if(E.Df==d)if(e.shiftKey)b.indentLine(b.getCursor(l).line,"subtract");else CodeMirror.p9a[b.getCursor(l).line!=b.getCursor().line?"indentMore":"insertTab"](b)}else E.Df==a.ia()&&(Vl(this),e.shiftKey?O.Qh(F.c.Qc):O.Ud(F.c.Qc));else d=b.getId(),E.$a==a.ia()&&(a=F.c.Qc,-1!=a.id.indexOf(d+Z.eU)?this.PQ(Z.MD,d+Z.jna):-1!=a.id.indexOf(b.getId()+Z.hU)&&
this.PQ(Z.fz,d+Z.fU))};z.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentKeyDown",{ba:Z.prototype.ba});Z.prototype.Yf=function(a,b,d){a.e();this.qe().save();if(H.sb(this.qe().getWrapperElement(),b)){b=Z.nO(a);var e=Z.O$(a);if(this.uo(a)){var f=xe.ly(b),g=b.value;if(!d||g!=f)xe.aq(b,g),this.Yb(a,g)}e!=n&&(Z.bda(a,e),this.YN.getScrollerElement().scrollTop=e.scrollTop,Z.lda(a,this.qe()))}};z.a("AdfDhtmlCodeEditorPeer.prototype.RunValidation",{Yf:Z.prototype.Yf});
Z.prototype.xa=function(a,b,d){B.s(d);this.qe().getValue()!=d&&(this.qe().setValue(d),this.qe().save())};z.a("AdfDhtmlCodeEditorPeer.prototype.SetDisplayValue",{xa:Z.prototype.xa});Z.prototype.cb=function(a){this.qe()!=n&&(this.qe().save(),this.l$=p);a=Z.nO(a).value;return a!=n&&0==a.length?n:a};z.a("AdfDhtmlCodeEditorPeer.prototype.GetSubmittedValue",{cb:Z.prototype.cb});
Z.prototype.bga=function(a,b){var d=a.getCursor(),d=b.zVa(d.line,d.ch);B.assert(d!=n);B.yc(d.S9a);B.Ea(d.from.pb);B.Ea(d.to.pb);B.Ea(d.from.K2a);B.Ea(d.to.K2a);return{list:d.hints,from:{o4a:d.from.row,ch:d.from.column},to:{o4a:d.to.row,ch:d.to.column}}};z.a("AdfDhtmlCodeEditorPeer.prototype.getHintsWrapper",{bga:Z.prototype.bga});Z.prototype.C4=function(a,b){a.k().zVa=b};z.a("AdfDhtmlCodeEditorPeer.prototype.SetHintsFunction",{C4:Z.prototype.C4});
Z.prototype.Ah=function(a,b){Z.f.Ah.call(this,a,b);var d=w.b,e=F.c.u(),f="",g,h=this.d(),m={hfa:0,qja:0,Wga:0,ofa:0};if(b!=n){var q=l;g=p;for(var s=F.c.w(),y=n,A=0;A<b.length;A++){var C=b[A].r(Z.cna);if(C!=n&&0<C.length)for(var y=s.createElement("table"),G=0;G<C.length;G++){var K=C[G],N=K.wy(),Q=K.OC();if(N!=n&&Q!=n){g=K;N=g.wy();Q=g.OC();Q==n&&(Q=1);q&&this.bf(N,Q);q={};q.Pp=g;q.id=this.rxa.push(q)-1;Z.oxa(this.d(),g,q);g=q;N=K;F.c.u();var q=N.wy(),N=Wl(N),N=F.c.u().getIcon(N),Q=document.createElement("div"),
T=document.createElement("span");T.appendChild(N);Q.appendChild(T);this.qe().w$a(q-1,"breakpoints",Q);q=Ea.getType(K.Gn());q==Ea.Ef?m.hfa++:q==Ea.kk?m.ofa++:q==Ea.Am?m.qja++:q==Ea.Mi&&m.Wga++;q=p;N=Wl(K);K=s.createElement("tr");y.appendChild(K);Q=s.createElement("td");H.n(Q,e.getStyleClass(Z.JHa));d.setAttribute(Q,"valign","top");K.appendChild(Q);Q.appendChild(F.c.u().getIcon(N));N=s.createElement("td");K.appendChild(N);N.appendChild(Xl(this,g));g=l}}}g&&(C=M.Na(this.d().e(),"markers"),g=Yl(this),
A=d.getElementById(C),G=d.getElementById(g),K=U.W(h),G||(G=s.createElement("div"),G.id=g,H.n(G,e.getStyleClass(Z.HHa)),K.appendChild(G),g=F.c.u().V("af_codeEditor.LABEL_MARKERS"),markersLabelTextNode=s.createTextNode(g),g=s.createElement("label"),H.n(g,e.getStyleClass(Z.KHa)),N=q="",0<m.hfa&&(N=P.ds(Ea.Ef,p),f+=N+": "+m.hfa),0<m.qja&&(N=P.ds(Ea.Am,p),0<f.length&&(q=Z.l5),f+=q+N+": "+m.qja),0<m.ofa&&(N=P.ds(Ea.kk,p),0<f.length&&(q=Z.l5),f+=q+N+": "+m.ofa),0<m.Wga&&(N=P.ds(Ea.Mi,p),0<f.length&&(q=Z.l5),
f+=q+N+": "+m.Wga),g.appendChild(s.createTextNode(f)),G.appendChild(markersLabelTextNode),G.appendChild(g),d.wa(G)),A||(A=s.createElement("div"),A.id=C,H.n(A,e.getStyleClass(Z.GHa)),K.appendChild(A),f=s.createElement("div"),H.n(f,e.getStyleClass(Z.FHa)),A.appendChild(f),e=s.createElement("div"),f.appendChild(e),d.wa(A)),f=A.children[0],f.appendChild(y),Zl(this,h))}};z.a("AdfDhtmlCodeEditorPeer.prototype.MessageNotify",{Ah:Z.prototype.Ah});Z.prototype.ja=t(l);
z.a("AdfDhtmlCodeEditorPeer.prototype.needsResizeNotify",{ja:Z.prototype.ja});Z.prototype.se=function(a,b,d,e,f){Zl(this,a,f)};z.a("AdfDhtmlCodeEditorPeer.prototype.resizeNotify",{se:Z.prototype.se});Z.prototype.Ad=function(a){if(this.l$)return l;a=a.e();if(P.Uga(a)){a=F.c.Bp(a);for(var b=0;b<a.length;b++){var d=a[b];if(d.r!=n&&"function"==typeof d.r){var e=d.r(Z.cna);if(e!=n&&0<e.length&&d.getSummary()==n&&d.Nfa()==n)return l}}}return Z.f.Ad.call(this)};
z.a("AdfDhtmlCodeEditorPeer.prototype.VetoShowNoteWindow",{Ad:Z.prototype.Ad});u=Z.prototype;u.H9=function(a){var b=w.b,d=F.c,e=a.e(),e=M.g(e,Z.ena),e=b.getElementById(e),f=this.w().createElement("IFRAME");b.setAttribute(f,"frameBorder","0");b.setAttribute(f,"id",e.id);b.setAttribute(f,"src",d.dga(a.e()));b.setAttribute(f,"style","width: 0px; height: 0px; visibility:hidden;");a=this.o(this.IG);b.S(f,"load",a);e.parentNode.replaceChild(f,e);b.gc(e);b.wa(f)};u.IG=function(){var a=this.d();Z.IG(a)};
function Wl(a){var b="";a=Ea.getType(a.Gn());a==Ea.Ef?b=Z.MHa:a==Ea.kk?b=Z.NHa:a==Ea.Am?b=Z.PHa:a==Ea.Mi&&(b=Z.OHa);return b}u.gUa=function(a){a&&a.save()};u.hUa=function(a){a&&(this.l$=l,Z.lda(this.d(),a))};u.pg=function(){if(this.qe()!=n)this.qe().focus();else{var a=this.d();F.c.oa(a,a.focus,n,300)}};z.a("AdfDhtmlCodeEditorPeer.prototype.Focus",{pg:Z.prototype.pg});u=Z.prototype;
u.RZa=function(a){var b=F.c;delete this.VF;var d=a.be,e=document.activeElement;if(!H.sb(this.h(),e)&&(b=b.j(d)))this.bind(b),this.Yf(b,a.B5a,l)};
function Zl(a,b,d){var e=b.e(),f=w.b,g=f.getElementById(M.g(e,Z.bU)),h=M.Na(a.d().e(),"markers"),h=f.getElementById(h),m=f.getElementById(Yl(a));U.W(b,a.h());e=f.getElementById(M.g(e,Z.m5)).offsetHeight;if(!h&&!m)f.setAttribute(g,"style","width:auto;height:"+(d-e)+"px");else{var q=h.children[0],s,y=w.b,A=b.e();s=F.c.u().ka("af|codeEditor-tr-markers-max-height");b=U.W(b,a.h()).clientHeight;A=y.getElementById(M.g(A,Z.m5)).offsetHeight;a=y.getElementById(Yl(a)).offsetHeight;a=b-A-a;b=n;if(-1!==s.indexOf("%",
s.length-1))b=a*s.substr(0,s.length-1)/100;else if(-1!==s.indexOf("px",s.length-1)||NaN!=parseInt(s))b=NaN!=parseInt(s)?parseInt(s):parseInt(s.substr(0,s.length-2)),b=Math.min(a,b);s=b;q.children!=n&&(m=m.offsetHeight,q=h.offsetHeight,q>s&&(q=s),f.setAttribute(g,"style","width:auto;height:"+(d-e-m-q)+"px;"),f.setAttribute(h,"style","width:auto;height:"+q+"px;"))}}function Yl(a){return M.Na(a.d().e(),"markersLabel")}
function Xl(a,b){var d=w.b,e=F.c,f=e.u(),e=e.w(),g=b.Pp,h=e.createElement("a");H.n(h,f.getStyleClass(Z.IHa));var f="("+g.wy()+","+g.OC()+") ",m=Ea.getType(g.Gn()),m=P.ds(m,p),q=n,g=q=g.getMessage()!=n?m+f+": "+g.getMessage():m+f+": ";h.title=g;h.href="javascript:;";d.setAttribute(h,"_markerInfoId",b.id);d=a.o(a.uYa);w.b.S(h,"click",d);h.appendChild(e.createTextNode(g));return h}
u.uYa=function(a){var b=w.b;b.preventDefault(a);if(a=b.T(a).getAttribute("_markerInfoId")){var d=this.rxa[a];a=d.markText.find();b=d.Pp.wy();d=d.Pp.OC();a.from!=n&&(b=a.from.line+1,d=a.from.ch+1);this.bf(b,d)}this.d().focus()};u.G8=function(a,b,d){B.s(a);B.s(b);this.Tg||(this.Tg=[]);for(var e=this.Tg.length,f=n,g=0;g<e;g++){var h=this.Tg[g];if(h.be==a&&h.Pe==b){h.oe=d;f=h;break}}f==n&&(f={be:a,Pe:b,oe:d},this.Tg.push(f));(a=F.c.j(a))&&(a.gm(this.d())||a.addEventListener(bb.Lc,this.sN,this))};
u.Wya=function(a){var b=this.Tg;if(b!=k)for(var d=b.length,e=this.sN,f=0;f<d;f++){var g=F.c.j(b[f].be);g!=k&&(g.gm(a)||g.removeEventListener(bb.Lc,e,this))}};
u.Sd=function(a,b){B.s(a);if(a==Z.tK)return Vl(this);if(a==Z.sK){var d=this.qe();d.redo();d.save();return d.historySize().redo}if(a==Z.fz){if(b[0]!=n)return $l(this,b)}else if(a==Z.ND){if(b[0]!=n)return am(this,b)}else if(a==Z.HS){if(b[0]!=n&&b[1]!=n){var e=b[0],d=b[1],f=b[2],g=b[3];F.c.u();var h=this.qe();bm(this);if(e){cm(this,n,f,g);g=cm(this,e,f);e=[];for(f=p;g.findNext();)e.push({from:g.from(),to:g.to()}),f=l;for(g=0;g<e.length;g++)h.replaceRange(d,e[g].from,e[g].to);h.save();d=f}else d=p;return d}}else if(a==
Z.IS){if(b[0]!=n&&b[1]!=n){var m=b[0],d=b[1],q=b[2],s=b[3],h=b[4],e=F.c.u(),g=f=p;if(m){for(var y=this.qe(),m=cm(this,m,q,s),q=0;q<dm(this).length;q++)if(dm(this)[q].LJ==Z.ml&&(s=dm(this)[q].Pp.find(),s.from.ch==m.pos.from.ch&&s.from.line==m.pos.from.line&&s.to.ch==m.pos.to.ch&&s.to.line==m.pos.to.line)){g=l;break}g||m.findNext()&&(g=l);if(g)y.replaceRange(d,m.from(),m.to()),bm(this),m.findNext()&&(dm(this).push({LJ:Z.ml,Pp:y.markText(m.from(),m.to(),{className:e.ka(Z.ml)})}),this.bf(m.from().line,
m.from().ch)),f=l;else if(this.TX)f=p;else if(h){for(;m.findPrevious(););m.findNext()?(y.replaceRange(d,m.from(),m.to()),bm(this),m.findNext()&&(dm(this).push({LJ:Z.ml,Pp:y.markText(m.from(),m.to(),{className:e.ka(Z.ml)})}),this.bf(m.from().line,m.from().ch)),f=l):f=p}y.save();d=f}else d=p;return d}}else if(a==Z.MD&&b!=n){this.qxa&&this.qxa.clear();this.qxa=this.qe().markText({line:b-1,ch:0},{line:b-1,ch:9999},{className:F.c.u().ka(Z.AHa)});this.bf(b,1);return}return n};
u.H8=function(a){var b=w.b,d=a.getId();a=Z.nO(a).parentNode;var e=b.getElementById(d+Z.hU),d=b.getElementById(d+Z.eU);this.gr=this.o(this.or);b.S(a,"mouseup",this.gr);b.S(a,"keyup",this.gr);e&&b.S(e,"keyup",this.gr);d&&b.S(d,"keyup",this.gr)};
u.or=function(){var a=this.d();if(a&&a&&!a.getDisabled())if(this.aH){var a=this.Tg,b=a.length,d=this.AY,e=this.qe().historySize(),f=this.d().getId();if(d==k||d==n)d={};for(var g={},h=0;h<b;h++){var m=a[h],q=m.Pe,s=F.c.j(m.be);if(s){var y=p;g[q]===k&&(q==Z.tK?(g[q]=e.undo&&0<e.undo?l:p,y=l):q==Z.sK?(g[q]=e.redo&&0<e.redo?l:p,y=l):q==Z.fz?m.be==f+Z.fU&&(m=F.c.j(m.oe[0]),m=m.getSubmittedValue(),g[q]=m!=n&&0<m.length?l:p,y=l):q==Z.ND?m.be==f+Z.s5&&(m=F.c.j(m.oe[0]),m=m.getSubmittedValue(),g[q]=m!=n&&
0<m.length?l:p,y=l):q==Z.MD&&m.be==f+Z.eU&&(m=F.c.j(m.oe).getSubmittedValue(),g[q]=m!=n&&0<m.length?l:p,y=l));d[q]!==g[q]&&y&&s.setProperty("disabled",!g[q],p,p)}}this.AY=g}else{var A=a.k();setTimeout(function(){A.or()},500)}};function Vl(a){a=a.qe();a.undo();a.save();return a.historySize().undo}
function cm(a,b,d,e){var f=a.qe(),g=p;if(a.nZ){if(a.nZ.text!=b||a.nZ.H2a!=d||a.nZ.O5a!=e)g=l}else g=l;if(g){g=d!=l;a.nZ={text:b,H2a:d,O5a:e};d=p;var h=n;if(e){e="g";g&&(e+="i");if(b)for(h=0;h<b.length;h++)if(128<b.charCodeAt(h)){d=l;break}h=d?RegExp("(^|\\s)[!-//:-@[-`{-~]?"+b+"[!-//:-@[-`{-~]?(?\x3d\\s|$)",e):RegExp("\\b"+b+"\\b",e);a.Dza=f.getSearchCursor(h,{line:0,ch:0},g)}else a.Dza=f.getSearchCursor(b,{line:0,ch:0},g);a.TX=l}else a.TX=p;return a.Dza}
function $l(a,b){var d=b[0],e=b[1],f=b[2],g=b[3],h=F.c.u();bm(a);if(!d)return p;var m=a.qe(),d=cm(a,d,e,f);if(d.findNext())return dm(a).push({LJ:Z.ml,Pp:m.markText(d.from(),d.to(),{className:h.ka(Z.ml)})}),a.bf(d.from().line,d.from().ch),l;if(!a.TX&&g){for(;d.findPrevious(););if(d.findNext())return dm(a).push({LJ:Z.ml,Pp:m.markText(d.from(),d.to(),{className:h.ka(Z.ml)})}),a.bf(d.from().line,d.from().ch),l}return p}
function am(a,b){var d=b[0],e=b[1],f=b[2],g=b[3],h=F.c.u();bm(a);if(!d)return p;var m=a.qe(),d=cm(a,d,e,f);if(d.findPrevious())return dm(a).push({LJ:Z.ml,Pp:m.markText(d.from(),d.to(),{className:h.ka(Z.ml)})}),a.bf(d.from().line,d.from().ch),l;if(!a.TX&&g){for(;d.findNext(););if(d.findPrevious())return dm(a).push({LJ:Z.ml,Pp:m.markText(d.from(),d.to(),{className:h.ka(Z.ml)})}),a.bf(d.from().line,d.from().ch),l}return p}u.bf=function(a,b){Z.bf(this.d(),a,b)};
function bm(a){for(var b=0;b<dm(a).length;b++)dm(a)[b].Pp.clear();dm(a).length=0}function dm(a){a.pxa==n&&(a.pxa=[]);return a.pxa}Z.sza=function(a,b){if(!a||0===a.length)return"";for(var d=n,e=M.gb,f=0,g=a.length;f<g;f++){var h=a[f].indexOf(e);if(b&&-1<h){d=a[f];break}else if(!b&&-1===h){d=a[f];break}}return d===n?"":Z.ova(d)};
Z.EXa=function(a){var b=w.b,d=a.e(),e=a.k(),f=F.c.u(),g=a.getDisabled(),h;for(h in Z.Dh){var m="."+f.ka(h),q=Z.Dh[h],m=Z.H$("(^|\\s|,)\\"+m+"([{|,|\\.|\\s]|$)");m!=n&&Z.wsa(a,q,Z.sza(m,g))}a.getDisabled()&&(f="."+f.ka(Z.lHa),f=Z.H$("(^|\\s|,)\\"+f+"([{|,|\\.|\\s]|$)"),Z.X_a(a,Z.sza(f,g)));h=a.getLanguage();g=p;if(a.getDisabled()||a.getReadOnly())g=l;(f={java:"text/x-java",text:"text/plain"}[h])||(f=h);h=l;"no"==a.getLineNumbers()&&(h=p);var q=Z.nO(a),m=p,s;"enabled"==a.getCodeFold()&&(s=function(a){a.K9a(a.getCursor())},
m=l);e.YN=CodeMirror.fromTextArea(q,{onChange:e.o(e.hUa),onBlur:e.o(e.gUa),gutter:l,lineNumbers:h,matchBrackets:l,mode:f,readOnly:g,theme:"default",inputStyle:"contenteditable",leaveSubmitMethodAlone:l,foldGutter:m,gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-foldgutter"],extraKeys:{"Ctrl-Q":s,"Ctrl-Space":function(a){CodeMirror.x$a(a,function(a){return e.bga(a,e)})}}});s=Z.O$(a);s!=n&&!a.getDisabled()&&Z.bda(a,s);b.getElementById(M.g(d,Z.m5)).style.visibility="visible";b.getElementById(M.g(d,
Z.bU)).style.visibility="visible";Z.Kza(a)};Z.wsa=function(a,b,d){var e=a.k();a=w.b;var f=F.c.w();e.OZ==n&&(e.OZ=f.createElement("style"),e.OZ.type="text/css",f.getElementsByTagName("head")[0].appendChild(e.OZ));e=e.OZ;e.styleSheet?a.G()==w.aa?""!=d&&e.styleSheet.addRule(b,d):e.styleSheet.addRule(b,d):e.appendChild(f.createTextNode(b+" {"+d+"}"))};
Z.FSa=function(a,b){for(var d=w.b,e=a.k(),f=F.c.w(),g=0;g<f.styleSheets.length;g++){var h=f.styleSheets[g];if(h.href!=n&&h.href.match(b+"$")==b)try{if(d.G()==w.aa){if(h.rules){e.bu[b]=l;break}}else if(h.cssRules){e.bu[b]=l;break}}catch(m){}}};Z.nO=function(a){var b=w.b;a=a.e();a=M.g(a,Z.hHa);return b.getElementById(a)};
Z.H$=function(a){var b=w.b,d=F.c.w();a=RegExp(a);for(var e=[],f=0;f<d.styleSheets.length;f++){var g=d.styleSheets[f];if(b.G()==w.aa){if(g=g.rules,g!=n)for(var h=0;h<g.length;h++){var m=g.item(h);a.test(m.selectorText)&&e.push(m.selectorText+" {"+m.style.cssText+"}")}}else if(g=g.cssRules,g!=n)for(h=0;h<g.length;h++){var m=g[h],q=Z.J$(m.cssText);q!=n&&a.test(q)&&e.push(m.cssText)}}return e};Z.J$=function(a){var b=n;a!=n&&(b=a.substring(0,a.indexOf("{")-1),b=b.replace(/^\s+|\s+$/g,""));return b};
Z.ova=function(a){a=a.substring(a.indexOf("{")+1,a.indexOf("}"));return a=a.replace(/^\s+|\s+$/g,"")};Z.O$=function(a){var b=w.b;a=M.g(a.e(),Z.dna);a=b.getElementById(a);b=b.getAttribute(a,"value");return b!=n&&(b=b.split(","),b!=n&&5==b.length)?{start:{line:Number(b[0]),ch:Number(b[1])},end:{line:Number(b[2]),ch:Number(b[3])},scrollTop:Number(b[4])}:n};
Z.bda=function(a,b){var d=a.k();b.start.line==b.end.line&&b.start.ch==b.end.ch?d.YN.setCursor(Number(b.start.line),Number(b.start.ch)):d.YN.setSelection(b.start,b.end)};Z.IG=function(a){var b=w.b,d=a.e(),e=a.k(),f=M.g(d,Z.ena),d=M.g(d,Z.EHa),b=b.getElementById(f),b=b.contentWindow||b.contentDocument;b.document&&(b=b.document);d=b.getElementById(d).value;d!=n&&(e=e.qe(),e!=n?(b=Z.O$(a),e.setValue(d),e.save(),b!=n&&Z.bda(a,b)):setTimeout(function(){Z.IG(a)},1E3))};
Z.Mwa=function(a,b){var d=w.b,e=a.e(),e=M.g(e,Z.bU),f=b.Q(),g=p;d.getAttribute(f,"id")==e&&(g=l);if(!g)for(f=f.parentNode;f!=n&&f.parentNode!=n;)if(d.getAttribute(f,"id")==e){g=l;break}else f=f.parentNode;return g};
Z.oxa=function(a,b,d){var e=F.c.u(),f=a.k().qe();if(f!=n){var g=b.wy(),h=b.OC(),m=b.Ufa(),q=b.Tfa();h==n&&(h=1);q==n&&(q=f.lineInfo(m-1).text.length+1);var s=Ea.getType(b.Gn()),y=n;s==Ea.Ef?y=e.ka(Z.xHa):s==Ea.kk?y=e.ka(Z.yHa):s==Ea.Am?y=e.ka(Z.BHa):s==Ea.Mi&&(y=e.ka(Z.zHa));d.markText=f.markText({line:g-1,ch:h-1},{line:m-1,ch:q-1},{className:y})}else setTimeout(function(){Z.oxa(a,b,d)},1E3)};
Z.O_a=function(a){for(var b=w.b,d=F.c.w(),e=0;e<d.styleSheets.length;e++){var f=d.styleSheets[e];if(b.G()==w.aa)for(var g=f.rules,h=0;h<g.length;h++){if(g[h].selectorText==a){f.removeRule[h];break}}else{g=f.cssRules;for(h=0;h<g.length;h++)if(Z.J$(g[h].cssText)==a){f.deleteRule[h];break}}}};Z.X_a=function(a,b){for(var d=Z.H$("^\\.cm-s-default span\\.cm"),e=0;e<d.length;e++){var f=Z.J$(d[e]);Z.O_a(f);Z.wsa(a,f,b)}};
Z.bf=function(a,b,d){var e=a.k().qe();if(e!=n){b&&0<b&&(b-=1);d&&0<d&&(d-=1);var f=e.getCursor();f.line==b&&f.ch==d&&(0<b?e.setCursor({line:b-1,ch:d}):e.setCursor({line:b+1,ch:d}));e.setCursor({line:b,ch:d})}else setTimeout(function(){Z.bf(a,b,d)},1E3)};Z.lda=function(a,b){var d=w.b;if(a){var e=a.e(),e=M.g(e,Z.dna),e=d.getElementById(e),f=b.getCursor(l).line+","+b.getCursor(l).ch,g=b.getCursor(p).line+","+b.getCursor(p).ch,h=b.getScrollerElement().scrollTop;d.setAttribute(e,"value",f+","+g+","+h)}};
Z.Kza=function(a,b){var d=w.b,e=a.e(),f=a.k();0==d.getElementById(M.g(e,Z.bU)).clientWidth?setTimeout(function(){Z.Kza(a,l)},500):setTimeout(function(){(d.G()==w.aa||b)&&f.YN.refresh();f.or();f.aH=l;F.c.Zy(f.d())},1E3)};Z.Jl=function(a,b){F.c.ff(a.e());var d=F.c.j(b),e={};e[AdfRichPopup.Cf]=a.e();d.show(e)};Z.OAa=function(a,b){var d=a.k();if(d){var e=l,f;for(f in d.bu)Z.FSa(a,f),d.bu[f]==p&&(e=p);e?Z.EXa(a):setTimeout(function(){Z.OAa(a,b)},2E3)}};