(self.webpackChunkcreator_web=self.webpackChunkcreator_web||[]).push([[575],{2575:(Fe,xe,oe)=>{"use strict";oe.r(xe),oe.d(xe,{LinkDetailPageComponent:()=>wi,UserRating:()=>Le});var s=oe(4438),x=oe(33),K=oe(4412),k=oe(8359),$=oe(9974),y=oe(4360),l=oe(8750),a=oe(3669),t=oe(5343),e=oe(9326),i=oe(2901),r=oe(5558),o=oe(5964),c=oe(177),h=oe(7217),v=oe(3068),b=oe(8141),f=oe(6697),w=oe(3383),d=oe(5980),u=oe(3955),A=oe(9821),_=oe(8069),p=oe(884);let E=(()=>{class I{constructor(M,N,H){this.dialog=M,this.windowResizeService=N,this.dialogRef=H,this.subscriptions=new k.yU,this.innerWidth=window.innerWidth}ngOnInit(){this.subscriptions.add(this.windowResizeService.windowResizeObserver$.subscribe(()=>{this.innerWidth=window.innerWidth}))}openMembershipSelectionDialog(){this.dialogRef.close(),this.dialog.open(w.v,{data:{hasCountdown:!1}})}closeDialog(){this.dialogRef.close()}ngOnDestroy(){this.subscriptions.unsubscribe()}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(d.o3),s.rXU(p.y),s.rXU(d.ce))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-link-detail-become-member-dialog"]],standalone:!0,features:[s.aNF],decls:21,vars:22,consts:[[3,"close","padding"],[3,"padding"],[1,"content-box"],[1,"content-box__headline"],[1,"content-box__subline"],[1,"action-buttons"],[1,"action-buttons__button",3,"click","rounded","type"],[1,"action-buttons__button",3,"click","rounded"]],template:function(N,H){1&N&&(s.j41(0,"lv-lib-popover")(1,"lv-lib-popover-header",0),s.bIt("close",function(){return H.closeDialog()}),s.j41(2,"h2"),s.EFF(3),s.nI1(4,"translate"),s.k0s()(),s.j41(5,"lv-lib-popover-body",1)(6,"div",2)(7,"p",3),s.EFF(8),s.nI1(9,"translate"),s.k0s(),s.j41(10,"p",4),s.EFF(11),s.nI1(12,"translate"),s.k0s()(),s.j41(13,"div",5)(14,"lv-lib-button",6),s.bIt("click",function(){return H.closeDialog()}),s.EFF(15),s.nI1(16,"translate"),s.k0s(),s.j41(17,"lv-lib-button",7),s.bIt("click",function(){return H.openMembershipSelectionDialog()}),s.EFF(18),s.nI1(19,"translate"),s.nI1(20,"translate"),s.k0s()()()()),2&N&&(s.R7$(),s.Y8G("padding",!0),s.R7$(2),s.JRh(s.bMT(4,10,"detail-page.member-dialog.headline")),s.R7$(2),s.Y8G("padding",!0),s.R7$(3),s.JRh(s.bMT(9,12,"detail-page.member-dialog.content-box-1")),s.R7$(3),s.JRh(s.bMT(12,14,"detail-page.member-dialog.content-box-2")),s.R7$(3),s.Y8G("rounded",!0)("type","secondary"),s.R7$(),s.SpI(" ",s.bMT(16,16,"detail-page.member-dialog.cancel")," "),s.R7$(2),s.Y8G("rounded",!0),s.R7$(),s.SpI(" ",H.innerWidth<450?s.bMT(19,18,"detail-page.member-dialog.get-premium-mobile"):s.bMT(20,20,"detail-page.member-dialog.get-premium")," "))},dependencies:[_.qX,_.SD,_.$0,A.X,u.h,u.D9],styles:["lv-link-detail-become-member-dialog .content-box__headline{font-size:40px;font-weight:500;text-align:center;padding-top:2rem;padding-left:2rem;padding-right:2rem}lv-link-detail-become-member-dialog .content-box__subline{font-size:24px;font-weight:300;text-align:center;padding-bottom:2rem;padding-left:2rem;padding-right:2rem}lv-link-detail-become-member-dialog .action-buttons{margin-top:1.5rem;display:flex;justify-content:space-between;-moz-column-gap:1rem;column-gap:1rem}lv-link-detail-become-member-dialog .action-buttons__button{max-width:256px;width:100%}@media (min-width: 768px){lv-link-detail-become-member-dialog .action-buttons button{width:100%!important}}\n"],encapsulation:2})}return I})();var m=oe(7366),g=oe(4410),C=oe(9941),S=oe(5184),F=oe(4499),L=oe(3300),D=oe(2771),R=oe(8810),O=oe(4630),T=oe(7484);let U=(()=>{class I{constructor(M,N,H){this.adblockService=M,this.authService=N,this.dialogService=H,this.onCheqEncryptedResponse=new D.m,this.requestCount=0}check(){if(this.requestCount>=1)return this.onCheqEncryptedResponse;if(this.authService.check())return this.onCheqResponse("premium"),this.onCheqEncryptedResponse;if(this.adblockService.isAdBlocked)return this.handleError("adblock invalid");const M="traffic_validation_cheq_response_ng_jsonp_"+this.requestCount++;window[M]=H=>{this.onCheqResponse(H)},window.__ctcg_ct_14473_exec=void 0;const N=document.createElement("script");return N.src="https://euob.bizseasky.com/sxp/i/df82c4ef6536e4dee60601280bc80588.js?id=14473",N.async=!0,N.onerror=()=>this.handleError("cheq error invalid"),N.className="ct_clicktrue_14473",N.setAttribute("data-ch","cheq4ppc"),N.setAttribute("data-jsonp",M),document.head.appendChild(N),this.onCheqEncryptedResponse}openInvalidUserPopup(M=""){this.dialogService.open(O.W,{data:{disableClose:!0,lastSubscription:M}})}handleError(M){return(0,R.$)(()=>new Error(M))}onCheqResponse(M){this.onCheqEncryptedResponse.next(M)}static#e=this.\u0275fac=function(N){return new(N||I)(s.KVO(T.u),s.KVO(m.u),s.KVO(d.o3))};static#t=this.\u0275prov=s.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();var B=oe(6661),P=oe(1413),W=oe(1584),z=oe(7048),G=oe(6354),Y=oe(7647),V=oe(1806);const j=V.J1` query adCountdown { adCountdown { id key value } } `;let Z=(()=>{class I extends V.XK{constructor(M){super(M),this.document=j}static#e=this.\u0275fac=function(N){return new(N||I)(s.KVO(V.Ic))};static#t=this.\u0275prov=s.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),Q=(()=>{class I{constructor(M){this.adCountdownGQL=M,this.localState$$=new K.t(null),this.localState$=this.localState$$.asObservable(),this.hasOpenCall=!1}getFromServer(){return this.hasOpenCall?this.localState$:(this.hasOpenCall=!0,this.localState$$.next(null),this.adCountdownGQL.fetch(null,{fetchPolicy:"network-only"}).pipe((0,b.M)(M=>{this.localState$$.next(M.data.adCountdown)}),(0,r.n)(()=>this.localState$),(0,b.M)(()=>{this.hasOpenCall=!1}),(0,Y.u)()))}getData(){return this.localState$$.value?this.localState$:this.getFromServer()}static#e=this.\u0275fac=function(N){return new(N||I)(s.KVO(Z))};static#t=this.\u0275prov=s.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();const ne=I=>({short_link_tilte:I});let re=(()=>{class I{constructor(M,N){this.data=M,this.dialogRef=N}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(d.Qs),s.rXU(d.ce))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-close-ad-dialog"]],standalone:!0,features:[s.aNF],decls:15,vars:17,consts:[[1,"close-ad__wrapper"],[3,"close"],[3,"padding"],[3,"innerHTML"],[1,"btn-wrapper"],["type","text",3,"click"],[3,"click","rounded"]],template:function(N,H){if(1&N&&(s.j41(0,"div",0)(1,"lv-lib-popover-header",1),s.bIt("close",function(){return H.dialogRef.close(!0)}),s.j41(2,"h2"),s.EFF(3),s.nI1(4,"translate"),s.k0s()(),s.j41(5,"lv-lib-popover-body",2),s.nrm(6,"p",3),s.nI1(7,"translate"),s.j41(8,"div",4)(9,"lv-lib-button",5),s.bIt("click",function(){return H.dialogRef.close("closeAdDialog")}),s.EFF(10),s.nI1(11,"translate"),s.k0s(),s.j41(12,"lv-lib-button",6),s.bIt("click",function(){return H.dialogRef.close("continue")}),s.EFF(13),s.nI1(14,"translate"),s.k0s()()()()),2&N){let q;s.R7$(3),s.JRh(s.bMT(4,6,"detail-page.ad-popover.close-popover.close-ad")),s.R7$(2),s.Y8G("padding",!0),s.R7$(),s.Y8G("innerHTML",s.i5U(7,8,"detail-page.ad-popover.close-popover.description",s.eq3(15,ne,null!==(q=H.data.shortLinkTitle)&&void 0!==q?q:"")),s.npT),s.R7$(4),s.SpI(" ",s.bMT(11,11,"button.close")," "),s.R7$(2),s.Y8G("rounded",!0),s.R7$(),s.JRh(s.bMT(14,13,"detail-page.ad-popover.close-popover.resume-btn"))}},dependencies:[_.SD,_.$0,A.X,u.h,u.D9],styles:[".close-ad__wrapper[_ngcontent-%COMP%]{border-radius:24px;background-color:#fff;overflow:hidden;width:100vw;max-width:400px}@media (max-width: 768px){.close-ad__wrapper[_ngcontent-%COMP%]{max-width:100vw;border-bottom-right-radius:0;border-bottom-left-radius:0}}.close-ad__wrapper[_ngcontent-%COMP%] .btn-wrapper[_ngcontent-%COMP%]{padding-top:1.5rem;display:flex;gap:1rem;justify-content:flex-end;align-items:center}"]})}return I})();var X=oe(9213),J=oe(8834),ie=oe(1626);const pe=["wrapper"],me=I=>({"z-index":I}),de=I=>({shortLink_title:I});function le(I,te){if(1&I){const M=s.RV6();s.j41(0,"lv-lib-ad-step",17),s.nI1(1,"translate"),s.nI1(2,"translate"),s.nI1(3,"translate"),s.nI1(4,"translate"),s.bIt("ctaClick",function(){const H=s.eBV(M).$implicit,q=s.XpG(2);return s.Njj(q.ctaClick("LVPremium"===H.provider))})("onClose",function(){s.eBV(M);const H=s.XpG(2);return s.Njj(H.adRevert())})("onSkip",function(){s.eBV(M);const H=s.XpG(2);return s.Njj(H.skipButton())})("animationend",function(){const H=s.eBV(M).first,q=s.XpG(2);return s.Njj(q.cardAnimationDone(H))}),s.k0s()}if(2&I){const M=te.$implicit,N=te.index,H=te.first,q=s.XpG(2);s.ZvI("adStepDetail__container adStepDetail__container--",q.animationActive?N-1:N,""),s.AVh("adStepDetail__container--remove",q.animationActive&&H)("adStepDetail__container--active",q.currentStep!=q.CustomAdStep.inactive&&H),s.Y8G("adNotice","LVPremium"===M.provider?"":"Advertisement")("ngClass",M&&q.loadingActive?"adStepDetail__container--index"+N:"adStepDetail__container--noindex")("ngStyle",s.eq3(35,me,q.adResources.length-N))("showClose",q.currentStep===q.CustomAdStep.active&&H)("description",M.description.toString())("title",M.title)("isTaboola","TABOOLA"===M.provider)("img",M.media[0].resource_url)("ctaTitle",M.call_to_action)("hrefTarget",q.currentStep===q.CustomAdStep.completed||"LVPremium"===M.provider?null:M.clickout_action.clickout_url)("currentStep",H?q.currentStep:q.CustomAdStep.inactive)("showButton",q.currentStep!=q.CustomAdStep.inactive&&H)("shortLinkTitle",q.shortLinkTitle)("firstStepText",s.bMT(1,26,"profile-page.custom-ad-first-step"))("secondStepText",M.call_to_action)("secondStepWaitingText",s.bMT(2,28,"profile-page.custom-ad-second-step-waiting"))("lastStepText",s.i5U(3,30,"profile-page.custom-ad-last-step",s.eq3(37,de,q.shortLinkTitle)))("isPremium","LVPremium"===M.provider)("completedStepBtnText",s.bMT(4,33,"profile-page.custom-ad-continue"))}}function ue(I,te){if(1&I&&(s.nrm(0,"lv-lib-ad-step",18),s.nI1(1,"translate")),2&I){const M=s.XpG(2);s.Y8G("isPremium","LVPremium"===M.adResources[0].provider)("description",M.adResources[0].description.toString())("title",M.adResources[0].title)("img",M.adResources[0].media[0].resource_url)("ctaTitle",M.adResources[0].title)("showButton",M.currentStep!=M.CustomAdStep.inactive)("shortLinkTitle",null)("completedStepBtnText",s.bMT(1,8,"profile-page.custom-ad-continue"))}}function _e(I,te){1&I&&(s.j41(0,"span"),s.EFF(1),s.nI1(2,"translate"),s.k0s()),2&I&&(s.R7$(),s.JRh(s.bMT(2,1,"profile-page.custom-ad-button-no")))}function $e(I,te){1&I&&(s.j41(0,"mat-icon",19),s.EFF(1,"refresh"),s.k0s())}function Ne(I,te){if(1&I){const M=s.RV6();s.qex(0),s.j41(1,"div",5)(2,"h3",6),s.EFF(3),s.nI1(4,"translate"),s.k0s()(),s.j41(5,"div",7,0),s.DNE(7,le,5,39,"lv-lib-ad-step",8),s.j41(8,"div",9),s.EFF(9),s.nI1(10,"translate"),s.k0s(),s.j41(11,"div",10),s.EFF(12),s.nI1(13,"translate"),s.k0s(),s.j41(14,"div",11),s.DNE(15,ue,2,10,"lv-lib-ad-step",12),s.k0s()(),s.j41(16,"div",13)(17,"button",14),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.removeAd())}),s.DNE(18,_e,3,3,"span",2)(19,$e,2,0,"mat-icon",15),s.k0s(),s.j41(20,"button",16),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.acceptAd())}),s.EFF(21),s.nI1(22,"translate"),s.k0s()(),s.bVm()}if(2&I){const M=s.XpG();s.R7$(3),s.JRh(s.bMT(4,16,"profile-page.custom-ad-headline")),s.R7$(4),s.Y8G("ngForOf",M.adResources),s.R7$(),s.AVh("active",M.yesBtnActive),s.R7$(),s.JRh(s.bMT(10,18,"profile-page.custom-ad-bubble-yes")),s.R7$(2),s.AVh("remove",M.animationActive),s.R7$(),s.JRh(s.bMT(13,20,"profile-page.custom-ad-bubble-no")),s.R7$(3),s.Y8G("ngIf",M.adResources[0]),s.R7$(),s.AVh("adStepDetail__buttonWrapper--remove",M.currentStep!=M.CustomAdStep.inactive),s.R7$(),s.Y8G("disabled",M.animationActive||M.loadingActive),s.R7$(),s.Y8G("ngIf",1!=M.countAds),s.R7$(),s.Y8G("ngIf",1===M.countAds),s.R7$(),s.Y8G("disabled",M.animationActive||M.loadingActive),s.R7$(),s.JRh(s.bMT(22,22,"profile-page.custom-ad-button-yes"))}}function ee(I,te){if(1&I&&(s.qex(0),s.EFF(1),s.nI1(2,"translate"),s.bVm()),2&I){const M=s.XpG();s.R7$(),s.SpI(" ",s.bMT(2,1,M.ExitType.premium)," ")}}function se(I,te){if(1&I&&(s.qex(0),s.EFF(1),s.nI1(2,"translate"),s.bVm()),2&I){const M=s.XpG();s.R7$(),s.SpI(" ",s.bMT(2,1,M.ExitType.premium)," ")}}function ae(I,te){if(1&I&&(s.qex(0),s.EFF(1),s.nI1(2,"translate"),s.bVm()),2&I){const M=s.XpG();s.R7$(),s.SpI(" ",s.bMT(2,1,M.ExitType.solved)," ")}}var ce=function(I){return I.taboola="TABOOLA",I}(ce||{});let fe=(()=>{class I{constructor(M,N,H,q,he,Ee){this.http=M,this.apiDetailPageService=N,this.trackingService=H,this.dialog=q,this.validationService=he,this.document=Ee,this.done=new s.bkB,this.isLoading=!0,this.animationActive=!1,this.loadingActive=!0,this.yesBtnActive=!1,this.currentStep=d.dn.inactive,this.ExitType=ye,this.CustomAdStep=d.dn,this.doneAds=[],this.isTaboola=!1,this.passFree=!1,this.canAccessAdClickout=!1,this.done.subscribe(()=>{this.killObservers()})}startObservers(){this.mutationObserver=new MutationObserver(()=>{if(this.wrapper){const M=this.document.getElementsByClassName("cdk-overlay-container")[0]?.hasChildNodes();this.intersectionObserver=new IntersectionObserver(N=>{N.forEach(H=>{H.isIntersecting&&!M?this.setViewport650():this.setViewportDeviceWidth()})}),this.intersectionObserver.observe(this.wrapper.nativeElement)}}),this.mutationObserver.observe(document,{childList:!0,subtree:!0})}killObservers(){this.setViewportDeviceWidth(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect()}setViewportDeviceWidth(){this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0")}setViewport650(){this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=650")}ngOnChanges(){this.adResources&&this.adResources.length>0&&(this.canAccessAdClickout=!1,this.countAds=this.adResources.length,this.isLoading&&(this.taboolaInitAction(this.adResources),this.checkIfPayloadTaboola(this.adResources[0])&&this.taboolaViewAction(this.adResources[0].completion_token,this.adResources[0].provider_additional_payload.taboola.visible_event_url)),this.startObservers(),this.isLoading=!1,this.adResources.length<5&&(this.loadingActive=!1))}taboolaInitAction(M){M.forEach(N=>{this.checkIfPayloadTaboola(N)&&this.http.get(N.provider_additional_payload.taboola.available_event_url).subscribe()})}skipButton(){this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"),this.done.emit(ye.solved)}taboolaViewAction(M,N){const H=M;this.adInterval&&clearTimeout(this.adInterval),this.adInterval=setTimeout(()=>{this.doneAds.includes(M)||(this.doneAds.push(H),this.http.get(N).subscribe())},1400)}checkIfPayloadTaboola(M){return M&&M.provider===ce.taboola?(this.isTaboola=!0,!0):(this.isTaboola=!1,!1)}ctaClick(M){M?this.handleExitClick():this.currentStep===d.dn.active||this.currentStep===d.dn.pending?(this.currentStep===d.dn.active&&(this.currentStep=d.dn.pending,setTimeout(()=>{this.passFree=!0},1e4),setTimeout(()=>{this.currentStep=d.dn.completed},1e3*this.adResources[0].countdown)),this.postCompletedAd(this.adResources[0].completion_token)):this.currentStep===d.dn.completed&&(this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"),this.done.emit(ye.solved))}removeAd(){this.animationActive=!0,this.checkIfPayloadTaboola(this.adResources[1])&&this.taboolaViewAction(this.adResources[1].completion_token,this.adResources[1].provider_additional_payload.taboola.visible_event_url),setTimeout(()=>{this.countAds--,this.adResources.push(this.adResources[0]),this.adResources=this.adResources.slice(1),this.animationActive=!1},800),0===this.countAds&&(this.countAds=this.adResources.length)}acceptAd(){this.yesBtnActive=!0,this.currentStep=d.dn.active,setTimeout(()=>{this.yesBtnActive=!1},1500)}postCompletedAd(M){if(this.canAccessAdClickout)window.open(this.adResources[0].clickout_action.clickout_url,"_blank");else{const N=window.open("","_blank");this.apiDetailPageService.postAdCardCompletion(M,"old").subscribe(H=>{H.data.completeCustomAdOffer&&(this.canAccessAdClickout=!0,N&&(N.location=this.adResources[0].clickout_action.clickout_url))},H=>{N&&(N.location="https://invalid.linkvertise.com"),this.validationService.openInvalidUserPopup()})}}handleExitClick(){let M=ye.premium;this.isTaboola?(M=ye.premium,this.currentStep===d.dn.pending&&this.passFree&&(M=ye.solved)):(this.currentStep===d.dn.pending||this.currentStep===d.dn.completed)&&this.passFree&&(M=ye.solved),M!==ye.premium&&this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"),this.done.emit(M)}adRevert(){this.currentStep=d.dn.inactive}cardAnimationDone(M){M&&(this.loadingActive=!1)}cardAnimationStart(){this.loadingActive=!0}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(ie.Qq),s.rXU(g.u),s.rXU(v.b),s.rXU(d.o3),s.rXU(U),s.rXU(c.qQ))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-old-ad-page"]],viewQuery:function(N,H){if(1&N&&s.GBs(pe,5),2&N){let q;s.mGM(q=s.lsd())&&(H.wrapper=q.first)}},inputs:{shortLinkTitle:"shortLinkTitle",adResources:"adResources"},outputs:{done:"done"},standalone:!0,features:[s.OA$,s.aNF],decls:7,vars:8,consts:[["wrapper",""],[1,"adStepDetail"],[4,"ngIf"],[1,"adStepFoot"],[1,"adStepFoot__text",3,"click"],[1,"adStepHead"],[1,"adStepHead__headline"],[1,"adStepDetail__wrapper"],[3,"adNotice","class","ngClass","adStepDetail__container--remove","adStepDetail__container--active","ngStyle","showClose","description","title","isTaboola","img","ctaTitle","hrefTarget","currentStep","showButton","shortLinkTitle","firstStepText","secondStepText","secondStepWaitingText","lastStepText","isPremium","completedStepBtnText","ctaClick","onClose","onSkip","animationend",4,"ngFor","ngForOf"],[1,"card__bubble","card__bubble--yes"],[1,"card__bubble","card__bubble--no"],[1,"adStepDetail__container","adStepDetail__container--static"],[3,"isPremium","description","title","img","ctaTitle","showButton","shortLinkTitle","completedStepBtnText",4,"ngIf"],[1,"adStepDetail__buttonWrapper"],["mat-button","",1,"buttonWrapper__button__secondary",3,"click","disabled"],["class","buttonWrapper__icon",4,"ngIf"],["mat-button","",1,"buttonWrapper__button__primary",3,"click","disabled"],[3,"ctaClick","onClose","onSkip","animationend","adNotice","ngClass","ngStyle","showClose","description","title","isTaboola","img","ctaTitle","hrefTarget","currentStep","showButton","shortLinkTitle","firstStepText","secondStepText","secondStepWaitingText","lastStepText","isPremium","completedStepBtnText"],[3,"isPremium","description","title","img","ctaTitle","showButton","shortLinkTitle","completedStepBtnText"],[1,"buttonWrapper__icon"]],template:function(N,H){1&N&&(s.j41(0,"div",1),s.DNE(1,Ne,23,24,"ng-container",2),s.j41(2,"div",3)(3,"div",4),s.bIt("click",function(){return H.handleExitClick()}),s.DNE(4,ee,3,3,"ng-container",2)(5,se,3,3,"ng-container",2)(6,ae,3,3,"ng-container",2),s.k0s()()()),2&N&&(s.R7$(),s.Y8G("ngIf",!H.isLoading),s.R7$(),s.AVh("adStepFoot--active",H.currentStep!=H.CustomAdStep.inactive),s.R7$(),s.AVh("adStepFoot__text--taboola",H.isTaboola),s.R7$(),s.Y8G("ngIf",!H.passFree&&H.isTaboola),s.R7$(),s.Y8G("ngIf",!H.passFree&&!H.isTaboola),s.R7$(),s.Y8G("ngIf",(H.currentStep===H.CustomAdStep.pending||H.currentStep===H.CustomAdStep.completed)&&H.passFree))},dependencies:[c.bT,J.$z,c.pM,d.DL,c.YU,c.B3,X.An,u.h,u.D9],styles:['@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_flyAway{0%{opacity:1}to{opacity:0;transform:scale(1) translate(-250px) rotate(-15deg)}}@keyframes _ngcontent-%COMP%_cardZero{0%{margin-top:30px;transform:scale(0);opacity:1;filter:brightness(1)}40%{margin-top:30px;transform:scale(1.1);opacity:1;filter:brightness(1)}60%{margin-top:30px;transform:scale(1);opacity:1;filter:brightness(1)}to{opacity:1}}@keyframes _ngcontent-%COMP%_cardOne{0%{margin-top:30px;transform:scale(0);opacity:1;filter:brightness(1)}40%{margin-top:30px;transform:scale(1.1);opacity:1;filter:brightness(1)}75%{margin-top:30px;transform:scale(1);opacity:1;filter:brightness(1)}to{opacity:1}}@keyframes _ngcontent-%COMP%_cardTwo{0%{margin-top:30px;transform:scale(0);opacity:1;filter:brightness(1)}40%{margin-top:30px;transform:scale(1.1);opacity:1;filter:brightness(1)}85%{margin-top:30px;transform:scale(1);opacity:1;filter:brightness(1)}to{opacity:1}}@keyframes _ngcontent-%COMP%_cardZeroDesktop{0%{opacity:1}35%{opacity:1;transform:scale(1) translate(55%) translateY(10%) rotate(24deg);margin-top:0;filter:brightness(1)}65%{opacity:1;transform:scale(1) translate(55%) translateY(10%) rotate(24deg);margin-top:0;filter:brightness(1)}to{transform:scale(1);opacity:1}}@keyframes _ngcontent-%COMP%_cardOneDesktop{0%{opacity:1;filter:brightness(1)}35%{transform:scale(1) translate(30%) translateY(0) rotate(12deg);filter:brightness(1);margin-top:0}65%{transform:scale(1) translate(30%) translateY(0) rotate(12deg);filter:brightness(1);margin-top:0}to{opacity:1;filter:brightness(1)}}@keyframes _ngcontent-%COMP%_cardTwoDesktop{0%{opacity:1;filter:brightness(1)}35%{transform:scale(1) translate(0) rotate(0);filter:brightness(1);margin-top:-10px}65%{transform:scale(1) translate(0) rotate(0);filter:brightness(1);margin-top:-10px}to{filter:brightness(1);opacity:1}}@keyframes _ngcontent-%COMP%_cardThreeDesktop{0%{opacity:1}35%{transform:scale(1) translate(-30%) translateY(0) rotate(-12deg);filter:brightness(1);margin-top:0}65%{transform:scale(1) translate(-30%) translateY(0) rotate(-12deg);filter:brightness(1);margin-top:0}to{transform:scale(.9);margin-top:-50px;opacity:1}}@keyframes _ngcontent-%COMP%_cardFourDesktop{0%{opacity:1}35%{opacity:1;transform:scale(1) translate(-55%) translateY(10%) rotate(-24deg);margin-top:0;filter:brightness(1)}65%{opacity:1;transform:scale(1) translate(-55%) translateY(10%) rotate(-24deg);margin-top:0;filter:brightness(1)}to{transform:scale(.9);margin-top:-50px;opacity:1}}.adStepDetail[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;left:0;top:105px;bottom:0;width:100%;background-color:#f5f5f5;display:flex;justify-content:flex-start;align-items:center;flex-direction:column;z-index:90;overflow-x:auto;padding:0 15px 135px;margin-bottom:3rem}@media (min-width: 970px){.adStepDetail[_ngcontent-%COMP%]{position:absolute;left:0;top:0;z-index:6;width:100%;height:100%;padding:0 15px}}.adStepDetail__wrapper[_ngcontent-%COMP%]{position:relative;width:100%}@media (min-width: 767px){.adStepDetail__wrapper[_ngcontent-%COMP%]{width:auto}}@media (max-width: 768px){.adStepDetail__wrapper[_ngcontent-%COMP%] lv-lib-ad-step[_ngcontent-%COMP%] .title--heading[_ngcontent-%COMP%]{font-size:26px;line-height:unset!important;min-height:unset!important}.adStepDetail__wrapper[_ngcontent-%COMP%] lv-lib-ad-step[_ngcontent-%COMP%] .adstep--container__preview-image[_ngcontent-%COMP%] .icon-container-left[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px!important}.adStepDetail__wrapper[_ngcontent-%COMP%] lv-lib-ad-step[_ngcontent-%COMP%] .step--text--stl[_ngcontent-%COMP%], .adStepDetail__wrapper[_ngcontent-%COMP%] lv-lib-ad-step[_ngcontent-%COMP%] .cta--text--top[_ngcontent-%COMP%]{font-size:10px!important;line-height:16px;width:100px!important;transform:translateY(10px)}}.adStepDetail[_ngcontent-%COMP%] .adStepHead[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin:20px 0 45px}.adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;text-align:center}@media (max-width: 768px){.adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]{font-size:28px;line-height:44px}}.adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]:before, .adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]:after{margin:0}.adStepDetail[_ngcontent-%COMP%] .adStepFoot[_ngcontent-%COMP%]{display:none;margin-top:14px}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text[_ngcontent-%COMP%]{font-size:20px;line-height:24px;color:#aaa;cursor:pointer;text-align:center;font-weight:500}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text[_ngcontent-%COMP%]{font-weight:400}}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text--taboola[_ngcontent-%COMP%]{width:100%;padding:0 15px}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text--taboola[_ngcontent-%COMP%] .taboolaBtn[_ngcontent-%COMP%]{background-color:#dbdbdb;border:3px solid #dbdbdb;font-size:16px;line-height:24px;color:#fff;box-shadow:none}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text--taboola[_ngcontent-%COMP%]{width:395px}}.adStepDetail[_ngcontent-%COMP%] .adStepFoot--active[_ngcontent-%COMP%]{display:block;width:100%}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot--active[_ngcontent-%COMP%]{width:auto}}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot[_ngcontent-%COMP%]{margin-top:25px}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text[_ngcontent-%COMP%]{font-size:16px}}.adStepDetail__container[_ngcontent-%COMP%]{position:absolute;transition-property:opacity,transform,margin,filter;transition-duration:.4s;transition-timing-function:ease-out;transition-delay:.4s;transform:scale(.9);opacity:0;width:100%;margin-top:-70px}@media (min-width: 767px){.adStepDetail__container[_ngcontent-%COMP%]{margin-top:-50px}}.adStepDetail__container[_ngcontent-%COMP%]:before{content:"";height:100%;width:1px;position:relative}.adStepDetail__container--static[_ngcontent-%COMP%]{position:relative;transform:scale(1);opacity:0;margin-top:30px}@media (min-width: 767px){.adStepDetail__container--static[_ngcontent-%COMP%]{margin-top:0}}.adStepDetail__container--0[_ngcontent-%COMP%]{transform:scale(1);border-top:0;margin-top:30px;opacity:1}@media (min-width: 767px){.adStepDetail__container--0[_ngcontent-%COMP%]{margin-top:0}}.adStepDetail__container--1[_ngcontent-%COMP%]{transform:scale(.95);margin-top:-20px;filter:brightness(.9);opacity:1}@media (min-width: 767px){.adStepDetail__container--1[_ngcontent-%COMP%]{margin-top:-25px}}.adStepDetail__container--2[_ngcontent-%COMP%]{transform:scale(.9);margin-top:-70px;filter:brightness(.8);opacity:1}@media (min-width: 767px){.adStepDetail__container--2[_ngcontent-%COMP%]{margin-top:-50px}}.adStepDetail__container--remove[_ngcontent-%COMP%]{opacity:0!important;transform:scale(1) translate(-150px) rotate(-15deg)!important}.adStepDetail__container--active[_ngcontent-%COMP%]{transition:none}.adStepDetail__container--index0[_ngcontent-%COMP%], .adStepDetail__container--index1[_ngcontent-%COMP%], .adStepDetail__container--index2[_ngcontent-%COMP%], .adStepDetail__container--index3[_ngcontent-%COMP%], .adStepDetail__container--index4[_ngcontent-%COMP%]{animation-fill-mode:forwards;opacity:0}@media (min-width: 1440px){.adStepDetail__container--index0[_ngcontent-%COMP%], .adStepDetail__container--index1[_ngcontent-%COMP%], .adStepDetail__container--index2[_ngcontent-%COMP%], .adStepDetail__container--index3[_ngcontent-%COMP%], .adStepDetail__container--index4[_ngcontent-%COMP%]{animation-duration:2.3s;opacity:1}}.adStepDetail__container--index0[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_cardZero;animation-delay:.9s;animation-duration:1.75s}@media (min-width: 1440px){.adStepDetail__container--index0[_ngcontent-%COMP%]{animation-name:cardZeroDesktop;animation-duration:2.3s;animation-delay:.7s}}.adStepDetail__container--index1[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_cardOne;animation-delay:.5s;animation-duration:2.05s}@media (min-width: 1440px){.adStepDetail__container--index1[_ngcontent-%COMP%]{animation-name:cardOneDesktop;animation-duration:2.3s;animation-delay:.7s}}.adStepDetail__container--index2[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_cardTwo;animation-delay:.2s;animation-duration:2.35s}@media (min-width: 1440px){.adStepDetail__container--index2[_ngcontent-%COMP%]{animation-name:cardTwoDesktop;animation-duration:2.3s;animation-delay:.7s}}@media (min-width: 1440px){.adStepDetail__container--index3[_ngcontent-%COMP%]{animation-name:cardThreeDesktop;animation-delay:.7s}}@media (min-width: 1440px){.adStepDetail__container--index4[_ngcontent-%COMP%]{animation-name:cardFourDesktop;animation-delay:.7s}}.adStepDetail__buttonWrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;margin-top:20px;width:100%;gap:20px}@media (min-width: 767px){.adStepDetail__buttonWrapper[_ngcontent-%COMP%]{width:395px}}.adStepDetail__buttonWrapper--remove[_ngcontent-%COMP%]{display:none}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button[_ngcontent-%COMP%]{display:flex;flex-grow:1}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button[_ngcontent-%COMP%]:disabled{background-color:#dbdbdb!important;color:#fff;cursor:not-allowed}@media (hover: none){.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button[_ngcontent-%COMP%]:hover{background-color:#323232}}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button__primary[_ngcontent-%COMP%]{border-radius:0;font-weight:400;background-color:#ff8114;font-size:20px;box-sizing:content-box;height:45px}@media (max-width: 768px){.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button__primary[_ngcontent-%COMP%]{font-size:30px;height:55px}}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button__secondary[_ngcontent-%COMP%]{border-radius:0;font-weight:400;background-color:#323232;font-size:20px;box-sizing:content-box;height:45px}@media (max-width: 768px){.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button__secondary[_ngcontent-%COMP%]{font-size:30px;height:55px}}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__icon[_ngcontent-%COMP%]{font-size:37px;height:37px;width:37px}.card__bubble[_ngcontent-%COMP%]{opacity:0;position:absolute;top:40px;width:150px;height:150px;border-radius:100%;border:10px solid #fff;font-size:50px;font-weight:700;color:#fff;display:flex;justify-content:center;align-items:center;margin-left:50%;transform:translate(-50%);z-index:10;transition-timing-function:ease-out}.card__bubble--yes[_ngcontent-%COMP%]{background-color:#ff8114}.card__bubble--no[_ngcontent-%COMP%]{background-color:#323232}.card__bubble.remove[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .4s ease 0ms,flyAway .4s ease .4s}.card__bubble.active[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .8s ease,fadeIn .4s ease .8s 1 reverse}.mdc-button[_ngcontent-%COMP%]:disabled, .mdc-flat-button[_ngcontent-%COMP%]:disabled, .mdc-stroked-button[_ngcontent-%COMP%]:disabled, .mdc-mini-fab[_ngcontent-%COMP%]:disabled{background-color:#dbdbdb!important;color:#fff!important;cursor:not-allowed}']})}return I})();var we=oe(4497);let be=(()=>{class I{constructor(){this.buttonText="detail-page.ad-popover.btn-text",this.pauseCountdown=!1,this.handleAdClick=new s.bkB,this.moveToPayWall=new s.bkB,this.openCloseAdDialog=new s.bkB,this.variantCountdownCompleted$=new K.t(!1),this.countdown$$=new K.t(0)}ngOnChanges(M){M.countdown&&this.startCountdown(this.countdown)}startCountdown(M){this.variantCountdownCompleted$.next(!1),this.countdown$$.next(M),this.variantCountdown$=setInterval(()=>{if(!this.pauseCountdown){const N=this.countdown$$.value;N>0?this.countdown$$.next(N-1):this.stopCountdown()}},1e3)}stopCountdown(){clearInterval(this.variantCountdown$),this.variantCountdown$=null,this.pauseCountdown=!1,this.variantCountdownCompleted$.next(!0)}static#e=this.\u0275fac=function(N){return new(N||I)};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-taboola-variant-ad-step"]],inputs:{currentAdCard:"currentAdCard",shortLinkTitle:"shortLinkTitle",buttonText:"buttonText",countdown:"countdown",pauseCountdown:"pauseCountdown"},outputs:{handleAdClick:"handleAdClick",moveToPayWall:"moveToPayWall",openCloseAdDialog:"openCloseAdDialog"},standalone:!0,features:[s.OA$,s.aNF],decls:24,vars:18,consts:[[3,"showCloseIcon"],[1,"timer--wrapper",3,"click"],["lv-lib-ellipsis","1"],[1,"close-icon"],[1,"popover--image",3,"src"],[1,"pop-over-description__wrapper"],["chipType","static","text","Advertisement",3,"icon","isMaterial","iconColor"],[1,"pop-over-description__content"],[3,"click","rounded","isfullWidth"]],template:function(N,H){1&N&&(s.j41(0,"lv-lib-popover")(1,"lv-lib-popover-header",0)(2,"h2"),s.EFF(3),s.nI1(4,"translate"),s.k0s(),s.j41(5,"div",1),s.bIt("click",function(){return H.moveToPayWall.emit()}),s.j41(6,"span",2),s.EFF(7),s.nI1(8,"translate"),s.k0s(),s.j41(9,"div",3)(10,"mat-icon"),s.EFF(11,"skip_next"),s.k0s()()()(),s.j41(12,"lv-lib-popover-body"),s.nrm(13,"img",4),s.j41(14,"div",5),s.nrm(15,"lv-lib-chip",6),s.j41(16,"div",7)(17,"h3"),s.EFF(18),s.k0s(),s.j41(19,"p"),s.EFF(20),s.k0s(),s.j41(21,"lv-lib-button",8),s.bIt("click",function(){return H.handleAdClick.emit(H.currentAdCard.clickout_action.clickout_url)}),s.EFF(22),s.nI1(23,"translate"),s.k0s()()()()()),2&N&&(s.R7$(),s.Y8G("showCloseIcon",!1),s.R7$(2),s.JRh(s.bMT(4,12,"detail-page.ad-popover.title")),s.R7$(4),s.SpI(" ",s.bMT(8,14,"detail-page.skip-ad")," "),s.R7$(6),s.Y8G("src",H.currentAdCard.media[0].resource_url,s.B4B),s.R7$(2),s.Y8G("icon","campaign")("isMaterial",!0)("iconColor","black"),s.R7$(3),s.JRh(H.currentAdCard.title),s.R7$(2),s.JRh(H.currentAdCard.description),s.R7$(),s.Y8G("rounded",!0)("isfullWidth",!0),s.R7$(),s.JRh(s.bMT(23,16,H.buttonText)))},dependencies:[_.qX,_.SD,X.An,_.$0,we.d,A.X,u.h,u.D9],styles:[".timer--wrapper[_ngcontent-%COMP%]{cursor:pointer;border-radius:50px;background-color:#f5f5f5;height:2rem;display:flex;padding:.25rem 0 .25rem .75rem;gap:.5rem;align-items:center}.timer--wrapper[_ngcontent-%COMP%] .no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.timer--wrapper[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{background-color:#323232;border-radius:50%;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center}.timer--wrapper[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.popover--image[_ngcontent-%COMP%]{aspect-ratio:16/9!important;width:100%!important;height:100%!important}.pop-over-description__wrapper[_ngcontent-%COMP%]{padding:1.5rem;display:flex;flex-direction:column;gap:.5rem}.pop-over-description__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.pop-over-description__content[_ngcontent-%COMP%] lv-lib-button[_ngcontent-%COMP%]{padding-top:.5rem}"]})}return I})();const Ce=()=>[];function ve(I,te){if(1&I){const M=s.RV6();s.qex(0),s.j41(1,"div",1)(2,"div",2)(3,"lv-taboola-variant-ad-step",3),s.bIt("handleAdClick",function(H){s.eBV(M);const q=s.XpG(2);return s.Njj(q.handleAdClick(H))})("moveToPayWall",function(){s.eBV(M);const H=s.XpG(2);return s.Njj(H.moveToPayWall())})("openCloseAdDialog",function(H){s.eBV(M);const q=s.XpG(2);return s.Njj(q.openCloseAdDialog(H))}),s.k0s()()(),s.bVm()}if(2&I){const M=s.XpG(2);s.R7$(3),s.Y8G("countdown",M.variantCountdown)("pauseCountdown",M.pauseVariantCountdown)("currentAdCard",M.currentAdCard)("shortLinkTitle",M.shortLinkTitle)("buttonText",M.newLinkOffersArray[0].call_to_action)}}function ge(I,te){if(1&I){const M=s.RV6();s.j41(0,"lv-old-ad-page",5),s.bIt("done",function(H){s.eBV(M);const q=s.XpG(3);return s.Njj(q.emitOldPageExit(H))}),s.k0s()}if(2&I){const M=s.XpG(3);s.AVh("disableContent",!M.trigger),s.Y8G("shortLinkTitle",M.shortLinkTitle)("adResources",M.trigger?M.newLinkOffersArray:s.lJ4(4,Ce))}}function Ae(I,te){if(1&I&&(s.qex(0),s.DNE(1,ge,1,5,"lv-old-ad-page",4),s.bVm()),2&I){const M=s.XpG(2);s.R7$(),s.Y8G("ngIf",M.newLinkOffersArray&&M.newLinkOffersArray.length>0)}}function Me(I,te){if(1&I&&(s.qex(0),s.DNE(1,ve,4,5,"ng-container",0)(2,Ae,2,1,"ng-container",0),s.bVm()),2&I){const M=s.XpG();s.R7$(),s.Y8G("ngIf","testGroupNew"===M.variant),s.R7$(),s.Y8G("ngIf","old"===M.variant)}}var ye=function(I){return I.solved="profile-page.ad-completed",I.premium="profile-page.ad-get-premium",I.taboola="profile-page.ad-taboola",I.notSolved="profile-page.ad-not-completed",I}(ye||{});let Ke=(()=>{class I{constructor(M,N,H,q,he,Ee){this.trackingService=M,this.apiDetailPageService=N,this.apiSettingService=H,this.validationService=q,this.document=he,this.dialog=Ee,this.done=new s.bkB,this.sendOnTaboola=new s.bkB,this.trigger=!1,this.countdown=30,this.animationTimer=0,this.skippedCards=[],this.pauseVariantCountdown=!1,this.enableCountDownResume=!0,this.animateTimer$=new P.B,this.animateTimer1$=new P.B,this.animateTimer2$=new P.B,this.animateTimer3$=new P.B,this.animateTimer4$=new P.B,this.subscriptions=new k.yU,this.canAccessAdClickout=(0,s.vPA)(!1)}ngOnChanges(){this.canAccessAdClickout.set(!1)}ngOnInit(){this.subscriptions.add(this.apiSettingService.getData().subscribe(M=>{M&&(this.countdown=Number(M.value)),this.animationProperty=`loadIndication ${this.countdown}s linear forwards`,this.startTimer(this.countdown+1)})),this.subscriptions.add(this.apiDetailPageService.trigger$$.subscribe(M=>{this.trigger=M,M&&(this.trackingService.trackOpenTodoPage(this.variant),this.setCurrentCard(this.newLinkOffersArray[0]),this.resetTimer(),this.startTimer(this.countdown+1),"testGroupNew"===this.variant&&M&&(this.variantCountdown=10,this.sendOnTaboola.emit(this.newLinkOffersArray[0])))}))}startTimer(M,N){this.animateTimer(this.countdown),this.timer$=(0,W.O)(0,1e3).pipe((0,z.v)(()=>this.trigger),(0,f.s)(M),(0,G.T)(H=>{const q=this.animationTimer++/this.countdown;return N||this.animateTimer$.next(q),1===N&&this.animateTimer1$.next(q),2===N&&this.animateTimer2$.next(q),3===N&&this.animateTimer3$.next(q),4===N&&this.animateTimer4$.next(q),--M}))}animateTimer(M){return this.animateTimer$.pipe((0,z.v)(()=>this.trigger),(0,f.s)(M),(0,G.T)(N=>-4*M/100))}setCurrentCard(M){this.currentAdCard=M,"testGroupNew"===this.variant&&(this.countdown=10)}resetTimer(){this.animationTimer=0}setNextCard(){const M=this.newLinkOffersArray.indexOf(this.currentAdCard),N=(M+1)%this.newLinkOffersArray.length;this.setCurrentCard(this.newLinkOffersArray[N]),this.skippedCards.push(this.newLinkOffersArray[M]),this.currentAdCard=this.newLinkOffersArray[N],this.resetTimer(),this.startTimer(this.countdown+1,N)}postCompletedAd(M,N){if(this.canAccessAdClickout())window.open(N,"_blank");else{const H=window.open("","_blank");this.apiDetailPageService.postAdCardCompletion(M,this.variant).subscribe(()=>{this.canAccessAdClickout.set(!0),H&&(H.location=N)},()=>{H&&(H.location="https://invalid.linkvertise.com"),this.validationService.openInvalidUserPopup()})}}skipButton(){this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"),this.done.emit(ye.solved)}emitOldPageExit(M){this.done.emit(M)}handleAdClick(M){this.postCompletedAd(this.currentAdCard.completion_token,M)}isCurrent(M){return M===this.newLinkOffersArray.indexOf(this.currentAdCard)}isPast(M){return M{"closeAdDialog"===H&&(this.done.emit(ye.notSolved),this.pauseVariantCountdown=!0),this.pauseVariantCountdown=!1,this.enableCountDownResume=!0}))}moveToPayWall(){this.done.emit(ye.solved)}ngOnDestroy(){this.apiDetailPageService.trigger$$.next(!1),this.subscriptions.unsubscribe()}onFocus(){this.trigger&&"testGroupNew"===this.variant&&this.enableCountDownResume&&(this.pauseVariantCountdown=!1)}onBlur(){this.trigger&&"testGroupNew"===this.variant&&(this.pauseVariantCountdown=!0)}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(v.b),s.rXU(g.u),s.rXU(Q),s.rXU(U),s.rXU(c.qQ),s.rXU(d.o3))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-link-detail-page-ad-step"]],hostBindings:function(N,H){1&N&&s.bIt("focus",function(he){return H.onFocus(he)},!1,s.tSv)("blur",function(he){return H.onBlur(he)},!1,s.tSv)},inputs:{variant:"variant",newLinkOffersArray:"newLinkOffersArray",shortLinkTitle:"shortLinkTitle"},outputs:{done:"done",sendOnTaboola:"sendOnTaboola"},standalone:!0,features:[s.OA$,s.aNF],decls:1,vars:1,consts:[[4,"ngIf"],[1,"adStepDetail","variant__testGroupNew"],[1,"adStepDetail__wrapper"],[3,"handleAdClick","moveToPayWall","openCloseAdDialog","countdown","pauseCountdown","currentAdCard","shortLinkTitle","buttonText"],[3,"disableContent","shortLinkTitle","adResources","done",4,"ngIf"],[3,"done","shortLinkTitle","adResources"]],template:function(N,H){1&N&&s.DNE(0,Me,3,2,"ng-container",0),2&N&&s.Y8G("ngIf",H.trigger)},dependencies:[c.bT,be,fe],styles:['@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_flyAway{0%{opacity:1}to{opacity:0;transform:scale(1) translate(-250px) rotate(-15deg)}}@keyframes _ngcontent-%COMP%_cardZero{0%{margin-top:30px;transform:scale(0);opacity:1;filter:brightness(1)}40%{margin-top:30px;transform:scale(1.1);opacity:1;filter:brightness(1)}60%{margin-top:30px;transform:scale(1);opacity:1;filter:brightness(1)}to{opacity:1}}@keyframes _ngcontent-%COMP%_cardOne{0%{margin-top:30px;transform:scale(0);opacity:1;filter:brightness(1)}40%{margin-top:30px;transform:scale(1.1);opacity:1;filter:brightness(1)}75%{margin-top:30px;transform:scale(1);opacity:1;filter:brightness(1)}to{opacity:1}}@keyframes _ngcontent-%COMP%_cardTwo{0%{margin-top:30px;transform:scale(0);opacity:1;filter:brightness(1)}40%{margin-top:30px;transform:scale(1.1);opacity:1;filter:brightness(1)}85%{margin-top:30px;transform:scale(1);opacity:1;filter:brightness(1)}to{opacity:1}}@keyframes _ngcontent-%COMP%_cardZeroDesktop{0%{opacity:1}35%{opacity:1;transform:scale(1) translate(55%) translateY(10%) rotate(24deg);margin-top:0;filter:brightness(1)}65%{opacity:1;transform:scale(1) translate(55%) translateY(10%) rotate(24deg);margin-top:0;filter:brightness(1)}to{transform:scale(1);opacity:1}}@keyframes _ngcontent-%COMP%_cardOneDesktop{0%{opacity:1;filter:brightness(1)}35%{transform:scale(1) translate(30%) translateY(0) rotate(12deg);filter:brightness(1);margin-top:0}65%{transform:scale(1) translate(30%) translateY(0) rotate(12deg);filter:brightness(1);margin-top:0}to{opacity:1;filter:brightness(1)}}@keyframes _ngcontent-%COMP%_cardTwoDesktop{0%{opacity:1;filter:brightness(1)}35%{transform:scale(1) translate(0) rotate(0);filter:brightness(1);margin-top:-10px}65%{transform:scale(1) translate(0) rotate(0);filter:brightness(1);margin-top:-10px}to{filter:brightness(1);opacity:1}}@keyframes _ngcontent-%COMP%_cardThreeDesktop{0%{opacity:1}35%{transform:scale(1) translate(-30%) translateY(0) rotate(-12deg);filter:brightness(1);margin-top:0}65%{transform:scale(1) translate(-30%) translateY(0) rotate(-12deg);filter:brightness(1);margin-top:0}to{transform:scale(.9);margin-top:-50px;opacity:1}}@keyframes _ngcontent-%COMP%_cardFourDesktop{0%{opacity:1}35%{opacity:1;transform:scale(1) translate(-55%) translateY(10%) rotate(-24deg);margin-top:0;filter:brightness(1)}65%{opacity:1;transform:scale(1) translate(-55%) translateY(10%) rotate(-24deg);margin-top:0;filter:brightness(1)}to{transform:scale(.9);margin-top:-50px;opacity:1}}.disableContent[_ngcontent-%COMP%]{display:none}.adStepDetail[_ngcontent-%COMP%]{position:fixed;left:0;top:105px;bottom:0;width:100vw;background-color:#f5f5f5;display:flex;flex-direction:column;z-index:10000;overflow-x:auto;padding:0 15px 135px}@media (max-width: 768px){.adStepDetail[_ngcontent-%COMP%]{padding:0}}.adStepDetail[_ngcontent-%COMP%] .load[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loadIndication 5s linear}@media (min-width: 970px){.adStepDetail[_ngcontent-%COMP%]{left:70px;top:70px;z-index:6;width:calc(100% - 70px);height:calc(100% - 70px);padding:0 15px}}.adStepDetail__wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:relative;width:100%;margin-top:2rem}@media (min-width: 767px){.adStepDetail__wrapper[_ngcontent-%COMP%]{width:auto}}.adStepDetail[_ngcontent-%COMP%] .adStepHead[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin:20px 0 45px}.adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;text-align:center}@media (max-width: 768px){.adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]{font-size:40px;line-height:44px}}.adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]:before, .adStepDetail[_ngcontent-%COMP%] .adStepHead__headline[_ngcontent-%COMP%]:after{margin:0}.adStepDetail[_ngcontent-%COMP%] .adStepHead__subHead[_ngcontent-%COMP%]{text-align:center;margin-top:5px;font-size:16px;line-height:24px;font-weight:300}@media (max-width: 768px){.adStepDetail[_ngcontent-%COMP%] .adStepHead__subHead[_ngcontent-%COMP%]{font-size:24px;line-height:32px}}.adStepDetail[_ngcontent-%COMP%] .adStepFoot[_ngcontent-%COMP%]{display:none;margin-top:14px}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text[_ngcontent-%COMP%]{font-size:20px;line-height:24px;color:#aaa;cursor:pointer;text-align:center;font-weight:500}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text[_ngcontent-%COMP%]{font-weight:400}}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text--taboola[_ngcontent-%COMP%]{width:100%;padding:0 15px}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text--taboola[_ngcontent-%COMP%] .taboolaBtn[_ngcontent-%COMP%]{background-color:#dbdbdb;border:3px solid #DBDBDB;font-size:16px;line-height:24px;color:#fff;box-shadow:none}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text--taboola[_ngcontent-%COMP%]{width:395px}}.adStepDetail[_ngcontent-%COMP%] .adStepFoot--active[_ngcontent-%COMP%]{display:block;width:100%}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot--active[_ngcontent-%COMP%]{width:auto}}@media (min-width: 767px){.adStepDetail[_ngcontent-%COMP%] .adStepFoot[_ngcontent-%COMP%]{margin-top:25px}.adStepDetail[_ngcontent-%COMP%] .adStepFoot__text[_ngcontent-%COMP%]{font-size:16px}}.adStepDetail[_ngcontent-%COMP%]:before{left:0}.adStepDetail[_ngcontent-%COMP%]:after{right:0;rotate:180deg}.adStepDetail__container[_ngcontent-%COMP%]{position:absolute;transition-property:opacity,transform,margin,filter;transition-duration:.4s;transition-timing-function:ease-out;transition-delay:.4s;transform:scale(.9);opacity:0;width:100%;margin-top:-70px}@media (min-width: 767px){.adStepDetail__container[_ngcontent-%COMP%]{margin-top:-50px}}.adStepDetail__container[_ngcontent-%COMP%]:before{content:"";height:100%;width:1px;position:relative}.adStepDetail__container--static[_ngcontent-%COMP%]{position:relative;transform:scale(1);opacity:0;margin-top:30px}@media (min-width: 767px){.adStepDetail__container--static[_ngcontent-%COMP%]{margin-top:0}}.adStepDetail__container--0[_ngcontent-%COMP%]{transform:scale(1);border-top:0;margin-top:30px;opacity:1}@media (min-width: 767px){.adStepDetail__container--0[_ngcontent-%COMP%]{margin-top:0}}.adStepDetail__container--1[_ngcontent-%COMP%]{transform:scale(.95);margin-top:-20px;filter:brightness(.9);opacity:1}@media (min-width: 767px){.adStepDetail__container--1[_ngcontent-%COMP%]{margin-top:-25px}}.adStepDetail__container--2[_ngcontent-%COMP%]{transform:scale(.9);margin-top:-70px;filter:brightness(.8);opacity:1}@media (min-width: 767px){.adStepDetail__container--2[_ngcontent-%COMP%]{margin-top:-50px}}.adStepDetail__container--remove[_ngcontent-%COMP%]{opacity:0!important;transform:scale(1) translate(-150px) rotate(-15deg)!important}.adStepDetail__container--active[_ngcontent-%COMP%]{transition:none}.adStepDetail__container--index0[_ngcontent-%COMP%], .adStepDetail__container--index1[_ngcontent-%COMP%], .adStepDetail__container--index2[_ngcontent-%COMP%], .adStepDetail__container--index3[_ngcontent-%COMP%], .adStepDetail__container--index4[_ngcontent-%COMP%]{animation-fill-mode:forwards;opacity:0}@media (min-width: 1440px){.adStepDetail__container--index0[_ngcontent-%COMP%], .adStepDetail__container--index1[_ngcontent-%COMP%], .adStepDetail__container--index2[_ngcontent-%COMP%], .adStepDetail__container--index3[_ngcontent-%COMP%], .adStepDetail__container--index4[_ngcontent-%COMP%]{animation-duration:2.3s;opacity:1}}.adStepDetail__container--index0[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_cardZero;animation-delay:.9s;animation-duration:1.75s}@media (min-width: 1440px){.adStepDetail__container--index0[_ngcontent-%COMP%]{animation-name:cardZeroDesktop;animation-duration:2.3s;animation-delay:.7s}}.adStepDetail__container--index1[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_cardOne;animation-delay:.5s;animation-duration:2.05s}@media (min-width: 1440px){.adStepDetail__container--index1[_ngcontent-%COMP%]{animation-name:cardOneDesktop;animation-duration:2.3s;animation-delay:.7s}}.adStepDetail__container--index2[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_cardTwo;animation-delay:.2s;animation-duration:2.35s}@media (min-width: 1440px){.adStepDetail__container--index2[_ngcontent-%COMP%]{animation-name:cardTwoDesktop;animation-duration:2.3s;animation-delay:.7s}}@media (min-width: 1440px){.adStepDetail__container--index3[_ngcontent-%COMP%]{animation-name:cardThreeDesktop;animation-delay:.7s}}@media (min-width: 1440px){.adStepDetail__container--index4[_ngcontent-%COMP%]{animation-name:cardFourDesktop;animation-delay:.7s}}.adStepDetail__buttonWrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;margin-top:20px;width:100%;gap:20px}@media (min-width: 767px){.adStepDetail__buttonWrapper[_ngcontent-%COMP%]{width:395px}}.adStepDetail__buttonWrapper--remove[_ngcontent-%COMP%]{display:none}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button[_ngcontent-%COMP%]{display:flex;flex-grow:1}@media (hover: none){.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__button[_ngcontent-%COMP%]:hover{background-color:#323232}}.adStepDetail__buttonWrapper[_ngcontent-%COMP%] .buttonWrapper__icon[_ngcontent-%COMP%]{font-size:37px;height:37px;width:37px}.variant__testGroupNew[_ngcontent-%COMP%]{background:fixed;background-color:#00000080;left:0;top:0;z-index:600;width:100%;height:100%;display:flex;align-items:center;justify-content:center}@media (max-width: 768px){.variant__testGroupNew[_ngcontent-%COMP%]{top:inherit;justify-content:flex-end}}.card__bubble[_ngcontent-%COMP%]{opacity:0;position:absolute;top:40px;width:150px;height:150px;border-radius:100%;border:10px solid #fff;font-size:50px;font-weight:700;color:#fff;display:flex;justify-content:center;align-items:center;margin-left:50%;transform:translate(-50%);z-index:10;transition-timing-function:ease-out}.card__bubble--yes[_ngcontent-%COMP%]{background-color:#ff8114}.card__bubble--no[_ngcontent-%COMP%]{background-color:#323232}.card__bubble.remove[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .4s ease 0ms,flyAway .4s ease .4s}.card__bubble.active[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .8s ease,fadeIn .4s ease .8s 1 reverse}@keyframes _ngcontent-%COMP%_loadIndication{0%{width:0%}to{width:100%}}']})}return I})();var Ye=oe(6160),Re=oe(2234);let Xe=(()=>{class I{constructor(M,N){this.el=M,this.ngZone=N,this.threshold=0,this.margin=0,this.visible=new s.bkB}ngOnInit(){}ngOnChanges(M){if(M.margin&&(this.margin=M.margin.currentValue),this.margin){const N={rootMargin:"0px",threshold:this.threshold};this.ngZone.runOutsideAngular(()=>{this.observer=new IntersectionObserver(H=>{H.forEach(q=>{this.visible.emit(q)})},N),this.observer.observe(this.el.nativeElement)})}}ngOnDestroy(){this.observer.disconnect()}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(s.aKT),s.rXU(s.SKi))};static#t=this.\u0275dir=s.FsC({type:I,selectors:[["","lvObserveVisible",""]],inputs:{threshold:"threshold",margin:"margin"},outputs:{visible:"visible"},standalone:!0,features:[s.OA$]})}return I})();var He=oe(4823),Qe=oe(3989);const ze=()=>({width:"200px",height:"25px",borderRadius:"0px",backgroundColor:"#dddbdd"}),Te=()=>({margin:"0",width:"80px",height:"20px",borderRadius:"0px",backgroundColor:"#dddbdd"}),Ze=()=>({margin:"0",width:"24px",height:"24px",borderRadius:"20px",backgroundColor:"#dddbdd"}),Ve=()=>({margin:"0",width:"40px",height:"16px",borderRadius:"0px",backgroundColor:"#dddbdd"}),Je=()=>({margin:"0",width:"100%",height:"48px",borderRadius:"8px",backgroundColor:"#dddbdd"});let qe=(()=>{class I{constructor(){}static#e=this.\u0275fac=function(N){return new(N||I)};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-action-box-skeleton"]],standalone:!0,features:[s.aNF],decls:34,vars:31,consts:[[1,"action-box-headline"],["appearance","line",3,"theme"],[1,"action-box",3,"rounded"],[1,"action-box__content-headline"],[1,"action-box__content-table"],[1,"action-box__content-table__creator-wrapper"],[1,"action-box__content-table__creator-wrapper__profile-wrapper"],[1,"action-box__content-table__creator-wrapper__profile-wrapper__text"],[1,"action-box__content-table__views-wrapper"],[1,"action-box__content-table__rating-wrapper"],[1,"action-box__content-table__rating-wrapper__container"],[3,"matTooltip"],[1,"action-box__content-table__rating-wrapper__container__bar-skeleton"],[1,"action-box__cta-button"]],template:function(N,H){1&N&&(s.j41(0,"h2",0),s.nrm(1,"ngx-skeleton-loader",1),s.k0s(),s.j41(2,"lv-lib-card",2)(3,"h2",3),s.nrm(4,"ngx-skeleton-loader",1),s.k0s(),s.j41(5,"div",4)(6,"div",5)(7,"div"),s.nrm(8,"ngx-skeleton-loader",1),s.k0s(),s.j41(9,"div",6),s.nrm(10,"ngx-skeleton-loader",1),s.j41(11,"div",7),s.nrm(12,"ngx-skeleton-loader",1),s.k0s()()(),s.j41(13,"div",8)(14,"div"),s.nrm(15,"ngx-skeleton-loader",1),s.k0s(),s.j41(16,"div"),s.nrm(17,"ngx-skeleton-loader",1),s.k0s()(),s.j41(18,"div",9)(19,"div"),s.nrm(20,"ngx-skeleton-loader",1),s.k0s(),s.j41(21,"div",10)(22,"div")(23,"mat-icon",11),s.nI1(24,"translate"),s.EFF(25,"thumb_up"),s.k0s(),s.nrm(26,"ngx-skeleton-loader",1),s.j41(27,"mat-icon",11),s.nI1(28,"translate"),s.EFF(29,"thumb_down"),s.k0s(),s.nrm(30,"ngx-skeleton-loader",1),s.k0s(),s.nrm(31,"div",12),s.k0s()()(),s.j41(32,"div",13),s.nrm(33,"ngx-skeleton-loader",1),s.k0s()()),2&N&&(s.R7$(),s.Y8G("theme",s.lJ4(20,ze)),s.R7$(),s.Y8G("rounded",!0),s.R7$(2),s.Y8G("theme",s.lJ4(21,ze)),s.R7$(4),s.Y8G("theme",s.lJ4(22,Te)),s.R7$(2),s.Y8G("theme",s.lJ4(23,Ze)),s.R7$(2),s.Y8G("theme",s.lJ4(24,Te)),s.R7$(3),s.Y8G("theme",s.lJ4(25,Te)),s.R7$(2),s.Y8G("theme",s.lJ4(26,Te)),s.R7$(3),s.Y8G("theme",s.lJ4(27,Te)),s.R7$(3),s.FS9("matTooltip",s.bMT(24,16,"detail-page.like")),s.R7$(3),s.Y8G("theme",s.lJ4(28,Ve)),s.R7$(),s.FS9("matTooltip",s.bMT(28,18,"detail-page.dislike")),s.R7$(3),s.Y8G("theme",s.lJ4(29,Ve)),s.R7$(),s.xc7("width",100,"%"),s.R7$(2),s.Y8G("theme",s.lJ4(30,Je)))},dependencies:[Re.Yq,Re.Zm,Qe.x,X.An,He.oV,u.h,u.D9],styles:["lv-action-box-skeleton .action-box-headline{margin-bottom:1rem;margin-top:2.5rem;margin-left:1.5rem}@media (min-width: 768px){lv-action-box-skeleton .action-box-headline{margin-left:0}}@media (min-width: 1366px){lv-action-box-skeleton .action-box-headline{display:none}}lv-action-box-skeleton .lv-card{padding:24px!important;margin-top:0!important}@media (min-width: 1366px){lv-action-box-skeleton .action-box{position:sticky;top:calc(75px + 1rem);margin-top:0}}lv-action-box-skeleton .action-box__premium-badge{display:flex;justify-content:center;align-items:center;gap:8px;padding:.75rem;border-radius:8px;background-color:#f5f5f5;width:100%;height:40px;margin-bottom:24px}lv-action-box-skeleton .action-box__premium-badge:before{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8.09988 9.60003L11.9999 2.90002L15.8999 9.60003L21.9999 4.00002L19.7999 16.3H4.19988L1.99988 4.00002L8.09988 9.60003Z' fill='rgba(255, 129, 20, 1)'/%3E%3Cpath d='M18.8001 20.7C19.4001 20.7 19.8001 20.2 19.8001 19.6V18.5H4.20007V19.7C4.20007 20.3 4.70007 20.7 5.30007 20.7H18.8001Z' fill='rgba(255, 129, 20, 1)'/%3E%3C/svg%3E\");transform:translateY(1px)}lv-action-box-skeleton .action-box__content-headline{width:100%;font-weight:500;font-size:24px}@media (max-width: 768px){lv-action-box-skeleton .action-box__content-headline{font-size:1.5rem!important}}lv-action-box-skeleton .action-box__content-table>div{border-bottom:1px solid #dbdbdb;display:flex;justify-content:space-between;height:70px}lv-action-box-skeleton .action-box__content-table__creator-wrapper{display:flex;align-items:center;font-size:16px;font-weight:300}lv-action-box-skeleton .action-box__content-table__creator-wrapper__profile-wrapper{display:flex;gap:.5rem}lv-action-box-skeleton .action-box__content-table__creator-wrapper__profile-wrapper__icon{width:24px;height:auto}lv-action-box-skeleton .action-box__content-table__creator-wrapper__profile-wrapper__icon:hover{cursor:pointer}lv-action-box-skeleton .action-box__content-table__creator-wrapper__profile-wrapper__text{display:flex;align-items:center;font-weight:500!important}lv-action-box-skeleton .action-box__content-table__creator-wrapper__profile-wrapper__text:hover{cursor:pointer}lv-action-box-skeleton .action-box__content-table__views-wrapper{display:flex;align-items:center;font-size:16px;font-weight:300}lv-action-box-skeleton .action-box__content-table__rating-wrapper{display:flex;align-items:center;font-size:16px;font-weight:300}lv-action-box-skeleton .action-box__content-table__rating-wrapper__container{display:flex;flex-direction:column}lv-action-box-skeleton .action-box__content-table__rating-wrapper__container>div{display:flex}lv-action-box-skeleton .action-box__content-table__rating-wrapper__container>div>mat-icon{color:#aaa;margin-right:.5rem;margin-left:1.5rem;font-size:24px}lv-action-box-skeleton .action-box__content-table__rating-wrapper__container>div>mat-icon:first-of-type{margin-left:0}lv-action-box-skeleton .action-box__content-table__rating-wrapper__container>div>mat-icon:hover{animation:swing .6s ease;animation-iteration-count:1;animation-name:bounce;animation-timing-function:ease;color:#000!important;cursor:pointer}lv-action-box-skeleton .action-box__content-table__rating-wrapper__container__bar-skeleton{border-bottom:3px solid #dddddd;position:relative;bottom:-22px}lv-action-box-skeleton .action-box__cta-button{margin-top:24px!important;width:100%}@media (max-width: 768px){lv-action-box-skeleton .action-box__cta-button{font-size:1rem!important}}@keyframes bounce{0%{transform:rotate(0) scale(1)}50%{transform:rotate(-15deg) scale(1.5)}to{transform:rotate(0) scale(1)}}lv-action-box-skeleton .btn-clicked{color:#000!important}\n"],encapsulation:2})}return I})();const et=I=>({btn_text:I});function tt(I,te){1&I&&(s.j41(0,"div",3),s.EFF(1),s.nI1(2,"translate"),s.k0s()),2&I&&(s.R7$(),s.SpI(" ",s.bMT(2,1,"detail-page.premium-only")," "))}function it(I,te){if(1&I&&(s.j41(0,"span",19),s.EFF(1),s.nI1(2,"translate"),s.k0s()),2&I){const M=s.XpG(2);s.R7$(),s.SpI(" ",s.i5U(2,1,"todo-app-download-completed",s.eq3(4,et,"PASTE"==(null==M.link?null:M.link.target_type)?"Text":"Link"))," ")}}function nt(I,te){1&I&&(s.j41(0,"span"),s.EFF(1),s.nI1(2,"translate"),s.k0s()),2&I&&(s.R7$(),s.SpI(" ",s.bMT(2,1,"button.use-premium")," "))}function rt(I,te){1&I&&(s.j41(0,"p",20),s.EFF(1),s.nI1(2,"translate"),s.k0s()),2&I&&(s.R7$(),s.SpI(" ",s.bMT(2,1,"todo-ad-vip-text")," "))}function ot(I,te){if(1&I){const M=s.RV6();s.j41(0,"h2",0),s.EFF(1),s.nI1(2,"translate"),s.k0s(),s.j41(3,"div",1)(4,"lv-lib-card",2),s.DNE(5,tt,3,3,"div",3),s.j41(6,"h2",4),s.EFF(7),s.k0s(),s.j41(8,"div",5)(9,"div",6)(10,"div"),s.EFF(11),s.nI1(12,"translate"),s.k0s(),s.j41(13,"div",7)(14,"img",8),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.openProfile("profile/"+(null==H.link||null==H.link.publisher?null:H.link.publisher.id)))}),s.k0s(),s.j41(15,"div",9),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.openProfile("profile/"+(null==H.link||null==H.link.publisher?null:H.link.publisher.id)))}),s.EFF(16),s.k0s()()(),s.j41(17,"div",10)(18,"div"),s.EFF(19),s.nI1(20,"translate"),s.k0s(),s.j41(21,"div"),s.EFF(22),s.nI1(23,"number"),s.k0s()(),s.j41(24,"div",11)(25,"div"),s.EFF(26),s.nI1(27,"translate"),s.k0s(),s.j41(28,"div",12)(29,"div")(30,"mat-icon",13),s.nI1(31,"translate"),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.like())}),s.EFF(32,"thumb_up "),s.k0s(),s.EFF(33),s.nI1(34,"number"),s.j41(35,"mat-icon",13),s.nI1(36,"translate"),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.dislike())}),s.EFF(37,"thumb_down "),s.k0s(),s.EFF(38),s.nI1(39,"number"),s.k0s(),s.j41(40,"div",14),s.nrm(41,"div",15)(42,"div",16),s.k0s()()()(),s.j41(43,"div",17),s.bIt("visible",function(H){s.eBV(M);const q=s.XpG();return s.Njj(q.visibleButtons(H))}),s.j41(44,"div")(45,"lv-lib-button",18),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.clickCtaButton())}),s.DNE(46,it,3,6,"span",19)(47,nt,3,3),s.k0s(),s.DNE(48,rt,3,3,"p",20),s.k0s()()()()}if(2&I){const M=s.XpG();s.R7$(),s.SpI(" ",s.bMT(2,31,"detail-page.content-access")," "),s.R7$(3),s.Y8G("rounded",!0)("marginSize",null)("padding",!0),s.R7$(),s.vxM(5,null!=M.link&&M.link.is_premium_only_link?5:-1),s.R7$(2),s.JRh(null==M.link?null:M.link.short_link_title),s.R7$(4),s.JRh(s.bMT(12,33,"detail-page.creator")),s.R7$(5),s.SpI(" ",null==M.link||null==M.link.publisher?null:M.link.publisher.name," "),s.R7$(3),s.JRh(s.bMT(20,35,"detail-page.views")),s.R7$(3),s.JRh(s.brH(23,37,null==M.link?null:M.link.view_count,"","de-DE")),s.R7$(4),s.JRh(s.bMT(27,41,"detail-page.rating")),s.R7$(4),s.FS9("matTooltip",s.bMT(31,43,"detail-page.like")),s.Y8G("ngClass",null!=M.rating&&M.rating.hasLiked?"btn-clicked":""),s.R7$(3),s.SpI(" ",s.brH(34,45,null==M.rating?null:M.rating.likeSum,"1.0-0","de-DE")," "),s.R7$(2),s.FS9("matTooltip",s.bMT(36,49,"detail-page.dislike")),s.Y8G("ngClass",null!=M.rating&&M.rating.hasDisliked?"btn-clicked":""),s.R7$(3),s.SpI(" ",s.brH(39,51,null==M.rating?null:M.rating.dislikeSum,"1.0-0","de-DE")," "),s.R7$(3),s.xc7("width",null==M.rating?null:M.rating.ratingPercentage,"%"),s.R7$(),s.xc7("width",100-(null==M.rating?null:M.rating.ratingPercentage),"%"),s.R7$(),s.Y8G("margin",-103),s.R7$(),s.AVh("action-box__content-table--fixed",!M.isButtonVisible),s.R7$(),s.AVh("action-box__cta-button--fixed",!M.isButtonVisible),s.Y8G("customClasses","action-box__cta-button")("type","primary")("rounded",!0),s.R7$(),s.vxM(46,null!=M.link&&M.link.is_premium_only_link?47:46),s.R7$(2),s.vxM(48,M.isButtonVisible?48:-1)}}function st(I,te){1&I&&s.nrm(0,"lv-action-box-skeleton")}let at=(()=>{class I{constructor(M,N){this.profileService=M,this.trackingService=N,this.ratingSubject=new P.B,this.rateEmitter=new s.bkB,this.clickEmitter=new s.bkB,this.rating=null,this.subscriptions=new k.yU,this.isButtonVisible=!1}ngOnInit(){this.subscriptions.add(this.ratingSubject.subscribe(M=>{this.rating=M}))}ngOnDestroy(){this.subscriptions.unsubscribe()}like(){(!this.rating||!this.rating.deactivateRating)&&(this.rateEmitter.emit(Le.Positive),this.trackingService.trackRatingClick("detailPage","like"))}dislike(){(!this.rating||!this.rating.deactivateRating)&&(this.rateEmitter.emit(Le.Negative),this.trackingService.trackRatingClick("detailPage","dislike"))}clickCtaButton(){this.clickEmitter.emit()}openProfile(M){this.profileService.openProfile(M)}visibleButtons(M){this.isButtonVisible=!!M.isIntersecting||M.boundingClientRect.top<10}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(S.p),s.rXU(v.b))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-action-box"]],inputs:{link:"link",ratingSubject:"ratingSubject"},outputs:{rateEmitter:"rateEmitter",clickEmitter:"clickEmitter"},standalone:!0,features:[s.aNF],decls:2,vars:1,consts:[[1,"action-box-headline"],[1,"action-box"],[3,"rounded","marginSize","padding"],[1,"action-box__premium-badge"],[1,"action-box__content-headline"],[1,"action-box__content-table"],[1,"action-box__content-table__creator-wrapper"],[1,"action-box__content-table__creator-wrapper__profile-wrapper"],["src","assets/img/fallback_profile_img.svg","alt","profile image",1,"action-box__content-table__creator-wrapper__profile-wrapper__icon",3,"click"],[1,"action-box__content-table__creator-wrapper__profile-wrapper__text",3,"click"],[1,"action-box__content-table__views-wrapper"],[1,"action-box__content-table__rating-wrapper"],[1,"action-box__content-table__rating-wrapper__container"],[3,"click","matTooltip","ngClass"],[1,"action-box__content-table__rating-wrapper__container__bar"],[1,"action-box__content-table__rating-wrapper__container__bar__orange"],[1,"action-box__content-table__rating-wrapper__container__bar__gray"],["lvObserveVisible","",3,"visible","margin"],[3,"click","customClasses","type","rounded"],["lv-lib-ellipsis","1"],[1,"ad-text"]],template:function(N,H){1&N&&s.DNE(0,ot,49,55)(1,st,1,0),2&N&&s.vxM(0,H.link?0:1)},dependencies:[qe,d.xF,X.An,He.oV,c.YU,Xe,d.Xb,c.QX,u.h,u.D9],styles:["lv-action-box .action-box-headline{margin-bottom:1rem;margin-top:2.5rem;margin-left:1.5rem}@media (min-width: 768px){lv-action-box .action-box-headline{margin-left:0}}@media (min-width: 1366px){lv-action-box .action-box-headline{display:none}}lv-action-box .own-card{padding:1.5rem!important;margin-top:0!important;border-radius:12px;box-shadow:0 3px 24px #3232320a}@media (min-width: 1366px){lv-action-box .action-box{position:sticky;top:calc(75px + 1rem);margin-top:0}lv-action-box .action-box lv-lib-card .lv-card{box-shadow:unset!important}}lv-action-box .action-box__premium-badge{display:flex;justify-content:center;align-items:center;gap:8px;padding:.75rem;border-radius:8px;background-color:#f5f5f5;width:100%;height:40px;margin-bottom:24px;font-weight:500}lv-action-box .action-box__premium-badge:before{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8.09988 9.60003L11.9999 2.90002L15.8999 9.60003L21.9999 4.00002L19.7999 16.3H4.19988L1.99988 4.00002L8.09988 9.60003Z' fill='rgba(255, 129, 20, 1)'/%3E%3Cpath d='M18.8001 20.7C19.4001 20.7 19.8001 20.2 19.8001 19.6V18.5H4.20007V19.7C4.20007 20.3 4.70007 20.7 5.30007 20.7H18.8001Z' fill='rgba(255, 129, 20, 1)'/%3E%3C/svg%3E\");transform:translateY(1px)}lv-action-box .action-box__content-headline{width:100%;word-break:break-all;font-weight:500;font-size:24px}@media (max-width: 768px){lv-action-box .action-box__content-headline{font-size:1.5rem!important}}lv-action-box .action-box__content-table>div{border-bottom:1px solid #dbdbdb;display:flex;justify-content:space-between;height:70px}lv-action-box .action-box__content-table--fixed{position:fixed;bottom:64px;left:0;z-index:10;padding:0 1.5rem 1.5rem;background-color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}@media (min-width: 767px){lv-action-box .action-box__content-table--fixed{position:relative;bottom:auto;left:auto;z-index:auto}}lv-action-box .action-box__content-table__creator-wrapper{display:flex;align-items:center;font-size:16px;font-weight:300}lv-action-box .action-box__content-table__creator-wrapper__profile-wrapper{display:flex;gap:.5rem}lv-action-box .action-box__content-table__creator-wrapper__profile-wrapper__icon{width:24px;height:auto}lv-action-box .action-box__content-table__creator-wrapper__profile-wrapper__icon:hover{cursor:pointer}lv-action-box .action-box__content-table__creator-wrapper__profile-wrapper__text{display:flex;align-items:center;font-weight:500!important}lv-action-box .action-box__content-table__creator-wrapper__profile-wrapper__text:hover{cursor:pointer}lv-action-box .action-box__content-table__views-wrapper{display:flex;align-items:center;font-size:16px;font-weight:300}lv-action-box .action-box__content-table__rating-wrapper{display:flex;align-items:center;font-size:16px;font-weight:300}lv-action-box .action-box__content-table__rating-wrapper__container{display:flex;flex-direction:column}lv-action-box .action-box__content-table__rating-wrapper__container>div{display:flex}lv-action-box .action-box__content-table__rating-wrapper__container>div>mat-icon{color:#aaa;margin-right:.5rem;margin-left:1.5rem;font-size:24px}lv-action-box .action-box__content-table__rating-wrapper__container>div>mat-icon:first-of-type{margin-left:0}lv-action-box .action-box__content-table__rating-wrapper__container>div>mat-icon:hover{animation:swing .6s ease;animation-iteration-count:1;animation-name:bounce;animation-timing-function:ease;color:#000!important;cursor:pointer}lv-action-box .action-box__content-table__rating-wrapper__container__bar{position:relative;bottom:-22px}lv-action-box .action-box__content-table__rating-wrapper__container__bar__orange{border-bottom:3px solid #ff8114}lv-action-box .action-box__content-table__rating-wrapper__container__bar__gray{border-bottom:3px solid #dbdbdb}lv-action-box .action-box__cta-button{margin-top:24px!important;width:100%}@media (max-width: 768px){lv-action-box .action-box__cta-button{font-size:1rem!important}}lv-action-box .action-box__cta-button--fixed{width:100%}@keyframes bounce{0%{transform:rotate(0) scale(1)}50%{transform:rotate(-15deg) scale(1.5)}to{transform:rotate(0) scale(1)}}lv-action-box .btn-clicked{color:#000!important}lv-action-box .ad-text{margin:0;padding:.5rem 0 0;color:gray;font-size:.75rem;font-weight:500;text-align:center}\n"],encapsulation:2})}return I})(),lt=(()=>{class I{constructor(M){this.renderer=M,this.disableScroll=!1}ngOnChanges(M){M.disableScroll.currentValue?(this.renderer.setStyle(document.body,"overflow","hidden"),this.renderer.setStyle(document.body,"max-height","100vh")):(this.renderer.removeStyle(document.body,"overflow"),this.renderer.removeStyle(document.body,"max-height"))}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(s.sFG))};static#t=this.\u0275dir=s.FsC({type:I,selectors:[["","lvDisableScroll",""]],inputs:{disableScroll:[s.Mj6.None,"lvDisableScroll","disableScroll"]},standalone:!0,features:[s.OA$]})}return I})();var Be=oe(4523),ke=oe(2708);oe(6431),oe(7818),new s.nKC("ACE_CONFIG");let Oe=(()=>{class I{static \u0275fac=function(N){return new(N||I)};static \u0275mod=s.$C({type:I});static \u0275inj=s.G2t({imports:[c.MD,c.MD]})}return I})();var Ue=oe(6507);const ct=["editor"];let Ie=(()=>{class I{constructor(){this.CUSTOM_ACE_THEME_NAME="paste-editor",this.editor=s.ebz.required("editor"),this.maxCharacters=(0,s.hFB)(void 0),this.readonly=(0,s.hFB)(!1),this.value=(0,s.hFB)(""),this.valueChange=(0,s.CGW)()}ngOnInit(){this.initializeEditor(),this.aceEditorInstance?.on("change",()=>{const M=this.aceEditorInstance?.getValue(),N=this.maxCharacters();if(M&&N&&M.length>N){const H=M.substring(0,this.maxCharacters());this.aceEditorInstance?.setValue(H),this.aceEditorInstance?.clearSelection(),this.valueChange.emit(H)}else this.valueChange.emit(M||"")})}ngOnChanges(M){M.readonly&&!M.readonly.firstChange&&this.aceEditorInstance?.setReadOnly(this.readonly())}ngOnDestroy(){this.aceEditorInstance?.destroy()}initializeEditor(){this.defineTheme(this.CUSTOM_ACE_THEME_NAME),this.aceEditorInstance=Ue.edit(this.editor().nativeElement),this.aceEditorInstance?.session.setMode("ace/mode/text"),this.aceEditorInstance?.setTheme(`ace/theme/${this.CUSTOM_ACE_THEME_NAME}`),this.aceEditorInstance?.setReadOnly(this.readonly()),this.aceEditorInstance?.setValue(this.value()),this.aceEditorInstance?.clearSelection()}defineTheme(M){Ue.define(`ace/theme/${M}`,(N,H)=>{H.isDark=!1,H.cssClass="ace-linkvertise",H.cssText=this.getCssText(),N("../lib/dom").importCssString(H.cssText,H.cssClass)})}getCssText(){return(N=>N.join(""))` .ace-linkvertise * { font-family: monospace !important; } .ace-linkvertise { background: #F5F5F5; border-bottom: solid #32323299 1px; color: #4d4d4c; } .ace-linkvertise .ace_gutter { border-right: 2px solid #dbdbdb; // Separator between line numbers and textarea } .ace-linkvertise .ace_gutter, .ace_scroller { margin: 0.5rem 0; // Acts as inner padding of editor } .ace_editor { border-radius: 0.75rem; // Border-radius for whole editor } .ace-linkvertise, .ace_line, .ace_indent-guide { font-size: 0.75rem; // All font-sizes inside the editor @media (max-width: 450px) { font-size: 1rem; } } .ace-linkvertise:hover, .ace-linkvertise.ace_focus { border-bottom: solid black 2px; // Dark border below the editor. Is used to imitate the Material input styling } .ace-linkvertise .ace_cursor { color: #aeafad; // cursor color } .ace-linkvertise .ace_marker-layer .ace_selection { background: #ffad67; border-radius: 0; } .ace-linkvertise .ace_indent-guide { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y; // Indent guide for tabs } `}static#e=this.\u0275fac=function(N){return new(N||I)};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-paste-editor"]],viewQuery:function(N,H){1&N&&s.wEZ(H.editor,ct,5),2&N&&s.NyB()},inputs:{maxCharacters:[s.Mj6.SignalBased,"maxCharacters"],readonly:[s.Mj6.SignalBased,"readonly"],value:[s.Mj6.SignalBased,"value"]},outputs:{valueChange:"valueChange"},standalone:!0,features:[s.Jv_([I]),s.OA$,s.aNF],decls:2,vars:0,consts:[["editor",""],[2,"width","100%","height","100%","min-height","100px","min-width","200px"]],template:function(N,H){1&N&&s.nrm(0,"div",1,0)},dependencies:[c.MD],encapsulation:2})}return I})(),Pe=(()=>{class I{constructor(){}static#e=this.\u0275fac=function(N){return new(N||I)};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-check-icon-svg"]],standalone:!0,features:[s.aNF],decls:7,vars:0,consts:[["width","88px","height","88px","viewBox","0 0 133 133","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink"],["id","check-group","stroke","none","stroke-width","10","fill","none","fill-rule","evenodd"],["id","ring","cx","66.5","cy","66.5","r","54.5"],["id","filled-circle","fill","#07b481","cx","66.5","cy","66.5","r","54.5"],["id","white-circle","fill","#FFFFFF","cx","66.5","cy","66.5","r","55.5"],["id","outline","stroke","#07b481","stroke-width","4","cx","66.5","cy","66.5","r","54.5"],["id","check","stroke","#FFFFFF","stroke-width","10.5","points","41 70 56 85 92 49"]],template:function(N,H){1&N&&(s.qSk(),s.j41(0,"svg",0)(1,"g",1),s.nrm(2,"circle",2)(3,"circle",3)(4,"circle",4)(5,"circle",5)(6,"polyline",6),s.k0s()())},styles:["#check-group[_ngcontent-%COMP%]{animation:.32s ease-in-out 1.03s _ngcontent-%COMP%_check-group;transform-origin:center}#check-group[_ngcontent-%COMP%] #check[_ngcontent-%COMP%]{animation:.34s cubic-bezier(.65,0,1,1) .8s forwards _ngcontent-%COMP%_check;stroke-dasharray:0,75px;stroke-linecap:round;stroke-linejoin:round}#check-group[_ngcontent-%COMP%] #outline[_ngcontent-%COMP%]{animation:.38s ease-in _ngcontent-%COMP%_outline;transform:rotate(0);transform-origin:center}#check-group[_ngcontent-%COMP%] #white-circle[_ngcontent-%COMP%]{animation:.35s ease-in .35s forwards _ngcontent-%COMP%_circle;transform-origin:center}#ring[_ngcontent-%COMP%]{fill:none;stroke:#07b481;stroke-width:4;opacity:0;transform-origin:center;animation:_ngcontent-%COMP%_ring-anim 1.55s ease-out}@keyframes _ngcontent-%COMP%_outline{0%{stroke-dasharray:0,345.576px}to{stroke-dasharray:345.576px,345.576px}}@keyframes _ngcontent-%COMP%_circle{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _ngcontent-%COMP%_check{0%{stroke-dasharray:0,75px}to{stroke-dasharray:75px,75px}}@keyframes _ngcontent-%COMP%_check-group{0%{transform:scale(1)}50%{transform:scale(1.09)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_ring-anim{0%{opacity:1;transform:scale(0)}90%{opacity:.25}to{opacity:0;transform:scale(1.15)}}"]})}return I})();var We=oe(5416);function ht(I,te){1&I&&s.nrm(0,"div",3)}function ut(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",10),s.nrm(1,"lv-paste-editor",11),s.k0s(),s.j41(2,"div",12)(3,"lv-lib-button",13),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.copyToClipboard())}),s.j41(4,"div",14),s.nrm(5,"lv-lib-icon",15),s.EFF(6," Copy "),s.k0s()(),s.j41(7,"lv-lib-button",13),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.download())}),s.j41(8,"div",14),s.nrm(9,"lv-lib-icon",16),s.EFF(10," Download "),s.k0s()()()}if(2&I){const M=s.XpG();s.R7$(),s.Y8G("maxCharacters",1e4)("value",M.pasteContent)("readonly",!0),s.R7$(2),s.Y8G("isfullWidth",!0)("rounded",!0),s.R7$(4),s.Y8G("isfullWidth",!0)("rounded",!0)}}function dt(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",17)(1,"lv-lib-button",18),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.openTarget())}),s.j41(2,"div",19),s.EFF(3," Open "),s.nrm(4,"lv-lib-icon",20),s.k0s()()()}2&I&&(s.R7$(),s.Y8G("rounded",!0))}let ft=(()=>{class I{constructor(M,N,H,q){this.linkService=M,this.trackingService=N,this.apiDetailPageService=H,this.matSnackBar=q,this.rating=null,this.pasteContent=null,this.loadingContent=!1,this.NewGQLPublicLinkTargetType=ke.X4,this.targetData=null,this.subscriptions=new k.yU,this.shortLinkTitle=null,this.ratingSubject=new P.B,this.targetType=null,this.rateEmitter=new s.bkB}ngOnChanges(M){M?.targetType&&this.targetType===ke.X4.Paste&&this.openTarget(),M?.ratingSubject&&this.subscriptions.add(this.ratingSubject.subscribe(N=>{this.rating=N}))}ngOnDestroy(){this.subscriptions.unsubscribe()}openTarget(){this.targetData?this.handleTargetData(this.targetData):(this.loadingContent=!0,this.subscriptions.add(this.apiDetailPageService.createPageTarget$().subscribe(M=>{this.loadingContent=!1,this.handleTargetData(M)})))}handleTargetData(M){this.linkService.setTargetData(M),this.targetData=M,this.targetType===ke.X4.Url?this.linkService.handleTargetResponse(this.targetData):(this.pasteContent=this.targetData.paste??"No Paste Data",this.shortLinkTitle=this.targetData.short_link_title??"Paste Content")}like(){(!this.rating||!this.rating.deactivateRating)&&(this.trackingService.trackRatingClick("successPage","like"),this.rateEmitter.emit(Le.Positive))}dislike(){(!this.rating||!this.rating.deactivateRating)&&(this.trackingService.trackRatingClick("successPage","dislike"),this.rateEmitter.emit(Le.Negative))}copyToClipboard(){var M=this;return(0,Be.A)(function*(){try{yield navigator.clipboard.writeText(M.pasteContent??"No Paste Content"),M.snackbar("Copied to clipboard")}catch{M.snackbar("Failed to copy to clipboard")}})()}snackbar(M,N=2e3,H,q){return this.matSnackBar.open(M,H,q||{duration:N})}download(){const M=document.createElement("a");M.href=`data:text/plain;charset=utf-8,${encodeURIComponent(this.pasteContent??"No Paste Content")}`,M.download=`${this.shortLinkTitle}.txt`,M.click()}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(F._),s.rXU(v.b),s.rXU(g.u),s.rXU(We.UG))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-success-page-a"]],inputs:{ratingSubject:"ratingSubject",targetType:"targetType"},outputs:{rateEmitter:"rateEmitter"},standalone:!0,features:[s.OA$,s.aNF],decls:21,vars:9,consts:[[1,"success__container"],[1,"success__text--title"],[1,"success__text--subtitle"],[1,"loading"],["src","../../../../../assets/img/success/success_left.svg","alt","",1,"success__img--left"],["src","../../../../../assets/img/success/success_right.svg","alt","",1,"success__img--right"],[1,"like__container"],[1,"like__text"],[1,"like__wrapper"],[3,"click","matTooltip","ngClass"],[1,"ace__wrapper"],[3,"maxCharacters","value","readonly"],[1,"ace__buttons"],[3,"click","isfullWidth","rounded"],[1,"ace__button--inlay"],["iconName","file_copy"],["iconName","download"],[1,"open-btn-wrapper"],[3,"click","rounded"],[1,"open__button--inlay"],["iconName","open_in_new"]],template:function(N,H){1&N&&(s.j41(0,"div",0),s.nrm(1,"lv-check-icon-svg"),s.j41(2,"h1",1),s.EFF(3," Thank you! "),s.k0s(),s.j41(4,"h2",2),s.EFF(5," You\u2019re awesome, seriously! "),s.k0s(),s.DNE(6,ht,1,0,"div",3)(7,ut,11,7)(8,dt,5,1),s.nrm(9,"img",4)(10,"img",5),s.k0s(),s.j41(11,"div",6)(12,"h2",7),s.EFF(13," Help us make our network better, rate the content. "),s.k0s(),s.j41(14,"div",8)(15,"mat-icon",9),s.nI1(16,"translate"),s.bIt("click",function(){return H.like()}),s.EFF(17,"thumb_up "),s.k0s(),s.j41(18,"mat-icon",9),s.nI1(19,"translate"),s.bIt("click",function(){return H.dislike()}),s.EFF(20,"thumb_down "),s.k0s()()()),2&N&&(s.R7$(6),s.vxM(6,H.loadingContent?6:H.targetType===H.NewGQLPublicLinkTargetType.Paste&&H.pasteContent?7:8),s.R7$(9),s.FS9("matTooltip",s.bMT(16,5,"detail-page.like")),s.Y8G("ngClass",null!=H.rating&&H.rating.hasLiked?"btn-clicked":""),s.R7$(3),s.FS9("matTooltip",s.bMT(19,7,"detail-page.dislike")),s.Y8G("ngClass",null!=H.rating&&H.rating.hasDisliked?"btn-clicked":""))},dependencies:[c.MD,c.YU,d.Xb,d.og,u.h,u.D9,X.An,He.oV,Oe,Ie,Pe],styles:['.success__container[_ngcontent-%COMP%]{max-width:calc(1564px - 4rem);justify-items:center;position:relative;background-color:#fff;align-items:center;width:100%;display:flex;flex-direction:column;overflow:hidden;padding:64px 0 128px;margin-top:64px;margin-left:50%;transform:translate(-50%);gap:16px;border-radius:16px}.success__container[_ngcontent-%COMP%] .open-btn-wrapper[_ngcontent-%COMP%]{z-index:10}.success__text--title[_ngcontent-%COMP%], .success__text--subtitle[_ngcontent-%COMP%]{z-index:2}.success__img--gif[_ngcontent-%COMP%]{height:88px;width:88px}.success__img--left[_ngcontent-%COMP%], .success__img--right[_ngcontent-%COMP%]{max-width:30%;position:absolute}.success__img--left[_ngcontent-%COMP%]{left:0;bottom:0}.success__img--right[_ngcontent-%COMP%]{right:0}.like__container[_ngcontent-%COMP%]{max-width:90%;width:max-content;align-items:center;position:relative;margin-left:50%;transform:translate(-50%);padding:16px;background-color:#fff;border-radius:16px;margin-top:-32px;box-shadow:0 3px 8px #32323229;display:flex}@media (max-width: 768px){.like__container[_ngcontent-%COMP%]{width:90%;justify-content:space-around}}.like__wrapper[_ngcontent-%COMP%]{display:flex}.like__wrapper[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#aaa;margin-left:.5rem;font-size:32px;height:32px;width:32px}.like__wrapper[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]:hover{animation:swing .6s ease;animation-iteration-count:1;animation-name:_ngcontent-%COMP%_bounce;animation-timing-function:ease;color:#000!important;cursor:pointer}@keyframes _ngcontent-%COMP%_bounce{0%{transform:rotate(0) scale(1)}50%{transform:rotate(-15deg) scale(1.5)}to{transform:rotate(0) scale(1)}}.like__wrapper[_ngcontent-%COMP%] .btn-clicked[_ngcontent-%COMP%]{color:#000!important}.open__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.ace__wrapper[_ngcontent-%COMP%]{height:40vh;width:60%;box-shadow:0 3px 24px #3232320a;z-index:1}@media (max-width: 768px){.ace__wrapper[_ngcontent-%COMP%]{width:90%}}.ace__buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;z-index:1;width:60%}@media (max-width: 768px){.ace__buttons[_ngcontent-%COMP%]{width:90%}}.ace__buttons[_ngcontent-%COMP%] lv-lib-button[_ngcontent-%COMP%]{width:100%}.ace__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.loading[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,#ff811433 33%,#ff8114);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}.loading[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#fff}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']})}return I})();function gt(I,te){1&I&&s.nrm(0,"div",3)}function pt(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",7),s.nrm(1,"lv-paste-editor",8),s.k0s(),s.j41(2,"div",9)(3,"lv-lib-button",10),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.copyToClipboard())}),s.j41(4,"div",11),s.nrm(5,"lv-lib-icon",12),s.EFF(6," Copy "),s.k0s()(),s.j41(7,"lv-lib-button",10),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.download())}),s.j41(8,"div",11),s.nrm(9,"lv-lib-icon",13),s.EFF(10," Download "),s.k0s()()()}if(2&I){const M=s.XpG();s.R7$(),s.Y8G("maxCharacters",1e4)("value",M.pasteContent)("readonly",!0),s.R7$(2),s.Y8G("isfullWidth",!0)("rounded",!0),s.R7$(4),s.Y8G("isfullWidth",!0)("rounded",!0)}}function mt(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",14)(1,"lv-lib-button",15),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.openTarget())}),s.j41(2,"div",16),s.EFF(3," Open "),s.nrm(4,"lv-lib-icon",17),s.k0s()()()}2&I&&(s.R7$(),s.Y8G("rounded",!0))}function vt(I,te){1&I&&(s.nrm(0,"lv-lib-icon",21),s.EFF(1," Following "))}function wt(I,te){1&I&&(s.nrm(0,"lv-lib-icon",22),s.EFF(1," Follow "))}function Ct(I,te){if(1&I&&s.DNE(0,vt,2,0)(1,wt,2,0),2&I){const M=s.XpG(2);s.vxM(0,M.following?0:1)}}function bt(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",6)(1,"h2",18),s.EFF(2),s.k0s(),s.j41(3,"lv-lib-button",19),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.switchFollowUser(!H.following))}),s.j41(4,"div",20),s.DNE(5,Ct,2,1),s.k0s()()()}if(2&I){const M=s.XpG();s.R7$(2),s.SpI(" Follow ",M.link.publisher.name," to never miss their latest content "),s.R7$(),s.Y8G("disabled",M.loading)("type","neutral")("rounded",!0),s.R7$(),s.AVh("follow__button--loading",M.loading),s.R7$(),s.vxM(5,M.loading?-1:5)}}let yt=(()=>{class I{constructor(M,N,H,q,he,Ee,Se){this.linkService=M,this.authService=N,this.dialog=H,this.profileService=q,this.trackingService=he,this.apiDetailPageService=Ee,this.matSnackBar=Se,this.loading=!1,this.loadingContent=!1,this.following=!1,this.pasteContent=null,this.NewGQLPublicLinkTargetType=ke.X4,this.targetData=null,this.subscriptions=new k.yU,this.shortLinkTitle=null,this.link=null,this.targetType=null}ngOnChanges(M){M?.link&&this.link&&this.subscriptions.add(this.profileService.getProfile(+this.link?.publisher.id).pipe((0,f.s)(1)).subscribe(N=>{this.following=N.data.user.is_subscriber})),M?.targetType&&this.targetType===ke.X4.Paste&&this.openTarget()}ngOnDestroy(){this.subscriptions.unsubscribe()}openTarget(){this.targetData?this.handleTargetData(this.targetData):(this.loadingContent=!0,this.subscriptions.add(this.apiDetailPageService.createPageTarget$().subscribe(M=>{this.loadingContent=!1,this.handleTargetData(M)})))}handleTargetData(M){this.linkService.setTargetData(M),this.targetData=M,this.targetType===ke.X4.Url?this.linkService.handleTargetResponse(this.targetData):(this.pasteContent=this.targetData.paste??"No Paste Data",this.shortLinkTitle=this.targetData.short_link_title??"Paste Content")}switchFollowUser(M){if(!this.loading){if(!this.authService.check())return void this.dialog.open(w.v,{data:{hasCountdown:!1}});this.link&&(this.loading=!0,M?this.profileService.subscribeProfile(+this.link?.publisher.id).subscribe(()=>{this.trackingService.trackFollowEvent("followCreator","successPage"),this.loading=!1,this.following=M}):this.profileService.unsubscribeProfile(+this.link?.publisher.id).subscribe(()=>{this.trackingService.trackFollowEvent("unfollowCreator","successPage"),this.loading=!1,this.following=M}))}}copyToClipboard(){var M=this;return(0,Be.A)(function*(){try{yield navigator.clipboard.writeText(M.pasteContent??"No Paste Content"),M.snackbar("Copied to clipboard")}catch{M.snackbar("Failed to copy to clipboard")}})()}snackbar(M,N=2e3,H,q){return this.matSnackBar.open(M,H,q||{duration:N})}download(){const M=document.createElement("a");M.href=`data:text/plain;charset=utf-8,${encodeURIComponent(this.pasteContent??"No Paste Content")}`,M.download=`${this.shortLinkTitle}.txt`,M.click()}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(F._),s.rXU(m.u),s.rXU(d.o3),s.rXU(S.p),s.rXU(v.b),s.rXU(g.u),s.rXU(We.UG))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-success-page-b"]],inputs:{link:"link",targetType:"targetType"},standalone:!0,features:[s.OA$,s.aNF],decls:12,vars:2,consts:[[1,"success__container"],[1,"success__text--title"],[1,"success__text--subtitle"],[1,"loading"],["src","../../../../../assets/img/success/success_left.svg","alt","",1,"success__img--left"],["src","../../../../../assets/img/success/success_right.svg","alt","",1,"success__img--right"],[1,"follow__container"],[1,"ace__wrapper"],[3,"maxCharacters","value","readonly"],[1,"ace__buttons"],[3,"click","isfullWidth","rounded"],[1,"ace__button--inlay"],["iconName","file_copy"],["iconName","download"],[1,"open-btn-wrapper"],[3,"click","rounded"],[1,"open__button--inlay"],["iconName","open_in_new"],[1,"follow__text"],[1,"follow__button",3,"click","disabled","type","rounded"],[1,"follow__button--inlay"],["iconName","how_to_reg"],["iconName","group_add"]],template:function(N,H){1&N&&(s.j41(0,"div",0),s.nrm(1,"lv-check-icon-svg"),s.j41(2,"h1",1),s.EFF(3," Thank you! "),s.k0s(),s.j41(4,"h2",2),s.EFF(5," You\u2019re awesome, seriously! "),s.k0s(),s.DNE(6,gt,1,0,"div",3)(7,pt,11,7)(8,mt,5,1),s.nrm(9,"img",4)(10,"img",5),s.k0s(),s.DNE(11,bt,6,7,"div",6)),2&N&&(s.R7$(6),s.vxM(6,H.loadingContent?6:H.targetType===H.NewGQLPublicLinkTargetType.Paste&&H.pasteContent?7:8),s.R7$(5),s.vxM(11,H.link?11:-1))},dependencies:[c.MD,d.Xb,d.og,u.h,Oe,Ie,Pe],styles:['.success__container[_ngcontent-%COMP%]{max-width:calc(1564px - 4rem);justify-items:center;position:relative;background-color:#fff;width:100%;display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:64px 0 128px;margin-top:64px;margin-left:50%;transform:translate(-50%);gap:16px;border-radius:16px}.success__container[_ngcontent-%COMP%] .open-btn-wrapper[_ngcontent-%COMP%]{z-index:10}.success__text--title[_ngcontent-%COMP%], .success__text--subtitle[_ngcontent-%COMP%]{z-index:2}.success__img--gif[_ngcontent-%COMP%]{height:88px;width:88px}.success__img--left[_ngcontent-%COMP%], .success__img--right[_ngcontent-%COMP%]{max-width:30%;position:absolute}.success__img--left[_ngcontent-%COMP%]{left:0;bottom:0}.success__img--right[_ngcontent-%COMP%]{right:0}.follow__container[_ngcontent-%COMP%]{max-width:90%;width:max-content;align-items:center;position:relative;margin-left:50%;transform:translate(-50%);padding:16px;background-color:#fff;border-radius:16px;margin-top:-32px;box-shadow:0 3px 8px #32323229;display:flex;flex-direction:column;gap:16px}@media (max-width: 768px){.follow__container[_ngcontent-%COMP%]{display:block}}@media (max-width: 1068px){.follow__container[_ngcontent-%COMP%]{width:90%}}@media (max-width: 768px){.follow__text[_ngcontent-%COMP%]{margin-bottom:16px}}.follow__button--inlay[_ngcontent-%COMP%]{color:#000;display:flex;align-items:center;gap:8px}.follow__button--loading[_ngcontent-%COMP%]{width:32px;aspect-ratio:1;border-radius:50%;background:radial-gradient(farthest-side,#ff8114 94%,#0000) top/8px 8px no-repeat,conic-gradient(#0000 30%,#ff8114);-webkit-mask:radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - 8px),#000 0);animation:_ngcontent-%COMP%_l13 1s infinite linear}@keyframes _ngcontent-%COMP%_l13{to{transform:rotate(1turn)}}.open__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.ace__wrapper[_ngcontent-%COMP%]{height:40vh;width:60%;box-shadow:0 3px 24px #3232320a;z-index:1}@media (max-width: 768px){.ace__wrapper[_ngcontent-%COMP%]{width:90%}}.ace__buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;z-index:1;width:60%}@media (max-width: 768px){.ace__buttons[_ngcontent-%COMP%]{width:90%}}@media (max-width: 1068px){.ace__buttons[_ngcontent-%COMP%]{flex-direction:column}}.ace__buttons[_ngcontent-%COMP%] lv-lib-button[_ngcontent-%COMP%]{width:100%}.ace__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.loading[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,#ff811433 33%,#ff8114);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}.loading[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#fff}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']})}return I})();function At(I,te){1&I&&s.nrm(0,"div",3)}function _t(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",11),s.nrm(1,"lv-paste-editor",12),s.k0s(),s.j41(2,"div",13)(3,"lv-lib-button",14),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.copyToClipboard())}),s.j41(4,"div",15),s.nrm(5,"lv-lib-icon",16),s.EFF(6," Copy "),s.k0s()(),s.j41(7,"lv-lib-button",14),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.download())}),s.j41(8,"div",15),s.nrm(9,"lv-lib-icon",17),s.EFF(10," Download "),s.k0s()()()}if(2&I){const M=s.XpG();s.R7$(),s.Y8G("maxCharacters",1e4)("value",M.pasteContent)("readonly",!0),s.R7$(2),s.Y8G("isfullWidth",!0)("rounded",!0),s.R7$(4),s.Y8G("isfullWidth",!0)("rounded",!0)}}function $t(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",18)(1,"lv-lib-button",19),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.openTarget())}),s.j41(2,"div",20),s.EFF(3," Open "),s.nrm(4,"lv-lib-icon",21),s.k0s()()()}2&I&&(s.R7$(),s.Y8G("rounded",!0))}let St=(()=>{class I{constructor(M,N,H,q,he){this.linkService=M,this.trackingService=N,this.apiDetailPageService=H,this.matSnackBar=q,this.authService=he,this.pasteContent=null,this.loadingContent=!1,this.NewGQLPublicLinkTargetType=ke.X4,this.targetData=null,this.subscriptions=new k.yU,this.shortLinkTitle=null,this.targetType=null}ngOnChanges(M){M?.targetType&&this.targetType===ke.X4.Paste&&this.openTarget()}ngOnDestroy(){this.subscriptions.unsubscribe()}openTarget(){this.targetData?this.handleTargetData(this.targetData):(this.loadingContent=!0,this.subscriptions.add(this.apiDetailPageService.createPageTarget$().subscribe(M=>{this.loadingContent=!1,this.handleTargetData(M)})))}handleTargetData(M){this.linkService.setTargetData(M),this.targetData=M,this.targetType===ke.X4.Url?this.linkService.handleTargetResponse(this.targetData):(this.pasteContent=this.targetData.paste??"No Paste Data",this.shortLinkTitle=this.targetData.short_link_title??"Paste Content")}openMonetization(){this.trackingService.trackSuccessPageEvent("monetizeAssets"),this.authService.isLoggedIn()?window.open("https://publisher.linkvertise.com/dashboard#link-create","_blank"):window.open("https://publisher.linkvertise.com","_blank")}copyToClipboard(){var M=this;return(0,Be.A)(function*(){try{yield navigator.clipboard.writeText(M.pasteContent??"No Paste Content"),M.snackbar("Copied to clipboard")}catch{M.snackbar("Failed to copy to clipboard")}})()}snackbar(M,N=2e3,H,q){return this.matSnackBar.open(M,H,q||{duration:N})}download(){const M=document.createElement("a");M.href=`data:text/plain;charset=utf-8,${encodeURIComponent(this.pasteContent??"No Paste Content")}`,M.download=`${this.shortLinkTitle}.txt`,M.click()}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(F._),s.rXU(v.b),s.rXU(g.u),s.rXU(We.UG),s.rXU(m.u))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-success-page-c"]],inputs:{targetType:"targetType"},standalone:!0,features:[s.OA$,s.aNF],decls:18,vars:3,consts:[[1,"success__container"],[1,"success__text--title"],[1,"success__text--subtitle"],[1,"loading"],["src","../../../../../assets/img/success/success_left.svg","alt","",1,"success__img--left"],["src","../../../../../assets/img/success/success_right.svg","alt","",1,"success__img--right"],[1,"creator__container"],[1,"creator__text"],[1,"creator__button",3,"click","type","rounded"],[1,"creator__button--inlay"],["iconName","paid"],[1,"ace__wrapper"],[3,"maxCharacters","value","readonly"],[1,"ace__buttons"],[3,"click","isfullWidth","rounded"],[1,"ace__button--inlay"],["iconName","file_copy"],["iconName","download"],[1,"open-btn-wrapper"],[3,"click","rounded"],[1,"open__button--inlay"],["iconName","open_in_new"]],template:function(N,H){1&N&&(s.j41(0,"div",0),s.nrm(1,"lv-check-icon-svg"),s.j41(2,"h1",1),s.EFF(3," Thank you! "),s.k0s(),s.j41(4,"h2",2),s.EFF(5," You\u2019re awesome, seriously! "),s.k0s(),s.DNE(6,At,1,0,"div",3)(7,_t,11,7)(8,$t,5,1),s.nrm(9,"img",4)(10,"img",5),s.k0s(),s.j41(11,"div",6)(12,"h2",7),s.EFF(13," Become a creator and earn real money with your own digital assets "),s.k0s(),s.j41(14,"lv-lib-button",8),s.bIt("click",function(){return H.openMonetization()}),s.j41(15,"div",9),s.nrm(16,"lv-lib-icon",10),s.EFF(17," Monetize now "),s.k0s()()()),2&N&&(s.R7$(6),s.vxM(6,H.loadingContent?6:H.targetType===H.NewGQLPublicLinkTargetType.Paste&&H.pasteContent?7:8),s.R7$(8),s.Y8G("type","neutral")("rounded",!0))},dependencies:[c.MD,d.Xb,d.og,u.h,Oe,Ie,Pe],styles:['.success__container[_ngcontent-%COMP%]{max-width:calc(1564px - 4rem);justify-items:center;position:relative;background-color:#fff;width:100%;display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:64px 0 128px;margin-top:64px;margin-left:50%;transform:translate(-50%);gap:16px;border-radius:16px}.success__container[_ngcontent-%COMP%] .open-btn-wrapper[_ngcontent-%COMP%]{z-index:10}.success__text--title[_ngcontent-%COMP%], .success__text--subtitle[_ngcontent-%COMP%]{z-index:2}.success__img--gif[_ngcontent-%COMP%]{height:88px;width:88px}.success__img--left[_ngcontent-%COMP%], .success__img--right[_ngcontent-%COMP%]{max-width:30%;position:absolute}.success__img--left[_ngcontent-%COMP%]{left:0;bottom:0}.success__img--right[_ngcontent-%COMP%]{right:0}.creator__container[_ngcontent-%COMP%]{max-width:90%;width:max-content;align-items:center;position:relative;margin-left:50%;transform:translate(-50%);padding:16px;background-color:#fff;border-radius:16px;margin-top:-32px;box-shadow:0 3px 8px #32323229;display:flex;flex-direction:column;gap:16px}@media (max-width: 768px){.creator__container[_ngcontent-%COMP%]{display:block}}@media (max-width: 1068px){.creator__container[_ngcontent-%COMP%]{width:90%}}@media (max-width: 768px){.creator__text[_ngcontent-%COMP%]{margin-bottom:16px}}.creator__button--inlay[_ngcontent-%COMP%]{color:#000;display:flex;align-items:center;gap:8px}.open__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.ace__wrapper[_ngcontent-%COMP%]{height:40vh;width:60%;box-shadow:0 3px 24px #3232320a;z-index:1}@media (max-width: 768px){.ace__wrapper[_ngcontent-%COMP%]{width:90%}}.ace__buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;z-index:1;width:60%}@media (max-width: 768px){.ace__buttons[_ngcontent-%COMP%]{width:90%}}@media (max-width: 1068px){.ace__buttons[_ngcontent-%COMP%]{flex-direction:column}}.ace__buttons[_ngcontent-%COMP%] lv-lib-button[_ngcontent-%COMP%]{width:100%}.ace__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.loading[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,#ff811433 33%,#ff8114);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}.loading[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#fff}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']})}return I})();function Et(I,te){1&I&&s.nrm(0,"div",3)}function xt(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",10),s.nrm(1,"lv-paste-editor",11),s.k0s(),s.j41(2,"div",12)(3,"lv-lib-button",13),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.copyToClipboard())}),s.j41(4,"div",14),s.nrm(5,"lv-lib-icon",15),s.EFF(6," Copy "),s.k0s()(),s.j41(7,"lv-lib-button",13),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.download())}),s.j41(8,"div",14),s.nrm(9,"lv-lib-icon",16),s.EFF(10," Download "),s.k0s()()()}if(2&I){const M=s.XpG();s.R7$(),s.Y8G("maxCharacters",1e4)("value",M.pasteContent)("readonly",!0),s.R7$(2),s.Y8G("isfullWidth",!0)("rounded",!0),s.R7$(4),s.Y8G("isfullWidth",!0)("rounded",!0)}}function kt(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",17)(1,"lv-lib-button",18),s.bIt("click",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.openTarget())}),s.j41(2,"div",19),s.EFF(3," Open "),s.nrm(4,"lv-lib-icon",20),s.k0s()()()}2&I&&(s.R7$(),s.Y8G("rounded",!0))}function Ft(I,te){1&I&&(s.nrm(0,"lv-lib-icon",20),s.EFF(1," Discover More "))}let Mt=(()=>{class I{constructor(){this.linkService=(0,s.WQX)(F._),this.trackingService=(0,s.WQX)(v.b),this.apiDetailPageService=(0,s.WQX)(g.u),this.matSnackBar=(0,s.WQX)(We.UG),this.router=(0,s.WQX)(x.Ix),this.loading=!1,this.loadingContent=!1,this.following=!1,this.pasteContent=null,this.NewGQLPublicLinkTargetType=ke.X4,this.targetData=null,this.subscriptions=new k.yU,this.shortLinkTitle=null,this.targetType=(0,s.hFB)(null)}ngOnChanges(M){M?.targetType&&this.targetType()===ke.X4.Paste&&this.openTarget()}ngOnDestroy(){this.subscriptions.unsubscribe()}openTarget(){this.targetData?this.handleTargetData(this.targetData):(this.loadingContent=!0,this.subscriptions.add(this.apiDetailPageService.createPageTarget$().subscribe(M=>{this.loadingContent=!1,this.handleTargetData(M)})))}redirectToHomePage(){this.trackingService.trackSuccessPageEvent("discoverAssets"),this.router.navigateByUrl("/")}handleTargetData(M){this.linkService.setTargetData(M),this.targetData=M,this.targetType()===ke.X4.Url?this.linkService.handleTargetResponse(this.targetData):(this.pasteContent=this.targetData.paste??"No Paste Data",this.shortLinkTitle=this.targetData.short_link_title??"Paste Content")}copyToClipboard(){var M=this;return(0,Be.A)(function*(){try{yield navigator.clipboard.writeText(M.pasteContent??"No Paste Content"),M.snackbar("Copied to clipboard")}catch{M.snackbar("Failed to copy to clipboard")}})()}snackbar(M,N=2e3,H,q){return this.matSnackBar.open(M,H,q||{duration:N})}download(){const M=document.createElement("a");M.href=`data:text/plain;charset=utf-8,${encodeURIComponent(this.pasteContent??"No Paste Content")}`,M.download=`${this.shortLinkTitle}.txt`,M.click()}static#e=this.\u0275fac=function(N){return new(N||I)};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-success-page-d"]],inputs:{targetType:[s.Mj6.SignalBased,"targetType"]},standalone:!0,features:[s.OA$,s.aNF],decls:17,vars:7,consts:[[1,"success__container"],[1,"success__text--title"],[1,"success__text--subtitle"],[1,"loading"],["src","../../../../../assets/img/success/success_left.svg","alt","",1,"success__img--left"],["src","../../../../../assets/img/success/success_right.svg","alt","",1,"success__img--right"],[1,"home-page__container"],[1,"home-page__text"],[1,"home-page__button",3,"click","disabled","type","rounded"],[1,"home-page__button--inlay"],[1,"ace__wrapper"],[3,"maxCharacters","value","readonly"],[1,"ace__buttons"],[3,"click","isfullWidth","rounded"],[1,"ace__button--inlay"],["iconName","file_copy"],["iconName","download"],[1,"open-btn-wrapper"],[3,"click","rounded"],[1,"open__button--inlay"],["iconName","open_in_new"]],template:function(N,H){1&N&&(s.j41(0,"div",0),s.nrm(1,"lv-check-icon-svg"),s.j41(2,"h1",1),s.EFF(3," Thank you! "),s.k0s(),s.j41(4,"h2",2),s.EFF(5," You\u2019re awesome, seriously! "),s.k0s(),s.DNE(6,Et,1,0,"div",3)(7,xt,11,7)(8,kt,5,1),s.nrm(9,"img",4)(10,"img",5),s.k0s(),s.j41(11,"div",6)(12,"h2",7),s.EFF(13," Your journey isn't over - discover more posts now.\n"),s.k0s(),s.j41(14,"lv-lib-button",8),s.bIt("click",function(){return H.redirectToHomePage()}),s.j41(15,"div",9),s.DNE(16,Ft,2,0),s.k0s()()()),2&N&&(s.R7$(6),s.vxM(6,H.loadingContent?6:H.targetType()===H.NewGQLPublicLinkTargetType.Paste&&H.pasteContent?7:8),s.R7$(8),s.Y8G("disabled",H.loading)("type","neutral")("rounded",!0),s.R7$(),s.AVh("follow__button--loading",H.loading),s.R7$(),s.vxM(16,H.loading?-1:16))},dependencies:[c.MD,d.Xb,d.og,u.h,Oe,Ie,Pe],styles:['.success__container[_ngcontent-%COMP%]{max-width:calc(1564px - 4rem);justify-items:center;position:relative;background-color:#fff;width:100%;display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:64px 0 128px;margin-top:64px;margin-left:50%;transform:translate(-50%);gap:16px;border-radius:16px}.success__container[_ngcontent-%COMP%] .open-btn-wrapper[_ngcontent-%COMP%]{z-index:10}.success__text--title[_ngcontent-%COMP%], .success__text--subtitle[_ngcontent-%COMP%]{z-index:2}.success__img--gif[_ngcontent-%COMP%]{height:88px;width:88px}.success__img--left[_ngcontent-%COMP%], .success__img--right[_ngcontent-%COMP%]{max-width:30%;position:absolute}.success__img--left[_ngcontent-%COMP%]{left:0;bottom:0}.success__img--right[_ngcontent-%COMP%]{right:0}.home-page__container[_ngcontent-%COMP%]{max-width:90%;width:max-content;align-items:center;position:relative;margin-left:50%;transform:translate(-50%);padding:16px;background-color:#fff;border-radius:16px;margin-top:-32px;margin-bottom:64px;box-shadow:0 3px 8px #32323229;display:flex;flex-direction:column;gap:16px}@media (max-width: 768px){.home-page__container[_ngcontent-%COMP%]{display:block}}@media (max-width: 1068px){.home-page__container[_ngcontent-%COMP%]{width:90%}}@media (max-width: 768px){.home-page__text[_ngcontent-%COMP%]{margin-bottom:16px}}.home-page__button--inlay[_ngcontent-%COMP%]{color:#000;display:flex;align-items:center;gap:8px}.home-page__button--loading[_ngcontent-%COMP%]{width:32px;aspect-ratio:1;border-radius:50%;background:radial-gradient(farthest-side,#ff8114 94%,#0000) top/8px 8px no-repeat,conic-gradient(#0000 30%,#ff8114);-webkit-mask:radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - 8px),#000 0);animation:_ngcontent-%COMP%_l13 1s infinite linear}@keyframes _ngcontent-%COMP%_l13{to{transform:rotate(1turn)}}.open__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.ace__wrapper[_ngcontent-%COMP%]{height:40vh;width:60%;box-shadow:0 3px 24px #3232320a;z-index:1}@media (max-width: 768px){.ace__wrapper[_ngcontent-%COMP%]{width:90%}}.ace__buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;z-index:1;width:60%}@media (max-width: 768px){.ace__buttons[_ngcontent-%COMP%]{width:90%}}@media (max-width: 1068px){.ace__buttons[_ngcontent-%COMP%]{flex-direction:column}}.ace__buttons[_ngcontent-%COMP%] lv-lib-button[_ngcontent-%COMP%]{width:100%}.ace__button--inlay[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.loading[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,#ff811433 33%,#ff8114);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}.loading[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#fff}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']})}return I})();var Lt=oe(8151),Dt=oe(5028);let Tt=(()=>{class I{constructor(){}generateYoutubeVideoId(M){if(!M)return"";const H=M.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return H&&H[7].length>8?H[7]:""}getContentCarousel(M,N,H){const q=[],he=this.generateYoutubeVideoId(N);return he&&q.push({type:"ytVideo",alt:H+"_video",src:he}),M.length>0&&M.forEach((Ee,Se)=>{q.push({type:"image",alt:H+"_image"+Se,src:Ee.url})}),q}static#e=this.\u0275fac=function(N){return new(N||I)};static#t=this.\u0275prov=s.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();var Rt=oe(9576),Bt=oe(188);const Ot=I=>({display:"flex",justifyContent:"center",marginBottom:I}),It=()=>({"margin-bottom":0}),Pt=I=>({display:"flex",justifyContent:"center",marginTop:I}),Ge=()=>({width:"100%",height:"50px",borderRadius:"0px",backgroundColor:"#dddbdd"}),Wt=()=>({height:"450px",width:"100%",marginTop:"20px",borderRadius:"12px",backgroundColor:"#dddbdd"}),je=()=>({height:"250px",width:"100%",marginTop:"20px",borderRadius:"0",backgroundColor:"#dddbdd"}),Nt=()=>({height:"594px",width:"100%",marginTop:"20px",borderRadius:"0",backgroundColor:"#dddbdd"}),Ht=()=>({width:"200px",height:"25px",borderRadius:"0px",backgroundColor:"#dddbdd"});function zt(I,te){if(1&I){const M=s.RV6();s.nrm(0,"hr"),s.j41(1,"pre"),s.EFF(2,"Debug buttons only in dev mode"),s.k0s(),s.j41(3,"button",10),s.bIt("click",function(){s.eBV(M);const H=s.XpG(2);return s.Njj(H.togglePremiumOnlyLink())}),s.EFF(4),s.k0s(),s.nrm(5,"hr"),s.j41(6,"button",11),s.EFF(7," redirect to link-for-recreating-error (always ads) "),s.k0s(),s.j41(8,"button",12),s.EFF(9,"redirect to moin moin (always ads)"),s.k0s(),s.j41(10,"button",13),s.EFF(11," redirect to forsaken (always ads) "),s.k0s(),s.nrm(12,"hr"),s.j41(13,"button",14),s.bIt("click",function(){s.eBV(M);const H=s.XpG(2);return s.Njj(H.apiDetailPageService.setVariant("old"))}),s.EFF(14," set test (after refresh): old "),s.k0s(),s.nrm(15,"hr")}if(2&I){const M=s.XpG(2);s.R7$(3),s.Y8G("disabled",!M.currentLink),s.R7$(),s.SpI(" premium only: ",null==M.currentLink?null:M.currentLink.is_premium_only_link," | toggle ")}}function Vt(I,te){if(1&I&&s.nrm(0,"ins",17),2&I){const M=s.XpG(3);s.Aen(s.eq3(2,Ot,M.showAdsense?"2rem":"0px"))}}function Ut(I,te){1&I&&s.nrm(0,"ins",18)}function Gt(I,te){if(1&I&&s.nrm(0,"lv-lib-chip",29),2&I){let M,N,H;const q=te.$implicit;s.Y8G("icon",q.icon)("text",null!==(M=q.text)&&void 0!==M?M:"")("iconColor",null!==(N=q.iconColor)&&void 0!==N?N:null)("tooltip",null!==(H=q.tooltip)&&void 0!==H?H:null)}}function jt(I,te){if(1&I&&(s.j41(0,"div",30)(1,"h1"),s.EFF(2),s.k0s()()),2&I){const M=s.XpG(5);s.R7$(2),s.JRh(null==M.currentLink?null:M.currentLink.title)}}function Kt(I,te){if(1&I&&s.nrm(0,"lv-lib-carousel",34),2&I){const M=s.XpG(6);s.Y8G("isMobile",!M.isDesktop)("items",M.contentCarouselData)}}function Yt(I,te){if(1&I&&s.eu8(0,35),2&I){s.XpG(5);const M=s.sdS(9);s.Y8G("ngTemplateOutlet",M)}}function Xt(I,te){if(1&I&&(s.j41(0,"div",31)(1,"div",32)(2,"div",33),s.DNE(3,Kt,1,2,"lv-lib-carousel",34)(4,Yt,1,1),s.k0s()()()),2&I){const M=s.XpG(5);s.R7$(3),s.vxM(3,M.contentCarouselData&&M.contentCarouselData.length>0?3:4)}}function Qt(I,te){if(1&I&&(s.j41(0,"lv-lib-card",21)(1,"div",28),s.Z7z(2,Gt,1,4,"lv-lib-chip",29,s.fX1),s.k0s(),s.DNE(4,jt,3,1,"div",30)(5,Xt,5,1,"div",31),s.k0s()),2&I){const M=s.XpG(4);s.Y8G("rounded",!0)("padding",!0)("marginSize",null),s.R7$(2),s.Dyx(M.chipsData),s.R7$(2),s.vxM(4,M.isLoadingSkeleton?-1:4),s.R7$(),s.vxM(5,M.currentLink?5:-1)}}function Zt(I,te){if(1&I&&s.eu8(0,35),2&I){s.XpG(3);const M=s.sdS(7);s.Y8G("ngTemplateOutlet",M)}}function Jt(I,te){if(1&I&&(s.j41(0,"div",22)(1,"h2",36),s.EFF(2),s.nI1(3,"translate"),s.k0s(),s.j41(4,"lv-lib-card",37),s.nI1(5,"translate"),s.nI1(6,"translate"),s.j41(7,"p",38),s.EFF(8),s.k0s()()()),2&I){const M=s.XpG(4);s.R7$(2),s.SpI(" ",s.bMT(3,10,"detail-page.headline_description")," "),s.R7$(2),s.Y8G("isExpandable",!0)("rows",3)("rounded",!0)("padding",!0)("marginSize",null)("showLessString",s.bMT(5,12,"detail-page.show_less"))("showMoreString",s.bMT(6,14,"detail-page.show_more")),s.R7$(3),s.Y8G("ngStyle",s.lJ4(16,It)),s.R7$(),s.SpI(" ",null==M.currentLink?null:M.currentLink.description," ")}}function qt(I,te){if(1&I&&s.eu8(0,35),2&I){s.XpG(3);const M=s.sdS(11);s.Y8G("ngTemplateOutlet",M)}}function ei(I,te){if(1&I&&s.nrm(0,"lv-lib-accordion",40),2&I){const M=te.$implicit,N=te.$index;s.Y8G("title",M.title)("text",M.body)("rounded",!0)("marginSize",0===N?null:"m")}}function ti(I,te){if(1&I&&(s.j41(0,"div",23)(1,"h2",39),s.EFF(2),s.nI1(3,"translate"),s.k0s(),s.Z7z(4,ei,1,4,"lv-lib-accordion",40,s.fX1),s.k0s()),2&I){const M=s.XpG(4);s.R7$(2),s.SpI(" ",s.bMT(3,1,"detail-page.headline_faq")," "),s.R7$(2),s.Dyx(M.currentLink.seo_faqs)}}function ii(I,te){if(1&I&&s.nrm(0,"ins",41),2&I){const M=s.XpG(4);s.Aen(s.eq3(2,Pt,M.showAdsense?"2rem":"0px"))}}function ni(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",16)(1,"div",19)(2,"div",20),s.DNE(3,Qt,6,5,"lv-lib-card",21)(4,Zt,1,1)(5,Jt,9,17,"div",22)(6,qt,1,1)(7,ti,6,3,"div",23),s.k0s(),s.j41(8,"div",24),s.DNE(9,ii,1,4,"ins",25),s.j41(10,"div",26)(11,"lv-action-box",27),s.bIt("rateEmitter",function(H){s.eBV(M);const q=s.XpG(3);return s.Njj(q.rateLink(H))})("clickEmitter",function(){s.eBV(M);const H=s.XpG(3);return s.Njj(H.handleActionBoxClick())}),s.k0s()()()()()}if(2&I){const M=s.XpG(3);s.R7$(3),s.vxM(3,M.isLoadingSkeleton?4:3),s.R7$(2),s.vxM(5,null!=M.currentLink&&M.currentLink.description&&(null==M.currentLink?null:M.currentLink.description.length)>0&&!M.isLoadingSkeleton?5:6),s.R7$(2),s.vxM(7,null!=M.currentLink&&M.currentLink.seo_faqs.length?7:-1),s.R7$(2),s.vxM(9,M.isDesktop?-1:9),s.R7$(2),s.Y8G("ratingSubject",M.rating$$)("link",M.currentLink)}}function ri(I,te){if(1&I&&s.DNE(0,Vt,1,4,"ins",15)(1,Ut,1,0)(2,ni,12,6,"div",16),2&I){const M=s.XpG(2);s.vxM(0,M.isDesktop?0:1),s.R7$(2),s.vxM(2,M.contentCarouselData?2:-1)}}function oi(I,te){if(1&I){const M=s.RV6();s.j41(0,"lv-success-page-a",42),s.bIt("rateEmitter",function(H){s.eBV(M);const q=s.XpG(3);return s.Njj(q.rateLink(H))}),s.k0s()}if(2&I){let M;const N=s.XpG(3);s.Y8G("ratingSubject",N.rating$$)("targetType",null!==(M=N.currentLink.target_type)&&void 0!==M?M:null)}}function si(I,te){if(1&I&&s.nrm(0,"lv-success-page-b",43),2&I){let M;const N=s.XpG(3);s.Y8G("targetType",null!==(M=N.currentLink.target_type)&&void 0!==M?M:null)("link",N.currentLink)}}function ai(I,te){if(1&I&&s.nrm(0,"lv-success-page-c",44),2&I){let M;const N=s.XpG(3);s.Y8G("targetType",null!==(M=N.currentLink.target_type)&&void 0!==M?M:null)}}function li(I,te){if(1&I&&s.nrm(0,"lv-success-page-d",44),2&I){let M;const N=s.XpG(3);s.Y8G("targetType",null!==(M=N.currentLink.target_type)&&void 0!==M?M:null)}}function ci(I,te){if(1&I&&s.DNE(0,oi,1,2)(1,si,1,2)(2,ai,1,1)(3,li,1,1),2&I){let M;const N=s.XpG(2);s.vxM(0,"sp-01"===(M=N.successPageVersion)?0:"sp-02"===M?1:"sp-03"===M?2:"sp-04"===M?3:-1)}}function hi(I,te){if(1&I){const M=s.RV6();s.j41(0,"div",47)(1,"lv-lib-result",48),s.bIt("cardClick",function(){const H=s.eBV(M).$implicit,q=s.XpG(3);return s.Njj(q.openLink(H))})("profileClick",function(){const H=s.eBV(M).$implicit,q=s.XpG(3);return s.Njj(q.openProfile(H))}),s.k0s()()}if(2&I){const M=te.$implicit;s.R7$(),s.Y8G("rounded",!0)("title",M.title)("imageSrc",null==M?null:M.thumbnail_url)("badges",M.badges)("imageAlt",M.title+" Image")("origin",M.target_host)("username",M.publisher.name)("views",M.view_count)}}function ui(I,te){if(1&I&&(s.j41(0,"div",9)(1,"h1",45),s.EFF(2),s.nI1(3,"translate"),s.k0s(),s.j41(4,"div",46),s.Z7z(5,hi,2,8,"div",47,s.fX1),s.k0s()()),2&I){const M=s.XpG(2);s.R7$(2),s.SpI(" ",s.bMT(3,1,"detail-page.headline_more")," "),s.R7$(3),s.Dyx(M.recommendationItems)}}function di(I,te){1&I&&(s.j41(0,"lv-lib-card",49),s.nrm(1,"ngx-skeleton-loader",50)(2,"ngx-skeleton-loader",51)(3,"ngx-skeleton-loader",52),s.k0s()),2&I&&(s.Y8G("padding",!0)("rounded",!0)("marginSize",null),s.R7$(),s.Y8G("theme",s.lJ4(6,Ge)),s.R7$(),s.Y8G("theme",s.lJ4(7,Wt)),s.R7$(),s.Y8G("theme",s.lJ4(8,je)))}function fi(I,te){1&I&&s.nrm(0,"ngx-skeleton-loader",51)(1,"ngx-skeleton-loader",52),2&I&&(s.Y8G("theme",s.lJ4(2,Nt)),s.R7$(),s.Y8G("theme",s.lJ4(3,je)))}function gi(I,te){1&I&&(s.j41(0,"div",22),s.nrm(1,"ngx-skeleton-loader",53),s.k0s(),s.j41(2,"lv-lib-card",54),s.nrm(3,"ngx-skeleton-loader",50),s.k0s()),2&I&&(s.R7$(),s.Y8G("theme",s.lJ4(4,Ht)),s.R7$(),s.Y8G("rounded",!0)("padding",!0),s.R7$(),s.Y8G("theme",s.lJ4(5,Ge)))}function pi(I,te){if(1&I&&s.DNE(0,gi,4,6),2&I){const M=s.XpG(2);s.vxM(0,""!==(null==M.currentLink?null:M.currentLink.description)?0:-1)}}function mi(I,te){if(1&I&&(s.qex(0,6),s.nI1(1,"async"),s.DNE(2,zt,16,2)(3,ri,3,2)(4,ci,4,1)(5,ui,7,3,"div",9)(6,di,4,9,"ng-template",null,0,s.C5r)(8,fi,2,4,"ng-template",null,1,s.C5r)(10,pi,1,1,"ng-template",null,2,s.C5r),s.bVm()),2&I){const M=s.XpG();s.Y8G("lvDisableScroll",s.bMT(1,4,M.trigger$$)&&"testGroupNew"===M.randomVariant$.getValue()),s.R7$(2),s.vxM(2,M.showDetailPageAccessBypass?2:-1),s.R7$(),s.vxM(3,M.showSuccessPage?4:3),s.R7$(2),s.vxM(5,!M.recommendationItems||M.isLoadingSkeleton||M.showSuccessPage&&"sp-04"===M.successPageVersion?-1:5)}}function vi(I,te){if(1&I){const M=s.RV6();s.j41(0,"lv-action-box",27),s.bIt("rateEmitter",function(H){s.eBV(M);const q=s.XpG();return s.Njj(q.rateLink(H))})("clickEmitter",function(){s.eBV(M);const H=s.XpG();return s.Njj(H.handleActionBoxClick())}),s.k0s()}if(2&I){const M=s.XpG();s.Y8G("ratingSubject",M.rating$$)("link",M.currentLink)}}var Le=function(I){return I.Positive="POSITIVE",I.Negative="NEGATIVE",I}(Le||{});let wi=(()=>{class I{constructor(M,N,H,q,he,Ee,Se,De,Ci,bi,yi,Ai,_i,$i,Si,Ei,xi,ki){this.document=M,this.auth=N,this.apiDetailPageService=H,this.route=q,this.adService=he,this.trackingService=Ee,this.profileService=Se,this.linkService=De,this.elementRef=Ci,this.mediaService=bi,this.pageService=yi,this.validationService=Ai,this.loadingService=_i,this.apiAccountService=$i,this.countdownService=Si,this.http=Ei,this.dialog=xi,this.apiAuthService=ki,this.showDetailPageAccessBypass=B.c.showDetailPageAccessBypass,this.chargebeeSubDomain=B.c.chargebeeSubDomain,this.baseUrl=B.c.baseUrl,this.production=B.c.production,this.chipsData=[],this.contentCarouselData=[],this.currentLink=null,this.recommendationItems=[],this.recommendationAd=null,this.isLoadingSkeleton=!0,this.isBasic=!1,this.showSuccessPage=!1,this.randomVariant$=this.apiDetailPageService.getVariant(),this.isDesktop=window.innerWidth>=768,this.trigger$$=this.apiDetailPageService.trigger$$,this.likeSum=0,this.dislikeSum=0,this.ratingPercentage=0,this.hasLiked=!1,this.hasDisliked=!1,this.deactivateRating=!1,this.rating$$=new K.t(null),this.subscriptions=new k.yU,this.targetData=null,this.remainingWaitingTime=0,this.hasNewLink=!0,this.isPremiumDunning=!1,this.lastSubscription=(0,s.vPA)(""),this.lastPlanId=(0,s.vPA)(""),this.successPageVersion="sp-01"}ngOnInit(){this.loadingService.setLoading(!1),this.apiDetailPageService.setVariant(),this.randomVariant$=this.apiDetailPageService.getVariant(),this.document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"),this.subscriptions.add(this.route.url.pipe(function n(...I){const te=(0,e.ms)(I);return(0,$.N)((M,N)=>{const H=I.length,q=new Array(H);let he=I.map(()=>!1),Ee=!1;for(let Se=0;Se{q[Se]=De,!Ee&&!he[Se]&&(he[Se]=!0,(Ee=he.every(a.D))&&(he=null))},t.l));M.subscribe((0,y._)(N,Se=>{if(Ee){const De=[Se,...q];N.next(te?te(...De):De)}}))})}(this.route.params,this.route.queryParams,this.route.data),(0,i.o)(()=>this.validationService.check()),(0,b.M)(()=>{this.isLoadingSkeleton=!0,this.contentCarouselData=[],this.currentLink=null,this.postAccess$=this.apiDetailPageService.createPagePostAccess$(),this.pageData$=this.apiDetailPageService.createPageData$()}),(0,r.n)(([M,N,H,q])=>(this.apiDetailPageService.setCurrentLinkIdentifierAndOrigin(N,H,q.linkIdentificationType),this.pageData$))).subscribe({next:M=>{this.auth.authCallDone.pipe((0,o.p)(N=>!0===N),(0,f.s)(1)).subscribe(()=>{this.handleNetworkResponse(M)})},error:M=>{this.handleError(M)}})),this.subscribeToCountdown(),this.subscriptions.add(this.apiAuthService.getAccount().subscribe(M=>{this.lastPlanId.set(M.data.user.chargebeeData.planId)})),this.successPageVersion=this.getRandomVersion()}notifyTaboola(M){this.hasNewLink&&M&&(this.hasNewLink=!1,M&&"TABOOLA"===M.provider&&this.apiDetailPageService.postTaboolaAvailable(M.provider_additional_payload.taboola).pipe((0,r.n)(()=>this.apiDetailPageService.postTaboolaVisible(M.provider_additional_payload.taboola))).subscribe())}subscribeToCountdown(){this.subscriptions.add(this.countdownService.getCountdown().subscribe(M=>{this.remainingWaitingTime=M}))}handleError(M){M.toString().toLowerCase().includes("invalid")?this.validationService.openInvalidUserPopup(this.lastSubscription()):this.production?window.location.href="https://linkvertise.com":window.alert(`Error!\nRedirect to linkvertise.com (disabled in non-production)\nMessage: ${M.toString()}`)}handleNetworkResponse(M){this.hasNewLink=!0,this.linkService.setTargetData(null),this.trackingService.trackOpenDetailPage(this.auth.check()),this.targetAccessInformation=M.target_access_information,this.currentLink=M.link,this.showSuccessPage=!1,this.setUserRatingFlags(1===this.currentLink.user_rating,-1===this.currentLink.user_rating),this.setRatingSum(this.currentLink.positive_rating,this.currentLink.negative_rating),this.calcRatingPercentage(this.likeSum,this.dislikeSum),this.updateRatingSubject(),this.pageService.setDetailPage(this.currentLink.title,this.currentLink.short_link_title,this.currentLink.description,this.currentLink.seo_classification),this.newLinkOffersArray=M.linkCustomAdOffers,this.apiDetailPageService.setVariant(this.newLinkOffersArray[0]?.provider),this.randomVariant$=this.apiDetailPageService.getVariant(),this.apiAccountService.getAccount().subscribe(N=>{this.showAdsense=!this.auth.check(),this.isPremiumDunning=this.auth.isDunning,N.data?.user&&(this.premiumUser=N.data.user,this.isBasic=N.data.user.chargebeeData?.planId?.includes("linkvertise-premium-1")),setTimeout(()=>{try{this.showAdsense&&[...this.elementRef.nativeElement.getElementsByTagName("ins")].forEach(()=>{(window.adsbygoogle=window.adsbygoogle||[]).push({})})}catch(H){console.error(H)}},50)}),this.chipsData=this.linkService.getChipsData(this.currentLink,!1),this.recommendationItems=this.prepareRecommendationsData([...M.link_recommendations],this.recommendationAd),this.adService.getAdvertiserAdsByKeyword(M.link.short_link_title,3023,1,"recommendationAds"),window.recommendationAds=N=>{N&&N.length>0&&(this.recommendationAd=N[0]??null,this.recommendationItems=this.prepareRecommendationsData([...M.link_recommendations],this.recommendationAd))},this.contentCarouselData=this.mediaService.getContentCarousel(this.currentLink?.link_images,this.currentLink?.video_url,this.currentLink?.title),this.isLoadingSkeleton=!1}togglePremiumOnlyLink(){this.showDetailPageAccessBypass&&(this.currentLink.is_premium_only_link=!this.currentLink.is_premium_only_link)}handleActionBoxClick(){const M=this.auth.check();M?this.trackAndShowSuccessPage():M||(M?this.trackAndShowSuccessPage():this.currentLink.is_premium_only_link?this.openSelectedMembershipPlanDialog(!1):this.countdownService.getCompletedValue()&&this.targetData?this.trackAndShowSuccessPage():this.auth.isDunning?this.openChargeBeeDunningDialog():this.subscriptions.add(this.postAccess$.subscribe(N=>{N.additional_target_access_information?.remaining_waiting_time&&(this.remainingWaitingTime=N.additional_target_access_information?.remaining_waiting_time),this.hasLongPaywallDuration=N.additional_target_access_information?.has_long_paywall_duration,this.handleAdPath()})))}handleAdPath(){this.newLinkOffersArray?.length?(this.apiDetailPageService.trigger$$.next(!0),this.setPostAccess()):this.countdownService.getCompletedValue()?(this.apiDetailPageService.trigger$$.next(!1),this.trackAndShowSuccessPage()):(this.auth.isExpired&&this.lastSubscription.set(this.lastPlanId()),this.openSelectedMembershipPlanDialog(!0,this.randomVariant$.getValue()),this.countdownService.startCountdown(this.remainingWaitingTime))}setPostAccess(){this.subscriptions.add(this.postAccess$.subscribe())}handleAdExit(M){M===ye.solved||M===ye.taboola?(this.newLinkOffersArray=[],this.apiDetailPageService.trigger$$.next(!1),this.auth.isExpired&&this.lastSubscription.set(this.lastPlanId()),this.openSelectedMembershipPlanDialog(!0,this.randomVariant$.getValue()),this.hasLongPaywallDuration?this.countdownService.startCountdown(this.remainingWaitingTime):this.countdownService.restartCountdown(this.remainingWaitingTime)):M===ye.notSolved?this.trigger$$.next(!1):M===ye.premium&&(this.auth.isExpired&&this.lastSubscription.set(this.lastPlanId()),this.openSelectedMembershipPlanDialog(!1,this.randomVariant$.getValue()))}prepareRecommendationsData(M,N){let H=M;return H.forEach((q,he)=>{Object.assign(H[he],{badges:this.linkService.getChipsData(q,!0)})}),N&&!this.premiumUser&&H.unshift(this.adService.convertFeedAdToResult(N)),H.length>=12&&(H=H.slice(0,12)),H}openProfile(M){M.isAd?this.adService.openFeedLink(M.url):this.profileService.openProfile(`profile/${M.publisher.id}`)}openLink(M){M.isAd?this.adService.openFeedLink(M.url):(this.trackingService.trackSuggestionClick(this.showSuccessPage?v._.SuccessPage:v._.DetailPage,+M.id,`${M.publisher.id}/${M.url}`),this.showSuccessPage=!1,this.linkService.openLink(M))}rateLink(M){this.auth.isLoggedIn()?(this.deactivateRating=!0,this.updateRatingSubject(),this.http.post(`${this.baseUrl}links/${this.currentLink.id}/rate`,{thumb:M===Le.Positive?1:-1,link:this.currentLink}).subscribe(N=>{this.setUserRatingFlags(N.data.link.positiveRates>this.likeSum,N.data.link.negativeRates>this.dislikeSum),this.setRatingSum(N.data.link.positiveRates,N.data.link.negativeRates),this.calcRatingPercentage(this.likeSum,this.dislikeSum),this.deactivateRating=!1,this.updateRatingSubject()})):this.dialog.open(E)}setUserRatingFlags(M,N){this.hasLiked=M,this.hasDisliked=N}setRatingSum(M,N){this.likeSum=M,this.dislikeSum=N}calcRatingPercentage(M,N){this.ratingPercentage=M+N>0?M/(M+N)*100:0}updateRatingSubject(){this.rating$$.next({likeSum:this.likeSum,dislikeSum:this.dislikeSum,ratingPercentage:this.ratingPercentage,deactivateRating:this.deactivateRating,hasDisliked:this.hasDisliked,hasLiked:this.hasLiked})}openSelectedMembershipPlanDialog(M=!0,N){const H=this.dialog.open(w.v,{data:{variant:N,hasCountdown:M,hasLongPaywallDuration:this.hasLongPaywallDuration,remainingWaitingTime:this.remainingWaitingTime,targetLink:{id:this.currentLink.id,short_link_title:this.currentLink.short_link_title},lastSubscription:this.lastSubscription()}});this.subscriptions.add(H.afterClosed().subscribe(q=>{"testGroupNew"===N&&this.apiDetailPageService.trigger$$.next(!1),q?.afterOpeningTarget&&this.trackAndShowSuccessPage()}))}openChargeBeeDunningDialog(){this.subscriptions.add(this.dialog.open(Ye.t,{panelClass:"full-width-dialog",data:{status:"premium-dunning"}}).afterClosed().subscribe(M=>{"premium-dunning"===M&&window.open(`https://${this.chargebeeSubDomain}.chargebeeportal.com/portal/v2/login`,"_blank")}))}ngOnDestroy(){this.pageService.removeDetailPage(),this.subscriptions.unsubscribe()}getRandomVersion(){const M=["sp-01","sp-02","sp-03","sp-04"];return M[Math.floor(Math.random()*M.length)]}trackAndShowSuccessPage(){this.subscriptions.add(this.postAccess$.subscribe(()=>{this.showSuccessPage=!0,this.trackingService.trackOpenSuccessPage(this.premiumUser,`sp-${this.successPageVersion}`),window.scrollTo({top:0,behavior:"instant"})}))}static#e=this.\u0275fac=function(N){return new(N||I)(s.rXU(c.qQ),s.rXU(m.u),s.rXU(g.u),s.rXU(x.nX),s.rXU(C.L),s.rXU(v.b),s.rXU(S.p),s.rXU(F._),s.rXU(s.aKT),s.rXU(Tt),s.rXU(L.b),s.rXU(U),s.rXU(Rt.U),s.rXU(h.H),s.rXU(Bt.V),s.rXU(ie.Qq),s.rXU(d.o3),s.rXU(Lt.g))};static#t=this.\u0275cmp=s.VBU({type:I,selectors:[["lv-link-detail-page"]],standalone:!0,features:[s.aNF],decls:9,vars:9,consts:[["linkInfoSkeleton",""],["contentCarouselSkeleton",""],["descriptionSkeleton",""],["content",""],[3,"done","sendOnTaboola","variant","newLinkOffersArray","shortLinkTitle"],["id","lv-ads"],[3,"lvDisableScroll"],["widgets",""],[3,"ratingSubject","link"],[1,"more-component"],["lv-lib-button","",3,"click","disabled"],["lv-lib-button","","routerLink","/389774/link-for-recreating-error/"],["lv-lib-button","","routerLink","/452067/moin-moin"],["lv-lib-button","","routerLink","/389774/forsaken-odyssey-v112-bp"],["lv-lib-button","",3,"click"],["data-ad-client","ca-pub-7762049002141603","data-ad-slot","3724930890","data-ad-format","auto","align","center","data-full-width-responsive","true",1,"adsbygoogle",3,"style"],[1,"main-content"],["data-ad-client","ca-pub-7762049002141603","data-ad-slot","3724930890","data-ad-format","auto","align","center","data-full-width-responsive","true",1,"adsbygoogle"],["data-ad-client","ca-pub-7762049002141603","data-ad-slot","2869647245","data-ad-format","auto","data-full-width-responsive","true",1,"adsbygoogle",2,"display","block"],[1,"main-content__container"],[1,"main-content__wrapper","main-content__wrapper--left"],[3,"rounded","padding","marginSize"],[1,"description-component"],[1,"faq-component"],[1,"main-content__wrapper","main-content__wrapper--right"],["data-ad-client","ca-pub-7762049002141603","data-ad-slot","3550752643","data-ad-format","auto","align","center","data-full-width-responsive","true",1,"adsbygoogle",2,"max-height","320px !important","max-width","480px !important",3,"style"],[1,"actionBox"],[3,"rateEmitter","clickEmitter","ratingSubject","link"],[1,"content-component__chips"],[3,"icon","text","iconColor","tooltip"],[1,"content-component__headline"],[1,"content-component__profile"],[1,"user-profile"],[1,"content-component__carousel"],[3,"isMobile","items"],[3,"ngTemplateOutlet"],[1,"description-component__headline"],[3,"isExpandable","rows","rounded","padding","marginSize","showLessString","showMoreString"],[3,"ngStyle"],[1,"faq-component__headline"],[3,"title","text","rounded","marginSize"],["data-ad-client","ca-pub-7762049002141603","data-ad-slot","3550752643","data-ad-format","auto","align","center","data-full-width-responsive","true",1,"adsbygoogle",2,"max-height","320px !important","max-width","480px !important"],[3,"rateEmitter","ratingSubject","targetType"],[3,"targetType","link"],[3,"targetType"],[1,"more-component__headline"],[1,"more-component__container"],[1,"more-component__container--item"],[3,"cardClick","profileClick","rounded","title","imageSrc","badges","imageAlt","origin","username","views"],[3,"padding","rounded","marginSize"],["appearance","line",3,"theme"],["appearance","line",1,"content-component__carousel__skeleton",3,"theme"],["appearance","line",1,"content-component__carousel__skeleton-mobile",3,"theme"],["appearance","line",1,"description-component__headline",3,"theme"],[3,"rounded","padding"]],template:function(N,H){1&N&&(s.j41(0,"lv-main-content-layout")(1,"div",3)(2,"lv-link-detail-page-ad-step",4),s.nI1(3,"async"),s.bIt("done",function(he){return H.handleAdExit(he)})("sendOnTaboola",function(he){return H.notifyTaboola(he)}),s.k0s(),s.nrm(4,"div",5),s.DNE(5,mi,12,6,"ng-container",6),s.nI1(6,"async"),s.k0s(),s.j41(7,"div",7),s.DNE(8,vi,1,2,"lv-action-box",8),s.k0s()()),2&N&&(s.R7$(2),s.Y8G("variant",s.bMT(3,5,H.randomVariant$))("newLinkOffersArray",H.newLinkOffersArray)("shortLinkTitle",null==H.currentLink?null:H.currentLink.short_link_title),s.R7$(3),s.vxM(5,s.bMT(6,7,H.trigger$$)&&"testGroupNew"!==H.randomVariant$.getValue()?-1:5),s.R7$(3),s.vxM(8,H.showSuccessPage?-1:8))},dependencies:[Ke,lt,d.zO,x.Wk,d.xF,d.dz,d.H6,c.B3,d.Rv,at,d.wi,Re.Yq,Re.Zm,c.Jj,u.h,u.D9,c.T3,ft,yt,St,Mt,Dt.I],styles:["lv-link-detail-page .ad-component{width:100%;display:none}@media (min-width: 767px){lv-link-detail-page .ad-component{display:block}}lv-link-detail-page .ad-component p{color:#fff;font-size:28px}lv-link-detail-page .ad-component--skeleton{display:none}@media (min-width: 767px){lv-link-detail-page .ad-component--skeleton{display:flex;width:100%;justify-content:center}}lv-link-detail-page .ad-component--skeleton .skeleton__wrapper{display:flex;gap:2rem;width:100%;max-width:1312px}lv-link-detail-page .ad-component--skeleton .skeleton__image{position:relative;aspect-ratio:16/9;max-width:480px;display:flex;width:100%;height:auto}lv-link-detail-page .ad-component--skeleton .skeleton__text{display:flex;flex-direction:column;justify-content:center}\n","lv-link-detail-page .main-content{display:flex;width:100%;justify-content:center}lv-link-detail-page .main-content__container{display:grid;grid-template-columns:1fr;width:100%}lv-link-detail-page .main-content__wrapper{display:block}lv-link-detail-page .main-content__wrapper--left{width:100%;grid-column:1/3}lv-link-detail-page .main-content .actionBox{display:block}@media (min-width: 1024px){lv-link-detail-page .main-content .actionBox{display:none}}\n","lv-link-detail-page .description-component{margin-top:2.5rem}lv-link-detail-page .description-component__headline{margin:0 0 1rem 1.5rem}@media (min-width: 768px){lv-link-detail-page .description-component__headline{margin:0 0 1rem}}\n","lv-link-detail-page .content-component{padding:1.5rem}lv-link-detail-page .content-component__chips>lv-lib-chip{padding-right:.5rem}lv-link-detail-page .content-component__headline{margin-top:.75rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}@media (max-width: 768px){lv-link-detail-page .content-component__headline h1{font-size:2rem}}@media (min-width: 768px){lv-link-detail-page .content-component__headline{-webkit-line-clamp:2;line-clamp:2}}lv-link-detail-page .content-component__profile{margin-top:.5rem}lv-link-detail-page .content-component__carousel{display:block}@media (max-width: 768px){lv-link-detail-page .content-component__carousel__skeleton{display:none}}@media (min-width: 768px){lv-link-detail-page .content-component__carousel__skeleton-mobile{display:none}}\n","lv-link-detail-page .faq-component{margin-top:2.5rem}lv-link-detail-page .faq-component__headline{margin:0 0 1rem 1.5rem}@media (min-width: 768px){lv-link-detail-page .faq-component__headline{margin:0 0 1rem}}\n","lv-link-detail-page .more-component{flex-direction:column;display:flex;align-items:center;padding:5rem 0 2rem}lv-link-detail-page .more-component__headline{width:100%;max-width:1504px;margin-bottom:2rem;text-align:center}lv-link-detail-page .more-component__container{width:100%;max-width:1504px;display:block;grid-gap:1rem;justify-content:center}@media (max-width: 768px){lv-link-detail-page .more-component__container{display:flex;flex-direction:column}}@media (min-width: 767px){lv-link-detail-page .more-component__container{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(50% - 1rem),1fr))}}@media (min-width: 1366px){lv-link-detail-page .more-component__container{grid-template-columns:repeat(auto-fill,minmax(calc(33.33% - 1rem),1fr))}}lv-link-detail-page .more-component__container lv-lib-result>lv-lib-card>div{width:100%;height:100%;margin-top:0!important}lv-link-detail-page .more-component__container lv-lib-result>lv-lib-card>div .bottom__meta__name:hover{color:#ff8114}\n"],encapsulation:2})}return I})()},5028:(Fe,xe,oe)=>{"use strict";oe.d(xe,{I:()=>$});var s=oe(177),x=oe(4438);const K=[[["","content",""]],[["","widgets",""]]],k=["[content]","[widgets]"];let $=(()=>{class y{static#e=this.\u0275fac=function(t){return new(t||y)};static#t=this.\u0275cmp=x.VBU({type:y,selectors:[["lv-main-content-layout"]],standalone:!0,features:[x.aNF],ngContentSelectors:k,decls:7,vars:0,consts:[["widgetContent",""],[1,"main-content"],[1,"content"],[1,"widgets"]],template:function(t,e){1&t&&(x.NAR(K),x.j41(0,"div",1)(1,"div",2),x.SdG(2),x.k0s(),x.j41(3,"div",3)(4,"div",null,0),x.SdG(6,1),x.k0s()()())},dependencies:[s.MD],styles:['.lv-text-color-main[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:500!important;color:#ff8114!important}.lv-text-color-blue[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:500!important;color:#007bff!important}.lv-text-color-green[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:500!important;color:#28a745!important}.lv-caption[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:400;font-size:12px;line-height:14px;color:#dbdbdb}.link[_ngcontent-%COMP%], .link-left[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:500;font-size:16px;line-height:24px;letter-spacing:0;color:#ff8114}.link[_ngcontent-%COMP%]:before, .link-left[_ngcontent-%COMP%]:before{content:"";margin-bottom:-.3809em;display:table}.link[_ngcontent-%COMP%]:after, .link-left[_ngcontent-%COMP%]:after{content:"";margin-top:-.4082em;display:table}@media (max-width: 768px){.link[_ngcontent-%COMP%], .link-left[_ngcontent-%COMP%]{font-size:24px;line-height:32px!important}.link[_ngcontent-%COMP%]:before, .link-left[_ngcontent-%COMP%]:before{content:"";margin-bottom:-.3809em!important;display:table}.link[_ngcontent-%COMP%]:after, .link-left[_ngcontent-%COMP%]:after{content:"";margin-top:-.4082em!important;display:table}}.link.small[_ngcontent-%COMP%], .link-left.small[_ngcontent-%COMP%]{font-size:12px;line-height:14px}.link.small[_ngcontent-%COMP%]:before, .link-left.small[_ngcontent-%COMP%]:before{content:"";margin-bottom:-.6309em;display:table}.link.small[_ngcontent-%COMP%]:after, .link-left.small[_ngcontent-%COMP%]:after{content:"";margin-top:-.6582em;display:table}.link[_ngcontent-%COMP%]:hover, .link-left[_ngcontent-%COMP%]:hover{color:#cc6810}.lv-label[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-size:12px;line-height:13px;letter-spacing:-10;border-radius:100px;height:25px;width:-moz-fit-content;width:fit-content;padding:5px 10px}.lv-color-label-main[_ngcontent-%COMP%]{color:#fff;background-color:#ff8114}.lv-color-label-main[_ngcontent-%COMP%]:hover{background-color:#cc6810}.lv-color-label-positive[_ngcontent-%COMP%]{color:#fff;background-color:#28a745}.lv-color-label-positive[_ngcontent-%COMP%]:hover{background-color:#18662b}.lv-color-label-neutral[_ngcontent-%COMP%]{color:#fff;background-color:#323232}.lv-color-label-neutral[_ngcontent-%COMP%]:hover{background-color:gray}.lv-color-label-negative[_ngcontent-%COMP%]{color:#fff;background-color:#dc3545}.lv-color-label-negative[_ngcontent-%COMP%]:hover{background-color:#9c2531}.lv-badge-color-blue[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:500!important;color:#007bff!important}.lv-text-color-red[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:500!important;color:#dc3545!important}.main-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;width:100%}@media (min-width: 1024px){.main-content[_ngcontent-%COMP%]{grid-template-columns:2fr 1fr}}.main-content[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{min-width:0}@media (min-width: 1024px){.main-content[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{margin-top:0;margin-right:1.5rem}}.main-content[_ngcontent-%COMP%] .widgets[_ngcontent-%COMP%]{display:none}@media (min-width: 1024px){.main-content[_ngcontent-%COMP%] .widgets[_ngcontent-%COMP%]{display:block;width:100%;align-self:start;position:sticky;position:-webkit-sticky;top:104px}}']})}return y})()},6507:(Fe,xe,oe)=>{Fe=oe.nmd(Fe),function(){var x=function(){return this}();!x&&typeof window<"u"&&(x=window);var K=function(t,e,n){"string"==typeof t?(2==arguments.length&&(n=e),K.modules[t]||(K.payloads[t]=n,K.modules[t]=null)):K.original?K.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};K.modules={},K.payloads={};var k=function(t,e,n){if("string"==typeof e){var i=l(t,e);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(e)){for(var r=[],o=0,c=e.length;ol.length)&&(y=l.length);var a=l.indexOf($,y-=$.length);return-1!==a&&a===y}),String.prototype.repeat||k(String.prototype,"repeat",function($){for(var y="",l=this;$>0;)1&$&&(y+=l),($>>=1)&&(l+=l);return y}),String.prototype.includes||k(String.prototype,"includes",function($,y){return-1!=this.indexOf($,y)}),Object.assign||(Object.assign=function($){if(null==$)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object($),l=1;l>>0,t=0|arguments[1],e=t<0?Math.max(l+t,0):Math.min(t,l),n=arguments[2],i=void 0===n?l:0|n,r=i<0?Math.max(l+i,0):Math.min(i,l);e0;)1&l&&(a+=y),(l>>=1)&&(y+=y);return a};var k=/^\s\s*/,$=/\s\s*$/;x.stringTrimLeft=function(y){return y.replace(k,"")},x.stringTrimRight=function(y){return y.replace($,"")},x.copyObject=function(y){var l={};for(var a in y)l[a]=y[a];return l},x.copyArray=function(y){for(var l=[],a=0,t=y.length;a65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(s,x,K){"use strict";x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS};var k="object"==typeof navigator?navigator:{},$=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),y=k.userAgent||"",l=k.appName||"";x.isWin="win"==$,x.isMac="mac"==$,x.isLinux="linux"==$,x.isIE="Microsoft Internet Explorer"==l||l.indexOf("MSAppHost")>=0?parseFloat((y.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((y.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=y.match(/ Gecko\/\d+/),x.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),x.isWebKit=parseFloat(y.split("WebKit/")[1])||void 0,x.isChrome=parseFloat(y.split(" Chrome/")[1])||void 0,x.isSafari=parseFloat(y.split(" Safari/")[1])&&!x.isChrome||void 0,x.isEdge=parseFloat(y.split(" Edge/")[1])||void 0,x.isAIR=y.indexOf("AdobeAIR")>=0,x.isAndroid=y.indexOf("Android")>=0,x.isChromeOS=y.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test(y)&&!window.MSStream,x.isIOS&&(x.isMac=!0),x.isMobile=x.isIOS||x.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(s,x,K){"use strict";var k=s("./useragent");x.buildDom=function n(i,r,o){if("string"==typeof i&&i){var c=document.createTextNode(i);return r&&r.appendChild(c),c}if(!Array.isArray(i))return i&&i.appendChild&&r&&r.appendChild(i),i;if("string"!=typeof i[0]||!i[0]){for(var h=[],v=0;v"u")){if(l)if(r)a();else if(!1===r)return l.push([n,i]);if(!y){var o=r;r&&r.getRootNode?(!(o=r.getRootNode())||o==r)&&(o=document):o=document;var c=o.ownerDocument||o;if(i&&x.hasCssString(i,o))return null;i&&(n+="\n/*# sourceURL=ace/css/"+i+" */");var h=x.createElement("style");h.appendChild(c.createTextNode(n)),i&&(h.id=i),o==c&&(o=x.getDocumentHead(c)),o.insertBefore(h,o.firstChild)}}}if(x.useStrictCSP=function(n){y=n,0==n?a():l||(l=[])},x.importCssString=t,x.importCssStylsheet=function(n,i){x.buildDom(["link",{rel:"stylesheet",href:n}],x.getDocumentHead(i))},x.scrollbarWidth=function(n){var i=x.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var r=x.createElement("ace_outer"),o=r.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",r.appendChild(i);var c=n&&n.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(r);var h=i.offsetWidth;o.overflow="scroll";var v=i.offsetWidth;return h===v&&(v=r.clientWidth),c.removeChild(r),h-v},x.computedStyle=function(n,i){return window.getComputedStyle(n,"")||{}},x.setStyle=function(n,i,r){n[i]!==r&&(n[i]=r)},x.HAS_CSS_ANIMATION=!1,x.HAS_CSS_TRANSFORMS=!1,x.HI_DPI=!k.isWin||typeof window<"u"&&window.devicePixelRatio>=1.5,k.isChromeOS&&(x.HI_DPI=!1),typeof document<"u"){var e=document.createElement("div");x.HI_DPI&&void 0!==e.style.transform&&(x.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof e.style.animationName<"u"&&(x.HAS_CSS_ANIMATION=!0),e=null}x.translate=x.HAS_CSS_TRANSFORMS?function(n,i,r){n.style.transform="translate("+Math.round(i)+"px, "+Math.round(r)+"px)"}:function(n,i,r){n.style.top=Math.round(r)+"px",n.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(s,x,K){"use strict";var k=s("./dom");x.get=function($,y){var l=new XMLHttpRequest;l.open("GET",$,!0),l.onreadystatechange=function(){4===l.readyState&&y(l.responseText)},l.send(null)},x.loadScript=function($,y){var l=k.getDocumentHead(),a=document.createElement("script");a.src=$,l.appendChild(a),a.onload=a.onreadystatechange=function(t,e){(e||!a.readyState||"loaded"==a.readyState||"complete"==a.readyState)&&(a=a.onload=a.onreadystatechange=null,e||y())}},x.qualifyURL=function($){var y=document.createElement("a");return y.href=$,y.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(s,x,K){"use strict";x.inherits=function(k,$){k.super_=$,k.prototype=Object.create($.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(k,$){for(var y in $)k[y]=$[y];return k},x.implement=function(k,$){x.mixin(k,$)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(s,x,K){"use strict";var k={},$=function(){this.propagationStopped=!0},y=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(l,a){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[l]||[],e=this._defaultHandlers[l];if(t.length||e){("object"!=typeof a||!a)&&(a={}),a.type||(a.type=l),a.stopPropagation||(a.stopPropagation=$),a.preventDefault||(a.preventDefault=y),t=t.slice();for(var n=0;n1&&(h=o[o.length-2]);var b=a[r+"Path"];return null==b?b=a.basePath:"/"==c&&(r=c=""),b&&"/"!=b.slice(-1)&&(b+="/"),b+r+c+h+this.get("suffix")},x.setModuleUrl=function(i,r){return a.$moduleUrls[i]=r},x.setLoader=function(i){e=i},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(i,r){var o;if(Array.isArray(i))var c=i[0],h=i[1];else"string"==typeof i&&(h=i);var v=function(b){if(b&&!x.$loading[h])return r&&r(b);if(x.$loading[h]||(x.$loading[h]=[]),x.$loading[h].push(r),!(x.$loading[h].length>1)){var f=function(){!function(i,r){"ace/theme/textmate"===i||"./theme/textmate"===i?r(0,s("./theme/textmate")):e?e(i,r):console.error("loader is not configured")}(h,function(w,d){d&&(x.$loaded[h]=d),x._emit("load.module",{name:h,module:d});var u=x.$loading[h];x.$loading[h]=null,u.forEach(function(A){A&&A(d)})})};if(!x.get("packaged"))return f();$.loadScript(x.moduleUrl(h,c),f),n()}};if(x.dynamicModules[h])x.dynamicModules[h]().then(function(b){v(b.default?b.default:b)});else{try{o=this.$require(h)}catch{}v(o||x.$loaded[h])}},x.$require=function(i){if("function"==typeof K.require)return K.require(i)},x.setModuleLoader=function(i,r){x.dynamicModules[i]=r};var n=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};x.version="1.37.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(s,x,K){"use strict";s("./lib/fixoldbrowsers");var k=s("./config");k.setLoader(function(a,t){s([a],function(e){t(null,e)})});var $=function(){return this||typeof window<"u"&&window}();function y(a){if($&&$.document){k.set("packaged",a||s.packaged||K.packaged||$.define&&oe.amdD.packaged);var t={},e="",n=document.currentScript||document._currentScript,i=n&&n.ownerDocument||document;n&&n.src&&(e=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var r=i.getElementsByTagName("script"),o=0;o ["+this.end.row+"/"+this.end.column+"]"},$.prototype.contains=function(y,l){return 0==this.compare(y,l)},$.prototype.compareRange=function(y){var l,a=y.end,t=y.start;return 1==(l=this.compare(a.row,a.column))?1==(l=this.compare(t.row,t.column))?2:0==l?1:0:-1==l?-2:-1==(l=this.compare(t.row,t.column))?-1:1==l?42:0},$.prototype.comparePoint=function(y){return this.compare(y.row,y.column)},$.prototype.containsRange=function(y){return 0==this.comparePoint(y.start)&&0==this.comparePoint(y.end)},$.prototype.intersects=function(y){var l=this.compareRange(y);return-1==l||0==l||1==l},$.prototype.isEnd=function(y,l){return this.end.row==y&&this.end.column==l},$.prototype.isStart=function(y,l){return this.start.row==y&&this.start.column==l},$.prototype.setStart=function(y,l){"object"==typeof y?(this.start.column=y.column,this.start.row=y.row):(this.start.row=y,this.start.column=l)},$.prototype.setEnd=function(y,l){"object"==typeof y?(this.end.column=y.column,this.end.row=y.row):(this.end.row=y,this.end.column=l)},$.prototype.inside=function(y,l){return 0==this.compare(y,l)&&!(this.isEnd(y,l)||this.isStart(y,l))},$.prototype.insideStart=function(y,l){return 0==this.compare(y,l)&&!this.isEnd(y,l)},$.prototype.insideEnd=function(y,l){return 0==this.compare(y,l)&&!this.isStart(y,l)},$.prototype.compare=function(y,l){return this.isMultiLine()||y!==this.start.row?ythis.end.row?1:this.start.row===y?l>=this.start.column?0:-1:this.end.row===y?l<=this.end.column?0:1:0:lthis.end.column?1:0},$.prototype.compareStart=function(y,l){return this.start.row==y&&this.start.column==l?-1:this.compare(y,l)},$.prototype.compareEnd=function(y,l){return this.end.row==y&&this.end.column==l?1:this.compare(y,l)},$.prototype.compareInside=function(y,l){return this.end.row==y&&this.end.column==l?1:this.start.row==y&&this.start.column==l?-1:this.compare(y,l)},$.prototype.clipRows=function(y,l){if(this.end.row>l)var a={row:l+1,column:0};else this.end.rowl)var t={row:l+1,column:0};else this.start.row1?++A>4&&(A=1):A=1,$.isIE){var S=Math.abs(C.clientX-_)>5||Math.abs(C.clientY-p)>5;(!E||S)&&(A=1),E&&clearTimeout(E),E=setTimeout(function(){E=null},f[A-1]||600),1==A&&(_=C.clientX,p=C.clientY)}if(C._clicks=A,w[d]("mousedown",C),A>4)A=0;else if(A>1)return w[d](m[A],C)}Array.isArray(b)||(b=[b]),b.forEach(function(C){i(C,"mousedown",g,u)})},x.getModifierString=function(b){return k.KEY_MODS[o(b)]},x.addCommandKeyListener=function(b,f,w){var d=null;i(b,"keydown",function(u){y[u.keyCode]=(y[u.keyCode]||0)+1;var A=function c(b,f,w){var d=o(f);if(!w&&f.code&&(w=k.$codeToKeyCode[f.code]||w),!$.isMac&&y){if(f.getModifierState&&(f.getModifierState("OS")||f.getModifierState("Win"))&&(d|=8),y.altGr){if(!(3&~d))return;y.altGr=0}if(18===w||17===w){var u=f.location;17===w&&1===u?1==y[w]&&(l=f.timeStamp):18===w&&3===d&&2===u&&f.timeStamp-l<50&&(y.altGr=!0)}}if(w in k.MODIFIER_KEYS&&(w=-1),d||13!==w||3!==f.location||(b(f,d,-w),!f.defaultPrevented)){if($.isChromeOS&&8&d){if(b(f,d,w),f.defaultPrevented)return;d&=-9}return!!(d||w in k.FUNCTION_KEYS||w in k.PRINTABLE_KEYS)&&b(f,d,w)}}(f,u,u.keyCode);return d=u.defaultPrevented,A},w),i(b,"keypress",function(u){d&&(u.ctrlKey||u.altKey||u.shiftKey||u.metaKey)&&(x.stopEvent(u),d=null)},w),i(b,"keyup",function(u){y[u.keyCode]=null},w),y||(h(),i(window,"focus",h))},"object"==typeof window&&window.postMessage&&!$.isOldIE){var v=1;x.nextTick=function(b,f){f=f||window;var w="zero-timeout-message-"+v++,d=function(u){u.data==w&&(x.stopPropagation(u),r(f,"message",d),b())};i(f,"message",d),f.postMessage(w,"*")}}x.$idleBlocked=!1,x.onIdle=function(b,f){return setTimeout(function w(){x.$idleBlocked?setTimeout(w,100):b()},f)},x.$idleBlockId=null,x.blockIdle=function(b){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},b||100)},x.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame=x.nextFrame?x.nextFrame.bind(window):function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(s,x,K){"use strict";var k;K.exports={lineMode:!1,pasteCancelled:function(){return!!(k&&k>Date.now()-50)||(k=!1)},cancel:function(){k=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(s,x,K){"use strict";var k=s("../lib/event"),$=s("../config").nls,y=s("../lib/useragent"),l=s("../lib/dom"),a=s("../lib/lang"),t=s("../clipboard"),e=y.isChrome<18,n=y.isIE,i=y.isChrome>63,r=400,o=s("../lib/keys"),c=o.KEY_MODS,h=y.isIOS,v=h?/\s/:/\n/,b=y.isMobile;x.TextInput=function(w,d){var u=l.createElement("textarea");u.className="ace_text-input",u.setAttribute("wrap","off"),u.setAttribute("autocorrect","off"),u.setAttribute("autocapitalize","off"),u.setAttribute("spellcheck","false"),u.style.opacity="0",w.insertBefore(u,w.firstChild);var A=!1,_=!1,p=!1,E=!1,m="";b||(u.style.fontSize="1px");var g=!1,C=!1,S="",F=0,L=0,D=0,R=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,T=0;try{var U=document.activeElement===u}catch{}this.setNumberOfExtraLines=function(ee){R=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,T=ee<0?0:ee},this.setAriaLabel=function(){var ee="";d.$textInputAriaLabel&&(ee+="".concat(d.$textInputAriaLabel,", ")),d.session&&(ee+=$("text-input.aria-label","Cursor at row $0",[d.session.selection.cursor.row+1])),u.setAttribute("aria-label",ee)},this.setAriaOptions=function(ee){ee.activeDescendant?(u.setAttribute("aria-haspopup","true"),u.setAttribute("aria-autocomplete",ee.inline?"both":"list"),u.setAttribute("aria-activedescendant",ee.activeDescendant)):(u.setAttribute("aria-haspopup","false"),u.setAttribute("aria-autocomplete","both"),u.removeAttribute("aria-activedescendant")),ee.role&&u.setAttribute("role",ee.role),ee.setLabel&&(u.setAttribute("aria-roledescription",$("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),k.addListener(u,"blur",function(ee){C||(d.onBlur(ee),U=!1)},d),k.addListener(u,"focus",function(ee){if(!C){if(U=!0,y.isEdge)try{if(!document.hasFocus())return}catch{}d.onFocus(ee),y.isEdge?setTimeout(P):P()}},d),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:d.renderer.enableKeyboardAccessibility}),m||i||"browser"==this.$focusScroll)return u.focus({preventScroll:!0});var ee=u.style.top;u.style.position="fixed",u.style.top="0px";try{var se=0!=u.getBoundingClientRect().top}catch{return}var ae=[];if(se)for(var ce=u.parentElement;ce&&1==ce.nodeType;)ae.push(ce),ce.setAttribute("ace_nocontext","true"),ce=!ce.parentElement&&ce.getRootNode?ce.getRootNode().host:ce.parentElement;u.focus({preventScroll:!0}),se&&ae.forEach(function(fe){fe.removeAttribute("ace_nocontext")}),setTimeout(function(){u.style.position="","0px"==u.style.top&&(u.style.top=ee)},0)},this.blur=function(){u.blur()},this.isFocused=function(){return U},d.on("beforeEndOperation",function(){var ee=d.curOp,se=ee&&ee.command&&ee.command.name;"insertstring"!=se&&(p&&se&&(ee.docChanged||ee.selectionChanged)&&(S=u.value="",pe()),P())}),d.on("changeSelection",this.setAriaLabel);var B=function(ee,se){for(var ae=se,ce=1;ce<=ee-R&&ce<2*T+1;ce++)ae+=d.session.getLine(ee-ce).length+1;return ae},P=h?function(ee){if(U&&(!A||ee)&&!E){ee||(ee="");var se="\n ab"+ee+"cde fg\n";se!=u.value&&(u.value=S=se);var ce=4+(ee.length||(d.selection.isEmpty()?0:1));(4!=F||L!=ce)&&u.setSelectionRange(4,ce),F=4,L=ce}}:function(){if(!p&&!E&&(U||Y)){p=!0;var ee=0,se=0,ae="";if(d.session){var ce=d.selection,fe=ce.getRange(),we=ce.cursor.row;we===O+1?O=(R=O+1)+2*T:we===R-1?R=(O=R-1)-2*T:(weO+1)&&(R=we>T?we-T:0,O=we>T?we+T:2*T);for(var be=[],Ce=R;Ce<=O;Ce++)be.push(d.session.getLine(Ce));if(ae=be.join("\n"),ee=B(fe.start.row,fe.start.column),se=B(fe.end.row,fe.end.column),fe.start.rowO){var ge=d.session.getLine(O+1);se=fe.end.row>O+1?ge.length:fe.end.column,se+=ae.length+1,ae=ae+"\n"+ge}else b&&we>0&&(ae="\n"+ae,se+=1,ee+=1);ae.length>r&&(ee0&&S[ge]==ee[ge];)ge++,fe--;for(be=be.slice(ge),ge=1;we>0&&S.length-ge>F-1&&S[S.length-ge]==ee[ee.length-ge];)ge++,we--;Ce-=ge-1,ve-=ge-1;var Ae=be.length-ge+1;if(Ae<0&&(fe=-Ae,Ae=0),be=be.slice(0,Ae),!(se||be||Ce||fe||we||ve))return"";E=!0;var Me=!1;return y.isAndroid&&". "==be&&(be=" ",Me=!0),be&&!fe&&!we&&!Ce&&!ve||g?d.onTextInput(be):d.onTextInput(be,{extendLeft:fe,extendRight:we,restoreStart:Ce,restoreEnd:ve}),E=!1,S=ee,F=ae,L=ce,D=ve,Me?"\n":be},j=function(ee){if(p)return ie();if(ee&&ee.inputType){if("historyUndo"==ee.inputType)return d.execCommand("undo");if("historyRedo"==ee.inputType)return d.execCommand("redo")}var se=u.value,ae=V(se,!0);(se.length>500||v.test(ae)||b&&F<1&&F==L)&&P()},Z=function(ee,se,ae){var ce=ee.clipboardData||window.clipboardData;if(ce&&!e){var fe=n||ae?"Text":"text/plain";try{return se?!1!==ce.setData(fe,se):ce.getData(fe)}catch(we){if(!ae)return Z(we,se,!0)}}},Q=function(ee,se){var ae=d.getCopyText();if(!ae)return k.preventDefault(ee);Z(ee,ae)?(h&&(P(ae),A=ae,setTimeout(function(){A=!1},10)),se?d.onCut():d.onCopy(),k.preventDefault(ee)):(A=!0,u.value=ae,u.select(),setTimeout(function(){A=!1,P(),se?d.onCut():d.onCopy()}))},ne=function(ee){Q(ee,!0)},re=function(ee){Q(ee,!1)},X=function(ee){var se=Z(ee);t.pasteCancelled()||("string"==typeof se?(se&&d.onPaste(se,ee),y.isIE&&setTimeout(P),k.preventDefault(ee)):(u.value="",_=!0))};k.addCommandKeyListener(u,function(ee,se,ae){if(!p)return d.onCommandKey(ee,se,ae)},d),k.addListener(u,"select",function(ee){p||(A?A=!1:function(ee){return 0===ee.selectionStart&&ee.selectionEnd>=S.length&&ee.value===S&&S&&ee.selectionEnd!==L}(u)?(d.selectAll(),P()):b&&u.selectionStart!=F&&P())},d),k.addListener(u,"input",j,d),k.addListener(u,"cut",ne,d),k.addListener(u,"copy",re,d),k.addListener(u,"paste",X,d),(!("oncut"in u)||!("oncopy"in u)||!("onpaste"in u))&&k.addListener(w,"keydown",function(ee){if((!y.isMac||ee.metaKey)&&ee.ctrlKey)switch(ee.keyCode){case 67:re(ee);break;case 86:X(ee);break;case 88:ne(ee)}},d);var ie=function(){if(p&&d.onCompositionUpdate&&!d.$readOnly){if(g)return me();p.useTextareaForIME?d.onCompositionUpdate(u.value):(V(u.value),p.markerRange&&(p.context&&(p.markerRange.start.column=p.selectionStart=p.context.compositionStartOffset),p.markerRange.end.column=p.markerRange.start.column+L-p.selectionStart+D))}},pe=function(ee){!d.onCompositionEnd||d.$readOnly||(p=!1,d.onCompositionEnd(),d.off("mousedown",me),ee&&j())};function me(){C=!0,u.blur(),u.focus(),C=!1}var ue,de=a.delayedCall(ie,50).schedule.bind(null,null);function _e(){clearTimeout(ue),ue=setTimeout(function(){m&&(u.style.cssText=m,m=""),d.renderer.$isMousePressed=!1,d.renderer.$keepTextAreaAtCursor&&d.renderer.$moveTextAreaToCursor()},0)}k.addListener(u,"compositionstart",function(ee){if(!p&&d.onCompositionStart&&!d.$readOnly&&(p={},!g)){ee.data&&(p.useTextareaForIME=!1),setTimeout(ie,0),d._signal("compositionStart"),d.on("mousedown",me);var se=d.getSelectionRange();se.end.row=se.start.row,se.end.column=se.start.column,p.markerRange=se,p.selectionStart=F,d.onCompositionStart(p),p.useTextareaForIME?(S=u.value="",F=0,L=0):(u.msGetInputContext&&(p.context=u.msGetInputContext()),u.getInputContext&&(p.context=u.getInputContext()))}},d),k.addListener(u,"compositionupdate",ie,d),k.addListener(u,"keyup",function le(ee){27==ee.keyCode&&u.value.lengthL&&"\n"==S[ve]?ge=o.end:CeL&&S.slice(0,ve).split("\n").length>2?ge=o.down:ve>L&&" "==S[ve-1]?(ge=o.right,Ae=c.option):(ve>L||ve==L&&L!=F&&Ce==ve)&&(ge=o.right),Ce!==ve&&(Ae|=c.shift),ge){if(!se.onCommandKey({},Ae,ge)&&se.commands){ge=o.keyCodeToString(ge);var ye=se.commands.findKeyCommand(Ae,ge);ye&&se.execCommand(ye)}F=Ce,L=ve,P("")}}};document.addEventListener("selectionchange",we),se.on("destroy",function(){document.removeEventListener("selectionchange",we)})}(0,d,u),this.destroy=function(){u.parentElement&&u.parentElement.removeChild(u)}},x.$setUserAgentForTests=function(w,d){b=w,h=d}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(s,x,K){"use strict";var k=s("../lib/useragent"),l=function(){function e(n){n.$clickSelection=null;var i=n.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(o){n[o]=this[o]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return e.prototype.onMouseDown=function(n){var i=n.inSelection(),r=n.getDocumentPosition();this.mousedownEvent=n;var o=this.editor,c=n.getButton();return 0!==c?((o.getSelectionRange().isEmpty()||1==c)&&o.selection.moveToPosition(r),void(2==c&&(o.textInput.onContextMenu(n.domEvent),k.isMozilla||n.preventDefault()))):(this.mousedownEvent.time=Date.now(),!i||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(n),this.startSelect(r,n.domEvent._clicks>1),n.preventDefault()):(this.setState("focusWait"),void this.captureMouse(n)))},e.prototype.startSelect=function(n,i){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(n):i||r.selection.moveToPosition(n),i||this.select(),r.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var n,i=this.editor,r=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r);if(-1==o)n=this.$clickSelection.end;else if(1==o)n=this.$clickSelection.start;else{var c=t(this.$clickSelection,r);r=c.cursor,n=c.anchor}i.selection.setSelectionAnchor(n.row,n.column)}i.selection.selectToPosition(r),i.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(n){var i,r=this.editor,o=r.renderer.screenToTextCoordinates(this.x,this.y),c=r.selection[n](o.row,o.column);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(c.start),v=this.$clickSelection.comparePoint(c.end);if(-1==h&&v<=0)i=this.$clickSelection.end,(c.end.row!=o.row||c.end.column!=o.column)&&(o=c.start);else if(1==v&&h>=0)i=this.$clickSelection.start,(c.start.row!=o.row||c.start.column!=o.column)&&(o=c.end);else if(-1==h&&1==v)o=c.end,i=c.start;else{var b=t(this.$clickSelection,o);o=b.cursor,i=b.anchor}r.selection.setSelectionAnchor(i.row,i.column)}r.selection.selectToPosition(o),r.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var n=function a(e,n,i,r){return Math.sqrt(Math.pow(i-e,2)+Math.pow(r-n,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(n>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(n){var i=n.getDocumentPosition(),r=this.editor,c=r.session.getBracketRange(i);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=r.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=c,this.select()},e.prototype.onTripleClick=function(n){var i=n.getDocumentPosition(),r=this.editor;this.setState("selectByLines");var o=r.getSelectionRange();o.isMultiLine()&&o.contains(i.row,i.column)?(this.$clickSelection=r.selection.getLineRange(o.start.row),this.$clickSelection.end=r.selection.getLineRange(o.end.row).end):this.$clickSelection=r.selection.getLineRange(i.row),this.select()},e.prototype.onQuadClick=function(n){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var r=this.$lastScroll,o=n.domEvent.timeStamp,c=o-r.t,h=c?n.wheelX/c:r.vx,v=c?n.wheelY/c:r.vy;c<550&&(h=(h+r.vx)/2,v=(v+r.vy)/2);var b=Math.abs(h/v),f=!1;if(b>=1&&i.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(f=!0),b<=1&&i.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(f=!0),f?r.allowed=o:o-r.allowed<550&&(Math.abs(h)<=1.5*Math.abs(r.vx)&&Math.abs(v)<=1.5*Math.abs(r.vy)?(f=!0,r.allowed=o):r.allowed=0),r.t=o,r.vx=h,r.vy=v,f)return i.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},e}();function t(e,n){if(e.start.row==e.end.row)var i=2*n.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*n.row-e.start.row-e.end.row;else i=n.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}l.prototype.selectEnd=l.prototype.selectByLinesEnd,l.prototype.selectAllEnd=l.prototype.selectByLinesEnd,l.prototype.selectByWordsEnd=l.prototype.selectByLinesEnd,x.DefaultHandlers=l}),ace.define("ace/lib/scroll",["require","exports","module"],function(s,x,K){x.preventParentScroll=function($){$.stopPropagation();var y=$.currentTarget;y.scrollHeight>y.clientHeight||$.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(s,x,K){"use strict";var k=this&&this.__extends||function(){var c=function(h,v){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,f){b.__proto__=f}||function(b,f){for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(b[w]=f[w])})(h,v)};return function(h,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function b(){this.constructor=h}c(h,v),h.prototype=null===v?Object.create(v):(b.prototype=v.prototype,new b)}}(),$=this&&this.__values||function(c){var h="function"==typeof Symbol&&Symbol.iterator,v=h&&c[h],b=0;if(v)return v.call(c);if(c&&"number"==typeof c.length)return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},y=s("./lib/dom"),a=(s("./lib/event"),s("./range").Range),t=s("./lib/scroll").preventParentScroll,e="ace_tooltip",n=function(){function c(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return c.prototype.$init=function(){return this.$element=y.createElement("div"),this.$element.className=e,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(h){this.getElement().textContent=h},c.prototype.setHtml=function(h){this.getElement().innerHTML=h},c.prototype.setPosition=function(h,v){this.getElement().style.left=h+"px",this.getElement().style.top=v+"px"},c.prototype.setClassName=function(h){y.addCssClass(this.getElement(),h)},c.prototype.setTheme=function(h){this.$element.className=e+" "+(h.isDark?"ace_dark ":"")+(h.cssClass||"")},c.prototype.show=function(h,v,b){null!=h&&this.setText(h),null!=v&&null!=b&&this.setPosition(v,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=e,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),r=new(function(){function c(){this.popups=[]}return c.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},c.prototype.removePopup=function(h){var v=this.popups.indexOf(h);-1!==v&&(this.popups.splice(v,1),this.updatePopups())},c.prototype.updatePopups=function(){var h,v,b,f;this.popups.sort(function(g,C){return C.priority-g.priority});var w=[];try{for(var d=$(this.popups),u=d.next();!u.done;u=d.next()){var A=u.value,_=!0;try{for(var p=(b=void 0,$(w)),E=p.next();!E.done;E=p.next())if(this.doPopupsOverlap(E.value,A)){_=!1;break}}catch(g){b={error:g}}finally{try{E&&!E.done&&(f=p.return)&&f.call(p)}finally{if(b)throw b.error}}_?w.push(A):A.hide()}}catch(g){h={error:g}}finally{try{u&&!u.done&&(v=d.return)&&v.call(d)}finally{if(h)throw h.error}}},c.prototype.doPopupsOverlap=function(h,v){var b=h.getElement().getBoundingClientRect(),f=v.getElement().getBoundingClientRect();return b.leftf.left&&b.topf.top},c}());x.popupManager=r,x.Tooltip=n;var o=function(c){function h(v){void 0===v&&(v=document.body);var b=c.call(this,v)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var f=b.getElement();return f.style.whiteSpace="pre-wrap",f.style.pointerEvents="auto",f.addEventListener("mouseout",b.onMouseOut),f.tabIndex=-1,f.addEventListener("blur",function(){f.contains(document.activeElement)||this.hide()}.bind(b)),f.addEventListener("wheel",t),b}return k(h,c),h.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(v,b){this.lastEvent=v,this.lastT=Date.now();var f=b.$mouseHandler.isMousePressed;if(this.isOpen){var w=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(w.row,w.column)||f||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||f||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;this.idleTime-v>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-v):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},h.prototype.isOutsideOfText=function(v){var b=v.editor,f=v.getDocumentPosition(),w=b.session.getLine(f.row);if(f.column==w.length){var d=b.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),u=b.session.documentToScreenPosition(f.row,f.column);if(u.column!=d.column||u.row!=d.row)return!0}return!1},h.prototype.setDataProvider=function(v){this.$gatherData=v},h.prototype.showForRange=function(v,b,f,w){if(!(w&&w!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var u=v.renderer;this.isOpen||(r.addPopup(this),this.$registerCloseEvents(),this.setTheme(u.theme)),this.isOpen=!0,this.addMarker(b,v.session),this.range=a.fromPoints(b.start,b.end);var A=u.textToScreenCoordinates(b.start.row,b.start.column),_=u.scroller.getBoundingClientRect();A.pageX<_.left&&(A.pageX=_.left);var p=this.getElement();p.innerHTML="",p.appendChild(f),p.style.maxHeight="",p.style.display="block";var m=p.clientWidth,g=window.innerHeight-A.pageY-u.lineHeight,C=!0;A.pageY-p.clientHeight<0&&A.pageY=r.length&&(r=void 0),{value:r&&r[h++],done:!r}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},y=s("../lib/dom"),l=s("../lib/event"),a=s("../tooltip").Tooltip,t=s("../config").nls;s("../lib/lang"),x.GutterHandler=function n(r){var v,b,o=r.editor,c=o.renderer.$gutterLayer,h=new i(o);function w(){v&&(v=clearTimeout(v)),h.isOpen&&(h.hideTooltip(),o.off("mousewheel",w))}function d(u){h.setPosition(u.x,u.y)}r.editor.setDefaultHandler("guttermousedown",function(u){if(o.isFocused()&&0==u.getButton()&&"foldWidgets"!=c.getRegion(u)){var _=u.getDocumentPosition().row,p=o.session.selection;if(u.getShiftKey())p.selectTo(_,0);else{if(2==u.domEvent.detail)return o.selectAll(),u.preventDefault();r.$clickSelection=o.selection.getLineRange(_)}return r.setState("selectByLines"),r.captureMouse(u),u.preventDefault()}}),r.editor.setDefaultHandler("guttermousemove",function(u){if(y.hasCssClass(u.domEvent.target||u.domEvent.srcElement,"ace_fold-widget"))return w();h.isOpen&&r.$tooltipFollowsMouse&&d(u),b=u,!v&&(v=setTimeout(function(){v=null,b&&!r.isMousePressed?function f(){var u=b.getDocumentPosition().row;if(u==o.session.getLength()){var _=o.renderer.pixelToScreenCoordinates(0,b.y).row,p=b.$pos;if(_>o.session.documentToScreenRow(p.row,p.column))return w()}if(h.showTooltip(u),h.isOpen)if(o.on("mousewheel",w),r.$tooltipFollowsMouse)d(b);else{var E=b.getGutterRow(),m=c.$lines.get(E);if(m){var C=m.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),S=h.getElement().style;S.left=C.right+"px",S.top=C.bottom+"px"}else d(b)}}():w()},50))}),l.addListener(o.renderer.$gutter,"mouseout",function(u){b=null,h.isOpen&&!v&&(v=setTimeout(function(){v=null,w()},50))},o),o.on("changeSession",w),o.on("input",w)};var i=function(r){function o(c){var h=r.call(this,c.container)||this;return h.editor=c,h}return k(o,r),o.prototype.setPosition=function(c,h){var v=window.innerWidth||document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight,f=this.getWidth(),w=this.getHeight();(c+=15)+f>v&&(c-=c+f-v),(h+=15)+w>b&&(h-=20+w),a.prototype.setPosition.call(this,c,h)},Object.defineProperty(o,"annotationLabels",{get:function(){return{error:{singular:t("gutter-tooltip.aria-label.error.singular","error"),plural:t("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:t("gutter-tooltip.aria-label.security.singular","security finding"),plural:t("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:t("gutter-tooltip.aria-label.warning.singular","warning"),plural:t("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:t("gutter-tooltip.aria-label.info.singular","information message"),plural:t("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:t("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:t("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),o.prototype.showTooltip=function(c){var h,f,v=this.editor.renderer.$gutterLayer,b=v.$annotations[c];f=b?{displayText:Array.from(b.displayText),type:Array.from(b.type)}:{displayText:[],type:[]};var w=v.session.getFoldLine(c);if(w&&v.$showFoldedAnnotations){for(var A,d={error:[],security:[],warning:[],info:[],hint:[]},u={error:1,security:2,warning:3,info:4,hint:5},_=c+1;_<=w.end.row;_++)if(v.$annotations[_])for(var p=0;p5?m=null:W-m>=200&&(r.renderer.scrollCursorIntoView(),m=null):(r.moveCursorToPosition(B),m=W,g={x:b,y:f})})(u=r.renderer.screenToTextCoordinates(b,f),B),function S(B,P){var W=Date.now(),z=r.renderer.layerConfig.lineHeight,G=r.renderer.layerConfig.characterWidth,Y=r.renderer.scroller.getBoundingClientRect(),V={x:{left:b-Y.left,right:Y.right-b},y:{top:f-Y.top,bottom:Y.bottom-f}},j=Math.min(V.x.left,V.x.right),Z=Math.min(V.y.top,V.y.bottom),Q={row:B.row,column:B.column};j/G<=2&&(Q.column+=V.x.left=200&&r.renderer.scrollCursorIntoView(Q):E=W:E=null}(u,B)}function L(){d=r.selection.toOrientedRange(),v=r.session.addMarker(d,"ace_selection",r.getSelectionStyle()),r.clearSelection(),r.isFocused()&&r.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),F(),w=setInterval(F,20),A=0,$.addListener(document,"mousemove",O)}function D(){clearInterval(w),r.session.removeMarker(v),v=null,r.selection.fromOrientedRange(d),r.isFocused()&&!p&&r.$resetCursorStyle(),d=null,u=null,A=0,E=null,m=null,$.removeListener(document,"mousemove",O)}this.onDragStart=function(B){if(this.cancelDrag||!h.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(B)},0),B.preventDefault()}d=r.getSelectionRange();var W=B.dataTransfer;W.effectAllowed=r.getReadOnly()?"copy":"copyMove",r.container.appendChild(o),W.setDragImage&&W.setDragImage(o,0,0),setTimeout(function(){r.container.removeChild(o)}),W.clearData(),W.setData("Text",r.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(B){h.draggable=!1,p=!1,this.setState(null),r.getReadOnly()||(!_&&"move"==B.dataTransfer.dropEffect&&r.session.remove(r.getSelectionRange()),r.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(B){if(!r.getReadOnly()&&T(B.dataTransfer))return b=B.clientX,f=B.clientY,v||L(),A++,B.dataTransfer.dropEffect=_=U(B),$.preventDefault(B)},this.onDragOver=function(B){if(!r.getReadOnly()&&T(B.dataTransfer))return b=B.clientX,f=B.clientY,v||(L(),A++),null!==R&&(R=null),B.dataTransfer.dropEffect=_=U(B),$.preventDefault(B)},this.onDragLeave=function(B){if(--A<=0&&v)return D(),_=null,$.preventDefault(B)},this.onDrop=function(B){if(u){var P=B.dataTransfer;if(p)switch(_){case"move":d=d.contains(u.row,u.column)?{start:u,end:u}:r.moveText(d,u);break;case"copy":d=r.moveText(d,u,!0)}else{var W=P.getData("Text");d={start:u,end:r.session.insert(u,W)},r.focus(),_=null}return D(),$.preventDefault(B)}},$.addListener(h,"dragstart",this.onDragStart.bind(i),r),$.addListener(h,"dragend",this.onDragEnd.bind(i),r),$.addListener(h,"dragenter",this.onDragEnter.bind(i),r),$.addListener(h,"dragover",this.onDragOver.bind(i),r),$.addListener(h,"dragleave",this.onDragLeave.bind(i),r),$.addListener(h,"drop",this.onDrop.bind(i),r);var R=null;function O(){null==R&&(R=setTimeout(function(){null!=R&&v&&D()},20))}function T(B){var P=B.types;return!P||Array.prototype.some.call(P,function(W){return"text/plain"==W||"Text"==W})}function U(B){var P=["copy","copymove","all","uninitialized"],z=y.isMac?B.altKey:B.ctrlKey,G="uninitialized";try{G=B.dataTransfer.effectAllowed.toLowerCase()}catch{}var Y="none";return z&&P.indexOf(G)>=0?Y="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(G)>=0?Y="move":P.indexOf(G)>=0&&(Y="copy"),Y}}function n(i,r,o,c){return Math.sqrt(Math.pow(o-i,2)+Math.pow(c-r,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor;i.container.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging"),i.renderer.setCursorStyle(y.isWin?"default":"move"),this.setState("dragReady")},this.onMouseDrag=function(i){var r=this.editor.container;y.isIE&&"dragReady"==this.state&&n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&r.dragDrop(),"dragWait"===this.state&&n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var r=this.editor,o=i.inSelection(),c=i.getButton();if(1===(i.domEvent.detail||1)&&0===c&&o){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=i.domEvent.target||i.domEvent.srcElement;"unselectable"in v&&(v.unselectable="on"),r.getDragDelay()?(y.isWebKit&&(this.cancelDrag=!0,r.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(e.prototype),x.DragdropHandler=e}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(s,x,K){"use strict";var k=s("./mouse_event").MouseEvent,$=s("../lib/event"),y=s("../lib/dom");x.addTouchListeners=function(l,a){var e,n,i,r,o,c,v,d,u,t="scroll",h=0,b=0,f=0,w=0;function _(){if(a.getOption("enableMobileMenu")){u||function A(){var C=window.navigator&&window.navigator.clipboard,S=!1,L=function(R){return a.commands.canExecute(R,a)},D=function(R){var O=R.target.getAttribute("action");if("more"==O||!S)return S=!S,function(){var R=a.getCopyText(),O=a.session.getUndoManager().hasUndo();u.replaceChild(y.buildDom(S?["span",!R&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],O&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),u.firstChild)}();"paste"==O?C.readText().then(function(T){a.execCommand(O,T)}):O&&(("cut"==O||"copy"==O)&&(C?C.writeText(a.getCopyText()):document.execCommand("copy")),a.execCommand(O)),u.firstChild.style.display="none",S=!1,"openCommandPalette"!=O&&a.focus()};u=y.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){t="menu",R.stopPropagation(),R.preventDefault(),a.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),D(R)},onclick:D},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],a.container)}();var C=a.selection.cursor,S=a.renderer.textToScreenCoordinates(C.row,C.column),F=a.renderer.textToScreenCoordinates(0,0).pageX,L=a.renderer.scrollLeft,D=a.container.getBoundingClientRect();u.style.top=S.pageY-D.top-3+"px",S.pageX-D.left1)return clearTimeout(o),o=null,i=-1,void(t="zoom");d=a.$mouseHandler.isMousePressed=!0;var F=a.renderer.layerConfig.lineHeight,L=a.renderer.layerConfig.lineHeight,D=C.timeStamp;r=D;var R=S[0],O=R.clientX,T=R.clientY;Math.abs(e-O)+Math.abs(n-T)>F&&(i=-1),e=C.clientX=O,n=C.clientY=T,f=w=0;var U=new k(C,a);if(v=U.getDocumentPosition(),D-i<500&&1==S.length&&!h)b++,C.preventDefault(),C.button=0,function m(){o=null,clearTimeout(o),a.selection.moveToPosition(v);var C=b>=2?a.selection.getLineRange(v.row):a.session.getBracketRange(v);C&&!C.isEmpty()?a.selection.setRange(C):a.selection.selectWord(),t="wait"}();else{b=0;var B=a.selection.cursor,P=a.selection.isEmpty()?B:a.selection.anchor,W=a.renderer.$cursorLayer.getPixelPosition(B,!0),z=a.renderer.$cursorLayer.getPixelPosition(P,!0),G=a.renderer.scroller.getBoundingClientRect(),Y=a.renderer.layerConfig.offset,V=a.renderer.scrollLeft,j=function(ne,re){return(ne/=L)*ne+(re=re/F-.75)*re};if(C.clientXQ?"cursor":"anchor"),t=Q<3.5?"anchor":Z<3.5?"cursor":"scroll",o=setTimeout(E,450)}i=D},a),$.addListener(l,"touchend",function(C){d=a.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),"zoom"==t?(t="",h=0):o?(a.selection.moveToPosition(v),h=0,_()):"scroll"==t?(function g(){h+=60,c=setInterval(function(){h--<=0&&(clearInterval(c),c=null),Math.abs(f)<.01&&(f=0),Math.abs(w)<.01&&(w=0),h<20&&(f*=.9),h<20&&(w*=.9);var C=a.session.getScrollTop();a.renderer.scrollBy(10*f,10*w),C==a.session.getScrollTop()&&(h=0)},10)}(),p()):_(),clearTimeout(o),o=null},a),$.addListener(l,"touchmove",function(C){o&&(clearTimeout(o),o=null);var S=C.touches;if(!(S.length>1||"zoom"==t)){var F=S[0],L=e-F.clientX,D=n-F.clientY;if("wait"==t){if(!(L*L+D*D>4))return C.preventDefault();t="cursor"}e=F.clientX,n=F.clientY,C.clientX=F.clientX,C.clientY=F.clientY;var R=C.timeStamp,O=R-r;if(r=R,"scroll"==t){var T=new k(C,a);T.speed=1,T.wheelX=L,T.wheelY=D,10*Math.abs(L)=V){for(re=ne+1;re=V;)re++;for(X=ne,J=re-1;X=j.length||2!=(re=Z[Q-1])&&3!=re||2!=(X=j[Q+1])&&3!=X?4:(a&&(X=3),X==re?X:4);case 10:return 2==(re=Q>0?Z[Q-1]:5)&&Q+10&&2==Z[Q-1])return 2;if(a)return 4;for(ie=Q+1,J=j.length;ie=1425&&pe<=2303||64286==pe)&&(1==re||7==re))return 1}return Q<1||5==(re=j[Q-1])?4:Z[Q-1];case 5:return a=!1,e=!0,y;case 6:return n=!0,4;case 13:case 14:case 16:case 17:case 15:a=!1;case T:return 4}}function G(V){var j=V.charCodeAt(0),Z=j>>8;return 0==Z?j>191?0:U[j]:5==Z?/[\u0591-\u05f4]/.test(V)?1:0:6==Z?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(V)?12:/[\u0660-\u0669\u066b-\u066c]/.test(V)?3:1642==j?C:/[\u06f0-\u06f9]/.test(V)?2:7:32==Z&&j<=8287?B[255&j]:254==Z&&j>=65136?7:4}x.L=0,x.R=1,x.EN=2,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.RLE=7,x.DOT="\xb7",x.doBidiReorder=function(V,j,Z){if(V.length<2)return{};var Q=V.split(""),ne=new Array(Q.length),re=new Array(Q.length),X=[];y=Z?1:0,function P(V,j,Z,Q){var ne=y?c:o,re=null,X=null,J=null,ie=0,pe=null,de=-1,le=null,ue=null,_e=[];if(!Q)for(le=0,Q=[];le0)if(16==pe){for(le=de;le-1){for(le=de;le=0&&8==Q[$e];$e--)j[$e]=y}}(Q,X,Q.length,j);for(var J=0;J7&&j[J]<13||4===j[J]||j[J]===T)?X[J]=x.ON_R:J>0&&"\u0644"===Q[J-1]&&/\u0622|\u0623|\u0625|\u0627/.test(Q[J])&&(X[J-1]=X[J]=x.R_H,J++);for(Q[Q.length-1]===x.DOT&&(X[Q.length-1]=x.B),"\u202b"===Q[0]&&(X[0]=x.RLE),J=0;J=0&&(t=this.session.$docRowCache[n])}return t},a.prototype.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length)for(var n,i=this.session.$getRowCacheIndex(e,this.currentRow);this.currentRow-t>0&&(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1))===i;)i=n,t++;else t=this.currentRow;return t},a.prototype.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var i=t===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[t];r&&(void 0===e&&(e=this.getSplitIndex()),e>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[k.L],this.line=ee?this.session.getOverwrite()?t:t-1:e,i=k.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&t<=e&&r[i]%2!=0&&i++;for(var c=0;ce&&r[i]%2==0&&(o+=this.charWidths[r[i]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},a.prototype.getSelections=function(t,e){var r,n=this.bidiMap,i=n.bidiLevels,o=[],c=0,h=Math.min(t,e)-this.wrapIndent,v=Math.max(t,e)-this.wrapIndent,b=!1,f=!1,w=0;this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,u=0;u=h&&di+c/2;){if(i+=c,r===o.length-1){c=0;break}c=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!=0&&o[r]%2==0?(n0&&o[r-1]%2==0&&o[r]%2!=0?e=1+(n>i?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===c&&o[r-1]%2==0||!this.isRtlDir&&0===r&&o[r]%2!=0?e=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!=0&&0!==c&&r--,e=this.bidiMap.logicalFromVisual[r]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent},a}();x.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(s,x,K){"use strict";var k=s("./lib/oop"),$=s("./lib/lang"),y=s("./lib/event_emitter").EventEmitter,l=s("./range").Range,a=function(){function t(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(i){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return t.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},t.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},t.prototype.getCursor=function(){return this.lead.getPosition()},t.prototype.setAnchor=function(e,n){this.$isEmpty=!1,this.anchor.setPosition(e,n)},t.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},t.prototype.getSelectionLead=function(){return this.lead.getPosition()},t.prototype.isBackwards=function(){var e=this.anchor,n=this.lead;return e.row>n.row||e.row==n.row&&e.column>n.column},t.prototype.getRange=function(){var e=this.anchor,n=this.lead;return this.$isEmpty?l.fromPoints(n,n):this.isBackwards()?l.fromPoints(n,e):l.fromPoints(e,n)},t.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},t.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype.setRange=function(e,n){var i=n?e.end:e.start,r=n?e.start:e.end;this.$setSelection(i.row,i.column,r.row,r.column)},t.prototype.$setSelection=function(e,n,i,r){if(!this.$silent){var o=this.$isEmpty,c=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,n),this.cursor.setPosition(i,r),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||c)&&this._emit("changeSelection")}},t.prototype.$moveSelection=function(e){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),e.call(this)},t.prototype.selectTo=function(e,n){this.$moveSelection(function(){this.moveCursorTo(e,n)})},t.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},t.prototype.moveTo=function(e,n){this.clearSelection(),this.moveCursorTo(e,n)},t.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},t.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},t.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},t.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},t.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},t.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},t.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},t.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},t.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},t.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},t.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},t.prototype.getWordRange=function(e,n){if(typeof n>"u"){var i=e||this.lead;e=i.row,n=i.column}return this.session.getWordRange(e,n)},t.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},t.prototype.selectAWord=function(){var e=this.getCursor(),n=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(n)},t.prototype.getLineRange=function(e,n){var r,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,r=o.end.row):r=i,!0===n?new l(i,0,r,this.session.getLine(r).length):new l(i,0,r+1,0)},t.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},t.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},t.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},t.prototype.wouldMoveIntoSoftTab=function(e,n,i){var r=e.column,o=e.column+n;return i<0&&(r=e.column-n,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,o).split(" ").length-1==n},t.prototype.moveCursorLeft=function(){var n,e=this.lead.getPosition();if(n=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},t.prototype.moveCursorRight=function(){var n,e=this.lead.getPosition();if(n=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(n.column=r)}}this.moveCursorTo(n.row,n.column)},t.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,n=this.doc.getLine(e).length;this.moveCursorTo(e,n)},t.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},t.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,n=this.lead.column,i=this.doc.getLine(e),r=i.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,n,1);if(!o)return this.session.nonTokenRe.exec(r)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=i.substring(n)),n>=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)}},t.prototype.$shortWordEndIndex=function(e){var i,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(i=e[n])&&r.test(i);)n++;if(n<1)for(o.lastIndex=0;(i=e[n])&&!o.test(i);)if(o.lastIndex=0,n++,r.test(i)){if(n>2){n--;break}for(;(i=e[n])&&r.test(i);)n++;if(n>2)break}}return o.lastIndex=0,n},t.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,n=this.lead.column,i=this.doc.getLine(e),r=i.substring(n),o=this.session.getFoldAt(e,n,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(n==i.length){var c=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=$.stringReverse(r),c=this.$shortWordEndIndex(o);return this.moveCursorTo(e,n-c)},t.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},t.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},t.prototype.moveCursorBy=function(e,n){var r,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===n&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var c=this.session.screenToDocumentPosition(i.row+e,i.column,r);this.moveCursorTo(c.row,c.column+n,0===n)},t.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},t.prototype.moveCursorTo=function(e,n,i){var r=this.session.getFoldAt(e,n,1);r&&(e=r.start.row,n=r.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(n))&&o.charAt(n-1)&&(this.lead.row==e&&this.lead.column==n+1?n-=1:n+=1),this.lead.setPosition(e,n),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},t.prototype.moveCursorToScreen=function(e,n,i){var r=this.session.screenToDocumentPosition(e,n);this.moveCursorTo(r.row,r.column,i)},t.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},t.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},t.prototype.toOrientedRange=function(e){var n=this.getRange();return e?(e.start.column=n.start.column,e.start.row=n.start.row,e.end.column=n.end.column,e.end.row=n.end.row):e=n,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},t.prototype.getRangeOfMovements=function(e){var n=this.getCursor();try{e(this);var i=this.getCursor();return l.fromPoints(n,i)}catch{return l.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},t.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(n){var i=n.clone();return i.isBackwards=n.cursor==n.start,i});else(e=this.getRange()).isBackwards=this.isBackwards();return e},t.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var n=e.length;n--;){var i=l.fromPoints(e[n].start,e[n].end);e[n].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},t.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(e[n]))return!1;return!0},t}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,k.implement(a.prototype,y),x.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(s,x,K){"use strict";var k=s("./lib/report_error").reportError,$=2e3,y=function(){function l(a){for(var t in this.states=a,this.regExps={},this.matchMappings={},this.states){for(var e=this.states[t],n=[],i=0,r=this.matchMappings[t]={defaultToken:"text"},o="g",c=[],h=0;h1?this.$applyToken:v.token),f>1&&(/\\\d/.test(v.regex)?b=v.regex.replace(/\\([0-9]+)/g,function(w,d){return"\\"+(parseInt(d,10)+i+1)}):(f=1,b=this.removeCapturingGroups(v.regex)),!v.splitRegex&&"string"!=typeof v.token&&c.push(v)),r[i]=h,i+=f,n.push(b),v.onMatch||(v.onMatch=null)}}n.length||(r[0]=0,n.push("$")),c.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,o)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",o)}}return l.prototype.$setMaxTokenCount=function(a){$=0|a},l.prototype.$applyToken=function(a){var t=this.splitRegex.exec(a).slice(1),e=this.token.apply(this,t);if("string"==typeof e)return[{type:e,value:a}];for(var n=[],i=0,r=e.length;iv){var _=a.substring(v,A-u.length);f.type==w?f.value+=_:(f.type&&h.push(f),f={type:w,value:_})}for(var p=0;p$){for(b>2*a.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:a});v1&&e[0]!==n&&e.unshift("#tmp",n),{tokens:h,state:e.length?e:n}},l}();y.prototype.reportError=k,x.Tokenizer=y}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(s,x,K){"use strict";var $,k=s("../lib/deep_copy").deepCopy;(function(){this.addRules=function(a,t){if(t)for(var e in a){for(var n=a[e],i=0;i=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},y.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},y.prototype.getCurrentTokenRow=function(){return this.$row},y.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,a=this.$tokenIndex,t=l[a].start;if(void 0!==t)return t;for(t=0;a>0;)t+=l[a-=1].value.length;return t},y.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},y.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],a=this.getCurrentTokenColumn();return new k(this.$row,a,this.$row,a+l.value.length)},y}();x.TokenIterator=$}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(s,x,K){"use strict";var e,c,k=s("../../lib/oop"),$=s("../behaviour").Behaviour,y=s("../../token_iterator").TokenIterator,l=s("../../lib/lang"),a=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],n={},i={'"':'"',"'":"'"},r=function(h){var v=-1;if(h.multiSelect&&(v=h.selection.index,n.rangeCount!=h.multiSelect.rangeCount&&(n={rangeCount:h.multiSelect.rangeCount})),n[v])return e=n[v];e=n[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(h,v,b,f){var w=h.end.row-h.start.row;return{text:b+v+f,selection:[0,h.start.column+1,w,h.end.column+(w?0:1)]}};(c=function(h){h=h||{},this.add("braces","insertion",function(v,b,f,w,d){var u=f.getCursorPosition(),A=w.doc.getLine(u.row);if("{"==d){r(f);var _=f.getSelectionRange(),p=w.doc.getTextRange(_),E=w.getTokenAt(u.row,u.column);if(""!==p&&"{"!==p&&f.getWrapBehavioursEnabled())return o(_,p,"{","}");if(E&&/(?:string)\.quasi|\.xml/.test(E.type))return[/tag\-(?:open|name)/,/attribute\-name/].some(function(R){return R.test(E.type)})||/(string)\.quasi/.test(E.type)&&"$"!==E.value[u.column-E.start-1]?void 0:(c.recordAutoInsert(f,w,"}"),{text:"{}",selection:[1,1]});if(c.isSaneInsertion(f,w))return/[\]\}\)]/.test(A[u.column])||f.inMultiSelectMode||h.braces?(c.recordAutoInsert(f,w,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(f,w,"{"),{text:"{",selection:[1,1]})}else if("}"==d){if(r(f),"}"==A.substring(u.column,u.column+1)&&null!==w.$findOpeningBracket("}",{column:u.column+1,row:u.row})&&c.isAutoInsertedClosing(u,A,d))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==d||"\r\n"==d){r(f);var S="";if(c.isMaybeInsertedClosing(u,A)&&(S=l.stringRepeat("}",e.maybeInsertedBrackets),c.clearMaybeInsertedClosing()),"}"===A.substring(u.column,u.column+1)){var F=w.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!F)return null;var L=this.$getIndent(w.getLine(F.row))}else{if(!S)return void c.clearMaybeInsertedClosing();L=this.$getIndent(A)}var D=L+w.getTabString();return{text:"\n"+D+"\n"+L+S,selection:[1,D.length,1,D.length]}}c.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&"{"==u){if(r(f),"}"==w.doc.getLine(d.start.row).substring(d.end.column,d.end.column+1))return d.end.column++,d;e.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,b,f,w,d){if("("==d){r(f);var u=f.getSelectionRange(),A=w.doc.getTextRange(u);if(""!==A&&f.getWrapBehavioursEnabled())return o(u,A,"(",")");if(c.isSaneInsertion(f,w))return c.recordAutoInsert(f,w,")"),{text:"()",selection:[1,1]}}else if(")"==d){r(f);var _=f.getCursorPosition(),p=w.doc.getLine(_.row);if(")"==p.substring(_.column,_.column+1)&&null!==w.$findOpeningBracket(")",{column:_.column+1,row:_.row})&&c.isAutoInsertedClosing(_,p,d))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&"("==u&&(r(f),")"==w.doc.getLine(d.start.row).substring(d.start.column+1,d.start.column+2)))return d.end.column++,d}),this.add("brackets","insertion",function(v,b,f,w,d){if("["==d){r(f);var u=f.getSelectionRange(),A=w.doc.getTextRange(u);if(""!==A&&f.getWrapBehavioursEnabled())return o(u,A,"[","]");if(c.isSaneInsertion(f,w))return c.recordAutoInsert(f,w,"]"),{text:"[]",selection:[1,1]}}else if("]"==d){r(f);var _=f.getCursorPosition(),p=w.doc.getLine(_.row);if("]"==p.substring(_.column,_.column+1)&&null!==w.$findOpeningBracket("]",{column:_.column+1,row:_.row})&&c.isAutoInsertedClosing(_,p,d))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&"["==u&&(r(f),"]"==w.doc.getLine(d.start.row).substring(d.start.column+1,d.start.column+2)))return d.end.column++,d}),this.add("string_dquotes","insertion",function(v,b,f,w,d){var u=w.$mode.$quotes||i;if(1==d.length&&u[d]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(d))return;r(f);var A=d,_=f.getSelectionRange(),p=w.doc.getTextRange(_);if(""!==p&&(1!=p.length||!u[p])&&f.getWrapBehavioursEnabled())return o(_,p,A,A);if(!p){var E=f.getCursorPosition(),m=w.doc.getLine(E.row),g=m.substring(E.column-1,E.column),C=m.substring(E.column,E.column+1),S=w.getTokenAt(E.row,E.column),F=w.getTokenAt(E.row,E.column+1);if("\\"==g&&S&&/escape/.test(S.type))return null;var R,L=S&&/string|escape/.test(S.type),D=!F||/string|escape/.test(F.type);if(C==A)(R=L!==D)&&/string\.end/.test(F.type)&&(R=!1);else{if(L&&!D||L&&D)return null;var O=w.$mode.tokenRe;O.lastIndex=0;var T=O.test(g);O.lastIndex=0;var U=O.test(C),B=w.$mode.$pairQuotesAfter;if(!(B&&B[A]&&B[A].test(g))&&T||U||C&&!/[\s;,.})\]\\]/.test(C))return null;var W=m[E.column-2];if(g==A&&(W==A||O.test(W)))return null;R=!0}return{text:R?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,b,f,w,d){var u=w.$mode.$quotes||i,A=w.doc.getTextRange(d);if(!d.isMultiLine()&&u.hasOwnProperty(A)&&(r(f),w.doc.getLine(d.start.row).substring(d.start.column+1,d.start.column+2)==A))return d.end.column++,d}),!1!==h.closeDocComment&&this.add("doc comment end","insertion",function(v,b,f,w,d){if("doc-start"===v&&("\n"===d||"\r\n"===d)&&f.selection.isEmpty()){var u=f.getCursorPosition();if(0===u.column)return;for(var A=w.doc.getLine(u.row),_=w.doc.getLine(u.row+1),p=w.getTokens(u.row),E=0,m=0;m=u.column){if(E===u.column){if(!/\.doc/.test(g.type))return;if(/\*\//.test(g.value)){var C=p[m+1];if(!C||!/\.doc/.test(C.type))return}}var S=u.column-(E-g.value.length),F=g.value.indexOf("*/"),L=g.value.indexOf("/**",F>-1?F+2:0);if(-1!==L&&S>L&&S=F&&S<=L||!/\.doc/.test(g.type))return;break}}var D=this.$getIndent(A);if(/\s*\*/.test(_))return/^\s*\*/.test(A)?{text:d+D+"* ",selection:[1,2+D.length,1,2+D.length]}:{text:d+D+" * ",selection:[1,3+D.length,1,3+D.length]};if(/\/\*\*/.test(A.substring(0,u.column)))return{text:d+D+" * "+d+" "+D+"*/",selection:[1,4+D.length,1,4+D.length]}}})}).isSaneInsertion=function(h,v){var b=h.getCursorPosition(),f=new y(v,b.row,b.column);if(!this.$matchTokenType(f.getCurrentToken()||"text",a)){if(/[)}\]]/.test(h.session.getLine(b.row)[b.column]))return!0;var w=new y(v,b.row,b.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",a))return!1}return f.stepForward(),f.getCurrentTokenRow()!==b.row||this.$matchTokenType(f.getCurrentToken()||"text",t)},c.$matchTokenType=function(h,v){return v.indexOf(h.type||h)>-1},c.recordAutoInsert=function(h,v,b){var f=h.getCursorPosition(),w=v.doc.getLine(f.row);this.isAutoInsertedClosing(f,w,e.autoInsertedLineEnd[0])||(e.autoInsertedBrackets=0),e.autoInsertedRow=f.row,e.autoInsertedLineEnd=b+w.substr(f.column),e.autoInsertedBrackets++},c.recordMaybeInsert=function(h,v,b){var f=h.getCursorPosition(),w=v.doc.getLine(f.row);this.isMaybeInsertedClosing(f,w)||(e.maybeInsertedBrackets=0),e.maybeInsertedRow=f.row,e.maybeInsertedLineStart=w.substr(0,f.column)+b,e.maybeInsertedLineEnd=w.substr(f.column),e.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(h,v,b){return e.autoInsertedBrackets>0&&h.row===e.autoInsertedRow&&b===e.autoInsertedLineEnd[0]&&v.substr(h.column)===e.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(h,v){return e.maybeInsertedBrackets>0&&h.row===e.maybeInsertedRow&&v.substr(h.column)===e.maybeInsertedLineEnd&&v.substr(0,h.column)==e.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){e.autoInsertedLineEnd=e.autoInsertedLineEnd.substr(1),e.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){e&&(e.maybeInsertedBrackets=0,e.maybeInsertedRow=-1)},k.inherits(c,$),x.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(s,x,K){"use strict";for(var k=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],$=0,y=[],l=0;l2?W%d!=d-1:W%d==0}}else{if(!this.blockComment)return!1;A=this.blockComment.start;var _=this.blockComment.end,E=(p=new RegExp("^(\\s*)(?:"+t.escapeRegExp(A)+")"),new RegExp("(?:"+t.escapeRegExp(_)+")\\s*$"));m=function(R,O){C(R,O)||(!b||/\S/.test(R))&&(v.insertInLine({row:O,column:R.length},_),v.insertInLine({row:O,column:w},A))},g=function(R,O){var T;(T=R.match(E))&&v.removeInLine(O,R.length-T[0].length,R.length),(T=R.match(p))&&v.removeInLine(O,T[1].length,T[0].length)},C=function(R,O){if(p.test(R))return!0;for(var T=o.getTokens(O),U=0;UR.length&&(D=R.length)}),w==1/0&&(w=D,b=!1,f=!1),u&&w%d!=0&&(w=Math.floor(w/d)*d),L(f?g:m)},this.toggleBlockComment=function(r,o,c,h){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var u,A,f=(b=new e(o,h.row,h.column)).getCurrentToken(),d=o.selection.toOrientedRange();if(f&&/comment/.test(f.type)){for(var _,p;f&&/comment/.test(f.type);){if(-1!=(E=f.value.indexOf(v.start))){var m=b.getCurrentTokenRow(),g=b.getCurrentTokenColumn()+E;_=new n(m,g,m,g+v.start.length);break}f=b.stepBackward()}var b;for(f=(b=new e(o,h.row,h.column)).getCurrentToken();f&&/comment/.test(f.type);){var E;if(-1!=(E=f.value.indexOf(v.end))){m=b.getCurrentTokenRow(),g=b.getCurrentTokenColumn()+E,p=new n(m,g,m,g+v.end.length);break}f=b.stepForward()}p&&o.remove(p),_&&(o.remove(_),u=_.start.row,A=-v.start.length)}else A=v.start.length,u=c.start.row,o.insert(c.end,v.end),o.insert(c.start,v.start);d.start.row==u&&(d.start.column+=A),d.end.row==u&&(d.end.column+=A),o.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(r,o,c){return this.$getIndent(o)},this.checkOutdent=function(r,o,c){return!1},this.autoOutdent=function(r,o,c){},this.$getIndent=function(r){return r.match(/^\s*/)[0]},this.createWorker=function(r){return null},this.createModeDelegates=function(r){for(var o in this.$embeds=[],this.$modes={},r)if(r[o]){var c=r[o],h=c.prototype.$id,v=k.$modes[h];v||(k.$modes[h]=v=new c),k.$modes[o]||(k.$modes[o]=v),this.$embeds.push(o),this.$modes[o]=v}var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],f=function(d){var u,A,_;_=(u=w)[A=b[d]],u[b[d]]=function(){return this.$delegator(A,arguments,_)}},w=this;for(o=0;oa[t].column&&t++,i.unshift(t,0),a.splice.apply(a,i),this.$updateRows()}}},y.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var a=!0;l.forEach(function(t,e){if(t)for(a=!1,t.row=e;t.$oldWidget;)t.$oldWidget.row=e,t=t.$oldWidget}),a&&(this.session.lineWidgets=null)}},y.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var a=this.session.lineWidgets[l.row];return a&&(l.$oldWidget=a,a.el&&a.el.parentNode&&(a.el.parentNode.removeChild(a.el),a._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},y.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var a=this.editor.renderer;l.html&&!l.el&&(l.el=k.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=k.createElement("div"),l.el.textContent=l.text),l.el&&(k.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&k.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",a.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),null==l.pixelHeight&&(l.pixelHeight=l.el.offsetHeight)),null==l.rowCount&&(l.rowCount=l.pixelHeight/a.layerConfig.lineHeight);var t=this.session.getFoldAt(l.row,0);if(l.$fold=t,t){var e=this.session.lineWidgets;l.row!=t.end.row||e[t.start.row]?l.hidden=!0:e[t.start.row]=l}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,a),this.onWidgetChanged(l),l},y.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var a=this.session.lineWidgets[l.row];if(a==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;a;){if(a.$oldWidget==l){a.$oldWidget=l.$oldWidget;break}a=a.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},y.prototype.getWidgetsAtRow=function(l){for(var a=this.session.lineWidgets,t=a&&a[l],e=[];t;)e.push(t),t=t.$oldWidget;return e},y.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},y.prototype.measureWidgets=function(l,a){var t=this.session._changedWidgets,e=a.layerConfig;if(t&&t.length){for(var n=1/0,i=0;i0&&!e[n];)n--;this.firstRow=t.firstRow,this.lastRow=t.lastRow,a.$cursorLayer.config=t;for(var r=n;r<=i;r++){var o=e[r];if(o&&o.el){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,a.container.appendChild(o.el));var c=a.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;o.coverLine||(c+=t.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=c-t.offset+"px";var h=o.coverGutter?0:a.gutterWidth;o.fixedWidth||(h-=a.scrollLeft),o.el.style.left=h+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=t.width+2*t.padding+"px"),o.el.style.right=o.fixedWidth?a.scrollBar.getWidth()+"px":""}}}},y}();x.LineWidgets=$}),ace.define("ace/apply_delta",["require","exports","module"],function(s,x,K){"use strict";x.applyDelta=function(l,a,t){var e=a.start.row,n=a.start.column,i=l[e]||"";switch(a.action){case"insert":if(1===a.lines.length)l[e]=i.substring(0,n)+a.lines[0]+i.substring(n);else{var o=[e,1].concat(a.lines);l.splice.apply(l,o),l[e]=i.substring(0,n)+l[e],l[e+a.lines.length-1]+=i.substring(n)}break;case"remove":var c=a.end.column,h=a.end.row;e===h?l[e]=i.substring(0,n)+i.substring(c):l.splice(e,h-e+1,i.substring(0,n)+l[h].substring(c))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("./lib/oop"),$=s("./lib/event_emitter").EventEmitter,y=function(){function t(e,n,i){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof n?this.setPosition(n.row,n.column):this.setPosition(n,i)}return t.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},t.prototype.getDocument=function(){return this.document},t.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var n=function a(t,e,n){var i="insert"==t.action,r=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),c=t.start,h=i?c:t.end;return l(e,c,n)?{row:e.row,column:e.column}:l(h,e,!n)?{row:e.row+r,column:e.column+(e.row==h.row?o:0)}:{row:c.row,column:c.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},t.prototype.setPosition=function(e,n,i){var r;if(r=i?{row:e,column:n}:this.$clipPositionToDocument(e,n),this.row!=r.row||this.column!=r.column){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(e,n){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,n))),n<0&&(i.column=0),i},t}();function l(t,e,n){return t.row=r&&(n=r-1,i=void 0);var o=this.getLine(n);return null==i&&(i=o.length),{row:n,column:i=Math.min(Math.max(i,0),o.length)}},e.prototype.clonePos=function(n){return{row:n.row,column:n.column}},e.prototype.pos=function(n,i){return{row:n,column:i}},e.prototype.$clipPosition=function(n){var i=this.getLength();return n.row>=i?(n.row=Math.max(0,i-1),n.column=this.getLine(i-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},e.prototype.insertFullLines=function(n,i){var r=0;(n=Math.min(Math.max(n,0),this.getLength()))0,o=i=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(n,i){return n instanceof l||(n=l.fromPoints(n.start,n.end)),0===i.length&&n.isEmpty()?n.start:i==this.getTextRange(n)?n.end:(this.remove(n),i?this.insert(n.start,i):n.start)},e.prototype.applyDeltas=function(n){for(var i=0;i=0;i--)this.revertDelta(n[i])},e.prototype.applyDelta=function(n,i){var r="insert"==n.action;(r?n.lines.length<=1&&!n.lines[0]:!l.comparePoints(n.start,n.end))||(r&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):($(this.$lines,n,i),this._signal("change",n)))},e.prototype.$safeApplyDelta=function(n){var i=this.$lines.length;("remove"==n.action&&n.start.row20){e.running=setTimeout(e.$worker,20);break}}e.currentLine=i,-1==r&&(r=i),c<=r&&e.fireUpdateEvent(c,r)}}}return l.prototype.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(a,t){this._signal("update",{data:{first:a,last:t}})},l.prototype.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(a){var t=a.start.row,e=a.end.row-t;if(0===e)this.lines[t]=null;else if("remove"==a.action)this.lines.splice(t,e+1,null),this.states.splice(t,e+1,null);else{var n=Array(e+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},l.prototype.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},l.prototype.$tokenizeRow=function(a){var t=this.doc.getLine(a),n=this.tokenizer.getLineTokens(t,this.states[a-1],a);return this.states[a]+""!=n.state+""?(this.states[a]=n.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=n.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();k.implement(y.prototype,$),x.BackgroundTokenizer=y}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(s,x,K){"use strict";var k=s("./lib/lang"),$=s("./range").Range,y=function(){function l(a,t,e){void 0===e&&(e="text"),this.setRegexp(a),this.clazz=t,this.type=e}return l.prototype.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},l.prototype.update=function(a,t,e,n){if(this.regExp)for(var r=n.lastRow,o={},c=n.firstRow;c<=r;c++){var h=this.cache[c];null==h&&((h=k.getMatchOffsets(e.getLine(c),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(w){return new $(c,w.offset,c,w.offset+w.length)}),this.cache[c]=h.length?h:"");for(var v=h.length;v--;){var b=h[v].toScreenRange(e),f=b.toString();o[f]||(o[f]=!0,t.drawSingleLineMarker(a,b,this.clazz,n))}}},l}();y.prototype.MAX_RANGES=500,x.SearchHighlight=y}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(s,x,K){"use strict";var k=function(){function u(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return u.prototype.addSession=function(A){this.$session=A},u.prototype.add=function(A,_,p){if(!this.$fromUndo&&A!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===_||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),A.id=this.$rev=++this.$maxRev}("remove"==A.action||"insert"==A.action)&&(this.$lastDelta=A),this.lastDeltas.push(A)}},u.prototype.addSelection=function(A,_){this.selections.push({value:A,rev:_||this.$rev})},u.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},u.prototype.markIgnored=function(A,_){null==_&&(_=this.$rev+1);for(var p=this.$undoStack,E=p.length;E--;){var m=p[E][0];if(m.id<=A)break;m.id<_&&(m.ignore=!0)}this.lastDeltas=null},u.prototype.getSelection=function(A,_){for(var p=this.selections,E=p.length;E--;){var m=p[E];if(m.rev0},u.prototype.canRedo=function(){return this.$redoStack.length>0},u.prototype.bookmark=function(A){null==A&&(A=this.$rev),this.mark=A},u.prototype.isAtBookmark=function(){return this.$rev===this.mark},u.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},u.prototype.fromJSON=function(A){this.reset(),this.$undoStack=A.$undoStack,this.$redoStack=A.$redoStack},u.prototype.$prettyPrint=function(A){return A?i(A):i(this.$undoStack)+"\n---\n"+i(this.$redoStack)},u}();k.prototype.hasUndo=k.prototype.canUndo,k.prototype.hasRedo=k.prototype.canRedo,k.prototype.isClean=k.prototype.isAtBookmark,k.prototype.markClean=k.prototype.bookmark;var y=s("./range").Range,l=y.comparePoints;function e(u){return{row:u.row,column:u.column}}function i(u){if(u=u||this,Array.isArray(u))return u.map(i).join("\n");var A="";return u.action?(A="insert"==u.action?"+":"-",A+="["+u.lines+"]"):u.value&&(A=Array.isArray(u.value)?u.value.map(r).join("\n"):r(u.value)),u.start&&(A+=r(u)),(u.id||u.rev)&&(A+="\t("+(u.id||u.rev)+")"),A}function r(u){return u.start.row+":"+u.start.column+"=>"+u.end.row+":"+u.end.column}function o(u,A){var _="insert"==u.action,p="insert"==A.action;if(_&&p)if(l(A.start,u.end)>=0)v(A,u,-1);else{if(!(l(A.start,u.start)<=0))return null;v(u,A,1)}else if(_&&!p)if(l(A.start,u.end)>=0)v(A,u,-1);else{if(!(l(A.end,u.start)<=0))return null;v(u,A,-1)}else if(!_&&p)if(l(A.start,u.start)>=0)v(A,u,1);else{if(!(l(A.start,u.start)<=0))return null;v(u,A,1)}else if(!_&&!p)if(l(A.start,u.start)>=0)v(A,u,1);else{if(!(l(A.end,u.start)<=0))return null;v(u,A,-1)}return[A,u]}function c(u,A){for(var _=u.length;_--;)for(var p=0;p=0?v(u,A,-1):(l(u.start,A.start)<=0||v(u,y.fromPoints(A.start,u.start),-1),v(A,u,1));else if(!_&&p)l(A.start,u.end)>=0?v(A,u,-1):(l(A.start,u.start)<=0||v(A,y.fromPoints(u.start,A.start),-1),v(u,A,1));else if(!_&&!p)if(l(A.start,u.end)>=0)v(A,u,-1);else{var E,m;if(!(l(A.end,u.start)<=0))return l(u.start,A.start)<0&&(E=u,u=f(u,A.start)),l(u.end,A.end)>0&&(m=f(u,A.end)),b(A.end,u.start,u.end,-1),m&&!E&&(u.lines=m.lines,u.start=m.start,u.end=m.end,m=u),[A,E,m].filter(Boolean);v(u,A,-1)}return[A,u]}function v(u,A,_){b(u.start,A.start,A.end,_),b(u.end,A.start,A.end,_)}function b(u,A,_,p){u.row==(1==p?A:_).row&&(u.column+=p*(_.column-A.column)),u.row+=p*(_.row-A.row)}function f(u,A){var _=u.lines,p=u.end;u.end=e(A);var E=u.end.row-u.start.row,m=_.splice(E,_.length),g=E?A.column:A.column-u.start.column;return _.push(m[0].substring(0,g)),m[0]=m[0].substr(g),{start:e(A),end:p,lines:m,action:u.action}}function w(u,A){A=function n(u){return{start:e(u.start),end:e(u.end),action:u.action,lines:u.lines.slice()}}(A);for(var _=u.length;_--;){for(var p=u[_],E=0;Ethis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(a,t){return-a.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else{if(l.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column}l.foldLine=this},y.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},y.prototype.walk=function(l,a,t){var i,r,e=0,n=this.folds,c=!0;null==a&&(a=this.end.row,t=this.end.column);for(var h=0;h0)){var c=$(a,r.start);return 0===o?t&&0!==c?-i-2:i:c>0||0===c&&!t?i:-i-1}}return-i-1},l.prototype.add=function(a){var t=!a.isEmpty(),e=this.pointIndex(a.start,t);e<0&&(e=-e-1);var n=this.pointIndex(a.end,t,e);return n<0?n=-n-1:n++,this.ranges.splice(e,n-e,a)},l.prototype.addList=function(a){for(var t=[],e=a.length;e--;)t.push.apply(t,this.add(a[e]));return t},l.prototype.substractPoint=function(a){var t=this.pointIndex(a);if(t>=0)return this.ranges.splice(t,1)},l.prototype.merge=function(){for(var n,a=[],t=this.ranges,e=(t=t.sort(function(o,c){return $(o.start,c.start)}))[0],i=1;i=0},l.prototype.containsPoint=function(a){return this.pointIndex(a)>=0},l.prototype.rangeAtPoint=function(a){var t=this.pointIndex(a);if(t>=0)return this.ranges[t]},l.prototype.clipRows=function(a,t){var e=this.ranges;if(e[0].start.row>t||e[e.length-1].start.row=n);o++);if("insert"==a.action){for(var v=i-n,b=-t.column+e.column;on);o++)if(h.start.row==n&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=b,h.start.row+=v)),h.end.row==n&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&b>0&&oh.start.column&&h.end.column==r[o+1].start.column&&(h.end.column-=b),h.end.column+=b,h.end.row+=v}}else for(v=n-i,b=t.column-e.column;oi);o++)h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=b,h.end.row+=v):h.end.row>i&&(h.end.row+=v),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=b,h.start.row+=v):h.start.row>i&&(h.start.row+=v);if(0!=v&&o=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,n){var i=this.$foldData,r=0;for(n&&(r=i.indexOf(n)),-1==r&&(r=0);r=e)return o}return null},this.getFoldedRowCount=function(e,n){for(var i=this.$foldData,r=n-e+1,o=0;o=n){v=e?r-=n-v:r=0);break}h>=e&&(r-=v>=e?h-v:h-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(n,i){return n.start.row-i.start.row}),e},this.addFold=function(e,n){var o,i=this.$foldData,r=!1;e instanceof y?o=e:(o=new y(n,e)).collapseChildren=n.collapseChildren,this.$clipRangeToDocument(o.range);var c=o.start.row,h=o.start.column,v=o.end.row,b=o.end.column,f=this.getFoldAt(c,h,1),w=this.getFoldAt(v,b,-1);if(f&&w==f)return f.addSubFold(o);f&&!f.range.isStart(c,h)&&this.removeFold(f),w&&!w.range.isEnd(v,b)&&this.removeFold(w);var d=this.getFoldsInRange(o.range);d.length>0&&(this.removeFolds(d),o.collapseChildren||d.forEach(function(p){o.addSubFold(p)}));for(var u=0;u0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(e,n){var i,r;if(null==e)i=new k(0,0,this.getLength(),0),null==n&&(n=!0);else if("number"==typeof e)i=new k(e,0,e,this.getLine(e).length);else if("row"in e)i=k.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach(function(c){r=r.concat(this.unfold(c))},this),r;i=e}for(var o=r=this.getFoldsInRangeList(i);1==r.length&&k.comparePoints(r[0].start,i.start)<0&&k.comparePoints(r[0].end,i.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(i);if(0!=n?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,n){return!!this.getFoldLine(e,n)},this.getRowFoldEnd=function(e,n){var i=this.getFoldLine(e,n);return i?i.end.row:e},this.getRowFoldStart=function(e,n){var i=this.getFoldLine(e,n);return i?i.start.row:e},this.getFoldDisplayLine=function(e,n,i,r,o){null==r&&(r=e.start.row),null==o&&(o=0),null==n&&(n=e.end.row),null==i&&(i=this.getLine(n).length);var c=this.doc,h="";return e.walk(function(v,b,f,w){if(!(bf)break}while(o&&h.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return v.end.row=r.getCurrentTokenRow(),v.end.column=r.getCurrentTokenColumn(),v}},this.foldAll=function(e,n,i,r){null==i&&(i=1e5);var o=this.foldWidgets;if(o){n=n||this.getLength();for(var c=e=e||0;c=e&&(c=h.end.row,h.collapseChildren=i,this.addFold("...",h))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(n){for(var i=e.getTokens(n),r=0;r=0;){var c=i[r];if(null==c&&(c=i[r]=this.getFoldWidget(r)),"start"==c){var h=this.getFoldWidgetRange(r);if(o||(o=h),h&&h.end.row>=e)break}r--}return{range:-1!==r&&h,firstRange:o}},this.onFoldWidgetClick=function(e,n){if(n instanceof a&&(n=n.domEvent),!this.$toggleFoldWidget(e,{children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey})){var o=n.target||n.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,n){if(this.getFoldWidget){var i=this.getFoldWidget(e),r=this.getLine(e),o="end"===i?-1:1,c=this.getFoldAt(e,-1===o?0:r.length,o);if(c)return n.children||n.all?this.removeFold(c):this.expandFold(c),c;var h=this.getFoldWidgetRange(e,!0);if(h&&!h.isMultiLine()&&(c=this.getFoldAt(h.start.row,h.start.column,1))&&h.isEqual(c.range))return this.removeFold(c),c;if(n.siblings){var v=this.getParentFoldRangeData(e);if(v.range)var b=v.range.start.row+1,f=v.range.end.row;this.foldAll(b,f,n.all?1e4:0)}else n.children?(f=h?h.end.row:this.getLength(),this.foldAll(e+1,f,n.all?1e4:0)):h&&(n.all&&(h.collapseChildren=1e4),this.addFold("...",h));return h}},this.toggleFoldWidget=function(e){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var i=this.$toggleFoldWidget(n,{});if(!i){var r=this.getParentFoldRangeData(n,!0);if(i=r.range||r.firstRange){var o=this.getFoldAt(n=i.start.row,this.getLine(n).length,1);o?this.removeFold(o):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var n=e.start.row,i=e.end.row-n;if(0===i)this.foldWidgets[n]=null;else if("remove"==e.action)this.foldWidgets.splice(n,i+1,null);else{var r=Array(i+1);r.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var n=e.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(s,x,K){"use strict";var k=s("../token_iterator").TokenIterator,$=s("../range").Range;x.BracketMatch=function y(){this.findMatchingBracket=function(l,a){if(0==l.column)return null;var t=a||this.getLine(l.row).charAt(l.column-1);if(""==t)return null;var e=t.match(/([\(\[\{])|([\)\]\}])/);return e?e[1]?this.$findClosingBracket(e[1],l):this.$findOpeningBracket(e[2],l):null},this.getBracketRange=function(l){var e,a=this.getLine(l.row),t=!0,n=a.charAt(l.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=a.charAt(l.column),l={row:l.row,column:l.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/),t=!1),!i)return null;if(i[1]){if(!(r=this.$findClosingBracket(i[1],l)))return null;e=$.fromPoints(l,r),t||(e.end.column++,e.start.column--),e.cursor=e.end}else{var r;if(!(r=this.$findOpeningBracket(i[2],l)))return null;e=$.fromPoints(r,l),t||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(l,a){var t=this.getLine(l.row),e=/([\(\[\{])|([\)\]\}])/,n=!a&&t.charAt(l.column-1),i=n&&n.match(e);if(i||(n=(void 0===a||a)&&t.charAt(l.column),l={row:l.row,column:l.column+1},i=n&&n.match(e)),!i)return null;var r=new $(l.row,l.column-1,l.row,l.column),o=i[1]?this.$findClosingBracket(i[1],l):this.$findOpeningBracket(i[2],l);return o?[r,new $(o.row,o.column,o.row,o.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,a,t){var e=this.$brackets[l],n=1,i=new k(this,a.row,a.column),r=i.getCurrentToken();if(r||(r=i.stepForward()),r){t||(t=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=a.column-i.getCurrentTokenColumn()-2,c=r.value;;){for(;o>=0;){var h=c.charAt(o);if(h==e){if(0==(n-=1))return{row:i.getCurrentTokenRow(),column:o+i.getCurrentTokenColumn()}}else h==l&&(n+=1);o-=1}do{r=i.stepBackward()}while(r&&!t.test(r.type));if(null==r)break;o=(c=r.value).length-1}return null}},this.$findClosingBracket=function(l,a,t){var e=this.$brackets[l],n=1,i=new k(this,a.row,a.column),r=i.getCurrentToken();if(r||(r=i.stepForward()),r){t||(t=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=a.column-i.getCurrentTokenColumn();;){for(var c=r.value,h=c.length;o"===a.value?e=!0:-1!==a.type.indexOf("tag-name")&&(t=!0))}while(a&&!t);return a},this.$findClosingTag=function(l,a){var t,e=a.value,n=a.value,i=0,r=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);a=l.stepForward();var o=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+a.value.length),c=!1;do{if(-1!==(t=a).type.indexOf("tag-close")&&!c){var h=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);c=!0}if(a=l.stepForward())if(">"!==a.value||c||(h=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1),c=!0),-1!==a.type.indexOf("tag-name")){if(n===(e=a.value))if("<"===t.value)i++;else if(""!==a.value)return;var f=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else n===e&&"/>"===a.value&&--i<0&&(f=b=v=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),h=new $(o.end.row,o.end.column,o.end.row,o.end.column+1))}while(a&&i>=0);if(r&&h&&v&&f&&o&&b)return{openTag:new $(r.start.row,r.start.column,h.end.row,h.end.column),closeTag:new $(v.start.row,v.start.column,f.end.row,f.end.column),openTagName:o,closeTagName:b}},this.$findOpeningTag=function(l,a){var t=l.getCurrentToken(),e=a.value,n=0,i=l.getCurrentTokenRow(),r=l.getCurrentTokenColumn(),o=r+2,c=new $(i,r,i,o);l.stepForward();var h=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+a.value.length);if(-1===a.type.indexOf("tag-close")&&(a=l.stepForward()),a&&">"===a.value){var v=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do{if(a=t,i=l.getCurrentTokenRow(),o=(r=l.getCurrentTokenColumn())+a.value.length,t=l.stepBackward(),a)if(-1!==a.type.indexOf("tag-name")){if(e===a.value)if("<"===t.value){if(++n>0){var b=new $(i,r,i,o),f=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do{a=l.stepForward()}while(a&&">"!==a.value);var w=new $(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else""===a.value){for(var d=0,u=t;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===e){n--;break}if("<"===u.value)break;u=l.stepBackward(),d++}for(var A=0;AS&&(this.$docRowCache.splice(S,C),this.$screenRowCache.splice(S,C))},m.prototype.$getRowCacheIndex=function(g,C){for(var S=0,F=g.length-1;S<=F;){var L=S+F>>1,D=g[L];if(C>D)S=L+1;else{if(!(C=C);D++);return(F=S[D])?(F.index=D,F.start=L-F.value.length,F):null},m.prototype.setUndoManager=function(g){if(this.$undoManager=g,this.$informUndoManager&&this.$informUndoManager.cancel(),g){var C=this;g.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=$.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},m.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},m.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},m.prototype.getTabString=function(){return this.getUseSoftTabs()?$.stringRepeat(" ",this.getTabSize()):"\t"},m.prototype.setUseSoftTabs=function(g){this.setOption("useSoftTabs",g)},m.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},m.prototype.setTabSize=function(g){this.setOption("tabSize",g)},m.prototype.getTabSize=function(){return this.$tabSize},m.prototype.isTabStop=function(g){return this.$useSoftTabs&&g.column%this.$tabSize==0},m.prototype.setNavigateWithinSoftTabs=function(g){this.setOption("navigateWithinSoftTabs",g)},m.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},m.prototype.setOverwrite=function(g){this.setOption("overwrite",g)},m.prototype.getOverwrite=function(){return this.$overwrite},m.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},m.prototype.addGutterDecoration=function(g,C){this.$decorations[g]||(this.$decorations[g]=""),this.$decorations[g]+=" "+C,this._signal("changeBreakpoint",{})},m.prototype.removeGutterDecoration=function(g,C){this.$decorations[g]=(this.$decorations[g]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},m.prototype.getBreakpoints=function(){return this.$breakpoints},m.prototype.setBreakpoints=function(g){this.$breakpoints=[];for(var C=0;C0&&(F=!!S.charAt(C-1).match(this.tokenRe)),F||(F=!!S.charAt(C).match(this.tokenRe)),F)var L=this.tokenRe;else L=/^\s+$/.test(S.slice(C-1,C+1))?/\s/:this.nonTokenRe;var D=C;if(D>0){do{D--}while(D>=0&&S.charAt(D).match(L));D++}for(var R=C;Rg&&(g=C.screenWidth)}),this.lineWidgetWidth=g},m.prototype.$computeWidth=function(g){if(this.$modified||g){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),S=this.$rowLengthCache,F=0,L=0,D=this.$foldData[L],R=D?D.start.row:1/0,O=C.length,T=0;TR){if((T=D.end.row+1)>=O)break;R=(D=this.$foldData[L++])?D.start.row:1/0}null==S[T]&&(S[T]=this.$getStringScreenWidth(C[T])[0]),S[T]>F&&(F=S[T])}this.screenWidth=F}},m.prototype.getLine=function(g){return this.doc.getLine(g)},m.prototype.getLines=function(g,C){return this.doc.getLines(g,C)},m.prototype.getLength=function(){return this.doc.getLength()},m.prototype.getTextRange=function(g){return this.doc.getTextRange(g||this.selection.getRange())},m.prototype.insert=function(g,C){return this.doc.insert(g,C)},m.prototype.remove=function(g){return this.doc.remove(g)},m.prototype.removeFullLines=function(g,C){return this.doc.removeFullLines(g,C)},m.prototype.undoChanges=function(g,C){if(g.length){this.$fromUndo=!0;for(var S=g.length-1;-1!=S;S--){var F=g[S];"insert"==F.action||"remove"==F.action?this.doc.revertDelta(F):F.folds&&this.addFolds(F.folds)}!C&&this.$undoSelect&&(g.selectionBefore?this.selection.fromJSON(g.selectionBefore):this.selection.setRange(this.$getUndoSelection(g,!0))),this.$fromUndo=!1}},m.prototype.redoChanges=function(g,C){if(g.length){this.$fromUndo=!0;for(var S=0;Sg.end.column&&(D.start.column+=O),D.end.row==g.end.row&&D.end.column>g.end.column&&(D.end.column+=O)),R&&D.start.row>=g.end.row&&(D.start.row+=R,D.end.row+=R)),D.end=this.insert(D.start,F),L.length){var T=g.start,U=D.start,R=U.row-T.row,O=U.column-T.column;this.addFolds(L.map(function(W){return(W=W.clone()).start.row==T.row&&(W.start.column+=O),W.end.row==T.row&&(W.end.column+=O),W.start.row+=R,W.end.row+=R,W}))}return D},m.prototype.indentRows=function(g,C,S){S=S.replace(/\t/g,this.getTabString());for(var F=g;F<=C;F++)this.doc.insertInLine({row:F,column:0},S)},m.prototype.outdentRows=function(g){for(var C=g.collapseRows(),S=new n(0,0,0,0),F=this.getTabSize(),L=C.start.row;L<=C.end.row;++L){var D=this.getLine(L);S.start.row=L,S.end.row=L;for(var R=0;R0){var F;if((F=this.getRowFoldEnd(C+S))>this.doc.getLength()-1)return 0;L=F-C}else g=this.$clipRowToDocument(g),L=(C=this.$clipRowToDocument(C))-g+1;var D=new n(g,0,C,Number.MAX_VALUE),R=this.getFoldsInRange(D).map(function(T){return(T=T.clone()).start.row+=L,T.end.row+=L,T}),O=0==S?this.doc.getLines(g,C):this.doc.removeFullLines(g,C);return this.doc.insertFullLines(g+L,O),R.length&&this.addFolds(R),L},m.prototype.moveLinesUp=function(g,C){return this.$moveLines(g,C,-1)},m.prototype.moveLinesDown=function(g,C){return this.$moveLines(g,C,1)},m.prototype.duplicateLines=function(g,C){return this.$moveLines(g,C,0)},m.prototype.$clipRowToDocument=function(g){return Math.max(0,Math.min(g,this.doc.getLength()-1))},m.prototype.$clipColumnToRow=function(g,C){return C<0?0:Math.min(this.doc.getLine(g).length,C)},m.prototype.$clipPositionToDocument=function(g,C){if(C=Math.max(0,C),g<0)g=0,C=0;else{var S=this.doc.getLength();g>=S?(g=S-1,C=this.doc.getLine(S-1).length):C=Math.min(this.doc.getLine(g).length,C)}return{row:g,column:C}},m.prototype.$clipRangeToDocument=function(g){g.start.row<0?(g.start.row=0,g.start.column=0):g.start.column=this.$clipColumnToRow(g.start.row,g.start.column);var C=this.doc.getLength()-1;return g.end.row>C?(g.end.row=C,g.end.column=this.doc.getLine(C).length):g.end.column=this.$clipColumnToRow(g.end.row,g.end.column),g},m.prototype.setUseWrapMode=function(g){if(g!=this.$useWrapMode){if(this.$useWrapMode=g,this.$modified=!0,this.$resetRowCache(0),g){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},m.prototype.getUseWrapMode=function(){return this.$useWrapMode},m.prototype.setWrapLimitRange=function(g,C){(this.$wrapLimitRange.min!==g||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:g,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},m.prototype.adjustWrapLimit=function(g,C){var S=this.$wrapLimitRange;S.max<0&&(S={min:C,max:C});var F=this.$constrainWrapLimit(g,S.min,S.max);return F!=this.$wrapLimit&&F>1&&(this.$wrapLimit=F,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},m.prototype.$constrainWrapLimit=function(g,C,S){return C&&(g=Math.max(C,g)),S&&(g=Math.min(S,g)),g},m.prototype.getWrapLimit=function(){return this.$wrapLimit},m.prototype.setWrapLimit=function(g){this.setWrapLimitRange(g,g)},m.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},m.prototype.$updateInternalDataOnChange=function(g){var C=this.$useWrapMode,S=g.action,F=g.start,L=g.end,D=F.row,R=L.row,O=R-D,T=null;if(this.$updating=!0,0!=O)if("remove"===S){this[C?"$wrapData":"$rowLengthCache"].splice(D,O);var U=this.$foldData;T=this.getFoldsInRange(g),this.removeFolds(T);var P=0;if(B=this.getFoldLine(L.row)){B.addRemoveChars(L.row,L.column,F.column-L.column),B.shiftRow(-O);var W=this.getFoldLine(D);W&&W!==B&&(W.merge(B),B=W),P=U.indexOf(B)+1}for(;P=L.row&&B.shiftRow(-O);R=D}else{var z=Array(O);z.unshift(D,0);var G=C?this.$wrapData:this.$rowLengthCache;if(G.splice.apply(G,z),U=this.$foldData,P=0,B=this.getFoldLine(D)){var Y=B.range.compareInside(F.row,F.column);0==Y?(B=B.split(F.row,F.column))&&(B.shiftRow(O),B.addRemoveChars(R,0,L.column-F.column)):-1==Y&&(B.addRemoveChars(D,0,L.column-F.column),B.shiftRow(O)),P=U.indexOf(B)+1}for(;P=D&&B.shiftRow(O)}}else O=Math.abs(g.start.column-g.end.column),"remove"===S&&(T=this.getFoldsInRange(g),this.removeFolds(T),O=-O),(B=this.getFoldLine(D))&&B.addRemoveChars(D,F.column,O);return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(D,R):this.$updateRowLengthCache(D,R),T},m.prototype.$updateRowLengthCache=function(g,C){this.$rowLengthCache[g]=null,this.$rowLengthCache[C]=null},m.prototype.$updateWrapData=function(g,C){var R,O,S=this.doc.getAllLines(),F=this.getTabSize(),L=this.$wrapData,D=this.$wrapLimit,T=g;for(C=Math.min(C,S.length-1);T<=C;)(O=this.getFoldLine(T,O))?(R=[],O.walk(function(U,B,P,W){var z;if(null!=U){(z=this.$getDisplayTokens(U,R.length))[0]=w;for(var G=1;GC-W;){var z=D+C-W;if(g[z-1]>=A&&g[z]>=A)P(z);else if(g[z]!=w&&g[z]!=d){for(var G=Math.max(z-(C-(C>>2)),D-1);z>G&&g[z]G&&g[z]G&&g[z]==u;)z--}else for(;z>G&&g[z]G?P(++z):(g[z=D+C]==f&&z--,P(z-W))}else{for(;z!=D-1&&g[z]!=w;z--);if(z>D){P(z);continue}for(z=D+C;z39&&D<48||D>57&&D<64?S.push(u):D>=4352&&E(D)?S.push(b,f):S.push(b)}return S},m.prototype.$getStringScreenWidth=function(g,C,S){if(0==C)return[0,0];var F,L;for(null==C&&(C=1/0),S=S||0,L=0;L=4352&&E(F)?S+=2:S+=1,!(S>C));L++);return[S,L]},m.prototype.getRowLength=function(g){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[g]&&this.lineWidgets[g].rowCount||0),this.$useWrapMode&&this.$wrapData[g]?this.$wrapData[g].length+C:C},m.prototype.getRowLineCount=function(g){return this.$useWrapMode&&this.$wrapData[g]?this.$wrapData[g].length+1:1},m.prototype.getRowWrapIndent=function(g){if(this.$useWrapMode){var C=this.screenToDocumentPosition(g,Number.MAX_VALUE),S=this.$wrapData[C.row];return S.length&&S[0]=0){O=U[B],L=this.$docRowCache[B];var W=g>U[P-1]}else W=!P;for(var z=this.getLength()-1,G=this.getNextFoldLine(L),Y=G?G.start.row:1/0;O<=g&&!(O+(T=this.getRowLength(L))>g||L>=z);)O+=T,++L>Y&&(Y=(G=this.getNextFoldLine(L=G.end.row+1,G))?G.start.row:1/0),W&&(this.$docRowCache.push(L),this.$screenRowCache.push(O));if(G&&G.start.row<=L)F=this.getFoldDisplayLine(G),L=G.start.row;else{if(O+T<=g||L>z)return{row:z,column:this.getLine(z).length};F=this.getLine(L),G=null}var V=0,j=Math.floor(g-O);if(this.$useWrapMode){var Z=this.$wrapData[L];Z&&(R=Z[j],j>0&&Z.length&&(V=Z.indent,F=F.substring(D=Z[j-1]||Z[Z.length-1])))}return void 0!==S&&this.$bidiHandler.isBidiRow(O+j,L,j)&&(C=this.$bidiHandler.offsetToCol(S)),D+=this.$getStringScreenWidth(F,C-V)[1],this.$useWrapMode&&D>=R&&(D=R-1),G?G.idxToPosition(D):{row:L,column:D}},m.prototype.documentToScreenPosition=function(g,C){if(typeof C>"u")var S=this.$clipPositionToDocument(g.row,g.column);else S=this.$clipPositionToDocument(g,C);var D,F=0,L=null;(D=this.getFoldAt(g=S.row,C=S.column,1))&&(g=D.start.row,C=D.start.column);var R,O=0,T=this.$docRowCache,U=this.$getRowCacheIndex(T,g),B=T.length;if(B&&U>=0){O=T[U],F=this.$screenRowCache[U];var P=g>T[B-1]}else P=!B;for(var W=this.getNextFoldLine(O),z=W?W.start.row:1/0;O=z){if((R=W.end.row+1)>g)break;z=(W=this.getNextFoldLine(R,W))?W.start.row:1/0}else R=O+1;F+=this.getRowLength(O),O=R,P&&(this.$docRowCache.push(O),this.$screenRowCache.push(F))}var G="";W&&O>=z?(G=this.getFoldDisplayLine(W,g,C),L=W.start.row):(G=this.getLine(g).substring(0,C),L=g);var Y=0;if(this.$useWrapMode){var V=this.$wrapData[L];if(V){for(var j=0;G.length>=V[j];)F++,j++;G=G.substring(V[j-1]||0,G.length),Y=j>0?V.indent:0}}return this.lineWidgets&&this.lineWidgets[O]&&this.lineWidgets[O].rowsAbove&&(F+=this.lineWidgets[O].rowsAbove),{row:F,column:Y+this.$getStringScreenWidth(G)[0]}},m.prototype.documentToScreenColumn=function(g,C){return this.documentToScreenPosition(g,C).column},m.prototype.documentToScreenRow=function(g,C){return this.documentToScreenPosition(g,C).row},m.prototype.getScreenLength=function(){var g=0,C=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,D=0,F=0,R=(C=this.$foldData[F++])?C.start.row:1/0;DR&&(D=C.end.row+1,R=(C=this.$foldData[F++])?C.start.row:1/0)}else{g=this.getLength();var S=this.$foldData;for(F=0;FS);D++);return[F,D]})},m.prototype.getPrecedingCharacter=function(){var g=this.selection.getCursor();return 0===g.column?0===g.row?"":this.doc.getNewLineCharacter():this.getLine(g.row)[g.column-1]},m.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},m}();v.$uid=0,v.prototype.$modes=l.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=E,k.implement(v.prototype,a);var b=1,f=2,w=3,d=4,u=9,A=10,_=11,p=12;function E(m){return!(m<4352)&&(m>=4352&&m<=4447||m>=4515&&m<=4519||m>=4602&&m<=4607||m>=9001&&m<=9002||m>=11904&&m<=11929||m>=11931&&m<=12019||m>=12032&&m<=12245||m>=12272&&m<=12283||m>=12288&&m<=12350||m>=12353&&m<=12438||m>=12441&&m<=12543||m>=12549&&m<=12589||m>=12593&&m<=12686||m>=12688&&m<=12730||m>=12736&&m<=12771||m>=12784&&m<=12830||m>=12832&&m<=12871||m>=12880&&m<=13054||m>=13056&&m<=19903||m>=19968&&m<=42124||m>=42128&&m<=42182||m>=43360&&m<=43388||m>=44032&&m<=55203||m>=55216&&m<=55238||m>=55243&&m<=55291||m>=63744&&m<=64255||m>=65040&&m<=65049||m>=65072&&m<=65106||m>=65108&&m<=65126||m>=65128&&m<=65131||m>=65281&&m<=65376||m>=65504&&m<=65510)}s("./edit_session/folding").Folding.call(v.prototype),s("./edit_session/bracket_match").BracketMatch.call(v.prototype),l.defineOptions(v.prototype,"session",{wrap:{set:function(m){if(m&&"off"!=m?"free"==m?m=!0:"printMargin"==m?m=-1:"string"==typeof m&&(m=parseInt(m,10)||!1):m=!1,this.$wrap!=m)if(this.$wrap=m,m){var g="number"==typeof m?m:null;this.setWrapLimitRange(g,g),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(m){(m="auto"==m?"text"!=this.$mode.type:"text"!=m)!=this.$wrapAsCode&&(this.$wrapAsCode=m,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(m){this.$useWorker=m,this.$stopWorker(),m&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(m){(m=parseInt(m))>0&&this.$tabSize!==m&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=m,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(m){this.setFoldStyle(m)},handlesSet:!0},overwrite:{set:function(m){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(m){this.doc.setNewLineMode(m)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(m){this.setMode(m)},get:function(){return this.$modeId},handlesSet:!0}}),x.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(s,x,K){"use strict";var k=s("./lib/lang"),$=s("./lib/oop"),y=s("./range").Range,l=function(){function t(){this.$options={}}return t.prototype.set=function(e){return $.mixin(this.$options,e),this},t.prototype.getOptions=function(){return k.copyObject(this.$options)},t.prototype.setOptions=function(e){this.$options=e},t.prototype.find=function(e){var n=this.$options,i=this.$matchIterator(e,n);if(!i)return!1;var r=null;return i.forEach(function(o,c,h,v){return r=new y(o,c,h,v),!(c==v&&n.start&&n.start.start&&0!=n.skipCurrent&&r.isEqual(n.start)&&(r=null,1))}),r},t.prototype.findAll=function(e){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var i=n.range,r=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),o=[],c=n.re;if(n.$isMultiLine){var b,h=c.length,v=r.length-h;e:for(var f=c.offset||0;f<=v;f++){for(var w=0;wA||(o.push(b=new y(f,A,f+h-1,_)),h>2&&(f=f+h-2))}}else for(var p=0;pC&&o[w].end.row==S;)w--;for(o=o.slice(p,w+1),p=0,w=o.length;p=b;_--)if(u(_,Number.MAX_VALUE,A))return;if(0!=n.wrap)for(_=f,b=v.row;_>=b;_--)if(u(_,Number.MAX_VALUE,A))return}};else w=function(_){var p=v.row;if(!u(p,v.column,_)){for(p+=1;p<=f;p++)if(u(p,0,_))return;if(0!=n.wrap)for(p=b,f=v.row;p<=f;p++)if(u(p,0,_))return}};if(n.$isMultiLine)var d=i.length,u=function(A,_,p){var E=r?A-d+1:A;if(!(E<0||E+d>e.getLength())){var m=e.getLine(E),g=m.search(i[0]);if(!(!r&&g<_||-1===g)){for(var C=1;C_)&&p(E,g,E+d-1,S))return!0}}};else u=r?function(_,p,E){var C,m=e.getLine(_),g=[],S=0;for(i.lastIndex=0;C=i.exec(m);){if(S=C.index,!(F=C[0].length)){if(S>=m.length)break;i.lastIndex=S+=k.skipEmptyMatch(m,S,c)}if(C.index+F>p)break;g.push(C.index,F)}for(var L=g.length-1;L>=0;L-=2){var F,D=g[L-1];if(E(_,D,_,D+(F=g[L])))return!0}}:function(_,p,E){var g,C,m=e.getLine(_);for(i.lastIndex=p;C=i.exec(m);){var S=C[0].length;if(E(_,g=C.index,_,g+S))return!0;if(!S&&(i.lastIndex=g+=k.skipEmptyMatch(m,g,c),g>=m.length))return!1}};return{forEach:w}},t}();x.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(s,x,K){"use strict";var k=this&&this.__extends||function(){var n=function(i,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(o[h]=c[h])})(i,r)};return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=i}n(i,r),i.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),$=s("../lib/keys"),y=s("../lib/useragent"),l=$.KEY_MODS,a=function(){function n(i,r){this.$init(i,r,!1)}return n.prototype.$init=function(i,r,o){this.platform=r||(y.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=o},n.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},n.prototype.removeCommand=function(i,r){var o=i&&("string"==typeof i?i:i.name);i=this.commands[o],r||delete this.commands[o];var c=this.commandKeyBinding;for(var h in c){var v=c[h];if(v==i)delete c[h];else if(Array.isArray(v)){var b=v.indexOf(i);-1!=b&&(v.splice(b,1),1==v.length&&(c[h]=v[0]))}}},n.prototype.bindKey=function(i,r,o){if("object"==typeof i&&i&&(null==o&&(o=i.position),i=i[this.platform]),i){if("function"==typeof r)return this.addCommand({exec:r,bindKey:i,name:r.name||i});i.split("|").forEach(function(c){var h="";if(-1!=c.indexOf(" ")){var v=c.split(/\s+/);c=v.pop(),v.forEach(function(w){var d=this.parseKeys(w);this._addCommandToBinding(h+=(h?" ":"")+(l[d.hashId]+d.key),"chainKeys")},this),h+=" "}var b=this.parseKeys(c);this._addCommandToBinding(h+(l[b.hashId]+b.key),r,o)},this)}},n.prototype._addCommandToBinding=function(i,r,o){var h,c=this.commandKeyBinding;if(r)if(!c[i]||this.$singleCommand)c[i]=r;else{Array.isArray(c[i])?-1!=(h=c[i].indexOf(r))&&c[i].splice(h,1):c[i]=[c[i]],"number"!=typeof o&&(o=t(r));var v=c[i];for(h=0;ho);h++);v.splice(h,0,r)}else delete c[i]},n.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(r){var o=i[r];if(o){if("string"==typeof o)return this.bindKey(o,r);"function"==typeof o&&(o={exec:o}),"object"==typeof o&&(o.name||(o.name=r),this.addCommand(o))}},this)},n.prototype.removeCommands=function(i){Object.keys(i).forEach(function(r){this.removeCommand(i[r])},this)},n.prototype.bindKeys=function(i){Object.keys(i).forEach(function(r){this.bindKey(r,i[r])},this)},n.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},n.prototype.parseKeys=function(i){var r=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(f){return f}),o=r.pop(),c=$[o];if($.FUNCTION_KEYS[c])o=$.FUNCTION_KEYS[c].toLowerCase();else{if(!r.length)return{key:o,hashId:-1};if(1==r.length&&"shift"==r[0])return{key:o.toUpperCase(),hashId:-1}}for(var h=0,v=r.length;v--;){var b=$.KEY_MODS[r[v]];if(null==b)return typeof console<"u"&&console.error("invalid modifier "+r[v]+" in "+i),!1;h|=b}return{key:o,hashId:h}},n.prototype.findKeyCommand=function(i,r){return this.commandKeyBinding[l[i]+r]},n.prototype.handleKeyboard=function(i,r,o,c){if(!(c<0)){var h=l[r]+o,v=this.commandKeyBinding[h];return i.$keyChain&&(i.$keyChain+=" "+h,v=this.commandKeyBinding[i.$keyChain]||v),!v||"chainKeys"!=v&&"chainKeys"!=v[v.length-1]?(i.$keyChain&&(r&&4!=r||1!=o.length?(-1==r||c>0)&&(i.$keyChain=""):i.$keyChain=i.$keyChain.slice(0,-h.length-1)),{command:v}):(i.$keyChain=i.$keyChain||h,{command:"null"})}},n.prototype.getStatusText=function(i,r){return r.$keyChain||""},n}();function t(n){return"object"==typeof n&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var e=function(n){function i(r,o){var c=n.call(this,r,o)||this;return c.$singleCommand=!0,c}return k(i,n),i}(a);e.call=function(n,i,r){a.prototype.$init.call(n,i,r,!0)},a.call=function(n,i,r){a.prototype.$init.call(n,i,r,!1)},x.HashHandler=e,x.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$=s("../lib/oop"),y=s("../keyboard/hash_handler").MultiHashHandler,l=s("../lib/event_emitter").EventEmitter,a=function(t){function e(n,i){var r=t.call(this,i,n)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(o){return o.args?o.command.exec(o.editor,o.args,o.event,!1):o.command.exec(o.editor,{},o.event,!0)}),r}return k(e,t),e.prototype.exec=function(n,i,r){if(Array.isArray(n)){for(var o=n.length;o--;)if(this.exec(n[o],i,r))return!0;return!1}if("string"==typeof n&&(n=this.commands[n]),!this.canExecute(n,i))return!1;var c={editor:i,command:n,args:r};return c.returnValue=this._emit("exec",c),this._signal("afterExec",c),!1!==c.returnValue},e.prototype.canExecute=function(n,i){return"string"==typeof n&&(n=this.commands[n]),!(!n||i&&i.$readOnly&&!n.readOnly||0!=this.$checkCommandState&&n.isAvailable&&!n.isAvailable(i))},e.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(i){this.macro.push([i.command,i.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},e.prototype.replay=function(n){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(i){"string"==typeof i?this.exec(i,n):this.exec(i[0],n,i[1])},this)}finally{this.$inReplay=!1}}},e.prototype.trimMacro=function(n){return n.map(function(i){return"string"!=typeof i[0]&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},e}(y);$.implement(a.prototype,l),x.CommandManager=a}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(s,x,K){"use strict";var k=s("../lib/lang"),$=s("../config"),y=s("../range").Range;function l(t,e){return{win:t,mac:e}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(t){$.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(t){$.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(t){$.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(t,e){"number"==typeof e&&!isNaN(e)&&t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(t){$.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var n=t.$copyWithEmptySelection&&t.selection.isEmpty()?t.selection.getLineRange():t.selection.getRange();t._emit("cut",n),n.isEmpty()||t.session.remove(n),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(t){$.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(k.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(t){t.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(t){for(var e=t.selection.isBackwards(),n=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),i=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),r=t.session.doc.getLine(n.row).length,c=t.session.doc.getTextRange(t.selection.getRange()).replace(/\n\s*/," ").length,h=t.session.doc.getLine(n.row),v=n.row+1;v<=i.row+1;v++){var b=k.stringTrimLeft(k.stringTrimRight(t.session.doc.getLine(v)));0!==b.length&&(b=" "+b),h+=b}i.row+10?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+c)):(r=t.session.doc.getLine(n.row).length>r?r+1:r,t.selection.moveCursorTo(n.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(t){var e=t.session.doc.getLength()-1,n=t.session.doc.getLine(e).length,i=t.selection.rangeList.ranges,r=[];i.length<1&&(i=[t.selection.getRange()]);for(var o=0;o0||t+e=0&&this.$isFoldWidgetVisible(t-e))return t-e;if(t+e<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(t+e))return t+e}return null},a.prototype.$findNearestAnnotation=function(t){if(this.$isAnnotationVisible(t))return t;for(var e=0;t-e>0||t+e=0&&this.$isAnnotationVisible(t-e))return t-e;if(t+e<=this.lines.getLength()-1&&this.$isAnnotationVisible(t+e))return t+e}return null},a.prototype.$focusFoldWidget=function(t){if(null!=t){var e=this.$getFoldWidget(t);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus()}},a.prototype.$focusAnnotation=function(t){if(null!=t){var e=this.$getAnnotation(t);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus()}},a.prototype.$blurFoldWidget=function(t){var e=this.$getFoldWidget(t);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},a.prototype.$blurAnnotation=function(t){var e=this.$getAnnotation(t);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var t=this.activeRowIndex;t>0;)if(t--,this.$isFoldWidgetVisible(t))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,void this.$focusFoldWidget(this.activeRowIndex)},a.prototype.$moveFoldWidgetDown=function(){for(var t=this.activeRowIndex;t0;)if(t--,this.$isAnnotationVisible(t))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,void this.$focusAnnotation(this.activeRowIndex)},a.prototype.$moveAnnotationDown=function(){for(var t=this.activeRowIndex;t=m.length&&(m=void 0),{value:m&&m[S++],done:!m}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},$=s("./lib/oop"),y=s("./lib/dom"),l=s("./lib/lang"),a=s("./lib/useragent"),t=s("./keyboard/textinput").TextInput,e=s("./mouse/mouse_handler").MouseHandler,n=s("./mouse/fold_handler").FoldHandler,i=s("./keyboard/keybinding").KeyBinding,r=s("./edit_session").EditSession,o=s("./search").Search,c=s("./range").Range,h=s("./lib/event_emitter").EventEmitter,v=s("./commands/command_manager").CommandManager,b=s("./commands/default_commands").commands,f=s("./config"),w=s("./token_iterator").TokenIterator,d=s("./keyboard/gutter_handler").GutterKeyboardHandler,u=s("./config").nls,A=s("./clipboard"),_=s("./lib/keys"),p=function(){function m(g,C,S){this.$toDestroy=[];var F=g.getContainerElement();this.container=F,this.renderer=g,this.id="editor"+ ++m.$uid,this.commands=new v(a.isMac?"mac":"win",b),"object"==typeof document&&(this.textInput=new t(g.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new e(this),new n(this)),this.keyBinding=new i(this),this.$search=(new o).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(L,D){D._$emitInputEvent.schedule(31)}),this.setSession(C||S&&S.session||new r("")),f.resetOptions(this),S&&this.setOptions(S),f._signal("editor",this)}return m.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},m.prototype.startOperation=function(g){this.session.startOperation(g)},m.prototype.endOperation=function(g){this.session.endOperation(g)},m.prototype.onStartOperation=function(g){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,g||(this.previousCommand=null)},m.prototype.onEndOperation=function(g){if(this.curOp&&this.session){if(g&&!1===g.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var C=this.curOp.command,S=C&&C.scrollIntoView;if(S){switch(S){case"center-animate":S="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var F=this.selection.getRange(),L=this.renderer.layerConfig;(F.start.row>=L.lastRow||F.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==S&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},m.prototype.$historyTracker=function(g){if(this.$mergeUndoDeltas){var C=this.prevOp,S=this.$mergeableCommands,F=C.command&&g.command.name==C.command.name;if("insertstring"==g.command.name){var L=g.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),F=F&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(C.args)),this.mergeNextCommand=!0}else F=F&&-1!==S.indexOf(g.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(F=!1),F?this.session.mergeUndoDeltas=!0:-1!==S.indexOf(g.command.name)&&(this.sequenceStartTime=Date.now())}},m.prototype.setKeyboardHandler=function(g,C){if(g&&"string"==typeof g&&"ace"!=g){this.$keybindingId=g;var S=this;f.loadModule(["keybinding",g],function(F){S.$keybindingId==g&&S.keyBinding.setKeyboardHandler(F&&F.handler),C&&C()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(g),C&&C()},m.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},m.prototype.setSession=function(g){if(this.session!=g){this.curOp&&this.endOperation(),this.curOp={};var C=this.session;if(C){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var S=this.session.getSelection();S.off("changeCursor",this.$onCursorChange),S.off("changeSelection",this.$onSelectionChange)}this.session=g,g?(this.$onDocumentChange=this.onDocumentChange.bind(this),g.on("change",this.$onDocumentChange),this.renderer.setSession(g),this.$onChangeMode=this.onChangeMode.bind(this),g.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),g.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),g.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),g.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),g.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),g.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=g.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(g)),this._signal("changeSession",{session:g,oldSession:C}),this.curOp=null,C&&C._signal("changeEditor",{oldEditor:this}),C&&(C.$editor=null),g&&g._signal("changeEditor",{editor:this}),g&&(g.$editor=this),g&&!g.destroyed&&g.bgTokenizer.scheduleStart()}},m.prototype.getSession=function(){return this.session},m.prototype.setValue=function(g,C){return this.session.doc.setValue(g),C?1==C?this.navigateFileEnd():-1==C&&this.navigateFileStart():this.selectAll(),g},m.prototype.getValue=function(){return this.session.getValue()},m.prototype.getSelection=function(){return this.selection},m.prototype.resize=function(g){this.renderer.onResize(g)},m.prototype.setTheme=function(g,C){this.renderer.setTheme(g,C)},m.prototype.getTheme=function(){return this.renderer.getTheme()},m.prototype.setStyle=function(g){this.renderer.setStyle(g)},m.prototype.unsetStyle=function(g){this.renderer.unsetStyle(g)},m.prototype.getFontSize=function(){return this.getOption("fontSize")||y.computedStyle(this.container).fontSize},m.prototype.setFontSize=function(g){this.setOption("fontSize",g)},m.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var g=this;this.$highlightPending=!0,setTimeout(function(){g.$highlightPending=!1;var C=g.session;if(C&&!C.destroyed){C.$bracketHighlight&&(C.$bracketHighlight.markerIds.forEach(function(B){C.removeMarker(B)}),C.$bracketHighlight=null);var S=g.getCursorPosition(),F=g.getKeyboardHandler(),L=F&&F.$getDirectionForHighlight&&F.$getDirectionForHighlight(g),D=C.getMatchingBracketRanges(S,L);if(!D){var O=new w(C,S.row,S.column).getCurrentToken();if(O&&/\b(?:tag-open|tag-name)/.test(O.type)){var T=C.getMatchingTags(S);T&&(D=[T.openTagName.isEmpty()?T.openTag:T.openTagName,T.closeTagName.isEmpty()?T.closeTag:T.closeTagName])}}if(!D&&C.$mode.getMatching&&(D=C.$mode.getMatching(g.session)),!D)return void(g.getHighlightIndentGuides()&&g.renderer.$textLayer.$highlightIndentGuide());var U="ace_bracket";Array.isArray(D)?1==D.length&&(U="ace_error_bracket"):D=[D],2==D.length&&(0==c.comparePoints(D[0].end,D[1].start)?D=[c.fromPoints(D[0].start,D[1].end)]:0==c.comparePoints(D[0].start,D[1].end)&&(D=[c.fromPoints(D[1].start,D[0].end)])),C.$bracketHighlight={ranges:D,markerIds:D.map(function(B){return C.addMarker(B,U,"text")})},g.getHighlightIndentGuides()&&g.renderer.$textLayer.$highlightIndentGuide()}},50)}},m.prototype.focus=function(){this.textInput.focus()},m.prototype.isFocused=function(){return this.textInput.isFocused()},m.prototype.blur=function(){this.textInput.blur()},m.prototype.onFocus=function(g){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",g))},m.prototype.onBlur=function(g){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",g))},m.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},m.prototype.onDocumentChange=function(g){this.renderer.updateLines(g.start.row,g.start.row==g.end.row?g.end.row:1/0,this.session.$useWrapMode),this._signal("change",g),this.$cursorChange()},m.prototype.onTokenizerUpdate=function(g){var C=g.data;this.renderer.updateLines(C.first,C.last)},m.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},m.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},m.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},m.prototype.$updateHighlightActiveLine=function(){var C,g=this.getSession();if(this.$highlightActiveLine&&(("line"!=this.$selectionStyle||!this.selection.isMultiLine())&&(C=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(C=!1),this.renderer.$maxLines&&1===this.session.getLength()&&!(this.renderer.$minLines>1)&&(C=!1)),g.$highlightLineMarker&&!C)g.removeMarker(g.$highlightLineMarker.id),g.$highlightLineMarker=null;else if(!g.$highlightLineMarker&&C){var S=new c(C.row,C.column,C.row,1/0);S.id=g.addMarker(S,"ace_active-line","screenLine"),g.$highlightLineMarker=S}else C&&(g.$highlightLineMarker.start.row=C.row,g.$highlightLineMarker.end.row=C.row,g.$highlightLineMarker.start.column=C.column,g._signal("changeBackMarker"))},m.prototype.onSelectionChange=function(g){var C=this.session;if(C.$selectionMarker&&C.removeMarker(C.$selectionMarker),C.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var S=this.selection.getRange(),F=this.getSelectionStyle();C.$selectionMarker=C.addMarker(S,"ace_selection",F)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},m.prototype.$getSelectionHighLightRegexp=function(){var g=this.session,C=this.getSelectionRange();if(!C.isEmpty()&&!C.isMultiLine()){var S=C.start.column,F=C.end.column,L=g.getLine(C.start.row),D=L.substring(S,F);if(!(D.length>5e3)&&/[\w\d]/.test(D)){var R=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),O=L.substring(S-1,F+1);if(R.test(O))return R}}},m.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},m.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},m.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},m.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},m.prototype.onChangeMode=function(g){this.renderer.updateText(),this._emit("changeMode",g)},m.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},m.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},m.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},m.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},m.prototype.getCopyText=function(){var g=this.getSelectedText(),C=this.session.doc.getNewLineCharacter(),S=!1;if(!g&&this.$copyWithEmptySelection){S=!0;for(var F=this.selection.getAllRanges(),L=0;LB.search(/\S|$/)){var O=B.substr(L.column).search(/\S|$/);S.doc.removeInLine(L.row,L.column,L.column+O)}}this.clearSelection();var T=L.column,U=S.getState(L.row),P=(B=S.getLine(L.row),F.checkOutdent(U,B,g));if(S.insert(L,g),D&&D.selection&&this.selection.setSelectionRange(2==D.selection.length?new c(L.row,T+D.selection[0],L.row,T+D.selection[1]):new c(L.row+D.selection[0],D.selection[1],L.row+D.selection[2],D.selection[3])),this.$enableAutoIndent){if(S.getDocument().isNewLine(g)){var W=F.getNextLineIndent(U,B.slice(0,L.column),S.getTabString());S.insert({row:L.row+1,column:0},W)}P&&F.autoOutdent(U,S,L.row)}},m.prototype.autoIndent=function(){for(var g=this.session,C=g.getMode(),S=this.selection.isEmpty()?[new c(0,0,g.doc.getLength()-1,0)]:this.selection.getAllRanges(),F="",L="",D="",R=g.getTabString(),O=0;O0&&(F=g.getState(B-1),L=g.getLine(B-1),D=C.getNextLineIndent(F,L,R));var P=g.getLine(B),W=C.$getIndent(P);if(D!==W){if(W.length>0){var z=new c(B,0,B,W.length);g.remove(z)}D.length>0&&g.insert({row:B,column:0},D)}C.autoOutdent(F,g,B)}},m.prototype.onTextInput=function(g,C){if(!C)return this.keyBinding.onTextInput(g);this.startOperation({command:{name:"insertstring"}});var S=this.applyComposition.bind(this,g,C);this.selection.rangeCount?this.forEachSelection(S):S(),this.endOperation()},m.prototype.applyComposition=function(g,C){var S;(C.extendLeft||C.extendRight)&&((S=this.selection.getRange()).start.column-=C.extendLeft,S.end.column+=C.extendRight,S.start.column<0&&(S.start.row--,S.start.column+=this.session.getLine(S.start.row).length+1),this.selection.setRange(S),!g&&!S.isEmpty()&&this.remove()),(g||!this.selection.isEmpty())&&this.insert(g,!0),(C.restoreStart||C.restoreEnd)&&((S=this.selection.getRange()).start.column-=C.restoreStart,S.end.column-=C.restoreEnd,this.selection.setRange(S))},m.prototype.onCommandKey=function(g,C,S){return this.keyBinding.onCommandKey(g,C,S)},m.prototype.setOverwrite=function(g){this.session.setOverwrite(g)},m.prototype.getOverwrite=function(){return this.session.getOverwrite()},m.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},m.prototype.setScrollSpeed=function(g){this.setOption("scrollSpeed",g)},m.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},m.prototype.setDragDelay=function(g){this.setOption("dragDelay",g)},m.prototype.getDragDelay=function(){return this.getOption("dragDelay")},m.prototype.setSelectionStyle=function(g){this.setOption("selectionStyle",g)},m.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},m.prototype.setHighlightActiveLine=function(g){this.setOption("highlightActiveLine",g)},m.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},m.prototype.setHighlightGutterLine=function(g){this.setOption("highlightGutterLine",g)},m.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},m.prototype.setHighlightSelectedWord=function(g){this.setOption("highlightSelectedWord",g)},m.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},m.prototype.setAnimatedScroll=function(g){this.renderer.setAnimatedScroll(g)},m.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},m.prototype.setShowInvisibles=function(g){this.renderer.setShowInvisibles(g)},m.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},m.prototype.setDisplayIndentGuides=function(g){this.renderer.setDisplayIndentGuides(g)},m.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},m.prototype.setHighlightIndentGuides=function(g){this.renderer.setHighlightIndentGuides(g)},m.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},m.prototype.setShowPrintMargin=function(g){this.renderer.setShowPrintMargin(g)},m.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},m.prototype.setPrintMarginColumn=function(g){this.renderer.setPrintMarginColumn(g)},m.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},m.prototype.setReadOnly=function(g){this.setOption("readOnly",g)},m.prototype.getReadOnly=function(){return this.getOption("readOnly")},m.prototype.setBehavioursEnabled=function(g){this.setOption("behavioursEnabled",g)},m.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},m.prototype.setWrapBehavioursEnabled=function(g){this.setOption("wrapBehavioursEnabled",g)},m.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},m.prototype.setShowFoldWidgets=function(g){this.setOption("showFoldWidgets",g)},m.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},m.prototype.setFadeFoldWidgets=function(g){this.setOption("fadeFoldWidgets",g)},m.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},m.prototype.remove=function(g){this.selection.isEmpty()&&("left"==g?this.selection.selectLeft():this.selection.selectRight());var C=this.getSelectionRange();if(this.getBehavioursEnabled()){var S=this.session,F=S.getState(C.start.row),L=S.getMode().transformAction(F,"deletion",this,S,C);if(0===C.end.column){var D=S.getTextRange(C);if("\n"==D[D.length-1]){var R=S.getLine(C.end.row);/^\s+$/.test(R)&&(C.end.column=R.length)}}L&&(C=L)}this.session.remove(C),this.clearSelection()},m.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var g=this.getSelectionRange();g.start.column==g.end.column&&g.start.row==g.end.row&&(g.end.column=0,g.end.row++),this.session.remove(g),this.clearSelection()},m.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var g=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(g)},m.prototype.setGhostText=function(g,C){this.renderer.setGhostText(g,C)},m.prototype.removeGhostText=function(){this.renderer.removeGhostText()},m.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var g=this.getCursorPosition(),C=g.column;if(0!==C){var F,L,S=this.session.getLine(g.row);CO.toLowerCase()?1:0});var L=new c(0,0,0,0);for(F=g.first;F<=g.last;F++){var D=C.getLine(F);L.start.row=F,L.end.row=F,L.end.column=D.length,C.replace(L,S[F-g.first])}},m.prototype.toggleCommentLines=function(){var g=this.session.getState(this.getCursorPosition().row),C=this.$getSelectedRows();this.session.getMode().toggleCommentLines(g,this.session,C.first,C.last)},m.prototype.toggleBlockComment=function(){var g=this.getCursorPosition(),C=this.session.getState(g.row),S=this.getSelectionRange();this.session.getMode().toggleBlockComment(C,this.session,S,g)},m.prototype.getNumberAt=function(g,C){var S=/[\-]?[0-9]+(?:\.[0-9]+)?/g;S.lastIndex=0;for(var F=this.session.getLine(g);S.lastIndex=C)return{value:L[0],start:L.index,end:L.index+L[0].length}}return null},m.prototype.modifyNumber=function(g){var C=this.selection.getCursor().row,S=this.selection.getCursor().column,F=new c(C,S-1,C,S),L=this.session.getTextRange(F);if(!isNaN(parseFloat(L))&&isFinite(L)){var D=this.getNumberAt(C,S);if(D){var R=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,O=D.start+D.value.length-R,T=parseFloat(D.value);T*=Math.pow(10,O),T+=g*=R!==D.end&&S=R&&D<=O&&(S=j,T.selection.clearSelection(),T.moveCursorTo(g,R+F),T.selection.selectTo(g,O+F)),R=O});for(var B,U=this.$toggleWordPairs,P=0;P=O&&R<=T&&W.match(/((?:https?|ftp):\/\/[\S]+)/)){U=W.replace(/[\s:.,'";}\]]+$/,"");break}O=T}}catch(z){S={error:z}}finally{try{P&&!P.done&&(F=B.return)&&F.call(B)}finally{if(S)throw S.error}}return U},m.prototype.openLink=function(){var g=this.selection.getCursor(),C=this.findLinkAt(g.row,g.column);return C&&window.open(C,"_blank"),null!=C},m.prototype.removeLines=function(){var g=this.$getSelectedRows();this.session.removeFullLines(g.first,g.last),this.clearSelection()},m.prototype.duplicateSelection=function(){var g=this.selection,C=this.session,S=g.getRange(),F=g.isBackwards();if(S.isEmpty()){var L=S.start.row;C.duplicateLines(L,L)}else{var D=F?S.start:S.end,R=C.insert(D,C.getTextRange(S));S.start=D,S.end=R,g.setSelectionRange(S,F)}},m.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},m.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},m.prototype.moveText=function(g,C,S){return this.session.moveText(g,C,S)},m.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},m.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},m.prototype.$moveLines=function(g,C){var S,F,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var D=L.toOrientedRange();S=this.$getSelectedRows(D),F=this.session.$moveLines(S.first,S.last,C?0:g),C&&-1==g&&(F=0),D.moveBy(F,0),L.fromOrientedRange(D)}else{var R=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var O=0,T=0,U=R.length,B=0;Bz+1)break;z=G.last}for(B--,O=this.session.$moveLines(W,z,C?0:g),C&&-1==g&&(P=B+1);P<=B;)R[P].moveBy(O,0),P++;C||(O=0),T+=O}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},m.prototype.$getSelectedRows=function(g){return g=(g||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(g.start.row),last:this.session.getRowFoldEnd(g.end.row)}},m.prototype.onCompositionStart=function(g){this.renderer.showComposition(g)},m.prototype.onCompositionUpdate=function(g){this.renderer.setCompositionText(g)},m.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},m.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},m.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},m.prototype.isRowVisible=function(g){return g>=this.getFirstVisibleRow()&&g<=this.getLastVisibleRow()},m.prototype.isRowFullyVisible=function(g){return g>=this.renderer.getFirstFullyVisibleRow()&&g<=this.renderer.getLastFullyVisibleRow()},m.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},m.prototype.$moveByPage=function(g,C){var S=this.renderer,F=this.renderer.layerConfig,L=g*Math.floor(F.height/F.lineHeight);!0===C?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):!1===C&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var D=S.scrollTop;S.scrollBy(0,L*F.lineHeight),null!=C&&S.scrollCursorIntoView(null,.5),S.animateScrolling(D)},m.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},m.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},m.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},m.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},m.prototype.scrollPageDown=function(){this.$moveByPage(1)},m.prototype.scrollPageUp=function(){this.$moveByPage(-1)},m.prototype.scrollToRow=function(g){this.renderer.scrollToRow(g)},m.prototype.scrollToLine=function(g,C,S,F){this.renderer.scrollToLine(g,C,S,F)},m.prototype.centerSelection=function(){var g=this.getSelectionRange(),C={row:Math.floor(g.start.row+(g.end.row-g.start.row)/2),column:Math.floor(g.start.column+(g.end.column-g.start.column)/2)};this.renderer.alignCursor(C,.5)},m.prototype.getCursorPosition=function(){return this.selection.getCursor()},m.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},m.prototype.getSelectionRange=function(){return this.selection.getRange()},m.prototype.selectAll=function(){this.selection.selectAll()},m.prototype.clearSelection=function(){this.selection.clearSelection()},m.prototype.moveCursorTo=function(g,C){this.selection.moveCursorTo(g,C)},m.prototype.moveCursorToPosition=function(g){this.selection.moveCursorToPosition(g)},m.prototype.jumpToMatching=function(g,C){var S=this.getCursorPosition(),F=new w(this.session,S.row,S.column),L=F.getCurrentToken(),D=0;L&&-1!==L.type.indexOf("tag-name")&&(L=F.stepBackward());var R=L||F.stepForward();if(R){var O,P,T=!1,U={},B=S.column-R.start,W={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(R.value.match(/[{}()\[\]]/g)){for(;B1?U[R.value]++:"=0;--D)this.$tryReplace(S[D],g)&&F++;return this.selection.setSelectionRange(L),F},m.prototype.$tryReplace=function(g,C){var S=this.session.getTextRange(g);return null!==(C=this.$search.replace(S,C))?(g.end=this.session.replace(g,C),g):null},m.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},m.prototype.find=function(g,C,S){C||(C={}),"string"==typeof g||g instanceof RegExp?C.needle=g:"object"==typeof g&&$.mixin(C,g);var F=this.selection.getRange();null==C.needle&&((g=this.session.getTextRange(F)||this.$search.$options.needle)||(F=this.session.getWordRange(F.start.row,F.start.column),g=this.session.getTextRange(F)),this.$search.set({needle:g})),this.$search.set(C),C.start||this.$search.set({start:F});var L=this.$search.find(this.session);return C.preventScroll?L:L?(this.revealRange(L,S),L):(C.backwards?F.start=F.end:F.end=F.start,void this.selection.setRange(F))},m.prototype.findNext=function(g,C){this.find({skipCurrent:!0,backwards:!1},g,C)},m.prototype.findPrevious=function(g,C){this.find(g,{skipCurrent:!0,backwards:!0},C)},m.prototype.revealRange=function(g,C){this.session.unfold(g),this.selection.setSelectionRange(g);var S=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(g.start,g.end,.5),!1!==C&&this.renderer.animateScrolling(S)},m.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},m.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},m.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(g){g.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},m.prototype.setAutoScrollEditorIntoView=function(g){if(g){var C,S=this,F=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var D=this.on("changeSelection",function(){F=!0}),R=this.renderer.on("beforeRender",function(){F&&(C=S.renderer.container.getBoundingClientRect())}),O=this.renderer.on("afterRender",function(){if(F&&C&&(S.isFocused()||S.searchBox&&S.searchBox.isFocused())){var T=S.renderer,U=T.$cursorLayer.$pixelPos,B=T.layerConfig,P=U.top-B.offset;null!=(F=U.top>=0&&P+C.top<0||!(U.topwindow.innerHeight)&&null)&&(L.style.top=P+"px",L.style.left=U.left+"px",L.style.height=B.lineHeight+"px",L.scrollIntoView(F)),F=C=null}});this.setAutoScrollEditorIntoView=function(T){T||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",O),this.renderer.off("beforeRender",R))}}},m.prototype.$resetCursorStyle=function(){var g=this.$cursorStyle||"ace",C=this.renderer.$cursorLayer;C&&(C.setSmoothBlinking(/smooth/.test(g)),C.isBlinking=!this.$readOnly&&"wide"!=g,y.setCssClass(C.element,"ace_slim-cursors",/slim/.test(g)))},m.prototype.prompt=function(g,C,S){var F=this;f.loadModule("ace/ext/prompt",function(L){L.prompt(F,g,C,S)})},m}();p.$uid=0,p.prototype.curOp=null,p.prototype.prevOp={},p.prototype.$mergeableCommands=["backspace","del","insertstring"],p.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],$.implement(p.prototype,h),f.defineOptions(p.prototype,"editor",{selectionStyle:{set:function(m){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:m})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(m){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(m){this.textInput.setReadOnly(m),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(m){this.textInput.setCopyWithEmptySelection(m)},initialValue:!1},cursorStyle:{set:function(m){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(m){this.setAutoScrollEditorIntoView(m)}},keyboardHandler:{set:function(m){this.setKeyboardHandler(m)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(m){this.session.setValue(m)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(m){this.setSession(m)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(m){this.renderer.$gutterLayer.setShowLineNumbers(m),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),m&&this.$relativeLineNumbers?E.attach(this):E.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(m){this.$showLineNumbers&&m?E.attach(this):E.detach(this)}},placeholder:{set:function(m){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var g=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(g&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),y.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(g||this.renderer.placeholderNode)!g&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),y.addCssClass(this.container,"ace_hasPlaceholder");var C=y.createElement("div");C.className="ace_placeholder",C.textContent=this.$placeholder||"",this.renderer.placeholderNode=C,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(m){var S,g={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(F){F.blur(),F.renderer.scroller.focus()},readOnly:!0},C=function(F){if(F.target==this.renderer.scroller&&F.keyCode===_.enter){F.preventDefault();var L=this.getCursorPosition().row;this.isRowVisible(L)||this.scrollToLine(L,!0,!0),this.focus()}};m?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",u("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",u("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",C.bind(this)),this.commands.addCommand(g),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",u("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",u("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),S||(S=new d(this)),S.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",C.bind(this)),this.commands.removeCommand(g),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),S&&S.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(m){this.$textInputAriaLabel=m},initialValue:""},enableMobileMenu:{set:function(m){this.$enableMobileMenu=m},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var E={getText:function(m,g){return(Math.abs(m.selection.lead.row-g)||g+1+(g<9?"\xb7":""))+""},getWidth:function(m,g,C){return Math.max(g.toString().length,(C.lastRow+1).toString().length,2)*C.characterWidth},update:function(m,g){g.renderer.$loop.schedule(g.renderer.CHANGE_GUTTER)},attach:function(m){m.renderer.$gutterLayer.$renderer=this,m.on("changeSelection",this.update),this.update(null,m)},detach:function(m){m.renderer.$gutterLayer.$renderer==this&&(m.renderer.$gutterLayer.$renderer=null),m.off("changeSelection",this.update),this.update(null,m)}};x.Editor=p}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=function(){function y(l,a){this.element=l,this.canvasHeight=a||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return y.prototype.moveContainer=function(l){k.translate(this.element,0,-l.firstRowScreen*l.lineHeight%this.canvasHeight-l.offset*this.$offsetCoefficient)},y.prototype.pageChanged=function(l,a){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)},y.prototype.computeLineTop=function(l,a,t){var n=Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight);return t.documentToScreenRow(l,0)*a.lineHeight-n*this.canvasHeight},y.prototype.computeLineHeight=function(l,a,t){return a.lineHeight*t.getRowLineCount(l)},y.prototype.getLength=function(){return this.cells.length},y.prototype.get=function(l){return this.cells[l]},y.prototype.shift=function(){this.$cacheCell(this.cells.shift())},y.prototype.pop=function(){this.$cacheCell(this.cells.pop())},y.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var a=k.createFragment(this.element),t=0;tb&&(b=(v=o.getNextFoldLine(d=v.end.row+1,v))?v.start.row:1/0),d>h){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}(f=this.$lines.get(++w))?f.row=d:(f=this.$lines.createCell(d,r,this.session,n),this.$lines.push(f)),this.$renderCell(f,r,v,d),d++}this._signal("afterRender"),this.$updateGutterWidth(r)},i.prototype.$updateGutterWidth=function(r){var o=this.session,c=o.gutterRenderer||this.$renderer,h=o.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(v=o.getLength()+h-1);var b=c?c.getWidth(o,v,r):v.toString().length*r.characterWidth,f=this.$padding||this.$computePadding();(b+=f.left+f.right)!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var r=this.session.selection.getCursor();this.$cursorRow!==r.row&&(this.$cursorRow=r.row)}},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var r=this.session.selection.cursor.row;if(this.$cursorRow=r,!this.$cursorCell||this.$cursorCell.row!=r){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var o=this.$lines.cells;this.$cursorCell=null;for(var c=0;c=this.$cursorRow){if(h.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(!(c>0&&v&&v.start.row==o[c-1].row))break;h=o[c-1]}h.element.className="ace_gutter-active-line "+h.element.className,this.$cursorCell=h;break}}}}},i.prototype.scrollLines=function(r){var o=this.config;if(this.config=r,this.$updateCursorRow(),this.$lines.pageChanged(o,r))return this.update(r);this.$lines.moveContainer(r);var c=Math.min(r.lastRow+r.gutterOffset,this.session.getLength()-1),h=this.oldLastRow;if(this.oldLastRow=c,!o||h0;v--)this.$lines.shift();if(h>c)for(v=this.session.getFoldedRowCount(c+1,h);v>0;v--)this.$lines.pop();r.firstRowh&&this.$lines.push(this.$renderLines(r,h+1,c)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(r)},i.prototype.$renderLines=function(r,o,c){for(var h=[],v=o,b=this.session.getNextFoldLine(v),f=b?b.start.row:1/0;v>f&&(f=(b=this.session.getNextFoldLine(v=b.end.row+1,b))?b.start.row:1/0),!(v>c);){var w=this.$lines.createCell(v,r,this.session,n);this.$renderCell(w,r,b,v),h.push(w),v++}return h},i.prototype.$renderCell=function(r,o,c,h){var v=r.element,b=this.session,f=v.childNodes[0],w=v.childNodes[1],d=v.childNodes[2],u=d.firstChild,A=b.$firstLineNumber,_=b.$breakpoints,p=b.$decorations,E=b.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&b.foldWidgets,g=c?c.start.row:Number.MAX_VALUE,C=o.lineHeight+"px",S=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",F=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=(E?E.getText(b,h):h+A).toString();if(this.$highlightGutterLine&&(h==this.$cursorRow||c&&h=g&&this.$cursorRow<=c.end.row)&&(S+="ace_gutter-active-line ",this.$cursorCell!=r&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=r)),_[h]&&(S+=_[h]),p[h]&&(S+=p[h]),this.$annotations[h]&&h!==g&&(S+=this.$annotations[h].className),m){var D=m[h];null==D&&(D=m[h]=b.getFoldWidget(h))}if(D){var R="ace_fold-widget ace_"+D,O="start"==D&&h==g&&hc.right-o.right?"foldWidgets":void 0},i}();function n(i){var r=document.createTextNode("");i.appendChild(r);var o=k.createElement("span");i.appendChild(o);var c=k.createElement("span");i.appendChild(c);var h=k.createElement("span");return c.appendChild(h),i}e.prototype.$fixedWidth=!1,e.prototype.$highlightGutterLine=!0,e.prototype.$renderer="",e.prototype.$showLineNumbers=!0,e.prototype.$showFoldWidgets=!0,$.implement(e.prototype,l),x.Gutter=e}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(s,x,K){"use strict";var k=s("../range").Range,$=s("../lib/dom"),y=function(){function a(t){this.element=$.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return a.prototype.setPadding=function(t){this.$padding=t},a.prototype.setSession=function(t){this.session=t},a.prototype.setMarkers=function(t){this.markers=t},a.prototype.elt=function(t,e){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=e,n.className=t},a.prototype.update=function(t){if(t){var e;for(var n in this.config=t,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,t);i.renderer(e,r,this.$padding+r.start.column*t.characterWidth,o,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,r,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,r,i.clazz,t):r.isMultiLine()?"text"==i.type?this.drawTextMarker(e,r,i.clazz,t):this.drawMultiLineMarker(e,r,i.clazz,t):this.drawSingleLineMarker(e,r,i.clazz+" ace_start ace_br15",t)}else i.update(e,this,this.session,t)}if(-1!=this.i)for(;this.iw,v==h),i,v==h?0:1,r)},a.prototype.drawMultiLineMarker=function(t,e,n,i,r){var b,o=this.$padding,c=i.lineHeight,h=this.$getTop(e.start.row,i),v=o+e.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)?((b=e.clone()).end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(t,b,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+c+"px;right:"+o+"px;top:"+h+"px;left:"+v+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(e.end.row)?((b=e.clone()).start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(t,b,n+" ace_br12",i,null,r)):(h=this.$getTop(e.end.row,i),this.elt(n+" ace_br12","height:"+c+"px;width:"+e.end.column*i.characterWidth+"px;top:"+h+"px;left:"+o+"px;"+(r||""))),!((c=(e.end.row-e.start.row-1)*i.lineHeight)<=0)){h=this.$getTop(e.start.row+1,i);var w=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(w?" ace_br"+w:""),"height:"+c+"px;right:"+o+"px;top:"+h+"px;left:"+o+"px;"+(r||""))}},a.prototype.drawSingleLineMarker=function(t,e,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,n,i,r,o);var c=i.lineHeight,h=(e.end.column+(r||0)-e.start.column)*i.characterWidth,v=this.$getTop(e.start.row,i);this.elt(n,"height:"+c+"px;width:"+h+"px;top:"+v+"px;left:"+(this.$padding+e.start.column*i.characterWidth)+"px;"+(o||""))},a.prototype.drawBidiSingleLineMarker=function(t,e,n,i,r,o){var c=i.lineHeight,h=this.$getTop(e.start.row,i),v=this.$padding;this.session.$bidiHandler.getSelections(e.start.column,e.end.column).forEach(function(f){this.elt(n,"height:"+c+"px;width:"+(f.width+(r||0))+"px;top:"+h+"px;left:"+(v+f.left)+"px;"+(o||""))},this)},a.prototype.drawFullLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),c=i.lineHeight;e.start.row!=e.end.row&&(c+=this.$getTop(e.end.row,i)-o),this.elt(n,"height:"+c+"px;top:"+o+"px;left:0;right:0;"+(r||""))},a.prototype.drawScreenLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i);this.elt(n,"height:"+i.lineHeight+"px;top:"+o+"px;left:0;right:0;"+(r||""))},a}();function l(a,t,e,n){return(a?1:0)|(t?2:0)|(e?4:0)|(n?8:0)}y.prototype.$padding=0,x.Marker=y}),ace.define("ace/layer/text_util",["require","exports","module"],function(s,x,K){var k=new Set(["text","rparen","lparen"]);x.isTextToken=function($){return k.has($)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(s,x,K){"use strict";var k=s("../lib/oop"),$=s("../lib/dom"),y=s("../lib/lang"),l=s("./lines").Lines,a=s("../lib/event_emitter").EventEmitter,t=s("../config").nls,e=s("./text_util").isTextToken,n=function(){function i(r){this.dom=$,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",r.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return i.prototype.$updateEolChar=function(){var r=this.session.doc,c="\n"==r.getNewLineCharacter()&&"windows"!=r.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!0},i.prototype.setPadding=function(r){this.$padding=r,this.element.style.margin="0 "+r+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(r){this.$fontMetrics=r,this.$fontMetrics.on("changeCharacterSize",function(o){this._signal("changeCharacterSize",o)}.bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(r){this.session=r,r&&this.$computeTabString()},i.prototype.setShowInvisibles=function(r){return this.showInvisibles!=r&&(this.showInvisibles=r,"string"==typeof r?(this.showSpaces=/tab/i.test(r),this.showTabs=/space/i.test(r),this.showEOL=/eol/i.test(r)):this.showSpaces=this.showTabs=this.showEOL=r,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(r){return this.displayIndentGuides!=r&&(this.displayIndentGuides=r,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(r){return this.$highlightIndentGuides!==r&&(this.$highlightIndentGuides=r,r)},i.prototype.$computeTabString=function(){var r=this.session.getTabSize();this.tabSize=r;for(var o=this.$tabStrings=[0],c=1;cA&&(A=(u=this.session.getNextFoldLine(d=u.end.row+1,u))?u.start.row:1/0),!(d>v);){var _=b[f++];if(_){this.dom.removeChildren(_),this.$renderLine(_,d,d==A&&u),w&&(_.style.top=this.$lines.computeLineTop(d,r,this.session)+"px");var p=r.lineHeight*this.session.getRowLength(d)+"px";_.style.height!=p&&(w=!0,_.style.height=p)}d++}if(w)for(;f0;v--)this.$lines.shift();if(o.lastRow>r.lastRow)for(v=this.session.getFoldedRowCount(r.lastRow+1,o.lastRow);v>0;v--)this.$lines.pop();r.firstRowo.lastRow&&this.$lines.push(this.$renderLinesFragment(r,o.lastRow+1,r.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(r,o,c){for(var h=[],v=o,b=this.session.getNextFoldLine(v),f=b?b.start.row:1/0;v>f&&(f=(b=this.session.getNextFoldLine(v=b.end.row+1,b))?b.start.row:1/0),!(v>c);){var w=this.$lines.createCell(v,r,this.session),d=w.element;this.dom.removeChildren(d),$.setStyle(d.style,"height",this.$lines.computeLineHeight(v,r,this.session)+"px"),$.setStyle(d.style,"top",this.$lines.computeLineTop(v,r,this.session)+"px"),this.$renderLine(d,v,v==f&&b),d.className=this.$useLineGroups()?"ace_line_group":"ace_line",h.push(w),v++}return h},i.prototype.update=function(r){this.$lines.moveContainer(r),this.config=r;for(var o=r.firstRow,c=r.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(r,o,c))},i.prototype.$renderToken=function(r,o,c,h){for(var w,v=this,b=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,f=this.dom.createFragment(this.element),d=0;w=b.exec(h);){var u=w[1],A=w[2],_=w[3],p=w[4],E=w[5];if(v.showSpaces||!A){var m=d!=w.index?h.slice(d,w.index):"";if(d=w.index+w[0].length,m&&f.appendChild(this.dom.createTextNode(m,this.element)),u){var g=v.session.getScreenTabSize(o+w.index);f.appendChild(v.$tabStrings[g].cloneNode(!0)),o+=g-1}else A?v.showSpaces?((C=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",C.textContent=y.stringRepeat(v.SPACE_CHAR,A.length),f.appendChild(C)):f.appendChild(this.dom.createTextNode(A,this.element)):_?((C=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",C.textContent=y.stringRepeat(v.SPACE_CHAR,_.length),f.appendChild(C)):p?(o+=1,(C=this.dom.createElement("span")).style.width=2*v.config.characterWidth+"px",C.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=v.showSpaces?v.SPACE_CHAR:p,f.appendChild(C)):E&&(o+=1,(C=this.dom.createElement("span")).style.width=2*v.config.characterWidth+"px",C.className="ace_cjk",C.textContent=E,f.appendChild(C))}}if(f.appendChild(this.dom.createTextNode(d?h.slice(d):h,this.element)),e(c.type))r.appendChild(f);else{var S="ace_"+c.type.replace(/\./g," ace_"),C=this.dom.createElement("span");"fold"==c.type&&(C.style.width=c.value.length*this.config.characterWidth+"px",C.setAttribute("title",t("inline-fold.closed.title","Unfold code"))),C.className=S,C.appendChild(f),r.appendChild(C)}return o+h.length},i.prototype.renderIndentGuide=function(r,o,c){var h=o.search(this.$indentGuideRe);if(h<=0||h>=c)return o;if(" "==o[0]){for(var v=(h-=h%this.tabSize)/this.tabSize,b=0;bb[f].start.row?-1:1;break}if(!this.$highlightIndentGuideMarker.end&&""!==r[o.row]&&o.column===r[o.row].length)for(this.$highlightIndentGuideMarker.dir=1,f=o.row+1;f0)for(var v=0;v=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,o)}}else for(c=r.length-1;c>=0;c--)if(h=r[c],this.$highlightIndentGuideMarker.end&&h.row=b;)f=this.$renderToken(w,f,u,A.substring(0,b-h)),A=A.substring(b-h),h=b,w=this.$createLineElement(),r.appendChild(w),w.appendChild(this.dom.createTextNode(y.stringRepeat("\xa0",c.indent),this.element)),f=0,b=c[++v]||Number.MAX_VALUE;0!=A.length&&(h+=A.length,f=this.$renderToken(w,f,u,A))}}c[c.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(w,f,null,"",!0)},i.prototype.$renderSimpleLine=function(r,o){for(var c=0,h=0;hthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(r,c,v,b);c=this.$renderToken(r,c,v,b)}}},i.prototype.$renderOverflowMessage=function(r,o,c,h,v){c&&this.$renderToken(r,o,c,h.slice(0,this.MAX_LINE_LENGTH-o));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=v?"":"",r.appendChild(b)},i.prototype.$renderLine=function(r,o,c){if(!c&&0!=c&&(c=this.session.getFoldLine(o)),c)var h=this.$getFoldLineTokens(o,c);else h=this.session.getTokens(o);var v=r;if(h.length){var b=this.session.getRowSplitData(o);b&&b.length?(this.$renderWrappedLine(r,h,b),v=r.lastChild):(v=r,this.$useLineGroups()&&(v=this.$createLineElement(),r.appendChild(v)),this.$renderSimpleLine(v,h))}else this.$useLineGroups()&&(v=this.$createLineElement(),r.appendChild(v));if(this.showEOL&&v){c&&(o=c.end.row);var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_eol",f.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(f)}},i.prototype.$getFoldLineTokens=function(r,o){var c=this.session,h=[],b=c.getTokens(r);return o.walk(function(f,w,d,u,A){null!=f?h.push({type:"fold",value:f}):(A&&(b=c.getTokens(w)),b.length&&function v(f,w,d){for(var u=0,A=0;A+f[u].value.lengthd-w&&(_=_.substring(0,d-w)),h.push({type:f[u].type,value:_}),A=w+_.length,u+=1);Ad?{type:f[u].type,value:_.substring(0,d-A)}:f[u]),A+=_.length,u+=1}}(b,u,d))},o.end.row,this.session.getLine(o.end.row).length),h},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();n.prototype.EOF_CHAR="\xb6",n.prototype.EOL_CHAR_LF="\xac",n.prototype.EOL_CHAR_CRLF="\xa4",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="\u2014",n.prototype.SPACE_CHAR="\xb7",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,k.implement(n.prototype,a),x.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=function(){function y(l){this.element=k.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),k.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return y.prototype.$updateOpacity=function(l){for(var a=this.cursors,t=a.length;t--;)k.setStyle(a[t].style,"opacity",l?"":"0")},y.prototype.$startCssAnimation=function(){for(var l=this.cursors,a=l.length;a--;)l[a].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&k.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},y.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,k.removeCssClass(this.element,"ace_animate-blinking")},y.prototype.setPadding=function(l){this.$padding=l},y.prototype.setSession=function(l){this.session=l},y.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},y.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},y.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,k.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},y.prototype.addCursor=function(){var l=k.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},y.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},y.prototype.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},y.prototype.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},y.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,k.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&k.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),k.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var a=function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){l(!0),a()},this.blinkInterval),a()}else this.$stopCssAnimation()},y.prototype.getPixelPosition=function(l,a){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var t=this.session.documentToScreenPosition(l);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,l.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),top:(t.row-(a?this.config.firstRowScreen:0))*this.config.lineHeight}},y.prototype.isCursorInView=function(l,a){return l.top>=0&&l.topl.height+l.offset||i.top<0)&&t>1)){var r=this.cursors[e++]||this.addCursor(),o=r.style;this.drawCursor?this.drawCursor(r,i,l,a[t],this.session):this.isCursorInView(i,l)?(k.setStyle(o,"display","block"),k.translate(r,i.left,i.top),k.setStyle(o,"width",Math.round(l.characterWidth)+"px"),k.setStyle(o,"height",l.lineHeight+"px")):k.setStyle(o,"display","none")}}for(;this.cursors.length>e;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=i,this.restartTimer()},y.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?k.addCssClass(this.element,"ace_overwrite-cursors"):k.removeCssClass(this.element,"ace_overwrite-cursors"))},y.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},y}();$.prototype.$padding=0,$.prototype.drawCursor=null,x.Cursor=$}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=this&&this.__extends||function(){var r=function(o,c){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])})(o,c)};return function(o,c){if("function"!=typeof c&&null!==c)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function h(){this.constructor=o}r(o,c),o.prototype=null===c?Object.create(c):(h.prototype=c.prototype,new h)}}(),$=s("./lib/oop"),y=s("./lib/dom"),l=s("./lib/event"),a=s("./lib/event_emitter").EventEmitter,t=32768,e=function(){function r(o,c){this.element=y.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.inner=y.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return r.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},r}();$.implement(e.prototype,a);var n=function(r){function o(c,h){var v=r.call(this,c,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,h.$scrollbarWidth=v.width=y.scrollbarWidth(c.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return k(o,r),o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(c){this.element.style.height=c+"px"},o.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>t?(this.coeff=t/c,c=t):1!=this.coeff&&(this.coeff=1),this.inner.style.height=c+"px"},o.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff)},o}(e);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(r){function o(c,h){var v=r.call(this,c,"-h")||this;return v.scrollLeft=0,v.height=h.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return k(o,r),o.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.setWidth=function(c){this.element.style.width=c+"px"},o.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px"},o.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px"},o.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c)},o}(e);x.ScrollBar=n,x.ScrollBarV=n,x.ScrollBarH=i,x.VScrollBar=n,x.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=this&&this.__extends||function(){var i=function(r,o){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var v in h)Object.prototype.hasOwnProperty.call(h,v)&&(c[v]=h[v])})(r,o)};return function(r,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function c(){this.constructor=r}i(r,o),r.prototype=null===o?Object.create(o):(c.prototype=o.prototype,new c)}}(),$=s("./lib/oop"),y=s("./lib/dom"),l=s("./lib/event"),a=s("./lib/event_emitter").EventEmitter;y.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var t=function(){function i(r,o){this.element=y.createElement("div"),this.element.className="ace_sb"+o,this.inner=y.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},i}();$.implement(t.prototype,a);var e=function(i){function r(o,c){var h=i.call(this,o,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,h.parent=o,h.width=h.VScrollWidth,h.renderer=c,h.inner.style.width=h.element.style.width=(h.width||15)+"px",h.$minWidth=0,h}return k(r,i),r.prototype.onMouseDown=function(o,c){if("mousedown"===o&&0===l.getButton(c)&&2!==c.detail){if(c.target===this.inner){var h=this,v=c.clientY,w=c.clientY,d=this.thumbTop;l.capture(this.inner,function(p){v=p.clientY},function(){clearInterval(A)});var A=setInterval(function(){if(void 0!==v){var p=h.scrollTopFromThumbTop(d+v-w);p!==h.scrollTop&&h._emit("scroll",{data:p})}},20);return l.preventDefault(c)}var _=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(_)}),l.preventDefault(c)}},r.prototype.getHeight=function(){return this.height},r.prototype.scrollTopFromThumbTop=function(o){var c=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(c|=0)<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},r.prototype.setScrollHeight=function(o,c){this.pageHeight===o&&!c||(this.pageHeight=o,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},r.prototype.setScrollTop=function(o){this.scrollTop=o,o<0&&(o=0),this.thumbTop=o*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},r}(t);e.prototype.setInnerHeight=e.prototype.setScrollHeight;var n=function(i){function r(o,c){var h=i.call(this,o,"-h")||this;return h.scrollLeft=0,h.scrollWidth=0,h.height=h.HScrollHeight,h.inner.style.height=h.element.style.height=(h.height||12)+"px",h.renderer=c,h}return k(r,i),r.prototype.onMouseDown=function(o,c){if("mousedown"===o&&0===l.getButton(c)&&2!==c.detail){if(c.target===this.inner){var h=this,v=c.clientX,w=c.clientX,d=this.thumbLeft;l.capture(this.inner,function(p){v=p.clientX},function(){clearInterval(A)});var A=setInterval(function(){if(void 0!==v){var p=h.scrollLeftFromThumbLeft(d+v-w);p!==h.scrollLeft&&h._emit("scroll",{data:p})}},20);return l.preventDefault(c)}var _=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(_)}),l.preventDefault(c)}},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.scrollLeftFromThumbLeft=function(o){var c=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(c|=0)<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},r.prototype.setWidth=function(o){this.width=Math.max(0,o),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},r.prototype.setScrollWidth=function(o,c){this.pageWidth===o&&!c||(this.pageWidth=o,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},r.prototype.setScrollLeft=function(o){this.scrollLeft=o,o<0&&(o=0),this.thumbLeft=o*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},r}(t);n.prototype.setInnerWidth=n.prototype.setScrollWidth,x.ScrollBar=e,x.ScrollBarV=e,x.ScrollBarH=n,x.VScrollBar=e,x.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(s,x,K){"use strict";var k=s("./lib/event"),$=function(){function y(l,a){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=a||window;var t=this;this._flush=function(e){t.pending=!1;var n=t.changes;if(n&&(k.blockIdle(100),t.changes=0,t.onRender(n)),t.changes){if(t.$recursionLimit--<0)return;t.schedule()}else t.$recursionLimit=2}}return y.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(k.nextFrame(this._flush),this.pending=!0)},y.prototype.clear=function(l){var a=this.changes;return this.changes=0,a},y}();x.RenderLoop=$}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(s,x,K){var k=s("../lib/oop"),$=s("../lib/dom"),y=s("../lib/lang"),l=s("../lib/event"),a=s("../lib/useragent"),t=s("../lib/event_emitter").EventEmitter,e=512,n="function"==typeof ResizeObserver,i=200,r=function(){function o(c){this.el=$.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=$.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=$.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),c.appendChild(this.el),this.$measureNode.textContent=y.stringRepeat("X",e),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(c,h){c.width=c.height="auto",c.left=c.top="0px",c.visibility="hidden",c.position="absolute",c.whiteSpace="pre",a.isIE<8?c["font-family"]="inherit":c.font="inherit",c.overflow=h?"hidden":"visible"},o.prototype.checkForSizeChanges=function(c){if(void 0===c&&(c=this.$measureSizes()),c&&(this.$characterSize.width!==c.width||this.$characterSize.height!==c.height)){this.$measureNode.style.fontWeight="bold";var h=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=c,this.charSizes=Object.create(null),this.allowBoldFonts=h&&h.width===c.width&&h.height===c.height,this._emit("changeCharacterSize",{data:c})}},o.prototype.$addObserver=function(){var c=this;this.$observer=new window.ResizeObserver(function(h){c.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var c=this;return this.$pollSizeChangesTimer=l.onIdle(function h(){c.checkForSizeChanges(),l.onIdle(h,500)},500)},o.prototype.setPolling=function(c){c?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(c){var h={height:(c||this.$measureNode).clientHeight,width:(c||this.$measureNode).clientWidth/e};return 0===h.width||0===h.height?null:h},o.prototype.$measureCharWidth=function(c){return this.$main.textContent=y.stringRepeat(c,e),this.$main.getBoundingClientRect().width/e},o.prototype.getCharacterWidth=function(c){var h=this.charSizes[c];return void 0===h&&(h=this.charSizes[c]=this.$measureCharWidth(c)/this.$characterSize.width),h},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},o.prototype.$getZoom=function(c){return c&&c.parentElement?(Number(window.getComputedStyle(c).zoom)||1)*this.$getZoom(c.parentElement):1},o.prototype.$initTransformMeasureNodes=function(){var c=function(h,v){return["div",{style:"position: absolute;top:"+h+"px;left:"+v+"px;"}]};this.els=$.buildDom([c(0,0),c(i,0),c(0,i),c(i,i)],this.el)},o.prototype.transformCoordinates=function(c,h){function b(O,T,U){var B=O[1]*T[0]-O[0]*T[1];return[(-T[1]*U[0]+T[0]*U[1])/B,(+O[1]*U[0]-O[0]*U[1])/B]}function f(O,T){return[O[0]-T[0],O[1]-T[1]]}function w(O,T){return[O[0]+T[0],O[1]+T[1]]}function d(O,T){return[O*T[0],O*T[1]]}function u(O){var T=O.getBoundingClientRect();return[T.left,T.top]}c&&(c=d(1/this.$getZoom(this.el),c)),this.els||this.$initTransformMeasureNodes();var A=u(this.els[0]),_=u(this.els[1]),p=u(this.els[2]),E=u(this.els[3]),m=b(f(E,_),f(E,p),f(w(_,p),w(E,A))),g=d(1+m[0],f(_,A)),C=d(1+m[1],f(p,A));if(h){var S=h,F=m[0]*S[0]/i+m[1]*S[1]/i+1,L=w(d(S[0],g),d(S[1],C));return w(d(1/F/i,L),A)}var D=f(c,A),R=b(f(g,d(m[0],D)),f(C,d(m[1],D)),D);return d(i,R)},o}();r.prototype.$characterSize={width:0,height:0},k.implement(r.prototype,t),x.FontMetrics=r}),ace.define("ace/css/editor-css",["require","exports","module"],function(s,x,K){K.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "\u21a9";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=s("../lib/oop"),y=s("../lib/event_emitter").EventEmitter,l=function(){function a(t,e){this.canvas=k.createElement("canvas"),this.renderer=e,this.pixelRatio=1,this.maxHeight=e.layerConfig.maxHeight,this.lineHeight=e.layerConfig.lineHeight,this.canvasHeight=t.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=t.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},t.element.appendChild(this.canvas)}return a.prototype.$updateDecorators=function(t){var e=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;t&&(this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height,this.heightRatio=(t.lastRow+1)*this.lineHeightm.priority?1:0});for(var h=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&(_=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(_-this.halfMinDecorationHeight),u=Math.round(_+this.halfMinDecorationHeight)}i.fillStyle=e[o[v].type]||null,i.fillRect(0,w,this.canvasWidth,u-d)}}var p=this.renderer.session.selection.getCursor();p&&(f=this.compensateFoldRows(p.row,h),w=Math.round((p.row-f)*this.lineHeight*this.heightRatio),i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,w,this.canvasWidth,2))},a.prototype.compensateFoldRows=function(t,e){var n=0;if(e&&e.length>0)for(var i=0;ie[i].start.row&&t=e[i].end.row&&(n+=e[i].end.row-e[i].start.row);return n},a}();$.implement(l.prototype,y),x.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(s,x,K){"use strict";var k=s("./lib/oop"),$=s("./lib/dom"),y=s("./lib/lang"),l=s("./config"),a=s("./layer/gutter").Gutter,t=s("./layer/marker").Marker,e=s("./layer/text").Text,n=s("./layer/cursor").Cursor,i=s("./scrollbar").HScrollBar,r=s("./scrollbar").VScrollBar,o=s("./scrollbar_custom").HScrollBar,c=s("./scrollbar_custom").VScrollBar,h=s("./renderloop").RenderLoop,v=s("./layer/font_metrics").FontMetrics,b=s("./lib/event_emitter").EventEmitter,f=s("./css/editor-css"),w=s("./layer/decorators").Decorator,d=s("./lib/useragent"),u=s("./layer/text_util").isTextToken;$.importCssString(f,"ace_editor.css",!1);var A=function(){function _(p,E){var m=this;this.container=p||$.createElement("div"),$.addCssClass(this.container,"ace_editor"),$.HI_DPI&&$.addCssClass(this.container,"ace_hidpi"),this.setTheme(E),null==l.get("useStrictCSP")&&l.set("useStrictCSP",!1),this.$gutter=$.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=$.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=$.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new t(this.content);var g=this.$textLayer=new e(this.content);this.canvas=g.element,this.$markerFront=new t(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(C){m.$scrollAnimation||m.session.setScrollTop(C.data-m.scrollMargin.top)}),this.scrollBarH.on("scroll",function(C){m.$scrollAnimation||m.session.setScrollLeft(C.data-m.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(C){m.updateCharacterSize(),m.onResize(!0,m.gutterWidth,m.$size.width,m.$size.height),m._signal("changeCharacterSize",C)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!d.isIOS,this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return _.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),$.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},_.prototype.setSession=function(p){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=p,p&&this.scrollMargin.top&&p.getScrollTop()<=0&&p.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(p),this.$markerBack.setSession(p),this.$markerFront.setSession(p),this.$gutterLayer.setSession(p),this.$textLayer.setSession(p),p&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},_.prototype.updateLines=function(p,E,m){if(void 0===E&&(E=1/0),this.$changedLines?(this.$changedLines.firstRow>p&&(this.$changedLines.firstRow=p),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},_.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},_.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},_.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},_.prototype.updateFull=function(p){p?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},_.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},_.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},_.prototype.onResize=function(p,E,m,g){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=p?1:0;var C=this.container;g||(g=C.clientHeight||C.scrollHeight),!g&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||"0px"==C.style.height)&&(C.style.height="1px",g=C.clientHeight||C.scrollHeight),m||(m=C.clientWidth||C.scrollWidth);var S=this.$updateCachedSize(p,E,m,g);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!m&&!g)return this.resizing=0;p&&(this.$gutterLayer.$padding=null),p?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},_.prototype.$updateCachedSize=function(p,E,m,g){var C=0,S=this.$size,F={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if((g-=this.$extraHeight||0)&&(p||S.height!=g)&&(S.height=g,C|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C|=this.CHANGE_SCROLL),m&&(p||S.width!=m)){C|=this.CHANGE_SIZE,S.width=m,null==E&&(E=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=E,$.setStyle(this.scrollBarH.element.style,"left",E+"px"),$.setStyle(this.scroller.style,"left",E+this.margin.left+"px"),S.scrollerWidth=Math.max(0,m-E-this.scrollBarV.getWidth()-this.margin.h),$.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";$.setStyle(this.scrollBarH.element.style,"right",L),$.setStyle(this.scroller.style,"right",L),$.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||p)&&(C|=this.CHANGE_FULL)}return S.$dirty=!m||!g,C&&this._signal("resize",F),C},_.prototype.onGutterResize=function(p){var E=this.$showGutter?p:0;E!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,E,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},_.prototype.adjustWrapLimit=function(){var E=Math.floor((this.$size.scrollerWidth-2*this.$padding)/this.characterWidth);return this.session.adjustWrapLimit(E,this.$showPrintMargin&&this.$printMarginColumn)},_.prototype.setAnimatedScroll=function(p){this.setOption("animatedScroll",p)},_.prototype.getAnimatedScroll=function(){return this.$animatedScroll},_.prototype.setShowInvisibles=function(p){this.setOption("showInvisibles",p),this.session.$bidiHandler.setShowInvisibles(p)},_.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},_.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},_.prototype.setDisplayIndentGuides=function(p){this.setOption("displayIndentGuides",p)},_.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},_.prototype.setHighlightIndentGuides=function(p){this.setOption("highlightIndentGuides",p)},_.prototype.setShowPrintMargin=function(p){this.setOption("showPrintMargin",p)},_.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},_.prototype.setPrintMarginColumn=function(p){this.setOption("printMarginColumn",p)},_.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},_.prototype.getShowGutter=function(){return this.getOption("showGutter")},_.prototype.setShowGutter=function(p){return this.setOption("showGutter",p)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.setFadeFoldWidgets=function(p){this.setOption("fadeFoldWidgets",p)},_.prototype.setHighlightGutterLine=function(p){this.setOption("highlightGutterLine",p)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var p=$.createElement("div");p.className="ace_layer ace_print-margin-layer",this.$printMarginEl=$.createElement("div"),this.$printMarginEl.className="ace_print-margin",p.appendChild(this.$printMarginEl),this.content.insertBefore(p,this.content.firstChild)}var E=this.$printMarginEl.style;E.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",E.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},_.prototype.getContainerElement=function(){return this.container},_.prototype.getMouseEventTarget=function(){return this.scroller},_.prototype.getTextAreaContainer=function(){return this.container},_.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var p=this.textarea.style,E=this.$composition;if(!this.$keepTextAreaAtCursor&&!E)return void $.translate(this.textarea,-100,0);var m=this.$cursorLayer.$pixelPos;if(m){E&&E.markerRange&&(m=this.$cursorLayer.getPixelPosition(E.markerRange.start,!0));var g=this.layerConfig,C=m.top,S=m.left,F=E&&E.useTextareaForIME||d.isMobile?this.lineHeight:1;if((C-=g.offset)<0||C>g.height-F)return void $.translate(this.textarea,0,0);var L=1,D=this.$size.height-F;E?E.useTextareaForIME?L=this.characterWidth*this.session.$getStringScreenWidth(this.textarea.value)[0]:C+=this.lineHeight+2:C+=this.lineHeight,(S-=this.scrollLeft)>this.$size.scrollerWidth-L&&(S=this.$size.scrollerWidth-L),S+=this.gutterWidth+this.margin.left,$.setStyle(p,"height",F+"px"),$.setStyle(p,"width",L+"px"),$.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-L),Math.min(C,D))}}},_.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},_.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},_.prototype.getLastFullyVisibleRow=function(){var p=this.layerConfig,E=p.lastRow;return this.session.documentToScreenRow(E,0)*p.lineHeight-this.session.getScrollTop()>p.height-p.lineHeight?E-1:E},_.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},_.prototype.setPadding=function(p){this.$padding=p,this.$textLayer.setPadding(p),this.$cursorLayer.setPadding(p),this.$markerFront.setPadding(p),this.$markerBack.setPadding(p),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},_.prototype.setScrollMargin=function(p,E,m,g){var C=this.scrollMargin;C.top=0|p,C.bottom=0|E,C.right=0|g,C.left=0|m,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},_.prototype.setMargin=function(p,E,m,g){var C=this.margin;C.top=0|p,C.bottom=0|E,C.right=0|g,C.left=0|m,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},_.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},_.prototype.setHScrollBarAlwaysVisible=function(p){this.setOption("hScrollBarAlwaysVisible",p)},_.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},_.prototype.setVScrollBarAlwaysVisible=function(p){this.setOption("vScrollBarAlwaysVisible",p)},_.prototype.$updateScrollBarV=function(){var p=this.layerConfig.maxHeight,E=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>(p-=(E-this.lineHeight)*this.$scrollPastEnd)-E&&(p=this.scrollTop+E,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(p+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},_.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},_.prototype.freeze=function(){this.$frozen=!0},_.prototype.unfreeze=function(){this.$frozen=!1},_.prototype.$renderChanges=function(p,E){if(this.$changes&&(p|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(p||E)){if(this.$size.$dirty)return this.$changes|=p,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",p),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var m=this.layerConfig;if(p&this.CHANGE_FULL||p&this.CHANGE_SIZE||p&this.CHANGE_TEXT||p&this.CHANGE_LINES||p&this.CHANGE_SCROLL||p&this.CHANGE_H_SCROLL){if(p|=this.$computeLayerConfig()|this.$loop.clear(),m.firstRow!=this.layerConfig.firstRow&&m.firstRowScreen==this.layerConfig.firstRowScreen){var g=this.scrollTop+(m.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;g>0&&(this.scrollTop=g,p|=this.CHANGE_SCROLL,p|=this.$computeLayerConfig()|this.$loop.clear())}m=this.layerConfig,this.$updateScrollBarV(),p&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),$.translate(this.content,-this.scrollLeft,-m.offset);var S=m.minHeight+"px";$.setStyle(this.content.style,"width",m.width+2*this.$padding+"px"),$.setStyle(this.content.style,"height",S)}return p&this.CHANGE_H_SCROLL&&($.translate(this.content,-this.scrollLeft,-m.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),p&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(m),this.$showGutter&&this.$gutterLayer.update(m),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(m),this.$markerBack.update(m),this.$markerFront.update(m),this.$cursorLayer.update(m),this.$moveTextAreaToCursor(),void this._signal("afterRender",p)):p&this.CHANGE_SCROLL?(this.$changedLines=null,p&this.CHANGE_TEXT||p&this.CHANGE_LINES?this.$textLayer.update(m):this.$textLayer.scrollLines(m),this.$showGutter&&(p&this.CHANGE_GUTTER||p&this.CHANGE_LINES?this.$gutterLayer.update(m):this.$gutterLayer.scrollLines(m)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(m),this.$markerBack.update(m),this.$markerFront.update(m),this.$cursorLayer.update(m),this.$moveTextAreaToCursor(),void this._signal("afterRender",p)):(p&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(m),this.$showGutter&&this.$gutterLayer.update(m),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(m)):p&this.CHANGE_LINES?((this.$updateLines()||p&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(m),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(m)):p&this.CHANGE_TEXT||p&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(m),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(m)):p&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(m),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(m)),p&this.CHANGE_CURSOR&&(this.$cursorLayer.update(m),this.$moveTextAreaToCursor()),p&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(m),p&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(m),void this._signal("afterRender",p))}this.$changes|=p},_.prototype.$autosize=function(){var p=this.session.getScreenLength()*this.lineHeight,E=this.$maxLines*this.lineHeight,m=Math.min(E,Math.max((this.$minLines||1)*this.lineHeight,p))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(m+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&m>this.$maxPixelHeight&&(m=this.$maxPixelHeight);var C=!(m<=2*this.lineHeight)&&p>E;if(m!=this.desiredHeight||this.$size.height!=this.desiredHeight||C!=this.$vScroll){C!=this.$vScroll&&(this.$vScroll=C,this.scrollBarV.setVisible(C));var S=this.container.clientWidth;this.container.style.height=m+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,m),this.desiredHeight=m,this._signal("autosize")}},_.prototype.$computeLayerConfig=function(){var p=this.session,E=this.$size,m=E.height<=2*this.lineHeight,C=this.session.getScreenLength()*this.lineHeight,S=this.$getLongestLine(),F=!m&&(this.$hScrollBarAlwaysVisible||E.scrollerWidth-S-2*this.$padding<0),L=this.$horizScroll!==F;L&&(this.$horizScroll=F,this.scrollBarH.setVisible(F));var D=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var R=E.scrollerHeight+this.lineHeight,O=!this.$maxLines&&this.$scrollPastEnd?(E.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;C+=O;var T=this.scrollMargin;this.session.setScrollTop(Math.max(-T.top,Math.min(this.scrollTop,C-E.scrollerHeight+T.bottom))),this.session.setScrollLeft(Math.max(-T.left,Math.min(this.scrollLeft,S+2*this.$padding-E.scrollerWidth+T.right)));var U=!m&&(this.$vScrollBarAlwaysVisible||E.scrollerHeight-C+O<0||this.scrollTop>T.top),B=D!==U;B&&(this.$vScroll=U,this.scrollBarV.setVisible(U));var Y,V,P=this.scrollTop%this.lineHeight,W=Math.ceil(R/this.lineHeight)-1,z=Math.max(0,Math.round((this.scrollTop-P)/this.lineHeight)),G=z+W,j=this.lineHeight;z=p.screenToDocumentRow(z,0);var Z=p.getFoldLine(z);Z&&(z=Z.start.row),Y=p.documentToScreenRow(z,0),V=p.getRowLength(z)*j,G=Math.min(p.screenToDocumentRow(G,0),p.getLength()-1),R=E.scrollerHeight+p.getRowLength(G)*j+V,P=this.scrollTop-Y*j;var Q=0;return(this.layerConfig.width!=S||L)&&(Q=this.CHANGE_H_SCROLL),(L||B)&&(Q|=this.$updateCachedSize(!0,this.gutterWidth,E.width,E.height),this._signal("scrollbarVisibilityChanged"),B&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:z,firstRowScreen:Y,lastRow:G,lineHeight:j,characterWidth:this.characterWidth,minHeight:R,maxHeight:C,offset:P,gutterOffset:j?Math.max(0,Math.ceil((P+E.height-E.scrollerHeight)/j)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Q},_.prototype.$updateLines=function(){if(this.$changedLines){var p=this.$changedLines.firstRow,E=this.$changedLines.lastRow;this.$changedLines=null;var m=this.layerConfig;if(!(p>m.lastRow+1||Ethis.$textLayer.MAX_LINE_LENGTH&&(p=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(p*this.characterWidth))},_.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},_.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},_.prototype.addGutterDecoration=function(p,E){this.$gutterLayer.addGutterDecoration(p,E)},_.prototype.removeGutterDecoration=function(p,E){this.$gutterLayer.removeGutterDecoration(p,E)},_.prototype.updateBreakpoints=function(p){this._rows=p,this.$loop.schedule(this.CHANGE_GUTTER)},_.prototype.setAnnotations=function(p){this.$gutterLayer.setAnnotations(p),this.$loop.schedule(this.CHANGE_GUTTER)},_.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},_.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},_.prototype.showCursor=function(){this.$cursorLayer.showCursor()},_.prototype.scrollSelectionIntoView=function(p,E,m){this.scrollCursorIntoView(p,m),this.scrollCursorIntoView(E,m)},_.prototype.scrollCursorIntoView=function(p,E,m){if(0!==this.$size.scrollerHeight){var g=this.$cursorLayer.getPixelPosition(p),C=g.left,S=g.top,F=m&&m.top||0,L=m&&m.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var D=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;D+F>S?(E&&D+F>S+this.lineHeight&&(S-=E*this.$size.scrollerHeight),0===S&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):D+this.$size.scrollerHeight-L=1-this.scrollMargin.top||E>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||p<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||p>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},_.prototype.pixelToScreenCoordinates=function(p,E){var m;if(this.$hasCssTransforms){m={top:0,left:0};var g=this.$fontMetrics.transformCoordinates([p,E]);p=g[1]-this.gutterWidth-this.margin.left,E=g[0]}else m=this.scroller.getBoundingClientRect();var C=p+this.scrollLeft-m.left-this.$padding,S=C/this.characterWidth,F=Math.floor((E+this.scrollTop-m.top)/this.lineHeight),L=this.$blockCursor?Math.floor(S):Math.round(S);return{row:F,column:L,side:S-L>0?1:-1,offsetX:C}},_.prototype.screenToTextCoordinates=function(p,E){var m;if(this.$hasCssTransforms){m={top:0,left:0};var g=this.$fontMetrics.transformCoordinates([p,E]);p=g[1]-this.gutterWidth-this.margin.left,E=g[0]}else m=this.scroller.getBoundingClientRect();var C=p+this.scrollLeft-m.left-this.$padding,S=C/this.characterWidth,F=this.$blockCursor?Math.floor(S):Math.round(S),L=Math.floor((E+this.scrollTop-m.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(F,0),C)},_.prototype.textToScreenCoordinates=function(p,E){var m=this.scroller.getBoundingClientRect(),g=this.session.documentToScreenPosition(p,E),C=this.$padding+(this.session.$bidiHandler.isBidiRow(g.row,p)?this.session.$bidiHandler.getPosLeft(g.column):Math.round(g.column*this.characterWidth));return{pageX:m.left+C-this.scrollLeft,pageY:m.top+g.row*this.lineHeight-this.scrollTop}},_.prototype.visualizeFocus=function(){$.addCssClass(this.container,"ace_focus")},_.prototype.visualizeBlur=function(){$.removeCssClass(this.container,"ace_focus")},_.prototype.showComposition=function(p){this.$composition=p,p.cssText||(p.cssText=this.textarea.style.cssText),null==p.useTextareaForIME&&(p.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?($.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):p.markerId=this.session.addMarker(p.markerRange,"ace_composition_marker","text")},_.prototype.setCompositionText=function(p){var E=this.session.selection.cursor;this.addToken(p,"composition_placeholder",E.row,E.column),this.$moveTextAreaToCursor()},_.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),$.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var p=this.session.selection.cursor;this.removeExtraToken(p.row,p.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},_.prototype.setGhostText=function(p,E){var m=this.session.selection.cursor,g=E||{row:m.row,column:m.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks(p,g);this.addToken(C[0].text,"ghost_text",g.row,g.column),this.$ghostText={text:p,position:{row:g.row,column:g.column}};var S=$.createElement("div");if(C.length>1){var L,F=this.hideTokensAfterPosition(g.row,g.column);C.slice(1).forEach(function(B){var P=$.createElement("div"),W=$.createElement("span");W.className="ace_ghost_text",B.wrapped&&(P.className="ghost_text_line_wrapped"),0===B.text.length&&(B.text=" "),W.appendChild($.createTextNode(B.text)),P.appendChild(W),S.appendChild(P),L=P}),F.forEach(function(B){var P=$.createElement("span");u(B.type)||(P.className="ace_"+B.type.replace(/\./g," ace_")),P.appendChild($.createTextNode(B.value)),L.appendChild(P)}),this.$ghostTextWidget={el:S,row:g.row,column:g.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var D=this.$cursorLayer.getPixelPosition(g,!0),O=this.container.getBoundingClientRect().height,T=C.length*this.lineHeight;if(T0){var R=0;D.push(C[F].length);for(var O=0;O1||Math.abs(p.$size.height-g)>1?p.$resizeTimer.delay():p.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},_}();A.prototype.CHANGE_CURSOR=1,A.prototype.CHANGE_MARKER=2,A.prototype.CHANGE_GUTTER=4,A.prototype.CHANGE_SCROLL=8,A.prototype.CHANGE_LINES=16,A.prototype.CHANGE_TEXT=32,A.prototype.CHANGE_SIZE=64,A.prototype.CHANGE_MARKER_BACK=128,A.prototype.CHANGE_MARKER_FRONT=256,A.prototype.CHANGE_FULL=512,A.prototype.CHANGE_H_SCROLL=1024,A.prototype.$changes=0,A.prototype.$padding=null,A.prototype.$frozen=!1,A.prototype.STEPS=8,k.implement(A.prototype,b),l.defineOptions(A.prototype,"renderer",{useResizeObserver:{set:function(_){!_&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):_&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(_){this.$textLayer.setShowInvisibles(_)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(_){"number"==typeof _&&(this.$printMarginColumn=_),this.$showPrintMargin=!!_,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(_){this.$gutter.style.display=_?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(_){this.$gutterLayer.$useSvgGutterIcons=_},initialValue:!1},showFoldedAnnotations:{set:function(_){this.$gutterLayer.$showFoldedAnnotations=_},initialValue:!1},fadeFoldWidgets:{set:function(_){$.setCssClass(this.$gutter,"ace_fade-fold-widgets",_)},initialValue:!1},showFoldWidgets:{set:function(_){this.$gutterLayer.setShowFoldWidgets(_),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(_){this.$textLayer.setDisplayIndentGuides(_)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(_){1==this.$textLayer.setHighlightIndentGuides(_)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(_){this.$gutterLayer.setHighlightGutterLine(_),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(_){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(_){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(_){"number"==typeof _&&(_+="px"),this.container.style.fontSize=_,this.updateFontSize()},initialValue:12},fontFamily:{set:function(_){this.container.style.fontFamily=_,this.updateFontSize()}},maxLines:{set:function(_){this.updateFull()}},minLines:{set:function(_){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(_){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(_){this.$scrollPastEnd!=(_=+_||0)&&(this.$scrollPastEnd=_,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(_){this.$gutterLayer.$fixedWidth=!!_,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(_){this.$updateCustomScrollbar(_)},initialValue:!1},theme:{set:function(_){this.setTheme(_)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),x.VirtualRenderer=A}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(s,x,K){"use strict";var k=s("../lib/oop"),$=s("../lib/net"),y=s("../lib/event_emitter").EventEmitter,l=s("../config");function t(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var r=function a(i){var r="importScripts('"+$.qualifyURL(i)+"');";try{return new Blob([r],{type:"application/javascript"})}catch{var c=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return c.append(r),c.getBlob("application/javascript")}}(i),c=(window.URL||window.webkitURL).createObjectURL(r);return new Worker(c)}return new Worker(i)}var e=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){k.implement(this,y),this.$createWorkerFromOldConfig=function(i,r,o,c,h){if(s.nameToUrl&&!s.toUrl&&(s.toUrl=s.nameToUrl),l.get("packaged")||!s.toUrl)c=c||l.moduleUrl(r,"worker");else{var v=this.$normalizePath;c=c||v(s.toUrl("ace/worker/worker.js",null,"_"));var b={};i.forEach(function(f){b[f]=v(s.toUrl(f,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(c),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:b,module:r,classname:o}),this.$worker},this.onMessage=function(i){var r=i.data;switch(r.type){case"event":this._signal(r.name,{data:r.data});break;case"call":var o=this.callbacks[r.id];o&&(o(r.data),delete this.callbacks[r.id]);break;case"error":this.reportError(r.data);break;case"log":window.console&&console.log&&console.log.apply(console,r.data)}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return $.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,r){this.$worker.postMessage({command:i,args:r})},this.call=function(i,r,o){if(o){var c=this.callbackId++;this.callbacks[c]=o,r.push(c)}this.send(i,r)},this.emit=function(i,r){try{r.data&&r.data.err&&(r.data.err={message:r.data.err.message,stack:r.data.err.stack,code:r.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:r.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),this.deltaQueue.push(i.start,"insert"==i.action?i.lines:i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(e.prototype),x.UIWorkerClient=function(i,r,o){var c=null,h=!1,v=Object.create(y),b=[],f=new e({messageBuffer:b,terminate:function(){},postMessage:function(d){b.push(d),c&&(h?setTimeout(w):w())}});f.setEmitSync=function(d){h=d};var w=function(){var d=b.shift();d.command?c[d.command].apply(c,d.args):d.event&&v._signal(d.event,d.data)};return v.postMessage=function(d){f.onMessage({data:d})},v.callback=function(d,u){this.postMessage({type:"call",id:u,data:d})},v.emit=function(d,u){this.postMessage({type:"event",name:d,data:u})},l.loadModule(["worker",r],function(d){for(c=new d[o](v);b.length;)w()}),f},x.WorkerClient=e,x.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(s,x,K){"use strict";var k=s("./range").Range,$=s("./lib/event_emitter").EventEmitter,y=s("./lib/oop"),l=function(){function a(t,e,n,i,r,o){var c=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){c.onCursorChange()})},this.$pos=n;var h=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return a.prototype.setup=function(){var t=this,e=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new k(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){var o=e.createAnchor(r.row,r.column);o.$insertRight=!0,o.detach(),t.others.push(o)}),n.setUndoSelect(!1)},a.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=t.addMarker(new k(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1)})}},a.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t=this.pos.column&&e.start.column<=this.pos.column+this.length+1,r=e.start.column-this.pos.column;if(this.updateAnchors(t),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===t.action)for(var o=this.others.length-1;o>=0;o--)this.doc.insertMergedLines(h={row:(c=this.others[o]).row,column:c.column+r},t.lines);else if("remove"===t.action)for(o=this.others.length-1;o>=0;o--){var c,h;this.doc.remove(new k((h={row:(c=this.others[o]).row,column:c.column+r}).row,h.column,h.row,h.column-n))}this.$updating=!1,this.updateMarkers()}},a.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},a.prototype.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,n=function(r,o){e.removeMarker(r.markerId),r.markerId=e.addMarker(new k(r.row,r.column,r.row,r.column+t.length),o,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},a.prototype.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},a.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},a.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;n1?$.multiSelect.joinSelections():$.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function($){$.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function($){$.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function($){$.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],x.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function($){$.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function($){return $&&$.inMultiSelectMode}}];var k=s("../keyboard/hash_handler").HashHandler;x.keyboardHandler=new k(x.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(s,x,K){var k=s("./range_list").RangeList,$=s("./range").Range,y=s("./selection").Selection,l=s("./mouse/multi_select_handler").onMouseDown,a=s("./lib/event"),t=s("./lib/lang"),e=s("./commands/multi_select_commands");x.commands=e.defaultCommands.concat(e.multiSelectCommands);var i=new(0,s("./search").Search),o=s("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(f,w){if(f){if(!this.inMultiSelectMode&&0===this.rangeCount){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(f),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),w||this.fromOrientedRange(f);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d)}f.cursor||(f.cursor=f.end);var u=this.rangeList.add(f);return this.$onAddRange(f),u.length&&this.$onRemoveRange(u),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(f)}},this.toSingleRange=function(f){f=f||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),f&&this.fromOrientedRange(f)},this.substractPoint=function(f){var w=this.rangeList.substractPoint(f);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var f=this.rangeList.merge();f.length&&this.$onRemoveRange(f)},this.$onAddRange=function(f){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(f),this._signal("addRange",{range:f})},this.$onRemoveRange=function(f){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();f.push(w),this.rangeCount=0}for(var d=f.length;d--;){var u=this.ranges.indexOf(f[d]);this.ranges.splice(u,1)}this._signal("removeRange",{ranges:f}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(w=w||this.ranges[0])&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new k,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var f=this.ranges.length?this.ranges:[this.getRange()],w=[],d=0;d1){var f=this.rangeList.ranges,w=f[f.length-1],d=$.fromPoints(f[0].start,w.end);this.toSingleRange(),this.setSelectionRange(d,w.cursor==w.start)}else{var u=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(u,A).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(f,w,d){var u=[],A=f.column0;)R--;if(R>0)for(var O=0;u[O].isEmpty();)O++;for(var T=R;T>=O;T--)u[T].isEmpty()&&u.splice(T,1)}return u}}.call(y.prototype);var c=s("./editor").Editor;function h(f,w){return f.row==w.row&&f.column==w.column}function v(f){f.$multiselectOnSessionChange||(f.$onAddRange=f.$onAddRange.bind(f),f.$onRemoveRange=f.$onRemoveRange.bind(f),f.$onMultiSelect=f.$onMultiSelect.bind(f),f.$onSingleSelect=f.$onSingleSelect.bind(f),f.$multiselectOnSessionChange=x.onSessionChange.bind(f),f.$checkMultiselectChange=f.$checkMultiselectChange.bind(f),f.$multiselectOnSessionChange(f),f.on("changeSession",f.$multiselectOnSessionChange),f.on("mousedown",l),f.commands.addCommands(e.defaultCommands),function b(f){if(f.textInput){var w=f.textInput.getElement(),d=!1;a.addListener(w,"keydown",function(A){f.$blockSelectEnabled&&18==A.keyCode&&!(A.ctrlKey||A.shiftKey||A.metaKey)?d||(f.renderer.setMouseCursor("crosshair"),d=!0):d&&u()},f),a.addListener(w,"keyup",u,f),a.addListener(w,"blur",u,f)}function u(A){d&&(f.renderer.setMouseCursor(""),d=!1)}}(f))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(f){f.cursor||(f.cursor=f.end);var w=this.getSelectionStyle();return f.marker=this.session.addMarker(f,"ace_selection",w),this.session.$selectionMarkers.push(f),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,f},this.removeSelectionMarker=function(f){if(f.marker){this.session.removeMarker(f.marker);var w=this.session.$selectionMarkers.indexOf(f);-1!=w&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(f){for(var w=this.session.$selectionMarkers,d=f.length;d--;){var u=f[d];if(u.marker){this.session.removeMarker(u.marker);var A=w.indexOf(u);-1!=A&&w.splice(A,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(f){this.addSelectionMarker(f.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(f){this.removeSelectionMarkers(f.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(f){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(e.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(f){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(e.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(f){var w=f.command,d=f.editor;if(d.multiSelect){if(w.multiSelectAction)"forEach"==w.multiSelectAction?u=d.forEachSelection(w,f.args):"forEachLine"==w.multiSelectAction?u=d.forEachSelection(w,f.args,!0):"single"==w.multiSelectAction?(d.exitMultiSelectMode(),u=w.exec(d,f.args||{})):u=w.multiSelectAction(d,f.args||{});else{var u=w.exec(d,f.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return u}},this.forEachSelection=function(f,w,d){if(!this.inVirtualSelectionMode){var g,A=1==d||d&&d.$byLines,_=this.session,p=this.selection,m=(d&&d.keepOrder?p:p.rangeList).ranges;if(!m.length)return f.exec?f.exec(this,w||{}):f(this,w||{});var C=p._eventRegistry;p._eventRegistry={};var S=new y(_);this.inVirtualSelectionMode=!0;for(var F=m.length;F--;){if(A)for(;F>0&&m[F].start.row==m[F-1].end.row;)F--;S.fromOrientedRange(m[F]),S.index=F,this.selection=_.selection=S;var L=f.exec?f.exec(this,w||{}):f(this,w||{});!g&&void 0!==L&&(g=L),S.toOrientedRange(m[F])}S.detach(),this.selection=_.selection=p,this.inVirtualSelectionMode=!1,p._eventRegistry=C,p.mergeOverlappingRanges(),p.ranges[0]&&p.fromOrientedRange(p.ranges[0]);var D=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),D&&D.from==D.to&&this.renderer.animateScrolling(D.from),g}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var f="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,d=[],u=0;uF&&(F=O.column),UB?f.insert(T,t.stringRepeat(" ",U-B)):f.remove(new $(T.row,T.column,T.row,T.column-U+B)),R.start.column=R.end.column=F,R.start.row=R.end.row=T.row,R.cursor=R.end}),w.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var _=this.selection.getRange(),p=_.start.row,E=_.end.row,m=p==E;if(m){var C,g=this.session.getLength();do{C=this.session.getLine(E)}while(/[=:]/.test(C)&&++E0);p<0&&(p=0),E>=g&&(E=g-1)}var S=this.session.removeFullLines(p,E);S=this.$reAlignText(S,m),this.session.insert({row:p,column:0},S.join("\n")+"\n"),m||(_.start.column=0,_.end.column=S[S.length-1].length),this.selection.setRange(_)}},this.$reAlignText=function(f,w){var A,_,p,d=!0,u=!0;return f.map(function(S){var F=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return F?null==A?(A=F[1].length,_=F[2].length,p=F[3].length,F):(A+_+p!=F[1].length+F[2].length+F[3].length&&(u=!1),A!=F[1].length&&(d=!1),A>F[1].length&&(A=F[1].length),_F[3].length&&(p=F[3].length),F):[S]}).map(w?m:d?u?function g(S){return S[2]?E(A+_-S[2].length)+S[2]+E(p)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}:m:function C(S){return S[2]?E(A)+S[2]+E(p)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]});function E(S){return t.stringRepeat(" ",S)}function m(S){return S[2]?E(A)+S[2]+E(_-S[2].length+p)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(c.prototype),x.onSessionChange=function(f){var w=f.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var d=f.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},x.MultiSelect=v,s("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(f){v(this),f?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(f){this.$blockSelectEnabled=f},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(s,x,K){"use strict";var k=s("../../range").Range,$=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(y,l,a){var t=y.getLine(a);return this.foldingStartMarker.test(t)?"start":"markbeginend"==l&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(y,l,a){return null},this.indentationBlock=function(y,l,a){var t=/\S/,e=y.getLine(l),n=e.search(t);if(-1!=n){for(var i=a||e.length,r=y.getLength(),o=l,c=l;++lo){var b=y.getLine(c).length;return new k(o,i,c,b)}}},this.openingBracketBlock=function(y,l,a,t,e){var n={row:a,column:t+1},i=y.$findClosingBracket(l,n,e);if(i){var r=y.foldWidgets[i.row];return null==r&&(r=y.getFoldWidget(i.row)),"start"==r&&i.row>n.row&&(i.row--,i.column=y.getLine(i.row).length),k.fromPoints(n,i)}},this.closingBracketBlock=function(y,l,a,t,e){var n={row:a,column:t},i=y.$findOpeningBracket(l,n);if(i)return i.column++,n.column--,k.fromPoints(i,n)}}).call($.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=s("../range").Range,y=s("../config").nls;x.showErrorMarker=function(t,e){var n=t.session,i=t.getCursorPosition(),r=i.row,o=n.widgetManager.getWidgetsAtRow(r).filter(function(A){return"errorMarker"==A.type})[0];o?o.destroy():r-=e;var h,c=function a(t,e,n){var i=t.getAnnotations().sort($.comparePoints);if(i.length){var r=function l(t,e,n){for(var i=0,r=t.length-1;i<=r;){var o=i+r>>1,c=n(e,t[o]);if(c>0)i=o+1;else{if(!(c<0))return o;r=o-1}}return-(i+1)}(i,{row:e,column:-1},$.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var o=i[r];if(o&&n){if(o.row===e){do{o=i[r+=n]}while(o&&o.row===e);if(!o)return i.slice()}var c=[];e=o.row;do{c[n<0?"unshift":"push"](o),o=i[r+=n]}while(o&&o.row==e);return c.length&&c}}}(n,r,e);if(c){var v=c[0];i.column=(v.pos&&"number"!=typeof v.column?v.pos.sc:v.column)||0,i.row=v.row,h=t.renderer.$gutterLayer.$annotations[i.row]}else{if(o)return;h={displayText:[y("error-marker.good-state","Looks good!")],className:"ace_ok"}}t.session.unfold(i.row),t.selection.moveToPosition(i);var b={row:i.row,fixedWidth:!0,coverGutter:!0,el:k.createElement("div"),type:"errorMarker"},f=b.el.appendChild(k.createElement("div")),w=b.el.appendChild(k.createElement("div"));w.className="error_widget_arrow "+h.className;var d=t.renderer.$cursorLayer.getPixelPosition(i).left;w.style.left=d+t.renderer.gutterWidth-5+"px",b.el.className="error_widget_wrapper",f.className="error_widget "+h.className,h.displayText.forEach(function(A,_){f.appendChild(k.createTextNode(A)),_{(function(){var x=function(){return this}();!x&&typeof window<"u"&&(x=window);var K=function(t,e,n){"string"==typeof t?(2==arguments.length&&(n=e),K.modules[t]||(K.payloads[t]=n,K.modules[t]=null)):K.original?K.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};K.modules={},K.payloads={};var k=function(t,e,n){if("string"==typeof e){var i=l(t,e);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(e)){for(var r=[],o=0,c=e.length;o1&&function a(t,e,n){if(Array.prototype.indexOf)return t.indexOf(e,n);for(var i=n||0;i-1&&(i=RegExp(this.source,k.replace.call(function l(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":"")}(this),"g","")),k.replace.call(t.slice(e.index),i,function(){for(var o=1;oe.index&&this.lastIndex--}return e},y||(RegExp.prototype.test=function(t){var e=k.exec.call(this,t);return e&&this.global&&!e[0].length&&this.lastIndex>e.index&&this.lastIndex--,!!e}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(s,x,K){function k(){}Function.prototype.bind||(Function.prototype.bind=function(W){var z=this;if("function"!=typeof z)throw new TypeError("Function.prototype.bind called on incompatible "+z);var G=a.call(arguments,1),Y=function(){if(this instanceof Y){var V=z.apply(this,G.concat(a.call(arguments)));return Object(V)===V?V:this}return z.apply(W,G.concat(a.call(arguments)))};return z.prototype&&(k.prototype=z.prototype,Y.prototype=new k,k.prototype=null),Y});var n,i,r,o,c,$=Function.prototype.call,l=Object.prototype,a=Array.prototype.slice,t=$.bind(l.toString),e=$.bind(l.hasOwnProperty);if((c=e(l,"__defineGetter__"))&&(n=$.bind(l.__defineGetter__),i=$.bind(l.__defineSetter__),r=$.bind(l.__lookupGetter__),o=$.bind(l.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function P(G){var Y=new Array(G+2);return Y[0]=Y[1]=0,Y}var z,W=[];if(W.splice.apply(W,P(20)),W.splice.apply(W,P(26)),z=W.length,W.splice(5,0,"XXX"),z+1==W.length)return!0}()){var h=Array.prototype.splice;Array.prototype.splice=function(P,W){return arguments.length?h.apply(this,[void 0===P?0:P,void 0===W?this.length-P:W].concat(a.call(arguments,2))):[]}}else Array.prototype.splice=function(P,W){var z=this.length;P>0?P>z&&(P=z):null==P?P=0:P<0&&(P=Math.max(z+P,0)),P+WZ)for(X=ne;X--;)this[Q+X]=this[Z+X];if(V&&P===re)this.length=re,this.push.apply(this,Y);else for(this.length=re+V,X=0;X>>0;if("[object Function]"!=t(W))throw new TypeError;for(;++V>>0,V=Array(Y),j=arguments[1];if("[object Function]"!=t(W))throw new TypeError(W+" is not a function");for(var Z=0;Z>>0,V=[],Z=arguments[1];if("[object Function]"!=t(W))throw new TypeError(W+" is not a function");for(var Q=0;Q>>0,V=arguments[1];if("[object Function]"!=t(W))throw new TypeError(W+" is not a function");for(var j=0;j>>0,V=arguments[1];if("[object Function]"!=t(W))throw new TypeError(W+" is not a function");for(var j=0;j>>0;if("[object Function]"!=t(W))throw new TypeError(W+" is not a function");if(!Y&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var j,V=0;if(arguments.length>=2)j=arguments[1];else for(;;){if(V in G){j=G[V++];break}if(++V>=Y)throw new TypeError("reduce of empty array with no initial value")}for(;V>>0;if("[object Function]"!=t(W))throw new TypeError(W+" is not a function");if(!Y&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var V,j=Y-1;if(arguments.length>=2)V=arguments[1];else for(;;){if(j in G){V=G[j--];break}if(--j<0)throw new TypeError("reduceRight of empty array with no initial value")}do{j in this&&(V=W.call(void 0,V,G[j],j,z))}while(j--);return V}),(!Array.prototype.indexOf||-1!=[0,1].indexOf(1,2))&&(Array.prototype.indexOf=function(W){var z=b&&"[object String]"==t(this)?this.split(""):B(this),G=z.length>>>0;if(!G)return-1;var Y=0;for(arguments.length>1&&(Y=O(arguments[1])),Y=Y>=0?Y:Math.max(0,G+Y);Y>>0;if(!G)return-1;var Y=G-1;for(arguments.length>1&&(Y=Math.min(Y,O(arguments[1]))),Y=Y>=0?Y:G-Math.abs(Y);Y>=0;Y--)if(Y in z&&W===z[Y])return Y;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(W){return W.__proto__||(W.constructor?W.constructor.prototype:l)}),Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(W,z){if("object"!=typeof W&&"function"!=typeof W||null===W)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+W);if(e(W,z)){var G;if(G={enumerable:!0,configurable:!0},c){var j=W.__proto__;W.__proto__=l;var Y=r(W,z),V=o(W,z);if(W.__proto__=j,Y||V)return Y&&(G.get=Y),V&&(G.set=V),G}return G.value=W[z],G}}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(W){return Object.keys(W)}),Object.create||(w=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var P={};for(var W in P)P[W]=null;return P.constructor=P.hasOwnProperty=P.propertyIsEnumerable=P.isPrototypeOf=P.toLocaleString=P.toString=P.valueOf=P.__proto__=null,P},Object.create=function(W,z){var G;if(null===W)G=w();else{if("object"!=typeof W)throw new TypeError("typeof prototype["+typeof W+"] != 'object'");var Y=function(){};Y.prototype=W,(G=new Y).__proto__=W}return void 0!==z&&Object.defineProperties(G,z),G}),Object.defineProperty){var u=d({}),A=typeof document>"u"||d(document.createElement("div"));if(!u||!A)var _=Object.defineProperty}Object.defineProperty&&!_||(Object.defineProperty=function(W,z,G){if("object"!=typeof W&&"function"!=typeof W||null===W)throw new TypeError("Object.defineProperty called on non-object: "+W);if("object"!=typeof G&&"function"!=typeof G||null===G)throw new TypeError("Property description must be an object: "+G);if(_)try{return _.call(Object,W,z,G)}catch{}if(e(G,"value"))if(c&&(r(W,z)||o(W,z))){var Y=W.__proto__;W.__proto__=l,delete W[z],W[z]=G.value,W.__proto__=Y}else W[z]=G.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");e(G,"get")&&n(W,z,G.get),e(G,"set")&&i(W,z,G.set)}return W}),Object.defineProperties||(Object.defineProperties=function(W,z){for(var G in z)e(z,G)&&Object.defineProperty(W,G,z[G]);return W}),Object.seal||(Object.seal=function(W){return W}),Object.freeze||(Object.freeze=function(W){return W});try{Object.freeze(function(){})}catch{Object.freeze=function(z){return function(Y){return"function"==typeof Y?Y:z(Y)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(W){return W}),Object.isSealed||(Object.isSealed=function(W){return!1}),Object.isFrozen||(Object.isFrozen=function(W){return!1}),Object.isExtensible||(Object.isExtensible=function(W){if(Object(W)===W)throw new TypeError;for(var z="";e(W,z);)z+="?";W[z]=!0;var G=e(W,z);return delete W[z],G}),!Object.keys){var g=!0,C=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],S=C.length;for(var F in{toString:null})g=!1;Object.keys=function(W){if("object"!=typeof W&&"function"!=typeof W||null===W)throw new TypeError("Object.keys called on a non-object");var z=[];for(var G in W)e(W,G)&&z.push(G);if(g)for(var Y=0,V=S;Y0||-1)*Math.floor(Math.abs(P))),P}var B=function(P){if(null==P)throw new TypeError("can't convert "+P+" to object");return Object(P)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(s,x,K){"use strict";s("./regexp"),s("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(s,x,K){"use strict";x.getDocumentHead=function($){return $||($=document),$.head||$.getElementsByTagName("head")[0]||$.documentElement},x.createElement=function($,y){return document.createElementNS?document.createElementNS(y||"http://www.w3.org/1999/xhtml",$):document.createElement($)},x.hasCssClass=function($,y){return-1!==($.className+"").split(/\s+/g).indexOf(y)},x.addCssClass=function($,y){x.hasCssClass($,y)||($.className+=" "+y)},x.removeCssClass=function($,y){for(var l=$.className.split(/\s+/g);;){var a=l.indexOf(y);if(-1==a)break;l.splice(a,1)}$.className=l.join(" ")},x.toggleCssClass=function($,y){for(var l=$.className.split(/\s+/g),a=!0;;){var t=l.indexOf(y);if(-1==t)break;a=!1,l.splice(t,1)}return a&&l.push(y),$.className=l.join(" "),a},x.setCssClass=function($,y,l){l?x.addCssClass($,y):x.removeCssClass($,y)},x.hasCssString=function($,y){var a,l=0;if((y=y||document).createStyleSheet&&(a=y.styleSheets)){for(;l"u"?x.importCssString=function(){}:(void 0!==window.pageYOffset?(x.getPageScrollTop=function(){return window.pageYOffset},x.getPageScrollLeft=function(){return window.pageXOffset}):(x.getPageScrollTop=function(){return document.body.scrollTop},x.getPageScrollLeft=function(){return document.body.scrollLeft}),x.computedStyle=window.getComputedStyle?function($,y){return y?(window.getComputedStyle($,"")||{})[y]||"":window.getComputedStyle($,"")||{}}:function($,y){return y?$.currentStyle[y]:$.currentStyle},x.setInnerHtml=function($,y){var l=$.cloneNode(!1);return l.innerHTML=y,$.parentNode.replaceChild(l,$),l},"textContent"in document.documentElement?(x.setInnerText=function($,y){$.textContent=y},x.getInnerText=function($){return $.textContent}):(x.setInnerText=function($,y){$.innerText=y},x.getInnerText=function($){return $.innerText}),x.getParentWindow=function($){return $.defaultView||$.parentWindow})}),ace.define("ace/lib/oop",["require","exports","module"],function(s,x,K){"use strict";x.inherits=function(k,$){k.super_=$,k.prototype=Object.create($.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(k,$){for(var y in $)k[y]=$[y];return k},x.implement=function(k,$){x.mixin(k,$)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(s,x,K){"use strict";s("./fixoldbrowsers");var k=s("./oop"),$=function(){var l,a,y={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(a in y.FUNCTION_KEYS)l=y.FUNCTION_KEYS[a].toLowerCase(),y[l]=parseInt(a,10);for(a in y.PRINTABLE_KEYS)l=y.PRINTABLE_KEYS[a].toLowerCase(),y[l]=parseInt(a,10);return k.mixin(y,y.MODIFIER_KEYS),k.mixin(y,y.PRINTABLE_KEYS),k.mixin(y,y.FUNCTION_KEYS),y.enter=y.return,y.escape=y.esc,y.del=y.delete,y[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)y.KEY_MODS[e]=t.filter(function(n){return e&y.KEY_MODS[n]}).join("-")+"-"}(),y.KEY_MODS[0]="",y.KEY_MODS[-1]="input-",y}();k.mixin(x,$),x.keyCodeToString=function(y){var l=$[y];return"string"!=typeof l&&(l=String.fromCharCode(y)),l.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(s,x,K){"use strict";if(x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS},"object"==typeof navigator){var k=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),$=navigator.userAgent;x.isWin="win"==k,x.isMac="mac"==k,x.isLinux="linux"==k,x.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat(($.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat(($.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,x.isOldGecko=x.isGecko&&parseInt(($.match(/rv:(\d+)/)||[])[1],10)<4,x.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),x.isWebKit=parseFloat($.split("WebKit/")[1])||void 0,x.isChrome=parseFloat($.split(" Chrome/")[1])||void 0,x.isAIR=$.indexOf("AdobeAIR")>=0,x.isIPad=$.indexOf("iPad")>=0,x.isChromeOS=$.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test($)&&!window.MSStream,x.isIOS&&(x.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(s,x,K){"use strict";var k=s("./keys"),$=s("./useragent"),y=null,l=0;x.addListener=function(i,r,o){if(i.addEventListener)return i.addEventListener(r,o,!1);if(i.attachEvent){var c=function(){o.call(i,window.event)};o._wrapper=c,i.attachEvent("on"+r,c)}},x.removeListener=function(i,r,o){if(i.removeEventListener)return i.removeEventListener(r,o,!1);i.detachEvent&&i.detachEvent("on"+r,o._wrapper||o)},x.stopEvent=function(i){return x.stopPropagation(i),x.preventDefault(i),!1},x.stopPropagation=function(i){i.stopPropagation?i.stopPropagation():i.cancelBubble=!0},x.preventDefault=function(i){i.preventDefault?i.preventDefault():i.returnValue=!1},x.getButton=function(i){return"dblclick"==i.type?0:"contextmenu"==i.type||$.isMac&&i.ctrlKey&&!i.altKey&&!i.shiftKey?2:i.preventDefault?i.button:{1:0,2:2,4:1}[i.button]},x.capture=function(i,r,o){function c(h){r&&r(h),o&&o(h),x.removeListener(document,"mousemove",r,!0),x.removeListener(document,"mouseup",c,!0),x.removeListener(document,"dragstart",c,!0)}return x.addListener(document,"mousemove",r,!0),x.addListener(document,"mouseup",c,!0),x.addListener(document,"dragstart",c,!0),c},x.addTouchMoveListener=function(i,r){var o,c;x.addListener(i,"touchstart",function(h){var b=h.touches[0];o=b.clientX,c=b.clientY}),x.addListener(i,"touchmove",function(h){var v=h.touches;if(!(v.length>1)){var b=v[0];h.wheelX=o-b.clientX,h.wheelY=c-b.clientY,o=b.clientX,c=b.clientY,r(h)}})},x.addMouseWheelListener=function(i,r){"onmousewheel"in i?x.addListener(i,"mousewheel",function(o){void 0!==o.wheelDeltaX?(o.wheelX=-o.wheelDeltaX/8,o.wheelY=-o.wheelDeltaY/8):(o.wheelX=0,o.wheelY=-o.wheelDelta/8),r(o)}):"onwheel"in i?x.addListener(i,"wheel",function(o){switch(o.deltaMode){case o.DOM_DELTA_PIXEL:o.wheelX=.35*o.deltaX||0,o.wheelY=.35*o.deltaY||0;break;case o.DOM_DELTA_LINE:case o.DOM_DELTA_PAGE:o.wheelX=5*(o.deltaX||0),o.wheelY=5*(o.deltaY||0)}r(o)}):x.addListener(i,"DOMMouseScroll",function(o){o.axis&&o.axis==o.HORIZONTAL_AXIS?(o.wheelX=5*(o.detail||0),o.wheelY=0):(o.wheelX=0,o.wheelY=5*(o.detail||0)),r(o)})},x.addMultiMouseDownListener=function(i,r,o,c){var v,b,f,h=0,w={2:"dblclick",3:"tripleclick",4:"quadclick"};function d(A){if(0!==x.getButton(A)?h=0:A.detail>1?++h>4&&(h=1):h=1,$.isIE){var _=Math.abs(A.clientX-v)>5||Math.abs(A.clientY-b)>5;(!f||_)&&(h=1),f&&clearTimeout(f),f=setTimeout(function(){f=null},r[h-1]||600),1==h&&(v=A.clientX,b=A.clientY)}if(A._clicks=h,o[c]("mousedown",A),h>4)h=0;else if(h>1)return o[c](w[h],A)}function u(A){h=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},r[h-1]||600),o[c]("mousedown",A),o[c](w[h],A)}Array.isArray(i)||(i=[i]),i.forEach(function(A){x.addListener(A,"mousedown",d),$.isOldIE&&x.addListener(A,"dblclick",u)})};var a=$.isMac&&$.isOpera&&!("KeyboardEvent"in window)?function(i){return(i.metaKey?1:0)|(i.altKey?2:0)|(i.shiftKey?4:0)|(i.ctrlKey?8:0)}:function(i){return(i.ctrlKey?1:0)|(i.altKey?2:0)|(i.shiftKey?4:0)|(i.metaKey?8:0)};function t(i,r,o){var c=a(r);if(!$.isMac&&y){if(r.getModifierState&&(r.getModifierState("OS")||r.getModifierState("Win"))&&(c|=8),y.altGr){if(!(3&~c))return;y.altGr=0}if(18===o||17===o){var h="location"in r?r.location:r.keyLocation;17===o&&1===h?1==y[o]&&(l=r.timeStamp):18===o&&3===c&&2===h&&r.timeStamp-l<50&&(y.altGr=!0)}}if(o in k.MODIFIER_KEYS&&(o=-1),8&c&&o>=91&&o<=93&&(o=-1),c||13!==o||3!==(h="location"in r?r.location:r.keyLocation)||(i(r,c,-o),!r.defaultPrevented)){if($.isChromeOS&&8&c){if(i(r,c,o),r.defaultPrevented)return;c&=-9}return!!(c||o in k.FUNCTION_KEYS||o in k.PRINTABLE_KEYS)&&i(r,c,o)}}function e(){y=Object.create(null)}x.getModifierString=function(i){return k.KEY_MODS[a(i)]},x.addCommandKeyListener=function(i,r){var o=x.addListener;if($.isOldGecko||$.isOpera&&!("KeyboardEvent"in window)){var c=null;o(i,"keydown",function(v){c=v.keyCode}),o(i,"keypress",function(v){return t(r,v,c)})}else{var h=null;o(i,"keydown",function(v){y[v.keyCode]=(y[v.keyCode]||0)+1;var b=t(r,v,v.keyCode);return h=v.defaultPrevented,b}),o(i,"keypress",function(v){h&&(v.ctrlKey||v.altKey||v.shiftKey||v.metaKey)&&(x.stopEvent(v),h=null)}),o(i,"keyup",function(v){y[v.keyCode]=null}),y||(e(),o(window,"focus",e))}},"object"==typeof window&&window.postMessage&&!$.isOldIE&&(x.nextTick=function(i,r){r=r||window;var o="zero-timeout-message-1";x.addListener(r,"message",function c(h){h.data==o&&(x.stopPropagation(h),x.removeListener(r,"message",c),i())}),r.postMessage(o,"*")}),x.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame=x.nextFrame?x.nextFrame.bind(window):function(i){setTimeout(i,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(s,x,K){"use strict";x.last=function(y){return y[y.length-1]},x.stringReverse=function(y){return y.split("").reverse().join("")},x.stringRepeat=function(y,l){for(var a="";l>0;)1&l&&(a+=y),(l>>=1)&&(y+=y);return a};var k=/^\s\s*/,$=/\s\s*$/;x.stringTrimLeft=function(y){return y.replace(k,"")},x.stringTrimRight=function(y){return y.replace($,"")},x.copyObject=function(y){var l={};for(var a in y)l[a]=y[a];return l},x.copyArray=function(y){for(var l=[],a=0,t=y.length;a9?X=X.substr(9):X.substr(0,4)==v.substr(0,4)?X=X.substr(4,X.length-9+1):X.charAt(X.length-1)==v.charAt(0)&&(X=X.slice(0,-1)),X==v.charAt(0)||X.charAt(X.length-1)==v.charAt(0)&&(X=X.slice(0,-1)),X&&o.onTextInput(X)),b&&(b=!1),L&&(L=!1))},R=function(X){d||(D(h.value),g())},O=function(X,J,ie){var pe=X.clipboardData||window.clipboardData;if(pe&&!e){var me=n||ie?"Text":"text/plain";try{return J?!1!==pe.setData(me,J):pe.getData(me)}catch(de){if(!ie)return O(de,J,!0)}}},T=function(X,J){var ie=o.getCopyText();if(!ie)return k.preventDefault(X);O(X,ie)?($.isIOS&&(f=J,h.value="\n aa"+ie+"a a\n",h.setSelectionRange(4,4+ie.length),b={value:ie}),J?o.onCut():o.onCopy(),$.isIOS||k.preventDefault(X)):(b=!0,h.value=ie,h.select(),setTimeout(function(){b=!1,g(),m(),J?o.onCut():o.onCopy()}))};k.addCommandKeyListener(h,o.onCommandKey.bind(o)),k.addListener(h,"select",function(X){!function(X){return 0===X.selectionStart&&X.selectionEnd===X.value.length}(h)?F&&m(o.selection.isEmpty()):(o.selectAll(),m())}),k.addListener(h,"input",R),k.addListener(h,"cut",function(X){T(X,!0)}),k.addListener(h,"copy",function(X){T(X,!1)}),k.addListener(h,"paste",function(X){var J=O(X);"string"==typeof J?(J&&o.onPaste(J,X),$.isIE&&setTimeout(m),k.preventDefault(X)):(h.value="",w=!0)});var V,z=function(){if(d&&o.onCompositionUpdate&&!o.$readOnly){var X=h.value.replace(/\x01/g,"");if(d.lastValue!==X&&(o.onCompositionUpdate(X),d.lastValue&&o.undo(),d.canUndo&&(d.lastValue=X),d.lastValue)){var J=o.selection.getRange();o.insert(d.lastValue),o.session.markUndoGroup(),d.range=o.selection.getRange(),o.selection.setRange(J),o.selection.clearSelection()}}},G=function(X){if(o.onCompositionEnd&&!o.$readOnly){var J=d;d=!1;var ie=setTimeout(function(){ie=null;var me=h.value.replace(/\x01/g,"");d||(me==J.lastValue?g():!J.lastValue&&me&&(g(),D(me)))});F=function(de){return ie&&clearTimeout(ie),(de=de.replace(/\x01/g,""))==J.lastValue?"":(J.lastValue&&ie&&o.undo(),de)},o.onCompositionEnd(),o.removeListener("mousedown",G),"compositionend"==X.type&&J.range&&o.selection.setRange(J.range),($.isChrome&&$.isChrome>=53||$.isWebKit&&$.isWebKit>=603)&&R()}},Y=l.delayedCall(z,50);function j(){clearTimeout(V),V=setTimeout(function(){u&&(h.style.cssText=u,u=""),null==o.renderer.$keepTextAreaAtCursor&&(o.renderer.$keepTextAreaAtCursor=!0,o.renderer.$moveTextAreaToCursor())},0)}k.addListener(h,"compositionstart",function(X){d||!o.onCompositionStart||o.$readOnly||((d={}).canUndo=o.session.$undoManager,o.onCompositionStart(),setTimeout(z,0),o.on("mousedown",G),d.canUndo&&!o.selection.isEmpty()&&(o.insert(""),o.session.markUndoGroup(),o.selection.clearSelection()),o.session.markUndoGroup())}),$.isGecko?k.addListener(h,"text",function(){Y.schedule()}):(k.addListener(h,"keyup",function(){Y.schedule()}),k.addListener(h,"keydown",function(){Y.schedule()})),k.addListener(h,"compositionend",G),this.getElement=function(){return h},this.setReadOnly=function(X){h.readOnly=X},this.onContextMenu=function(X){L=!0,m(o.selection.isEmpty()),o._emit("nativecontextmenu",{target:o,domEvent:X}),this.moveToMouse(X,!0)},this.moveToMouse=function(X,J){u||(u=h.style.cssText),h.style.cssText=(J?"z-index:100000;":"")+"height:"+h.style.height+";"+($.isIE?"opacity:0.1;":"");var ie=o.container.getBoundingClientRect(),pe=y.computedStyle(o.container),me=ie.top+(parseInt(pe.borderTopWidth)||0),de=ie.left+(parseInt(ie.borderLeftWidth)||0),le=ie.bottom-me-h.clientHeight-2,ue=function(_e){h.style.left=_e.clientX-de-2+"px",h.style.top=Math.min(_e.clientY-me-2,le)+"px"};ue(X),"mousedown"==X.type&&(o.renderer.$keepTextAreaAtCursor&&(o.renderer.$keepTextAreaAtCursor=null),clearTimeout(V),$.isWin&&k.capture(o.container,ue,j))},this.onContextMenuClose=j;var Z=function(X){o.textInput.onContextMenu(X),j()};if(k.addListener(h,"mouseup",Z),k.addListener(h,"mousedown",function(X){X.preventDefault(),j()}),k.addListener(o.renderer.scroller,"contextmenu",Z),k.addListener(h,"contextmenu",Z),$.isIOS){var Q=null,ne=!1;r.addEventListener("keydown",function(X){Q&&clearTimeout(Q),ne=!0}),r.addEventListener("keyup",function(X){Q=setTimeout(function(){ne=!1},100)});var re=function(X){if(document.activeElement===h&&!ne){if(f)return setTimeout(function(){f=!1},100);var J=h.selectionStart,ie=h.selectionEnd;if(h.setSelectionRange(4,5),J==ie)switch(J){case 0:o.onCommandKey(null,0,a.up);break;case 1:o.onCommandKey(null,0,a.home);break;case 2:o.onCommandKey(null,t.option,a.left);break;case 4:o.onCommandKey(null,0,a.left);break;case 5:o.onCommandKey(null,0,a.right);break;case 7:o.onCommandKey(null,t.option,a.right);break;case 8:o.onCommandKey(null,0,a.end);break;case 9:o.onCommandKey(null,0,a.down)}else{switch(ie){case 6:o.onCommandKey(null,t.shift,a.right);break;case 7:o.onCommandKey(null,t.shift|t.option,a.right);break;case 8:o.onCommandKey(null,t.shift,a.end);break;case 9:o.onCommandKey(null,t.shift,a.down)}switch(J){case 0:o.onCommandKey(null,t.shift,a.up);break;case 1:o.onCommandKey(null,t.shift,a.home);break;case 2:o.onCommandKey(null,t.shift|t.option,a.left);break;case 3:o.onCommandKey(null,t.shift,a.left)}}}};document.addEventListener("selectionchange",re),o.on("destroy",function(){document.removeEventListener("selectionchange",re)})}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(s,x,K){"use strict";var k=s("../lib/event"),$=s("../lib/useragent"),y=s("../lib/dom"),l=s("../lib/lang"),a=$.isChrome<18,t=$.isIE,e=s("./textinput_ios").TextInput;x.TextInput=function(i,r){if($.isIOS)return e.call(this,i,r);var o=y.createElement("textarea");o.className="ace_text-input",o.setAttribute("wrap","off"),o.setAttribute("autocorrect","off"),o.setAttribute("autocapitalize","off"),o.setAttribute("spellcheck",!1),o.style.opacity="0",i.insertBefore(o,i.firstChild);var c="\u2028\u2028",h=!1,v=!1,b=!1,f="",w=!0;try{var d=document.activeElement===o}catch{}k.addListener(o,"blur",function(V){r.onBlur(V),d=!1}),k.addListener(o,"focus",function(V){d=!0,r.onFocus(V),_()}),this.focus=function(){if(f)return o.focus();var V=o.style.top;o.style.position="fixed",o.style.top="0px",o.focus(),setTimeout(function(){o.style.position="","0px"==o.style.top&&(o.style.top=V)},0)},this.blur=function(){o.blur()},this.isFocused=function(){return d};var u=l.delayedCall(function(){d&&_(w)}),A=l.delayedCall(function(){b||(o.value=c,d&&_())});function _(V){if(!b){if(b=!0,g)var j=0,Z=V?0:o.value.length-1;else j=V?2:1,Z=2;try{o.setSelectionRange(j,Z)}catch{}b=!1}}function p(){b||(o.value=c,$.isWebKit&&A.schedule())}$.isWebKit||r.addEventListener("changeSelection",function(){r.selection.isEmpty()!=w&&(w=!w,u.schedule())}),p(),d&&r.onFocus();var g=null;this.setInputHandler=function(V){g=V},this.getInputHandler=function(){return g};var C=!1,S=function(V){g&&(V=g(V),g=null),v?(_(),V&&r.onPaste(V),v=!1):V==c.charAt(0)?r.execCommand(C?"del":"backspace",{source:"ace"}):(V.substring(0,2)==c?V=V.substr(2):V.charAt(0)==c.charAt(0)?V=V.substr(1):V.charAt(V.length-1)==c.charAt(0)&&(V=V.slice(0,-1)),V.charAt(V.length-1)==c.charAt(0)&&(V=V.slice(0,-1)),V&&r.onTextInput(V)),C&&(C=!1)},F=function(V){b||(S(o.value),p())},L=function(V,j,Z){var Q=V.clipboardData||window.clipboardData;if(Q&&!a){var ne=t||Z?"Text":"text/plain";try{return j?!1!==Q.setData(ne,j):Q.getData(ne)}catch(re){if(!Z)return L(re,j,!0)}}},D=function(V,j){var Z=r.getCopyText();if(!Z)return k.preventDefault(V);L(V,Z)?(j?r.onCut():r.onCopy(),k.preventDefault(V)):(h=!0,o.value=Z,o.select(),setTimeout(function(){h=!1,p(),_(),j?r.onCut():r.onCopy()}))},R=function(V){D(V,!0)},O=function(V){D(V,!1)},T=function(V){var j=L(V);"string"==typeof j?(j&&r.onPaste(j,V),$.isIE&&setTimeout(_),k.preventDefault(V)):(o.value="",v=!0)};k.addCommandKeyListener(o,r.onCommandKey.bind(r)),k.addListener(o,"select",function(V){h?h=!1:function(V){return 0===V.selectionStart&&V.selectionEnd===V.value.length}(o)?(r.selectAll(),_()):g&&_(r.selection.isEmpty())}),k.addListener(o,"input",F),k.addListener(o,"cut",R),k.addListener(o,"copy",O),k.addListener(o,"paste",T),(!("oncut"in o)||!("oncopy"in o)||!("onpaste"in o))&&k.addListener(i,"keydown",function(V){if((!$.isMac||V.metaKey)&&V.ctrlKey)switch(V.keyCode){case 67:O(V);break;case 86:T(V);break;case 88:R(V)}});var z,B=function(){if(b&&r.onCompositionUpdate&&!r.$readOnly){var V=o.value.replace(/\u2028/g,"");if(b.lastValue!==V&&(r.onCompositionUpdate(V),b.lastValue&&r.undo(),b.canUndo&&(b.lastValue=V),b.lastValue)){var j=r.selection.getRange();r.insert(b.lastValue),r.session.markUndoGroup(),b.range=r.selection.getRange(),r.selection.setRange(j),r.selection.clearSelection()}}},P=function(V){if(r.onCompositionEnd&&!r.$readOnly){var j=b;b=!1;var Z=setTimeout(function(){Z=null;var ne=o.value.replace(/\u2028/g,"");b||(ne==j.lastValue?p():!j.lastValue&&ne&&(p(),S(ne)))});g=function(re){return Z&&clearTimeout(Z),(re=re.replace(/\u2028/g,""))==j.lastValue?"":(j.lastValue&&Z&&r.undo(),re)},r.onCompositionEnd(),r.removeListener("mousedown",P),"compositionend"==V.type&&j.range&&r.selection.setRange(j.range),($.isChrome&&$.isChrome>=53||$.isWebKit&&$.isWebKit>=603)&&F()}},W=l.delayedCall(B,50);function G(){clearTimeout(z),z=setTimeout(function(){f&&(o.style.cssText=f,f=""),null==r.renderer.$keepTextAreaAtCursor&&(r.renderer.$keepTextAreaAtCursor=!0,r.renderer.$moveTextAreaToCursor())},0)}k.addListener(o,"compositionstart",function(V){b||!r.onCompositionStart||r.$readOnly||((b={}).canUndo=r.session.$undoManager,r.onCompositionStart(),setTimeout(B,0),r.on("mousedown",P),b.canUndo&&!r.selection.isEmpty()&&(r.insert(""),r.session.markUndoGroup(),r.selection.clearSelection()),r.session.markUndoGroup())}),$.isGecko?k.addListener(o,"text",function(){W.schedule()}):(k.addListener(o,"keyup",function(){W.schedule()}),k.addListener(o,"keydown",function(){W.schedule()})),k.addListener(o,"compositionend",P),this.getElement=function(){return o},this.setReadOnly=function(V){o.readOnly=V},this.onContextMenu=function(V){C=!0,_(r.selection.isEmpty()),r._emit("nativecontextmenu",{target:r,domEvent:V}),this.moveToMouse(V,!0)},this.moveToMouse=function(V,j){f||(f=o.style.cssText),o.style.cssText=(j?"z-index:100000;":"")+"height:"+o.style.height+";"+($.isIE?"opacity:0.1;":"");var Z=r.container.getBoundingClientRect(),Q=y.computedStyle(r.container),ne=Z.top+(parseInt(Q.borderTopWidth)||0),re=Z.left+(parseInt(Z.borderLeftWidth)||0),X=Z.bottom-ne-o.clientHeight-2,J=function(ie){o.style.left=ie.clientX-re-2+"px",o.style.top=Math.min(ie.clientY-ne-2,X)+"px"};J(V),"mousedown"==V.type&&(r.renderer.$keepTextAreaAtCursor&&(r.renderer.$keepTextAreaAtCursor=null),clearTimeout(z),$.isWin&&k.capture(r.container,J,G))},this.onContextMenuClose=G;var Y=function(V){r.textInput.onContextMenu(V),G()};k.addListener(o,"mouseup",Y),k.addListener(o,"mousedown",function(V){V.preventDefault(),G()}),k.addListener(r.renderer.scroller,"contextmenu",Y),k.addListener(o,"contextmenu",Y)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(s,x,K){"use strict";s("../lib/dom"),s("../lib/event");var y=s("../lib/useragent");function t(i){i.$clickSelection=null;var r=i.editor;r.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),r.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),r.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),r.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),r.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i)),r.setDefaultHandler("touchmove",this.onTouchMove.bind(i)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(c){i[c]=this[c]},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange")}function n(i,r){if(i.start.row==i.end.row)var o=2*r.column-i.start.column-i.end.column;else if(i.start.row!=i.end.row-1||i.start.column||i.end.column)o=2*r.row-i.start.row-i.end.row;else o=r.column-4;return o<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}(function(){this.onMouseDown=function(i){var r=i.inSelection(),o=i.getDocumentPosition();this.mousedownEvent=i;var c=this.editor,h=i.getButton();if(0!==h){var b=c.getSelectionRange().isEmpty();return c.$blockScrolling++,(b||1==h)&&c.selection.moveToPosition(o),c.$blockScrolling--,void(2==h&&(c.textInput.onContextMenu(i.domEvent),y.isMozilla||i.preventDefault()))}return this.mousedownEvent.time=Date.now(),!r||c.isFocused()||(c.focus(),!this.$focusTimout||this.$clickSelection||c.inMultiSelectMode)?(this.captureMouse(i),this.startSelect(o,i.domEvent._clicks>1),i.preventDefault()):(this.setState("focusWait"),void this.captureMouse(i))},this.startSelect=function(i,r){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;o.$blockScrolling++,this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(i):r||o.selection.moveToPosition(i),r||this.select(),o.renderer.scroller.setCapture&&o.renderer.scroller.setCapture(),o.setStyle("ace_selecting"),this.setState("select"),o.$blockScrolling--},this.select=function(){var i,r=this.editor,o=r.renderer.screenToTextCoordinates(this.x,this.y);if(r.$blockScrolling++,this.$clickSelection){var c=this.$clickSelection.comparePoint(o);if(-1==c)i=this.$clickSelection.end;else if(1==c)i=this.$clickSelection.start;else{var h=n(this.$clickSelection,o);o=h.cursor,i=h.anchor}r.selection.setSelectionAnchor(i.row,i.column)}r.selection.selectToPosition(o),r.$blockScrolling--,r.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(i){var r,o=this.editor,c=o.renderer.screenToTextCoordinates(this.x,this.y),h=o.selection[i](c.row,c.column);if(o.$blockScrolling++,this.$clickSelection){var v=this.$clickSelection.comparePoint(h.start),b=this.$clickSelection.comparePoint(h.end);if(-1==v&&b<=0)r=this.$clickSelection.end,(h.end.row!=c.row||h.end.column!=c.column)&&(c=h.start);else if(1==b&&v>=0)r=this.$clickSelection.start,(h.start.row!=c.row||h.start.column!=c.column)&&(c=h.end);else if(-1==v&&1==b)c=h.end,r=h.start;else{var f=n(this.$clickSelection,c);c=f.cursor,r=f.anchor}o.selection.setSelectionAnchor(r.row,r.column)}o.selection.selectToPosition(c),o.$blockScrolling--,o.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var i=function e(i,r,o,c){return Math.sqrt(Math.pow(o-i,2)+Math.pow(c-r,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(i>0||r-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(i){var r=i.getDocumentPosition(),o=this.editor,h=o.session.getBracketRange(r);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=o.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},this.onTripleClick=function(i){var r=i.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var c=o.getSelectionRange();c.isMultiLine()&&c.contains(r.row,r.column)?(this.$clickSelection=o.selection.getLineRange(c.start.row),this.$clickSelection.end=o.selection.getLineRange(c.end.row).end):this.$clickSelection=o.selection.getLineRange(r.row),this.select()},this.onQuadClick=function(i){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,c=i.domEvent.timeStamp,h=c-o.t,v=i.wheelX/h,b=i.wheelY/h;h<250&&(v=(v+o.vx)/2,b=(b+o.vy)/2);var f=Math.abs(v/b),w=!1;if(f>=1&&r.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(w=!0),f<=1&&r.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(w=!0),w?o.allowed=c:c-o.allowed<250&&(Math.abs(v)<=1.1*Math.abs(o.vx)&&Math.abs(b)<=1.1*Math.abs(o.vy)?(w=!0,o.allowed=c):o.allowed=0),o.t=c,o.vx=v,o.vy=b,w)return r.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},this.onTouchMove=function(i){this.editor._emit("mousewheel",i)}}).call(t.prototype),x.DefaultHandlers=t}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(s,x,K){"use strict";s("./lib/oop");var $=s("./lib/dom");function y(l){this.isOpen=!1,this.$element=null,this.$parentNode=l}(function(){this.$init=function(){return this.$element=$.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(l){$.setInnerText(this.getElement(),l)},this.setHtml=function(l){this.getElement().innerHTML=l},this.setPosition=function(l,a){this.getElement().style.left=l+"px",this.getElement().style.top=a+"px"},this.setClassName=function(l){$.addCssClass(this.getElement(),l)},this.show=function(l,a,t){null!=l&&this.setText(l),null!=a&&null!=t&&this.setPosition(a,t),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(y.prototype),x.Tooltip=y}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=s("../lib/oop"),y=s("../lib/event"),l=s("../tooltip").Tooltip;function t(e){l.call(this,e)}$.inherits(t,l),function(){this.setPosition=function(e,n){var i=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),c=this.getHeight();(e+=15)+o>i&&(e-=e+o-i),(n+=15)+c>r&&(n-=20+c),l.prototype.setPosition.call(this,e,n)}}.call(t.prototype),x.GutterHandler=function a(e){var o,c,h,n=e.editor,i=n.renderer.$gutterLayer,r=new t(n.container);function b(){o&&(o=clearTimeout(o)),h&&(r.hide(),h=null,n._signal("hideGutterTooltip",r),n.removeEventListener("mousewheel",b))}function f(w){r.setPosition(w.x,w.y)}e.editor.setDefaultHandler("guttermousedown",function(w){if(n.isFocused()&&0==w.getButton()&&"foldWidgets"!=i.getRegion(w)){var u=w.getDocumentPosition().row,A=n.session.selection;if(w.getShiftKey())A.selectTo(u,0);else{if(2==w.domEvent.detail)return n.selectAll(),w.preventDefault();e.$clickSelection=n.selection.getLineRange(u)}return e.setState("selectByLines"),e.captureMouse(w),w.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(w){if(k.hasCssClass(w.domEvent.target||w.domEvent.srcElement,"ace_fold-widget"))return b();h&&e.$tooltipFollowsMouse&&f(w),c=w,!o&&(o=setTimeout(function(){o=null,c&&!e.isMousePressed?function v(){var w=c.getDocumentPosition().row,d=i.$annotations[w];if(!d)return b();if(w==n.session.getLength()){var A=n.renderer.pixelToScreenCoordinates(0,c.y).row,_=c.$pos;if(A>n.session.documentToScreenRow(_.row,_.column))return b()}if(h!=d)if(h=d.text.join("
"),r.setHtml(h),r.show(),n._signal("showGutterTooltip",r),n.on("mousewheel",b),e.$tooltipFollowsMouse)f(c);else{var E=c.domEvent.target.getBoundingClientRect(),m=r.getElement().style;m.left=E.right+"px",m.top=E.bottom+"px"}}():b()},50))}),y.addListener(n.renderer.$gutter,"mouseout",function(w){c=null,h&&!o&&(o=setTimeout(function(){o=null,b()},50))}),n.on("changeSession",b)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(s,x,K){"use strict";var k=s("../lib/event"),$=s("../lib/useragent"),y=x.MouseEvent=function(l,a){this.domEvent=l,this.editor=a,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){k.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){k.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=a.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return k.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=$.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(y.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=s("../lib/event"),y=s("../lib/useragent");function e(i){var r=i.editor,o=k.createElement("img");o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",y.isOpera&&(o.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(B){i[B]=this[B]},this),r.addEventListener("mousedown",this.onMouseDown.bind(i));var v,b,f,w,d,u,_,p,E,m,g,h=r.container,A=0;function F(){var B=u;(function C(B,P){var W=Date.now();m&&P&&B.row==P.row&&P&&B.column==P.column?n(g.x,g.y,b,f)>5?m=null:W-m>=200&&(r.renderer.scrollCursorIntoView(),m=null):(r.$blockScrolling+=1,r.moveCursorToPosition(B),r.$blockScrolling-=1,m=W,g={x:b,y:f})})(u=r.renderer.screenToTextCoordinates(b,f),B),function S(B,P){var W=Date.now(),z=r.renderer.layerConfig.lineHeight,G=r.renderer.layerConfig.characterWidth,Y=r.renderer.scroller.getBoundingClientRect(),V={x:{left:b-Y.left,right:Y.right-b},y:{top:f-Y.top,bottom:Y.bottom-f}},j=Math.min(V.x.left,V.x.right),Z=Math.min(V.y.top,V.y.bottom),Q={row:B.row,column:B.column};j/G<=2&&(Q.column+=V.x.left=200&&r.renderer.scrollCursorIntoView(Q):E=W:E=null}(u,B)}function L(){d=r.selection.toOrientedRange(),v=r.session.addMarker(d,"ace_selection",r.getSelectionStyle()),r.clearSelection(),r.isFocused()&&r.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),F(),w=setInterval(F,20),A=0,$.addListener(document,"mousemove",O)}function D(){clearInterval(w),r.session.removeMarker(v),v=null,r.$blockScrolling+=1,r.selection.fromOrientedRange(d),r.$blockScrolling-=1,r.isFocused()&&!p&&r.renderer.$cursorLayer.setBlinking(!r.getReadOnly()),d=null,u=null,A=0,E=null,m=null,$.removeListener(document,"mousemove",O)}this.onDragStart=function(B){if(this.cancelDrag||!h.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(B)},0),B.preventDefault()}d=r.getSelectionRange();var W=B.dataTransfer;W.effectAllowed=r.getReadOnly()?"copy":"copyMove",y.isOpera&&(r.container.appendChild(o),o.scrollTop=0),W.setDragImage&&W.setDragImage(o,0,0),y.isOpera&&r.container.removeChild(o),W.clearData(),W.setData("Text",r.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(B){h.draggable=!1,p=!1,this.setState(null),r.getReadOnly()||(!_&&"move"==B.dataTransfer.dropEffect&&r.session.remove(r.getSelectionRange()),r.renderer.$cursorLayer.setBlinking(!0)),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(B){if(!r.getReadOnly()&&T(B.dataTransfer))return b=B.clientX,f=B.clientY,v||L(),A++,B.dataTransfer.dropEffect=_=U(B),$.preventDefault(B)},this.onDragOver=function(B){if(!r.getReadOnly()&&T(B.dataTransfer))return b=B.clientX,f=B.clientY,v||(L(),A++),null!==R&&(R=null),B.dataTransfer.dropEffect=_=U(B),$.preventDefault(B)},this.onDragLeave=function(B){if(--A<=0&&v)return D(),_=null,$.preventDefault(B)},this.onDrop=function(B){if(u){var P=B.dataTransfer;if(p)switch(_){case"move":d=d.contains(u.row,u.column)?{start:u,end:u}:r.moveText(d,u);break;case"copy":d=r.moveText(d,u,!0)}else{var W=P.getData("Text");d={start:u,end:r.session.insert(u,W)},r.focus(),_=null}return D(),$.preventDefault(B)}},$.addListener(h,"dragstart",this.onDragStart.bind(i)),$.addListener(h,"dragend",this.onDragEnd.bind(i)),$.addListener(h,"dragenter",this.onDragEnter.bind(i)),$.addListener(h,"dragover",this.onDragOver.bind(i)),$.addListener(h,"dragleave",this.onDragLeave.bind(i)),$.addListener(h,"drop",this.onDrop.bind(i));var R=null;function O(){null==R&&(R=setTimeout(function(){null!=R&&v&&D()},20))}function T(B){var P=B.types;return!P||Array.prototype.some.call(P,function(W){return"text/plain"==W||"Text"==W})}function U(B){var P=["copy","copymove","all","uninitialized"],z=y.isMac?B.altKey:B.ctrlKey,G="uninitialized";try{G=B.dataTransfer.effectAllowed.toLowerCase()}catch{}var Y="none";return z&&P.indexOf(G)>=0?Y="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(G)>=0?Y="move":P.indexOf(G)>=0&&(Y="copy"),Y}}function n(i,r,o,c){return Math.sqrt(Math.pow(o-i,2)+Math.pow(c-r,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor;i.container.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging"),i.renderer.setCursorStyle(y.isWin?"default":"move"),this.setState("dragReady")},this.onMouseDrag=function(i){var r=this.editor.container;y.isIE&&"dragReady"==this.state&&n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&r.dragDrop(),"dragWait"===this.state&&n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var r=this.editor,o=i.inSelection(),c=i.getButton();if(1===(i.domEvent.detail||1)&&0===c&&o){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=i.domEvent.target||i.domEvent.srcElement;"unselectable"in v&&(v.unselectable="on"),r.getDragDelay()?(y.isWebKit&&(this.cancelDrag=!0,r.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(e.prototype),x.DragdropHandler=e}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(s,x,K){"use strict";var k=s("./dom");x.get=function($,y){var l=new XMLHttpRequest;l.open("GET",$,!0),l.onreadystatechange=function(){4===l.readyState&&y(l.responseText)},l.send(null)},x.loadScript=function($,y){var l=k.getDocumentHead(),a=document.createElement("script");a.src=$,l.appendChild(a),a.onload=a.onreadystatechange=function(t,e){(e||!a.readyState||"loaded"==a.readyState||"complete"==a.readyState)&&(a=a.onload=a.onreadystatechange=null,e||y())}},x.qualifyURL=function($){var y=document.createElement("a");return y.href=$,y.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(s,x,K){"use strict";var k={},$=function(){this.propagationStopped=!0},y=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(l,a){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[l]||[],e=this._defaultHandlers[l];if(t.length||e){("object"!=typeof a||!a)&&(a={}),a.type||(a.type=l),a.stopPropagation||(a.stopPropagation=$),a.preventDefault||(a.preventDefault=y),t=t.slice();for(var n=0;n1&&(h=o[o.length-2]);var b=t[r+"Path"];return null==b?b=t.basePath:"/"==c&&(r=c=""),b&&"/"!=b.slice(-1)&&(b+="/"),b+r+c+h+this.get("suffix")},x.setModuleUrl=function(i,r){return t.$moduleUrls[i]=r},x.$loading={},x.loadModule=function(i,r){var o,c;Array.isArray(i)&&(c=i[0],i=i[1]);try{o=s(i)}catch{}if(o&&!x.$loading[i])return r&&r(o);if(x.$loading[i]||(x.$loading[i]=[]),x.$loading[i].push(r),!(x.$loading[i].length>1)){var h=function(){s([i],function(v){x._emit("load.module",{name:i,module:v});var b=x.$loading[i];x.$loading[i]=null,b.forEach(function(f){f&&f(v)})})};if(!x.get("packaged"))return h();y.loadScript(x.moduleUrl(i,c),h)}},e(!0),x.init=e}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(s,x,K){"use strict";var k=s("../lib/event"),$=s("../lib/useragent"),y=s("./default_handlers").DefaultHandlers,l=s("./default_gutter_handler").GutterHandler,a=s("./mouse_event").MouseEvent,t=s("./dragdrop_handler").DragdropHandler,e=s("../config"),n=function(i){var r=this;this.editor=i,new y(this),new l(this),new t(this);var o=function(v){(!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement()))&&window.focus(),i.focus()},c=i.renderer.getMouseEventTarget();k.addListener(c,"click",this.onMouseEvent.bind(this,"click")),k.addListener(c,"mousemove",this.onMouseMove.bind(this,"mousemove")),k.addMultiMouseDownListener([c,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),k.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel")),k.addTouchMoveListener(i.container,this.onTouchMove.bind(this,"touchmove"));var h=i.renderer.$gutter;k.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),k.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick")),k.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),k.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),k.addListener(c,"mousedown",o),k.addListener(h,"mousedown",o),$.isIE&&i.renderer.scrollBarV&&(k.addListener(i.renderer.scrollBarV.element,"mousedown",o),k.addListener(i.renderer.scrollBarH.element,"mousedown",o)),i.on("mousemove",function(v){if(!r.state&&!r.$dragDelay&&r.$dragEnabled){var b=i.renderer.screenToTextCoordinates(v.x,v.y),f=i.session.selection.getRange(),w=i.renderer;!f.isEmpty()&&f.insideStart(b.row,b.column)?w.setCursorStyle("default"):w.setCursorStyle("")}})};(function(){this.onMouseEvent=function(i,r){this.editor._emit(i,new a(r,this.editor))},this.onMouseMove=function(i,r){var o=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!o||!o.length||this.editor._emit(i,new a(r,this.editor))},this.onMouseWheel=function(i,r){var o=new a(r,this.editor);o.speed=2*this.$scrollSpeed,o.wheelX=r.wheelX,o.wheelY=r.wheelY,this.editor._emit(i,o)},this.onTouchMove=function(i,r){var o=new a(r,this.editor);o.speed=1,o.wheelX=r.wheelX,o.wheelY=r.wheelY,this.editor._emit(i,o)},this.setState=function(i){this.state=i},this.captureMouse=function(i,r){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var o=this.editor.renderer;o.$keepTextAreaAtCursor&&(o.$keepTextAreaAtCursor=null);var c=this,h=function(w){if(w){if($.isWebKit&&!w.which&&c.releaseMouse)return c.releaseMouse();c.x=w.clientX,c.y=w.clientY,r&&r(w),c.mouseEvent=new a(w,c.editor),c.$mouseMoved=!0}},v=function(w){clearInterval(f),b(),c[c.state+"End"]&&c[c.state+"End"](w),c.state="",null==o.$keepTextAreaAtCursor&&(o.$keepTextAreaAtCursor=!0,o.$moveTextAreaToCursor()),c.isMousePressed=!1,c.$onCaptureMouseMove=c.releaseMouse=null,w&&c.onMouseEvent("mouseup",w)},b=function(){c[c.state]&&c[c.state](),c.$mouseMoved=!1};if($.isOldIE&&"dblclick"==i.domEvent.type)return setTimeout(function(){v(i)});c.$onCaptureMouseMove=h,c.releaseMouse=k.capture(this.editor.container,h,v);var f=setInterval(b,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var i=function(r){r&&r.domEvent&&"contextmenu"!=r.domEvent.type||(this.editor.off("nativecontextmenu",i),r&&r.domEvent&&k.stopEvent(r.domEvent))}.bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)}}).call(n.prototype),e.defineOptions(n.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:$.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),x.MouseHandler=n}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(s,x,K){"use strict";x.FoldHandler=function k($){$.on("click",function(y){var l=y.getDocumentPosition(),a=$.session,t=a.getFoldAt(l.row,l.column,1);t&&(y.getAccelKey()?a.removeFold(t):a.expandFold(t),y.stop())}),$.on("gutterclick",function(y){if("foldWidgets"==$.renderer.$gutterLayer.getRegion(y)){var a=y.getDocumentPosition().row,t=$.session;t.foldWidgets&&t.foldWidgets[a]&&$.session.onFoldWidgetClick(a,y),$.isFocused()||$.focus(),y.stop()}}),$.on("gutterdblclick",function(y){if("foldWidgets"==$.renderer.$gutterLayer.getRegion(y)){var a=y.getDocumentPosition().row,t=$.session,e=t.getParentFoldRangeData(a,!0),n=e.range||e.firstRange;if(n){var i=t.getFoldAt(a=n.start.row,t.getLine(a).length,1);i?t.removeFold(i):(t.addFold("...",n),$.renderer.scrollCursorIntoView({row:n.start.row,column:0}))}y.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(s,x,K){"use strict";var k=s("../lib/keys"),$=s("../lib/event"),y=function(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)};(function(){this.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},this.setKeyboardHandler=function(l){var a=this.$handlers;if(a[a.length-1]!=l){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(l,1)}},this.addKeyboardHandler=function(l,a){if(l){"function"==typeof l&&!l.handleKeyboard&&(l.handleKeyboard=l);var t=this.$handlers.indexOf(l);-1!=t&&this.$handlers.splice(t,1),null==a?this.$handlers.push(l):this.$handlers.splice(a,0,l),-1==t&&l.attach&&l.attach(this.$editor)}},this.removeKeyboardHandler=function(l){var a=this.$handlers.indexOf(l);return-1!=a&&(this.$handlers.splice(a,1),l.detach&&l.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var l=this.$data,a=l.editor;return this.$handlers.map(function(t){return t.getStatusText&&t.getStatusText(a,l)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(l,a,t,e){for(var n,i=!1,r=this.$editor.commands,o=this.$handlers.length;o--&&!((n=this.$handlers[o].handleKeyboard(this.$data,l,a,t,e))&&n.command&&(i="null"==n.command||r.exec(n.command,this.$editor,n.args,e),i&&e&&-1!=l&&1!=n.passEvent&&1!=n.command.passEvent&&$.stopEvent(e),i)););return!i&&-1==l&&(n={command:"insertstring"},i=r.exec("insertstring",this.$editor,a)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",n),i},this.onCommandKey=function(l,a,t){var e=k.keyCodeToString(t);this.$callKeyboardHandlers(a,e,t,l)},this.onTextInput=function(l){this.$callKeyboardHandlers(-1,l)}}).call(y.prototype),x.KeyBinding=y}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(s,x,K){"use strict";var y=0,l=0,a=!1,e=!1,n=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],C=11,T=18,U=[T,T,T,T,T,T,T,T,T,6,5,6,8,5,T,T,T,T,T,T,T,T,T,T,T,T,T,T,5,5,5,6,8,4,4,C,C,C,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,T,T,T,T,T,T,5,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,9,4,C,C,C,C,4,4,4,4,0,4,4,T,4,4,C,C,2,2,4,0,4,4,4,2,0,4,4,4,4,4],B=[8,8,8,8,8,8,8,8,8,8,8,T,T,T,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,C,C,C,C,C,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function W(V,j,Z){if(!(l=V){for(re=ne+1;re=V;)re++;for(X=ne,J=re-1;X=j.length||2!=(re=Z[Q-1])&&3!=re||2!=(X=j[Q+1])&&3!=X?4:(a&&(X=3),X==re?X:4);case 10:return 2==(re=Q>0?Z[Q-1]:5)&&Q+10&&2==Z[Q-1])return 2;if(a)return 4;for(ie=Q+1,J=j.length;ie=1425&&pe<=2303||64286==pe)&&(1==re||7==re))return 1}return Q<1||5==(re=j[Q-1])?4:Z[Q-1];case 5:return a=!1,e=!0,y;case 6:return n=!0,4;case 13:case 14:case 16:case 17:case 15:a=!1;case T:return 4}}function G(V){var j=V.charCodeAt(0),Z=j>>8;return 0==Z?j>191?0:U[j]:5==Z?/[\u0591-\u05f4]/.test(V)?1:0:6==Z?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(V)?12:/[\u0660-\u0669\u066b-\u066c]/.test(V)?3:1642==j?C:/[\u06f0-\u06f9]/.test(V)?2:7:32==Z&&j<=8287?B[255&j]:254==Z&&j>=65136?7:4}x.L=0,x.R=1,x.EN=2,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.DOT="\xb7",x.doBidiReorder=function(V,j,Z){if(V.length<2)return{};var Q=V.split(""),ne=new Array(Q.length),re=new Array(Q.length),X=[];y=Z?1:0,function P(V,j,Z,Q){var ne=y?c:o,re=null,X=null,J=null,ie=0,pe=null,de=-1,le=null,ue=null,_e=[];if(!Q)for(le=0,Q=[];le0)if(16==pe){for(le=de;le-1){for(le=de;le=0&&8==Q[$e];$e--)j[$e]=y}}(Q,X,Q.length,j);for(var J=0;J7&&j[J]<13||4===j[J]||j[J]===T)?X[J]=x.ON_R:J>0&&"\u0644"===Q[J-1]&&/\u0622|\u0623|\u0625|\u0627/.test(Q[J])&&(X[J-1]=X[J]=x.R_H,J++);for(Q[Q.length-1]===x.DOT&&(X[Q.length-1]=x.B),J=0;J=0&&(t=this.session.$docRowCache[n])}return t},this.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length)for(var n,i=this.session.$getRowCacheIndex(e,this.currentRow);this.currentRow-t>0&&(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1))===i;)i=n,t++;return t},this.updateRowLine=function(t,e){if(void 0===t&&(t=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=t===this.session.getLength()-1,this.line=this.session.getLine(t),this.session.$useWrapMode){var n=this.session.$wrapData[t];n&&(void 0===e&&(e=this.getSplitIndex()),e>0&&n.length?(this.wrapIndent=n.indent,this.line=e0?t-1:0,this.bidiMap),n=this.bidiMap.bidiLevels,i=0;0===t&&n[e]%2!=0&&e++;for(var r=0;r=h&&di+c/2;){if(i+=c,r===o.length-1){c=0;break}c=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!=0&&o[r]%2==0?(n0&&o[r-1]%2==0&&o[r]%2!=0?e=1+(n>i?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===c&&o[r-1]%2==0||!this.isRtlDir&&0===r&&o[r]%2!=0?e=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!=0&&0!==c&&r--,e=this.bidiMap.logicalFromVisual[r]),e+this.wrapIndent}}).call(a.prototype),x.BidiHandler=a}),ace.define("ace/range",["require","exports","module"],function(s,x,K){"use strict";var $=function(y,l,a,t){this.start={row:y,column:l},this.end={row:a,column:t}};(function(){this.isEqual=function(y){return this.start.row===y.start.row&&this.end.row===y.end.row&&this.start.column===y.start.column&&this.end.column===y.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(y,l){return 0==this.compare(y,l)},this.compareRange=function(y){var l,a=y.end,t=y.start;return 1==(l=this.compare(a.row,a.column))?1==(l=this.compare(t.row,t.column))?2:0==l?1:0:-1==l?-2:-1==(l=this.compare(t.row,t.column))?-1:1==l?42:0},this.comparePoint=function(y){return this.compare(y.row,y.column)},this.containsRange=function(y){return 0==this.comparePoint(y.start)&&0==this.comparePoint(y.end)},this.intersects=function(y){var l=this.compareRange(y);return-1==l||0==l||1==l},this.isEnd=function(y,l){return this.end.row==y&&this.end.column==l},this.isStart=function(y,l){return this.start.row==y&&this.start.column==l},this.setStart=function(y,l){"object"==typeof y?(this.start.column=y.column,this.start.row=y.row):(this.start.row=y,this.start.column=l)},this.setEnd=function(y,l){"object"==typeof y?(this.end.column=y.column,this.end.row=y.row):(this.end.row=y,this.end.column=l)},this.inside=function(y,l){return 0==this.compare(y,l)&&!(this.isEnd(y,l)||this.isStart(y,l))},this.insideStart=function(y,l){return 0==this.compare(y,l)&&!this.isEnd(y,l)},this.insideEnd=function(y,l){return 0==this.compare(y,l)&&!this.isStart(y,l)},this.compare=function(y,l){return this.isMultiLine()||y!==this.start.row?ythis.end.row?1:this.start.row===y?l>=this.start.column?0:-1:this.end.row===y?l<=this.end.column?0:1:0:lthis.end.column?1:0},this.compareStart=function(y,l){return this.start.row==y&&this.start.column==l?-1:this.compare(y,l)},this.compareEnd=function(y,l){return this.end.row==y&&this.end.column==l?1:this.compare(y,l)},this.compareInside=function(y,l){return this.end.row==y&&this.end.column==l?1:this.start.row==y&&this.start.column==l?-1:this.compare(y,l)},this.clipRows=function(y,l){if(this.end.row>l)var a={row:l+1,column:0};else this.end.rowl)var t={row:l+1,column:0};else this.start.rowe.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.isEmpty()?l.fromPoints(e,e):this.isBackwards()?l.fromPoints(e,t):l.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var t=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(t,this.doc.getLine(t).length)},this.setRange=this.setSelectionRange=function(t,e){e?(this.setSelectionAnchor(t.end.row,t.end.column),this.selectTo(t.start.row,t.start.column)):(this.setSelectionAnchor(t.start.row,t.start.column),this.selectTo(t.end.row,t.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection(function(){this.moveCursorTo(t,e)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if(typeof e>"u"){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var i,n="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(n);return r?(n=r.start.row,i=r.end.row):i=n,!0===e?new l(n,0,i,this.session.getLine(i).length):new l(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,n){var i=t.column,r=t.column+e;return n<0&&(i=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(i,r).split(" ").length-1==e},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(t,e,1);if(!o)return this.session.nonTokenRe.exec(i)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(e)),e>=n.length?(this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(e-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)}},this.$shortWordEndIndex=function(t){var i,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(t))n=this.session.tokenRe.lastIndex;else{for(;(i=t[n])&&r.test(i);)n++;if(n<1)for(o.lastIndex=0;(i=t[n])&&!o.test(i);)if(o.lastIndex=0,n++,r.test(i)){if(n>2){n--;break}for(;(i=t[n])&&r.test(i);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var o=this.doc.getLength();do{t++,i=this.doc.getLine(t)}while(t0&&/^\s*$/.test(i));e=i.length,/\s+$/.test(i)||(i="")}var r=$.stringReverse(i),o=this.$shortWordEndIndex(r);return this.moveCursorTo(t,e-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+t,n.column,i);0!==t&&0===e&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||t>0)&&r.row++,this.moveCursorTo(r.row,r.column+e,0===e)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var n=this.getCursor();return l.fromPoints(e,n)}catch{return l.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(e){var n=e.clone();return n.isBackwards=e.cursor==e.start,n});else(t=this.getRange()).isBackwards=this.isBackwards();return t},this.fromJSON=function(t){if(null==t.start){if(this.rangeList){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=l.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),x.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(s,x,K){"use strict";var k=s("./config"),$=2e3,y=function(l){for(var a in this.states=l,this.regExps={},this.matchMappings={},this.states){for(var t=this.states[a],e=[],n=0,i=this.matchMappings[a]={defaultToken:"text"},r="g",o=[],c=0;c1?this.$applyToken:h.token),b>1&&(/\\\d/.test(h.regex)?v=h.regex.replace(/\\([0-9]+)/g,function(f,w){return"\\"+(parseInt(w,10)+n+1)}):(b=1,v=this.removeCapturingGroups(h.regex)),!h.splitRegex&&"string"!=typeof h.token&&o.push(h)),i[n]=c,n+=b,e.push(v),h.onMatch||(h.onMatch=null)}}e.length||(i[0]=0,e.push("$")),o.forEach(function(f){f.splitRegex=this.createSplitterRegexp(f.regex,r)},this),this.regExps[a]=new RegExp("("+e.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(l){$=0|l},this.$applyToken=function(l){var a=this.splitRegex.exec(l).slice(1),t=this.token.apply(this,a);if("string"==typeof t)return[{type:t,value:l}];for(var e=[],n=0,i=t.length;nh){var A=l.substring(h,u-d.length);b.type==f?b.value+=A:(b.type&&c.push(b),b={type:f,value:A})}for(var _=0;_$){for(v>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:l});h1&&t[0]!==e&&t.unshift("#tmp",e),{tokens:c,state:t.length?t:e}},this.reportError=k.reportError}).call(y.prototype),x.Tokenizer=y}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(s,x,K){"use strict";var k=s("../lib/lang"),$=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,t){if(t)for(var e in a){for(var n=a[e],i=0;i=this.$rowTokens.length;){if(this.$row+=1,y||(y=this.$session.getLength()),this.$row>=y)return this.$row=y-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var y=this.$rowTokens,l=this.$tokenIndex,a=y[l].start;if(void 0!==a)return a;for(a=0;l>0;)a+=y[l-=1].value.length;return a},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var y=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new k(this.$row,l,this.$row,l+y.value.length)}}).call($.prototype),x.TokenIterator=$}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(s,x,K){"use strict";var e,k=s("../../lib/oop"),$=s("../behaviour").Behaviour,y=s("../../token_iterator").TokenIterator,l=s("../../lib/lang"),a=["text","paren.rparen","punctuation.operator"],t=["text","paren.rparen","punctuation.operator","comment"],n={},i={'"':'"',"'":"'"},r=function(h){var v=-1;if(h.multiSelect&&(v=h.selection.index,n.rangeCount!=h.multiSelect.rangeCount&&(n={rangeCount:h.multiSelect.rangeCount})),n[v])return e=n[v];e=n[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(h,v,b,f){var w=h.end.row-h.start.row;return{text:b+v+f,selection:[0,h.start.column+1,w,h.end.column+(w?0:1)]}},c=function(h){this.add("braces","insertion",function(v,b,f,w,d){var u=f.getCursorPosition(),A=w.doc.getLine(u.row);if("{"==d){r(f);var _=f.getSelectionRange(),p=w.doc.getTextRange(_);if(""!==p&&"{"!==p&&f.getWrapBehavioursEnabled())return o(_,p,"{","}");if(c.isSaneInsertion(f,w))return/[\]\}\)]/.test(A[u.column])||f.inMultiSelectMode||h&&h.braces?(c.recordAutoInsert(f,w,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(f,w,"{"),{text:"{",selection:[1,1]})}else if("}"==d){if(r(f),"}"==A.substring(u.column,u.column+1)&&null!==w.$findOpeningBracket("}",{column:u.column+1,row:u.row})&&c.isAutoInsertedClosing(u,A,d))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==d||"\r\n"==d){r(f);var g="";if(c.isMaybeInsertedClosing(u,A)&&(g=l.stringRepeat("}",e.maybeInsertedBrackets),c.clearMaybeInsertedClosing()),"}"===A.substring(u.column,u.column+1)){var C=w.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!C)return null;var S=this.$getIndent(w.getLine(C.row))}else{if(!g)return void c.clearMaybeInsertedClosing();S=this.$getIndent(A)}var F=S+w.getTabString();return{text:"\n"+F+"\n"+S+g,selection:[1,F.length,1,F.length]}}c.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&"{"==u){if(r(f),"}"==w.doc.getLine(d.start.row).substring(d.end.column,d.end.column+1))return d.end.column++,d;e.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,b,f,w,d){if("("==d){r(f);var u=f.getSelectionRange(),A=w.doc.getTextRange(u);if(""!==A&&f.getWrapBehavioursEnabled())return o(u,A,"(",")");if(c.isSaneInsertion(f,w))return c.recordAutoInsert(f,w,")"),{text:"()",selection:[1,1]}}else if(")"==d){r(f);var _=f.getCursorPosition(),p=w.doc.getLine(_.row);if(")"==p.substring(_.column,_.column+1)&&null!==w.$findOpeningBracket(")",{column:_.column+1,row:_.row})&&c.isAutoInsertedClosing(_,p,d))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&"("==u&&(r(f),")"==w.doc.getLine(d.start.row).substring(d.start.column+1,d.start.column+2)))return d.end.column++,d}),this.add("brackets","insertion",function(v,b,f,w,d){if("["==d){r(f);var u=f.getSelectionRange(),A=w.doc.getTextRange(u);if(""!==A&&f.getWrapBehavioursEnabled())return o(u,A,"[","]");if(c.isSaneInsertion(f,w))return c.recordAutoInsert(f,w,"]"),{text:"[]",selection:[1,1]}}else if("]"==d){r(f);var _=f.getCursorPosition(),p=w.doc.getLine(_.row);if("]"==p.substring(_.column,_.column+1)&&null!==w.$findOpeningBracket("]",{column:_.column+1,row:_.row})&&c.isAutoInsertedClosing(_,p,d))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&"["==u&&(r(f),"]"==w.doc.getLine(d.start.row).substring(d.start.column+1,d.start.column+2)))return d.end.column++,d}),this.add("string_dquotes","insertion",function(v,b,f,w,d){var u=w.$mode.$quotes||i;if(1==d.length&&u[d]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(d))return;r(f);var A=d,_=f.getSelectionRange(),p=w.doc.getTextRange(_);if(""!==p&&(1!=p.length||!u[p])&&f.getWrapBehavioursEnabled())return o(_,p,A,A);if(!p){var E=f.getCursorPosition(),m=w.doc.getLine(E.row),g=m.substring(E.column-1,E.column),C=m.substring(E.column,E.column+1),S=w.getTokenAt(E.row,E.column),F=w.getTokenAt(E.row,E.column+1);if("\\"==g&&S&&/escape/.test(S.type))return null;var R,L=S&&/string|escape/.test(S.type),D=!F||/string|escape/.test(F.type);if(C==A)(R=L!==D)&&/string\.end/.test(F.type)&&(R=!1);else{if(L&&!D||L&&D)return null;var O=w.$mode.tokenRe;O.lastIndex=0;var T=O.test(g);O.lastIndex=0;var U=O.test(g);if(T||U||C&&!/[\s;,.})\]\\]/.test(C))return null;R=!0}return{text:R?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,b,f,w,d){var u=w.doc.getTextRange(d);if(!d.isMultiLine()&&('"'==u||"'"==u)&&(r(f),w.doc.getLine(d.start.row).substring(d.start.column+1,d.start.column+2)==u))return d.end.column++,d})};c.isSaneInsertion=function(h,v){var b=h.getCursorPosition(),f=new y(v,b.row,b.column);if(!this.$matchTokenType(f.getCurrentToken()||"text",a)){var w=new y(v,b.row,b.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",a))return!1}return f.stepForward(),f.getCurrentTokenRow()!==b.row||this.$matchTokenType(f.getCurrentToken()||"text",t)},c.$matchTokenType=function(h,v){return v.indexOf(h.type||h)>-1},c.recordAutoInsert=function(h,v,b){var f=h.getCursorPosition(),w=v.doc.getLine(f.row);this.isAutoInsertedClosing(f,w,e.autoInsertedLineEnd[0])||(e.autoInsertedBrackets=0),e.autoInsertedRow=f.row,e.autoInsertedLineEnd=b+w.substr(f.column),e.autoInsertedBrackets++},c.recordMaybeInsert=function(h,v,b){var f=h.getCursorPosition(),w=v.doc.getLine(f.row);this.isMaybeInsertedClosing(f,w)||(e.maybeInsertedBrackets=0),e.maybeInsertedRow=f.row,e.maybeInsertedLineStart=w.substr(0,f.column)+b,e.maybeInsertedLineEnd=w.substr(f.column),e.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(h,v,b){return e.autoInsertedBrackets>0&&h.row===e.autoInsertedRow&&b===e.autoInsertedLineEnd[0]&&v.substr(h.column)===e.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(h,v){return e.maybeInsertedBrackets>0&&h.row===e.maybeInsertedRow&&v.substr(h.column)===e.maybeInsertedLineEnd&&v.substr(0,h.column)==e.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){e.autoInsertedLineEnd=e.autoInsertedLineEnd.substr(1),e.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){e&&(e.maybeInsertedBrackets=0,e.maybeInsertedRow=-1)},k.inherits(c,$),x.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(s,x,K){"use strict";x.packages={},function k($){var y=/\w{4}/g;for(var l in $)x.packages[l]=$[l].replace(y,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(s,x,K){"use strict";var k=s("../tokenizer").Tokenizer,$=s("./text_highlight_rules").TextHighlightRules,y=s("./behaviour/cstyle").CstyleBehaviour,l=s("../unicode"),a=s("../lib/lang"),t=s("../token_iterator").TokenIterator,e=s("../range").Range,n=function(){this.HighlightRules=$};(function(){this.$defaultBehaviour=new y,this.tokenRe=new RegExp("^["+l.packages.L+l.packages.Mn+l.packages.Mc+l.packages.Nd+l.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.packages.L+l.packages.Mn+l.packages.Mc+l.packages.Nd+l.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new k(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,r,o,c){var h=r.doc,v=!0,b=!0,f=1/0,w=r.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var _=this.lineCommentStart.map(a.escapeRegExp).join("|"),u=this.lineCommentStart[0];else _=a.escapeRegExp(this.lineCommentStart),u=this.lineCommentStart;_=new RegExp("^(\\s*)(?:"+_+") ?"),d=r.getUseSoftTabs();var m=function(T,U){var B=T.match(_);if(B){var P=B[1].length,W=B[0].length;!S(T,P,W)&&" "==B[0][W-1]&&W--,h.removeInLine(U,P,W)}},C=u+" ",E=function(T,U){(!v||/\S/.test(T))&&(S(T,f,f)?h.insertInLine({row:U,column:f},C):h.insertInLine({row:U,column:f},u))},g=function(T,U){return _.test(T)},S=function(T,U,B){for(var P=0;U--&&" "==T.charAt(U);)P++;if(P%w!=0)return!1;for(P=0;" "==T.charAt(B++);)P++;return w>2?P%w!=w-1:P%w==0}}else{if(!this.blockComment)return!1;u=this.blockComment.start;var A=this.blockComment.end,p=(_=new RegExp("^(\\s*)(?:"+a.escapeRegExp(u)+")"),new RegExp("(?:"+a.escapeRegExp(A)+")\\s*$"));E=function(D,R){g(D,R)||(!v||/\S/.test(D))&&(h.insertInLine({row:R,column:D.length},A),h.insertInLine({row:R,column:f},u))},m=function(D,R){var O;(O=D.match(p))&&h.removeInLine(R,D.length-O[0].length,D.length),(O=D.match(_))&&h.removeInLine(R,O[1].length,O[0].length)},g=function(D,R){if(_.test(D))return!0;for(var O=r.getTokens(R),T=0;TD.length&&(L=D.length)}),f==1/0&&(f=L,v=!1,b=!1),d&&f%w!=0&&(f=Math.floor(f/w)*w),F(b?m:E)},this.toggleBlockComment=function(i,r,o,c){var h=this.blockComment;if(h){!h.start&&h[0]&&(h=h[0]);var d,u,b=(v=new t(r,c.row,c.column)).getCurrentToken(),w=r.selection.toOrientedRange();if(b&&/comment/.test(b.type)){for(var A,_;b&&/comment/.test(b.type);){if(-1!=(p=b.value.indexOf(h.start))){var E=v.getCurrentTokenRow(),m=v.getCurrentTokenColumn()+p;A=new e(E,m,E,m+h.start.length);break}b=v.stepBackward()}var v;for(b=(v=new t(r,c.row,c.column)).getCurrentToken();b&&/comment/.test(b.type);){var p;if(-1!=(p=b.value.indexOf(h.end))){E=v.getCurrentTokenRow(),m=v.getCurrentTokenColumn()+p,_=new e(E,m,E,m+h.end.length);break}b=v.stepForward()}_&&r.remove(_),A&&(r.remove(A),d=A.start.row,u=-h.start.length)}else u=h.start.length,d=o.start.row,r.insert(o.end,h.end),r.insert(o.start,h.start);w.start.row==d&&(w.start.column+=u),w.end.row==d&&(w.end.column+=u),r.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(i,r,o){return this.$getIndent(r)},this.checkOutdent=function(i,r,o){return!1},this.autoOutdent=function(i,r,o){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){for(var r in this.$embeds=[],this.$modes={},i)i[r]&&(this.$embeds.push(r),this.$modes[r]=new i[r]);var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(r=0;r"u"?this.setPosition(a.row,a.column):this.setPosition(a,t)};(function(){function l(t,e,n){return t.rowthis.row)){var e=function a(t,e,n){var i="insert"==t.action,r=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),c=t.start,h=i?c:t.end;return l(e,c,n)?{row:e.row,column:e.column}:l(h,e,!n)?{row:e.row+r,column:e.column+(e.row==h.row?o:0)}:{row:c.row,column:c.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}},this.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),e<0&&(n.column=0),n}}).call(y.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(s,x,K){"use strict";var k=s("./lib/oop"),$=s("./apply_delta").applyDelta,y=s("./lib/event_emitter").EventEmitter,l=s("./range").Range,a=s("./anchor").Anchor,t=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){k.implement(this,y),this.setValue=function(e){var n=this.getLength()-1;this.remove(new l(0,0,n,this.getLine(n).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,n){return new a(this,e,n)},this.$split=0==="aaa".split(/a/).length?function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var n=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=n?n[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,n){return this.$lines.slice(e,n+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var n;if(e.start.row===e.end.row)n=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(n=this.getLines(e.start.row,e.end.row))[0]=(n[0]||"").substring(e.start.column);var i=n.length-1;e.end.row-e.start.row==i&&(n[i]=n[i].substring(0,e.end.column))}return n},this.insertLines=function(e,n){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,n)},this.removeLines=function(e,n){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,n)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,n){return this.getLength()<=1&&this.$detectNewLine(n),this.insertMergedLines(e,this.$split(n))},this.insertInLine=function(e,n){var i=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+n.length);return this.applyDelta({start:i,end:r,action:"insert",lines:[n]},!0),this.clonePos(r)},this.clippedPos=function(e,n){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,n=void 0);var r=this.getLine(e);return null==n&&(n=r.length),{row:e,column:n=Math.min(Math.max(n,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,n){return{row:e,column:n}},this.$clipPosition=function(e){var n=this.getLength();return e.row>=n?(e.row=Math.max(0,n-1),e.column=this.getLine(n-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,n){var i=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=n=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,n){return e instanceof l||(e=l.fromPoints(e.start,e.end)),0===n.length&&e.isEmpty()?e.start:n==this.getTextRange(e)?e.end:(this.remove(e),n?this.insert(e.start,n):e.start)},this.applyDeltas=function(e){for(var n=0;n=0;n--)this.revertDelta(e[n])},this.applyDelta=function(e,n){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!l.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),$(this.$lines,e,n),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,n){for(var i=e.lines,r=i.length,o=e.start.row,c=e.start.column,h=0,v=0;;){var b=i.slice(h=v,v+=n-1);if(v>r){e.lines=b,e.start.row=o+h,e.start.column=c;break}b.push(""),this.applyDelta({start:this.pos(o+h,c),end:this.pos(o+v,c=0),action:e.action,lines:b},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,n){for(var i=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,o=n||0,c=i.length;o20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=n,-1==i&&(i=n),o<=i&&t.fireUpdateEvent(o,i)}}};(function(){k.implement(this,$),this.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(l,a){this._signal("update",{data:{first:l,last:a}})},this.start=function(l){this.currentLine=Math.min(l||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(l){var a=l.start.row,t=l.end.row-a;if(0===t)this.lines[a]=null;else if("remove"==l.action)this.lines.splice(a,t+1,null),this.states.splice(a,t+1,null);else{var e=Array(t+1);e.unshift(a,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},this.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},this.$tokenizeRow=function(l){var a=this.doc.getLine(l),e=this.tokenizer.getLineTokens(a,this.states[l-1],l);return this.states[l]+""!=e.state+""?(this.states[l]=e.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=e.tokens}}).call(y.prototype),x.BackgroundTokenizer=y}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(s,x,K){"use strict";var k=s("./lib/lang"),y=(s("./lib/oop"),s("./range").Range),l=function(a,t,e){this.setRegexp(a),this.clazz=t,this.type=e||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,t,e,n){if(this.regExp)for(var r=n.lastRow,o=n.firstRow;o<=r;o++){var c=this.cache[o];null==c&&((c=k.getMatchOffsets(e.getLine(o),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(v){return new y(o,v.offset,o,v.offset+v.length)}),this.cache[o]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(a,c[h].toScreenRange(e),this.clazz,n)}}}).call(l.prototype),x.SearchHighlight=l}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(s,x,K){"use strict";var k=s("../range").Range;function $(y,l){this.foldData=y,Array.isArray(l)?this.folds=l:l=this.folds=[l];var a=l[l.length-1];this.range=new k(l[0].start.row,l[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}(function(){this.shiftRow=function(y){this.start.row+=y,this.end.row+=y,this.folds.forEach(function(l){l.start.row+=y,l.end.row+=y})},this.addFold=function(y){if(y.sameRow){if(y.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(y),this.folds.sort(function(l,a){return-l.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(y.start.row,y.start.column)>0?(this.end.row=y.end.row,this.end.column=y.end.column):this.range.compareStart(y.end.row,y.end.column)<0&&(this.start.row=y.start.row,this.start.column=y.start.column)}else if(y.start.row==this.end.row)this.folds.push(y),this.end.row=y.end.row,this.end.column=y.end.column;else{if(y.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(y),this.start.row=y.start.row,this.start.column=y.start.column}y.foldLine=this},this.containsRow=function(y){return y>=this.start.row&&y<=this.end.row},this.walk=function(y,l,a){var n,i,t=0,e=this.folds,o=!0;null==l&&(l=this.end.row,a=this.end.column);for(var c=0;c0)){var o=$(l,i.start);return 0===r?a&&0!==o?-n-2:n:o>0||0===o&&!a?n:-n-1}}return-n-1},this.add=function(l){var a=!l.isEmpty(),t=this.pointIndex(l.start,a);t<0&&(t=-t-1);var e=this.pointIndex(l.end,a,t);return e<0?e=-e-1:e++,this.ranges.splice(t,e-t,l)},this.addList=function(l){for(var a=[],t=l.length;t--;)a.push.apply(a,this.add(l[t]));return a},this.substractPoint=function(l){var a=this.pointIndex(l);if(a>=0)return this.ranges.splice(a,1)},this.merge=function(){for(var e,l=[],a=this.ranges,t=(a=a.sort(function(r,o){return $(r.start,o.start)}))[0],n=1;n=0},this.containsPoint=function(l){return this.pointIndex(l)>=0},this.rangeAtPoint=function(l){var a=this.pointIndex(l);if(a>=0)return this.ranges[a]},this.clipRows=function(l,a){var t=this.ranges;if(t[0].start.row>a||t[t.length-1].start.rowe)break;if(v.start.row==e&&v.start.column>=a.column&&(v.start.column==a.column&&this.$insertRight||(v.start.column+=r,v.start.row+=i)),v.end.row==e&&v.end.column>=a.column){if(v.end.column==a.column&&this.$insertRight)continue;v.end.column==a.column&&r>0&&cv.start.column&&v.end.column==o[c+1].start.column&&(v.end.column-=r),v.end.column+=r,v.end.row+=i}}if(0!=i&&c=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0);i=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r=e){h=t?i-=e-h:i=0);break}c>=t&&(i-=h>=t?c-h:c-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(e,n){return e.start.row-n.start.row}),t},this.addFold=function(t,e){var r,n=this.$foldData,i=!1;t instanceof y?r=t:(r=new y(e,t)).collapseChildren=e.collapseChildren,this.$clipRangeToDocument(r.range);var o=r.start.row,c=r.start.column,h=r.end.row,v=r.end.column;if(!(o0&&(this.removeFolds(w),w.forEach(function(_){r.addSubFold(_)}));for(var d=0;d0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(t,e){var n,i;if(null==t?(n=new k(0,0,this.getLength(),0),e=!0):n="number"==typeof t?new k(t,0,t,this.getLine(t).length):"row"in t?k.fromPoints(t,t):t,i=this.getFoldsInRangeList(n),e)this.removeFolds(i);else for(var r=i;r.length;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(i.length)return i},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==n&&(n=this.getLine(e).length);var o=this.doc,c="";return t.walk(function(h,v,b,f){if(!(vv)break}while(r&&c.test(r.type));r=i.stepBackward()}else r=i.getCurrentToken();return h.end.row=i.getCurrentTokenRow(),h.end.column=i.getCurrentTokenColumn()+r.value.length-2,h}},this.foldAll=function(t,e,n){null==n&&(n=1e5);var i=this.foldWidgets;if(i){e=e||this.getLength();for(var r=t=t||0;r=t){r=o.end.row;try{var c=this.addFold("...",o);c&&(c.collapseChildren=n)}catch{}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,"manual"==t&&this.unfold();var e=this.$foldMode;this.$setFolding(null),this.$setFolding(e)}},this.$setFolding=function(t){if(this.$foldMode!=t){if(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!t||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(t,e){var n=this.foldWidgets;if(!n||e&&n[t])return{};for(var r,i=t-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var c=this.getFoldWidgetRange(i);if(r||(r=c),c&&c.end.row>=t)break}i--}return{range:-1!==i&&c,firstRange:r}},this.onFoldWidgetClick=function(t,e){if(!this.$toggleFoldWidget(t,{children:(e=e.domEvent).shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey})){var r=e.target||e.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,o=this.getFoldAt(t,-1===r?0:i.length,r);if(o)return e.children||e.all?this.removeFold(o):this.expandFold(o),o;var c=this.getFoldWidgetRange(t,!0);if(c&&!c.isMultiLine()&&(o=this.getFoldAt(c.start.row,c.start.column,1))&&c.isEqual(o.range))return this.removeFold(o),o;if(e.siblings){var h=this.getParentFoldRangeData(t);if(h.range)var v=h.range.start.row+1,b=h.range.end.row;this.foldAll(v,b,e.all?1e4:0)}else e.children?(b=c?c.end.row:this.getLength(),this.foldAll(t+1,b,e.all?1e4:0)):c&&(e.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange){var r=this.getFoldAt(e=n.start.row,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(s,x,K){"use strict";var k=s("../token_iterator").TokenIterator,$=s("../range").Range;x.BracketMatch=function y(){this.findMatchingBracket=function(l,a){if(0==l.column)return null;var t=a||this.getLine(l.row).charAt(l.column-1);if(""==t)return null;var e=t.match(/([\(\[\{])|([\)\]\}])/);return e?e[1]?this.$findClosingBracket(e[1],l):this.$findOpeningBracket(e[2],l):null},this.getBracketRange=function(l){var e,a=this.getLine(l.row),t=!0,n=a.charAt(l.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=a.charAt(l.column),l={row:l.row,column:l.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/),t=!1),!i)return null;if(i[1]){if(!(r=this.$findClosingBracket(i[1],l)))return null;e=$.fromPoints(l,r),t||(e.end.column++,e.start.column--),e.cursor=e.end}else{var r;if(!(r=this.$findOpeningBracket(i[2],l)))return null;e=$.fromPoints(r,l),t||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(l,a,t){var e=this.$brackets[l],n=1,i=new k(this,a.row,a.column),r=i.getCurrentToken();if(r||(r=i.stepForward()),r){t||(t=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var o=a.column-i.getCurrentTokenColumn()-2,c=r.value;;){for(;o>=0;){var h=c.charAt(o);if(h==e){if(0==(n-=1))return{row:i.getCurrentTokenRow(),column:o+i.getCurrentTokenColumn()}}else h==l&&(n+=1);o-=1}do{r=i.stepBackward()}while(r&&!t.test(r.type));if(null==r)break;o=(c=r.value).length-1}return null}},this.$findClosingBracket=function(l,a,t){var e=this.$brackets[l],n=1,i=new k(this,a.row,a.column),r=i.getCurrentToken();if(r||(r=i.stepForward()),r){t||(t=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var o=a.column-i.getCurrentTokenColumn();;){for(var c=r.value,h=c.length;om&&(this.$docRowCache.splice(m,E),this.$screenRowCache.splice(m,E))},this.$getRowCacheIndex=function(p,E){for(var m=0,g=p.length-1;m<=g;){var C=m+g>>1,S=p[C];if(E>S)m=C+1;else{if(!(E=E);S++);return(g=m[S])?(g.index=S,g.start=C-g.value.length,g):null},this.setUndoManager=function(p){if(this.$undoManager=p,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),p){var E=this;this.$syncInformUndoManager=function(){E.$informUndoManager.cancel(),E.$deltasFold.length&&(E.$deltas.push({group:"fold",deltas:E.$deltasFold}),E.$deltasFold=[]),E.$deltasDoc.length&&(E.$deltas.push({group:"doc",deltas:E.$deltasDoc}),E.$deltasDoc=[]),E.$deltas.length>0&&p.execute({action:"aceupdate",args:[E.$deltas,E],merge:E.mergeUndoDeltas}),E.mergeUndoDeltas=!1,E.$deltas=[]},this.$informUndoManager=$.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?$.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(p){this.setOption("useSoftTabs",p)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(p){this.setOption("tabSize",p)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(p){return this.$useSoftTabs&&p.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(p){this.setOption("navigateWithinSoftTabs",p)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(p){this.setOption("overwrite",p)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(p,E){this.$decorations[p]||(this.$decorations[p]=""),this.$decorations[p]+=" "+E,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(p,E){this.$decorations[p]=(this.$decorations[p]||"").replace(" "+E,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(p){this.$breakpoints=[];for(var E=0;E0&&(g=!!m.charAt(E-1).match(this.tokenRe)),g||(g=!!m.charAt(E).match(this.tokenRe)),g)var C=this.tokenRe;else C=/^\s+$/.test(m.slice(E-1,E+1))?/\s/:this.nonTokenRe;var S=E;if(S>0){do{S--}while(S>=0&&m.charAt(S).match(C));S++}for(var F=E;Fp&&(p=E.screenWidth)}),this.lineWidgetWidth=p},this.$computeWidth=function(p){if(this.$modified||p){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var E=this.doc.getAllLines(),m=this.$rowLengthCache,g=0,C=0,S=this.$foldData[C],F=S?S.start.row:1/0,L=E.length,D=0;DF){if((D=S.end.row+1)>=L)break;F=(S=this.$foldData[C++])?S.start.row:1/0}null==m[D]&&(m[D]=this.$getStringScreenWidth(E[D])[0]),m[D]>g&&(g=m[D])}this.screenWidth=g}},this.getLine=function(p){return this.doc.getLine(p)},this.getLines=function(p,E){return this.doc.getLines(p,E)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(p){return this.doc.getTextRange(p||this.selection.getRange())},this.insert=function(p,E){return this.doc.insert(p,E)},this.remove=function(p){return this.doc.remove(p)},this.removeFullLines=function(p,E){return this.doc.removeFullLines(p,E)},this.undoChanges=function(p,E){if(p.length){this.$fromUndo=!0;for(var m=null,g=p.length-1;-1!=g;g--){var C=p[g];"doc"==C.group?(this.doc.revertDeltas(C.deltas),m=this.$getUndoSelection(C.deltas,!0,m)):C.deltas.forEach(function(S){this.addFolds(S.folds)},this)}return this.$fromUndo=!1,m&&this.$undoSelect&&!E&&this.selection.setSelectionRange(m),m}},this.redoChanges=function(p,E){if(p.length){this.$fromUndo=!0;for(var m=null,g=0;gp.end.column&&(S.start.column+=L),S.end.row==p.end.row&&S.end.column>p.end.column&&(S.end.column+=L)),F&&S.start.row>=p.end.row&&(S.start.row+=F,S.end.row+=F)),S.end=this.insert(S.start,g),C.length){var D=p.start,R=S.start,F=R.row-D.row,L=R.column-D.column;this.addFolds(C.map(function(U){return(U=U.clone()).start.row==D.row&&(U.start.column+=L),U.end.row==D.row&&(U.end.column+=L),U.start.row+=F,U.end.row+=F,U}))}return S},this.indentRows=function(p,E,m){m=m.replace(/\t/g,this.getTabString());for(var g=p;g<=E;g++)this.doc.insertInLine({row:g,column:0},m)},this.outdentRows=function(p){for(var E=p.collapseRows(),m=new n(0,0,0,0),g=this.getTabSize(),C=E.start.row;C<=E.end.row;++C){var S=this.getLine(C);m.start.row=C,m.end.row=C;for(var F=0;F0){var g;if((g=this.getRowFoldEnd(E+m))>this.doc.getLength()-1)return 0;C=g-E}else p=this.$clipRowToDocument(p),C=(E=this.$clipRowToDocument(E))-p+1;var S=new n(p,0,E,Number.MAX_VALUE),F=this.getFoldsInRange(S).map(function(D){return(D=D.clone()).start.row+=C,D.end.row+=C,D}),L=0==m?this.doc.getLines(p,E):this.doc.removeFullLines(p,E);return this.doc.insertFullLines(p+C,L),F.length&&this.addFolds(F),C},this.moveLinesUp=function(p,E){return this.$moveLines(p,E,-1)},this.moveLinesDown=function(p,E){return this.$moveLines(p,E,1)},this.duplicateLines=function(p,E){return this.$moveLines(p,E,0)},this.$clipRowToDocument=function(p){return Math.max(0,Math.min(p,this.doc.getLength()-1))},this.$clipColumnToRow=function(p,E){return E<0?0:Math.min(this.doc.getLine(p).length,E)},this.$clipPositionToDocument=function(p,E){if(E=Math.max(0,E),p<0)p=0,E=0;else{var m=this.doc.getLength();p>=m?(p=m-1,E=this.doc.getLine(m-1).length):E=Math.min(this.doc.getLine(p).length,E)}return{row:p,column:E}},this.$clipRangeToDocument=function(p){p.start.row<0?(p.start.row=0,p.start.column=0):p.start.column=this.$clipColumnToRow(p.start.row,p.start.column);var E=this.doc.getLength()-1;return p.end.row>E?(p.end.row=E,p.end.column=this.doc.getLine(E).length):p.end.column=this.$clipColumnToRow(p.end.row,p.end.column),p},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(p){if(p!=this.$useWrapMode){if(this.$useWrapMode=p,this.$modified=!0,this.$resetRowCache(0),p){var E=this.getLength();this.$wrapData=Array(E),this.$updateWrapData(0,E-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(p,E){(this.$wrapLimitRange.min!==p||this.$wrapLimitRange.max!==E)&&(this.$wrapLimitRange={min:p,max:E},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(p,E){var m=this.$wrapLimitRange;m.max<0&&(m={min:E,max:E});var g=this.$constrainWrapLimit(p,m.min,m.max);return g!=this.$wrapLimit&&g>1&&(this.$wrapLimit=g,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(p,E,m){return E&&(p=Math.max(E,p)),m&&(p=Math.min(m,p)),p},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(p){this.setWrapLimitRange(p,p)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(p){var E=this.$useWrapMode,m=p.action,g=p.start,C=p.end,S=g.row,F=C.row,L=F-S,D=null;if(this.$updating=!0,0!=L)if("remove"===m){this[E?"$wrapData":"$rowLengthCache"].splice(S,L);var R=this.$foldData;D=this.getFoldsInRange(p),this.removeFolds(D);var T=0;if(O=this.getFoldLine(C.row)){O.addRemoveChars(C.row,C.column,g.column-C.column),O.shiftRow(-L);var U=this.getFoldLine(S);U&&U!==O&&(U.merge(O),O=U),T=R.indexOf(O)+1}for(;T=C.row&&O.shiftRow(-L);F=S}else{var B=Array(L);B.unshift(S,0);var P=E?this.$wrapData:this.$rowLengthCache;if(P.splice.apply(P,B),R=this.$foldData,T=0,O=this.getFoldLine(S)){var W=O.range.compareInside(g.row,g.column);0==W?(O=O.split(g.row,g.column))&&(O.shiftRow(L),O.addRemoveChars(F,0,C.column-g.column)):-1==W&&(O.addRemoveChars(S,0,C.column-g.column),O.shiftRow(L)),T=R.indexOf(O)+1}for(;T=S&&O.shiftRow(L)}}else L=Math.abs(p.start.column-p.end.column),"remove"===m&&(D=this.getFoldsInRange(p),this.removeFolds(D),L=-L),(O=this.getFoldLine(S))&&O.addRemoveChars(S,g.column,L);return E&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,E?this.$updateWrapData(S,F):this.$updateRowLengthCache(S,F),D},this.$updateRowLengthCache=function(p,E,m){this.$rowLengthCache[p]=null,this.$rowLengthCache[E]=null},this.$updateWrapData=function(p,E){var F,L,m=this.doc.getAllLines(),g=this.getTabSize(),C=this.$wrapData,S=this.$wrapLimit,D=p;for(E=Math.min(E,m.length-1);D<=E;)(L=this.getFoldLine(D,L))?(F=[],L.walk(function(R,O,T,U){var B;if(null!=R){(B=this.$getDisplayTokens(R,F.length))[0]=b;for(var P=1;P=4352&&p<=4447||p>=4515&&p<=4519||p>=4602&&p<=4607||p>=9001&&p<=9002||p>=11904&&p<=11929||p>=11931&&p<=12019||p>=12032&&p<=12245||p>=12272&&p<=12283||p>=12288&&p<=12350||p>=12353&&p<=12438||p>=12441&&p<=12543||p>=12549&&p<=12589||p>=12593&&p<=12686||p>=12688&&p<=12730||p>=12736&&p<=12771||p>=12784&&p<=12830||p>=12832&&p<=12871||p>=12880&&p<=13054||p>=13056&&p<=19903||p>=19968&&p<=42124||p>=42128&&p<=42182||p>=43360&&p<=43388||p>=44032&&p<=55203||p>=55216&&p<=55238||p>=55243&&p<=55291||p>=63744&&p<=64255||p>=65040&&p<=65049||p>=65072&&p<=65106||p>=65108&&p<=65126||p>=65128&&p<=65131||p>=65281&&p<=65376||p>=65504&&p<=65510)}this.$computeWrapSplits=function(p,E,m){if(0==p.length)return[];var g=[],C=p.length,S=0,F=0,L=this.$wrapAsCode,D=this.$indentedSoftWrap,R=E<=Math.max(2*m,8)||!1===D?0:Math.floor(E/2);function T(W){var z=p.slice(S,W),G=z.length;z.join("").replace(/12/g,function(){G-=1}).replace(/2/g,function(){G-=1}),g.length||(U=function O(){var W=0;if(0===R)return W;if(D)for(var z=0;zE-U;){var B=S+E-U;if(p[B-1]>=10&&p[B]>=10)T(B);else if(p[B]!=b&&p[B]!=f){for(var P=Math.max(B-(E-(E>>2)),S-1);B>P&&p[B]P&&p[B]P&&9==p[B];)B--}else for(;B>P&&p[B]<10;)B--;B>P?T(++B):(2==p[B=S+E]&&B--,T(B-U))}else{for(;B!=S-1&&p[B]!=b;B--);if(B>S){T(B);continue}for(B=S+E;B39&&S<48||S>57&&S<64?m.push(9):S>=4352&&_(S)?m.push(1,2):m.push(1)}return m},this.$getStringScreenWidth=function(p,E,m){if(0==E)return[0,0];var g,C;for(null==E&&(E=1/0),m=m||0,C=0;C=4352&&_(g)?m+=2:m+=1,!(m>E));C++);return[m,C]},this.lineWidgets=null,this.getRowLength=function(p){if(this.lineWidgets)var E=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0;else E=0;return this.$useWrapMode&&this.$wrapData[p]?this.$wrapData[p].length+1+E:1+E},this.getRowLineCount=function(p){return this.$useWrapMode&&this.$wrapData[p]?this.$wrapData[p].length+1:1},this.getRowWrapIndent=function(p){if(this.$useWrapMode){var E=this.screenToDocumentPosition(p,Number.MAX_VALUE),m=this.$wrapData[E.row];return m.length&&m[0]=0){L=R[O],C=this.$docRowCache[O];var U=p>R[T-1]}else U=!T;for(var B=this.getLength()-1,P=this.getNextFoldLine(C),W=P?P.start.row:1/0;L<=p&&!(L+(D=this.getRowLength(C))>p||C>=B);)L+=D,++C>W&&(W=(P=this.getNextFoldLine(C=P.end.row+1,P))?P.start.row:1/0),U&&(this.$docRowCache.push(C),this.$screenRowCache.push(L));if(P&&P.start.row<=C)g=this.getFoldDisplayLine(P),C=P.start.row;else{if(L+D<=p||C>B)return{row:B,column:this.getLine(B).length};g=this.getLine(C),P=null}var z=0,G=Math.floor(p-L);if(this.$useWrapMode){var Y=this.$wrapData[C];Y&&(F=Y[G],G>0&&Y.length&&(z=Y.indent,g=g.substring(S=Y[G-1]||Y[Y.length-1])))}return void 0!==m&&this.$bidiHandler.isBidiRow(L+G,C,G)&&(E=this.$bidiHandler.offsetToCol(m)),S+=this.$getStringScreenWidth(g,E-z)[1],this.$useWrapMode&&S>=F&&(S=F-1),P?P.idxToPosition(S):{row:C,column:S}},this.documentToScreenPosition=function(p,E){if(typeof E>"u")var m=this.$clipPositionToDocument(p.row,p.column);else m=this.$clipPositionToDocument(p,E);var S,g=0,C=null;(S=this.getFoldAt(p=m.row,E=m.column,1))&&(p=S.start.row,E=S.start.column);var F,L=0,D=this.$docRowCache,R=this.$getRowCacheIndex(D,p),O=D.length;if(O&&R>=0){L=D[R],g=this.$screenRowCache[R];var T=p>D[O-1]}else T=!O;for(var U=this.getNextFoldLine(L),B=U?U.start.row:1/0;L=B){if((F=U.end.row+1)>p)break;B=(U=this.getNextFoldLine(F,U))?U.start.row:1/0}else F=L+1;g+=this.getRowLength(L),L=F,T&&(this.$docRowCache.push(L),this.$screenRowCache.push(g))}var P="";U&&L>=B?(P=this.getFoldDisplayLine(U,p,E),C=U.start.row):(P=this.getLine(p).substring(0,E),C=p);var W=0;if(this.$useWrapMode){var z=this.$wrapData[C];if(z){for(var G=0;P.length>=z[G];)g++,G++;P=P.substring(z[G-1]||0,P.length),W=G>0?z.indent:0}}return{row:g,column:W+this.$getStringScreenWidth(P)[0]}},this.documentToScreenColumn=function(p,E){return this.documentToScreenPosition(p,E).column},this.documentToScreenRow=function(p,E){return this.documentToScreenPosition(p,E).row},this.getScreenLength=function(){var p=0,E=null;if(this.$useWrapMode)for(var C=this.$wrapData.length,S=0,g=0,F=(E=this.$foldData[g++])?E.start.row:1/0;SF&&(S=E.end.row+1,F=(E=this.$foldData[g++])?E.start.row:1/0)}else{p=this.getLength();var m=this.$foldData;for(g=0;gm);S++);return[g,S]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=_}.call(c.prototype),s("./edit_session/folding").Folding.call(c.prototype),s("./edit_session/bracket_match").BracketMatch.call(c.prototype),l.defineOptions(c.prototype,"session",{wrap:{set:function(h){if(h&&"off"!=h?"free"==h?h=!0:"printMargin"==h?h=-1:"string"==typeof h&&(h=parseInt(h,10)||!1):h=!1,this.$wrap!=h)if(this.$wrap=h,h){var v="number"==typeof h?h:null;this.setWrapLimitRange(v,v),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(h){(h="auto"==h?"text"!=this.$mode.type:"text"!=h)!=this.$wrapAsCode&&(this.$wrapAsCode=h,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(h){this.$useWorker=h,this.$stopWorker(),h&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(h){isNaN(h)||this.$tabSize===h||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=h,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(h){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(h){this.doc.setNewLineMode(h)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(h){this.setMode(h)},get:function(){return this.$modeId}}}),x.EditSession=c}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(s,x,K){"use strict";var k=s("./lib/lang"),$=s("./lib/oop"),y=s("./range").Range,l=function(){this.$options={}};(function(){this.set=function(t){return $.mixin(this.$options,t),this},this.getOptions=function(){return k.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var i=null;return n.forEach(function(r,o,c,h){return i=new y(r,o,c,h),!(o==h&&e.start&&e.start.start&&0!=e.skipCurrent&&i.isEqual(e.start)&&(i=null,1))}),i},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,i=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),r=[],o=e.re;if(e.$isMultiLine){var v,c=o.length,h=i.length-c;e:for(var b=o.offset||0;b<=h;b++){for(var f=0;fu||(r.push(v=new y(b,u,b+c-1,A)),c>2&&(b=b+c-2))}}else for(var _=0;_g&&r[f].end.row==n.end.row;)f--;for(r=r.slice(_,f+1),_=0,f=r.length;_=h;u--)if(w(u,Number.MAX_VALUE,d))return;if(0!=e.wrap)for(u=v,h=c.row;u>=h;u--)if(w(u,Number.MAX_VALUE,d))return}};else b=function(u){var A=c.row;if(!w(A,c.column,u)){for(A+=1;A<=v;A++)if(w(A,0,u))return;if(0!=e.wrap)for(A=h,v=c.row;A<=v;A++)if(w(A,0,u))return}};if(e.$isMultiLine)var f=n.length,w=function(d,u,A){var _=i?d-f+1:d;if(!(_<0)){var p=t.getLine(_),E=p.search(n[0]);if(!(!i&&Eu)&&A(_,E,_+f-1,g))return!0}}};else w=i?function(u,A,_){var m,p=t.getLine(u),E=[],g=0;for(n.lastIndex=0;m=n.exec(p);){if(g=m.index,!(C=m[0].length)){if(g>=p.length)break;n.lastIndex=g+=1}if(m.index+C>A)break;E.push(m.index,C)}for(var S=E.length-1;S>=0;S-=2){var C,F=E[S-1];if(_(u,F,u,F+(C=E[S])))return!0}}:function(u,A,_){var E,p=t.getLine(u),m=A;for(n.lastIndex=A;E=n.exec(p);){var g=E[0].length;if(_(u,m=E.index,u,m+g))return!0;if(!g&&(n.lastIndex=m+=1,m>=p.length))return!1}};return{forEach:b}}}).call(l.prototype),x.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(s,x,K){"use strict";var k=s("../lib/keys"),$=s("../lib/useragent"),y=k.KEY_MODS;function l(t,e){this.platform=e||($.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,e){l.call(this,t,e),this.$singleCommand=!1}a.prototype=l.prototype,function(){function t(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,n){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],n||delete this.commands[i];var r=this.commandKeyBinding;for(var o in r){var c=r[o];if(c==e)delete r[o];else if(Array.isArray(c)){var h=c.indexOf(e);-1!=h&&(c.splice(h,1),1==c.length&&(r[o]=c[0]))}}},this.bindKey=function(e,n,i){if("object"==typeof e&&e&&(null==i&&(i=e.position),e=e[this.platform]),e){if("function"==typeof n)return this.addCommand({exec:n,bindKey:e,name:n.name||e});e.split("|").forEach(function(r){var o="";if(-1!=r.indexOf(" ")){var c=r.split(/\s+/);r=c.pop(),c.forEach(function(b){var f=this.parseKeys(b);this._addCommandToBinding(o+=(o?" ":"")+(y[f.hashId]+f.key),"chainKeys")},this),o+=" "}var h=this.parseKeys(r);this._addCommandToBinding(o+(y[h.hashId]+h.key),n,i)},this)}},this._addCommandToBinding=function(e,n,i){var o,r=this.commandKeyBinding;if(n)if(!r[e]||this.$singleCommand)r[e]=n;else{Array.isArray(r[e])?-1!=(o=r[e].indexOf(n))&&r[e].splice(o,1):r[e]=[r[e]],"number"!=typeof i&&(i=t(n));var c=r[e];for(o=0;oi);o++);c.splice(o,0,n)}else delete r[e]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(n){var i=e[n];if(i){if("string"==typeof i)return this.bindKey(i,n);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=n),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(n){this.removeCommand(e[n])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(n){this.bindKey(n,e[n])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var n=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(v){return v}),i=n.pop(),r=k[i];if(k.FUNCTION_KEYS[r])i=k.FUNCTION_KEYS[r].toLowerCase();else{if(!n.length)return{key:i,hashId:-1};if(1==n.length&&"shift"==n[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,c=n.length;c--;){var h=k.KEY_MODS[n[c]];if(null==h)return typeof console<"u"&&console.error("invalid modifier "+n[c]+" in "+e),!1;o|=h}return{key:i,hashId:o}},this.findKeyCommand=function(n,i){return this.commandKeyBinding[y[n]+i]},this.handleKeyboard=function(e,n,i,r){if(!(r<0)){var o=y[n]+i,c=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,c=this.commandKeyBinding[e.$keyChain]||c),!c||"chainKeys"!=c&&"chainKeys"!=c[c.length-1]?(e.$keyChain&&(n&&4!=n||1!=i.length?(-1==n||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:c}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,n){return n.$keyChain||""}}.call(l.prototype),x.HashHandler=l,x.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("../lib/oop"),$=s("../keyboard/hash_handler").MultiHashHandler,y=s("../lib/event_emitter").EventEmitter,l=function(a,t){$.call(this,t,a),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};k.inherits(l,$),function(){k.implement(this,y),this.exec=function(a,t,e){if(Array.isArray(a)){for(var n=a.length;n--;)if(this.exec(a[n],t,e))return!0;return!1}if("string"==typeof a&&(a=this.commands[a]),!a||t&&t.$readOnly&&!a.readOnly||a.isAvailable&&!a.isAvailable(t))return!1;var i={editor:t,command:a,args:e};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(a){if(!this.$inReplay)return a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,a):this.exec(t[0],a,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}.call(l.prototype),x.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(s,x,K){"use strict";var k=s("../lib/lang"),$=s("../config"),y=s("../range").Range;function l(a,t){return{win:a,mac:t}}x.commands=[{name:"showSettingsMenu",bindKey:l("Ctrl-,","Command-,"),exec:function(a){$.loadModule("ace/ext/settings_menu",function(t){t.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:l("Alt-E","F4"),exec:function(a){$.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(a){$.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:l("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:l(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:l("Ctrl-L","Command-L"),exec:function(a){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||a.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:l("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:l("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:l("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:l("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:l("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",bindKey:l("Ctrl-F","Command-F"),exec:function(a){$.loadModule("ace/ext/searchbox",function(t){t.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:l("Up","Up|Ctrl-P"),exec:function(a,t){a.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:l("Down","Down|Ctrl-N"),exec:function(a,t){a.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:l("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:l("Left","Left|Ctrl-B"),exec:function(a,t){a.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:l("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:l("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:l("Right","Right|Ctrl-F"),exec:function(a,t){a.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:l(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:l(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:l("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:l("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:l("Ctrl-P","Ctrl-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:l("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(a){},readOnly:!0},{name:"cut",exec:function(a){var t=a.getSelectionRange();a._emit("cut",t),a.selection.isEmpty()||(a.session.remove(t),a.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(a,t){a.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:l("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:l("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(a){$.loadModule("ace/ext/searchbox",function(t){t.Search(a,!0)})}},{name:"undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:l("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:l("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:l("Shift-Delete",null),exec:function(a){if(!a.selection.isEmpty())return!1;a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(a){var t=a.selection.getRange();t.start.column=0,a.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(a){var t=a.selection.getRange();t.end.column=Number.MAX_VALUE,a.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:l("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(a,t){a.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(a,t){a.insert(k.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:l(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var t=a.selection.getRange();t.start.column=t.end.column=0,t.end.row++,a.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:l(null,null),exec:function(a){for(var t=a.selection.isBackwards(),e=t?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),n=t?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),i=a.session.doc.getLine(e.row).length,o=a.session.doc.getTextRange(a.selection.getRange()).replace(/\n\s*/," ").length,c=a.session.doc.getLine(e.row),h=e.row+1;h<=n.row+1;h++){var v=k.stringTrimLeft(k.stringTrimRight(a.session.doc.getLine(h)));0!==v.length&&(v=" "+v),c+=v}n.row+10?(a.selection.moveCursorTo(e.row,e.column),a.selection.selectTo(e.row,e.column+o)):(i=a.session.doc.getLine(e.row).length>i?i+1:i,a.selection.moveCursorTo(e.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:l(null,null),exec:function(a){var t=a.session.doc.getLength()-1,e=a.session.doc.getLine(t).length,n=a.selection.rangeList.ranges,i=[];n.length<1&&(n=[a.selection.getRange()]);for(var r=0;r0&&this.$blockScrolling--;var A=u&&u.scrollIntoView;if(A){switch(A){case"center-animate":A="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var _=this.selection.getRange(),p=this.renderer.layerConfig;(_.start.row>=p.lastRow||_.end.row<=p.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==A&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(d){if(this.$mergeUndoDeltas){var u=this.prevOp,A=this.$mergeableCommands,_=u.command&&d.command.name==u.command.name;if("insertstring"==d.command.name){var p=d.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),_=_&&this.mergeNextCommand&&(!/\s/.test(p)||/\s/.test(u.args)),this.mergeNextCommand=!0}else _=_&&-1!==A.indexOf(d.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(_=!1),_?this.session.mergeUndoDeltas=!0:-1!==A.indexOf(d.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(d,u){if(d&&"string"==typeof d){this.$keybindingId=d;var A=this;b.loadModule(["keybinding",d],function(_){A.$keybindingId==d&&A.keyBinding.setKeyboardHandler(_&&_.handler),u&&u()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(d),u&&u()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(d){if(this.session!=d){this.curOp&&this.endOperation(),this.curOp={};var u=this.session;if(u){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var A=this.session.getSelection();A.off("changeCursor",this.$onCursorChange),A.off("changeSelection",this.$onSelectionChange)}this.session=d,d?(this.$onDocumentChange=this.onDocumentChange.bind(this),d.on("change",this.$onDocumentChange),this.renderer.setSession(d),this.$onChangeMode=this.onChangeMode.bind(this),d.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),d.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),d.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),d.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),d.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),d.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=d.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(d)),this._signal("changeSession",{session:d,oldSession:u}),this.curOp=null,u&&u._signal("changeEditor",{oldEditor:this}),d&&d._signal("changeEditor",{editor:this}),d&&d.bgTokenizer&&d.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(d,u){return this.session.doc.setValue(d),u?1==u?this.navigateFileEnd():-1==u&&this.navigateFileStart():this.selectAll(),d},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(d){this.renderer.onResize(d)},this.setTheme=function(d,u){this.renderer.setTheme(d,u)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(d){this.renderer.setStyle(d)},this.unsetStyle=function(d){this.renderer.unsetStyle(d)},this.getFontSize=function(){return this.getOption("fontSize")||$.computedStyle(this.container,"fontSize")},this.setFontSize=function(d){this.setOption("fontSize",d)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var d=this;this.$highlightPending=!0,setTimeout(function(){d.$highlightPending=!1;var u=d.session;if(u&&u.bgTokenizer){var A=u.findMatchingBracket(d.getCursorPosition());if(A)var _=new o(A.row,A.column,A.row,A.column+1);else u.$mode.getMatching&&(_=u.$mode.getMatching(d.session));_&&(u.$bracketHighlight=u.addMarker(_,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var d=this;this.$highlightTagPending=!0,setTimeout(function(){d.$highlightTagPending=!1;var u=d.session;if(u&&u.bgTokenizer){var A=d.getCursorPosition(),_=new f(d.session,A.row,A.column),p=_.getCurrentToken();if(!p||!/\b(?:tag-open|tag-name)/.test(p.type))return u.removeMarker(u.$tagHighlight),void(u.$tagHighlight=null);if(-1==p.type.indexOf("tag-open")||(p=_.stepForward())){var E=p.value,m=0,g=_.stepBackward();if("<"==g.value)do{g=p,(p=_.stepForward())&&p.value===E&&-1!==p.type.indexOf("tag-name")&&("<"===g.value?m++:"=0);else{do{p=g,g=_.stepBackward(),p&&p.value===E&&-1!==p.type.indexOf("tag-name")&&("<"===g.value?m++:"1)&&(u=!1)),d.$highlightLineMarker&&!u)d.removeMarker(d.$highlightLineMarker.id),d.$highlightLineMarker=null;else if(!d.$highlightLineMarker&&u){var A=new o(u.row,u.column,u.row,1/0);A.id=d.addMarker(A,"ace_active-line","screenLine"),d.$highlightLineMarker=A}else u&&(d.$highlightLineMarker.start.row=u.row,d.$highlightLineMarker.end.row=u.row,d.$highlightLineMarker.start.column=u.column,d._signal("changeBackMarker"))},this.onSelectionChange=function(d){var u=this.session;if(u.$selectionMarker&&u.removeMarker(u.$selectionMarker),u.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var A=this.selection.getRange(),_=this.getSelectionStyle();u.$selectionMarker=u.addMarker(A,"ace_selection",_)}var p=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(p),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var d=this.session,u=this.getSelectionRange();if(!u.isEmpty()&&!u.isMultiLine()){var A=u.start.column-1,_=u.end.column+1,p=d.getLine(u.start.row),E=p.length,m=p.substring(Math.max(A,0),Math.min(_,E));if(!(A>=0&&/^[\w\d]/.test(m)||_<=E&&/[\w\d]$/.test(m))&&(m=p.substring(u.start.column,u.end.column),/^[\w\d]+$/.test(m)))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:m})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(d){this.renderer.updateText(),this._emit("changeMode",d)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var d=this.getSelectedText();return this._signal("copy",d),d},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(d,u){this.commands.exec("paste",this,{text:d,event:u})},this.$handlePaste=function(d){"string"==typeof d&&(d={text:d}),this._signal("paste",d);var u=d.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(u);else{var A=u.split(/\r\n|\r|\n/),_=this.selection.rangeList.ranges;if(A.length>_.length||A.length<2||!A[1])return this.commands.exec("insertstring",this,u);for(var p=_.length;p--;){var E=_[p];E.isEmpty()||this.session.remove(E),this.session.insert(E.start,A[p])}}},this.execCommand=function(d,u){return this.commands.exec(d,this,u)},this.insert=function(d,u){var A=this.session,_=A.getMode(),p=this.getCursorPosition();if(this.getBehavioursEnabled()&&!u){var E=_.transformAction(A.getState(p.row),"insertion",this,A,d);E&&(d!==E.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),d=E.text)}if("\t"==d&&(d=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==d.indexOf("\n")&&((m=new o.fromPoints(p,p)).end.column+=d.length,this.session.remove(m));else{var m=this.getSelectionRange();p=this.session.remove(m),this.clearSelection()}if("\n"==d||"\r\n"==d){var F=A.getLine(p.row);if(p.column>F.search(/\S|$/)){var g=F.substr(p.column).search(/\S|$/);A.doc.removeInLine(p.row,p.column,p.column+g)}}this.clearSelection();var C=p.column,S=A.getState(p.row),L=(F=A.getLine(p.row),_.checkOutdent(S,F,d));if(A.insert(p,d),E&&E.selection&&this.selection.setSelectionRange(2==E.selection.length?new o(p.row,C+E.selection[0],p.row,C+E.selection[1]):new o(p.row+E.selection[0],E.selection[1],p.row+E.selection[2],E.selection[3])),A.getDocument().isNewLine(d)){var R=_.getNextLineIndent(S,F.slice(0,p.column),A.getTabString());A.insert({row:p.row+1,column:0},R)}L&&_.autoOutdent(S,A,p.row)},this.onTextInput=function(d){this.keyBinding.onTextInput(d)},this.onCommandKey=function(d,u,A){this.keyBinding.onCommandKey(d,u,A)},this.setOverwrite=function(d){this.session.setOverwrite(d)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(d){this.setOption("scrollSpeed",d)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(d){this.setOption("dragDelay",d)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(d){this.setOption("selectionStyle",d)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(d){this.setOption("highlightActiveLine",d)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(d){this.setOption("highlightGutterLine",d)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(d){this.setOption("highlightSelectedWord",d)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(d){this.renderer.setAnimatedScroll(d)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(d){this.renderer.setShowInvisibles(d)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(d){this.renderer.setDisplayIndentGuides(d)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(d){this.renderer.setShowPrintMargin(d)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(d){this.renderer.setPrintMarginColumn(d)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(d){this.setOption("readOnly",d)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(d){this.setOption("behavioursEnabled",d)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(d){this.setOption("wrapBehavioursEnabled",d)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(d){this.setOption("showFoldWidgets",d)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(d){this.setOption("fadeFoldWidgets",d)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(d){this.selection.isEmpty()&&("left"==d?this.selection.selectLeft():this.selection.selectRight());var u=this.getSelectionRange();if(this.getBehavioursEnabled()){var A=this.session,_=A.getState(u.start.row),p=A.getMode().transformAction(_,"deletion",this,A,u);if(0===u.end.column){var E=A.getTextRange(u);if("\n"==E[E.length-1]){var m=A.getLine(u.end.row);/^\s+$/.test(m)&&(u.end.column=m.length)}}p&&(u=p)}this.session.remove(u),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var d=this.getSelectionRange();d.start.column==d.end.column&&d.start.row==d.end.row&&(d.end.column=0,d.end.row++),this.session.remove(d),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var d=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(d)},this.transposeLetters=function(){if(this.selection.isEmpty()){var d=this.getCursorPosition(),u=d.column;if(0!==u){var _,p,A=this.session.getLine(d.row);ug.toLowerCase()?1:0});var p=new o(0,0,0,0);for(_=d.first;_<=d.last;_++){var E=u.getLine(_);p.start.row=_,p.end.row=_,p.end.column=E.length,u.replace(p,A[_-d.first])}},this.toggleCommentLines=function(){var d=this.session.getState(this.getCursorPosition().row),u=this.$getSelectedRows();this.session.getMode().toggleCommentLines(d,this.session,u.first,u.last)},this.toggleBlockComment=function(){var d=this.getCursorPosition(),u=this.session.getState(d.row),A=this.getSelectionRange();this.session.getMode().toggleBlockComment(u,this.session,A,d)},this.getNumberAt=function(d,u){var A=/[\-]?[0-9]+(?:\.[0-9]+)?/g;A.lastIndex=0;for(var _=this.session.getLine(d);A.lastIndex=u)return{value:p[0],start:p.index,end:p.index+p[0].length}}return null},this.modifyNumber=function(d){var u=this.selection.getCursor().row,A=this.selection.getCursor().column,_=new o(u,A-1,u,A),p=this.session.getTextRange(_);if(!isNaN(parseFloat(p))&&isFinite(p)){var E=this.getNumberAt(u,A);if(E){var m=E.value.indexOf(".")>=0?E.start+E.value.indexOf(".")+1:E.end,g=E.start+E.value.length-m,C=parseFloat(E.value);C*=Math.pow(10,g),C+=d*=m!==E.end&&AR+1)break;R=O.last}for(F--,g=this.session.$moveLines(D,R,u?0:d),u&&-1==d&&(L=F+1);L<=F;)m[L].moveBy(g,0),L++;u||(g=0),C+=g}p.fromOrientedRange(p.ranges[0]),p.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(d){return d=(d||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(d.start.row),last:this.session.getRowFoldEnd(d.end.row)}},this.onCompositionStart=function(d){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(d){this.renderer.setCompositionText(d)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(d){return d>=this.getFirstVisibleRow()&&d<=this.getLastVisibleRow()},this.isRowFullyVisible=function(d){return d>=this.renderer.getFirstFullyVisibleRow()&&d<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(d,u){var A=this.renderer,_=this.renderer.layerConfig,p=d*Math.floor(_.height/_.lineHeight);this.$blockScrolling++,!0===u?this.selection.$moveSelection(function(){this.moveCursorBy(p,0)}):!1===u&&(this.selection.moveCursorBy(p,0),this.selection.clearSelection()),this.$blockScrolling--;var E=A.scrollTop;A.scrollBy(0,p*_.lineHeight),null!=u&&A.scrollCursorIntoView(null,.5),A.animateScrolling(E)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(d){this.renderer.scrollToRow(d)},this.scrollToLine=function(d,u,A,_){this.renderer.scrollToLine(d,u,A,_)},this.centerSelection=function(){var d=this.getSelectionRange(),u={row:Math.floor(d.start.row+(d.end.row-d.start.row)/2),column:Math.floor(d.start.column+(d.end.column-d.start.column)/2)};this.renderer.alignCursor(u,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(d,u){this.selection.moveCursorTo(d,u)},this.moveCursorToPosition=function(d){this.selection.moveCursorToPosition(d)},this.jumpToMatching=function(d,u){var A=this.getCursorPosition(),_=new f(this.session,A.row,A.column),p=_.getCurrentToken(),E=p||_.stepForward();if(E){var m,F,g=!1,C={},S=A.column-E.start,L={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(E.value.match(/[{}()\[\]]/g)){for(;S=0;--E)this.$tryReplace(A[E],d)&&_++;return this.selection.setSelectionRange(p),this.$blockScrolling-=1,_},this.$tryReplace=function(d,u){var A=this.session.getTextRange(d);return null!==(u=this.$search.replace(A,u))?(d.end=this.session.replace(d,u),d):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(d,u,A){u||(u={}),"string"==typeof d||d instanceof RegExp?u.needle=d:"object"==typeof d&&k.mixin(u,d);var _=this.selection.getRange();null==u.needle&&((d=this.session.getTextRange(_)||this.$search.$options.needle)||(_=this.session.getWordRange(_.start.row,_.start.column),d=this.session.getTextRange(_)),this.$search.set({needle:d})),this.$search.set(u),u.start||this.$search.set({start:_});var p=this.$search.find(this.session);return u.preventScroll?p:p?(this.revealRange(p,A),p):(u.backwards?_.start=_.end:_.end=_.start,void this.selection.setRange(_))},this.findNext=function(d,u){this.find({skipCurrent:!0,backwards:!1},d,u)},this.findPrevious=function(d,u){this.find(d,{skipCurrent:!0,backwards:!0},u)},this.revealRange=function(d,u){this.$blockScrolling+=1,this.session.unfold(d),this.selection.setSelectionRange(d),this.$blockScrolling-=1;var A=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(d.start,d.end,.5),!1!==u&&this.renderer.animateScrolling(A)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(d){if(d){var u,A=this,_=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var p=this.$scrollAnchor;p.style.cssText="position:absolute",this.container.insertBefore(p,this.container.firstChild);var E=this.on("changeSelection",function(){_=!0}),m=this.renderer.on("beforeRender",function(){_&&(u=A.renderer.container.getBoundingClientRect())}),g=this.renderer.on("afterRender",function(){if(_&&u&&(A.isFocused()||A.searchBox&&A.searchBox.isFocused())){var C=A.renderer,S=C.$cursorLayer.$pixelPos,F=C.layerConfig,L=S.top-F.offset;null!=(_=S.top>=0&&L+u.top<0||!(S.topwindow.innerHeight)&&null)&&(p.style.top=L+"px",p.style.left=S.left+"px",p.style.height=F.lineHeight+"px",p.scrollIntoView(_)),_=u=null}});this.setAutoScrollEditorIntoView=function(C){C||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",E),this.renderer.off("afterRender",g),this.renderer.off("beforeRender",m))}}},this.$resetCursorStyle=function(){var d=this.$cursorStyle||"ace",u=this.renderer.$cursorLayer;u&&(u.setSmoothBlinking(/smooth/.test(d)),u.isBlinking=!this.$readOnly&&"wide"!=d,$.setCssClass(u.element,"ace_slim-cursors",/slim/.test(d)))}}.call(w.prototype),b.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(d){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:d})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(d){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(d){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(d){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(d){this.setAutoScrollEditorIntoView(d)}},keyboardHandler:{set:function(d){this.setKeyboardHandler(d)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),x.Editor=w}),ace.define("ace/undomanager",["require","exports","module"],function(s,x,K){"use strict";var k=function(){this.reset()};(function(){function $(a){return{action:a.action,start:a.start,end:a.end,lines:1==a.lines.length?null:a.lines,text:1==a.lines.length?a.lines[0]:null}}function y(a){return{action:a.action,start:a.start,end:a.end,lines:a.lines||[a.text]}}function l(a,t){for(var e=new Array(a.length),n=0;n0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(a){return l(a,$)},this.$deserializeDeltas=function(a){return l(a,y)}}).call(k.prototype),x.UndoManager=k}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("../lib/dom"),$=s("../lib/oop"),y=s("../lib/lang"),l=s("../lib/event_emitter").EventEmitter,a=function(t){this.element=k.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){$.implement(this,l),this.setSession=function(t){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=t,t&&t.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,e)},this.setAnnotations=function(t){this.$annotations=[];for(var e=0;eo&&(o=(r=e.getNextFoldLine(A=r.end.row+1,r))?r.start.row:1/0),A>i){for(;this.$cells.length>u+1;)d=this.$cells.pop(),this.element.removeChild(d.element);break}(d=this.$cells[++u])||((d={element:null,textNode:null,foldWidget:null}).element=k.createElement("div"),d.textNode=document.createTextNode(""),d.element.appendChild(d.textNode),this.element.appendChild(d.element),this.$cells[u]=d);var p,_="ace_gutter-cell ";if(h[A]&&(_+=h[A]),v[A]&&(_+=v[A]),this.$annotations[A]&&(_+=this.$annotations[A].className),d.element.className!=_&&(d.element.className=_),(p=e.getRowLength(A)*t.lineHeight+"px")!=d.element.style.height&&(d.element.style.height=p),c){var E=c[A];null==E&&(E=c[A]=e.getFoldWidget(A))}if(E)d.foldWidget||(d.foldWidget=k.createElement("span"),d.element.appendChild(d.foldWidget)),_="ace_fold-widget ace_"+E,d.foldWidget.className!=(_+="start"==E&&A==o&&An.right-e.right?"foldWidgets":void 0}}).call(a.prototype),x.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(s,x,K){"use strict";var k=s("../range").Range,$=s("../lib/dom"),y=function(l){this.element=$.createElement("div"),this.element.className="ace_layer ace_marker-layer",l.appendChild(this.element)};(function(){function l(a,t,e,n){return(a?1:0)|(t?2:0)|(e?4:0)|(n?8:0)}this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){if(a){this.config=a;var t=[];for(var e in this.markers){var n=this.markers[e];if(n.range){var i=n.range.clipRows(a.firstRow,a.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),n.renderer){var r=this.$getTop(i.start.row,a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.start.row)?this.session.$bidiHandler.getPosLeft(i.start.column):i.start.column*a.characterWidth);n.renderer(t,i,o,r,a)}else"fullLine"==n.type?this.drawFullLineMarker(t,i,n.clazz,a):"screenLine"==n.type?this.drawScreenLineMarker(t,i,n.clazz,a):i.isMultiLine()?"text"==n.type?this.drawTextMarker(t,i,n.clazz,a):this.drawMultiLineMarker(t,i,n.clazz,a):this.session.$bidiHandler.isBidiRow(i.start.row)?this.drawBidiSingleLineMarker(t,i,n.clazz+" ace_start ace_br15",a):this.drawSingleLineMarker(t,i,n.clazz+" ace_start ace_br15",a)}else n.update(t,this,this.session,a)}this.element.innerHTML=t.join("")}},this.$getTop=function(a,t){return(a-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(a,t,e,n,i){for(var r=this.session,o=t.start.row,c=t.end.row,h=o,v=0,b=0,f=r.getScreenLastRowColumn(h),w=null,d=new k(h,t.start.column,h,b);h<=c;h++)d.start.row=d.end.row=h,d.start.column=h==o?t.start.column:r.getRowWrapIndent(h),d.end.column=f,v=b,b=f,f=h+1f,h==c),this.session.$bidiHandler.isBidiRow(h)?this.drawBidiSingleLineMarker(a,d,w,n,h==c?0:1,i):this.drawSingleLineMarker(a,d,w,n,h==c?0:1,i)},this.drawMultiLineMarker=function(a,t,e,n,i){var o,c,r=this.$padding;if(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((v=t.clone()).end.row=v.start.row,v.end.column=this.session.getLine(v.start.row).length,this.drawBidiSingleLineMarker(a,v,e+" ace_br1 ace_start",n,null,i)):(o=n.lineHeight,c=this.$getTop(t.start.row,n),a.push("
")),this.session.$bidiHandler.isBidiRow(t.end.row)){var v;(v=t.clone()).start.row=v.end.row,v.start.column=0,this.drawBidiSingleLineMarker(a,v,e+" ace_br12",n,null,i)}else{var b=t.end.column*n.characterWidth;o=n.lineHeight,c=this.$getTop(t.end.row,n),a.push("
")}if(!((o=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){c=this.$getTop(t.start.row+1,n);var f=(t.start.column?1:0)|(t.end.column?0:8);a.push("
")}},this.drawSingleLineMarker=function(a,t,e,n,i,r){var o=n.lineHeight,c=(t.end.column+(i||0)-t.start.column)*n.characterWidth,h=this.$getTop(t.start.row,n);a.push("
")},this.drawBidiSingleLineMarker=function(a,t,e,n,i,r){var o=n.lineHeight,c=this.$getTop(t.start.row,n),h=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(b){a.push("
")})},this.drawFullLineMarker=function(a,t,e,n,i){var r=this.$getTop(t.start.row,n),o=n.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,n)-r),a.push("
")},this.drawScreenLineMarker=function(a,t,e,n,i){var r=this.$getTop(t.start.row,n);a.push("
")}}).call(y.prototype),x.Marker=y}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("../lib/oop"),$=s("../lib/dom"),y=s("../lib/lang"),a=(s("../lib/useragent"),s("../lib/event_emitter").EventEmitter),t=function(e){this.element=$.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){k.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(n){this._signal("changeCharacterSize",n)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var n=this.$tabStrings=[0],i=1;i"+y.stringRepeat(this.TAB_CHAR,i)+"":y.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",o="",c="";if(this.showInvisibles){r+=" ace_invisible",o=" ace_invisible_space",c=" ace_invisible_tab";var h=y.stringRepeat(this.SPACE_CHAR,this.tabSize),v=y.stringRepeat(this.TAB_CHAR,this.tabSize)}else v=h=y.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]=""+h+"",this.$tabStrings["\t"]=""+v+""}},this.updateLines=function(e,n,i){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var r=Math.max(n,e.firstRow),o=Math.min(i,e.lastRow),c=this.element.childNodes,h=0,v=e.firstRow;vf&&(f=(b=this.session.getNextFoldLine(v=b.end.row+1,b))?b.start.row:1/0),!(v>o);){var w=c[h++];if(w){var d=[];this.$renderLine(d,v,!this.$useLineGroups(),v==f&&b),w.style.height=e.lineHeight*this.session.getRowLength(v)+"px",w.innerHTML=d.join("")}v++}},this.scrollLines=function(e){var n=this.config;if(this.config=e,!n||n.lastRow0;r--)i.removeChild(i.firstChild);if(n.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);r>0;r--)i.removeChild(i.lastChild);if(e.firstRown.lastRow&&(o=this.$renderLinesFragment(e,n.lastRow+1,e.lastRow),i.appendChild(o))},this.$renderLinesFragment=function(e,n,i){for(var r=this.element.ownerDocument.createDocumentFragment(),o=n,c=this.session.getNextFoldLine(o),h=c?c.start.row:1/0;o>h&&(h=(c=this.session.getNextFoldLine(o=c.end.row+1,c))?c.start.row:1/0),!(o>i);){var v=$.createElement("div"),b=[];if(this.$renderLine(b,o,!1,o==h&&c),v.innerHTML=b.join(""),this.$useLineGroups())v.className="ace_line_group",r.appendChild(v),v.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;v.firstChild;)r.appendChild(v.firstChild);o++}return r},this.update=function(e){this.config=e;for(var n=[],r=e.lastRow,o=e.firstRow,c=this.session.getNextFoldLine(o),h=c?c.start.row:1/0;o>h&&(h=(c=this.session.getNextFoldLine(o=c.end.row+1,c))?c.start.row:1/0),!(o>r);)this.$useLineGroups()&&n.push("
"),this.$renderLine(n,o,!1,o==h&&c),this.$useLineGroups()&&n.push("
"),o++;this.element.innerHTML=n.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,n,i,r){var o=this,v=r.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,function(w,d,u,A,_){if(d)return o.showInvisibles?""+y.stringRepeat(o.SPACE_CHAR,w.length)+"":w;if("&"==w)return"&";if("<"==w)return"<";if(">"==w)return">";if("\t"==w){var p=o.session.getScreenTabSize(n+A);return n+=p-1,o.$tabStrings[p]}return"\u3000"==w?(n+=1,""+(o.showInvisibles?o.SPACE_CHAR:"")+""):u?""+o.SPACE_CHAR+"":(n+=1,""+w+"")});if(this.$textToken[i.type])e.push(v);else{var b="ace_"+i.type.replace(/\./g," ace_"),f="";"fold"==i.type&&(f=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("",v,"")}return n+r.length},this.renderIndentGuide=function(e,n,i){var r=n.search(this.$indentGuideRe);return r<=0||r>=i?n:" "==n[0]?(e.push(y.stringRepeat(this.$tabStrings[" "],(r-=r%this.tabSize)/this.tabSize)),n.substr(r)):"\t"==n[0]?(e.push(y.stringRepeat(this.$tabStrings["\t"],r)),n.substr(r)):n},this.$renderWrappedLine=function(e,n,i,r){for(var o=0,c=0,h=i[0],v=0,b=0;b=h;)v=this.$renderToken(e,v,f,w.substring(0,h-o)),w=w.substring(h-o),o=h,r||e.push("","
"),e.push(y.stringRepeat("\xa0",i.indent)),v=0,h=i[++c]||Number.MAX_VALUE;0!=w.length&&(o+=w.length,v=this.$renderToken(e,v,f,w))}}},this.$renderSimpleLine=function(e,n){var i=0,r=n[0],o=r.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(i=this.$renderToken(e,i,r,o));for(var c=1;c"),o.length){var c=this.session.getRowSplitData(n);c&&c.length?this.$renderWrappedLine(e,o,c,i):this.$renderSimpleLine(e,o)}this.showInvisibles&&(r&&(n=r.end.row),e.push("",n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
")},this.$getFoldLineTokens=function(e,n){var i=this.session,r=[],c=i.getTokens(e);return n.walk(function(h,v,b,f,w){null!=h?r.push({type:"fold",value:h}):(w&&(c=i.getTokens(v)),c.length&&function o(h,v,b){for(var f=0,w=0;w+h[f].value.lengthb-v&&(d=d.substring(0,b-v)),r.push({type:h[f].type,value:d}),w=v+d.length,f+=1);wb?{type:h[f].type,value:d.substring(0,b-w)}:h[f]),w+=d.length,f+=1}}(c,f,b))},n.end.row,this.session.getLine(n.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(t.prototype),x.Text=t}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(s,x,K){"use strict";var $,k=s("../lib/dom"),y=function(l){this.element=k.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),void 0===$&&($=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),k.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=($?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(l){for(var a=this.cursors,t=a.length;t--;)a[t].style.visibility=l?"":"hidden"},this.$updateOpacity=function(l){for(var a=this.cursors,t=a.length;t--;)a[t].style.opacity=l?"":"0"},this.$padding=0,this.setPadding=function(l){this.$padding=l},this.setSession=function(l){this.session=l},this.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},this.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},this.setSmoothBlinking=function(l){l!=this.smoothBlinking&&!$&&(this.smoothBlinking=l,k.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var l=k.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},this.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},this.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&k.removeCssClass(this.element,"ace_smooth-blinking"),l(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){k.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var a=function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){l(!0),a()},this.blinkInterval),a()}},this.getPixelPosition=function(l,a){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var t=this.session.documentToScreenPosition(l);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,l.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),top:(t.row-(a?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(l){this.config=l;var a=this.session.$selectionMarkers,t=0,e=0;(void 0===a||0===a.length)&&(a=[{cursor:null}]),t=0;for(var n=a.length;tl.height+l.offset||i.top<0)&&t>1)){var r=(this.cursors[e++]||this.addCursor()).style;this.drawCursor?this.drawCursor(r,i,l,a[t],this.session):(r.left=i.left+"px",r.top=i.top+"px",r.width=l.characterWidth+"px",r.height=l.lineHeight+"px")}}for(;this.cursors.length>e;)this.removeCursor();var o=this.session.getOverwrite();this.$setOverwrite(o),this.$pixelPos=i,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?k.addCssClass(this.element,"ace_overwrite-cursors"):k.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(y.prototype),x.Cursor=y}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("./lib/oop"),$=s("./lib/dom"),y=s("./lib/event"),l=s("./lib/event_emitter").EventEmitter,a=32768,t=function(i){this.element=$.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=$.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,y.addListener(this.element,"scroll",this.onScroll.bind(this)),y.addListener(this.element,"mousedown",y.preventDefault)};(function(){k.implement(this,l),this.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1}}).call(t.prototype);var e=function(i,r){t.call(this,i),this.scrollTop=0,this.scrollHeight=0,r.$scrollbarWidth=this.width=$.scrollbarWidth(i.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};k.inherits(e,t),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var i=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-i)/(this.coeff-i)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(i){this.element.style.height=i+"px"},this.setInnerHeight=this.setScrollHeight=function(i){this.scrollHeight=i,i>a?(this.coeff=a/i,i=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=i+"px"},this.setScrollTop=function(i){this.scrollTop!=i&&(this.skipEvent=!0,this.scrollTop=i,this.element.scrollTop=i*this.coeff)}}.call(e.prototype);var n=function(i,r){t.call(this,i),this.scrollLeft=0,this.height=r.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};k.inherits(n,t),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(i){this.element.style.width=i+"px"},this.setInnerWidth=function(i){this.inner.style.width=i+"px"},this.setScrollWidth=function(i){this.inner.style.width=i+"px"},this.setScrollLeft=function(i){this.scrollLeft!=i&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=i)}}.call(n.prototype),x.ScrollBar=e,x.ScrollBarV=e,x.ScrollBarH=n,x.VScrollBar=e,x.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(s,x,K){"use strict";var k=s("./lib/event"),$=function(y,l){this.onRender=y,this.pending=!1,this.changes=0,this.window=l||window};(function(){this.schedule=function(y){if(this.changes=this.changes|y,!this.pending&&this.changes){this.pending=!0;var l=this;k.nextFrame(function(){l.pending=!1;for(var a;a=l.changes;)l.changes=0,l.onRender(a)},this.window)}}}).call($.prototype),x.RenderLoop=$}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(s,x,K){var k=s("../lib/oop"),$=s("../lib/dom"),y=s("../lib/lang"),l=s("../lib/useragent"),a=s("../lib/event_emitter").EventEmitter,t=0,e=x.FontMetrics=function(n){this.el=$.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=$.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=$.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),n.appendChild(this.el),t||this.$testFractionalRect(),this.$measureNode.innerHTML=y.stringRepeat("X",t),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){k.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var n=$.createElement("div");this.$setMeasureNodeStyles(n.style),n.style.width="0.2px",document.documentElement.appendChild(n);var i=n.getBoundingClientRect().width;t=i>0&&i<1?50:100,n.parentNode.removeChild(n)},this.$setMeasureNodeStyles=function(n,i){n.width=n.height="auto",n.left=n.top="0px",n.visibility="hidden",n.position="absolute",n.whiteSpace="pre",l.isIE<8?n["font-family"]="inherit":n.font="inherit",n.overflow=i?"hidden":"visible"},this.checkForSizeChanges=function(){var n=this.$measureSizes();if(n&&(this.$characterSize.width!==n.width||this.$characterSize.height!==n.height)){this.$measureNode.style.fontWeight="bold";var i=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=n,this.charSizes=Object.create(null),this.allowBoldFonts=i&&i.width===n.width&&i.height===n.height,this._emit("changeCharacterSize",{data:n})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var n=this;return this.$pollSizeChangesTimer=setInterval(function(){n.checkForSizeChanges()},500)},this.setPolling=function(n){n?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===t){var n=null;try{n=this.$measureNode.getBoundingClientRect()}catch{n={width:0,height:0}}var i={height:n.height,width:n.width/t}}else i={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/t};return 0===i.width||0===i.height?null:i},this.$measureCharWidth=function(n){return this.$main.innerHTML=y.stringRepeat(n,t),this.$main.getBoundingClientRect().width/t},this.getCharacterWidth=function(n){var i=this.charSizes[n];return void 0===i&&(i=this.charSizes[n]=this.$measureCharWidth(n)/this.$characterSize.width),i},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(e.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(s,x,K){"use strict";var k=s("./lib/oop"),$=s("./lib/dom"),y=s("./config"),l=s("./lib/useragent"),a=s("./layer/gutter").Gutter,t=s("./layer/marker").Marker,e=s("./layer/text").Text,n=s("./layer/cursor").Cursor,i=s("./scrollbar").HScrollBar,r=s("./scrollbar").VScrollBar,o=s("./renderloop").RenderLoop,c=s("./layer/font_metrics").FontMetrics,h=s("./lib/event_emitter").EventEmitter;$.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var b=function(f,w){var d=this;this.container=f||$.createElement("div"),this.$keepTextAreaAtCursor=!l.isOldIE,$.addCssClass(this.container,"ace_editor"),this.setTheme(w),this.$gutter=$.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=$.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=$.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new t(this.content);var u=this.$textLayer=new e(this.content);this.canvas=u.element,this.$markerFront=new t(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(A){d.$scrollAnimation||d.session.setScrollTop(A.data-d.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(A){d.$scrollAnimation||d.session.setScrollLeft(A.data-d.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new c(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(A){d.updateCharacterSize(),d.onResize(!0,d.gutterWidth,d.$size.width,d.$size.height),d._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new o(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),y.resetOptions(this),y._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,k.implement(this,h),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(f){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=f,f&&this.scrollMargin.top&&f.getScrollTop()<=0&&f.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(f),this.$markerBack.setSession(f),this.$markerFront.setSession(f),this.$gutterLayer.setSession(f),this.$textLayer.setSession(f),f&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(f,w,d){if(void 0===w&&(w=1/0),this.$changedLines?(this.$changedLines.firstRow>f&&(this.$changedLines.firstRow=f),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(f){f?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(f,w,d,u){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=f?1:0;var A=this.container;u||(u=A.clientHeight||A.scrollHeight),d||(d=A.clientWidth||A.scrollWidth);var _=this.$updateCachedSize(f,w,d,u);if(!this.$size.scrollerHeight||!d&&!u)return this.resizing=0;f&&(this.$gutterLayer.$padding=null),f?this.$renderChanges(_|this.$changes,!0):this.$loop.schedule(_|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(f,w,d,u){var A=0,_=this.$size,p={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};return(u-=this.$extraHeight||0)&&(f||_.height!=u)&&(_.height=u,A|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A|=this.CHANGE_SCROLL),d&&(f||_.width!=d)&&(A|=this.CHANGE_SIZE,_.width=d,null==w&&(w=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=w,this.scrollBarH.element.style.left=this.scroller.style.left=w+"px",_.scrollerWidth=Math.max(0,d-w-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||f)&&(A|=this.CHANGE_FULL)),_.$dirty=!d||!u,A&&this._signal("resize",p),A},this.onGutterResize=function(){var f=this.$showGutter?this.$gutter.offsetWidth:0;f!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,f,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var w=Math.floor((this.$size.scrollerWidth-2*this.$padding)/this.characterWidth);return this.session.adjustWrapLimit(w,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(f){this.setOption("animatedScroll",f)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(f){this.setOption("showInvisibles",f),this.session.$bidiHandler.setShowInvisibles(f)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(f){this.setOption("displayIndentGuides",f)},this.setShowPrintMargin=function(f){this.setOption("showPrintMargin",f)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(f){this.setOption("printMarginColumn",f)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(f){return this.setOption("showGutter",f)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(f){this.setOption("fadeFoldWidgets",f)},this.setHighlightGutterLine=function(f){this.setOption("highlightGutterLine",f)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var f=this.$cursorLayer.$pixelPos,w=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var d=this.session.selection.getCursor();d.column=0,f=this.$cursorLayer.getPixelPosition(d,!0),w*=this.session.getRowLength(d.row)}this.$gutterLineHighlight.style.top=f.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=w+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var f=$.createElement("div");f.className="ace_layer ace_print-margin-layer",this.$printMarginEl=$.createElement("div"),this.$printMarginEl.className="ace_print-margin",f.appendChild(this.$printMarginEl),this.content.insertBefore(f,this.content.firstChild)}var w=this.$printMarginEl.style;w.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",w.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var f=this.layerConfig,w=this.$cursorLayer.$pixelPos.top,d=this.$cursorLayer.$pixelPos.left,u=this.textarea.style,A=this.lineHeight;if((w-=f.offset)<0||w>f.height-A)return void(u.top=u.left="0");var _=this.characterWidth;if(this.$composition){var p=this.textarea.value.replace(/^\x01+/,"");_*=this.session.$getStringScreenWidth(p)[0]+2,A+=2}(d-=this.scrollLeft)>this.$size.scrollerWidth-_&&(d=this.$size.scrollerWidth-_),d+=this.gutterWidth,u.height=A+"px",u.width=_+"px",u.left=Math.min(d,this.$size.scrollerWidth-_)+"px",u.top=Math.min(w,this.$size.height-A)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var f=this.layerConfig,w=f.lastRow;return this.session.documentToScreenRow(w,0)*f.lineHeight-this.session.getScrollTop()>f.height-f.lineHeight?w-1:w},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(f){this.$padding=f,this.$textLayer.setPadding(f),this.$cursorLayer.setPadding(f),this.$markerFront.setPadding(f),this.$markerBack.setPadding(f),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(f,w,d,u){var A=this.scrollMargin;A.top=0|f,A.bottom=0|w,A.right=0|u,A.left=0|d,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(f){this.setOption("hScrollBarAlwaysVisible",f)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(f){this.setOption("vScrollBarAlwaysVisible",f)},this.$updateScrollBarV=function(){var f=this.layerConfig.maxHeight,w=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>(f-=(w-this.lineHeight)*this.$scrollPastEnd)-w&&(f=this.scrollTop+w,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(f+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(f,w){if(this.$changes&&(f|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(f||w)){if(this.$size.$dirty)return this.$changes|=f,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var d=this.layerConfig;if(f&this.CHANGE_FULL||f&this.CHANGE_SIZE||f&this.CHANGE_TEXT||f&this.CHANGE_LINES||f&this.CHANGE_SCROLL||f&this.CHANGE_H_SCROLL){if(f|=this.$computeLayerConfig(),d.firstRow!=this.layerConfig.firstRow&&d.firstRowScreen==this.layerConfig.firstRowScreen){var u=this.scrollTop+(d.firstRow-this.layerConfig.firstRow)*this.lineHeight;u>0&&(this.scrollTop=u,f|=this.CHANGE_SCROLL,f|=this.$computeLayerConfig())}d=this.layerConfig,this.$updateScrollBarV(),f&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-d.offset+"px",this.content.style.marginTop=-d.offset+"px",this.content.style.width=d.width+2*this.$padding+"px",this.content.style.height=d.minHeight+"px"}return f&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),f&this.CHANGE_FULL?(this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):f&this.CHANGE_SCROLL?(f&this.CHANGE_TEXT||f&this.CHANGE_LINES?this.$textLayer.update(d):this.$textLayer.scrollLines(d),this.$showGutter&&this.$gutterLayer.update(d),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(f&this.CHANGE_TEXT?(this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d)):f&this.CHANGE_LINES?(this.$updateLines()||f&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(d):(f&this.CHANGE_TEXT||f&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(d),f&this.CHANGE_CURSOR&&(this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),f&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(d),f&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(d),void this._signal("afterRender"))}this.$changes|=f},this.$autosize=function(){var f=this.session.getScreenLength()*this.lineHeight,w=this.$maxLines*this.lineHeight,d=Math.min(w,Math.max((this.$minLines||1)*this.lineHeight,f))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(d+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&d>this.$maxPixelHeight&&(d=this.$maxPixelHeight);var u=f>w;if(d!=this.desiredHeight||this.$size.height!=this.desiredHeight||u!=this.$vScroll){u!=this.$vScroll&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var A=this.container.clientWidth;this.container.style.height=d+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,d),this.desiredHeight=d,this._signal("autosize")}},this.$computeLayerConfig=function(){var f=this.session,w=this.$size,d=w.height<=2*this.lineHeight,A=this.session.getScreenLength()*this.lineHeight,_=this.$getLongestLine(),p=!d&&(this.$hScrollBarAlwaysVisible||w.scrollerWidth-_-2*this.$padding<0),E=this.$horizScroll!==p;E&&(this.$horizScroll=p,this.scrollBarH.setVisible(p));var m=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var g=this.scrollTop%this.lineHeight,C=w.scrollerHeight+this.lineHeight,S=!this.$maxLines&&this.$scrollPastEnd?(w.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=S;var F=this.scrollMargin;this.session.setScrollTop(Math.max(-F.top,Math.min(this.scrollTop,A-w.scrollerHeight+F.bottom))),this.session.setScrollLeft(Math.max(-F.left,Math.min(this.scrollLeft,_+2*this.$padding-w.scrollerWidth+F.right)));var L=!d&&(this.$vScrollBarAlwaysVisible||w.scrollerHeight-A+S<0||this.scrollTop>F.top),D=m!==L;D&&(this.$vScroll=L,this.scrollBarV.setVisible(L));var U,B,R=Math.ceil(C/this.lineHeight)-1,O=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),T=O+R,P=this.lineHeight;O=f.screenToDocumentRow(O,0);var W=f.getFoldLine(O);W&&(O=W.start.row),U=f.documentToScreenRow(O,0),B=f.getRowLength(O)*P,T=Math.min(f.screenToDocumentRow(T,0),f.getLength()-1),C=w.scrollerHeight+f.getRowLength(T)*P+B,g=this.scrollTop-U*P;var z=0;return this.layerConfig.width!=_&&(z=this.CHANGE_H_SCROLL),(E||D)&&(z=this.$updateCachedSize(!0,this.gutterWidth,w.width,w.height),this._signal("scrollbarVisibilityChanged"),D&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:O,firstRowScreen:U,lastRow:T,lineHeight:P,characterWidth:this.characterWidth,minHeight:C,maxHeight:A,offset:g,gutterOffset:P?Math.max(0,Math.ceil((g+w.height-w.scrollerHeight)/P)):0,height:this.$size.scrollerHeight},z},this.$updateLines=function(){if(this.$changedLines){var f=this.$changedLines.firstRow,w=this.$changedLines.lastRow;this.$changedLines=null;var d=this.layerConfig;if(!(f>d.lastRow+1||w_?(w&&m+p>_+this.lineHeight&&(_-=w*this.$size.scrollerHeight),0===_&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):m+this.$size.scrollerHeight-E<_+this.lineHeight&&(w&&m+this.$size.scrollerHeight-E<_-this.lineHeight&&(_+=w*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight-this.$size.scrollerHeight));var g=this.scrollLeft;g>A?(A=1-this.scrollMargin.top||w>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||f<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||f>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(f,w){var d=this.scroller.getBoundingClientRect(),u=f+this.scrollLeft-d.left-this.$padding,A=u/this.characterWidth,_=Math.floor((w+this.scrollTop-d.top)/this.lineHeight),p=Math.round(A);return{row:_,column:p,side:A-p>0?1:-1,offsetX:u}},this.screenToTextCoordinates=function(f,w){var d=this.scroller.getBoundingClientRect(),u=f+this.scrollLeft-d.left-this.$padding,A=Math.round(u/this.characterWidth);return this.session.screenToDocumentPosition((w+this.scrollTop-d.top)/this.lineHeight,Math.max(A,0),u)},this.textToScreenCoordinates=function(f,w){var d=this.scroller.getBoundingClientRect(),u=this.session.documentToScreenPosition(f,w),A=this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,f)?this.session.$bidiHandler.getPosLeft(u.column):Math.round(u.column*this.characterWidth));return{pageX:d.left+A-this.scrollLeft,pageY:d.top+u.row*this.lineHeight-this.scrollTop}},this.visualizeFocus=function(){$.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){$.removeCssClass(this.container,"ace_focus")},this.showComposition=function(f){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,$.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(f){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&($.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(f,w){var d=this;function A(_){if(d.$themeId!=f)return w&&w();if(!_||!_.cssClass)throw new Error("couldn't load module "+f+" or it didn't call define");$.importCssString(_.cssText,_.cssClass,d.container.ownerDocument),d.theme&&$.removeCssClass(d.container,d.theme.cssClass);var p="padding"in _?_.padding:"padding"in(d.theme||{})?4:d.$padding;d.$padding&&p!=d.$padding&&d.setPadding(p),d.$theme=_.cssClass,d.theme=_,$.addCssClass(d.container,_.cssClass),$.setCssClass(d.container,"ace_dark",_.isDark),d.$size&&(d.$size.width=0,d.$updateSizeAsync()),d._dispatchEvent("themeLoaded",{theme:_}),w&&w()}this.$themeId=f,d._dispatchEvent("themeChange",{theme:f}),f&&"string"!=typeof f?A(f):y.loadModule(["theme",f||this.$options.theme.initialValue],A)},this.getTheme=function(){return this.$themeId},this.setStyle=function(f,w){$.setCssClass(this.container,f,!1!==w)},this.unsetStyle=function(f){$.removeCssClass(this.container,f)},this.setCursorStyle=function(f){this.scroller.style.cursor!=f&&(this.scroller.style.cursor=f)},this.setMouseCursor=function(f){this.scroller.style.cursor=f},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(b.prototype),y.defineOptions(b.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(f){this.$textLayer.setShowInvisibles(f)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(f){"number"==typeof f&&(this.$printMarginColumn=f),this.$showPrintMargin=!!f,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(f){this.$gutter.style.display=f?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(f){$.setCssClass(this.$gutter,"ace_fade-fold-widgets",f)},initialValue:!1},showFoldWidgets:{set:function(f){this.$gutterLayer.setShowFoldWidgets(f)},initialValue:!0},showLineNumbers:{set:function(f){this.$gutterLayer.setShowLineNumbers(f),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(f){this.$textLayer.setDisplayIndentGuides(f)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(f){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=$.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=f?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(f){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(f){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(f){"number"==typeof f&&(f+="px"),this.container.style.fontSize=f,this.updateFontSize()},initialValue:12},fontFamily:{set:function(f){this.container.style.fontFamily=f,this.updateFontSize()}},maxLines:{set:function(f){this.updateFull()}},minLines:{set:function(f){this.updateFull()}},maxPixelHeight:{set:function(f){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(f){this.$scrollPastEnd!=(f=+f||0)&&(this.$scrollPastEnd=f,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(f){this.$gutterLayer.$fixedWidth=!!f,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(f){this.setTheme(f)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),x.VirtualRenderer=b}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(s,x,K){"use strict";var k=s("../lib/oop"),$=s("../lib/net"),y=s("../lib/event_emitter").EventEmitter,l=s("../config");function t(i,r){var o=function a(i,r){var o=r.src;$.qualifyURL(i);try{return new Blob([o],{type:"application/javascript"})}catch{var h=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return h.append(o),h.getBlob("application/javascript")}}(i,r),h=(window.URL||window.webkitURL).createObjectURL(o);return new Worker(h)}var e=function(i,r,o,c,h){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),s.nameToUrl&&!s.toUrl&&(s.toUrl=s.nameToUrl),l.get("packaged")||!s.toUrl)c=c||l.moduleUrl(r.id,"worker");else{var v=this.$normalizePath;c=c||v(s.toUrl("ace/worker/worker.js",null,"_"));var b={};i.forEach(function(f){b[f]=v(s.toUrl(f,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=t(c,r),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:b,module:r.id,classname:o}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){k.implement(this,y),this.onMessage=function(i){var r=i.data;switch(r.type){case"event":this._signal(r.name,{data:r.data});break;case"call":var o=this.callbacks[r.id];o&&(o(r.data),delete this.callbacks[r.id]);break;case"error":this.reportError(r.data);break;case"log":window.console&&console.log&&console.log.apply(console,r.data)}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return $.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,r){this.$worker.postMessage({command:i,args:r})},this.call=function(i,r,o){if(o){var c=this.callbackId++;this.callbacks[c]=o,r.push(c)}this.send(i,r)},this.emit=function(i,r){try{this.$worker.postMessage({event:i,data:{data:r.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),this.deltaQueue.push(i.start,"insert"==i.action?i.lines:i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(e.prototype);var n=function(i,r,o){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var c=null,h=!1,v=Object.create(y),b=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(w){b.messageBuffer.push(w),c&&(h?setTimeout(f):f())},this.setEmitSync=function(w){h=w};var f=function(){var w=b.messageBuffer.shift();w.command?c[w.command].apply(c,w.args):w.event&&v._signal(w.event,w.data)};v.postMessage=function(w){b.onMessage({data:w})},v.callback=function(w,d){this.postMessage({type:"call",id:d,data:w})},v.emit=function(w,d){this.postMessage({type:"event",name:w,data:d})},l.loadModule(["worker",r],function(w){for(c=new w[o](v);b.messageBuffer.length;)f()})};n.prototype=e.prototype,x.UIWorkerClient=n,x.WorkerClient=e,x.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(s,x,K){"use strict";var k=s("./range").Range,$=s("./lib/event_emitter").EventEmitter,y=s("./lib/oop"),l=function(a,t,e,n,i,r){var o=this;this.length=t,this.session=a,this.doc=a.getDocument(),this.mainClass=i,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=e;var c=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=c.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};(function(){y.implement(this,$),this.setup=function(){var a=this,t=this.doc,e=this.session;this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var n=this.pos;n.$insertRight=!0,n.detach(),n.markerId=e.addMarker(new k(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var r=t.createAnchor(i.row,i.column);r.$insertRight=!0,r.detach(),a.others.push(r)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,t=this;this.othersActive=!0,this.others.forEach(function(e){e.markerId=a.addMarker(new k(e.row,e.column,e.row,e.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(a),n&&(this.length+=e),n&&!this.session.$fromUndo)if("insert"===a.action)for(var r=this.others.length-1;r>=0;r--)this.doc.insertMergedLines(c={row:(o=this.others[r]).row,column:o.column+i},a.lines);else if("remove"===a.action)for(r=this.others.length-1;r>=0;r--){var o,c;this.doc.remove(new k((c={row:(o=this.others[r]).row,column:o.column+i}).row,c.column,c.row,c.column-e))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(a){this.pos.onChange(a);for(var t=this.others.length;t--;)this.others[t].onChange(a);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var a=this,t=this.session,e=function(i,r){t.removeMarker(i.markerId),i.markerId=t.addMarker(new k(i.row,i.column,i.row,i.column+a.length),r,null,!1)};e(this.pos,this.mainClass);for(var n=this.others.length;n--;)e(this.others[n],this.othersClass)}},this.onCursorChange=function(a){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var a=this.session.getUndoManager(),t=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,e=0;e1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(f)}},this.toSingleRange=function(f){f=f||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),f&&this.fromOrientedRange(f)},this.substractPoint=function(f){var w=this.rangeList.substractPoint(f);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var f=this.rangeList.merge();f.length?this.$onRemoveRange(f):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(f){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(f),this._signal("addRange",{range:f})},this.$onRemoveRange=function(f){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();f.push(w),this.rangeCount=0}for(var d=f.length;d--;){var u=this.ranges.indexOf(f[d]);this.ranges.splice(u,1)}this._signal("removeRange",{ranges:f}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(w=w||this.ranges[0])&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new k,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var f=this.rangeList.ranges,w=f[f.length-1],d=$.fromPoints(f[0].start,w.end);this.toSingleRange(),this.setSelectionRange(d,w.cursor==w.start)}else{d=this.getRange();var u=this.isBackwards(),A=d.start.row,_=d.end.row;if(A==_){if(u)var p=d.end,E=d.start;else p=d.start,E=d.end;return this.addRange($.fromPoints(E,E)),void this.addRange($.fromPoints(p,p))}var m=[],g=this.getLineRange(A,!0);g.start.column=d.start.column,m.push(g);for(var C=A+1;C<_;C++)m.push(this.getLineRange(C,!0));(g=this.getLineRange(_,!0)).end.column=d.end.column,m.push(g),m.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var f=this.rangeList.ranges,w=f[f.length-1],d=$.fromPoints(f[0].start,w.end);this.toSingleRange(),this.setSelectionRange(d,w.cursor==w.start)}else{var u=this.session.documentToScreenPosition(this.selectionLead),A=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(u,A).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(f,w,d){var u=[],A=f.column0;)R--;if(R>0)for(var O=0;u[O].isEmpty();)O++;for(var T=R;T>=O;T--)u[T].isEmpty()&&u.splice(T,1)}return u}}.call(y.prototype);var c=s("./editor").Editor;function h(f,w){return f.row==w.row&&f.column==w.column}function v(f){f.$multiselectOnSessionChange||(f.$onAddRange=f.$onAddRange.bind(f),f.$onRemoveRange=f.$onRemoveRange.bind(f),f.$onMultiSelect=f.$onMultiSelect.bind(f),f.$onSingleSelect=f.$onSingleSelect.bind(f),f.$multiselectOnSessionChange=x.onSessionChange.bind(f),f.$checkMultiselectChange=f.$checkMultiselectChange.bind(f),f.$multiselectOnSessionChange(f),f.on("changeSession",f.$multiselectOnSessionChange),f.on("mousedown",l),f.commands.addCommands(e.defaultCommands),function b(f){var w=f.textInput.getElement(),d=!1;function u(A){d&&(f.renderer.setMouseCursor(""),d=!1)}a.addListener(w,"keydown",function(A){f.$blockSelectEnabled&&18==A.keyCode&&!(A.ctrlKey||A.shiftKey||A.metaKey)?d||(f.renderer.setMouseCursor("crosshair"),d=!0):d&&u()}),a.addListener(w,"keyup",u),a.addListener(w,"blur",u)}(f))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(f){f.cursor||(f.cursor=f.end);var w=this.getSelectionStyle();return f.marker=this.session.addMarker(f,"ace_selection",w),this.session.$selectionMarkers.push(f),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,f},this.removeSelectionMarker=function(f){if(f.marker){this.session.removeMarker(f.marker);var w=this.session.$selectionMarkers.indexOf(f);-1!=w&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(f){for(var w=this.session.$selectionMarkers,d=f.length;d--;){var u=f[d];if(u.marker){this.session.removeMarker(u.marker);var A=w.indexOf(u);-1!=A&&w.splice(A,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(f){this.addSelectionMarker(f.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(f){this.removeSelectionMarkers(f.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(f){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(e.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(f){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(e.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(f){var w=f.command,d=f.editor;if(d.multiSelect){if(w.multiSelectAction)"forEach"==w.multiSelectAction?u=d.forEachSelection(w,f.args):"forEachLine"==w.multiSelectAction?u=d.forEachSelection(w,f.args,!0):"single"==w.multiSelectAction?(d.exitMultiSelectMode(),u=w.exec(d,f.args||{})):u=w.multiSelectAction(d,f.args||{});else{var u=w.exec(d,f.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return u}},this.forEachSelection=function(f,w,d){if(!this.inVirtualSelectionMode){var g,A=1==d||d&&d.$byLines,_=this.session,p=this.selection,m=(d&&d.keepOrder?p:p.rangeList).ranges;if(!m.length)return f.exec?f.exec(this,w||{}):f(this,w||{});var C=p._eventRegistry;p._eventRegistry={};var S=new y(_);this.inVirtualSelectionMode=!0;for(var F=m.length;F--;){if(A)for(;F>0&&m[F].start.row==m[F-1].end.row;)F--;S.fromOrientedRange(m[F]),S.index=F,this.selection=_.selection=S;var L=f.exec?f.exec(this,w||{}):f(this,w||{});!g&&void 0!==L&&(g=L),S.toOrientedRange(m[F])}S.detach(),this.selection=_.selection=p,this.inVirtualSelectionMode=!1,p._eventRegistry=C,p.mergeOverlappingRanges();var D=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),D&&D.from==D.to&&this.renderer.animateScrolling(D.from),g}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var f="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,d=[],u=0;uF&&(F=O.column),UB?f.insert(T,t.stringRepeat(" ",U-B)):f.remove(new $(T.row,T.column,T.row,T.column-U+B)),R.start.column=R.end.column=F,R.start.row=R.end.row=T.row,R.cursor=R.end}),w.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var _=this.selection.getRange(),p=_.start.row,E=_.end.row,m=p==E;if(m){var C,g=this.session.getLength();do{C=this.session.getLine(E)}while(/[=:]/.test(C)&&++E0);p<0&&(p=0),E>=g&&(E=g-1)}var S=this.session.removeFullLines(p,E);S=this.$reAlignText(S,m),this.session.insert({row:p,column:0},S.join("\n")+"\n"),m||(_.start.column=0,_.end.column=S[S.length-1].length),this.selection.setRange(_)}},this.$reAlignText=function(f,w){var A,_,p,d=!0,u=!0;return f.map(function(S){var F=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return F?null==A?(A=F[1].length,_=F[2].length,p=F[3].length,F):(A+_+p!=F[1].length+F[2].length+F[3].length&&(u=!1),A!=F[1].length&&(d=!1),A>F[1].length&&(A=F[1].length),_F[3].length&&(p=F[3].length),F):[S]}).map(w?m:d?u?function g(S){return S[2]?E(A+_-S[2].length)+S[2]+E(p)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}:m:function C(S){return S[2]?E(A)+S[2]+E(p)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]});function E(S){return t.stringRepeat(" ",S)}function m(S){return S[2]?E(A)+S[2]+E(_-S[2].length+p)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(c.prototype),x.onSessionChange=function(f){var w=f.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var d=f.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},x.MultiSelect=v,s("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(f){v(this),f?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",l)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",l))},value:!0},enableBlockSelect:{set:function(f){this.$blockSelectEnabled=f},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(s,x,K){"use strict";var k=s("../../range").Range,$=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(y,l,a){var t=y.getLine(a);return this.foldingStartMarker.test(t)?"start":"markbeginend"==l&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(y,l,a){return null},this.indentationBlock=function(y,l,a){var t=/\S/,e=y.getLine(l),n=e.search(t);if(-1!=n){for(var i=a||e.length,r=y.getLength(),o=l,c=l;++lo){var v=y.getLine(c).length;return new k(o,i,c,v)}}},this.openingBracketBlock=function(y,l,a,t,e){var n={row:a,column:t+1},i=y.$findClosingBracket(l,n,e);if(i){var r=y.foldWidgets[i.row];return null==r&&(r=y.getFoldWidget(i.row)),"start"==r&&i.row>n.row&&(i.row--,i.column=y.getLine(i.row).length),k.fromPoints(n,i)}},this.closingBracketBlock=function(y,l,a,t,e){var n={row:a,column:t},i=y.$findOpeningBracket(l,n);if(i)return i.column++,n.column--,k.fromPoints(i,n)}}).call($.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(s,x,K){"use strict";x.isDark=!1,x.cssClass="ace-tm",x.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',s("../lib/dom").importCssString(x.cssText,x.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(s,x,K){"use strict";s("./lib/oop");var $=s("./lib/dom");function l(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}s("./range"),function(){this.getRowLength=function(a){var t;return t=this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0,this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+t:1+t},this.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(a+=t.rowCount)}),a},this.$onChangeEditor=function(a){this.attach(a.editor)},this.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(a){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var e=this.session.lineWidgets;e&&e.forEach(function(n){n&&n.el&&n.el.parentNode&&(n._inDocument=!1,n.el.parentNode.removeChild(n.el))})}},this.updateOnFold=function(a,t){var e=t.lineWidgets;if(e&&a.action){for(var n=a.data,i=n.start.row,r=n.end.row,o="add"==a.action,c=i+1;c0&&!n[i];)i--;this.firstRow=e.firstRow,this.lastRow=e.lastRow,t.$cursorLayer.config=e;for(var o=i;o<=r;o++){var c=n[o];if(c&&c.el){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,t.container.appendChild(c.el));var h=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;c.coverLine||(h+=e.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=h-e.offset+"px";var v=c.coverGutter?0:t.gutterWidth;c.fixedWidth||(v-=t.scrollLeft),c.el.style.left=v+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=e.width+2*e.padding+"px"),c.el.style.right=c.fixedWidth?t.scrollBar.getWidth()+"px":""}}}}}.call(l.prototype),x.LineWidgets=l}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(s,x,K){"use strict";var k=s("../line_widgets").LineWidgets,$=s("../lib/dom"),y=s("../range").Range;x.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new k(n),n.widgetManager.attach(t));var i=t.getCursorPosition(),r=i.row,o=n.widgetManager.getWidgetsAtRow(r).filter(function(A){return"errorMarker"==A.type})[0];o?o.destroy():r-=e;var h,c=function a(t,e,n){var i=t.getAnnotations().sort(y.comparePoints);if(i.length){var r=function l(t,e,n){for(var i=0,r=t.length-1;i<=r;){var o=i+r>>1,c=n(e,t[o]);if(c>0)i=o+1;else{if(!(c<0))return o;r=o-1}}return-(i+1)}(i,{row:e,column:-1},y.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var o=i[r];if(o&&n){if(o.row===e){do{o=i[r+=n]}while(o&&o.row===e);if(!o)return i.slice()}var c=[];e=o.row;do{c[n<0?"unshift":"push"](o),o=i[r+=n]}while(o&&o.row==e);return c.length&&c}}}(n,r,e);if(c){var v=c[0];i.column=(v.pos&&"number"!=typeof v.column?v.pos.sc:v.column)||0,i.row=v.row,h=t.renderer.$gutterLayer.$annotations[i.row]}else{if(o)return;h={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(i.row),t.selection.moveToPosition(i);var b={row:i.row,fixedWidth:!0,coverGutter:!0,el:$.createElement("div"),type:"errorMarker"},f=b.el.appendChild($.createElement("div")),w=b.el.appendChild($.createElement("div"));w.className="error_widget_arrow "+h.className;var d=t.renderer.$cursorLayer.getPixelPosition(i).left;w.style.left=d+t.renderer.gutterWidth-5+"px",b.el.className="error_widget_wrapper",f.className="error_widget "+h.className,f.innerHTML=h.text.join("
"),f.appendChild($.createElement("div"));var u=function(A,_,p){if(0===_&&("esc"===p||"return"===p))return b.destroy(),{command:"null"}};b.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(u),n.widgetManager.removeLineWidget(b),t.off("changeSelection",b.destroy),t.off("changeSession",b.destroy),t.off("mouseup",b.destroy),t.off("change",b.destroy))},t.keyBinding.addKeyboardHandler(u),t.on("changeSelection",b.destroy),t.on("changeSession",b.destroy),t.on("mouseup",b.destroy),t.on("change",b.destroy),t.session.widgetManager.addLineWidget(b),b.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:b.el.offsetHeight})},$.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(s,x,K){"use strict";s("./lib/fixoldbrowsers");var k=s("./lib/dom"),$=s("./lib/event"),y=s("./editor").Editor,l=s("./edit_session").EditSession,a=s("./undomanager").UndoManager,t=s("./virtual_renderer").VirtualRenderer;s("./worker/worker_client"),s("./keyboard/hash_handler"),s("./placeholder"),s("./multi_select"),s("./mode/folding/fold_mode"),s("./theme/textmate"),s("./ext/error_marker"),x.config=s("./config"),x.acequire=s,x.define=oe.amdD,x.edit=function(e){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof y)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var r=e;i=r.value,e=k.createElement("pre"),r.parentNode.replaceChild(e,r)}else e&&(i=k.getInnerText(e),e.innerHTML="");var o=x.createEditSession(i),c=new y(new t(e));c.setSession(o);var h={document:o,editor:c,onResize:c.resize.bind(c,null)};return r&&(h.textarea=r),$.addListener(window,"resize",h.onResize),c.on("destroy",function(){$.removeListener(window,"resize",h.onResize),h.editor.container.env=null}),c.container.env=c.env=h,c},x.createEditSession=function(e,n){var i=new l(e,n);return i.setUndoManager(new a),i},x.EditSession=l,x.UndoManager=a,x.version="1.2.9"}),ace.acequire(["ace/ace"],function(s){for(var x in s&&(s.config.init(!0),s.define=ace.define),window.ace||(window.ace=s),s)s.hasOwnProperty(x)&&(window.ace[x]=s[x])}),Fe.exports=window.ace.acequire("ace/ace")},7818:()=>{ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"],function(Fe,xe,oe){xe.isDark=!1,xe.cssClass="ace-github",xe.cssText='.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github {background: #fff;color: #000;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_cursor {color: black;}.ace-github.ace_focus .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_active-line {background: rgb(245, 245, 245);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',Fe("../lib/dom").importCssString(xe.cssText,xe.cssClass)})}}]);