function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.href);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function LoadTemplate(n,t,i){n.load("../../../Content/Ngp/templates/"+t+".html",null,i)}function ltrim(n){return n.ltrim()}function rtrim(n){return n.rtrim()}function trim(n){return n.trim()}function ArgumentsToArray(n){return Array.prototype.slice.call(n,0)}function nodeListToArray(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t]);return i}function isArray(){if(typeof arguments[0]=="object"){var n=arguments[0].constructor.toString().match(/array/i);return n!=null}return!1}function areSortedArraysEqual(n,t){var r,i;if(n.length!=t.length)return!1;for(r=!0,i=0;i<n.length;i++)if(n[i]!==t[i]){r=!1;break}return r}function qsort(n,t,i){if(i-1>t){var r=t+Math.floor(Math.random()*(i-t));r=partition(n,t,i,r);qsort(n,t,r);qsort(n,r+1,i)}}function partition(n,t,i,r){var e=n[r],u,f;for(n.swap(r,i-1),u=t,f=t;f<i-1;++f)n[f]<=e&&(n.swap(u,f),++u);return n.swap(i-1,u),u}function LoadCSS(n){var t=document.createElement("link");t.setAttribute("rel","stylesheet");t.setAttribute("type","text/css");t.setAttribute("href",n);document.getElementsByTagName("head")[0].appendChild(t)}function addHandlerIfNoneExist(n,t,i){$(n).each(function(){var n=$.data(this,"events");if(n==undefined||n[i]==undefined)$(this).on(i,t)})}function log(n){debug&&window.console&&window.console.log&&window.console.log(n)}function scrollWindowTo(n){var t=window.location.toString().split("#")[0];window.location=t+n}function progressIndicator(n){var i=null,r="Processing",f="",t=$(".progress-container"),u=null,o=50,e;n&&(n.button&&(i=$(n.button),f=i.val(),u=i.parents("form")),n.text&&(r=n.text));e=function(){var n=t.css("left","-500px").show().find(".text").width();n=n+o;t.width(n).css("left","50%").css("margin-left","-"+n/2+"px");$(".progress-indicator",t).show()};this.start=function(){t.length>0&&t.is(":hidden")&&($(".text",t).html(r),e(),i&&(i.val(r),$("input[type='button'], input[type='submit'], button",u).prop("disabled",!0)))};this.stop=function(){i&&(i.val(f),$("input[type='button'], input[type='submit'], button",u).prop("disabled",!1));t.hide();$(".text",t).empty()};this.start()}function blockUIForAjaxCall(){$.blockUI({message:"&nbsp;",css:{padding:"15px"}})}function createDefaultProgressIndicator(){new progressIndicator({button:$('input[type="submit"], input[type="button"], button',$(this))})}function createErrorDialog(){var n=$(".alert.infoMessageContainer.error");n[0]?(n.find(".validationHeader").html("Sorry, something unexpected happened."),n.show()):console.warn("createErrorDialog():Unable to display notification popup.")}function destroyCurrentDialog(){var n,t,i;n=$(this).hasClass("ui-dialog-content")?$(this):$(this).parents(".ui-dialog-content");t=n.closest(".ui-dialog").hasClass("deleteDialogWrapper");ActiveDialogs.length&&!t&&(n.dialog("ngpHide"),i=ActiveDialogs.pop(),i.dialog("ngpShow"));n.dialog("destroy").remove();document.body.style.overflow="auto";$.browser.msie&&(ngp.dirtyForm.isExcluded=!0)}function DoAjaxRequestsMatch(n,t){var i=t.url==n.url&&(!n.data&&(!t.data||t.data.length==1&&t.data[0].name=="cache_buster")||n.data&&t.data&&(n.data.length==t.data.length||n.data.length==t.data.length-1)),r;if(!i)return i;if(n.data)for(r in n.data)if(i=r=="cache_buster"||n.data[r]===t.data[r],!i)return i;return i}function getX(n){return n=n||window.event,n.pageX||n.clientX+document.body.scrollLeft}function getY(n){return n=n||window.event,n.pageY||n.clientY+document.body.scrollTop}function hasVerticalScrollbar(n){return(n=n[0],n.clientHeight<n.scrollHeight)?!0:!1}function deleteEntity(n){var t=$("<div title='Delete Dialog' id='deleteDialog'>This is a placeholder for deleting "+n+"<\/div>");$("#deleteDialog").length&&$("#deleteDialog").remove();t.appendTo("body").dialog()}function formFocus(){var n,t,i,r,u,f;if(!window.hasFocusedForm){if(window.hasFocusedForm=!0,n=arguments[0],typeof n=="undefined"||!n.length){if(document.forms.length==0)return;n=$(document)}if(t=$("form",n),i=t.attr("data-focus"),i!="undefined"){r=$(i,t);r.length>0&&r.focus();return}u=$("div.infoMessageContainer.error:visible").length==0;f=window.location.toString().indexOf("#")<0;u&&f&&$(":input:visible",t).not(".no-focus, .no-focus :input, :input[id=''], :button, :submit, .flexigrid :input").first().focus()}}function handleModalAjaxForm(n,t){var i=$(".ui-dialog-content:visible"),r=$("div.infoMessageContainer",i).first();n.ResponseResultCode==Constants.ResponseResultCode.Success&&t&&(r=ActiveDialogs.length?$("div.infoMessageContainer",ActiveDialogs[ActiveDialogs.length-1]):$(".workspace div.infoMessageContainer:first"),i.dialog("close"));n.DisplayMessageType!=Constants.MessageType.None&&showAjaxValidation(r,n);clearSavingIndicator();return}function restoreOriginalErrorMessage(n){$(".validationHeader",n).html(clientErrorMessage);$(".alertMsg ul",n).remove()}function handleModalAjaxFailure(){clearSavingIndicator()}function startSavingIndicator(n,t){var i=t.html();showSavingIndicator(n,i)}function showSavingIndicator(n,t){savingIndicator=new progressIndicator({button:$(n),text:t});savingIndicator.start()}function clearSavingIndicator(){typeof savingIndicator!="undefined"&&savingIndicator!=null&&(savingIndicator.stop(),savingIndicator=null)}function showAjaxValidationInDialog(n){FeedBack.update(n)}function showAjaxValidation(n,t){ngp.FeedBack.update(t)}function getModalFormData(){var n=$(this).parents("form"),t;return(n.siblings(".infoMessageContainer").hide(),!n.valid())?null:(t=$(".indicatorText",n).html(),savingIndicator=new progressIndicator({button:$(this),text:t}),savingIndicator.start(),n.trigger("preSubmit"),getFormData(n))}function getFormData(n){var t={};return $(".htmlEditor textarea",n).each(function(){var t=this.name,n=CKEDITOR.instances[t];n&&$(this).val(htmlEncode(n.getData().trim()))}),$("input:not(:radio,:checkbox), textarea, select",n).each(function(){if(this.name&&t[this.name]==null){var n=$.Watermark.Clean(this);n!=""&&(t[this.name]=n)}}),$(":radio, :checkbox",n).each(function(){$(this).prop("checked")&&(t[this.name]=$(this).val())}),t}function initializeExpandCollapse(){var n=$(".isExpandable");n.each(function(n,t){clickedToCollapse.call(t)});$(".isCollapsable").css("cursor","pointer").live("click",clickedToCollapse);n.css("cursor","pointer").live("click",clickedToExpand);$(document).trigger("applySavedSettings")}function clickedToCollapse(){var n=$(this),t=n.next(),i=n.parent(".twoColumn").length,r;if(t.find(".input-validation-error").length||i&&t.next().find(".input-validation-error").length)return!1;t.hide();r=n.next().children(".twoColumn").length;i&&!r&&t.next().hide();n.removeClass("isCollapsable").addClass("isExpandable")}function clickedToExpand(){var n=$(this),t,i;n.next().show();t=n.parent(".twoColumn").length;i=n.next().children(".twoColumn").length;t&&!i&&n.next().next().show();n.removeClass("isExpandable").addClass("isCollapsable");n.trigger("activitySummarySectionClicked",n.attr("id"))}function reloadPage(){ngp.dirtyForm.excludeClick();window.location.reload(!0)}function getCommonContentRenderer(n,t){return function(i){var h=n.close,r=$(i).not("script"),f=$(i).filter("script"),o,s;if(log(f),n.IsDialog){var e=n,c=e.dialogClass=="deleteDialogWrapper",u=$("div.ui-dialog-content:visible");u.length&&!c&&u.dialog("ngpHide");r.find(":input").not(":submit, :button").bind("keypress",function(n){if(window.event&&(n=window.event),n.keyCode==13)return r.find(".DefaultModalAction").length>0&&r.find(".DefaultModalAction").click(),!1;n.keyCode==27&&ngp.modalDialog.close()});e.close=function(n,t){FeedBack.close();destroyCurrentDialog.call(this,n,t);f.remove();h&&h();document.body.style.overflow="auto"};o=r.dialog(e).bind("dialogopen",function(n){resetDialogHeight($(n.target))});e.hideScroll&&(document.body.style.overflow="hidden");o.dialog("open");ngp.dirtyForm.setup($("form",r).get(0));n.Container=o;n.hideCurrent&&u.length?ActiveDialogs.push(u):u.length&&!c&&(destroyCurrentDialog.call(u),s=o.data("FeedBack"),typeof s!="undefined"&&s!==null&&FeedBack.open());$(".ui-widget-overlay").not(":first").hide()}else n.Container&&n.Container.length&&n.Container.length>0&&n.Container.append(r);f.length>0&&f.appendTo("body");ngp.watermark&&ngp.watermark.init();typeof t=="function"&&t(n.Container)}}function getCommonDialogRenderer(n,t){var u=typeof n.modal=="undefined"?!0:n.modal,f=typeof n.hideCurrent=="undefined"?!1:n.hideCurrent,r,i;return f&&(u=!1),r=$(FeedBack._container.element).is(":visible"),r&&FeedBack.close(),FeedBack.reset(),i=$.extend({autoOpen:!1,dialogClass:"common-dialog",draggable:!1,hideScroll:!0,minWidth:775,modal:!0,position:["top",0],resizable:!1,width:775},n),i.IsDialog=!0,getCommonContentRenderer(i,t)}function getDeleteDialogRenderer(n){return n.width=450,n.minWidth=450,n.dialogClass="deleteDialogWrapper",getCommonDialogRenderer(n)}function resetDialogHeight(n){var i=$(window).height(),t=n;n.hasClass("ui-dialog")&&(t=$("div.ui-dialog-content",n));t.height("auto");t.height()>i-174?(t.height(i-174),t.parent("div").hasClass("width-increased-for-scrollbar")||t.parent("div").width(t.parent("div").width()+17).addClass("width-increased-for-scrollbar")):t.parent("div").hasClass("width-increased-for-scrollbar")&&t.parent("div").width(t.parent("div").width()-17).removeClass("width-increased-for-scrollbar")}function ajaxDelete(n,t,i){var u=$(n).parents("form").get(0),f=u.action,r={dummyParameter:""};i&&(r=getModalFormData.call(n));$.ngpAjax({url:f,data:r,success:function(i){destroyCurrentDialog.call(n);typeof activeDataGrid!="undefined"&&activeDataGrid&&(activeDataGrid.data("deleteResponse",i),activeDataGrid.superRefresh(),activeDataGrid=null);i&&typeof i.DisplayMessageType!="undefined"&&i.DisplayMessageType!==Constants.MessageType.None&&FeedBack.update(i);$(document).trigger("deleteConfirmed",[i]);typeof t=="string"&&$(document).trigger(t,[i])},type:"POST",dataType:"json"})}function syncDelete(n){$(n).parent("form").submit()}function removeLink(n,t){$.ngpAjax({url:n,data:[],success:function(n){var i;n.ResultCode==Constants.ResponseResultCode.Success&&(t=="AllPartnershipContribution"?$.ComplianceFieldHelper.EvaluateClickableMetaData.call(contribution.data.controlObjects.changedInput):t=="PartnershipContribution"?($("#AppliedContributionList").superRefresh(),contribution.helpers.HideGridIfUnchecked()):t=="JointFundraisingAllocation"?$("#AllocationContributionList").superRefresh():t=="AllJointFundraisingAllocations"?$.ComplianceFieldHelper.EvaluateClickableMetaData.call(contribution.data.controlObjects.changedInput):t=="AllReimbursementItems"?$.ComplianceFieldHelper.EvaluateClickableMetaData.call(disbursement.data.controlObjects.changedInput):t=="AllCreditCardItems"?$.ComplianceFieldHelper.EvaluateClickableMetaData.call(disbursement.data.controlObjects.changedInput):t=="ReimbursementItem"?$("#ReimbursementList").superRefresh():t=="CreditCardItem"?$("#CreditCardPayrollPaymentList").superRefresh():t=="AssetAcquisitionContribution"?$("#AcquisitionContributionList").superRefresh():t=="AssetAcquisitionDisbursement"?$("#AcquisitionDisbursementList").superRefresh():t=="AssetLiquidationContribution"?$("#LiquidationContributionList").superRefresh():t=="AssetLiquidationDisbursement"?$("#LiquidationDisbursementList").superRefresh():t=="EventContribution"?i=$("#EventContributionsList").superRefresh():t=="EventDisbursement"?i=$("#EventDisbursementList").superRefresh():t=="EventPledge"&&(i=$("#EventPledgesList").superRefresh()),$(document).trigger("linkRemoved",[null,i]))},error:null,dataType:"json",type:"POST"})}function initializeIEFixes(){$.browser.msie&&$("input:radio,input:checkbox").live("click",function(){var n=$(this);n.is(":visible:enabled")&&this.id!==""&&(this.blur(),this.focus())})}function InitDialogFormDraw(){$("div.dialogFormContent").css("max-height",window.innerHeight?window.innerHeight-200:$(window).height()-200)}function getContactAddressLine(n,t,i){var r="";return n&&(r=n),t&&(r.length>0&&(r=r+", "),r=r+t),i&&(r.length>0&&(r=r+", "),r=r+i),r}function htmlEncode(n){return $("<div/>").text(n).html()}function htmlDecode(n){return n.replace(/<(.|\n)*?>|\t/gim,"").replace(/(\&\#\d+\;)|(\&[a-z]+\;)/gim,function(n){return $("<div/>").html(n).text()})}function simpleCheckboxContentToggler(n,t){n.is(":checked")?t.show():t.hide()}var ngp,runningAjaxRequests,ngpJQueryExtensions,sessionExpiration,adjustGridHeightInModal,FeedBack;!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function i(){return wf.apply(null,arguments)}function ve(n){wf=n}function ui(n){return"[object Array]"===Object.prototype.toString.call(n)}function fi(n){return n instanceof Date||"[object Date]"===Object.prototype.toString.call(n)}function ye(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function ut(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function ei(n,t){for(var i in t)ut(t,i)&&(n[i]=t[i]);return ut(t,"toString")&&(n.toString=t.toString),ut(t,"valueOf")&&(n.valueOf=t.valueOf),n}function kt(n,t,i,r){return bu(n,t,i,r,!0).utc()}function pe(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function o(n){return null==n._pf&&(n._pf=pe()),n._pf}function gr(n){if(null==n._isValid){var t=o(n);n._isValid=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated;n._strict&&(n._isValid=n._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return n._isValid}function nu(n){var t=kt(NaN);return null!=n?ei(o(t),n):o(t).userInvalidated=!0,t}function tu(n,t){var u,i,r;if("undefined"!=typeof t._isAMomentObject&&(n._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(n._i=t._i),"undefined"!=typeof t._f&&(n._f=t._f),"undefined"!=typeof t._l&&(n._l=t._l),"undefined"!=typeof t._strict&&(n._strict=t._strict),"undefined"!=typeof t._tzm&&(n._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(n._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(n._offset=t._offset),"undefined"!=typeof t._pf&&(n._pf=o(t)),"undefined"!=typeof t._locale&&(n._locale=t._locale),sr.length>0)for(u in sr)i=sr[u],r=t[i],"undefined"!=typeof r&&(n[i]=r);return n}function dt(n){tu(this,n);this._d=new Date(+n._d);hr===!1&&(hr=!0,i.updateOffset(this),hr=!1)}function nt(n){return n instanceof dt||null!=n&&null!=n._isAMomentObject}function s(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function iu(n,t,i){for(var f=Math.min(n.length,t.length),e=Math.abs(n.length-t.length),u=0,r=0;f>r;r++)(i&&n[r]!==t[r]||!i&&s(n[r])!==s(t[r]))&&u++;return u+e}function ru(){}function uu(n){return n?n.toLowerCase().replace("_","-"):n}function we(n){for(var i,t,f,r,u=0;u<n.length;){for(r=uu(n[u]).split("-"),i=r.length,t=uu(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=fu(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&iu(r,t,!0)>=i-1)break;i--}u++}return null}function fu(n){var t=null;if(!ht[n]&&"undefined"!=typeof module&&module&&module.exports)try{t=li._abbr;require("./locale/"+n);gt(t)}catch(i){}return ht[n]}function gt(n,t){var i;return n&&(i="undefined"==typeof t?ft(n):eu(n,t),i&&(li=i)),li._abbr}function eu(n,t){return null!==t?(t.abbr=n,ht[n]||(ht[n]=new ru),ht[n].set(t),gt(n),ht[n]):(delete ht[n],null)}function ft(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return li;if(!ui(n)){if(t=fu(n))return t;n=[n]}return we(n)}function l(n,t){var i=n.toLowerCase();ii[i]=ii[i+"s"]=ii[t]=n}function y(n){if("string"==typeof n)return ii[n]||ii[n.toLowerCase()]}function ou(n){var i,t,r={};for(t in n)ut(n,t)&&(i=y(t),i&&(r[i]=n[t]));return r}function vt(n,t){return function(r){return null!=r?(su(this,n,r),i.updateOffset(this,t),this):oi(this,n)}}function oi(n,t){return n._d["get"+(n._isUTC?"UTC":"")+t]()}function su(n,t,i){return n._d["set"+(n._isUTC?"UTC":"")+t](i)}function hu(n,t){var i;if("object"==typeof n)for(i in n)this.set(i,n[i]);else if(n=y(n),"function"==typeof this[n])return this[n](t);return this}function ki(n,t,i){for(var r=""+Math.abs(n),u=n>=0;r.length<t;)r="0"+r;return(u?i?"+":"":"-")+r}function r(n,t,i,r){var u=r;"string"==typeof r&&(u=function(){return this[r]()});n&&(pt[n]=u);t&&(pt[t[0]]=function(){return ki(u.apply(this,arguments),t[1],t[2])});i&&(pt[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function be(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function ke(n){for(var i=n.match(bf),t=0,r=i.length;r>t;t++)i[t]=pt[i[t]]?pt[i[t]]:be(i[t]);return function(u){var f="";for(t=0;r>t;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function di(n,t){return n.isValid()?(t=cu(t,n.localeData()),cr[t]||(cr[t]=ke(t)),cr[t](n)):n.localeData().invalidDate()}function cu(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(ai.lastIndex=0;i>=0&&ai.test(n);)n=n.replace(ai,r),ai.lastIndex=0,i-=1;return n}function t(n,t,i){vr[n]="function"==typeof t?t:function(n){return n&&i?i:t}}function de(n,t){return ut(vr,n)?vr[n](t._strict,t._locale):new RegExp(ge(n))}function ge(n){return n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function c(n,t){var i,r=t;for("string"==typeof n&&(n=[n]),"number"==typeof t&&(r=function(n,i){i[t]=s(n)}),i=0;i<n.length;i++)yr[n[i]]=r}function ni(n,t){c(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function no(n,t,i){null!=t&&ut(yr,n)&&yr[n](t,i._a,i,n)}function gi(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function to(n){return this._months[n.month()]}function io(n){return this._monthsShort[n.month()]}function ro(n,t,i){var r,u,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++)if((u=kt([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[r].test(n))||i&&"MMM"===t&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function lu(n,t){var i;return"string"==typeof t&&(t=n.localeData().monthsParse(t),"number"!=typeof t)?n:(i=Math.min(n.date(),gi(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n)}function au(n){return null!=n?(lu(this,n),i.updateOffset(this,!0),this):oi(this,"Month")}function uo(){return gi(this.year(),this.month())}function nr(n){var i,t=n._a;return t&&-2===o(n).overflow&&(i=t[d]<0||t[d]>11?d:t[b]<1||t[b]>gi(t[k],t[d])?b:t[a]<0||t[a]>24||24===t[a]&&(0!==t[ct]||0!==t[lt]||0!==t[at])?a:t[ct]<0||t[ct]>59?ct:t[lt]<0||t[lt]>59?lt:t[at]<0||t[at]>999?at:-1,o(n)._overflowDayOfYear&&(k>i||i>b)&&(i=b),o(n).overflow=i),n}function vu(n){i.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function p(n,t){var i=!0,r=n+"\n"+(new Error).stack;return ei(function(){return i&&(vu(r),i=!1),t.apply(this,arguments)},t)}function fo(n,t){gf[n]||(vu(t),gf[n]=!0)}function yu(n){var t,i,r=n._i,u=na.exec(r);if(u){for(o(n).iso=!0,t=0,i=pr.length;i>t;t++)if(pr[t][1].exec(r)){n._f=pr[t][0]+(u[6]||" ");break}for(t=0,i=wr.length;i>t;t++)if(wr[t][1].exec(r)){n._f+=wr[t][0];break}r.match(bi)&&(n._f+="Z");rr(n)}else n._isValid=!1}function eo(n){var t=ta.exec(n._i);return null!==t?void(n._d=new Date(+t[1])):(yu(n),void(n._isValid===!1&&(delete n._isValid,i.createFromInputFallback(n))))}function oo(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 1970>n&&o.setFullYear(n),o}function tr(n){var t=new Date(Date.UTC.apply(null,arguments));return 1970>n&&t.setUTCFullYear(n),t}function pu(n){return wu(n)?366:365}function wu(n){return n%4==0&&n%100!=0||n%400==0}function so(){return wu(this.year())}function et(n,t,i){var u,f=i-t,r=i-n.day();return r>f&&(r-=7),f-7>r&&(r+=7),u=e(n).add(r,"d"),{week:Math.ceil(u.dayOfYear()/7),year:u.year()}}function ho(n){return et(n,this._week.dow,this._week.doy).week}function co(){return this._week.dow}function lo(){return this._week.doy}function ao(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")}function vo(n){var t=et(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")}function yo(n,t,i,r,u){var o,e,f=tr(n,0,1).getUTCDay();return f=0===f?7:f,i=null!=i?i:u,o=u-f+(f>r?7:0)-(u>f?7:0),e=7*(t-1)+(i-u)+o+1,{year:e>0?n:n-1,dayOfYear:e>0?e:pu(n-1)+e}}function po(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==n?t:this.add(n-t,"d")}function yt(n,t,i){return null!=n?n:null!=t?t:i}function wo(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ir(n){var t,i,r,u,f=[];if(!n._d){for(r=wo(n),n._w&&null==n._a[b]&&null==n._a[d]&&bo(n),n._dayOfYear&&(u=yt(n._a[k],r[k]),n._dayOfYear>pu(u)&&(o(n)._overflowDayOfYear=!0),i=tr(u,0,n._dayOfYear),n._a[d]=i.getUTCMonth(),n._a[b]=i.getUTCDate()),t=0;3>t&&null==n._a[t];++t)n._a[t]=f[t]=r[t];for(;7>t;t++)n._a[t]=f[t]=null==n._a[t]?2===t?1:0:n._a[t];24===n._a[a]&&0===n._a[ct]&&0===n._a[lt]&&0===n._a[at]&&(n._nextDay=!0,n._a[a]=0);n._d=(n._useUTC?tr:oo).apply(null,f);null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[a]=24)}}function bo(n){var t,o,u,r,i,f,s;t=n._w;null!=t.GG||null!=t.W||null!=t.E?(i=1,f=4,o=yt(t.GG,n._a[k],et(e(),1,4).year),u=yt(t.W,1),r=yt(t.E,1)):(i=n._locale._week.dow,f=n._locale._week.doy,o=yt(t.gg,n._a[k],et(e(),i,f).year),u=yt(t.w,1),null!=t.d?(r=t.d,i>r&&++u):r=null!=t.e?t.e+i:i);s=yo(o,u,r,f,i);n._a[k]=s.year;n._dayOfYear=s.dayOfYear}function rr(n){if(n._f===i.ISO_8601)return void yu(n);n._a=[];o(n).empty=!0;for(var t,u,s,r=""+n._i,c=r.length,h=0,e=cu(n._f,n._locale).match(bf)||[],f=0;f<e.length;f++)u=e[f],t=(r.match(de(u,n))||[])[0],t&&(s=r.substr(0,r.indexOf(t)),s.length>0&&o(n).unusedInput.push(s),r=r.slice(r.indexOf(t)+t.length),h+=t.length),pt[u]?(t?o(n).empty=!1:o(n).unusedTokens.push(u),no(u,t,n)):n._strict&&!t&&o(n).unusedTokens.push(u);o(n).charsLeftOver=c-h;r.length>0&&o(n).unusedInput.push(r);o(n).bigHour===!0&&n._a[a]<=12&&n._a[a]>0&&(o(n).bigHour=void 0);n._a[a]=ko(n._locale,n._a[a],n._meridiem);ir(n);nr(n)}function ko(n,t,i){var r;return null==i?t:null!=n.meridiemHour?n.meridiemHour(t,i):null!=n.isPM?(r=n.isPM(i),r&&12>t&&(t+=12),r||12!==t||(t=0),t):t}function go(n){var t,f,u,r,i;if(0===n._f.length)return o(n).invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=tu({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._f=n._f[r],rr(t),gr(t)&&(i+=o(t).charsLeftOver,i+=10*o(t).unusedTokens.length,o(t).score=i,(null==u||u>i)&&(u=i,f=t));ei(n,f||t)}function ns(n){if(!n._d){var t=ou(n._i);n._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond];ir(n)}}function ts(n){var i,t=n._i,r=n._f;return n._locale=n._locale||ft(n._l),null===t||void 0===r&&""===t?nu({nullInput:!0}):("string"==typeof t&&(n._i=t=n._locale.preparse(t)),nt(t)?new dt(nr(t)):(ui(r)?go(n):r?rr(n):fi(t)?n._d=t:is(n),i=new dt(nr(n)),i._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i))}function is(n){var t=n._i;void 0===t?n._d=new Date:fi(t)?n._d=new Date(+t):"string"==typeof t?eo(n):ui(t)?(n._a=ye(t.slice(0),function(n){return parseInt(n,10)}),ir(n)):"object"==typeof t?ns(n):"number"==typeof t?n._d=new Date(t):i.createFromInputFallback(n)}function bu(n,t,i,r,u){var f={};return"boolean"==typeof i&&(r=i,i=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,ts(f)}function e(n,t,i,r){return bu(n,t,i,r,!1)}function ku(n,t){var r,i;if(1===t.length&&ui(t[0])&&(t=t[0]),!t.length)return e();for(r=t[0],i=1;i<t.length;++i)t[i][n](r)&&(r=t[i]);return r}function rs(){var n=[].slice.call(arguments,0);return ku("isBefore",n)}function us(){var n=[].slice.call(arguments,0);return ku("isAfter",n)}function si(n){var t=ou(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*h+6e4*s+36e5*o;this._days=+e+7*f;this._months=+u+3*r+12*i;this._data={};this._locale=ft();this._bubble()}function ur(n){return n instanceof si}function du(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return 0>n&&(n=-n,i="-"),i+ki(~~(n/60),2)+t+ki(~~n%60,2)})}function fr(n){var i=(n||"").match(bi)||[],u=i[i.length-1]||[],t=(u+"").match(re)||["-",0,0],r=+(60*t[1])+s(t[2]);return"+"===t[0]?r:-r}function er(n,t){var r,u;return t._isUTC?(r=t.clone(),u=(nt(n)||fi(n)?+n:+e(n))-+r,r._d.setTime(+r._d+u),i.updateOffset(r,!1),r):e(n).local()}function or(n){return 15*-Math.round(n._d.getTimezoneOffset()/15)}function fs(n,t){var r,u=this._offset||0;return null!=n?("string"==typeof n&&(n=fr(n)),Math.abs(n)<16&&(n=60*n),!this._isUTC&&t&&(r=or(this)),this._offset=n,this._isUTC=!0,null!=r&&this.add(r,"m"),u!==n&&(!t||this._changeInProgress?rf(this,tt(n-u,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?u:or(this)}function es(n,t){return null!=n?("string"!=typeof n&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function os(n){return this.utcOffset(0,n)}function ss(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(or(this),"m")),this}function hs(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(fr(this._i)),this}function cs(n){return n=n?e(n).utcOffset():0,(this.utcOffset()-n)%60==0}function ls(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function as(){if(this._a){var n=this._isUTC?kt(this._a):e(this._a);return this.isValid()&&iu(this._a,n.toArray())>0}return!1}function vs(){return!this._isUTC}function ys(){return this._isUTC}function gu(){return this._isUTC&&0===this._offset}function tt(n,t){var u,f,o,i=n,r=null;return ur(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(i={},t?i[t]=n:i.milliseconds=n):(r=ue.exec(n))?(u="-"===r[1]?-1:1,i={y:0,d:s(r[b])*u,h:s(r[a])*u,m:s(r[ct])*u,s:s(r[lt])*u,ms:s(r[at])*u}):(r=fe.exec(n))?(u="-"===r[1]?-1:1,i={y:ot(r[2],u),M:ot(r[3],u),d:ot(r[4],u),h:ot(r[5],u),m:ot(r[6],u),s:ot(r[7],u),w:ot(r[8],u)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=ps(e(i.from),e(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),f=new si(i),ur(n)&&ut(n,"_locale")&&(f._locale=n._locale),f}function ot(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function nf(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function ps(n,t){var i;return t=er(t,n),n.isBefore(t)?i=nf(n,t):(i=nf(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function tf(n,t){return function(i,r){var u,f;return null===r||isNaN(+r)||(fo(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),f=i,i=r,r=f),i="string"==typeof i?+i:i,u=tt(i,r),rf(this,u,n),this}}function rf(n,t,r,u){var o=t._milliseconds,f=t._days,e=t._months;u=null==u?!0:u;o&&n._d.setTime(+n._d+o*r);f&&su(n,"Date",oi(n,"Date")+f*r);e&&lu(n,oi(n,"Month")+e*r);u&&i.updateOffset(n,f||e)}function ws(n){var i=n||e(),r=er(i,this).startOf("day"),t=this.diff(r,"days",!0),u=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.localeData().calendar(u,this,e(i)))}function bs(){return new dt(this)}function ks(n,t){var i;return t=y("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(n=nt(n)?n:e(n),+this>+n):(i=nt(n)?+n:+e(n),i<+this.clone().startOf(t))}function ds(n,t){var i;return t=y("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(n=nt(n)?n:e(n),+n>+this):(i=nt(n)?+n:+e(n),+this.clone().endOf(t)<i)}function gs(n,t,i){return this.isAfter(n,i)&&this.isBefore(t,i)}function nh(n,t){var i;return t=y(t||"millisecond"),"millisecond"===t?(n=nt(n)?n:e(n),+this==+n):(i=+e(n),+this.clone().startOf(t)<=i&&i<=+this.clone().endOf(t))}function w(n){return 0>n?Math.ceil(n):Math.floor(n)}function th(n,t,i){var r,u,f=er(n,this),e=6e4*(f.utcOffset()-this.utcOffset());return t=y(t),"year"===t||"month"===t||"quarter"===t?(u=ih(this,f),"quarter"===t?u/=3:"year"===t&&(u/=12)):(r=this-f,u="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-e)/864e5:"week"===t?(r-e)/6048e5:r),i?u:w(u)}function ih(n,t){var r,f,u=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(u,"months");return 0>t-i?(r=n.clone().add(u-1,"months"),f=(t-i)/(i-r)):(r=n.clone().add(u+1,"months"),f=(t-i)/(r-i)),-(u+f)}function rh(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function uf(){var n=this.clone().utc();return 0<n.year()&&n.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():di(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):di(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function uh(n){var t=di(this,n||i.defaultFormat);return this.localeData().postformat(t)}function fh(n,t){return this.isValid()?tt({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function eh(n){return this.from(e(),n)}function oh(n,t){return this.isValid()?tt({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sh(n){return this.to(e(),n)}function ff(n){var t;return void 0===n?this._locale._abbr:(t=ft(n),null!=t&&(this._locale=t),this)}function ef(){return this._locale}function hh(n){switch(n=y(n)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n&&this.weekday(0),"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this}function ch(n){return n=y(n),void 0===n||"millisecond"===n?this:this.startOf(n).add(1,"isoWeek"===n?"week":n).subtract(1,"ms")}function lh(){return+this._d-6e4*(this._offset||0)}function ah(){return Math.floor(+this/1e3)}function vh(){return this._offset?new Date(+this):this._d}function yh(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function ph(){return gr(this)}function wh(){return ei({},o(this))}function bh(){return o(this).overflow}function hi(n,t){r(0,[n,n.length],0,t)}function of(n,t,i){return et(e([n,11,31+t-i]),t,i).week}function kh(n){var t=et(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==n?t:this.add(n-t,"y")}function dh(n){var t=et(this,1,4).year;return null==n?t:this.add(n-t,"y")}function gh(){return of(this.year(),1,4)}function nc(){var n=this.localeData()._week;return of(this.year(),n.dow,n.doy)}function tc(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)}function ic(n,t){if("string"==typeof n)if(isNaN(n)){if(n=t.weekdaysParse(n),"number"!=typeof n)return null}else n=parseInt(n,10);return n}function rc(n){return this._weekdays[n.day()]}function uc(n){return this._weekdaysShort[n.day()]}function fc(n){return this._weekdaysMin[n.day()]}function ec(n){var t,i,r;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(i=e([2e3,1]).day(t),r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[t].test(n))return t}function oc(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=ic(n,this.localeData()),this.add(n-t,"d")):t}function sc(n){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")}function hc(n){return null==n?this.day()||7:this.day(this.day()%7?n:n-7)}function sf(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function hf(n,t){return t._meridiemParse}function cc(n){return"p"===(n+"").toLowerCase().charAt(0)}function lc(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function cf(n){r(0,[n,3],0,"millisecond")}function ac(){return this._isUTC?"UTC":""}function vc(){return this._isUTC?"Coordinated Universal Time":""}function yc(n){return e(1e3*n)}function pc(){return e.apply(null,arguments).parseZone()}function wc(n,t,i){var r=this._calendar[n];return"function"==typeof r?r.call(t,i):r}function bc(n){var t=this._longDateFormat[n];return!t&&this._longDateFormat[n.toUpperCase()]&&(t=this._longDateFormat[n.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n]=t),t}function kc(){return this._invalidDate}function dc(n){return this._ordinal.replace("%d",n)}function lf(n){return n}function gc(n,t,i,r){var u=this._relativeTime[i];return"function"==typeof u?u(n,t,i,r):u.replace(/%d/i,n)}function nl(n,t){var i=this._relativeTime[n>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)}function tl(n){var t;for(var i in n)t=n[i],"function"==typeof t?this[i]=t:this["_"+i]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function af(n,t,i,r){var u=ft(),f=kt().set(r,t);return u[i](f,n)}function ti(n,t,i,r,u){if("number"==typeof n&&(t=n,n=void 0),n=n||"",null!=t)return af(n,t,i,u);for(var e=[],f=0;r>f;f++)e[f]=af(n,f,i,u);return e}function il(n,t){return ti(n,t,"months",12,"month")}function rl(n,t){return ti(n,t,"monthsShort",12,"month")}function ul(n,t){return ti(n,t,"weekdays",7,"day")}function fl(n,t){return ti(n,t,"weekdaysShort",7,"day")}function el(n,t){return ti(n,t,"weekdaysMin",7,"day")}function ol(){var n=this._data;return this._milliseconds=g(this._milliseconds),this._days=g(this._days),this._months=g(this._months),n.milliseconds=g(n.milliseconds),n.seconds=g(n.seconds),n.minutes=g(n.minutes),n.hours=g(n.hours),n.months=g(n.months),n.years=g(n.years),this}function vf(n,t,i,r){var u=tt(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function sl(n,t){return vf(this,n,t,1)}function hl(n,t){return vf(this,n,t,-1)}function cl(){var u,f,e,o=this._milliseconds,t=this._days,i=this._months,n=this._data,r=0;return n.milliseconds=o%1e3,u=w(o/1e3),n.seconds=u%60,f=w(u/60),n.minutes=f%60,e=w(f/60),n.hours=e%24,t+=w(e/24),r=w(yf(t)),t-=w(pf(r)),i+=w(t/30),t%=30,r+=w(i/12),i%=12,n.days=t,n.months=i,n.years=r,this}function yf(n){return 400*n/146097}function pf(n){return 146097*n/400}function ll(n){var t,r,i=this._milliseconds;if(n=y(n),"month"===n||"year"===n)return t=this._days+i/864e5,r=this._months+12*yf(t),"month"===n?r:r/12;switch(t=this._days+Math.round(pf(this._months/12)),n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+n);}}function al(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)}function it(n){return function(){return this.as(n)}}function vl(n){return n=y(n),this[n+"s"]()}function st(n){return function(){return this._data[n]}}function yl(){return w(this.days()/7)}function pl(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function wl(n,t,i){var r=tt(n).abs(),h=wt(r.as("s")),f=wt(r.as("m")),e=wt(r.as("h")),o=wt(r.as("d")),s=wt(r.as("M")),c=wt(r.as("y")),u=h<rt.s&&["s",h]||1===f&&["m"]||f<rt.m&&["mm",f]||1===e&&["h"]||e<rt.h&&["hh",e]||1===o&&["d"]||o<rt.d&&["dd",o]||1===s&&["M"]||s<rt.M&&["MM",s]||1===c&&["y"]||["yy",c];return u[2]=t,u[3]=+n>0,u[4]=i,pl.apply(null,u)}function bl(n,t){return void 0===rt[n]?!1:void 0===t?rt[n]:(rt[n]=t,!0)}function kl(n){var t=this.localeData(),i=wl(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function ci(){var r=bt(this.years()),u=bt(this.months()),f=bt(this.days()),n=bt(this.hours()),t=bt(this.minutes()),i=bt(this.seconds()+this.milliseconds()/1e3),e=this.asSeconds();return e?(0>e?"-":"")+"P"+(r?r+"Y":"")+(u?u+"M":"")+(f?f+"D":"")+(n||t||i?"T":"")+(n?n+"H":"")+(t?t+"M":"")+(i?i+"S":""):"P0D"}var wf,li,sr=i.momentProperties=[],hr=!1,ht={},ii={},bf=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,ai=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,cr={},pt={},kf=/\d/,v=/\d\d/,df=/\d{3}/,lr=/\d{4}/,vi=/[+-]?\d{6}/,h=/\d\d?/,yi=/\d{1,3}/,ar=/\d{1,4}/,pi=/[+-]?\d{1,6}/,wi=/[+-]?\d+/,bi=/Z|[+-]\d\d:?\d\d/gi,ri=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,vr={},yr={},k=0,d=1,b=2,a=3,ct=4,lt=5,at=6,br,ne,te,ie,re,ue,fe,ee,oe,kr,dr,se,he,ce,le,ae,n;r("M",["MM",2],"Mo",function(){return this.month()+1});r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});r("MMMM",0,0,function(n){return this.localeData().months(this,n)});l("month","M");t("M",h);t("MM",h,v);t("MMM",ri);t("MMMM",ri);c(["M","MM"],function(n,t){t[d]=s(n)-1});c(["MMM","MMMM"],function(n,t,i,r){var u=i._locale.monthsParse(n,r,i._strict);null!=u?t[d]=u:o(i).invalidMonth=n});var dl="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gl="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),gf={};i.suppressDeprecationWarnings=!1;var na=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],wr=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ta=/^\/?Date\((\-?\d+)/i;i.createFromInputFallback=p("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});r(0,["YY",2],0,function(){return this.year()%100});r(0,["YYYY",4],0,"year");r(0,["YYYYY",5],0,"year");r(0,["YYYYYY",6,!0],0,"year");l("year","y");t("Y",wi);t("YY",h,v);t("YYYY",ar,lr);t("YYYYY",pi,vi);t("YYYYYY",pi,vi);c(["YYYY","YYYYY","YYYYYY"],k);c("YY",function(n,t){t[k]=i.parseTwoDigitYear(n)});i.parseTwoDigitYear=function(n){return s(n)+(s(n)>68?1900:2e3)};br=vt("FullYear",!1);r("w",["ww",2],"wo","week");r("W",["WW",2],"Wo","isoWeek");l("week","w");l("isoWeek","W");t("w",h);t("ww",h,v);t("W",h);t("WW",h,v);ni(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=s(n)});ne={dow:0,doy:6};r("DDD",["DDDD",3],"DDDo","dayOfYear");l("dayOfYear","DDD");t("DDD",yi);t("DDDD",df);c(["DDD","DDDD"],function(n,t,i){i._dayOfYear=s(n)});i.ISO_8601=function(){};te=p("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var n=e.apply(null,arguments);return this>n?this:n});ie=p("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var n=e.apply(null,arguments);return n>this?this:n});du("Z",":");du("ZZ","");t("Z",bi);t("ZZ",bi);c(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=fr(n)});re=/([\+\-]|\d\d)/gi;i.updateOffset=function(){};ue=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/;fe=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;tt.fn=si.prototype;ee=tf(1,"add");oe=tf(-1,"subtract");i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";kr=p("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return void 0===n?this.localeData():this.locale(n)});r(0,["gg",2],0,function(){return this.weekYear()%100});r(0,["GG",2],0,function(){return this.isoWeekYear()%100});hi("gggg","weekYear");hi("ggggg","weekYear");hi("GGGG","isoWeekYear");hi("GGGGG","isoWeekYear");l("weekYear","gg");l("isoWeekYear","GG");t("G",wi);t("g",wi);t("GG",h,v);t("gg",h,v);t("GGGG",ar,lr);t("gggg",ar,lr);t("GGGGG",pi,vi);t("ggggg",pi,vi);ni(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=s(n)});ni(["gg","GG"],function(n,t,r,u){t[u]=i.parseTwoDigitYear(n)});r("Q",0,0,"quarter");l("quarter","Q");t("Q",kf);c("Q",function(n,t){t[d]=3*(s(n)-1)});r("D",["DD",2],"Do","date");l("date","D");t("D",h);t("DD",h,v);t("Do",function(n,t){return n?t._ordinalParse:t._ordinalParseLenient});c(["D","DD"],b);c("Do",function(n,t){t[b]=s(n.match(h)[0],10)});dr=vt("Date",!0);r("d",0,"do","day");r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});r("e",0,0,"weekday");r("E",0,0,"isoWeekday");l("day","d");l("weekday","e");l("isoWeekday","E");t("d",h);t("e",h);t("E",h);t("dd",ri);t("ddd",ri);t("dddd",ri);ni(["dd","ddd","dddd"],function(n,t,i){var r=i._locale.weekdaysParse(n);null!=r?t.d=r:o(i).invalidWeekday=n});ni(["d","e","E"],function(n,t,i,r){t[r]=s(n)});var ia="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ra="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ua="Su_Mo_Tu_We_Th_Fr_Sa".split("_");r("H",["HH",2],0,"hour");r("h",["hh",2],0,function(){return this.hours()%12||12});sf("a",!0);sf("A",!1);l("hour","h");t("a",hf);t("A",hf);t("H",h);t("h",h);t("HH",h,v);t("hh",h,v);c(["H","HH"],a);c(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n});c(["h","hh"],function(n,t,i){t[a]=s(n);o(i).bigHour=!0});se=/[ap]\.?m?\.?/i;he=vt("Hours",!0);r("m",["mm",2],0,"minute");l("minute","m");t("m",h);t("mm",h,v);c(["m","mm"],ct);ce=vt("Minutes",!1);r("s",["ss",2],0,"second");l("second","s");t("s",h);t("ss",h,v);c(["s","ss"],lt);le=vt("Seconds",!1);r("S",0,0,function(){return~~(this.millisecond()/100)});r(0,["SS",2],0,function(){return~~(this.millisecond()/10)});cf("SSS");cf("SSSS");l("millisecond","ms");t("S",yi,kf);t("SS",yi,v);t("SSS",yi,df);t("SSSS",/\d+/);c(["S","SS","SSS","SSSS"],function(n,t){t[at]=s(1e3*("0."+n))});ae=vt("Milliseconds",!1);r("z",0,0,"zoneAbbr");r("zz",0,0,"zoneName");n=dt.prototype;n.add=ee;n.calendar=ws;n.clone=bs;n.diff=th;n.endOf=ch;n.format=uh;n.from=fh;n.fromNow=eh;n.to=oh;n.toNow=sh;n.get=hu;n.invalidAt=bh;n.isAfter=ks;n.isBefore=ds;n.isBetween=gs;n.isSame=nh;n.isValid=ph;n.lang=kr;n.locale=ff;n.localeData=ef;n.max=ie;n.min=te;n.parsingFlags=wh;n.set=hu;n.startOf=hh;n.subtract=oe;n.toArray=yh;n.toDate=vh;n.toISOString=uf;n.toJSON=uf;n.toString=rh;n.unix=ah;n.valueOf=lh;n.year=br;n.isLeapYear=so;n.weekYear=kh;n.isoWeekYear=dh;n.quarter=n.quarters=tc;n.month=au;n.daysInMonth=uo;n.week=n.weeks=ao;n.isoWeek=n.isoWeeks=vo;n.weeksInYear=nc;n.isoWeeksInYear=gh;n.date=dr;n.day=n.days=oc;n.weekday=sc;n.isoWeekday=hc;n.dayOfYear=po;n.hour=n.hours=he;n.minute=n.minutes=ce;n.second=n.seconds=le;n.millisecond=n.milliseconds=ae;n.utcOffset=fs;n.utc=os;n.local=ss;n.parseZone=hs;n.hasAlignedHourOffset=cs;n.isDST=ls;n.isDSTShifted=as;n.isLocal=vs;n.isUtcOffset=ys;n.isUtc=gu;n.isUTC=gu;n.zoneAbbr=ac;n.zoneName=vc;n.dates=p("dates accessor is deprecated. Use date instead.",dr);n.months=p("months accessor is deprecated. Use month instead",au);n.years=p("years accessor is deprecated. Use year instead",br);n.zone=p("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",es);var fa=n,u=ru.prototype;u._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};u.calendar=wc;u._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"};u.longDateFormat=bc;u._invalidDate="Invalid date";u.invalidDate=kc;u._ordinal="%d";u.ordinal=dc;u._ordinalParse=/\d{1,2}/;u.preparse=lf;u.postformat=lf;u._relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};u.relativeTime=gc;u.pastFuture=nl;u.set=tl;u.months=to;u._months=dl;u.monthsShort=io;u._monthsShort=gl;u.monthsParse=ro;u.week=ho;u._week=ne;u.firstDayOfYear=lo;u.firstDayOfWeek=co;u.weekdays=rc;u._weekdays=ia;u.weekdaysMin=fc;u._weekdaysMin=ua;u.weekdaysShort=uc;u._weekdaysShort=ra;u.weekdaysParse=ec;u.isPM=cc;u._meridiemParse=se;u.meridiem=lc;gt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=1===s(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i}});i.lang=p("moment.lang is deprecated. Use moment.locale instead.",gt);i.langData=p("moment.langData is deprecated. Use moment.localeData instead.",ft);var g=Math.abs,ea=it("ms"),oa=it("s"),sa=it("m"),ha=it("h"),ca=it("d"),la=it("w"),aa=it("M"),va=it("y"),ya=st("milliseconds"),pa=st("seconds"),wa=st("minutes"),ba=st("hours"),ka=st("days"),da=st("months"),ga=st("years"),wt=Math.round,rt={s:45,m:45,h:22,d:26,M:11},bt=Math.abs,f=si.prototype;return f.abs=ol,f.add=sl,f.subtract=hl,f.as=ll,f.asMilliseconds=ea,f.asSeconds=oa,f.asMinutes=sa,f.asHours=ha,f.asDays=ca,f.asWeeks=la,f.asMonths=aa,f.asYears=va,f.valueOf=al,f._bubble=cl,f.get=vl,f.milliseconds=ya,f.seconds=pa,f.minutes=wa,f.hours=ba,f.days=ka,f.weeks=yl,f.months=da,f.years=ga,f.humanize=kl,f.toISOString=ci,f.toString=ci,f.toJSON=ci,f.locale=ff,f.localeData=ef,f.toIsoString=p("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ci),f.lang=kr,r("X",0,0,"unix"),r("x",0,0,"valueOf"),t("x",wi),t("X",/[+-]?\d+(\.\d{1,3})?/),c("X",function(n,t,i){i._d=new Date(1e3*parseFloat(n,10))}),c("x",function(n,t,i){i._d=new Date(s(n))}),i.version="2.10.3",ve(e),i.fn=fa,i.min=rs,i.max=us,i.utc=kt,i.unix=yc,i.months=il,i.isDate=fi,i.locale=gt,i.invalid=nu,i.duration=tt,i.isMoment=nt,i.weekdays=ul,i.parseZone=pc,i.localeData=ft,i.isDuration=ur,i.monthsShort=rl,i.weekdaysMin=el,i.defineLocale=eu,i.weekdaysShort=fl,i.normalizeUnits=y,i.relativeTimeThreshold=bl,i});!function(n,t,i,r){"use strict";function u(t,i){t||(i=i?": "+i:"",n.error("Fancytree assertion failed"+i))}function o(n,i){var r,u,f=t.console?t.console[n]:null;if(f)try{f.apply(t.console,i)}catch(e){for(u="",r=0;r<i.length;r++)u+=i[r];f(u)}}function rt(n){return!(!n.tree||n.statusNodeType===r)}function ut(t){for(var r,u,e=n.map(n.trim(t).split("."),function(n){return parseInt(n,10)}),f=n.map(Array.prototype.slice.call(arguments,1),function(n){return parseInt(n,10)}),i=0;i<f.length;i++)if(r=e[i]||0,u=f[i]||0,r!==u)return r>u;return!0}function k(n,t,i,r,u){return function(){var i=t[n],f=r[n],e=t.ext[u],o=function(){return i.apply(t,arguments)},s=function(n){return i.apply(t,n)};return function(){var n=t._local,i=t._super,r=t._superApply;try{return t._local=e,t._super=o,t._superApply=s,f.apply(t,arguments)}finally{t._local=n;t._super=i;t._superApply=r}}}()}function ft(t,i,r,u){for(var f in r)"function"==typeof r[f]?"function"==typeof t[f]?t[f]=k(f,t,i,r,u):"_"===f.charAt(0)?t.ext[u][f]=k(f,t,i,r,u):n.error("Could not override tree."+f+". Use prefix '_' to create tree."+u+"._"+f):"options"!==f&&(t.ext[u][f]=r[f])}function f(t,i){return t===r?n.Deferred(function(){this.resolve()}).promise():n.Deferred(function(){this.resolveWith(t,i)}).promise()}function p(t,i){return t===r?n.Deferred(function(){this.reject()}).promise():n.Deferred(function(){this.rejectWith(t,i)}).promise()}function d(n,t){return function(){n.resolveWith(t)}}function w(t){var i=n.extend({},t.data()),r=i.json;return delete i.fancytree,delete i.uiFancytree,r&&(delete i.json,i=n.extend(i,r)),i}function g(n){return n=n.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(n)>=0}}function et(n){var t=new RegExp("^"+n,"i");return function(n){return t.test(n.title)}}function c(t,i){var f,o,r,e;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},f=0,o=h.length;o>f;f++)r=h[f],this[r]=i[r];i.data&&n.extend(this.data,i.data);for(r in i)y[r]||n.isFunction(i[r])||it[r]||(this.data[r]=i[r]);null==this.key?this.tree.options.defaultKey?(this.key=this.tree.options.defaultKey(this),u(this.key,"defaultKey() must return a unique key")):this.key="_"+s._nextNodeKey++:this.key=""+this.key;i.active&&(u(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this);i.selected&&(this.tree.lastSelectedNode=this);e=i.children;e?e.length?this._setChildren(e):this.children=this.lazy?[]:null:this.children=null;this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function a(t){this.widget=t;this.$div=t.element;this.options=t.options;this.options&&(n.isFunction(this.options.lazyload)&&!n.isFunction(this.options.lazyLoad)&&(this.options.lazyLoad=function(){return s.warn("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),t.options.lazyload.apply(this,arguments)}),n.isFunction(this.options.loaderror)&&n.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),this.options.fx!==r&&s.warn("The 'fx' options was replaced by 'toggleEffect' since 2014-11-30."));this.ext={};this.data=w(this.$div);this._id=n.ui.fancytree._nextId++;this._ns=".fancytree-"+this._id;this.activeNode=null;this.focusNode=null;this._hasFocus=null;this.lastSelectedNode=null;this.systemFocusElement=null;this.lastQuicksearchTerm="";this.lastQuicksearchTime=0;this.statusClassPropName="span";this.ariaPropName="li";this.nodeContainerAttrName="li";this.$div.find(">ul.fancytree-container").remove();var i,u={tree:this};this.rootNode=new c(u,{title:"root",key:"root_"+this._id,children:null,expanded:!0});this.rootNode.parent=null;i=n("<ul>",{"class":"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div);this.$container=i;this.rootNode.ul=i[0];null==this.options.debugLevel&&(this.options.debugLevel=s.debugLevel);this.$container.attr("tabindex",this.options.tabindex);this.options.aria&&this.$container.attr("role","tree").attr("aria-multiselectable",!0)}if(n.ui&&n.ui.fancytree)return void n.ui.fancytree.warn("Fancytree: ignored duplicate include");u(n.ui,"Fancytree requires jQuery UI (http://jqueryui.com)");for(var l,s=null,ot=new RegExp(/\.|\//),nt="$recursive_request",st={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},ht={16:!0,17:!0,18:!0},ct={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",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:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},lt={0:"",1:"left",2:"middle",3:"right"},v="active expanded focus folder hideCheckbox lazy selected unselectable".split(" "),tt={},h="expanded extraClasses folder hideCheckbox icon key lazy refKey selected statusNodeType title tooltip unselectable".split(" "),y={},b={},it={active:!0,children:!0,data:!0,focus:!0},e=0;e<v.length;e++)tt[v[e]]=!0;for(e=0;e<h.length;e++)l=h[e],y[l]=!0,l!==l.toLowerCase()&&(b[l.toLowerCase()]=l);c.prototype={_findDirectChild:function(n){var t,r,i=this.children;if(i)if("string"==typeof n){for(t=0,r=i.length;r>t;t++)if(i[t].key===n)return i[t]}else{if("number"==typeof n)return this.children[n];if(n.parent===this)return n}return null},_setChildren:function(n){u(n&&(!this.children||0===this.children.length),"only init supported");this.children=[];for(var t=0,i=n.length;i>t;t++)this.children.push(new c(this,n[t]))},addChildren:function(t,i){var r,o,e,s=null,f=[];for(n.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),r=0,o=t.length;o>r;r++)f.push(new c(this,t[r]));return s=f[0],null==i?this.children=this.children.concat(f):(i=this._findDirectChild(i),e=n.inArray(i,this.children),u(e>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[e,0].concat(f))),(!this.parent||this.parent.ul||this.tr)&&this.render(),3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),s},addClass:function(n){return this.toggleClass(n,!0)},addNode:function(n,t){switch(t!==r&&"over"!==t||(t="child"),t){case"after":return this.getParent().addChildren(n,this.getNextSibling());case"before":return this.getParent().addChildren(n,this);case"firstChild":var i=this.children?this.children[0]:null;return this.addChildren(n,i);case"child":case"over":return this.addChildren(n)}u(!1,"Invalid mode: "+t)},addPagingNode:function(t,i){var r,u;if(i=i||"child",t===!1){for(r=this.children.length-1;r>=0;r--)u=this.children[r],"paging"===u.statusNodeType&&this.removeChild(u);return void(this.partload=!1)}return t=n.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,i)},appendSibling:function(n){return this.addNode(n,"after")},applyPatch:function(t){if(null===t)return this.remove(),f(this);var i,u,r,e={children:!0,expanded:!0,parent:!0};for(i in t)r=t[i],e[i]||n.isFunction(r)||(y[i]?this[i]=r:this.data[i]=r);return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),u=t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):f(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(n,t,i){return n.addNode(this.toDict(!0,i),t)},countChildren:function(n){var t,u,i,r=this.children;if(!r)return 0;if(i=r.length,n!==!1)for(t=0,u=i;u>t;t++)i+=r[t].countChildren();return i},debug:function(){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),o("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},findAll:function(t){t=n.isFunction(t)?t:g(t);var i=[];return this.visit(function(n){t(n)&&i.push(n)}),i},findFirst:function(t){t=n.isFunction(t)?t:g(t);var i=null;return this.visit(function(n){if(t(n))return(i=n,!1)}),i},_changeSelectStatusAttrs:function(n){var t=!1;switch(n){case!1:t=this.selected||this.partsel;this.selected=!1;this.partsel=!1;break;case!0:t=!this.selected||!this.partsel;this.selected=!0;this.partsel=!0;break;case r:t=this.selected||!this.partsel;this.selected=!1;this.partsel=!0;break;default:u(!1,"invalid state: "+n)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(){var n=this.isSelected();this.visit(function(t){t._changeSelectStatusAttrs(n)});this.fixSelection3FromEndNodes()},fixSelection3FromEndNodes:function(){function n(t){var i,h,c,e,u,o,s,f=t.children;if(f&&f.length){for(o=!0,s=!1,i=0,h=f.length;h>i;i++)c=f[i],e=n(c),e!==!1&&(s=!0),e!==!0&&(o=!1);u=o?!0:s?r:!1}else u=!!t.selected;return t._changeSelectStatusAttrs(u),u}u(3===this.tree.options.selectMode,"expected selectMode 3");n(this);this.visitParents(function(n){for(var t,f,e=n.children,o=!0,s=!1,i=0,u=e.length;u>i;i++)t=e[i],(t.selected||t.partsel)&&(s=!0),t.unselectable||t.selected||(o=!1);f=o?!0:s?r:!1;n._changeSelectStatusAttrs(f)})},fromDict:function(t){for(var i in t)y[i]?this[i]=t[i]:"data"===i?n.extend(this.data,t.data):n.isFunction(t[i])||it[i]||(this.data[i]=t[i]);t.children&&(this.removeChildren(),this.addChildren(t.children));this.renderTitle()},getChildren:function(){return this.hasChildren()===r?r:this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return n.inArray(this,this.parent.children)},getIndexHier:function(t,i){t=t||".";var r,u=[];return n.each(this.getParentList(!1,!0),function(n,t){r=""+(t.getIndex()+1);i&&(r=("0000000"+r).substr(-i));u.push(r)}),u.join(t)},getKeyPath:function(n){var t=[],i=this.tree.options.keyPathSeparator;return this.visitParents(function(n){n.parent&&t.unshift(n.key)},!n),i+t.join(i)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t},getNextSibling:function(){if(this.parent)for(var t=this.parent.children,n=0,i=t.length-1;i>n;n++)if(t[n]===this)return t[n+1];return null},getParent:function(){return this.parent},getParentList:function(n,t){for(var r=[],i=t?this:this.parent;i;)(n||i.parent)&&r.unshift(i),i=i.parent;return r},getPrevSibling:function(){if(this.parent)for(var t=this.parent.children,n=1,i=t.length;i>n;n++)if(t[n]===this)return t[n-1];return null},getSelectedNodes:function(n){var t=[];return this.visit(function(i){if(i.selected&&(t.push(i),n===!0))return"skip"}),t},hasChildren:function(){return this.lazy?null==this.children?r:0===this.children.length?!1:1===this.children.length&&this.children[0].isStatusNode()?r:!0:!(!this.children||!this.children.length)},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),o("info",arguments))},isActive:function(){return this.tree.activeNode===this},isChildOf:function(n){return this.parent&&this.parent===n},isDescendantOf:function(n){if(!n||n.tree!==this.tree)return!1;for(var t=this.parent;t;){if(t===n)return!0;t=t.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var n=this.parent;return!n||n.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var n=this.parent;return!n||n.children[n.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||this.hasChildren()!==r},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return this.hasChildren()===r},isVisible:function(){for(var i=this.getParentList(!1,!1),n=0,t=i.length;t>n;n++)if(!i[n].expanded)return!1;return!0},lazyLoad:function(n){return this.warn("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."),this.load(n)},load:function(n){var i,t,r=this;return u(this.isLazy(),"load() requires a lazy node"),n||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),t=this.tree._triggerNodeEvent("lazyLoad",this),t===!1?f(this):(u("boolean"!=typeof t,"lazyLoad event must return source in data.result"),i=this.tree._callHook("nodeLoadChildren",this,t),this.expanded&&i.always(function(){r.render()}),i)):f(this)},makeVisible:function(t){for(var e=this,u=[],r=new n.Deferred,f=this.getParentList(!1,!1),o=f.length,s=!(t&&t.noAnimation===!0),h=!(t&&t.scrollIntoView===!1),i=o-1;i>=0;i--)u.push(f[i].setExpanded(!0,t));return n.when.apply(n,u).done(function(){h?e.scrollIntoView(s).done(function(){r.resolve()}):r.resolve()}),r.promise()},moveTo:function(t,i,f){i===r||"over"===i?i="child":"firstChild"===i&&(t.children&&t.children.length?(i="before",t=t.children[0]):i="child");var o,s=this.parent,e="child"===i?t:t.parent;if(this!==t){if(this.parent?e.isDescendantOf(this)&&n.error("Cannot move a node to its own descendant"):n.error("Cannot move system root"),1===this.parent.children.length){if(this.parent===e)return;this.parent.children=this.parent.lazy?[]:null;this.parent.expanded=!1}else o=n.inArray(this,this.parent.children),u(o>=0,"invalid source parent"),this.parent.children.splice(o,1);if(this.parent=e,e.hasChildren())switch(i){case"child":e.children.push(this);break;case"before":o=n.inArray(t,e.children);u(o>=0,"invalid target parent");e.children.splice(o,0,this);break;case"after":o=n.inArray(t,e.children);u(o>=0,"invalid target parent");e.children.splice(o+1,0,this);break;default:n.error("Invalid mode "+i)}else e.children=[this];f&&t.visit(f,!0);this.tree!==t.tree&&(this.warn("Cross-tree moveTo is experimantal!"),this.visit(function(n){n.tree=t.tree},!0));s.isDescendantOf(e)||s.render();e.isDescendantOf(s)||e===s||e.render()}},navigate:function(t,i){function e(r){if(r){try{r.makeVisible()}catch(u){}return n(r.span).is(":visible")?i===!1?r.setFocus():r.setActive():(r.debug("Navigate: skipping hidden node"),void r.navigate(t,i))}}var s,h,u,c=!0,o=n.ui.keyCode,r=null;switch(t){case o.BACKSPACE:this.parent&&this.parent.parent&&(u=e(this.parent));break;case o.LEFT:this.expanded?(this.setExpanded(!1),u=e(this)):this.parent&&this.parent.parent&&(u=e(this.parent));break;case o.RIGHT:this.expanded||!this.children&&!this.lazy?this.children&&this.children.length&&(u=e(this.children[0])):(this.setExpanded(),u=e(this));break;case o.UP:for(r=this.getPrevSibling();r&&!n(r.span).is(":visible");)r=r.getPrevSibling();for(;r&&r.expanded&&r.children&&r.children.length;)r=r.children[r.children.length-1];!r&&this.parent&&this.parent.parent&&(r=this.parent);u=e(r);break;case o.DOWN:if(this.expanded&&this.children&&this.children.length)r=this.children[0];else for(h=this.getParentList(!1,!0),s=h.length-1;s>=0;s--){for(r=h[s].getNextSibling();r&&!n(r.span).is(":visible");)r=r.getNextSibling();if(r)break}u=e(r);break;default:c=!1}return u||f()},remove:function(){return this.parent.removeChild(this)},removeChild:function(n){return this.tree._callHook("nodeRemoveChild",this,n)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(n){return this.toggleClass(n,!1)},render:function(n,t){return this.tree._callHook("nodeRender",this,n,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(t){var f,i=this.parent,o=n.inArray(this,i.children),r=this;return u(this.isPagingNode(),"replaceWith() currently requires a paging status node"),f=this.tree._callHook("nodeLoadChildren",this,t),f.done(function(){var n=r.children;for(e=0;e<n.length;e++)n[e].parent=i;i.children.splice.apply(i.children,[o+1,0].concat(n));r.children=null;r.remove();i.render()}).fail(function(){r.setExpanded()}),f},resetLazy:function(){this.removeChildren();this.expanded=!1;this.lazy=!0;this.children=r;this.renderStatus()},scheduleAction:function(t,i){this.tree.timer&&clearTimeout(this.tree.timer);this.tree.timer=null;var r=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){r.tree.debug("setTimeout: trigger expand");r.setExpanded(!0)},i);break;case"activate":this.tree.timer=setTimeout(function(){r.tree.debug("setTimeout: trigger activate");r.setActive(!0)},i);break;default:n.error("Invalid mode "+t)}},scrollIntoView:function(e,o){o!==r&&rt(o)&&(this.warn("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead."),o={topNode:o});var v,a,g,w,c=n.extend({effects:e===!0?{duration:200,queue:!1}:e,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent||this.tree.$container,topNode:null},o),y=new n.Deferred,it=this,nt=n(this.span).height(),s=n(c.scrollParent),b=c.scrollOfs.top||0,tt=c.scrollOfs.bottom||0,k=s.height(),p=s.scrollTop(),d=s,ut=s[0]===t,h=c.topNode||null,l=null;return n(this.span).is(":visible")?(ut?(a=n(this.span).offset().top,v=h&&h.span?n(h.span).offset().top:0,d=n("html,body")):(u(s[0]!==i&&s[0]!==i.body,"scrollParent should be a simple element or `window`, not document or body."),w=s.offset().top,a=n(this.span).offset().top-w+p,v=h?n(h.span).offset().top-w+p:0,g=Math.max(0,s.innerHeight()-s[0].clientHeight),k-=g),p+b>a?l=a-b:a+nt>p+k-tt&&(l=a+nt-k+tt,h&&(u(h.isRootNode()||n(h.span).is(":visible"),"topNode must be visible"),l>v&&(l=v-b))),null!==l?c.effects?(c.effects.complete=function(){y.resolveWith(it)},d.stop(!0).animate({scrollTop:l},c.effects)):(d[0].scrollTop=l,y.resolveWith(this)):y.resolveWith(this),y.promise()):(this.warn("scrollIntoView(): node is invisible."),f())},setActive:function(n,t){return this.tree._callHook("nodeSetActive",this,n,t)},setExpanded:function(n,t){return this.tree._callHook("nodeSetExpanded",this,n,t)},setFocus:function(n){return this.tree._callHook("nodeSetFocus",this,n)},setSelected:function(n){return this.tree._callHook("nodeSetSelected",this,n)},setStatus:function(n,t,i){return this.tree._callHook("nodeSetStatus",this,n,t,i)},setTitle:function(n){this.title=n;this.renderTitle()},sortChildren:function(n,t){var i,u,r=this.children;if(r){if(n=n||function(n,t){var i=n.title.toLowerCase(),r=t.title.toLowerCase();return i===r?0:i>r?1:-1},r.sort(n),t)for(i=0,u=r.length;u>i;i++)r[i].children&&r[i].sortChildren(n,"$norender$");"$norender$"!==t&&this.render()}},toDict:function(t,i){var u,o,e,r={},f=this;if(n.each(h,function(n,t){(f[t]||f[t]===!1)&&(r[t]=f[t])}),n.isEmptyObject(this.data)||(r.data=n.extend({},this.data),n.isEmptyObject(r.data)&&delete r.data),i&&i(r,f),t&&this.hasChildren())for(r.children=[],u=0,o=this.children.length;o>u;u++)e=this.children[u],e.isStatusNode()||r.children.push(e.toDict(!0,i));return r},toggleClass:function(t,i){var f,e,h=t.match(/\S+/g)||[],c=0,o=!1,s=this[this.tree.statusClassPropName],u=" "+(this.extraClasses||"")+" ";for(s&&n(s).toggleClass(t,i);f=h[c++];)if(e=u.indexOf(" "+f+" ")>=0,i=i===r?!e:!!i)e||(u+=f+" ",o=!0);else for(;u.indexOf(" "+f+" ")>-1;)u=u.replace(" "+f+" "," ");return this.extraClasses=n.trim(u),o},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"<FancytreeNode(#"+this.key+", '"+this.title+"')>"},visit:function(n,t){var r,f,i=!0,u=this.children;if(t===!0&&(i=n(this),i===!1||"skip"===i))return i;if(u)for(r=0,f=u.length;f>r&&(i=u[r].visit(n,!0),i!==!1);r++);return i},visitAndLoad:function(t,i,r){var o,u,s,e=this;return t&&i===!0&&(u=t(e),u===!1||"skip"===u)?r?u:f():e.children||e.lazy?(o=new n.Deferred,s=[],e.load().done(function(){for(var i=0,r=e.children.length;r>i;i++){if(u=e.children[i].visitAndLoad(t,!0,!0),u===!1){o.reject();break}"skip"!==u&&s.push(u)}n.when.apply(this,s).then(function(){o.resolve()})}),o.promise()):f()},visitParents:function(n,t){if(t&&n(this)===!1)return!1;for(var i=this.parent;i;){if(n(i)===!1)return!1;i=i.parent}return!0},warn:function(){Array.prototype.unshift.call(arguments,this.toString());o("warn",arguments)}};a.prototype={_makeHookContext:function(t,i,u){var f,e;return t.node!==r?(i&&t.originalEvent!==i&&n.error("invalid args"),f=t):t.tree?(e=t.tree,f={node:t,tree:e,widget:e.widget,options:e.widget.options,originalEvent:i}):t.widget?f={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:i}:n.error("invalid args"),u&&n.extend(f,u),f},_callHook:function(t,i){var f=this._makeHookContext(i),r=this[t],u=Array.prototype.slice.call(arguments,2);return n.isFunction(r)||n.error("_callHook('"+t+"') is not a function"),u.unshift(f),r.apply(this,u)},_requireExtension:function(t,i,r,f){r=!!r;var e=this._local.name,s=this.options.extensions,c=n.inArray(t,s)<n.inArray(e,s),o=i&&null==this.ext[t],h=!o&&null!=r&&r!==c;return u(e&&e!==t,"invalid or same name"),o||h?(f||(o||i?(f="'"+e+"' extension requires '"+t+"'",h&&(f+=" to be registered "+(r?"before":"after")+" itself")):f="If used together, `"+t+"` must be registered "+(r?"before":"after")+" `"+e+"`"),n.error(f),!1):!0},activateKey:function(n){var t=this.getNodeByKey(n);return t?t.setActive():this.activeNode&&this.activeNode.setActive(!1),t},addPagingNode:function(n,t){return this.rootNode.addPagingNode(n,t)},applyPatch:function(t){for(var o,r,f,s,e,c=t.length,h=[],i=0;c>i;i++)r=t[i],u(2===r.length,"patchList must be an array of length-2-arrays"),f=r[0],s=r[1],e=null===f?this.rootNode:this.getNodeByKey(f),e?(o=new n.Deferred,h.push(o),e.applyPatch(s).always(d(o,e))):this.warn("could not find node with key '"+f+"'");return n.when.apply(n,h).promise()},clear:function(){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),o("log",arguments))},findAll:function(n){return this.rootNode.findAll(n)},findFirst:function(n){return this.rootNode.findFirst(n)},findNextNode:function(t,i){var u=null,e=i.parent.children,f=null,r=function(n,t,i){var f,e,o=n.children,s=o.length,u=o[t];if(u&&i(u)===!1||u&&u.children&&u.expanded&&r(u,0,i)===!1)return!1;for(f=t+1;s>f;f++)if(r(n,f,i)===!1)return!1;return e=n.parent,e?r(e,e.children.indexOf(n)+1,i):r(n,0,i)};return t="string"==typeof t?et(t):t,i=i||this.getFirstChild(),r(i.parent,e.indexOf(i),function(r){return r===u?!1:(u=u||r,n(r.span).is(":visible")?t(r)&&(f=r,f!==i)?!1:void 0:void r.debug("quicksearch: skipping hidden node"))}),f},generateFormElements:function(t,i,r){r=r||{};var f,o="string"==typeof t?t:"ft_"+this._id+"[]",s="string"==typeof i?i:"ft_"+this._id+"_active",e="fancytree_result_"+this._id,u=n("#"+e),h=3===this.options.selectMode&&r.stopOnParents!==!1;u.length?u.empty():u=n("<div>",{id:e}).hide().insertAfter(this.$container);t!==!1&&(f=this.getSelectedNodes(h),n.each(f,function(t,i){u.append(n("<input>",{type:"checkbox",name:o,value:i.key,checked:!0}))}));i!==!1&&this.activeNode&&u.append(n("<input>",{type:"radio",name:s,value:this.activeNode.key,checked:!0}))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getNodeByKey:function(n,t){var r,u;return!t&&(r=i.getElementById(this.options.idPrefix+n))?r.ftnode?r.ftnode:null:(t=t||this.rootNode,u=null,t.visit(function(t){if(t.key===n)return(u=t,!1)},!0),u)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(n){return this.rootNode.getSelectedNodes(n)},hasFocus:function(){return!!this._hasFocus},info:function(){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),o("info",arguments))},loadKeyPath:function(t,i,u){function w(n,t,r){i.call(c,t,"loading");t.load().done(function(){c.loadKeyPath.call(c,o[n],i,t).always(d(r,c))}).fail(function(){c.warn("loadKeyPath: error loading: "+n+" (parent: "+s+")");i.call(c,t,"error");r.reject()})}var y,p,a,l,f,o,e,s,h,v=this.options.keyPathSeparator,c=this;for(i=i||n.noop,n.isArray(t)||(t=[t]),o={},a=0;a<t.length;a++)for(s=u||this.rootNode,l=t[a],l.charAt(0)===v&&(l=l.substr(1)),h=l.split(v);h.length;){if(f=h.shift(),e=s._findDirectChild(f),!e){this.warn("loadKeyPath: key not found: "+f+" (parent: "+s+")");i.call(this,f,"error");break}if(0===h.length){i.call(this,e,"ok");break}if(e.lazy&&e.hasChildren()===r){i.call(this,e,"loaded");o[f]?o[f].push(h.join(v)):o[f]=[h.join(v)];break}i.call(this,e,"loaded");s=e}y=[];for(f in o)e=s._findDirectChild(f),p=new n.Deferred,y.push(p),w(f,e,p);return n.when.apply(n,y).promise()},reactivate:function(n){var i,t=this.activeNode;return t?(this.activeNode=null,i=t.setActive(!0,{noFocus:!0}),n&&t.setFocus(),i):f()},reload:function(n){return this._callHook("treeClear",this),this._callHook("treeLoad",this,n)},render:function(n,t){return this.rootNode.render(n,t)},setFocus:function(n){return this._callHook("treeSetFocus",this,n)},toDict:function(n,t){var i=this.rootNode.toDict(!0,t);return n?i:i.children},toString:function(){return"<Fancytree(#"+this._id+")>"},_triggerNodeEvent:function(n,t,i,u){var f=this._makeHookContext(t,i,u),e=this.widget._trigger(n,i,f);return e!==!1&&f.result!==r?f.result:e},_triggerTreeEvent:function(n,t,i){var u=this._makeHookContext(this,t,i),f=this.widget._trigger(n,t,u);return f!==!1&&u.result!==r?u.result:f},visit:function(n){return this.rootNode.visit(n,!1)},warn:function(){Array.prototype.unshift.call(arguments,this.toString());o("warn",arguments)}};n.extend(a.prototype,{nodeClick:function(n){var t,i,u=n.targetType,r=n.node;if("expander"===u){if(r.isLoading())return void r.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",n)}else if("checkbox"===u)this._callHook("nodeToggleSelected",n),n.options.focusOnSelect&&this._callHook("nodeSetFocus",n,!0);else{if(i=!1,t=!0,r.folder)switch(n.options.clickFolderMode){case 2:i=!0;t=!1;break;case 3:t=!0;i=!0}t&&(this.nodeSetFocus(n),this._callHook("nodeSetActive",n,!0));i&&this._callHook("nodeToggleExpanded",n)}},nodeCollapseSiblings:function(n,t){var r,i,f,u=n.node;if(u.parent)for(r=u.parent.children,i=0,f=r.length;f>i;i++)r[i]!==u&&r[i].expanded&&this._callHook("nodeSetExpanded",r[i],!1,t)},nodeDblclick:function(n){"title"===n.targetType&&4===n.options.clickFolderMode&&this._callHook("nodeToggleExpanded",n);"title"===n.targetType&&n.originalEvent.preventDefault()},nodeKeydown:function(t){var f,e,a,o,r=t.originalEvent,u=t.node,i=t.tree,h=t.options,v=r.which,c=String.fromCharCode(v),y=!(r.altKey||r.ctrlKey||r.metaKey||r.shiftKey),p=n(r.target),l=!0,w=!(r.ctrlKey||!h.autoActivate);if(u||(o=this.getActiveNode()||this.getFirstChild(),o&&(o.setFocus(),u=t.node=this.focusNode,u.debug("Keydown force focus on active node"))),h.quicksearch&&y&&/\w/.test(c)&&!p.is(":input:enabled"))return e=(new Date).getTime(),e-i.lastQuicksearchTime>500&&(i.lastQuicksearchTerm=""),i.lastQuicksearchTime=e,i.lastQuicksearchTerm+=c,f=i.findNextNode(i.lastQuicksearchTerm,i.getActiveNode()),f&&f.setActive(),void r.preventDefault();switch(s.eventToString(r)){case"+":case"=":i.nodeSetExpanded(t,!0);break;case"-":i.nodeSetExpanded(t,!1);break;case"space":u.isPagingNode()?i._triggerNodeEvent("clickPaging",t,r):h.checkbox?i.nodeToggleSelected(t):i.nodeSetActive(t,!0);break;case"return":i.nodeSetActive(t,!0);break;case"backspace":case"left":case"right":case"up":case"down":a=u.navigate(r.which,w);break;default:l=!1}l&&r.preventDefault()},nodeLoadChildren:function(t,i){var o,e,s,f=t.tree,r=t.node,h=(new Date).getTime();return n.isFunction(i)&&(i=i.call(f,{type:"source"},t),u(!n.isFunction(i),"source callback must not return another function")),i.url&&(r._requestId&&r.warn("Recursive load request #"+h+" while #"+r._requestId+" is pending."),o=n.extend({},t.options.ajax,i),r._requestId=h,o.debugDelay?(e=o.debugDelay,n.isArray(e)&&(e=e[0]+Math.random()*(e[1]-e[0])),r.warn("nodeLoadChildren waiting debugDelay "+Math.round(e)+" ms ..."),o.debugDelay=!1,s=n.Deferred(function(t){setTimeout(function(){n.ajax(o).done(function(){t.resolveWith(this,arguments)}).fail(function(){t.rejectWith(this,arguments)})},e)})):s=n.ajax(o),i=new n.Deferred,s.done(function(u){var o,e;if("json"!==this.dataType&&"jsonp"!==this.dataType||"string"!=typeof u||n.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),r._requestId&&r._requestId>h)return void i.rejectWith(this,[nt]);if(t.options.postProcess){try{e=f._triggerNodeEvent("postProcess",t,t.originalEvent,{response:u,error:null,dataType:this.dataType})}catch(s){e={error:s,message:""+s,details:"postProcess failed"}}if(e.error)return o=n.isPlainObject(e.error)?e.error:{message:e.error},o=f._makeHookContext(r,null,o),void i.rejectWith(this,[o]);u=n.isArray(e)?e:u}else u&&u.hasOwnProperty("d")&&t.options.enableAspx&&(u="string"==typeof u.d?n.parseJSON(u.d):u.d);i.resolveWith(this,[u])}).fail(function(n,t,u){var e=f._makeHookContext(r,null,{error:n,args:Array.prototype.slice.call(arguments),message:u,details:n.status+": "+u});i.rejectWith(this,[e])})),n.isFunction(i.then)&&n.isFunction(i["catch"])&&(s=i,i=new n.Deferred,s.then(function(n){i.resolve(n)},function(n){i.reject(n)})),n.isFunction(i.promise)&&(f.nodeSetStatus(t,"loading"),i.done(function(){f.nodeSetStatus(t,"ok");r._requestId=null}).fail(function(n){var i;return n===nt?void r.warn("Ignored response for obsolete load request #"+h+" (expected #"+r._requestId+")"):(n.node&&n.error&&n.message?i=n:(i=f._makeHookContext(r,null,{error:n,args:Array.prototype.slice.call(arguments),message:n?n.message||n.toString():""}),"[object Object]"===i.message&&(i.message="")),r.warn("Load children failed ("+i.message+")",i),void(f._triggerNodeEvent("loadError",i,null)!==!1&&f.nodeSetStatus(t,"error",i.message,i.details)))})),n.when(i).done(function(t){var i;n.isPlainObject(t)&&(u(r.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),u(n.isArray(t.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=t,t=t.children,delete i.children,n.extend(f.data,i));u(n.isArray(t),"expected array of children");r._setChildren(t);f._triggerNodeEvent("loadChildren",r)})},nodeLoadKeyPath:function(){},nodeRemoveChild:function(t,i){var f,s=t.node,o=t.options,e=n.extend({},t,{node:i}),r=s.children;return 1===r.length?(u(i===r[0],"invalid single child"),this.nodeRemoveChildren(t)):(this.activeNode&&(i===this.activeNode||this.activeNode.isDescendantOf(i))&&this.activeNode.setActive(!1),this.focusNode&&(i===this.focusNode||this.focusNode.isDescendantOf(i))&&(this.focusNode=null),this.nodeRemoveMarkup(e),this.nodeRemoveChildren(e),f=n.inArray(i,r),u(f>=0,"invalid child"),i.visit(function(n){n.parent=null},!0),this._callHook("treeRegisterNode",this,!1,i),o.removeNode&&o.removeNode.call(t.tree,{type:"removeNode"},e),void r.splice(f,1))},nodeRemoveChildMarkup:function(t){var i=t.node;i.ul&&(i.isRootNode()?n(i.ul).empty():(n(i.ul).remove(),i.ul=null),i.visit(function(n){n.li=n.ul=null}))},nodeRemoveChildren:function(t){var r,u=t.tree,i=t.node,e=i.children,f=t.options;e&&(this.activeNode&&this.activeNode.isDescendantOf(i)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(i)&&(this.focusNode=null),this.nodeRemoveChildMarkup(t),r=n.extend({},t),i.visit(function(n){n.parent=null;u._callHook("treeRegisterNode",u,!1,n);f.removeNode&&(r.node=n,f.removeNode.call(t.tree,{type:"removeNode"},r))}),i.children=i.lazy?[]:null,i.isRootNode()||(i.expanded=!1),this.nodeRenderStatus(t))},nodeRemoveMarkup:function(t){var i=t.node;i.li&&(n(i.li).remove(),i.li=null);this.nodeRemoveChildMarkup(t)},nodeRender:function(t,r,f,e,o){var h,b,a,c,p,k,d,s=t.node,g=t.tree,l=t.options,nt=l.aria,tt=!1,w=s.parent,v=!w,y=s.children,it=null;if(v||w.ul){if(u(v||w.ul,"parent UL must exist"),v||(s.li&&(r||s.li.parentNode!==s.parent.ul)&&(s.li.parentNode===s.parent.ul?it=s.li.nextSibling:this.debug("Unlinking "+s+" (must be child of "+s.parent+")"),this.nodeRemoveMarkup(t)),s.li?this.nodeRenderStatus(t):(tt=!0,s.li=i.createElement("li"),s.li.ftnode=s,s.key&&l.generateIds&&(s.li.id=l.idPrefix+s.key),s.span=i.createElement("span"),s.span.className="fancytree-node",nt&&n(s.span).attr("aria-labelledby","ftal_"+l.idPrefix+s.key),s.li.appendChild(s.span),this.nodeRenderTitle(t),l.createNode&&l.createNode.call(g,{type:"createNode"},t)),l.renderNode&&l.renderNode.call(g,{type:"renderNode"},t)),y){if(v||s.expanded||f===!0){for(s.ul||(s.ul=i.createElement("ul"),(e!==!0||o)&&s.expanded||(s.ul.style.display="none"),nt&&n(s.ul).attr("role","group"),s.li?s.li.appendChild(s.ul):s.tree.$div.append(s.ul)),c=0,p=y.length;p>c;c++)d=n.extend({},t,{node:y[c]}),this.nodeRender(d,r,f,!1,!0);for(h=s.ul.firstChild;h;)a=h.ftnode,a&&a.parent!==s?(s.debug("_fixParent: remove missing "+a,h),k=h.nextSibling,h.parentNode.removeChild(h),h=k):h=h.nextSibling;for(h=s.ul.firstChild,c=0,p=y.length-1;p>c;c++)b=y[c],a=h.ftnode,b!==a?s.ul.insertBefore(b.li,a.li):h=h.nextSibling}}else s.ul&&(this.warn("remove child markup for "+s),this.nodeRemoveChildMarkup(t));v||tt&&w.ul.insertBefore(s.li,it)}},nodeRenderTitle:function(t,i){var a,f,c,l,v,y,u=t.node,p=t.tree,e=t.options,h=e.aria,w=u.getLevel(),o=[];i!==r&&(u.title=i);u.span&&(w<e.minExpandLevel?(u.lazy||(u.expanded=!0),w>1&&(h?o.push("<span role='button' class='fancytree-expander fancytree-expander-fixed'><\/span>"):o.push("<span class='fancytree-expander fancytree-expander-fixed''><\/span>"))):h?o.push("<span role='button' class='fancytree-expander'><\/span>"):o.push("<span class='fancytree-expander'><\/span>"),e.checkbox&&u.hideCheckbox!==!0&&!u.isStatusNode()&&(h?o.push("<span role='checkbox' class='fancytree-checkbox'><\/span>"):o.push("<span class='fancytree-checkbox'><\/span>")),u.data.iconClass!==r&&(u.icon?n.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(u.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),u.icon=u.data.iconClass)),n.isFunction(e.icon)?(f=e.icon.call(p,{type:"icon"},t),null==f&&(f=u.icon)):f=null!=u.icon?u.icon:e.icon,null==f?f=!0:"boolean"!=typeof f&&(f=""+f),f!==!1&&(l=h?" role='img'":"","string"==typeof f?ot.test(f)?(f="/"===f.charAt(0)?f:(e.imagePath||"")+f,o.push("<img src='"+f+"' class='fancytree-icon' alt='' />")):o.push("<span "+l+" class='fancytree-custom-icon "+f+"'><\/span>"):o.push("<span "+l+" class='fancytree-icon'><\/span>")),c="",e.renderTitle&&(c=e.renderTitle.call(p,{type:"renderTitle"},t)||""),c||(y=u.tooltip?" title='"+s.escapeHtml(u.tooltip)+"'":"",a=h?" id='ftal_"+e.idPrefix+u.key+"'":"",l=h?" role='treeitem'":"",v=e.titlesTabbable?" tabindex='0'":"",c="<span "+l+" class='fancytree-title'"+a+y+v+">"+u.title+"<\/span>"),o.push(c),u.span.innerHTML=o.join(""),this.nodeRenderStatus(t))},nodeRenderStatus:function(t){var i=t.node,s=t.tree,h=t.options,c=i.hasChildren(),o=i.isLastSibling(),f=h.aria,e=n(i.span).find(".fancytree-title"),u=h._classNames,r=[],l=i[s.statusClassPropName];l&&(r.push(u.node),s.activeNode===i&&r.push(u.active),s.focusNode===i?(r.push(u.focused),f&&e.attr("aria-activedescendant",!0)):f&&e.removeAttr("aria-activedescendant"),i.expanded?(r.push(u.expanded),f&&e.attr("aria-expanded",!0)):f&&e.removeAttr("aria-expanded"),i.folder&&r.push(u.folder),c!==!1&&r.push(u.hasChildren),o&&r.push(u.lastsib),i.lazy&&null==i.children&&r.push(u.lazy),i.partload&&r.push(u.partload),i.partsel&&r.push(u.partsel),i.unselectable&&r.push(u.unselectable),i._isLoading&&r.push(u.loading),i._error&&r.push(u.error),i.statusNodeType&&r.push(u.statusNodePrefix+i.statusNodeType),i.selected?(r.push(u.selected),f&&e.attr("aria-selected",!0)):f&&e.attr("aria-selected",!1),i.extraClasses&&r.push(i.extraClasses),c===!1?r.push(u.combinedExpanderPrefix+"n"+(o?"l":"")):r.push(u.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(o?"l":"")),r.push(u.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),l.className=r.join(" "),i.li&&(i.li.className=o?u.lastsib:""))},nodeSetActive:function(t,i,r){r=r||{};var h,o=t.node,e=t.tree,c=t.options,s=r.noEvents===!0,l=r.noFocus===!0,a=o===e.activeNode;return i=i!==!1,a===i?f(o):i&&!s&&this._triggerNodeEvent("beforeActivate",o,t.originalEvent)===!1?p(o,["rejected"]):(i?(e.activeNode&&(u(e.activeNode!==o,"node was active (inconsistency)"),h=n.extend({},t,{node:e.activeNode}),e.nodeSetActive(h,!1),u(null===e.activeNode,"deactivate was out of sync?")),c.activeVisible&&o.makeVisible({scrollIntoView:!1}),e.activeNode=o,e.nodeRenderStatus(t),l||e.nodeSetFocus(t),s||e._triggerNodeEvent("activate",o,t.originalEvent)):(u(e.activeNode===o,"node was not active (inconsistency)"),e.activeNode=null,this.nodeRenderStatus(t),s||t.tree._triggerNodeEvent("deactivate",o,t.originalEvent)),f(o))},nodeSetExpanded:function(t,i,u){u=u||{};var h,o,c,y,a,w,e=t.node,b=t.tree,s=t.options,l=u.noAnimation===!0,v=u.noEvents===!0;if((i=i!==!1,e.expanded&&i||!e.expanded&&!i)||i&&!e.lazy&&!e.hasChildren())return f(e);if(!i&&e.getLevel()<s.minExpandLevel)return p(e,["locked"]);if(!v&&this._triggerNodeEvent("beforeExpand",e,t.originalEvent)===!1)return p(e,["rejected"]);if(l||e.isVisible()||(l=u.noAnimation=!0),o=new n.Deferred,i&&!e.expanded&&s.autoCollapse){a=e.getParentList(!1,!0);w=s.autoCollapse;try{for(s.autoCollapse=!1,c=0,y=a.length;y>c;c++)this._callHook("nodeCollapseSiblings",a[c],u)}finally{s.autoCollapse=w}}return o.done(function(){var n=e.getLastChild();i&&s.autoScroll&&!l&&n?n.scrollIntoView(!0,{topNode:e}).always(function(){v||t.tree._triggerNodeEvent(i?"expand":"collapse",t)}):v||t.tree._triggerNodeEvent(i?"expand":"collapse",t)}),h=function(r){var f,o,u=s.toggleEffect;if(e.expanded=i,b._callHook("nodeRender",t,!1,!1,!0),e.ul)if(f="none"!==e.ul.style.display,o=!!e.expanded,f===o)e.warn("nodeSetExpanded: UL.style.display already set");else{if(u&&!l)return void n(e.ul).toggle(u.effect,u.options,u.duration,function(){r()});e.ul.style.display=e.expanded||!parent?"":"none"}r()},i&&e.lazy&&e.hasChildren()===r?e.load().done(function(){o.notifyWith&&o.notifyWith(e,["loaded"]);h(function(){o.resolveWith(e)})}).fail(function(n){h(function(){o.rejectWith(e,["load failed ("+n+")"])})}):h(function(){o.resolveWith(e)}),o.promise()},nodeSetFocus:function(t,r){var e,u=t.tree,f=t.node;if(r=r!==!1,u.focusNode){if(u.focusNode===f&&r)return;e=n.extend({},t,{node:u.focusNode});u.focusNode=null;this._triggerNodeEvent("blur",e);this._callHook("nodeRenderStatus",e)}r&&(this.hasFocus()||(f.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,{calledByNode:!0})),f.makeVisible({scrollIntoView:!1}),u.focusNode=f,u.options.titlesTabbable?n(f.span).find(".fancytree-title").focus():0===n(i.activeElement).closest(".fancytree-container").length&&n(u.$container).focus(),this._triggerNodeEvent("focus",t),t.options.autoScroll&&f.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(n,t){var i=n.node,r=n.tree,u=n.options;if(t=t!==!1,i.debug("nodeSetSelected("+t+")",n),!i.unselectable){if(i.selected&&t||!i.selected&&!t||this._triggerNodeEvent("beforeSelect",i,n.originalEvent)===!1)return!!i.selected;t&&1===u.selectMode?r.lastSelectedNode&&r.lastSelectedNode.setSelected(!1):3===u.selectMode&&(i.selected=t,i.fixSelection3AfterClick());i.selected=t;this.nodeRenderStatus(n);r.lastSelectedNode=t?i:null;r._triggerNodeEvent("select",n)}},nodeSetStatus:function(t,i,r,u){function s(){var n=f.children?f.children[0]:null;if(n&&n.isStatusNode()){try{f.ul&&(f.ul.removeChild(n.li),n.li=null)}catch(t){}1===f.children.length?f.children=[]:f.children.shift()}}function o(t,i){var r=f.children?f.children[0]:null;return r&&r.isStatusNode()?(n.extend(r,t),r.statusNodeType=i,e._callHook("nodeRenderTitle",r)):(f._setChildren([t]),f.children[0].statusNodeType=i,e.render()),f.children[0]}var f=t.node,e=t.tree;switch(i){case"ok":s();f._isLoading=!1;f._error=null;f.renderStatus();break;case"loading":f.parent||o({title:e.options.strings.loading+(r?" ("+r+")":""),checkbox:!1,tooltip:u},i);f._isLoading=!0;f._error=null;f.renderStatus();break;case"error":o({title:e.options.strings.loadError+(r?" ("+r+")":""),checkbox:!1,tooltip:u},i);f._isLoading=!1;f._error={message:r,details:u};f.renderStatus();break;case"nodata":o({title:e.options.strings.noData,checkbox:!1,tooltip:u},i);f._isLoading=!1;f._error=null;f.renderStatus();break;default:n.error("invalid node status "+i)}},nodeToggleExpanded:function(n){return this.nodeSetExpanded(n,!n.node.expanded)},nodeToggleSelected:function(n){return this.nodeSetSelected(n,!n.node.selected)},treeClear:function(n){var t=n.tree;t.activeNode=null;t.focusNode=null;t.$div.find(">ul.fancytree-container").empty();t.rootNode.children=null},treeCreate:function(){},treeDestroy:function(){this.$div.find(">ul.fancytree-container").remove();this.$source&&this.$source.removeClass("ui-helper-hidden")},treeInit:function(n){this.treeLoad(n)},treeLoad:function(t,i){var e,u,r=t.tree,f=t.widget.element,o=n.extend({},t,{node:this.rootNode});if(r.rootNode.children&&this.treeClear(t),i=i||this.options.source)"string"==typeof i&&n.error("Not implemented");else switch(e=f.data("type")||"html"){case"html":u=f.find(">ul:first");u.addClass("ui-fancytree-source ui-helper-hidden");i=n.ui.fancytree.parseHtml(u);this.data=n.extend(this.data,w(u));break;case"json":i=n.parseJSON(f.text());i.children&&(i.title&&(r.title=i.title),i=i.children);break;default:n.error("Invalid data-type: "+e)}return this.nodeLoadChildren(o,i).done(function(){r.render();3===t.options.selectMode&&r.rootNode.fixSelection3FromEndNodes();r.activeNode&&r.options.activeVisible&&r.activeNode.makeVisible();r._triggerTreeEvent("init",null,{status:!0})}).fail(function(){r.render();r._triggerTreeEvent("init",null,{status:!1})})},treeRegisterNode:function(){},treeSetFocus:function(t,i,r){i=i!==!1;i!==this.hasFocus()&&(this._hasFocus=i,!i&&this.focusNode?this.focusNode.setFocus(!1):!i||r&&r.calledByNode||n(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",i),this._triggerTreeEvent(i?"focusTree":"blurTree"))}});n.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!1,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,debugLevel:null,disabled:!1,enableAspx:!0,extensions:[],toggleEffect:{effect:"blind",options:{direction:"vertical",scale:"box"},duration:200},generateIds:!1,icon:!0,idPrefix:"ft_",focusOnSelect:!1,keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,quicksearch:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading&#8230;",loadError:"Load error!",moreData:"More&#8230;",noData:"No data."},tabindex:"0",titlesTabbable:!1,_classNames:{node:"fancytree-node",folder:"fancytree-folder",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",hasChildren:"fancytree-has-children",active:"fancytree-active",selected:"fancytree-selected",expanded:"fancytree-expanded",lazy:"fancytree-lazy",focused:"fancytree-focused",partload:"fancytree-partload",partsel:"fancytree-partsel",unselectable:"fancytree-unselectable",lastsib:"fancytree-lastsib",loading:"fancytree-loading",error:"fancytree-error",statusNodePrefix:"fancytree-statusnode-"},lazyLoad:null,postProcess:null},_create:function(){this.tree=new a(this);this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul:first");for(var f,i,t=this.options,o=t.extensions,s=this.tree,e=0;e<o.length;e++)i=o[e],f=n.ui.fancytree._extensions[i],f||n.error("Could not apply extension '"+i+"' (it is not registered, did you forget to include it?)"),this.tree.options[i]=n.extend(!0,{},f.options,this.tree.options[i]),u(this.tree.ext[i]===r,"Extension name must not exist as Fancytree.ext attribute: '"+i+"'"),this.tree.ext[i]={},ft(this.tree,s,f,i),s=f;t.icons!==r&&(t.icon!==!0?n.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),t.icon=t.icons));t.iconClass!==r&&(t.icon?n.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),t.icon=t.iconClass));t.tabbable!==r&&(t.tabindex=t.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+t.tabindex+"' instead"));this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree);this._bind()},_setOption:function(t,i){var r=!0,u=!1;switch(t){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":this.tree._callHook("treeCreate",this.tree);u=!0;break;case"source":r=!1;this.tree._callHook("treeLoad",this.tree,i)}this.tree.debug("set option "+t+"="+i+" <"+typeof i+">");r&&n.Widget.prototype._setOption.apply(this,arguments);u&&this.tree.render(!0,!1)},destroy:function(){this._unbind();this.tree._callHook("treeDestroy",this.tree);n.Widget.prototype.destroy.call(this)},_unbind:function(){var t=this.tree._ns;this.element.unbind(t);this.tree.$container.unbind(t);n(i).unbind(t)},_bind:function(){var r=this,i=this.options,n=this.tree,t=n._ns;this._unbind();n.$container.on("focusin"+t+" focusout"+t,function(t){var i=s.getNode(t),r="focusin"===t.type;i?n._callHook("nodeSetFocus",i,r):n._callHook("treeSetFocus",n,r)}).on("selectstart"+t,"span.fancytree-title",function(n){n.preventDefault()}).on("keydown"+t,function(t){if(i.disabled||i.keyboard===!1)return!0;var r,u=n.focusNode,f=n._makeHookContext(u||n,t),e=n.phase;try{return n.phase="userEvent",r=u?n._triggerNodeEvent("keydown",u,t):n._triggerTreeEvent("keydown",t),"preventNav"===r?r=!0:r!==!1&&(r=n._callHook("nodeKeydown",f)),r}finally{n.phase=e}}).on("click"+t+" dblclick"+t,function(n){if(i.disabled)return!0;var u,f=s.getEventTarget(n),e=f.node,t=r.tree,o=t.phase;if(!e)return!0;u=t._makeHookContext(e,n);try{switch(t.phase="userEvent",n.type){case"click":return u.targetType=f.type,e.isPagingNode()?t._triggerNodeEvent("clickPaging",u,n)===!0:t._triggerNodeEvent("click",u,n)===!1?!1:t._callHook("nodeClick",u);case"dblclick":return u.targetType=f.type,t._triggerNodeEvent("dblclick",u,n)===!1?!1:t._callHook("nodeDblclick",u)}}finally{t.phase=o}})},getActiveNode:function(){return this.tree.activeNode},getNodeByKey:function(n){return this.tree.getNodeByKey(n)},getRootNode:function(){return this.tree.rootNode},getTree:function(){return this.tree}});s=n.ui.fancytree;n.extend(n.ui.fancytree,{version:"2.17.0",buildType:"production",debugLevel:1,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:a,_FancytreeNodeClass:c,jquerySupports:{positionMyOfs:ut(n.ui.version,1,9)},assert:function(n,t){return u(n,t)},debounce:function(n,t,i,r){var u;return 3===arguments.length&&"boolean"!=typeof i&&(r=i,i=!1),function(){var f=arguments;r=r||this;i&&!u&&t.apply(r,f);clearTimeout(u);u=setTimeout(function(){i||t.apply(r,f);u=null},n)}},debug:function(){n.ui.fancytree.debugLevel>=2&&o("log",arguments)},error:function(){o("error",arguments)},escapeHtml:function(n){return(""+n).replace(/[&<>"'\/]/g,function(n){return st[n]})},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&n.error("expected new position syntax (but '%' is not supported)"),!n.ui.fancytree.jquerySupports.positionMyOfs){var i=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),r=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),u=(i[2]?+i[2]:0)+(r[2]?+r[2]:0),f=(i[4]?+i[4]:0)+(r[4]?+r[4]:0);t=n.extend({},t,{my:i[1]+" "+i[3],at:r[1]+" "+r[3]});(u||f)&&(t.offset=""+u+" "+f)}return t},getEventTargetType:function(n){return this.getEventTarget(n).type},getEventTarget:function(t){var u=t&&t.target?t.target.className:"",i={node:this.getNode(t.target),type:r};return/\bfancytree-title\b/.test(u)?i.type="title":/\bfancytree-expander\b/.test(u)?i.type=i.node.hasChildren()===!1?"prefix":"expander":/\bfancytree-checkbox\b/.test(u)||/\bfancytree-radio\b/.test(u)?i.type="checkbox":/\bfancytree-icon\b/.test(u)?i.type="icon":/\bfancytree-node\b/.test(u)?i.type="title":t&&t.target&&n(t.target).closest(".fancytree-title").length&&(i.type="title"),i},getNode:function(n){if(n instanceof c)return n;for(n.selector!==r?n=n[0]:n.originalEvent!==r&&(n=n.target);n;){if(n.ftnode)return n.ftnode;n=n.parentNode}return null},getTree:function(t){var i;return t instanceof a?t:(t===r&&(t=0),"number"==typeof t?t=n(".fancytree-container").eq(t):"string"==typeof t?t=n(t).eq(0):t.selector!==r?t=t.eq(0):t.originalEvent!==r&&(t=n(t.target)),t=t.closest(":ui-fancytree"),i=t.data("ui-fancytree")||t.data("fancytree"),i?i.tree:null)},info:function(){n.ui.fancytree.debugLevel>=1&&o("info",arguments)},eventToString:function(n){var i=n.which,r=n.type,t=[];return n.altKey&&t.push("alt"),n.ctrlKey&&t.push("ctrl"),n.metaKey&&t.push("meta"),n.shiftKey&&t.push("shift"),"click"===r||"dblclick"===r?t.push(lt[n.button]+r):ht[i]||t.push(ct[i]||String.fromCharCode(i).toLowerCase()),t.join("+")},keyEventToString:function(n){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(n)},parseHtml:function(t){var o,e,s,i,c,f,u,l,y=t.find(">li"),a=[];return y.each(function(){var p,g,k=n(this),nt=k.find(">span:first",this),d=nt.length?null:k.find(">a:first"),y={tooltip:null,data:{}};for(nt.length?y.title=nt.html():d&&d.length?(y.title=d.html(),y.data.href=d.attr("href"),y.data.target=d.attr("target"),y.tooltip=d.attr("title")):(y.title=k.html(),c=y.title.search(/<ul/i),c>=0&&(y.title=y.title.substring(0,c))),y.title=n.trim(y.title),i=0,f=v.length;f>i;i++)y[v[i]]=r;for(o=this.className.split(" "),s=[],i=0,f=o.length;f>i;i++)e=o[i],tt[e]?y[e]=!0:s.push(e);if(y.extraClasses=s.join(" "),u=k.attr("title"),u&&(y.tooltip=u),u=k.attr("id"),u&&(y.key=u),p=w(k),p&&!n.isEmptyObject(p)){for(g in b)p.hasOwnProperty(g)&&(p[b[g]]=p[g],delete p[g]);for(i=0,f=h.length;f>i;i++)u=h[i],l=p[u],null!=l&&(delete p[u],y[u]=l);n.extend(y.data,p)}t=k.find(">ul:first");y.children=t.length?n.ui.fancytree.parseHtml(t):y.lazy?r:null;a.push(y)}),a},registerExtension:function(t){u(null!=t.name,"extensions must have a `name` property.");u(null!=t.version,"extensions must have a `version` property.");n.ui.fancytree._extensions[t.name]=t},unescapeHtml:function(n){var t=i.createElement("div");return t.innerHTML=n,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(){o("warn",arguments)}})}(jQuery,window,document),function(n){var t=function(){"use strict";var f="s",n=function(n){var t=-n.getTimezoneOffset();return t!==null?t:0},i=function(n,t,i){var r=new Date;return n!==undefined&&r.setFullYear(n),r.setMonth(t),r.setDate(i),r},r=function(t){return n(i(t,0,2))},u=function(t){return n(i(t,5,2))},e=function(t){var i=t.getMonth()>7,f=i?u(t.getFullYear()):r(t.getFullYear()),o=n(t),s=f<0,e=f-o;return!s&&!i?e<0:e!==0},o=function(){var n=r(),t=u(),i=n-t;return i<0?n+",1":i>0?t+",1,"+f:n+",0"},s=function(){var n=o();return new t.TimeZone(t.olson.timezones[n])},h=function(n){return t.olson.abbreviations[n]},c=function(n){var t=new Date(2010,6,15,1,0,0,0),i={"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"America/Asuncion":new Date(2012,9,7,3,0,0,0),"America/Santiago":new Date(2012,9,3,3,0,0,0),"America/Campo_Grande":new Date(2012,9,21,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2012,2,10,2,0,0,0),"America/New_York":new Date(2012,2,10,7,0,0,0),"Europe/Helsinki":new Date(2013,2,31,5,0,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0),"Europe/Moscow":t,"Asia/Amman":new Date(2013,2,29,1,0,0,0),"Asia/Beirut":new Date(2013,2,31,2,0,0,0),"Asia/Damascus":new Date(2013,3,6,2,0,0,0),"Asia/Jerusalem":new Date(2013,2,29,5,0,0,0),"Asia/Yekaterinburg":t,"Asia/Omsk":t,"Asia/Krasnoyarsk":t,"Asia/Irkutsk":t,"Asia/Yakutsk":t,"Asia/Vladivostok":t,"Asia/Baku":new Date(2013,2,31,4,0,0),"Asia/Yerevan":new Date(2013,2,31,3,0,0),"Asia/Kamchatka":t,"Asia/Gaza":new Date(2010,2,27,4,0,0),"Africa/Cairo":new Date(2010,4,1,3,0,0),"Europe/Minsk":t,"Pacific/Apia":new Date(2010,10,1,1,0,0,0),"Pacific/Fiji":new Date(2010,11,1,0,0,0),"Australia/Perth":new Date(2008,10,1,1,0,0,0)};return i[n]};return{determine:s,date_is_dst:e,dst_start_for:c,getAbbreviation:h}}();t.TimeZone=function(n){"use strict";var r={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Santiago":["America/Santiago","America/Asuncion","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Asia/Beirut","Europe/Helsinki","Asia/Damascus"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"],"Asia/Dubai":["Europe/Moscow"],"Asia/Dhaka":["Asia/Yekaterinburg"],"Asia/Jakarta":["Asia/Omsk"],"Asia/Shanghai":["Asia/Krasnoyarsk","Australia/Perth"],"Asia/Tokyo":["Asia/Irkutsk"],"Australia/Brisbane":["Asia/Yakutsk"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Tarawa":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk"],"Asia/Baku":["Asia/Yerevan","Asia/Baku"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]},i=n,u=function(){for(var n=r[i],e=n.length,u=0,f=n[0];u<e;u+=1)if(f=n[u],t.date_is_dst(t.dst_start_for(f))){i=f;return}},f=function(){return typeof r[i]!="undefined"};return f()&&u(),{name:function(){return i}}};t.olson={};t.olson.timezones={"-720,0":"Pacific/Majuro","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Santiago","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"America/Noronha","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg","180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"};t.olson.abbreviations={"Africa/Abidjan":"GMT","Africa/Accra":"S","Africa/Addis_Ababa":"EAT","Africa/Algiers":"CET","Africa/Asmara":"EAT","Africa/Bamako":"GMT","Africa/Bangui":"WAT","Africa/Banjul":"GMT","Africa/Bissau":"GMT","Africa/Blantyre":"CAT","Africa/Brazzaville":"WAT","Africa/Bujumbura":"CAT","Africa/Cairo":"EEST","Africa/Casablanca":"WET","Africa/Ceuta":"CEST","Africa/Conakry":"GMT","Africa/Dakar":"GMT","Africa/Dar_es_Salaam":"EAT","Africa/Djibouti":"EAT","Africa/Douala":"WAT","Africa/El_Aaiun":"WET","Africa/Freetown":"S","Africa/Gaborone":"CAT","Africa/Harare":"CAT","Africa/Johannesburg":"SAST","Africa/Kampala":"EAT","Africa/Khartoum":"EAT","Africa/Kigali":"CAT","Africa/Kinshasa":"WAT","Africa/Lagos":"WAT","Africa/Libreville":"WAT","Africa/Lome":"GMT","Africa/Luanda":"WAT","Africa/Lubumbashi":"CAT","Africa/Lusaka":"CAT","Africa/Malabo":"WAT","Africa/Maputo":"CAT","Africa/Maseru":"SAST","Africa/Mbabane":"SAST","Africa/Mogadishu":"EAT","Africa/Monrovia":"GMT","Africa/Nairobi":"EAT","Africa/Ndjamena":"WAT","Africa/Niamey":"WAT","Africa/Nouakchott":"GMT","Africa/Ouagadougou":"GMT","Africa/Porto-Novo":"WAT","Africa/Sao_Tome":"GMT","Africa/Tripoli":"EET","Africa/Tunis":"CEST","Africa/Windhoek":"WAST","America/Adak":"HAST","America/Anchorage":"AKT","America/Anguilla":"AST","America/Antigua":"AST","America/Araguaina":"BRT","America/Argentina/Buenos_Aires":"ARST","America/Argentina/Catamarca":"ARST","America/Argentina/Cordoba":"ARST","America/Argentina/Jujuy":"ARST","America/Argentina/La_Rioja":"ARST","America/Argentina/Mendoza":"ARST","America/Argentina/Rio_Gallegos":"ARST","America/Argentina/San_Juan":"ARST","America/Argentina/San_Luis":"ART","America/Argentina/Tucuman":"ARST","America/Argentina/Ushuaia":"ARST","America/Aruba":"AST","America/Asuncion":"PYST","America/Atikokan":"ET","America/Bahia":"BRT","America/Barbados":"AST","America/Belem":"BRT","America/Belize":"CST","America/Blanc-Sablon":"AST","America/Boa_Vista":"AMT","America/Bogota":"COST","America/Boise":"MST","America/Cambridge_Bay":"MST","America/Campo_Grande":"AMST","America/Cancun":"CST","America/Caracas":"VET","America/Cayenne":"GFT","America/Cayman":"ET","America/Chicago":"CT","America/Chihuahua":"MST","America/Costa_Rica":"CST","America/Cuiaba":"AMST","America/Curacao":"AST","America/Danmarkshavn":"GMT","America/Dawson":"PST","America/Dawson_Creek":"MST","America/Denver":"MT","America/Detroit":"ET","America/Dominica":"AST","America/Edmonton":"MST","America/Eirunepe":"ACT","America/El_Salvador":"CST","America/Fortaleza":"BRT","America/Glace_Bay":"AST","America/Godthab":"WGST","America/Goose_Bay":"AST","America/Grand_Turk":"ET","America/Grenada":"AST","America/Guadeloupe":"AST","America/Guatemala":"CST","America/Guayaquil":"ECT","America/Guyana":"GYT","America/Halifax":"AST","America/Havana":"CST","America/Hermosillo":"MST","America/Indiana/Indianapolis":"ET","America/Indiana/Knox":"CT","America/Indiana/Marengo":"ET","America/Indiana/Petersburg":"ET","America/Indiana/Tell_City":"CT","America/Indiana/Vevay":"ET","America/Indiana/Vincennes":"ET","America/Indiana/Winamac":"ET","America/Inuvik":"MST","America/Iqaluit":"ET","America/Jamaica":"ET","America/Juneau":"AKST","America/Kentucky/Louisville":"ET","America/Kentucky/Monticello":"ET","America/La_Paz":"BOT","America/Lima":"PEST","America/Los_Angeles":"PT","America/Maceio":"BRT","America/Managua":"CST","America/Manaus":"AMT","America/Martinique":"AST","America/Mazatlan":"MST","America/Menominee":"CST","America/Merida":"CST","America/Mexico_City":"CST","America/Miquelon":"PMST","America/Moncton":"AST","America/Monterrey":"CST","America/Montevideo":"UYST","America/Montreal":"ET","America/Montserrat":"AST","America/Nassau":"ET","America/New_York":"ET","America/Nipigon":"ET","America/Nome":"AKST","America/Noronha":"FNT","America/North_Dakota/Center":"CT","America/North_Dakota/New_Salem":"CT","America/Panama":"ET","America/Pangnirtung":"ET","America/Paramaribo":"SRT","America/Phoenix":"MT","America/Port_of_Spain":"AST","America/Port-au-Prince":"ET","America/Porto_Velho":"AMT","America/Puerto_Rico":"AT","America/Rainy_River":"CST","America/Rankin_Inlet":"CST","America/Recife":"BRT","America/Regina":"CST","America/Resolute":"ET","America/Rio_Branco":"ACT","America/Santiago":"CLST","America/Santo_Domingo":"AST","America/Sao_Paulo":"BRST","America/Scoresbysund":"EGST","America/St_Johns":"NST","America/St_Kitts":"AST","America/St_Lucia":"AST","America/St_Thomas":"AT","America/St_Vincent":"AST","America/Swift_Current":"CST","America/Tegucigalpa":"CST","America/Thule":"AST","America/Thunder_Bay":"ET","America/Tijuana":"PST","America/Toronto":"ET","America/Tortola":"AST","America/Vancouver":"PST","America/Whitehorse":"PST","America/Winnipeg":"CST","America/Yakutat":"AKST","America/Yellowknife":"MST","Antarctica/Casey":"WST","Antarctica/Davis":"DAVT","Antarctica/DumontDUrville":"DDUT","Antarctica/Mawson":"MAWT","Antarctica/McMurdo":"NZST","Antarctica/Palmer":"CLST","Antarctica/Rothera":"ROTT","Antarctica/Syowa":"SYOT","Antarctica/Vostok":"VOST","Asia/Aden":"AST","Asia/Almaty":"ALMT","Asia/Amman":"EEST","Asia/Anadyr":"ANAST","Asia/Aqtau":"AQTT","Asia/Aqtobe":"AQTT","Asia/Ashgabat":"TMT","Asia/Baghdad":"AST","Asia/Bahrain":"AST","Asia/Baku":"AZST","Asia/Bangkok":"ICT","Asia/Beirut":"EEST","Asia/Bishkek":"KGT","Asia/Brunei":"BNT","Asia/Choibalsan":"CHOST","Asia/Chongqing":"CST","Asia/Colombo":"IST","Asia/Damascus":"EEST","Asia/Dhaka":"BDT","Asia/Dili":"TLT","Asia/Dubai":"GST","Asia/Dushanbe":"TJT","Asia/Gaza":"EEST","Asia/Harbin":"CST","Asia/Ho_Chi_Minh":"ICT","Asia/Hong_Kong":"HKST","Asia/Hovd":"HOVST","Asia/Irkutsk":"IRKST","Asia/Jakarta":"WIT","Asia/Jayapura":"EIT","Asia/Jerusalem":"IST","Asia/Kabul":"AFT","Asia/Kamchatka":"PETST","Asia/Karachi":"PKST","Asia/Kashgar":"CST","Asia/Katmandu":"NPT","Asia/Kolkata":"IST","Asia/Krasnoyarsk":"KRAST","Asia/Kuala_Lumpur":"MYT","Asia/Kuching":"MYT","Asia/Kuwait":"AST","Asia/Macau":"CST","Asia/Magadan":"MAGST","Asia/Makassar":"CIT","Asia/Manila":"PHST","Asia/Muscat":"GST","Asia/Nicosia":"EEST","Asia/Novosibirsk":"NOVST","Asia/Omsk":"OMSST","Asia/Oral":"ORAT","Asia/Phnom_Penh":"ICT","Asia/Pontianak":"WIT","Asia/Pyongyang":"KST","Asia/Qatar":"AST","Asia/Qyzylorda":"QYZT","Asia/Rangoon":"MMT","Asia/Riyadh":"AST","Asia/Sakhalin":"SAKST","Asia/Samarkand":"UZT","Asia/Seoul":"KST","Asia/Shanghai":"CST","Asia/Singapore":"SGT","Asia/Taipei":"CST","Asia/Tashkent":"UZT","Asia/Tbilisi":"GET","Asia/Tehran":"IRST","Asia/Thimphu":"BTT","Asia/Tokyo":"JST","Asia/Ulaanbaatar":"ULAST","Asia/Urumqi":"CST","Asia/Vientiane":"ICT","Asia/Vladivostok":"VLAST","Asia/Yakutsk":"YAKST","Asia/Yekaterinburg":"YEKST","Asia/Yerevan":"AMST","Atlantic/Azores":"AZOST","Atlantic/Bermuda":"AST","Atlantic/Canary":"WEST","Atlantic/Cape_Verde":"CVT","Atlantic/Faroe":"WEST","Atlantic/Madeira":"WEST","Atlantic/Reykjavik":"GMT","Atlantic/South_Georgia":"GST","Atlantic/St_Helena":"GMT","Atlantic/Stanley":"FKST","Australia/Adelaide":"CST","Australia/Brisbane":"ET","Australia/Broken_Hill":"CST","Australia/Currie":"ET","Australia/Darwin":"CST","Australia/Eucla":"CWST","Australia/Hobart":"ET","Australia/Lindeman":"ET","Australia/Lord_Howe":"LHST","Australia/Melbourne":"ET","Australia/Perth":"WST","Australia/Sydney":"ET",CET:"CEST",CST6CDT:"CST",EET:"EEST",ET:"ET",EST5EDT:"ET","Etc/GMT":"GMT","Etc/UCT":"UCT","Etc/UTC":"UTC","Europe/Amsterdam":"CEST","Europe/Andorra":"CEST","Europe/Athens":"EEST","Europe/Belgrade":"CEST","Europe/Berlin":"CEST","Europe/Brussels":"CEST","Europe/Bucharest":"EEST","Europe/Budapest":"CEST","Europe/Chisinau":"EEST","Europe/Copenhagen":"CEST","Europe/Dublin":"GMT/IST","Europe/Gibraltar":"CEST","Europe/Helsinki":"EEST","Europe/Istanbul":"EEST","Europe/Kaliningrad":"EEST","Europe/Kiev":"EEST","Europe/Lisbon":"WEST","Europe/London":"GMT/BST","Europe/Luxembourg":"CEST","Europe/Madrid":"CEST","Europe/Malta":"CEST","Europe/Minsk":"EEST","Europe/Monaco":"CEST","Europe/Moscow":"MSK/MSD","Europe/Oslo":"CEST","Europe/Paris":"CEST","Europe/Prague":"CEST","Europe/Riga":"EEST","Europe/Rome":"CEST","Europe/Samara":"SAMST","Europe/Simferopol":"EEST","Europe/Sofia":"EEST","Europe/Stockholm":"CEST","Europe/Tallinn":"EEST","Europe/Tirane":"CEST","Europe/Uzhgorod":"EEST","Europe/Vaduz":"CEST","Europe/Vienna":"CEST","Europe/Vilnius":"EEST","Europe/Volgograd":"VOLST","Europe/Warsaw":"CEST","Europe/Zaporozhye":"EEST","Europe/Zurich":"CEST",HST:"HST","Indian/Antananarivo":"EAT","Indian/Chagos":"IOT","Indian/Christmas":"CXT","Indian/Cocos":"CCT","Indian/Comoro":"EAT","Indian/Kerguelen":"TFT","Indian/Mahe":"SCT","Indian/Maldives":"MVT","Indian/Mauritius":"MUT","Indian/Mayotte":"EAT","Indian/Reunion":"RET",MET:"MEST",MST:"MST",MST7MDT:"MST","Pacific/Apia":"WST","Pacific/Auckland":"NZST","Pacific/Chatham":"CHAST","Pacific/Easter":"EASST","Pacific/Efate":"VUST","Pacific/Enderbury":"PHOT","Pacific/Fakaofo":"TKT","Pacific/Fiji":"FJST","Pacific/Funafuti":"TVT","Pacific/Galapagos":"GALT","Pacific/Gambier":"GAMT","Pacific/Guadalcanal":"SBT","Pacific/Guam":"ChST","Pacific/Honolulu":"HST","Pacific/Johnston":"HST","Pacific/Kiritimati":"LINT","Pacific/Kosrae":"KOST","Pacific/Kwajalein":"MHT","Pacific/Majuro":"MHT","Pacific/Marquesas":"MART","Pacific/Midway":"SST","Pacific/Nauru":"NRT","Pacific/Niue":"NUT","Pacific/Norfolk":"NFT","Pacific/Noumea":"NCST","Pacific/Pago_Pago":"SST","Pacific/Palau":"PWT","Pacific/Pitcairn":"PST","Pacific/Ponape":"PONT","Pacific/Port_Moresby":"PGT","Pacific/Rarotonga":"CKST","Pacific/Saipan":"ChST","Pacific/Tahiti":"TAHT","Pacific/Tarawa":"GILT","Pacific/Tongatapu":"TOST","Pacific/Truk":"TRUT","Pacific/Wake":"WAKT","Pacific/Wallis":"WFT",PST8PDT:"PST",WET:"WEST","Etc/GMT+9":"GMT+9","Asia/Riyadh87":"zzz","Asia/Riyadh88":"zzz","Asia/Riyadh89":"zzz","Etc/GMT+4":"GMT+4","Etc/GMT-10":"GMT-10","Etc/GMT-4":"GMT-4","Etc/GMT+1":"GMT+1","Etc/GMT-1":"GMT-1","Etc/GMT-11":"GMT-11","Etc/GMT+6":"GMT+6","Etc/GMT+12":"GMT+12","Etc/GMT-2":"GMT-2","Etc/GMT+3":"GMT+3","Etc/GMT+5":"GMT+5","Etc/GMT-5":"GMT-5","Etc/GMT+10":"GMT+10","Etc/GMT+2":"GMT+2","Etc/GMT+7":"GMT+7","Etc/GMT-6":"GMT-6","Etc/GMT-12":"GMT-12","Etc/GMT-7":"GMT-7","Etc/GMT+8":"GMT+8","Etc/GMT-3":"GMT-3","Etc/GMT+11":"GMT+11","Etc/GMT-13":"GMT-13","Etc/GMT-14":"GMT-14","Etc/GMT-8":"GMT-8","Etc/GMT-9":"GMT-9"};typeof exports!="undefined"?exports.jstz=t:n.jstz=t}(this),function(){function u(n){this._n=n}function f(n,t,i){var u=Math.pow(10,t),r,f;return r=(Math.round(n*u)/u).toFixed(t),i&&(f=new RegExp("0{1,"+i+"}$"),r=r.replace(f,"")),r}function e(n,t){return t.indexOf("$")>-1?s(n,t):t.indexOf("%")>-1?h(n,t):t.indexOf(":")>-1?c(n,t):a(n,t)}function o(i,u){var f,o;if(u.indexOf(":")>-1)i._n=l(u);else if(u===r)i._n=0;else{f=u;n[t].delimiters.decimal!=="."&&(u=u.replace(/\./g,"").replace(n[t].delimiters.decimal,"."));var h=new RegExp(n[t].abbreviations.thousand+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),c=new RegExp(n[t].abbreviations.million+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),a=new RegExp(n[t].abbreviations.billion+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),v=new RegExp(n[t].abbreviations.trillion+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),s=["KB","MB","GB","TB","PB","EB","ZB","YB"],e=!1;for(o=0;o<=s.length;o++)if(e=u.indexOf(s[o])>-1?Math.pow(1024,o+1):!1,e)break;i._n=(e?e:1)*(f.match(h)?Math.pow(10,3):1)*(f.match(c)?Math.pow(10,6):1)*(f.match(a)?Math.pow(10,9):1)*(f.match(v)?Math.pow(10,12):1)*(u.indexOf("%")>-1?.01:1)*Number((u.indexOf("(")>-1?"-":"")+u.replace(/[^0-9\.'-]+/g,""));i._n=e?Math.ceil(i._n):i._n}return i._n}function s(i,r){var o=r.indexOf("$")<=1?!0:!1,f="",u;return r.indexOf(" $")>-1?(f=" ",r=r.replace(" $","")):r.indexOf("$ ")>-1?(f=" ",r=r.replace("$ ","")):r=r.replace("$",""),u=e(i,r),o?u.indexOf("(")>-1||u.indexOf("-")>-1?(u=u.split(""),u.splice(1,0,n[t].currency.symbol+f),u=u.join("")):u=n[t].currency.symbol+f+u:u.indexOf(")")>-1?(u=u.split(""),u.splice(-1,0,f+n[t].currency.symbol),u=u.join("")):u=u+f+n[t].currency.symbol,u}function h(n,t){var r="",i;return t.indexOf(" %")>-1?(r=" ",t=t.replace(" %","")):t=t.replace("%",""),n._n=n._n*100,i=e(n,t),i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,r+"%"),i=i.join("")):i=i+r+"%",i}function c(n){var i=Math.floor(n._n/3600),t=Math.floor((n._n-i*3600)/60),r=Math.round(n._n-i*3600-t*60);return i+":"+(t<10?"0"+t:t)+":"+(r<10?"0"+r:r)}function l(n){var t=n.split(":"),i=0;return t.length===3?(i+=Number(t[0])*3600,i+=Number(t[1])*60,i+=Number(t[2])):t.lenght===2&&(i+=Number(t[0])*60,i+=Number(t[1])),Number(i)}function a(i,u){var a=!1,k=!1,h="",v="",y="",c=Math.abs(i._n),b,p,d,l;if(i._n===0&&r!==null)return r;if(u.indexOf("(")>-1&&(a=!0,u=u.slice(1,-1)),u.indexOf("a")>-1&&(u.indexOf(" a")>-1?(h=" ",u=u.replace(" a","")):u=u.replace("a",""),c>=Math.pow(10,12)?(h+=n[t].abbreviations.tillion,i._n=i._n/Math.pow(10,12)):c<Math.pow(10,12)&&c>=Math.pow(10,9)?(h+=n[t].abbreviations.billion,i._n=i._n/Math.pow(10,9)):c<Math.pow(10,9)&&c>=Math.pow(10,6)?(h+=n[t].abbreviations.million,i._n=i._n/Math.pow(10,6)):c<Math.pow(10,6)&&c>=Math.pow(10,3)&&(h+=n[t].abbreviations.thousand,i._n=i._n/Math.pow(10,3))),u.indexOf("b")>-1)for(u.indexOf(" b")>-1?(v=" ",u=u.replace(" b","")):u=u.replace("b",""),b=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l=0;l<=b.length;l++)if(p=Math.pow(1024,l),d=Math.pow(1024,l+1),i._n>=p&&i._n<d){v+=b[l];p>0&&(i._n=i._n/p);break}u.indexOf("o")>-1&&(u.indexOf(" o")>-1?(y=" ",u=u.replace(" o","")):u=u.replace("o",""),y+=n[t].ordinal(i._n));u.indexOf("[.]")>-1&&(k=!0,u=u.replace("[.]","."));var o=i._n.toString().split(".")[0],e=u.split(".")[1],g=u.indexOf(","),s="",w=!1;return e?(e.indexOf("[")>-1?(e=e.replace("]",""),e=e.split("["),s=f(i._n,e[0].length+e[1].length,e[1].length)):s=f(i._n,e.length),o=s.split(".")[0],s=s.split(".")[1].length?n[t].delimiters.decimal+s.split(".")[1]:"",k&&Number(s)===0&&(s="")):o=f(i._n,null),o.indexOf("-")>-1&&(o=o.slice(1),w=!0),g>-1&&(o=o.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n[t].delimiters.thousands)),u.indexOf(".")===0&&(o=""),(a&&w?"(":"")+(!a&&w?"-":"")+o+s+(y?y:"")+(h?h:"")+(v?v:"")+(a&&w?")":"")}function v(t,i){n[t]=i}var i,n={},t="en",r=null,y=typeof module!="undefined"&&module.exports;i=function(n){return i.isNumeral(n)?n=n.value():Number(n)||(n=0),new u(Number(n))};i.version="1.4.5";i.isNumeral=function(n){return n instanceof u};i.language=function(r,u){return r?(r&&!u&&(t=r),(u||!n[r])&&v(r,u),i):t};i.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(n){var t=n%10;return~~(n%100/10)==1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"},currency:{symbol:"$"}});i.zeroFormat=function(n){r=typeof n=="string"?n:null};i.fn=u.prototype={clone:function(){return i(this)},format:function(n){return e(this,n?n:i.defaultFormat)},unformat:function(n){return o(this,n?n:i.defaultFormat)},value:function(){return this._n},valueOf:function(){return this._n},set:function(n){return this._n=Number(n),this},add:function(n){return this._n=this._n+Number(n),this},subtract:function(n){return this._n=this._n-Number(n),this},multiply:function(n){return this._n=this._n*Number(n),this},divide:function(n){return this._n=this._n/Number(n),this},difference:function(n){var t=this._n-Number(n);return t<0&&(t=-t),t}};y&&(module.exports=i);typeof ender=="undefined"&&(this.numeral=i);typeof define=="function"&&define.amd&&define([],function(){return i})}.call(this);ngp=ngp||{};typeof btoa=="undefined"&&typeof Base64!="undefined"&&(_keyStr=Base64._keyStr,btoa=Base64.encode,atob=Base64.decode);ngp.extend=function(n,t){for(var r=n.split("."),f=r[0]=="ngp"?1:0,i=ngp,u=f;u<r.length;u++)i[r[u]]=i[r[u]]||{},i=i[r[u]];return typeof t!="undefined"&&$.extend(i,t),i};String.prototype.capitalize=function(){return this.replace(/(^|\s)([a-z])/g,function(n,t,i){return t+i.toUpperCase()})};String.prototype.formatContactName=function(){return this.trim().replace(/\s{2,}/g," ").capitalize()};String.prototype.removeSpecialChars=function(){return this.replace(/[^\w\s]/g,"")};String.prototype.splitContactName=function(){return this.removeSpecialChars().split(" ")};String.prototype.rtrim=function(){return this.replace(/\s\s*$/,"")};String.prototype.ltrim=function(){return this.replace(/^\s\s*/,"")};String.prototype.startsWith=function(n){var t=n.length;return this.length<t?!1:this.substr(0,t)==n};String.prototype.endsWith||(String.prototype.endsWith=function(n,t){var i=this.toString(),r;return(typeof t!="number"||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=n.length,r=i.indexOf(n,t),r!==-1&&r===t});String.prototype.trim=function(){return this.ltrim().rtrim()};String.prototype.stripTags=function(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")};String.prototype.escapeHTML=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.unescapeHTML=function(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};String.prototype.hashCode=function(){var n=0,t,i;if(this.length==0)return n;for(t=0;t<this.length;t++)i=this.charCodeAt(t),n=(n<<5)-n+i,n=n&n;return n};String.prototype.linesplit=function(){return $.map($.map(this.split("\r"),function(n){return n.split("\n")}),function(n){return n==""?null:n})};String.prototype.isTextInputType=function(){var n=this;return Constants.Html.TextFieldTypes.contains(function(t){return t==n})};Array.prototype.remove=function(n){for(var r=[],u=[],t,i;this.length>0;)t=this.pop(),n(t)?u.push(t):r.push(t);for(i=0;i<r.length;i++)this.push(r[i]);return u};Array.prototype.contains=function(n){for(var t=0;t<this.length;t++)if(n(this[t]))return!0;return!1};Array.indexOf||(Array.prototype.indexOf=function(n){for(var t=0;t<this.length;t++)if(this[t]==n)return t;return-1});Array.prototype.where=function(n){for(var i=[],t=0;t<this.length;t++)n(this[t])&&i.push(this[t]);return i};Array.prototype.swap=function(n,t){var i=this[n];this[n]=this[t];this[t]=i};Array.prototype.sort||(Array.prototype.sort=function(n){for(var r,i=[],t=0;t<this.length;t++)r=this.where(n(t)),i.push(r);return i});Array.prototype.toCSV=function(){var t=this.length,i="",n;if(t>0){for(n=0;n<t-1;n++)i+=this[n]+",";i+=this[t-1]}return i};Array.prototype.toCharDelimited=function(n){var i=this.length,r="",t;if(i>0){for(t=0;t<i-1;t++)r+=this[t]+n;r+=this[i-1]}return r};String.prototype.format=function(){var n=arguments.length==1&&arguments[0]instanceof Array?arguments[0]:arguments;return this.replace(/\{\d+\}/g,function(t){return n[t.match(/\d+/)]})};String.prototype.formatWithData=function(n,t){return this.replace(/\{\d+\}/g,function(i){var r=t[n[i.match(/\d+/)]];return r&&typeof r!="function"&&typeof r!="object"?r:""})};String.prototype.hasToken=function(){return/\{\d+\}/g.test(this)};String.prototype.CleanDate=function(){var n=this;return n.replace(new RegExp("/(\\d{2})$",""),function(n,t){return t.match(new RegExp("^[01234]{1}",""))?"/20"+t:"/19"+t})};String.prototype.ToDate=function(){var n=/\\?\/Date\((-?\d+)\)\\?\//.exec(this),t=new Date,i;return n!=null&&(i=parseInt(n[1]),t.setTime(i)),t};String.prototype.matchSubstrings=function(n){var t=this.trim().split(" ");return t.where(function(t){if(t.match(n))return t})};Date.prototype.ToShortDateString=function(){var n=this.getMonth()+1,t=this.getDate(),i=this.getFullYear();return n<10&&(n="0"+n),t<10&&(t="0"+t),n+"/"+t+"/"+i};Date.prototype.ToShortDateTimeString=function(n){var f="AM",t=this.getHours(),i=this.getSeconds(),r=this.getMinutes(),u;return r<10&&(r="0"+r),i<10&&(i="0"+i),!n&&t>12&&(f="PM",t=t-12),t<10&&(t="0"+t),u=t+":"+r+":"+i,n||(u+=" "+f),this.ToShortDateString()+" "+u};String.prototype.ToDotNetSerializedDate=function(){var n=Date.parse(this);return'"\\/Date('+n+')\\/"'};String.prototype.IsDate=function(){try{var n=Date.parse(this);return!0}catch(t){return!1}};var Constants={NewIdentifier:-99,NewIdentifierString:"New",EmptySelectValue:-98,ChangeState:{Unmodified:0,New:1,Deleted:2,Modified:3},ResponseResultCode:{Failure:0,Success:1},MessageType:{Error:0,Success:1,Attention:2,None:3},EscKeyCode:27,Html:{TextFieldTypes:["color","date","datetime","datetime-local","email","file","month","number","password","search","tel","text","time","url","week"]},SocialNetworkType:{None:0,Facebook:1,Twitter:2}},AdminMessages={NewDesignationNamePlaceholder:"NEW DESIGNATION"},debug=!1;window.hasFocusedForm=!1;window.ngp||(ngp={});ngp.ui||(ngp.ui={});var Contact={},Disbursement={},Contribution={},Pledge={},CustomField={},ActiveDialogs=[];var IEHacks=$.browser.msie&&parseInt($.browser.version)<=7?{applyMaxWidth:function(n,t){var i=parseInt(t),r=!0;if(isNaN(t)){if(t.indexOf("%")==-1)return!1;i=parseInt(t.split("%")[0]);r=!1}r?$(n).each(function(){var n=$(this);n.width(Math.min(n.width(),i))}):$(n).each(function(){var n=$(this);n.width()>i/100*n.parent().width()&&n.width(i+"%")})}}:null,IE8VisibilityFilter=function(){return!(this.style.display&&this.style.display.toLowerCase()=="none")},isRunningAjax=!1;$(document).ajaxStop(function(){isRunningAjax=!1});$(document).ajaxStart(function(){isRunningAjax=!0});runningAjaxRequests=[];ngpJQueryExtensions={ngpDatePicker:function(){var t=arguments,n={changeMonth:!0,changeYear:!0,showButtonPanel:!0,showOn:"button",buttonImage:"/Content/Ngp/Images/calendar.png",buttonImageOnly:!0,buttonText:"Select a date.",onSelect:function(){$(this).focus();$(this).trigger("keyup");$(this).trigger("change")}};$(this).each(function(){var u,i,r;n.disabled=this.disabled||this.readOnly;$(this).data("datepicker")||($(this).datepicker(n),this.form&&(u=$.data(this.form,"validator"),u&&(i=$(this).rules(),i.xVal_dateRange&&$.extend(n,{minDate:i.xVal_dateRange[0],maxDate:i.xVal_dateRange[1]}))));n.disabled||$(this).datepicker("enable");t.length>0&&t.length===1&&(r=t[0],(typeof r=="string"||typeof r=="object")&&$(this).datepicker(r));$(this).next("img.ui-datepicker-trigger").first().each(function(){this.title=n.disabled?"Date field is disabled.":"Select a date."})})},ngpDeleteDialog:function(n){var i=$(this),r=i.not("script"),t=i.filter("script"),u=n.close;n.width=450;n.minWidth=450;n.modal=!0;n.close=function(n,i){destroyCurrentDialog.call(this,n,i);t.remove();u&&u()};n.dialogClass="deleteDialogWrapper";r.dialog(n);t.length>0&&t.appendTo("body");r.dialog("open")},ngpAjaxDelegate:{ajaxComplete:null},ngpAjax:function(n){var t,u,i,r;if(!n.data&&n.type.toUpperCase()=="POST"||(typeof n.progressIndicator=="object"&&showSavingIndicator(n.progressIndicator.buttonElement,n.progressIndicator.indicatorText),t={name:"cache_buster",value:(new Date).getTime()},n.data==null?n.data=[t]:$.isArray(n.data)?n.data.push(t):n.data[t.name]=t.value,runningAjaxRequests.contains(function(t){return DoAjaxRequestsMatch(n,t)})))return!1;runningAjaxRequests.push(n);u=function(){runningAjaxRequests.remove(function(t){var i=t.url.split("?",1)[0],r=n.url.split("?",1)[0];return i==r})};n.complete=function(n,t,i){u();ngpJQueryExtensions.ngpAjaxDelegate.ajaxComplete&&ngpJQueryExtensions.ngpAjaxDelegate.ajaxComplete.call(this,n,t,i)};i=n.error;n.error=function(t,r,f){u();t.status>0&&(typeof n.showErrors=="undefined"||n.showErrors)&&createErrorDialog();i&&i!=null&&i(t,r,f);$(".progress-container").hide()};r=n.success;n.success=function(n,t){var u,i,f;if(clearSavingIndicator(),n&&n.errors&&n.errors!=null)for(u=0;u<n.errors.length;u++)if(i=n.errors[u],i.Properties&&i.Properties!=null)for(j=0;j<i.Properties.length;j++)f=i.Properties[j],f==errorPropertyPermissionsViolation&&showMessage(i.Text,"error");r&&r!=null&&r(n,t)};n.traditional=!0;$.ajax(n)}};sessionExpiration=function(n,t,i,r,u,f){function c(){$.ngpAjax({url:"/Security/KeepConnectionAlive/",type:"Get",dataType:"json"})}function l(){$("#timeoutWarningTemplate").dialog({width:450,draggable:!1,resizable:!1,minHeight:61,title:r,modal:!0,close:c,dialogClass:"warningDialogWrapper"})}$("#warningMessage").html(i);var e=function(){l()},o=function(){ngp.dirtyForm.jumpToPage(f)},s=setTimeout(e,n),h=setTimeout(o,t);this.ajaxComplete=function(){clearTimeout(s);clearTimeout(h);h=setTimeout(o,t);s=setTimeout(e,n)};ngpJQueryExtensions.ngpAjaxDelegate=this};$.extend($.fn,{ngpDatePicker:ngpJQueryExtensions.ngpDatePicker,ngpDeleteDialog:ngpJQueryExtensions.ngpDeleteDialog});$.extend({ngpAjax:ngpJQueryExtensions.ngpAjax}),function(n){n.ui&&n.fn.extend(n.ui.dialog.prototype,{redraw:function(){this.options.height=="auto"&&(this.uiDialog.height("auto"),this.element.height("auto"));this.shadow&&this.shadow.height(this.uiDialog.height()+6);resetDialogHeight(this.element)},ngpHide:function(){this.uiDialog.hide().trigger("dialogbeforeclose")},ngpShow:function(){this.overlay&&this.overlay.$el.show();this.uiDialog.show();resetDialogHeight(this.uiDialog);var n=this.uiDialog.data("FeedBack");n&&n.On&&n.Response.DisplayMessageType==Constants.MessageType.Error&&FeedBack.update(n.Response)}})}(jQuery);Html={};Html.DropDownList=function(n,t,i,r){var u="<select ",f;return n&&(u+="name = '"+n+"' id = '"+n+"' "),t&&(u+="title = '"+t+"' "),i&&(u+="class = '"+i+"'"),u+=">",f=!1,$.each(r,function(){f=this.Selected?"selected = 'selected '":"";u+="<option "+f+"value = '"+this.Value+"'>"+this.Text+"<\/option>"}),u+="<\/select>"};ChangeDesignation={};ChangeDesignation.Options={};ChangeDesignation.GetChangeDesignationDialog=function(){ChangeDesignation.Options.width=600;ChangeDesignation.Options.minWidth=600;ChangeDesignation.Options.dialogClass="changeDesignationDialogWrapper";$.ngpAjax({url:ChangeDesignation.Options.url,success:getCommonDialogRenderer(ChangeDesignation.Options),type:"GET",dataType:"html"})};typeof jQuery.fn.jQueryHide=="undefined"&&(jQuery.fn.jQueryHide=jQuery.fn.hide);jQuery.fn.hide=function(n,t){var i=this;return i.length&&$(document).trigger("containerhidden",i),jQuery.fn.jQueryHide.call(i,n,t)};typeof jQuery.fn.jQueryShow=="undefined"&&(jQuery.fn.jQueryShow=jQuery.fn.show);jQuery.fn.show=function(n,t){var i=this;return i.length&&$(document).trigger("containershown",i),jQuery.fn.jQueryShow.call(i,n,t)};ngp.modalDialog={getActiveDialog:function(){return $("div.ui-dialog-content:visible").last()},open:function(n,t,i){var r={success:getCommonDialogRenderer(t),dataType:"html",type:"GET"};typeof n=="object"?$.extend(!0,r,n):(r.url=n,i&&(r.data=i));$.ngpAjax(r)},close:function(n,t){var f=null;n&&("preventDefault"in n?(n.preventDefault(),f=$(this)):f=$(n));var u=$("div.ui-dialog-content:visible").last(),r=$("form",u),e=!0,i=ngp.dirtyForm,o="Are you sure you want to navigate away from this page?\n\n"+i.message+"\n\n";u.children(".ac_results:visible").hide();r.length>0&&(i.activeFormId=r.data(i.formSettings.idSelector),i.check(r.data(i.formSettings.idSelector))&&(confirm(o)?i.removeForm(r.get(0)):e=!1));e&&u.dialog("close");i.activeFormId=-1;typeof t=="function"&&t()}};adjustGridHeightInModal=function(){var i=$(window).height(),n=$(".ui-dialog:visible"),t=$(".bDiv",n),r;t.length>0&&n.height()>i&&(r=n.height()-t.height(),t.height(i-r).css("overflow-y","auto"))};ngp.FormPage={EditRecord:function(n,t){window.location=t},DeleteRecord:function(n,t,i){typeof n=="string"&&(i=t,t=n);$.ngpAjax({url:t,data:{},success:function(n){$(n).ngpDeleteDialog({title:i})},error:null,dataType:"html",type:"GET"})}};$(document).ready(function(){$(".hasDatePicker").ngpDatePicker&&$(".hasDatePicker").ngpDatePicker();$(".hasCurrencyPicker").ngpCurrencyPicker&&$(".hasCurrencyPicker").ngpCurrencyPicker();$("div.workspace.search, div.workspace.codeManagement, div#DisclosureHome.workspace, #CommunicationCenterHome").length==0&&$(".workspace :input, table.editTable :input").filter(function(){return $(this).parents("div.pDiv").length==0})}),function(){function i(){if(t)return t;var i=window.ngpvan.translations.culture.currentCulture||"en-US",r=i.indexOf("-")>0?i.split("-")[0]:i,u=n.dateFormats[r]||n.dateFormats.en,f=n.mapTimezoneAbbrev[r]||n.mapTimezoneAbbrev.en,e=n.timeOptions[r]||n.timeOptions.en;return t={dateFormats:u,mapTimezoneAbbrev:f,timeOptions:e}}var n,t;typeof ngpvan=="undefined"?window.ngpvan={localization:{},translations:{},constants:{}}:(typeof window.ngpvan.localization=="undefined"&&(window.ngpvan.localization={}),typeof window.ngpvan.translations=="undefined"&&(window.ngpvan.translations={}),typeof window.ngpvan.constants=="undefined"&&(window.ngpvan.constants={}));n=window.ngpvan.localization;n.timeOptions={en:{showMeridian:!0},fr:{showMeridian:!1}};n.dateFormats={en:{fullDatetime:"MMMM d, yyyy 'at' h:mm a",abbrevDatetime:"MMM d, yyyy h:mm a",numericDatetime:"MM/dd/yy h:mm a",numericDatetimeSecs:"M/d/yyyy 'at' h:mm:ss a",numericDate:"MM/dd/yyyy",numericMonthDayTime:"MM/dd h:mm:ss a",fullMonthDayTime:"MMMM d h:mm a"},fr:{fullDatetime:"d MMMM yyyy H:mm",abbrevDatetime:"d MMMM yyyy H:mm",numericDatetime:"yyyy-MM-dd H:mm",numericDatetimeSecs:"yyyy-MM-dd H:mm:ss",numericDate:"yyyy-MM-dd",numericMonthDayTime:"MM/dd H:mm:ss",fullMonthDayTime:"MMMM d H:mm"}};n.mapTimezoneAbbrev={en:function(n){return n},fr:function(n){return{PT:"HP",PST:"HP",PDT:"HP",MT:"HR",MST:"HR",MDT:"HR",CT:"HC",CST:"HC",CDT:"HC",ET:"HE",EST:"HE",EDT:"HE",AT:"HA",AST:"HA",ADT:"HA",NT:"HT"}[n]||n}};Object.defineProperty(n,"current",{get:i})}(),function(n){ngp.FeedBack={_default:{opacity:.95,showDelay:120,hideDelay:2500,expiresDelay:5e3},_infoTimer:null,_container:{element:null,innerHTML:null,opacity:null,isVisibleOnLoad:!1,markupTemplate:'<div class="alertMsg"><div class="validationIcon"><\/div><p class="validationHeader">'+window.ngpvan.translations.Pages.pleaseCorrectErrors+'<\/p><\/div><div class="close"><a class="dismiss" title="'+window.ngpvan.translations.Pages.closeModal+'" href="#">×<\/a><\/div>'},_dialogId:0,_dialogs:{},CommonMessages:{FormValidationError:window.ngpvan.translations.Pages.pleaseCorrectErrors},options:{},$container:function(){return $container=n(this._container.element)},noHover:!1,addCloseEvent:function(){var t=n(this._container.element);n(".infoMessageContainer a.dismiss",t).unbind("click");n(document).delegate(".infoMessageContainer a.dismiss","click",function(n){n.preventDefault();var t=ngp.FeedBack;t.noHover=!0;t.close()})},clearTimer:function(){ngp.FeedBack._infoTimer==null||clearTimeout(ngp.FeedBack._infoTimer)},close:function(t){t&&t.preventDefault();var i=ngp.FeedBack;i.clearTimer();n(i._container.element).hide();i.reset()},detectMessageType:function(){var t=ngp.FeedBack,n=t.$container();return n.hasClass("error")?Constants.MessageType.Error:n.hasClass("attention")?Constants.MessageType.Attention:Constants.MessageType.Success},formatGenericResponse:function(n){typeof n=="string"&&(n=JSON.decode(n));var t;return t=n.Errors?new FeedBack.responseObject(n.Data||null,n.ResultCode||0,n.Errors&&n.Errors.length>0?0:1,n.MessagesHeader?n.MessagesHeader:n.Errors&&n.Errors.length>0?window.ngpvan.translations.Pages.pleaseCorrectErrors:window.ngpvan.translations.Pages.excitedSuccess,n.Errors||[]):new FeedBack.responseObject(n.Data||null,n.ResultCode||Constants.ResponseResultCode.Success,n.MessageType||n.DisplayMessageType||(n.Messages&&n.Messages.length>0?Constants.MessageType.Error:Constants.MessageType.Success),n.MessagesHeader,n.Messages||[]),t.MessagesHeader||(t.MessagesHeader=t.ResponseResultCode==Constants.ResponseResultCode.Failure?FeedBack.CommonMessages.FormValidationError:window.ngpvan.translations.Pages.excitedSuccess),t},hide:function(){var t=ngp.FeedBack;n(t._container.element).fadeOut(t.options.hideDelay)},initialize:function(){var t=n(".infoMessageContainer");ngp.FeedBack.load(t)},load:function(t,i){var u=ngp.FeedBack,r,f,o;if(u.options=n.extend(u.options||{},u._default,i||{}),r=ngp.FeedBack._container,f=[],t.length===0)t=n("<div><\/div>").css("display","none").addClass("alert").addClass("infoMessageContainer").addClass("error").html(r.markupTemplate),n("body").append(t),r.isVisibleOnLoad=!1;else{o=t.selector.split(",");n.each(o,function(){f.push(n.trim(this)+":visible")});var s=f.join(", "),e=n(s),h=e.length;r.isVisibleOnLoad=h>0}return this.addCloseEvent(),r.isVisibleOnLoad?(t.not(":visible").remove(),t.count>0&&t.not(":first").remove()):t.not(":first").remove(),r.element=r.isVisibleOnLoad&&e.length>0?e.get(0):t.get(0),r.innerHTML=r.element.innerHTML,r.css=t.css("opacity"),t.is("visible")&&t.hide(),r.isVisibleOnLoad&&u.processMessage(u.detectMessageType()),n(r.element)},open:function(){var t=ngp.FeedBack;n(t._container.element).show(100)},processMessage:function(t){var i=ngp.FeedBack,r=n(i._container.element);r.removeClass().addClass("alert").addClass("infoMessageContainer");t==Constants.MessageType.Error||i.options.expiresDelay<=0?i.show(t):i.timer(t)},reset:function(){var t=n(FeedBack._container.element);t.is(":visible")||(t.addClass("alert").addClass("infoMessageContainer").addClass("error").removeClass("attention").removeClass("success").html(t.markupTemplate),n(".validationHeader",t).text(FeedBack.CommonMessages.FormValidationError),FeedBack.addCloseEvent())},response:null,responseObject:function(n,t,i,r,u){this.Data=n||null;this.ResponseResultCode=t;this.DisplayMessageType=i;this.MessagesHeader=r;this.Messages=u||[]},show:function(t){var r=ngp.FeedBack,i=n(r._container.element).unbind("hover");i.is(":visible")||i.show();t==Constants.MessageType.Error?(i.addClass("error"),r.noHover=!0,r._infoTimer&&clearTimeout(r._infoTimer)):(i.addClass(t==Constants.MessageType.Attention?"attention":"success"),i.hover(function(){clearTimeout(ngp.FeedBack._infoTimer)},function(){ngp.FeedBack.noHover===!1&&ngp.FeedBack.processMessage(t)}))},showError:function(n){var t=new this.responseObject(null,0,0,n,[]);FeedBack.update(t)},timer:function(t){FeedBack.clearTimer();var i=ngp.FeedBack,r=n(i._container.element);r.length>0&&i.options.expiresDelay>0&&t!=Constants.MessageType.None&&(i.show(t),i._infoTimer=setTimeout(function(){i.close()},i.options.expiresDelay))},update:function(t,i){var u=ngp.FeedBack,f,s,e,r,o;if(u.clearTimer(),clearSavingIndicator(),f=n(u._container.element),!t&&FeedBack.response&&(t=FeedBack.response),"ResponseResultCode"in t||(t.ResponseResultCode=t.DisplayMessageType==Constants.MessageType.Error?Constants.ResponseResultCode.Failure:Constants.ResponseResultCode.Success),u.options=n.extend(u._default,i||{}),n("ul",f).remove(),!t.MessagesHeader)switch(t.DisplayMessageType){case Constants.MessageType.Error:t.MessagesHeader=FeedBack.CommonMessages.FormValidationError;break;case Constants.MessageType.Attention:t.MessagesHeader=window.ngpvan.translations.Pages.excitedAttention;break;default:t.MessagesHeader=window.ngpvan.translations.Pages.excitedSuccess}s=n(".alertMsg",f);n("p.validationHeader",f).empty().html(t.MessagesHeader);switch(t.DisplayMessageType){case Constants.MessageType.None:return!1;case Constants.MessageType.Error:case Constants.MessageType.Success:if(t.Messages&&t.Messages.length>0){for(e=n("<ul/>"),r=0;r<t.Messages.length;r++)o=typeof t.Messages[r]=="string"?t.Messages[r]:t.Messages[r].Text?t.Messages[r].Text:null,o!==null&&e.append(n("<li><\/li>").html(o));s.append(e)}}u.processMessage(t.DisplayMessageType)},updateHtml:function(n){var t=ngp.FeedBack,i=t.$container();i.removeClass().addClass(n[0].className).html(n.html());t.processMessage(detectMessageType)}};n(document).ready(function(){FeedBack.initialize()})}(jQuery);FeedBack=ngp.FeedBack,function(n){"use strict";typeof ngpVan=="undefined"&&(window.ngpVan={});typeof ngpVan.codeTree=="undefined"&&(ngpVan.codeTree=function(){function wt(n){return f[n]===undefined&&(f[n]=1),f[n]}function bt(n){f[n]=f[n]+1}function y(n,t,i,r){if(i?(r.setAsSelectedCode(n),t=n.selected):(n.selected&&n.setSelected(!1),t?(n.extraClasses="fancytree-selected-but-disabled, fancytree-selected ",n.unselectable=!0,n.render()):(n.extraClasses="",n.unselectable=!1,n.render(),n.setSelected(!1))),n.children)for(var u=0;u<n.children.length;u++)n.children[u].statusNodeType||(r.isForceDescendentSelectEnabled?y(n.children[u],t,!1,r):n.children[u].setSelected(t))}function it(t,i,r,u){var f=wt(i),e={url:u.endpointUrl,type:"POST",dataType:"JSON",contentType:"application/json",processData:!1,data:JSON.stringify({path:"codes/pagedSpecifyParent",context:u.context,pageSize:u.pageSize,pageNumber:f,searchCriteria:"",extraNodeIdsToRetrieve:"",supportedEntityTypes:u.entityTypes,mustApplyToAllProvidedEntityTypes:u.entityTypes&&u.entityTypes.length>0&&u.applyAllEntities,codeType:u.codeType,parentId:i})};n.ajax(e).done(function(n){var f,e;if(u.lastTotalRowCount=n.totalCount?n.totalCount:0,n.totalCount>u.pageSize){for(bt(i),f=r;f.data.parentId!==0;)f=f.data.parent;e={title:"Retrieve additional child codes",tooltip:"",statusNodeType:"paging",icon:"true",parentId:i,parent:f};n.items.push(e)}t.resolve(n.items);r.selected?y(r,!0,!0,u):r.extraClasses&&r.extraClasses.includes("fancytree-selected")?y(r,!0,!1,u):r.data.parent&&(r.data.parent.selected||r.data.parent.extraClasses&&r.data.parent.extraClasses.includes("fancytree-selected"))&&y(r.data.parent,!0,!0,u)})}function kt(i){v=i;v>pt?(a||(n("ul#"+t.selectedNodesIdsElementId).hide(),a=!0),n("div#"+t.treeViewContainerId+" > span.multiple").text(t.multipleSelectedLanguage+" ("+v+")").show()):a&&(n("div#"+t.treeViewContainerId+" > span.multiple").hide(),n("ul#"+t.selectedNodesIdsElementId).show(),a=!1)}function b(){return r.find("li").map(function(){var n=this.id.split("_");return n[n.length-1]}).get()}function p(){var t=h,n=b();n&&(t.val(n.join()),t.change(),n.length!==v&&kt(n.length))}function w(i){var h=t.selectedNodeIdPrefix,f=i.key.split("_"),e=f.length>0?f[f.length-1]:"",u,o,s;e!==""&&(u=h+"_"+e,o="<li id='"+u+"'><span>"+i.title+"<\/span><a class='unselect-node' id='unselectNode-"+u+"'><span class='glyphicons glyphicons-remove'><\/span><\/a><\/li>",i.isSelected()?(s=r.find("li[id='"+u+"']"),s.length||(t.selectMode===1&&r.find("li").remove(),r.append(n(o)))):r.find("#"+u).remove())}function dt(n){var t=" title='"+n.tooltip.replace("<br />"," ")+"'";return"<span class='fancytree-title'"+t+" tabindex = '0' >"+n.title+"<\/span>"}function rt(){return new n.ui.fancytree._FancytreeNodeClass(u,{})}function ut(n,t,i){n.key=i+"_"+t.key;n.title=t.title;n.selected=t.selected}function ft(){r.on("click",".unselect-node",function(r){var u,s;r.stopPropagation();var f=n(this).attr("id"),e=f.split("_"),h=e.length-1,o=i.fancytree("getTree").getNodeByKey(e[h]);o?o.toggleSelected():(u=rt(),s={key:f,title:n(this).find("span").text(),selected:!1},ut(u,s,t.selectedNodeIdPrefix),w(u),p())});r.add(n("div#"+t.treeViewContainerId+" > span.multiple")).click(function(n){c.toggle();e.focus();n.stopPropagation()});g.click(function(n){n.stopPropagation()});n(document).click(function(){c.hide()})}function gt(){c.append(nt)}function ni(){var i=n("#"+t.blockUiElementId);i.remove()}function et(n){n&&_.each(n,function(n){n.setSelected(!0)})}function ot(n){if(n&&n.length>0){var t=i.fancytree("getTree"),r=_.transform(n,function(n,t){n.push(t.toString())});return t.findAll(function(n){return _.contains(r,n.key)})}return[]}function st(n){var u=t.selectedNodeIdPrefix,f=_.pluck(n,"key"),i=ot(f);et(i);var e=_.pluck(i,"key"),o=_.reject(n,function(n){return _.contains(e,n.key.toString())}),r=rt();_.each(o,function(n){ut(r,n,u);w(r)});p()}function ht(n,t){if(n.children&&n.children.length>0)for(var i=n.children.length-1;i>=0;i-=1)ht(n.children[i],t);if(t.isAdded!==!0&&t&&n&&n.key&&(t.parentId&&n.key===""+t.parentId||n.title==="root")){if(!e.val()&&n.title==="root"&&t.parentId)throw"Got to the root node but the parent code ID was not null or 0 for node: "+t.title;n.children||(n.children=[]);n.children.push(t);t.isAdded=!0}}function ti(n){var f,r,t;if(e.val()===""&&u.children&&u.children.length!==0){for(f=i.fancytree("getTree"),r=f.toDict(!0),t=0;t<n.length;t+=1)n[t].isAdded=!1,ht(r,n[t]);u.fromDict(r)}else u.addChildren(n)}function k(i,r,u,f){var e={url:t.endpointUrl,type:"POST",dataType:"JSON",contentType:"application/json",processData:!1,data:JSON.stringify({path:"codes/pagedSpecifyParent",pageSize:t.pageSize,pageNumber:r,searchCriteria:i&&i.length>0?i:"",extraNodeIdsToRetrieve:f,supportedEntityTypes:t.entityTypes,mustApplyToAllProvidedEntityTypes:t.entityTypes&&t.entityTypes.length>0&&t.applyAllEntities,parentId:null})};c.css("display")==="block"&&gt();n.ajax(e).done(function(n){t.lastTotalRowCount=n.totalCount?n.totalCount:0;u(n);ni()})}function ii(){return t.lastTotalRowCount<t.pageSize?!1:!0}function d(n){n&&n.length>0?(ti(n),l=ii(),s+=1):l=!1}function ct(n){s=1;Object.keys(f).forEach(function(n){f[n]=1});t.lastTotalRowCount=0;k(n,s,function(n){u.removeChildren();o.scrollTop(0);d(n.items);st(n.selectedCodes)},b().join())}function lt(n){k(n,s,function(n){d(n.items);et(ot(b()))})}function ri(){var n=e.val();n||(n="");n.trim()===""?ct():ct(n)}function ui(){if(l&&o.scrollTop()+o.innerHeight()>=o[0].scrollHeight){var n=e.val();n===""?lt():n&&lt(n.trim())}}function fi(n){return n===9||n===13||n>=16&&n<=20||n===27||n>=32&&n<=40||n===45||n===46||n>=91&&n<=93||n>=112&&n<=123||n===144||n===145||n===224?!1:!0}function ei(){var f=null;h&&h.length>0&&(f=h.val());r.append(tt);k("",s,function(r){u.removeChildren();d(r.items);i.trigger(t.treeId+".initialLoad",[i.fancytree("getTree")]);var f=n("#"+t.selectedNodesIdsElementId+"-block-markup");f.remove();st(r.selectedCodes)},f)}function oi(){r.click(function(){i.fancytree("getTree").options.select=function(n,t){var r,i;if(t.options.setAsSelectedCode(t.node),r=t.node.isSelected(),t.node.children)for(i=0;i<t.node.children.length;i++)t.node.children[i].setSelected(r);t.options.populateHiddenInputWithSelectedIds()}})}function vt(f){yt=this;f=f||{};t=n.extend(t,f);o=n("#"+t.containerId);i=n("#"+t.treeId);e=n("#"+t.filterBoxId);r=n("#"+t.selectedNodesIdsElementId);h=n("#"+t.selectedNodeIdsForLoadAndPost);c=n("#"+t.treeViewDropdownId);g=n("#"+t.treeViewContainerId);nt="";tt="<div class='loading-bar-wrapper loading-bar-indeterminate' id='"+t.selectedNodesIdsElementId+"-block-markup'><progress><\/progress><div class='loader'><\/div><\/div>";l=!0;i.fancytree(t);u=i.fancytree("getRootNode");o.on("scroll",ui);if(t.initialLoadHandler)i.on(t.treeId+".initialLoad",t.initialLoadHandler);e.keyup(function(n){n.preventDefault();var t=n.which||n.keyCode;fi(t)&&at()});t.initHook();ei()}function si(n){n=n||{};n.selectMode=1;vt(n)}function hi(n){n=n||{};n.selectMode=2;vt(n)}var yt,s=1,f={},o,i,e,u,l,r,h,c,g,nt,tt,a=!1,v=0,pt=9,t={},at;return t={source:[],icon:!1,checkbox:!0,generateIds:!0,idPrefix:"ft_",selectMode:2,pageSize:500,containerId:"treeContainer",treeId:"tree",filterBoxId:"filterBox",selectedNodesIdsElementId:"selectedNodes",selectedNodeIdsForLoadAndPost:"selectedNodeIds",selectedNodeIdPrefix:"selectedNodeValueTag",blockUiElementId:"treeview-dropdown",treeViewContainerId:"treeViewContainer",treeViewDropdownId:"treeViewDropdown",debounceInterval:300,endpointUrl:"/BasicsTab/RetrieveCodesPaged",select:function(n,t){w(t.node);p()},renderTitle:function(n,t){return dt(t.node)},initHook:function(){ft()},setAsSelectedCode:w,populateHiddenInputWithSelectedIds:p,multipleSelectedLanguage:"Multiple Selected",applyAllEntities:!1,lazyLoad:function(i,r){var f=r.node.li.id.split("_").pop(),u=new n.Deferred;r.result=u.promise();it(u,f,r.node,t)},clickPaging:function(i,r){var u=new n.Deferred;r.node.replaceWith(u.promise());it(u,r.node.data.parentId,r.node,t)}},at=_.debounce(ri,t.debounceInterval,{leading:!1,trailing:!0}),{initSingleSelect:si,initMultiSelect:hi,defaultInitHook:ft,setSelectChildren:oi}})}(jQuery),function(n){if(typeof exports=="object"&&typeof module!="undefined")module.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var t;t=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this;t.htmlToText=n()}}(function(){var n;return function t(n,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!n[f]){if(h=typeof require=="function"&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};n[f][0].call(s.exports,function(t){var i=n[f][1][t];return u(i?i:t)},s,s.exports,t,n,i,r)}return i[f].exports}for(var e=typeof require=="function"&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(){},{}],2:[function(n,t){t.exports=typeof Object.create=="function"?function(n,t){n.super_=t;n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:function(n,t){n.super_=t;var i=function(){};i.prototype=t.prototype;n.prototype=new i;n.prototype.constructor=n}},{}],3:[function(n,t){function e(){var i,n,t;if(!f){for(f=!0,n=u.length;n;){for(i=u,u=[],t=-1;++t<n;)i[t]();n=u.length}f=!1}}function r(){}var i=t.exports={},u=[],f=!1;i.nextTick=function(n){u.push(n);f||setTimeout(e,0)};i.title="browser";i.browser=!0;i.env={};i.argv=[];i.version="";i.versions={};i.on=r;i.addListener=r;i.once=r;i.off=r;i.removeListener=r;i.removeAllListeners=r;i.emit=r;i.binding=function(){throw new Error("process.binding is not supported");};i.cwd=function(){return"/"};i.chdir=function(){throw new Error("process.chdir is not supported");};i.umask=function(){return 0}},{}],4:[function(n,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}},{}],5:[function(n,t,i){(function(t,r){function f(n,t){var r={seen:[],stylize:et};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(t)?r.showHidden=t:t&&i._extend(r,t),u(r.showHidden)&&(r.showHidden=!1),u(r.depth)&&(r.depth=2),u(r.colors)&&(r.colors=!1),u(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ft),s(r,n,r.depth)}function ft(n,t){var i=f.styles[t];return i?"\x1b["+f.colors[i][0]+"m"+n+"\x1b["+f.colors[i][1]+"m":n}function et(n){return n}function ot(n){var t={};return n.forEach(function(n){t[n]=!0}),t}function s(n,t,r){var e,y,u,b,d,g,tt;if(n.customInspect&&t&&v(t.inspect)&&t.inspect!==i.inspect&&!(t.constructor&&t.constructor.prototype===t))return e=t.inspect(r,n),c(e)||(e=s(n,e,r)),e;if(y=st(n,t),y)return y;if(u=Object.keys(t),b=ot(u),n.showHidden&&(u=Object.getOwnPropertyNames(t)),a(t)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(t);if(u.length===0){if(v(t))return d=t.name?": "+t.name:"",n.stylize("[Function"+d+"]","special");if(l(t))return n.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return n.stylize(Date.prototype.toString.call(t),"date");if(a(t))return p(t)}var f="",o=!1,h=["{","}"];return(nt(t)&&(o=!0,h=["[","]"]),v(t)&&(g=t.name?": "+t.name:"",f=" [Function"+g+"]"),l(t)&&(f=" "+RegExp.prototype.toString.call(t)),k(t)&&(f=" "+Date.prototype.toUTCString.call(t)),a(t)&&(f=" "+p(t)),u.length===0&&(!o||t.length==0))?h[0]+f+h[1]:r<0?l(t)?n.stylize(RegExp.prototype.toString.call(t),"regexp"):n.stylize("[Object]","special"):(n.seen.push(t),tt=o?ht(n,t,r,b,u):u.map(function(i){return w(n,t,r,b,i,o)}),n.seen.pop(),ct(tt,f,h))}function st(n,t){if(u(t))return n.stylize("undefined","undefined");if(c(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(i,"string")}return tt(t)?n.stylize(""+t,"number"):b(t)?n.stylize(""+t,"boolean"):h(t)?n.stylize("null","null"):void 0}function p(n){return"["+Error.prototype.toString.call(n)+"]"}function ht(n,t,i,r,u){for(var f=[],e=0,o=t.length;e<o;++e)rt(t,String(e))?f.push(w(n,t,i,r,String(e),!0)):f.push("");return u.forEach(function(u){u.match(/^\d+$/)||f.push(w(n,t,i,r,u,!0))}),f}function w(n,t,i,r,f,e){var o,c,l;if(l=Object.getOwnPropertyDescriptor(t,f)||{value:t[f]},l.get?c=l.set?n.stylize("[Getter/Setter]","special"):n.stylize("[Getter]","special"):l.set&&(c=n.stylize("[Setter]","special")),rt(r,f)||(o="["+f+"]"),c||(n.seen.indexOf(l.value)<0?(c=h(i)?s(n,l.value,null):s(n,l.value,i-1),c.indexOf("\n")>-1&&(c=e?c.split("\n").map(function(n){return"  "+n}).join("\n").substr(2):"\n"+c.split("\n").map(function(n){return"   "+n}).join("\n"))):c=n.stylize("[Circular]","special")),u(o)){if(e&&f.match(/^\d+$/))return c;o=JSON.stringify(""+f);o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=n.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=n.stylize(o,"string"))}return o+": "+c}function ct(n,t,i){var r=0,u=n.reduce(function(n,t){return r++,t.indexOf("\n")>=0&&r++,n+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return u>60?i[0]+(t===""?"":t+"\n ")+" "+n.join(",\n  ")+" "+i[1]:i[0]+t+" "+n.join(", ")+" "+i[1]}function nt(n){return Array.isArray(n)}function b(n){return typeof n=="boolean"}function h(n){return n===null}function lt(n){return n==null}function tt(n){return typeof n=="number"}function c(n){return typeof n=="string"}function at(n){return typeof n=="symbol"}function u(n){return n===void 0}function l(n){return e(n)&&d(n)==="[object RegExp]"}function e(n){return typeof n=="object"&&n!==null}function k(n){return e(n)&&d(n)==="[object Date]"}function a(n){return e(n)&&(d(n)==="[object Error]"||n instanceof Error)}function v(n){return typeof n=="function"}function vt(n){return n===null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||typeof n=="symbol"||typeof n=="undefined"}function d(n){return Object.prototype.toString.call(n)}function g(n){return n<10?"0"+n.toString(10):n.toString(10)}function yt(){var n=new Date,t=[g(n.getHours()),g(n.getMinutes()),g(n.getSeconds())].join(":");return[n.getDate(),it[n.getMonth()],t].join(" ")}function rt(n,t){return Object.prototype.hasOwnProperty.call(n,t)}var ut=/%[sdj%]/g,o,y,it;i.format=function(n){var u,t,r;if(!c(n)){for(u=[],t=0;t<arguments.length;t++)u.push(f(arguments[t]));return u.join(" ")}var t=1,i=arguments,o=i.length,s=String(n).replace(ut,function(n){if(n==="%%")return"%";if(t>=o)return n;switch(n){case"%s":return String(i[t++]);case"%d":return Number(i[t++]);case"%j":try{return JSON.stringify(i[t++])}catch(r){return"[Circular]"}default:return n}});for(r=i[t];t<o;r=i[++t])s+=h(r)||!e(r)?" "+r:" "+f(r);return s};i.deprecate=function(n,f){function o(){if(!e){if(t.throwDeprecation)throw new Error(f);else t.traceDeprecation?console.trace(f):console.error(f);e=!0}return n.apply(this,arguments)}if(u(r.process))return function(){return i.deprecate(n,f).apply(this,arguments)};if(t.noDeprecation===!0)return n;var e=!1;return o};o={};i.debuglog=function(n){if(u(y)&&(y=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(y)){var r=t.pid;o[n]=function(){var t=i.format.apply(i,arguments);console.error("%s %d: %s",n,r,t)}}else o[n]=function(){};return o[n]};i.inspect=f;f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};i.isArray=nt;i.isBoolean=b;i.isNull=h;i.isNullOrUndefined=lt;i.isNumber=tt;i.isString=c;i.isSymbol=at;i.isUndefined=u;i.isRegExp=l;i.isObject=e;i.isDate=k;i.isError=a;i.isFunction=v;i.isPrimitive=vt;i.isBuffer=n("./support/isBuffer");it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i.log=function(){console.log("%s - %s",yt(),i.format.apply(i,arguments))};i.inherits=n("inherits");i._extend=function(n,t){if(!t||!e(t))return n;for(var i=Object.keys(t),r=i.length;r--;)n[i[r]]=t[i[r]];return n}}).call(this,n("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":4,_process:3,inherits:2}],6:[function(n,t){t.exports=n("./lib/html-to-text")},{"./lib/html-to-text":9}],7:[function(n,t,i){function o(n,t){var i=t.isInPre?n.raw:u.strip(n.raw);return i=f.decodeHTMLEntities(i),t.isInPre?i:f.wordwrap(n.needsSpace?" "+i:i,t.wordwrap)}function h(n,t){if(t.ignoreImage)return"";var r="",i=n.attribs||{};return i.alt&&(r+=i.alt,i.src&&(r+=" ")),i.src&&(r+="["+i.src+"]"),r}function c(n,t,i){return"\n"+t(n.children,i)}function l(n,t,i){return t(n.children,i)+"\n\n"}function s(n,t,i){return t(n.children,i)+"\n"}function a(n,t,i){var r="",f=u.strip(t(n.children||[],i));return f||(f=""),i.ignoreHref||(n.attribs&&n.attribs.href&&(r=n.attribs.href.replace(/^mailto\:/,"")),r=r.replace(/\s+or\s+'.*?'}}/g,"}}"),f.indexOf("http")>=0&&(f=r.replace(/\s+or\s+'.*?'}}/g,"}}")),r&&(i.linkHrefBaseUrl&&r.indexOf("/")==0&&(r=i.linkHrefBaseUrl+r),i.hideLinkHrefIfSameAsText&&r==f||(f+=" ["+r+"]"))),o({raw:f||r,needsSpace:n.needsSpace},i)}function v(n,t,i){return"\n"+u.repeat("-",i.wordwrap)+"\n\n"}function e(n,t,i,f){f=r.clone(f);f.wordwrap=undefined;var e=i(t.children,f);return e=e.replace(/\n/g,"\n"+u.repeat(" ",n.length)),n+e+"\n"}function y(n,t,i){var u="";return r.each(n.children,function(n){u+=e(" * ",n,t,i)}),u+"\n"}function p(n,t,i){var f="",o;return n.children&&n.children.length&&(o=n.children.length.toString().length,r.each(n.children,function(n,r){var s=r+1,h=o-s.toString().length,c=" "+s+". "+u.repeat(" ",h);f+=e(c,n,t,i)})),f+"\n"}function w(n){var t=r.map(n,function(n){return r.map(n,function(n){return n.length})}),i;return t=f.arrayZip(t),t=r.map(t,function(n){return r.max(n)}),i="",r.each(n,function(n){var f=0;r.each(n,function(n){i+=u.rpad(u.strip(n),t[f++]," ")+"   "});i+="\n"}),i+"\n"}function b(n,t,i){function e(n){if(n.type==="tag"){if(n.name==="thead"||n.name==="tbody"||n.name==="tfoot"){r.each(n.children,e);return}if(n.name==="tr"){var o=[];r.each(n.children,function(n){var u,f;n.type==="tag"&&(n.name==="th"?(u=s(n,t,i).split("\n"),o.push(r.compact(u))):n.name==="td"&&(u=t(n.children,i).split("\n"),o.push(r.compact(u)),n.attribs&&n.attribs.colspan&&(f=n.attribs.colspan-1,r.times(f,function(){o.push([""])}))))});o=f.arrayZip(o);r.each(o,function(n){n=r.map(n,function(n){return n||""});u.push(n)})}}}var u=[];return r.each(n.children,e),w(u)}var r=n("underscore"),u=n("underscore.string"),f=n("./helper");i.text=o;i.image=h;i.lineBreak=c;i.paragraph=l;i.anchor=a;i.heading=s;i.table=b;i.orderedList=p;i.unorderedList=y;i.listItem=e;i.horizontalLine=v},{"./helper":8,underscore:12,"underscore.string":11}],8:[function(n,t,i){var r=n("underscore"),u=n("underscore.string"),f={apos:39,quot:34,amp:38,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};i.decodeHTMLEntities=function(n){return n.replace(/&(.{1,8}?);/g,function(n,t){return String.fromCharCode(t[0]!=="#"?f[t]:t[1]==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10))})};i.wordwrap=function(n,t){var i=u.startsWith(n," ")?" ":"",o=u.words(n),e=i.length,f=[];return r.each(o,function(n){(t||t===0)&&e+n.length>t&&(i+=f.join(" ")+"\n",f.length=e=0);f.push(n);e+=n.length+1}),i+=f.join(" "),u.rstrip(i)};i.arrayZip=function(n){return r.zip.apply(r,n)}},{underscore:12,"underscore.string":11}],9:[function(n,t,i){function s(n,t){var i,u;return t=t||{},f.defaults(t,{wordwrap:80,tables:[],hideLinkHrefIfSameAsText:!1,linkHrefBaseUrl:null}),i=new o.DefaultHandler(function(){},{verbose:!0,ignoreWhitespace:!0}),new o.Parser(i).parseComplete(n),u=r(l(i.dom),t),e.strip(u)}function l(n){function i(n){t||f.each(n,function(n){if(n.name==="body"){t=n.children;return}n.children&&i(n.children)})}var t=null;return i(n),t||n}function a(n,t){function r(n){return n.substr(1)}function u(n){return function(t){return e.startsWith(t,n)}}function i(n,t){return f(n).chain().filter(u(t)).map(r).value()}if(t===!0)return!0;var o=i(t,"."),s=i(t,"#");return n&&(f.include(o,n.class)||f.include(s,n.id))}function r(n,t,i){arguments.length<3&&(i="");var e=/\S$/;return f.each(n,function(n){switch(n.type){case"tag":switch(n.name.toLowerCase()){case"img":i+=u.image(n,t);break;case"a":n.needsSpace=e.test(i);i+=u.anchor(n,r,t);break;case"p":i+=u.paragraph(n,r,t);break;case"h1":case"h2":case"h3":case"h4":i+=u.heading(n,r,t);break;case"br":i+=u.lineBreak(n,r,t);break;case"hr":i+=u.horizontalLine(n,r,t);break;case"ul":i+=u.unorderedList(n,r,t);break;case"ol":i+=u.orderedList(n,r,t);break;case"pre":var o=f(t).clone();o.isInPre=!0;i+=u.paragraph(n,r,o);break;case"table":if(a(n.attribs,t.tables)){i+=u.table(n,r,t);break}default:i=r(n.children||[],t,i)}break;case"text":n.raw!=="\r\n"&&(n.needsSpace=e.test(i),i+=u.text(n,t));break;default:f.include(c,n.type)||(i=r(n.children||[],t,i))}}),i}var h=n("fs"),v=n("util"),f=n("underscore"),e=n("underscore.string"),o=n("htmlparser"),y=n("./helper"),u=n("./formatter"),c=["style","script"];i.fromFile=function(n,t,i){i||(i=t,t={});h.readFile(n,"utf8",function(n,r){var u=s(r,t);return i(null,u)})};i.fromString=function(n,t){return s(n,t||{})}},{"./formatter":7,"./helper":8,fs:1,htmlparser:10,underscore:12,"underscore.string":11,util:5}],10:[function(n,t,i){(function(r,u){(function(){function c(){return typeof n=="function"&&typeof i=="object"&&typeof t=="object"&&typeof r=="string"&&typeof u=="string"}function e(n,t){this._options=t?t:{};this._options.includeLocation==undefined&&(this._options.includeLocation=!1);this.validateHandler(n);this._handler=n;this.reset()}function h(n){h.super_.call(this,n,{ignoreWhitespace:!0,verbose:!1,enforceEmptyTags:!1})}function s(n,t){this.reset();this._options=t?t:{};this._options.ignoreWhitespace==undefined&&(this._options.ignoreWhitespace=!1);this._options.verbose==undefined&&(this._options.verbose=!0);this._options.enforceEmptyTags==undefined&&(this._options.enforceEmptyTags=!0);typeof n=="function"&&(this._callback=n)}function l(n,t){var i=function(){};i.prototype=t.prototype;n.super_=t;n.prototype=new i;n.prototype.constructor=n}var f,o;if(!c()){if(this.Tautologistics){if(this.Tautologistics.NodeHtmlParser)return}else this.Tautologistics={};this.Tautologistics.NodeHtmlParser={};i=this.Tautologistics.NodeHtmlParser}f={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag"};e._reTrim=/(^\s+|\s+$)/g;e._reTrimComment=/(^\!--|--$)/g;e._reWhitespace=/\s/g;e._reTagName=/^\s*(\/?)\s*([^\s\/]+)/;e._reAttrib=/([^=<>\"\'\s]+)\s*=\s*"([^"]*)"|([^=<>\"\'\s]+)\s*=\s*'([^']*)'|([^=<>\"\'\s]+)\s*=\s*([^'"\s]+)|([^=<>\"\'\s\/]+)/g;e._reTags=/[\<\>]/g;e.prototype.parseComplete=function(n){this.reset();this.parseChunk(n);this.done()};e.prototype.parseChunk=function(n){this._done&&this.handleError(new Error("Attempted to parse chunk after parsing already done"));this._buffer+=n;this.parseTags()};e.prototype.done=function(){var t,n;this._done||(this._done=!0,this._buffer.length&&(t=this._buffer,this._buffer="",n={raw:t,data:this._parseState==f.Text?t:t.replace(e._reTrim,""),type:this._parseState},(this._parseState==f.Tag||this._parseState==f.Script||this._parseState==f.Style)&&(n.name=this.parseTagName(n.data)),this.parseAttribs(n),this._elements.push(n)),this.writeHandler(),this._handler.done())};e.prototype.reset=function(){this._buffer="";this._done=!1;this._elements=[];this._elementsCurrent=0;this._current=0;this._next=0;this._location={row:0,col:0,charOffset:0,inBuffer:0};this._parseState=f.Text;this._prevTagSep="";this._tagStack=[];this._handler.reset()};e.prototype._options=null;e.prototype._handler=null;e.prototype._buffer=null;e.prototype._done=!1;e.prototype._elements=null;e.prototype._elementsCurrent=0;e.prototype._current=0;e.prototype._next=0;e.prototype._location=null;e.prototype._parseState=f.Text;e.prototype._prevTagSep="";e.prototype._tagStack=null;e.prototype.parseTagAttribs=function(n){for(var r=n.length,i=0,t;i<r;)t=n[i++],(t.type==f.Tag||t.type==f.Script||t.type==f.style)&&this.parseAttribs(t);return n};e.prototype.parseAttribs=function(n){var r,i,t;if((n.type==f.Script||n.type==f.Style||n.type==f.Tag)&&(r=n.data.split(e._reWhitespace,1)[0],i=n.data.substring(r.length),!(i.length<1)))for(e._reAttrib.lastIndex=0;t=e._reAttrib.exec(i);)n.attribs==undefined&&(n.attribs={}),typeof t[1]=="string"&&t[1].length?n.attribs[t[1]]=t[2]:typeof t[3]=="string"&&t[3].length?n.attribs[t[3].toString()]=t[4].toString():typeof t[5]=="string"&&t[5].length?n.attribs[t[5]]=t[6]:typeof t[7]=="string"&&t[7].length&&(n.attribs[t[7]]=t[7])};e.prototype.parseTagName=function(n){if(n==null||n=="")return"";var t=e._reTagName.exec(n);return t?(t[1]?"/":"")+t[2]:""};e.prototype.parseTags=function(){for(var h=this._buffer.length-1,t,u,r;e._reTags.test(this._buffer);){this._next=e._reTags.lastIndex-1;var i=this._buffer.charAt(this._next),s=this._buffer.substring(this._current,this._next),n={raw:s,data:this._parseState==f.Text?s:s.replace(e._reTrim,""),type:this._parseState},o=this.parseTagName(n.data);this._tagStack.length&&(this._tagStack[this._tagStack.length-1]==f.Script?o.toLowerCase()=="/script"?this._tagStack.pop():n.raw.indexOf("!--")!=0&&(n.type=f.Text,this._elements.length&&this._elements[this._elements.length-1].type==f.Text&&(t=this._elements[this._elements.length-1],t.raw=t.data=t.raw+this._prevTagSep+n.raw,n.raw=n.data="")):this._tagStack[this._tagStack.length-1]==f.Style?o.toLowerCase()=="/style"?this._tagStack.pop():n.raw.indexOf("!--")!=0&&(n.type=f.Text,this._elements.length&&this._elements[this._elements.length-1].type==f.Text?(t=this._elements[this._elements.length-1],n.raw!=""?(t.raw=t.data=t.raw+this._prevTagSep+n.raw,n.raw=n.data=""):t.raw=t.data=t.raw+this._prevTagSep):n.raw!=""&&(n.raw=n.data=n.raw)):this._tagStack[this._tagStack.length-1]==f.Comment&&(r=n.raw.length,n.raw.charAt(r-2)=="-"&&n.raw.charAt(r-1)=="-"&&i==">"?(this._tagStack.pop(),this._elements.length&&this._elements[this._elements.length-1].type==f.Comment?(t=this._elements[this._elements.length-1],t.raw=t.data=(t.raw+n.raw).replace(e._reTrimComment,""),n.raw=n.data="",n.type=f.Text):n.type=f.Comment):(n.type=f.Comment,this._elements.length&&this._elements[this._elements.length-1].type==f.Comment?(t=this._elements[this._elements.length-1],t.raw=t.data=t.raw+n.raw+i,n.raw=n.data="",n.type=f.Text):n.raw=n.data=n.raw+i)));n.type==f.Tag&&(n.name=o,u=o.toLowerCase(),n.raw.indexOf("!--")==0?(n.type=f.Comment,delete n.name,r=n.raw.length,n.raw.charAt(r-1)=="-"&&n.raw.charAt(r-2)=="-"&&i==">"?n.raw=n.data=n.raw.replace(e._reTrimComment,""):(n.raw+=i,this._tagStack.push(f.Comment))):n.raw.indexOf("!")==0||n.raw.indexOf("?")==0?n.type=f.Directive:u=="script"?(n.type=f.Script,n.data.charAt(n.data.length-1)!="/"&&this._tagStack.push(f.Script)):u=="/script"?n.type=f.Script:u=="style"?(n.type=f.Style,n.data.charAt(n.data.length-1)!="/"&&this._tagStack.push(f.Style)):u=="/style"&&(n.type=f.Style),n.name&&n.name.charAt(0)=="/"&&(n.data=n.name));(n.raw!=""||n.type!=f.Text)&&(this._options.includeLocation&&!n.location&&(n.location=this.getLocation(n.type==f.Tag)),this.parseAttribs(n),this._elements.push(n),n.type!=f.Text&&n.type!=f.Comment&&n.type!=f.Directive&&n.data.charAt(n.data.length-1)=="/"&&this._elements.push({raw:"/"+n.name,data:"/"+n.name,name:"/"+n.name,type:n.type}));this._parseState=i=="<"?f.Tag:f.Text;this._current=this._next+1;this._prevTagSep=i}this._options.includeLocation&&(this.getLocation(),this._location.row+=this._location.inBuffer,this._location.inBuffer=0,this._location.charOffset=0);this._buffer=this._current<=h?this._buffer.substring(this._current):"";this._current=0;this.writeHandler()};e.prototype.getLocation=function(n){for(var i,t=this._location,r=this._current-(n?1:0),u=n&&t.charOffset==0&&this._current==0;t.charOffset<r;t.charOffset++)i=this._buffer.charAt(t.charOffset),i=="\n"?(t.inBuffer++,t.col=0):i!="\r"&&t.col++;return{line:t.row+t.inBuffer+1,col:t.col+(u?0:1)}};e.prototype.validateHandler=function(n){if(typeof n!="object")throw new Error("Handler is not an object");if(typeof n.reset!="function")throw new Error("Handler method 'reset' is invalid");if(typeof n.done!="function")throw new Error("Handler method 'done' is invalid");if(typeof n.writeTag!="function")throw new Error("Handler method 'writeTag' is invalid");if(typeof n.writeText!="function")throw new Error("Handler method 'writeText' is invalid");if(typeof n.writeComment!="function")throw new Error("Handler method 'writeComment' is invalid");if(typeof n.writeDirective!="function")throw new Error("Handler method 'writeDirective' is invalid");};e.prototype.writeHandler=function(n){if(n=!!n,!this._tagStack.length||n)while(this._elements.length){var t=this._elements.shift();switch(t.type){case f.Comment:this._handler.writeComment(t);break;case f.Directive:this._handler.writeDirective(t);break;case f.Text:this._handler.writeText(t);break;default:this._handler.writeTag(t)}}};e.prototype.handleError=function(n){if(typeof this._handler.error=="function")this._handler.error(n);else throw n;};l(h,s);h.prototype.done=function(){var n={},t,i=o.getElementsByTagName(function(n){return n=="rss"||n=="feed"},this.dom,!1);if(i.length&&(t=i[0]),t){if(t.name=="rss"){n.type="rss";t=t.children[0];n.id="";try{n.title=o.getElementsByTagName("title",t.children,!1)[0].children[0].data}catch(r){}try{n.link=o.getElementsByTagName("link",t.children,!1)[0].children[0].data}catch(r){}try{n.description=o.getElementsByTagName("description",t.children,!1)[0].children[0].data}catch(r){}try{n.updated=new Date(o.getElementsByTagName("lastBuildDate",t.children,!1)[0].children[0].data)}catch(r){}try{n.author=o.getElementsByTagName("managingEditor",t.children,!1)[0].children[0].data}catch(r){}n.items=[];o.getElementsByTagName("item",t.children).forEach(function(t){var i={};try{i.id=o.getElementsByTagName("guid",t.children,!1)[0].children[0].data}catch(r){}try{i.title=o.getElementsByTagName("title",t.children,!1)[0].children[0].data}catch(r){}try{i.link=o.getElementsByTagName("link",t.children,!1)[0].children[0].data}catch(r){}try{i.description=o.getElementsByTagName("description",t.children,!1)[0].children[0].data}catch(r){}try{i.pubDate=new Date(o.getElementsByTagName("pubDate",t.children,!1)[0].children[0].data)}catch(r){}n.items.push(i)})}else{n.type="atom";try{n.id=o.getElementsByTagName("id",t.children,!1)[0].children[0].data}catch(r){}try{n.title=o.getElementsByTagName("title",t.children,!1)[0].children[0].data}catch(r){}try{n.link=o.getElementsByTagName("link",t.children,!1)[0].attribs.href}catch(r){}try{n.description=o.getElementsByTagName("subtitle",t.children,!1)[0].children[0].data}catch(r){}try{n.updated=new Date(o.getElementsByTagName("updated",t.children,!1)[0].children[0].data)}catch(r){}try{n.author=o.getElementsByTagName("email",t.children,!0)[0].children[0].data}catch(r){}n.items=[];o.getElementsByTagName("entry",t.children).forEach(function(t){var i={};try{i.id=o.getElementsByTagName("id",t.children,!1)[0].children[0].data}catch(r){}try{i.title=o.getElementsByTagName("title",t.children,!1)[0].children[0].data}catch(r){}try{i.link=o.getElementsByTagName("link",t.children,!1)[0].attribs.href}catch(r){}try{i.description=o.getElementsByTagName("summary",t.children,!1)[0].children[0].data}catch(r){}try{i.pubDate=new Date(o.getElementsByTagName("updated",t.children,!1)[0].children[0].data)}catch(r){}n.items.push(i)})}this.dom=n}h.super_.prototype.done.call(this)};s._emptyTags={area:1,base:1,basefont:1,br:1,col:1,frame:1,hr:1,img:1,input:1,isindex:1,link:1,meta:1,param:1,embed:1};s.reWhitespace=/^\s*$/;s.prototype.dom=null;s.prototype.reset=function(){this.dom=[];this._done=!1;this._tagStack=[];this._tagStack.last=function(){return this.length?this[this.length-1]:null}};s.prototype.done=function(){this._done=!0;this.handleCallback(null)};s.prototype.writeTag=function(n){this.handleElement(n)};s.prototype.writeText=function(n){this._options.ignoreWhitespace&&s.reWhitespace.test(n.data)||this.handleElement(n)};s.prototype.writeComment=function(n){this.handleElement(n)};s.prototype.writeDirective=function(n){this.handleElement(n)};s.prototype.error=function(n){this.handleCallback(n)};s.prototype._options=null;s.prototype._callback=null;s.prototype._done=!1;s.prototype._tagStack=null;s.prototype.handleCallback=function(n){if(typeof this._callback!="function")if(n)throw n;else return;this._callback(n,this.dom)};s.prototype.isEmptyTag=function(n){var t=n.name.toLowerCase();return t.charAt(0)=="/"&&(t=t.substring(1)),this._options.enforceEmptyTags&&!!s._emptyTags[t]};s.prototype.handleElement=function(n){var i,t;if(this._done&&this.handleCallback(new Error("Writing to the handler after done() called is not allowed without a reset()")),this._options.verbose||(delete n.raw,(n.type=="tag"||n.type=="script"||n.type=="style")&&delete n.data),this._tagStack.last())if(n.type!=f.Text&&n.type!=f.Comment&&n.type!=f.Directive)if(n.name.charAt(0)=="/"){if(i=n.name.substring(1),!this.isEmptyTag(n)){for(t=this._tagStack.length-1;t>-1&&this._tagStack[t--].name!=i;);if(t>-1||this._tagStack[0].name==i)while(t<this._tagStack.length-1)this._tagStack.pop()}}else this._tagStack.last().children||(this._tagStack.last().children=[]),this._tagStack.last().children.push(n),this.isEmptyTag(n)||this._tagStack.push(n);else this._tagStack.last().children||(this._tagStack.last().children=[]),this._tagStack.last().children.push(n);else n.type!=f.Text&&n.type!=f.Comment&&n.type!=f.Directive?n.name.charAt(0)!="/"&&(this.dom.push(n),this.isEmptyTag(n)||this._tagStack.push(n)):this.dom.push(n)};o={testElement:function(n,t){if(!t)return!1;for(var i in n)if(i=="tag_name"){if(t.type!="tag"&&t.type!="script"&&t.type!="style"||!n.tag_name(t.name))return!1}else if(i=="tag_type"){if(!n.tag_type(t.type))return!1}else if(i=="tag_contains"){if(t.type!="text"&&t.type!="comment"&&t.type!="directive"||!n.tag_contains(t.data))return!1}else if(!t.attribs||!n[i](t.attribs[i]))return!1;return!0},getElements:function(n,t,i,r){function h(n){return function(t){return t==n}}var u,f,e,s;if(i=i===undefined||i===null||!!i,r=isNaN(parseInt(r))?-1:parseInt(r),!t)return[];u=[];for(e in n)typeof n[e]!="function"&&(n[e]=h(n[e]));if(o.testElement(n,t)&&u.push(t),r>=0&&u.length>=r)return u;if(i&&t.children)f=t.children;else if(t instanceof Array)f=t;else return u;for(s=0;s<f.length;s++)if(u=u.concat(o.getElements(n,f[s],i,r)),r>=0&&u.length>=r)break;return u},getElementById:function(n,t,i){var r=o.getElements({id:n},t,i,1);return r.length?r[0]:null},getElementsByTagName:function(n,t,i,r){return o.getElements({tag_name:n},t,i,r)},getElementsByTagType:function(n,t,i,r){return o.getElements({tag_type:n},t,i,r)}};i.Parser=e;i.DefaultHandler=s;i.RssHandler=h;i.ElementType=f;i.DomUtils=o})()}).call(this,"/node_modules\\htmlparser\\lib\\htmlparser.js","/node_modules\\htmlparser\\lib")},{}],11:[function(t,i,r){!function(t,u){"use strict";function b(n,t){var r,i,u=n.toLowerCase();for(t=[].concat(t),r=0;r<t.length;r+=1)if((i=t[r],i)&&(i.test&&i.test(n)||i.toLowerCase()===u))return!0}var a=u.prototype.trim,v=u.prototype.trimRight,y=u.prototype.trimLeft,p=function(n){return n*1||0},e=function(n,t){if(t<1)return"";for(var i="";t>0;)t&1&&(i+=n),t>>=1,n+=n;return i},w=[].slice,s=function(n){return n==null?"\\s":n.source?n.source:"["+f.escapeRegExp(n)+"]"},h={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},c={},l,o,f;for(l in h)c[h[l]]=l;c["'"]="#39";o=function(){function t(n){return Object.prototype.toString.call(n).slice(8,-1).toLowerCase()}var i=e,n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,r){for(var v=1,w=n.length,c="",f,l=[],h,e,a,y,p,s=0;s<w;s++)if(c=t(n[s]),c==="string")l.push(n[s]);else if(c==="array"){if(e=n[s],e[2])for(f=r[v],h=0;h<e[2].length;h++){if(!f.hasOwnProperty(e[2][h]))throw new Error(o('[_.sprintf] property "%s" does not exist',e[2][h]));f=f[e[2][h]]}else f=e[1]?r[e[1]]:r[v++];if(/[^s]/.test(e[8])&&t(f)!="number")throw new Error(o("[_.sprintf] expecting number but found %s",t(f)));switch(e[8]){case"b":f=f.toString(2);break;case"c":f=u.fromCharCode(f);break;case"d":f=parseInt(f,10);break;case"e":f=e[7]?f.toExponential(e[7]):f.toExponential();break;case"f":f=e[7]?parseFloat(f).toFixed(e[7]):parseFloat(f);break;case"o":f=f.toString(8);break;case"s":f=(f=u(f))&&e[7]?f.substring(0,e[7]):f;break;case"u":f=Math.abs(f);break;case"x":f=f.toString(16);break;case"X":f=f.toString(16).toUpperCase()}f=/[def]/.test(e[8])&&e[3]&&f>=0?"+"+f:f;y=e[4]?e[4]=="0"?"0":e[4].charAt(1):" ";p=e[6]-u(f).length;a=e[6]?i(y,p):"";l.push(e[5]?f+a:a+f)}return l.join("")},n.cache={},n.parse=function(n){for(var r=n,t=[],f=[],o=0;r;){if((t=/^[^\x25]+/.exec(r))!==null)f.push(t[0]);else if((t=/^\x25{2}/.exec(r))!==null)f.push("%");else if((t=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(r))!==null){if(t[2]){o|=1;var e=[],u=t[2],i=[];if((i=/^([a-z_][a-z_\d]*)/i.exec(u))!==null)for(e.push(i[1]);(u=u.substring(i[0].length))!=="";)if((i=/^\.([a-z_][a-z_\d]*)/i.exec(u))!==null)e.push(i[1]);else if((i=/^\[(\d+)\]/.exec(u))!==null)e.push(i[1]);else throw new Error("[_.sprintf] huh?");else throw new Error("[_.sprintf] huh?");t[2]=e}else o|=2;if(o===3)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");f.push(t)}else throw new Error("[_.sprintf] huh?");r=r.substring(t[0].length)}return f},n}();f={VERSION:"2.4.0",isBlank:function(n){return n==null&&(n=""),/^\s*$/.test(n)},stripTags:function(n){return n==null?"":u(n).replace(/<\/?[^>]+>/g,"")},capitalize:function(n){return n=n==null?"":u(n),n.charAt(0).toUpperCase()+n.slice(1)},chop:function(n,t){return n==null?[]:(n=u(n),t=~~t,t>0?n.match(new RegExp(".{1,"+t+"}","g")):[n])},clean:function(n){return f.strip(n).replace(/\s+/g," ")},count:function(n,t){if(n==null||t==null)return 0;n=u(n);t=u(t);for(var r=0,i=0,f=t.length;;){if(i=n.indexOf(t,i),i===-1)break;r++;i+=f}return r},chars:function(n){return n==null?[]:u(n).split("")},swapCase:function(n){return n==null?"":u(n).replace(/\S/g,function(n){return n===n.toUpperCase()?n.toLowerCase():n.toUpperCase()})},escapeHTML:function(n){return n==null?"":u(n).replace(/[&<>"']/g,function(n){return"&"+c[n]+";"})},unescapeHTML:function(n){return n==null?"":u(n).replace(/\&([^;]+);/g,function(n,t){var i;return t in h?h[t]:(i=t.match(/^#x([\da-fA-F]+)$/))?u.fromCharCode(parseInt(i[1],16)):(i=t.match(/^#(\d+)$/))?u.fromCharCode(~~i[1]):n})},escapeRegExp:function(n){return n==null?"":u(n).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(n,t,i,r){var u=f.chars(n);return u.splice(~~t,~~i,r),u.join("")},insert:function(n,t,i){return f.splice(n,t,0,i)},include:function(n,t){return t===""?!0:n==null?!1:u(n).indexOf(t)!==-1},join:function(){var t=w.call(arguments),n=t.shift();return n==null&&(n=""),t.join(n)},lines:function(n){return n==null?[]:u(n).split("\n")},reverse:function(n){return f.chars(n).reverse().join("")},startsWith:function(n,t){return t===""?!0:n==null||t==null?!1:(n=u(n),t=u(t),n.length>=t.length&&n.slice(0,t.length)===t)},endsWith:function(n,t){return t===""?!0:n==null||t==null?!1:(n=u(n),t=u(t),n.length>=t.length&&n.slice(n.length-t.length)===t)},succ:function(n){return n==null?"":(n=u(n),n.slice(0,-1)+u.fromCharCode(n.charCodeAt(n.length-1)+1))},titleize:function(n){return n==null?"":(n=u(n).toLowerCase(),n.replace(/(?:^|\s|-)\S/g,function(n){return n.toUpperCase()}))},camelize:function(n){return f.trim(n).replace(/[-_\s]+(.)?/g,function(n,t){return t?t.toUpperCase():""})},underscored:function(n){return f.trim(n).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(n){return f.trim(n).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(n){return f.capitalize(f.camelize(u(n).replace(/[\W_]/g," ")).replace(/\s/g,""))},humanize:function(n){return f.capitalize(f.underscored(n).replace(/_id$/,"").replace(/_/g," "))},trim:function(n,t){return n==null?"":!t&&a?a.call(n):(t=s(t),u(n).replace(new RegExp("^"+t+"+|"+t+"+$","g"),""))},ltrim:function(n,t){return n==null?"":!t&&y?y.call(n):(t=s(t),u(n).replace(new RegExp("^"+t+"+"),""))},rtrim:function(n,t){return n==null?"":!t&&v?v.call(n):(t=s(t),u(n).replace(new RegExp(t+"+$"),""))},truncate:function(n,t,i){return n==null?"":(n=u(n),i=i||"...",t=~~t,n.length>t?n.slice(0,t)+i:n)},prune:function(n,t,i){if(n==null)return"";if(n=u(n),t=~~t,i=i!=null?u(i):"...",n.length<=t)return n;var e=function(n){return n.toUpperCase()!==n.toLowerCase()?"A":" "},r=n.slice(0,t+1).replace(/.(?=\W*\w*$)/g,e);return r=r.slice(r.length-2).match(/\w\w/)?r.replace(/\s*\S+$/,""):f.rtrim(r.slice(0,r.length-1)),(r+i).length>n.length?n:n.slice(0,r.length)+i},words:function(n,t){return f.isBlank(n)?[]:f.trim(n,t).split(t||/\s+/)},pad:function(n,t,i,r){n=n==null?"":u(n);t=~~t;var f=0;i?i.length>1&&(i=i.charAt(0)):i=" ";switch(r){case"right":return f=t-n.length,n+e(i,f);case"both":return f=t-n.length,e(i,Math.ceil(f/2))+n+e(i,Math.floor(f/2));default:return f=t-n.length,e(i,f)+n}},lpad:function(n,t,i){return f.pad(n,t,i)},rpad:function(n,t,i){return f.pad(n,t,i,"right")},lrpad:function(n,t,i){return f.pad(n,t,i,"both")},sprintf:o,vsprintf:function(n,t){return t.unshift(n),o.apply(null,t)},toNumber:function(n,t){return n?(n=f.trim(n),!n.match(/^-?\d+(?:\.\d+)?$/))?NaN:p(p(n).toFixed(~~t)):0},numberFormat:function(n,t,i,r){if(isNaN(n)||n==null)return"";n=n.toFixed(~~t);r=typeof r=="string"?r:",";var u=n.split("."),f=u[0],e=u[1]?(i||".")+u[1]:"";return f.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+r)+e},strRight:function(n,t){if(n==null)return"";n=u(n);t=t!=null?u(t):t;var i=t?n.indexOf(t):-1;return~i?n.slice(i+t.length,n.length):n},strRightBack:function(n,t){if(n==null)return"";n=u(n);t=t!=null?u(t):t;var i=t?n.lastIndexOf(t):-1;return~i?n.slice(i+t.length,n.length):n},strLeft:function(n,t){if(n==null)return"";n=u(n);t=t!=null?u(t):t;var i=t?n.indexOf(t):-1;return~i?n.slice(0,i):n},strLeftBack:function(n,t){if(n==null)return"";n+="";t=t!=null?""+t:t;var i=n.lastIndexOf(t);return~i?n.slice(0,i):n},toSentence:function(n,t,i,r){t=t||", ";i=i||" and ";var u=n.slice(),e=u.pop();return n.length>2&&r&&(i=f.rtrim(t)+i),u.length?u.join(t)+i+e:e},toSentenceSerial:function(){var n=w.call(arguments);return n[3]=!0,f.toSentence.apply(f,n)},slugify:function(n){if(n==null)return"";var t="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",i="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",r=new RegExp(s(t),"g");return n=u(n).toLowerCase().replace(r,function(n){var r=t.indexOf(n);return i.charAt(r)||"-"}),f.dasherize(n.replace(/[^\w\s-]/g,""))},surround:function(n,t){return[t,n,t].join("")},quote:function(n,t){return f.surround(n,t||'"')},unquote:function(n,t){return t=t||'"',n[0]===t&&n[n.length-1]===t?n.slice(1,n.length-1):n},exports:function(){var t={};for(var n in this)this.hasOwnProperty(n)&&!n.match(/^(?:include|contains|reverse)$/)&&(t[n]=this[n]);return t},repeat:function(n,t,i){if(n==null)return"";if(t=~~t,i==null)return e(u(n),t);for(var r=[];t>0;r[--t]=n);return r.join(i)},naturalCmp:function(n,t){var i,e,o,s,h;if(n==t)return 0;if(!n)return-1;if(!t)return 1;var c=/(\.\d+)|(\d+)|(\D+)/g,r=u(n).toLowerCase().match(c),f=u(t).toLowerCase().match(c),l=Math.min(r.length,f.length);for(i=0;i<l;i++)if(e=r[i],o=f[i],e!==o)return(s=parseInt(e,10),!isNaN(s)&&(h=parseInt(o,10),!isNaN(h)&&s-h))?s-h:e<o?-1:1;return r.length===f.length?r.length-f.length:n<t?-1:1},levenshtein:function(n,t){var r,e,o,f,i;if(n==null&&t==null)return 0;if(n==null)return u(t).length;if(t==null)return u(n).length;for(n=u(n),t=u(t),r=[],f=0;f<=t.length;f++)for(i=0;i<=n.length;i++)o=f&&i?n.charAt(i-1)===t.charAt(f-1)?e:Math.min(r[i],r[i-1],e)+1:f+i,e=r[i],r[i]=o;return r.pop()},toBoolean:function(n,t,i){return(typeof n=="number"&&(n=""+n),typeof n!="string")?!!n:(n=f.trim(n),b(n,t||["true","1"]))?!0:b(n,i||["false","0"])?!1:void 0}};f.strip=f.trim;f.lstrip=f.ltrim;f.rstrip=f.rtrim;f.center=f.lrpad;f.rjust=f.lpad;f.ljust=f.rpad;f.contains=f.include;f.q=f.quote;f.toBool=f.toBoolean;typeof r!="undefined"&&(typeof i!="undefined"&&i.exports&&(i.exports=f),r._s=f);typeof n=="function"&&n.amd&&n("underscore.string",[],function(){return f});t._=t._||{};t._.string=t._.str=f}(this,String)},{}],12:[function(t,i,r){(function(){function ot(n){function i(t,i,r,u,f,e){for(;f>=0&&f<e;f+=n){var o=u?u[f]:f;r=i(r,t[o],o,t)}return r}return function(r,u,e,o){u=h(u,o,4);var s=!f(r)&&t.keys(r),l=(s||r).length,c=n>0?0:l-1;return arguments.length<3&&(e=r[s?s[c]:c],c+=n),i(r,u,e,s,c,l)}}function st(n){return function(t,i,r){i=u(i,r);for(var e=o(t),f=n>0?0:e-1;f>=0&&f<e;f+=n)if(i(t[f],f,t))return f;return-1}}function ht(n,i,r){return function(u,f,s){var c=0,h=o(u);if(typeof s=="number")n>0?c=s>=0?s:Math.max(s+h,c):h=s>=0?Math.min(s+1,h):s+h+1;else if(r&&s&&h)return s=r(u,f),u[s]===f?s:-1;if(f!==f)return s=i(e.call(u,c,h),t.isNaN),s>=0?s+c:-1;for(s=n>0?c:h-1;s>=0&&s<h;s+=n)if(u[s]===f)return s;return-1}}function ct(n,i){var u=tt.length,f=n.constructor,e=t.isFunction(f)&&f.prototype||w,r="constructor";for(t.has(n,r)&&!t.contains(i,r)&&i.push(r);u--;)r=tt[u],r in n&&n[r]!==e[r]&&!t.contains(i,r)&&i.push(r)}var p=this,yt=p._,l=Array.prototype,w=Object.prototype,pt=Function.prototype,wt=l.push,e=l.slice,c=w.toString,bt=w.hasOwnProperty,kt=Array.isArray,rt=Object.keys,b=pt.bind,ut=Object.create,k=function(){},t=function(n){if(n instanceof t)return n;if(!(this instanceof t))return new t(n);this._wrapped=n},h,u,a,s,g,nt,tt,v,vt,y;typeof r!="undefined"?(typeof i!="undefined"&&i.exports&&(r=i.exports=t),r._=t):p._=t;t.VERSION="1.8.3";h=function(n,t,i){if(t===void 0)return n;switch(i==null?3:i){case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return function(){return n.apply(t,arguments)}};u=function(n,i,r){return n==null?t.identity:t.isFunction(n)?h(n,i,r):t.isObject(n)?t.matcher(n):t.property(n)};t.iteratee=function(n,t){return u(n,t,Infinity)};var d=function(n,t){return function(i){var e=arguments.length,r,u,f;if(e<2||i==null)return i;for(r=1;r<e;r++){var o=arguments[r],s=n(o),h=s.length;for(u=0;u<h;u++)f=s[u],t&&i[f]!==void 0||(i[f]=o[f])}return i}},ft=function(n){if(!t.isObject(n))return{};if(ut)return ut(n);k.prototype=n;var i=new k;return k.prototype=null,i},et=function(n){return function(t){if(t!=null)return t[n]}},dt=Math.pow(2,53)-1,o=et("length"),f=function(n){var t=o(n);return typeof t=="number"&&t>=0&&t<=dt};t.each=t.forEach=function(n,i,r){var u,e,o;if(i=h(i,r),f(n))for(u=0,e=n.length;u<e;u++)i(n[u],u,n);else for(o=t.keys(n),u=0,e=o.length;u<e;u++)i(n[o[u]],o[u],n);return n};t.map=t.collect=function(n,i,r){var e,s;i=u(i,r);var o=!f(n)&&t.keys(n),h=(o||n).length,c=Array(h);for(e=0;e<h;e++)s=o?o[e]:e,c[e]=i(n[s],s,n);return c};t.reduce=t.foldl=t.inject=ot(1);t.reduceRight=t.foldr=ot(-1);t.find=t.detect=function(n,i,r){var u;return u=f(n)?t.findIndex(n,i,r):t.findKey(n,i,r),u!==void 0&&u!==-1?n[u]:void 0};t.filter=t.select=function(n,i,r){var f=[];return i=u(i,r),t.each(n,function(n,t,r){i(n,t,r)&&f.push(n)}),f};t.reject=function(n,i,r){return t.filter(n,t.negate(u(i)),r)};t.every=t.all=function(n,i,r){var o,h,e,s;for(i=u(i,r),o=!f(n)&&t.keys(n),h=(o||n).length,e=0;e<h;e++)if(s=o?o[e]:e,!i(n[s],s,n))return!1;return!0};t.some=t.any=function(n,i,r){var o,h,e,s;for(i=u(i,r),o=!f(n)&&t.keys(n),h=(o||n).length,e=0;e<h;e++)if(s=o?o[e]:e,i(n[s],s,n))return!0;return!1};t.contains=t.includes=t.include=function(n,i,r,u){return f(n)||(n=t.values(n)),(typeof r!="number"||u)&&(r=0),t.indexOf(n,i,r)>=0};t.invoke=function(n,i){var r=e.call(arguments,2),u=t.isFunction(i);return t.map(n,function(n){var t=u?i:n[i];return t==null?t:t.apply(n,r)})};t.pluck=function(n,i){return t.map(n,t.property(i))};t.where=function(n,i){return t.filter(n,t.matcher(i))};t.findWhere=function(n,i){return t.find(n,t.matcher(i))};t.max=function(n,i,r){var e=-Infinity,c=-Infinity,h,o,s,l;if(i==null&&n!=null)for(n=f(n)?n:t.values(n),s=0,l=n.length;s<l;s++)h=n[s],h>e&&(e=h);else i=u(i,r),t.each(n,function(n,t,r){o=i(n,t,r);(o>c||o===-Infinity&&e===-Infinity)&&(e=n,c=o)});return e};t.min=function(n,i,r){var e=Infinity,c=Infinity,h,o,s,l;if(i==null&&n!=null)for(n=f(n)?n:t.values(n),s=0,l=n.length;s<l;s++)h=n[s],h<e&&(e=h);else i=u(i,r),t.each(n,function(n,t,r){o=i(n,t,r);(o<c||o===Infinity&&e===Infinity)&&(e=n,c=o)});return e};t.shuffle=function(n){for(var e=f(n)?n:t.values(n),o=e.length,r=Array(o),i=0,u;i<o;i++)u=t.random(0,i),u!==i&&(r[i]=r[u]),r[u]=e[i];return r};t.sample=function(n,i,r){return i==null||r?(f(n)||(n=t.values(n)),n[t.random(n.length-1)]):t.shuffle(n).slice(0,Math.max(0,i))};t.sortBy=function(n,i,r){return i=u(i,r),t.pluck(t.map(n,function(n,t,r){return{value:n,index:t,criteria:i(n,t,r)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(i<r||r===void 0)return-1}return n.index-t.index}),"value")};a=function(n){return function(i,r,f){var e={};return r=u(r,f),t.each(i,function(t,u){var f=r(t,u,i);n(e,t,f)}),e}};t.groupBy=a(function(n,i,r){t.has(n,r)?n[r].push(i):n[r]=[i]});t.indexBy=a(function(n,t,i){n[i]=t});t.countBy=a(function(n,i,r){t.has(n,r)?n[r]++:n[r]=1});t.toArray=function(n){return n?t.isArray(n)?e.call(n):f(n)?t.map(n,t.identity):t.values(n):[]};t.size=function(n){return n==null?0:f(n)?n.length:t.keys(n).length};t.partition=function(n,i,r){i=u(i,r);var f=[],e=[];return t.each(n,function(n,t,r){(i(n,t,r)?f:e).push(n)}),[f,e]};t.first=t.head=t.take=function(n,i,r){if(n!=null)return i==null||r?n[0]:t.initial(n,n.length-i)};t.initial=function(n,t,i){return e.call(n,0,Math.max(0,n.length-(t==null||i?1:t)))};t.last=function(n,i,r){if(n!=null)return i==null||r?n[n.length-1]:t.rest(n,Math.max(0,n.length-i))};t.rest=t.tail=t.drop=function(n,t,i){return e.call(n,t==null||i?1:t)};t.compact=function(n){return t.filter(n,t.identity)};s=function(n,i,r,u){for(var e,l,a,h=[],v=0,c=u||0,y=o(n);c<y;c++)if(e=n[c],f(e)&&(t.isArray(e)||t.isArguments(e)))for(i||(e=s(e,i,r)),l=0,a=e.length,h.length+=a;l<a;)h[v++]=e[l++];else r||(h[v++]=e);return h};t.flatten=function(n,t){return s(n,t,!1)};t.without=function(n){return t.difference(n,e.call(arguments,1))};t.uniq=t.unique=function(n,i,r,f){var s,c,h,a,e,l;for(t.isBoolean(i)||(f=r,r=i,i=!1),r!=null&&(r=u(r,f)),s=[],c=[],h=0,a=o(n);h<a;h++)e=n[h],l=r?r(e,h,n):e,i?(h&&c===l||s.push(e),c=l):r?t.contains(c,l)||(c.push(l),s.push(e)):t.contains(s,e)||s.push(e);return s};t.union=function(){return t.uniq(s(arguments,!0,!0))};t.intersection=function(n){for(var r,i,u=[],e=arguments.length,f=0,s=o(n);f<s;f++)if(r=n[f],!t.contains(u,r)){for(i=1;i<e;i++)if(!t.contains(arguments[i],r))break;i===e&&u.push(r)}return u};t.difference=function(n){var i=s(arguments,!0,!0,1);return t.filter(n,function(n){return!t.contains(i,n)})};t.zip=function(){return t.unzip(arguments)};t.unzip=function(n){for(var r=n&&t.max(n,o).length||0,u=Array(r),i=0;i<r;i++)u[i]=t.pluck(n,i);return u};t.object=function(n,t){for(var r={},i=0,u=o(n);i<u;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r};t.findIndex=st(1);t.findLastIndex=st(-1);t.sortedIndex=function(n,t,i,r){var e;i=u(i,r,1);for(var h=i(t),f=0,s=o(n);f<s;)e=Math.floor((f+s)/2),i(n[e])<h?f=e+1:s=e;return f};t.indexOf=ht(1,t.findIndex,t.sortedIndex);t.lastIndexOf=ht(-1,t.findLastIndex);t.range=function(n,t,i){var u,f,r;for(t==null&&(t=n||0,n=0),i=i||1,u=Math.max(Math.ceil((t-n)/i),0),f=Array(u),r=0;r<u;r++,n+=i)f[r]=n;return f};g=function(n,i,r,u,f){if(!(u instanceof i))return n.apply(r,f);var e=ft(n.prototype),o=n.apply(e,f);return t.isObject(o)?o:e};t.bind=function(n,i){if(b&&n.bind===b)return b.apply(n,e.call(arguments,1));if(!t.isFunction(n))throw new TypeError("Bind must be called on a function");var u=e.call(arguments,2),r=function(){return g(n,r,i,this,u.concat(e.call(arguments)))};return r};t.partial=function(n){var i=e.call(arguments,1),r=function(){for(var f=0,o=i.length,e=Array(o),u=0;u<o;u++)e[u]=i[u]===t?arguments[f++]:i[u];while(f<arguments.length)e.push(arguments[f++]);return g(n,r,this,this,e)};return r};t.bindAll=function(n){var i,u=arguments.length,r;if(u<=1)throw new Error("bindAll must be passed function names");for(i=1;i<u;i++)r=arguments[i],n[r]=t.bind(n[r],n);return n};t.memoize=function(n,i){var r=function(u){var f=r.cache,e=""+(i?i.apply(this,arguments):u);return t.has(f,e)||(f[e]=n.apply(this,arguments)),f[e]};return r.cache={},r};t.delay=function(n,t){var i=e.call(arguments,2);return setTimeout(function(){return n.apply(null,i)},t)};t.defer=t.partial(t.delay,t,1);t.throttle=function(n,i,r){var f,e,s,u=null,o=0,h;return r||(r={}),h=function(){o=r.leading===!1?0:t.now();u=null;s=n.apply(f,e);u||(f=e=null)},function(){var l=t.now(),c;return o||r.leading!==!1||(o=l),c=i-(l-o),f=this,e=arguments,c<=0||c>i?(u&&(clearTimeout(u),u=null),o=l,s=n.apply(f,e),u||(f=e=null)):u||r.trailing===!1||(u=setTimeout(h,c)),s}};t.debounce=function(n,i,r){var u,f,e,s,o,h=function(){var c=t.now()-s;c<i&&c>=0?u=setTimeout(h,i-c):(u=null,r||(o=n.apply(e,f),u||(e=f=null)))};return function(){e=this;f=arguments;s=t.now();var c=r&&!u;return u||(u=setTimeout(h,i)),c&&(o=n.apply(e,f),e=f=null),o}};t.wrap=function(n,i){return t.partial(i,n)};t.negate=function(n){return function(){return!n.apply(this,arguments)}};t.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}};t.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}};t.before=function(n,t){var i;return function(){return--n>0&&(i=t.apply(this,arguments)),n<=1&&(t=null),i}};t.once=t.partial(t.before,2);nt=!{toString:null}.propertyIsEnumerable("toString");tt=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];t.keys=function(n){var i,r;if(!t.isObject(n))return[];if(rt)return rt(n);i=[];for(r in n)t.has(n,r)&&i.push(r);return nt&&ct(n,i),i};t.allKeys=function(n){var i,r;if(!t.isObject(n))return[];i=[];for(r in n)i.push(r);return nt&&ct(n,i),i};t.values=function(n){for(var r=t.keys(n),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=n[r[i]];return f};t.mapObject=function(n,i,r){var e;i=u(i,r);var o=t.keys(n),h=o.length,s={},f;for(e=0;e<h;e++)f=o[e],s[f]=i(n[f],f,n);return s};t.pairs=function(n){for(var r=t.keys(n),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=[r[i],n[r[i]]];return f};t.invert=function(n){for(var u={},r=t.keys(n),i=0,f=r.length;i<f;i++)u[n[r[i]]]=r[i];return u};t.functions=t.methods=function(n){var i=[];for(var r in n)t.isFunction(n[r])&&i.push(r);return i.sort()};t.extend=d(t.allKeys);t.extendOwn=t.assign=d(t.keys);t.findKey=function(n,i,r){var o,f,e,s;for(i=u(i,r),o=t.keys(n),e=0,s=o.length;e<s;e++)if(f=o[e],i(n[f],f,n))return f};t.pick=function(n,i,r){var c={},u=n,l,f,e,v,o,a;if(u==null)return c;for(t.isFunction(i)?(f=t.allKeys(u),l=h(i,r)):(f=s(arguments,!1,!1,1),l=function(n,t,i){return t in i},u=Object(u)),e=0,v=f.length;e<v;e++)o=f[e],a=u[o],l(a,o,u)&&(c[o]=a);return c};t.omit=function(n,i,r){if(t.isFunction(i))i=t.negate(i);else{var u=t.map(s(arguments,!1,!1,1),String);i=function(n,i){return!t.contains(u,i)}}return t.pick(n,i,r)};t.defaults=d(t.allKeys,!0);t.create=function(n,i){var r=ft(n);return i&&t.extendOwn(r,i),r};t.clone=function(n){return t.isObject(n)?t.isArray(n)?n.slice():t.extend({},n):n};t.tap=function(n,t){return t(n),n};t.isMatch=function(n,i){var e=t.keys(i),o=e.length,f,r,u;if(n==null)return!o;for(f=Object(n),r=0;r<o;r++)if(u=e[r],i[u]!==f[u]||!(u in f))return!1;return!0};v=function(n,i,r,u){var s,l,e,o,f,a,h;if(n===i)return n!==0||1/n==1/i;if(n==null||i==null)return n===i;if(n instanceof t&&(n=n._wrapped),i instanceof t&&(i=i._wrapped),s=c.call(n),s!==c.call(i))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+n==""+i;case"[object Number]":return+n!=+n?+i!=+i:+n==0?1/+n==1/i:+n==+i;case"[object Date]":case"[object Boolean]":return+n==+i}if(l=s==="[object Array]",!l&&(typeof n!="object"||typeof i!="object"||(e=n.constructor,o=i.constructor,e!==o&&!(t.isFunction(e)&&e instanceof e&&t.isFunction(o)&&o instanceof o)&&"constructor"in n&&"constructor"in i)))return!1;for(r=r||[],u=u||[],f=r.length;f--;)if(r[f]===n)return u[f]===i;if(r.push(n),u.push(i),l){if(f=n.length,f!==i.length)return!1;while(f--)if(!v(n[f],i[f],r,u))return!1}else{if(a=t.keys(n),f=a.length,t.keys(i).length!==f)return!1;while(f--)if(h=a[f],!(t.has(i,h)&&v(n[h],i[h],r,u)))return!1}return r.pop(),u.pop(),!0};t.isEqual=function(n,t){return v(n,t)};t.isEmpty=function(n){return n==null?!0:f(n)&&(t.isArray(n)||t.isString(n)||t.isArguments(n))?n.length===0:t.keys(n).length===0};t.isElement=function(n){return!!(n&&n.nodeType===1)};t.isArray=kt||function(n){return c.call(n)==="[object Array]"};t.isObject=function(n){var t=typeof n;return t==="function"||t==="object"&&!!n};t.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){t["is"+n]=function(t){return c.call(t)==="[object "+n+"]"}});t.isArguments(arguments)||(t.isArguments=function(n){return t.has(n,"callee")});typeof/./!="function"&&typeof Int8Array!="object"&&(t.isFunction=function(n){return typeof n=="function"||!1});t.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};t.isNaN=function(n){return t.isNumber(n)&&n!==+n};t.isBoolean=function(n){return n===!0||n===!1||c.call(n)==="[object Boolean]"};t.isNull=function(n){return n===null};t.isUndefined=function(n){return n===void 0};t.has=function(n,t){return n!=null&&bt.call(n,t)};t.noConflict=function(){return p._=yt,this};t.identity=function(n){return n};t.constant=function(n){return function(){return n}};t.noop=function(){};t.property=et;t.propertyOf=function(n){return n==null?function(){}:function(t){return n[t]}};t.matcher=t.matches=function(n){return n=t.extendOwn({},n),function(i){return t.isMatch(i,n)}};t.times=function(n,t,i){var u=Array(Math.max(0,n)),r;for(t=h(t,i,1),r=0;r<n;r++)u[r]=t(r);return u};t.random=function(n,t){return t==null&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};t.now=Date.now||function(){return(new Date).getTime()};var lt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},gt=t.invert(lt),at=function(n){var r=function(t){return n[t]},i="(?:"+t.keys(n).join("|")+")",u=RegExp(i),f=RegExp(i,"g");return function(n){return n=n==null?"":""+n,u.test(n)?n.replace(f,r):n}};t.escape=at(lt);t.unescape=at(gt);t.result=function(n,i,r){var u=n==null?void 0:n[i];return u===void 0&&(u=r),t.isFunction(u)?u.call(n):u};vt=0;t.uniqueId=function(n){var t=++vt+"";return n?n+t:t};t.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var it=/(.)^/,ni={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ti=/\\|'|\r|\n|\u2028|\u2029/g,ii=function(n){return"\\"+ni[n]};t.template=function(n,i,r){var o,f,h;!i&&r&&(i=r);i=t.defaults({},i,t.templateSettings);var c=RegExp([(i.escape||it).source,(i.interpolate||it).source,(i.evaluate||it).source].join("|")+"|$","g"),e=0,u="__p+='";n.replace(c,function(t,i,r,f,o){return u+=n.slice(e,o).replace(ti,ii),e=o+t.length,i?u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":f&&(u+="';\n"+f+"\n__p+='"),t});u+="';\n";i.variable||(u="with(obj||{}){\n"+u+"}\n");u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{o=new Function(i.variable||"obj","_",u)}catch(s){s.source=u;throw s;}return f=function(n){return o.call(this,n,t)},h=i.variable||"obj",f.source="function("+h+"){\n"+u+"}",f};t.chain=function(n){var i=t(n);return i._chain=!0,i};y=function(n,i){return n._chain?t(i).chain():i};t.mixin=function(n){t.each(t.functions(n),function(i){var r=t[i]=n[i];t.prototype[i]=function(){var n=[this._wrapped];return wt.apply(n,arguments),y(this,r.apply(t,n))}})};t.mixin(t);t.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var i=l[n];t.prototype[n]=function(){var t=this._wrapped;return i.apply(t,arguments),(n==="shift"||n==="splice")&&t.length===0&&delete t[0],y(this,t)}});t.each(["concat","join","slice"],function(n){var i=l[n];t.prototype[n]=function(){return y(this,i.apply(this._wrapped,arguments))}});t.prototype.value=function(){return this._wrapped};t.prototype.valueOf=t.prototype.toJSON=t.prototype.value;t.prototype.toString=function(){return""+this._wrapped};typeof n=="function"&&n.amd&&n("underscore",[],function(){return t})}).call(this)},{}]},{},[6])(6)});String.prototype.formatWithData||(String.prototype.formatWithData=function(n,t){return this.replace(/\{\d+\}/g,function(i){var r=t[n[i.match(/\d+/)]];return r&&typeof r!="function"&&typeof r!="object"?r:""})}),function(n){n.addSuper=function(t,r){var u,e,o,y,b,v,h,s,c,tt,f,it,k,rt,d,a,g,l,p,nt,w;if(t.grid)return!1;if(r=n.extend({height:"auto",width:"auto",striped:!0,novstripe:!1,minwidth:30,minheight:80,resizable:!1,url:!1,method:"GET",dataType:"json",errormsg:"Connection Error",usepager:!1,nowrap:!0,page:1,total:0,useRp:!0,rp:10,rpOptions:[5,10,25,50],title:!1,pagestat:"Displaying {from} to {to} of {total} items",procmsg:"Processing, please wait ...",query:"",qtype:"",nomsg:"No items",minColToggle:1,showToggleBtn:!1,hideOnSubmit:!0,autoload:!0,blockOpacity:.5,onToggleCol:!1,onChangeSort:!1,onSuccess:!1,onSubmit:!1,onError:function(){n("div.pReload").removeClass("loading")},onRender:!1,params:"",itemTemplateSelector:"",footerTemplateSelector:!1,noItemsTemplate:!1,headerTemplate:!1,editRowTemplateSelector:!1,noItemsMessageInBody:"",showTableToggleBtn:!0,onEditRow:!1,onAddRow:!1,enableInlineEditing:!1,inlineEditUpdateAction:!1,inlineEditInsertAction:!1,inlineEditPositionOffsetSelector:!1,gridTitle:!1,gridTitleActions:!1,showSelectorColumn:!1,selectorColumnHeading:"",selectorColumnWidth:35,enableSelection:!0,selectedItems:!1,singleSelect:!1,feedbackContainer:n(".infoMessageContainer"),inModal:!0,loadingMessage:"Loading data...",loadingTemplate:'<div class="noItemsMessageDiv"><p>{0}<\/p><div class="fakeProgressAnimation"><\/div><\/div>',loadingRowTemplate:'<tr id="griddLoading"><td>{0}<\/td><\/tr>'},r),n(t).show().attr({cellPadding:0,cellSpacing:0,border:0}).removeAttr("width"),u={settings:r,currentEditingRowId:null,renderedData:null,hset:{},rePosDrag:function(){var t=0-this.hDiv.scrollLeft,f,i;this.hDiv.scrollLeft>0&&(t-=Math.floor(r.cgwidth/2));n(u.cDrag).css({top:u.hDiv.offsetTop+1});f=this.cdpad;n("div",u.cDrag).hide();i=n("thead tr:first th:visible",this.hDiv).filter(IE8VisibilityFilter);i.each(function(){var o=i.index(this),e=parseInt(n(this).width()),s=e;t==0&&(t-=Math.floor(r.cgwidth/2));e=e+t+f;n("div:eq("+o+")",u.cDrag).css({left:e+"px"}).show();t=e})},fixHeight:function(t){var f,e,i;t=!1;t||(t=n(u.bDiv).height());f=n(this.hDiv).height();n("div",this.cDrag).each(function(){n(this).height(t+f)});e=parseInt(n(u.nDiv).height());e>t?n(u.nDiv).height(t).width(200):n(u.nDiv).height("auto").width("auto");n(u.block).css({height:t,marginBottom:t*-1});i=u.bDiv.offsetTop+t;r.height!="auto"&&r.resizable&&(i=u.vDiv.offsetTop);n(u.rDiv).css({height:i})},dragStart:function(t,i,f){var s,e,h,o;r.resizable&&(t=="colresize"?(s=n("th:visible",this.hDiv).filter(IE8VisibilityFilter),n(u.nDiv).hide(),n(u.nBtn).hide(),e=n("div",this.cDrag).index(f),h=s.filter(":eq("+e+")").find("> div").width(),n(f).addClass("dragging").siblings().hide(),n(f).prev().addClass("dragging").show(),this.colresize={startX:i.pageX,ol:parseInt(f.style.left),ow:h,n:e},n("body").css("cursor","col-resize")):t=="vresize"&&(o=!1,n("body").css("cursor","row-resize"),f&&(o=!0,n("body").css("cursor","col-resize")),this.vresize={h:r.height,sy:i.pageY,w:r.width,sx:i.pageX,hgo:o}),n("body").noSelect())},dragMove:function(t){var u;if(r.resizable)if(this.colresize){var s=this.colresize.n,f=t.pageX-this.colresize.startX,h=this.colresize.ol+f,o=this.colresize.ow+f;o>r.minwidth&&(n("div:eq("+s+")",this.cDrag).css("left",h),this.colresize.nw=o)}else if(this.vresize){var i=this.vresize,c=t.pageY,f=c-i.sy;if(r.defwidth||(r.defwidth=r.width),r.width!="auto"&&!r.nohresize&&i.hgo){var l=t.pageX,a=l-i.sx,e=i.w+a;e>r.defwidth&&(this.gDiv.style.width=e+"px",r.width=e)}u=i.h+f;(u>r.minheight||r.height<r.minheight)&&!i.hgo&&(this.bDiv.style.height=u+"px",r.height=u,this.fixHeight(u));i=null}},dragEnd:function(){var f;if(r.resizable){if(this.colresize){var t=this.colresize.n,i=this.colresize.nw,e=n("th:visible",this.hDiv).filter(IE8VisibilityFilter);e.filter(":eq("+t+")").find("> div").css("width",i);n("tr",this.bDiv).each(function(){f=n("td",this).filter(IE8VisibilityFilter);f.filter(":eq("+t+")").find("> div").css("width",i)});this.hDiv.scrollLeft=this.bDiv.scrollLeft;n("div:eq("+t+")",this.cDrag).siblings().show();n("div.dragging",this.cDrag).removeClass("dragging");this.rePosDrag();this.fixHeight();this.colresize=!1;r.enableInlineEditing&&r.editRowTemplateSelector&&u.refreshEditRowWidth(n(r.editRowTemplateSelector))}else this.vresize&&(this.vresize=!1);n("body").css("cursor","default");n("body").noSelect(!1)}},toggleCol:function(i,f){var e=n("th[axis='col"+i+"']",this.hDiv)[0],o=n("thead th",u.hDiv).index(e),s=n('input[value="'+i+'"]',u.nDiv)[0];if(f==null&&(f=e.hide),n("input:checked",u.nDiv).length<r.minColToggle&&!f)return!1;if(f?(e.hide=!1,n(e).show(),s.checked=!0):(e.hide=!0,n(e).hide(),s.checked=!1),n("tbody tr",t).each(function(){f?n("td:eq("+o+")",this).show():n("td:eq("+o+")",this).hide()}),this.rePosDrag(),r.onToggleCol)r.onToggleCol(i,f);return f},switchCol:function(i,u){r.resizable&&(n("tbody tr",t).each(function(){i>u?n("td:eq("+u+")",this).before(n("td:eq("+i+")",this)):n("td:eq("+u+")",this).after(n("td:eq("+i+")",this))}),i>u?n("tr:eq("+u+")",this.nDiv).before(n("tr:eq("+i+")",this.nDiv)):n("tr:eq("+u+")",this.nDiv).after(n("tr:eq("+i+")",this.nDiv)),n.browser.msie&&n.browser.version<7&&(n("tr:eq("+u+") input",this.nDiv)[0].checked=!0),this.hDiv.scrollLeft=this.bDiv.scrollLeft)},scroll:function(){this.hDiv.scrollLeft=this.bDiv.scrollLeft;this.rePosDrag()},updatePageStat:function(t){r.usepager&&(n("span.pPageStat",this.pDiv).html(t),r.gridTitle&&n("span.pPageStat",this.headerContainer).html("( "+t+" )"))},addData:function(data){var template,table,tbody;if(u.renderedData=jQuery.extend(!0,{},data),r.renderSummary&&data.Summary&&r.renderSummary.call(t,data.Summary),r.preProcess&&(data=eval(r.preProcess).call(t,data,r.colModel)),n("div.pReload",this.pDiv).removeClass("loading"),this.loading=!1,!data)return this.updatePageStat(r.errormsg),!1;if(r.summary=data.summary,this.buildsummary(),r.total=data.TotalCount,r.noItemsTemplate&&r.total==0&&(template=n.template(n(r.noItemsTemplate).html()),n(this.bDiv).html(template.apply(r.total))),r.total==0){if(n("tr, a, td, div",t).unbind(),n(t).empty(),r.pages=1,r.page=1,this.buildpager(),r.noItemsMessageInBody!=""&&(table=n("> table",this.bDiv),table.html("<tr><td>"+r.noItemsMessageInBody+"<\/td><\/tr>"),table.css("width","100%")),this.updatePageStat(r.nomsg),r.onRender)r.onRender(u);return!1}if(n("> table",this.bDiv).css("width","auto"),r.pages=Math.ceil(r.total/r.rp),r.page=data.PageNumber,this.buildpager(),tbody=document.createElement("tbody"),r.itemTemplateSelector!=""&&(template=n.template(n(r.itemTemplateSelector).html())),r.dataType=="json"&&n.each(data.rows,function(t,i){var f=document.createElement("tr"),e,o;if(t%2&&r.striped&&(f.className="erow"),i.id&&(f.id="row"+i.id,n(f).data("id",i.id),n(f).data("supergridDataRow",i.cache)),r.itemTemplateSelector!="")n(f).append(template.apply(i));else if(n("thead tr:first th",u.hDiv).each(function(){var u=document.createElement("td"),s=n(this).prop("abbr"),t=n(this).data("columnModel"),r,e,o;if(typeof t=="undefined")return!1;if(u.align=this.align,t.template)if(t.template.Render)n(u).html(t.template.Render(i.cell));else{if(t.template.NonDataItems){r=n.extend({},t.template.NonDataItems);for(e in r)r[e].hasToken()&&(r[e]=r[e].formatWithData(t.template.DataItems,i.cell))}o=r?n.extend(r,i.cell):i.cell;n(u).html(t.template.Tmpl.formatWithData(t.template.DataItems,o))}else u.innerHTML=i.cell[s];n(f).append(n(u))}),n("thead",this.gDiv).length<1)for(e=0;e<i.cell.length;e++)o=document.createElement("td"),o.innerHTML=i.cell[e],n(f).append(o),o=null;n(tbody).append(f);f=null}),n("tr",t).unbind(),n(t).empty(),n(t).append(tbody),this.addCellProp(),this.addRowProp(),this.rePosDrag(),tbody=null,data=null,i=null,r.onSuccess&&r.onSuccess(),r.hideOnSubmit&&n(u.block).remove(),this.hDiv.scrollLeft=this.bDiv.scrollLeft,n.browser.opera&&n(t).css("visibility","visible"),r.gridLoaded&&r.gridLoaded.call(n(this.bDiv.childNodes[0])),this.buildHeader(),r.onRender)r.onRender(u)},changeSort:function(t){if(this.loading)return!0;if(n(u.nDiv).hide(),n(u.nBtn).hide(),r.sortname==n(t).prop("abbr")&&(r.sortorder=r.sortorder=="Ascending"?"Descending":"Ascending"),n(t).addClass("sorted").siblings().removeClass("sorted"),n("div.sDescending",this.hDiv).removeClass("sDescending"),n("div.sAscending",this.hDiv).removeClass("sAscending"),n("div",t).addClass("s"+r.sortorder),r.sortname=n(t).prop("abbr"),r.onChangeSort)r.onChangeSort(r.sortname,r.sortorder);else this.populate()},buildpager:function(){var u,i,t;n("span.pcontrol input",this.pDiv).val(r.page);n("span.pcontrol span",this.pDiv).html(r.pages);u=(r.page-1)*r.rp+1;i=u+r.rp-1;r.total<i&&(i=r.total);t=r.pagestat;t=t.replace(/{from}/,u);t=t.replace(/{to}/,i);t=t.replace(/{total}/,r.total);this.updatePageStat(t)},buildsummary:function(){if(r.footerTemplateSelector){var t=n.template(n(r.footerTemplateSelector).html());n(u.efDiv).empty().append(t.apply(r.summary))}},populate:function(){var e,h,c,o,i,f,s;if(u.hideEditTemplate(),this.loading)return!0;if((e=n("> table",this.bDiv),h=r.loadingTemplate.format([r.loadingMessage]),e.html(r.loadingRowTemplate.format([h])),e.css("width","100%"),r.onSubmit&&(c=r.onSubmit(),!c))||(this.loading=!0,!r.url))return!1;if(this.updatePageStat(r.procmsg),n("div.pReload",this.pDiv).addClass("loading"),n(u.block).css({top:u.bDiv.offsetTop}),r.hideOnSubmit&&n(this.gDiv).prepend(u.block),n.browser.opera&&n(t).css("visibility","hidden"),r.newp||(r.newp=1),r.page>r.pages&&(r.page=r.pages),o="Ascending",(r.sortorder=="desc"||r.sortorder=="Descending")&&(o="Descending"),i=[{name:"PageNumber",value:r.newp},{name:"PageSize",value:r.rp},{name:"SortColumnName",value:r.sortname},{name:"SortDirection",value:o},{name:"query",value:r.query},{name:"qtype",value:r.qtype}],r.parameters&&n.isArray(r.parameters))for(f=0;f<r.parameters.length;f++)i[i.length]=r.parameters[f];else if(r.parameters)for(s in r.parameters)i[i.length]={name:s,value:r.parameters[s]};n.ngpAjax({type:r.method,url:r.url,data:i,dataType:r.dataType,success:function(t){u.addData(t);n(document).trigger("supergridLoadComplete")},error:function(n){try{if(r.onError)r.onError(n)}catch(t){}}})},doSearch:function(){r.query=n('input[name="q"]',u.sDiv).val();r.qtype=n('select[name="qtype"]',u.sDiv).val();r.newp=1;this.populate()},changePage:function(t){if(this.loading)return!0;switch(t){case"first":r.newp=1;break;case"prev":r.page>1&&(r.newp=parseInt(r.page)-1);break;case"next":r.page<r.pages&&(r.newp=parseInt(r.page)+1);break;case"last":r.newp=r.pages;break;case"input":var i=parseInt(n("span.pcontrol input",this.pDiv).val());isNaN(i)&&(i=1);i<1?i=1:i>r.pages&&(i=r.pages);n("span.pcontrol input",this.pDiv).val(i);r.newp=i}if(r.newp==r.page)return!1;if(r.onChangePage)r.onChangePage(r.newp);else this.populate()},addCellProp:function(){n("tbody tr td",u.bDiv).each(function(){var i=document.createElement("div"),o=n("td",n(this).parent()).index(this),t=n("th:eq("+o+")",u.hDiv).get(0),f,e;t!=null&&(t.hide&&n(this).css("display","none"),r.sortname==n(t).prop("abbr")&&r.sortname&&(this.className="sorted"),r.itemTemplateSelector?n(this).children("div").css({width:n("div:first",t)[0].style.width}):n(i).css({width:n("div:first",t)[0].style.width}));r.itemTemplateSelector||r.nowrap==!1&&n(i).css("white-space","normal");this.innerHTML==""&&(this.innerHTML="&nbsp;");r.itemTemplateSelector||(i.value=this.innerHTML,i.innerHTML=this.innerHTML,f=n(this).parent()[0],e=!1,f.id&&(e=f.id.substr(3)),t!=null&&t.process&&t.process(i,e),n(this).empty().append(i).removeAttr("width"))})},addRowProp:function(){var t=this;this.settings.enableSelection&&n("tbody tr",u.bDiv).each(function(){n(this).click(function(t){var i=t.target||t.srcElement,f=n(i).parent()[0];if(i.href||f.href||i.type&&i.type!=="checkbox"&&i.type!=="radio")return!0;n(":checkbox",n(this)).length>0&&n(":checkbox:disabled",n(this)).length==0||n(":checkbox",n(this)).length==0?(n(this).toggleClass("trSelected"),r.singleSelect&&n(this).siblings().removeClass("trSelected"),n(this).hasClass("trSelected")?u.selectedRows.selectItem(n(this).data("id")):u.selectedRows.removeItem(n(this).data("id")),r.showSelectorColumn&&n('input[name="columnSelector"]',n(this)).not(":disabled").prop("checked",n(this).hasClass("trSelected"))):n(this).removeClass("trSelected")}).mousedown(function(t){t.shiftKey&&(n(this).toggleClass("trSelected"),u.multisel=!0,this.focus(),n(u.gDiv).noSelect())}).mouseup(function(){u.multisel&&(u.multisel=!1,n(u.gDiv).noSelect(!1))}).hover(function(){u.multisel&&n(this).toggleClass("trSelected")},function(){});t.selectedRows&&t.selectedRows.contains(n(this).data("id"))&&n(this).click();r.enableInlineEditing&&n(this).dblclick(function(t){t.preventDefault();t.stopPropagation();elem=n(this);u.makeEditableRow(elem,elem.attr("id").substring(3))});n.browser.msie&&n.browser.version<7&&n(this).hover(function(){n(this).addClass("trOver")},function(){n(this).removeClass("trOver")})})},pager:0,buildHeader:function(){var t,i;r.title?(u.mDiv.className="mDiv",u.mDiv.innerHTML='<div class="ftitle">'+r.title+"<\/div>",n(u.gDiv).prepend(u.mDiv),r.showTableToggleBtn&&(n(u.mDiv).append('<div class="ptogtitle" title="Minimize/Maximize Table"><span><\/span><\/div>'),n("div.ptogtitle",u.mDiv).click(function(){n(u.gDiv).toggleClass("hideBody");n(this).toggleClass("vsble")}))):r.headerTemplate&&(t=n.template(n(r.headerTemplate).html()),u.mDiv.className="mDiv",i=t.apply({total:r.total}),u.mDiv.innerHTML='<div class="ftitle">'+i+"<\/div>",n(u.gDiv).prepend(u.mDiv),r.showTableToggleBtn&&(n(u.mDiv).append('<div class="ptogtitle" title="Minimize/Maximize Table"><span><\/span><\/div>'),n("div.ptogtitle",u.mDiv).click(function(){n(u.gDiv).toggleClass("hideBody");n(this).toggleClass("vsble")})))},makeEditableRow:function(t,i){var e;if(u.hideEditTemplate(),r.editRowTemplateSelector&&t){var s=n(t),o=u.prepareEditTemplate("edit",s),f=null;for(e=0;e<u.renderedData.rows.length;e++)if(u.renderedData.rows[e].id==i){f=u.renderedData.rows[e].cell;break}f!=null&&(u.currentEditingRowId=i,n("table input:not(:checkbox, :radio)",o).each(function(){var t=n(this),i=this.name,r=i.substring(i.indexOf(".")+1);t.val(f[r]);t.blur()}),n("table select",o).each(function(){var t=n(this),r=this.name,u=r.substring(r.indexOf(".")+1),i=n('option[value="'+f[u]+'"]',t);i.length==0&&n("option",t).each(function(){if(n(this).text()==f[u])return i=n(this),!1});t.val(i.val());t.blur()}),r.onEditRow&&r.onEditRow.call(this,o,f))}},addEditableRow:function(){var t,f,e,i,o;u.hideEditTemplate();t=n('<tr class="dummy"><\/tr>');f=n("<td><div>A<\/div><\/td>");n("th",u.hDiv).each(function(i,r){var e=n(r),u;e.css("display")!="none"?(u=f.clone(),n("div",u).width(n("div",e).width()),t.append(u)):t.append(f.clone().hide())});e=n("tr:first",u.bDiv);u.renderedData.TotalCount?t.height(e.height()):(n("> table",u.bDiv).css("width","auto"),e.hide());n("> table",u.bDiv).prepend(t);i=t.css("background-color");i||(i="#FFF");t.css("color",i);o=u.prepareEditTemplate("add",t);r.onAddRow&&r.onAddRow.call(this,o,null)},hideInlineRow:function(t,i){var f=n(r.editRowTemplateSelector);n(u.gDiv).parents().index(i)>=0&&f.hide()},showInlineRow:function(t,i){var f=n(r.editRowTemplateSelector);n(u.gDiv).parents().index(i)>=0&&f.show()},prepareEditTemplate:function(t,i){n(document).bind("containerhidden",u.hideInlineRow);n(document).bind("containershown",u.showInlineRow);var f=n(r.editRowTemplateSelector);return n("input",f).keydown(function(t){t.keyCode==13&&n(".defaultAction",n(this).parents("form")).click()}),t.toLowerCase()=="edit"?(f.removeClass("addTemplate").addClass("editTemplate"),n(".defaultAction",f).removeClass("insertButton").addClass("updateButton")):t.toLowerCase()=="add"&&(f.removeClass("editTemplate").addClass("addTemplate"),n(".defaultAction",f).removeClass("updateButton").addClass("insertButton")),u.updateEditTemplatePosition(f,i),f.height(i.height()),f.show(),u.clearTemplateValues(),u.refreshEditRowWidth(f),f},updateEditTemplatePosition:function(t,i){var e=n(t).closest("div.ui-dialog-content").length>0,u=n(i).offset(),f;r.inlineEditPositionOffsetSelector?(f=n(r.inlineEditPositionOffsetSelector).offset(),t.css("top",u.top-f.top-1),t.css("left",u.left-f.left-1)):(t.css("top",u.top),t.css("left",u.left));e&&t.css("zIndex",1040)},refreshEditRowWidth:function(t){n("td",t).each(function(){var i=n("td",n(this).parent()).index(this),t=n("th:eq("+i+")",u.hDiv).get(0);t!=null&&(t.hide&&n(this).css("display","none"),r.sortname==n(t).prop("abbr")&&r.sortname&&(this.className="sorted"),n(this).children("div").css({width:n("div:first",t)[0].style.width}))})},hideEditTemplate:function(){r.editRowTemplateSelector&&(n(r.editRowTemplateSelector).hide(),n("tr.dummy",u.bDiv).remove())},addInlineUpdateAction:function(){r.enableInlineEditing&&r.editRowTemplateSelector&&n(".defaultAction",n(r.editRowTemplateSelector)).click(function(){n(document).trigger("inlineEditUpdateAction");var t=n(this);t.hasClass("updateButton")?action=r.inlineEditUpdateAction:t.hasClass("insertButton")&&(action=r.inlineEditInsertAction);n.ngpAjax({url:action,data:getModalFormData.call(n(this)),success:function(n){u.inlineEditSuccessRefresh(n)},error:u.inlineEditFailureFunction,dataType:"json",type:"POST"})})},addInlineCancelAction:function(){r.enableInlineEditing&&r.editRowTemplateSelector&&n(".action.cancel a",n(r.editRowTemplateSelector)).click(function(){u.hideEditTemplate();u.currentEditingRowId=null;u.clearTemplateValues();n(document).unbind("containerhidden",u.hideInlineRow);n(document).unbind("containershown",u.showInlineRow);u.renderedData.TotalCount||(n("> table",u.bDiv).css("width","100%"),n("tr:first",u.bDiv).show());FeedBack&&FeedBack.close()})},inlineEditSuccessRefresh:function(t){t.ResponseResultCode==Constants.ResponseResultCode.Success?(u.populate(),u.hideEditTemplate(),u.currentEditingRowId=null,u.clearTemplateValues(),n(document).unbind("containerhidden",u.hideInlineRow),n(document).unbind("containershown",u.showInlineRow)):t.DisplayMessageType==Constants.MessageType.Error&&showAjaxValidation(r.feedbackContainer,t);clearSavingIndicator()},inlineEditFailureFunction:function(){clearSavingIndicator()},clearTemplateValues:function(){var t=n(r.editRowTemplateSelector+" tr");n("input, select, textarea",t).removeClass("input-validation-error");n("span.field-validation-error",t).remove();n("input:not(:checkbox, :radio), select, textarea",t).val("").blur();r.feedbackContainer.hide()},parameters:r.parameters},r.colModel){for(r.showSelectorColumn&&r.colModel[0].name!="Selector"&&r.colModel.unshift({display:r.selectorColumnHeading,name:"Selector",width:r.selectorColumnWidth,sortable:!1,align:"center",hide:!1,formatter:"checkboxColumn"}),c=document.createElement("thead"),tr=document.createElement("tr"),i=0;i<r.colModel.length;i++)e=r.colModel[i],e!=null&&(o=document.createElement("th"),o.innerHTML=e.display,n(o).data("columnModel",e),e.name&&n(o).prop("abbr",e.name),e.sortable&&n(o).addClass("sortable"),n(o).attr("colIndex",i),n(o).attr("axis","col"+i),e.align&&(o.align=e.align),e.width&&n(o).attr("width",e.width),e.hide&&(o.hide=!0),e.process&&(o.process=e.process),n(tr).append(o));n(c).append(tr);n(t).prepend(c)}if(u.gDiv=document.createElement("div"),u.mDiv=document.createElement("div"),u.hDiv=document.createElement("div"),u.bDiv=document.createElement("div"),u.vDiv=document.createElement("div"),u.rDiv=document.createElement("div"),u.cDrag=document.createElement("div"),u.block=document.createElement("div"),u.nDiv=document.createElement("div"),u.nBtn=document.createElement("div"),u.iDiv=document.createElement("div"),u.tDiv=document.createElement("div"),u.sDiv=document.createElement("div"),u.efDiv=document.createElement("div"),r.usepager&&(u.pDiv=document.createElement("div")),u.hTable=document.createElement("table"),u.gDiv.className="flexigrid",r.width!="auto"&&(u.gDiv.style.width=r.width+"px",u.headerContainer.style.width=r.width+"px"),n.browser.msie&&n(u.gDiv).addClass("ie"),r.novstripe&&n(u.gDiv).addClass("novstripe"),n(t).before(u.gDiv),n(u.gDiv).append(t),r.gridTitle&&(u.headerContainer=document.createElement("div"),u.headerContainer.className="sectionTitle flexigridHeading",y=n(u.headerContainer),y.html("<h2>"+r.gridTitle+'<\/h2> <span class="pPageStat"><\/span>'),n(u.gDiv).before(y),r.gridTitleActions&&(b=n('<span class="action"><\/span>'),n.each(r.gridTitleActions,function(){var t=typeof this=="string"?n(this):this.jquery?this:n(this.toString());b.append(t)}),y.append(b))),r.buttons){for(u.tDiv.className="tDiv",v=document.createElement("div"),v.className="tDiv2",i=0;i<r.buttons.length;i++)h=r.buttons[i],h.separator?n(v).append("<div class='btnseparator'><\/div>"):(s=document.createElement("div"),s.className="fbutton",s.innerHTML="<div><span>"+h.name+"<\/span><\/div>",h.bclass&&n("span",s).addClass(h.bclass).css({paddingLeft:20}),s.onpress=h.onpress,s.name=h.name,h.onpress&&n(s).click(function(){this.onpress(this.name,u.gDiv)}),n(v).append(s),n.browser.msie&&n.browser.version<7&&n(s).hover(function(){n(this).addClass("fbOver")},function(){n(this).removeClass("fbOver")}));n(u.tDiv).append(v);n(u.tDiv).append("<div style='clear:both'><\/div>");n(u.gDiv).prepend(u.tDiv)}if(u.hDiv.className="hDiv",n(t).before(u.hDiv),u.hTable.cellPadding=0,u.hTable.cellSpacing=0,n(u.hDiv).append('<div class="hDivBox"><\/div>'),n("div",u.hDiv).append(u.hTable),c=n("thead:first",t).get(0),c&&n(u.hTable).append(c),c=null,tt=0,n("thead tr:first th",u.hDiv).each(function(){var t=document.createElement("div");n(this).prop("abbr")&&r.colModel[parseInt(n(this).attr("colIndex"),10)].sortable&&(n(this).click(function(t){if(!n(this).hasClass("thOver"))return!1;var i=t.target||t.srcElement;if(i.href||i.type)return!0;u.changeSort(this)}),n(this).prop("abbr")==r.sortname&&(n(this).addClass="sorted",t.className="s"+r.sortorder));this.hide&&n(this).hide();r.colmodel||n(this).attr("axis","col"+tt++);n(t).css({textAlign:this.align,width:this.width+"px"});t.innerHTML=this.innerHTML;n(this).empty().append(t).removeAttr("width").hover(function(){if(u.colresize||n(this).addClass("thOver"),n(this).prop("abbr")!=r.sortname&&!u.colresize&&n(this).prop("abbr"))n("div",this).addClass("s"+r.sortorder);else if(n(this).prop("abbr")==r.sortname&&!u.colresize&&n(this).prop("abbr")){var t="";t=r.sortorder=="Ascending"?"Descending":"Ascending";n("div",this).removeClass("s"+r.sortorder).addClass("s"+t)}},function(){if(n(this).removeClass("thOver"),n(this).prop("abbr")!=r.sortname)n("div",this).removeClass("s"+r.sortorder);else if(n(this).prop("abbr")==r.sortname){var t="";t=r.sortorder=="Ascending"?"Descending":"Ascending";n("div",this).addClass("s"+r.sortorder).removeClass("s"+t)}})}),u.bDiv.className="bDiv",n(t).before(u.bDiv),n(t).empty().html("<tr><td><div><p><\/p><\/div><\/td><\/tr>"),n(u.bDiv).css({height:r.height=="auto"?"auto":r.height+"px"}).scroll(function(){u.scroll()}).append(t),r.height=="auto"&&n("table",u.bDiv).addClass("autoht"),u.addCellProp(),u.addRowProp(),r.enableInlineEditing&&(u.addInlineUpdateAction(),u.addInlineCancelAction()),r.resizable&&(f=n("thead tr:first th:visible:first",u.hDiv).get(0),f!=null&&(u.cDrag.className="cDrag",u.cdpad=0,u.cdpad+=isNaN(parseInt(n("div",f).css("borderLeftWidth")))?0:parseInt(n("div",f).css("borderLeftWidth")),u.cdpad+=isNaN(parseInt(n("div",f).css("borderRightWidth")))?0:parseInt(n("div",f).css("borderRightWidth")),u.cdpad+=isNaN(parseInt(n("div",f).css("paddingLeft")))?0:parseInt(n("div",f).css("paddingLeft")),u.cdpad+=isNaN(parseInt(n("div",f).css("paddingRight")))?0:parseInt(n("div",f).css("paddingRight")),u.cdpad+=isNaN(parseInt(n(f).css("borderLeftWidth")))?0:parseInt(n(f).css("borderLeftWidth")),u.cdpad+=isNaN(parseInt(n(f).css("borderRightWidth")))?0:parseInt(n(f).css("borderRightWidth")),u.cdpad+=isNaN(parseInt(n(f).css("paddingLeft")))?0:parseInt(n(f).css("paddingLeft")),u.cdpad+=isNaN(parseInt(n(f).css("paddingRight")))?0:parseInt(n(f).css("paddingRight")),n(u.bDiv).before(u.cDrag),it=n(u.bDiv).height(),k=n(u.hDiv).height(),n(u.cDrag).css({top:-k+"px"}),n("thead tr:first th:visible",u.hDiv).each(function(){var t=document.createElement("div");n(u.cDrag).append(t);r.cgwidth||(r.cgwidth=n(t).width());n(t).css({height:it+k}).mousedown(function(n){u.dragStart("colresize",n,this)});n.browser.msie&&n.browser.version<7&&(u.fixHeight(n(u.gDiv).height()),n(t).hover(function(){u.fixHeight();n(this).addClass("dragging")},function(){u.colresize||n(this).removeClass("dragging")}))})),r.striped&&n("tbody tr:odd",u.bDiv).addClass("erow"),r.resizable&&r.height!="auto"&&(u.vDiv.className="vGrip",n(u.vDiv).mousedown(function(n){u.dragStart("vresize",n)}).html("<span><\/span>"),n(u.bDiv).after(u.vDiv)),r.resizable&&r.width!="auto"&&!r.nohresize&&(u.rDiv.className="hGrip",n(u.rDiv).mousedown(function(n){u.dragStart("vresize",n,!0)}).html("<span><\/span>").css("height",n(u.gDiv).height()),n.browser.msie&&n.browser.version<7&&n(u.rDiv).hover(function(){n(this).addClass("hgOver")},function(){n(this).removeClass("hgOver")}),n(u.gDiv).append(u.rDiv))),r.usepager){if(u.pDiv.className="pDiv",u.pDiv.innerHTML='<div class="pDiv2"><\/div>',n(u.bDiv).after(u.pDiv),rt=' <div class="pGroup"> <div class="pFirst pButton"><span><\/span><\/div><div class="pPrev pButton"><span><\/span><\/div> <\/div> <div class="btnseparator"><\/div> <div class="pGroup"><span class="pcontrol">Page <input type="text" size="4" value="1" /> of <span> 1 <\/span><\/span><\/div> <div class="btnseparator"><\/div> <div class="pGroup"> <div class="pNext pButton"><span><\/span><\/div><div class="pLast pButton"><span><\/span><\/div> <\/div> <div class="btnseparator"><\/div> <div class="pGroup"> <div class="pReload pButton"><span><\/span><\/div> <\/div> <div class="btnseparator"><\/div> <div class="pGroup"><span class="pPageStat"><\/span><\/div>',n("div",u.pDiv).html(rt),n("div.pReload",u.pDiv).click(function(){u.populate()}),n("div.pFirst",u.pDiv).click(function(){u.changePage("first")}),n("div.pPrev",u.pDiv).click(function(){u.changePage("prev")}),n("div.pNext",u.pDiv).click(function(){u.changePage("next")}),n("div.pLast",u.pDiv).click(function(){u.changePage("last")}),n("span.pcontrol input",u.pDiv).keydown(function(n){n.keyCode==13&&u.changePage("input")}),n.browser.msie&&n.browser.version<7&&n(".pButton",u.pDiv).hover(function(){n(this).addClass("pBtnOver")},function(){n(this).removeClass("pBtnOver")}),r.useRp){for(d="",a=0;a<r.rpOptions.length;a++)sel=r.rp==r.rpOptions[a]?'selected="selected"':"",d+="<option value='"+r.rpOptions[a]+"' "+sel+" >"+r.rpOptions[a]+"&nbsp;&nbsp;<\/option>";n("div.pDiv2",u.pDiv).prepend("<div class='pGroup'><select name='PageSize'>"+d+"<\/select><\/div> <div class='btnseparator'><\/div>");n("select",u.pDiv).change(function(){if(r.onRpChange)r.onRpChange(+this.value);else r.newp=1,r.rp=+this.value,u.populate()})}if(r.footerTemplateSelector&&(u.efDiv.className="efDiv",u.efDiv.innerHTML="Loading...",n(u.gDiv).append(u.efDiv),r.showTableToggleBtn&&(n(u.efDiv).append('<div class="ptogtitle" title="Minimize/Maximize Table"><span><\/span><\/div>'),n("div.ptogtitle",u.efDiv).click(function(){n(u.gDiv).toggleClass("hideBody");n(this).toggleClass("vsble")}))),r.searchitems){for(n("div.pDiv2",u.pDiv).prepend("<div class='pGroup'> <div class='pSearch pButton'><span><\/span><\/div> <\/div>  <div class='btnseparator'><\/div>"),n("div.pSearch",u.pDiv).click(function(){n(u.sDiv).slideToggle("fast",function(){n(".sDiv:visible input:first",u.gDiv).trigger("focus")})}),u.sDiv.className="sDiv",sitems=r.searchitems,g="",l=0;l<sitems.length;l++)r.qtype==""&&sitems[l].isdefault==!0?(r.qtype=sitems[l].name,sel='selected="selected"'):sel="",g+="<option value='"+sitems[l].name+"' "+sel+" >"+sitems[l].display+"&nbsp;&nbsp;<\/option>";r.qtype==""&&(r.qtype=sitems[0].name);n(u.sDiv).append("<div class='sDiv2'>Quick Search <input type='text' size='30' name='q' class='qsbox' /> <select name='qtype'>"+g+"<\/select> <input type='button' value='Clear' /><\/div>");n('input[name="q"],select[name="qtype"]',u.sDiv).keydown(function(n){n.keyCode==13&&u.doSearch()});n('input[value="Clear"]',u.sDiv).click(function(){n('input[name="q"]',u.sDiv).val("");r.query="";u.doSearch()});n(u.bDiv).after(u.sDiv)}}return n(u.pDiv,u.sDiv).append("<div style='clear:both'><\/div>"),u.buildHeader(),u.cdropleft=document.createElement("span"),u.cdropleft.className="cdropleft",u.cdropright=document.createElement("span"),u.cdropright.className="cdropright",u.block.className="gBlock",p=n(u.bDiv).height(),nt=u.bDiv.offsetTop,n(u.block).css({width:u.bDiv.style.width,height:p,background:"white",position:"relative",marginBottom:p*-1,zIndex:1,top:nt,left:"0px"}),n(u.block).fadeTo(0,r.blockOpacity),n("th",u.hDiv).length&&(u.nDiv.className="nDiv",u.nDiv.innerHTML="<table cellpadding='0' cellspacing='0'><tbody><\/tbody><\/table>",n(u.nDiv).css({marginBottom:p*-1,display:"none",top:nt}).noSelect(),w=0,n("th div",u.hDiv).each(function(){var i=n("th[axis='col"+w+"']",u.hDiv)[0],t='checked="checked"';i.style.display=="none"&&(t="");n("tbody",u.nDiv).append('<tr><td class="ndcol1"><input type="checkbox" '+t+' class="togCol" value="'+w+'" /><\/td><td class="ndcol2">'+this.innerHTML+"<\/td><\/tr>");w++}),n.browser.msie&&n.browser.version<7&&n("tr",u.nDiv).hover(function(){n(this).addClass("ndcolover")},function(){n(this).removeClass("ndcolover")}),n("td.ndcol2",u.nDiv).click(function(){return n("input:checked",u.nDiv).length<=r.minColToggle&&n(this).prev().find("input")[0].checked?!1:u.toggleCol(n(this).prev().find("input").val())}),n("input.togCol",u.nDiv).click(function(){if(n("input:checked",u.nDiv).length<r.minColToggle&&this.checked==!1)return!1;n(this).parent().next().trigger("click")}),n(u.gDiv).prepend(u.nDiv),n(u.nBtn).addClass("nBtn").html("<div><\/div>").attr("title","Hide/Show Columns").click(function(){return n(u.nDiv).toggle(),!0}),r.showToggleBtn&&n(u.gDiv).prepend(u.nBtn)),n(u.iDiv).addClass("iDiv").css({display:"none"}),n(u.bDiv).append(u.iDiv),n(u.bDiv).hover(function(){n(u.nDiv).hide();n(u.nBtn).hide()},function(){u.multisel&&(u.multisel=!1)}),n(u.gDiv).hover(function(){},function(){n(u.nDiv).hide();n(u.nBtn).hide()}),n(u.gDiv).mousemove(function(n){u.dragMove(n)}),n(document).mouseup(function(){u.dragEnd()}).hover(function(){},function(){u.dragEnd()}),n.browser.msie&&n.browser.version<7&&(n(".hDiv,.bDiv,.mDiv,.pDiv,.vGrip,.tDiv, .sDiv",u.gDiv).css({width:"100%"}),n(u.gDiv).addClass("ie6"),r.width!="auto"&&n(u.gDiv).addClass("ie6fullwidthbug")),u.rePosDrag(),u.fixHeight(),u.selectedRows||(u.selectedRows={items:r.selectedItems||[],contains:function(n){return this.items.indexOf(n)!=-1},getCount:function(){return this.items.length},checkFeedback:function(){this.getCount()==2&&r.feedbackContainer.is(":visible")},removeItem:function(n){var t=this.items.indexOf(n);t!==-1&&this.items.splice(t,1);this.checkFeedback()},selectItem:function(n){this.contains(n)||this.items.push(n);this.checkFeedback()}}),t.p=r,t.grid=u,r.url&&r.autoload&&u.populate(),typeof r.gridTitleOnRender=="function"&&r.gridTitleOnRender(),t};var r=!1;n(document).ready(function(){r=!0});n.fn.supergrid=function(t){return this.each(function(){if(r)n.addSuper(this,t);else{n(this).hide();var i=this;n(document).ready(function(){n.addSuper(i,t)})}})};supergridModel=function(n,t){var i=n,f=t.deleteLink?t.deleteLink:"",e=t.detailLink?t.detailLink:"",o=t.updateLink?t.updateLink:"",s=t.deleteDialogTitle?t.deleteDialogTitle:"",r=t.isDeleteVisible?t.isDeleteVisible:"",u=t.isEditVisible?t.isEditVisible:"",h=function(n){return e.replace("0",n)},c=function(n){return f.replace("0",n)},l=function(n){return o.replace("0",n)};this.formatAmountColumnWithLink=function(n,t,i){return"<a href="+h(t.id)+' class="rightJustify" title="'+i+'">'+n+"<\/a>"};this.formatAmountColumnWithOutLink=function(n){return"<span class='rightJustify'>"+n+"<\/span>"};this.formatDate=function(n){return"<span class='rightJustify'>"+n+"<\/span>"};this.formatDeleteLink=function(n,t){return'<div class="action delete" name="delete"><a onclick=\'javascript: $.ngpAjax({ url: "'+c(t.id)+'", data: {}, success: function(result) { $(result).dialog({ width: 450, title: "'+s+'", modal: true }); }, error: null, dataType: "html", type: "GET" });\' ><\/a><\/div>'};this.formatUpdateLink=function(n,t){return'<div class="action edit" name="edit"><a href='+l(t.id)+"><\/a><\/div>"};this.setActionColumnVisibility=function(){u&&i.push({display:"",name:"Update",width:20,sortable:!1,align:"center",hide:!1,formatter:this.formatUpdateLink});r&&i.push({display:"",name:"Delete",width:20,sortable:!1,align:"left",hide:!1,formatter:this.formatDeleteLink})}();this.isEditVisible=function(){return u};this.isDeleteVisible=function(){return r};this.getModel=function(){return i};this.setModel=function(n){return i=n};this.preprocessData=function(data){for(var row,j,column,columnModel=i,i=0;i<data.rows.length;i++)for(row=jQuery.extend(!0,{},data.rows[i]),row.cache||(row.cache=jQuery.extend(!0,{},row.cell)),j=0;j<columnModel.length;j++)column=columnModel[j],column!=null&&column.formatter!=null&&(data.rows[i].cell[column.name]=eval(column.formatter).call(this,row.cell[j],row));return data}};preprocessData=function(data,colModel){for(var j,column,dataRow,dataItem,p,i=0;i<data.rows.length;i++){for(j=0;j<colModel.length;j++)if(column=colModel[j],dataRow=data.rows[i],dataRow.cache||(dataRow.cache=n.extend({},dataRow.cell)),column&&dataRow)if(dataItem=dataRow.cell[column.name],column.name=="Selector"){var type=this.p.singleSelect?"radio":"checkbox",matcher=function(n){return n==dataRow.id},checked=this.grid.settings.enableSelection&&(this.grid.selectedRows.items.contains(matcher)||this.grid.settings.selectedItems&&n.isArray(this.grid.settings.selectedItems)&&this.grid.settings.selectedItems.contains(matcher));data.rows[i].cell[column.name]='<input type="'+type+'" name="columnSelector" value="'+dataRow.id+'" '+(checked?"checked ":"")+"/>"}else column.formatter!=null&&(data.rows[i].cell[column.name]=eval(column.formatter)(dataItem,dataRow));p=this}return data};n.fn.supergridAdjustWidth=function(i){this.each(function(){var r,e,o,f;t=n(this).parents(".flexigrid");r=n(".hDiv th:visible",t).filter(IE8VisibilityFilter).length-1;typeof i=="undefined"?i=r-1:i>r&&(i=r-1);var h=n(".bDiv",t).width(),c=n(".bDiv table",t).width(),u=h-c;for(hasVerticalScrollbar(n(".bDiv",t))&&(u-=18),e=n(".hDiv th:visible",t).filter(IE8VisibilityFilter).filter(":eq("+i+")").find("> div"),o=n(".bDiv tr",t),e.width(e.width()+u),o.each(function(){var t=n("td:visible",this).filter(IE8VisibilityFilter).filter(":eq("+i+")").find("> div");t.width(t.width()+u)}),f=i;f<=r;f++){var s=n(".cDrag div:eq("+f+")",t),l=parseInt(s.css("left")),a=parseInt(l+u);s.css("left",a)}})};n.fn.superRefresh=function(){return this.length>0&&this[0].grid.populate(),this};n.fn.addInlineRow=function(){this[0].grid.addEditableRow()};n.fn.superOptions=function(t){return this.each(function(){this.grid&&n.extend(this.p,t)})};n.fn.superToggleCol=function(n,t){return this.each(function(){this.grid&&this.grid.toggleCol(n,t)})};n.fn.superAddData=function(n){return this.each(function(){this.grid&&this.grid.addData(n)})};n.fn.noSelect=function(t){return prevent=t==null?!0:t,prevent?this.each(function(){n.browser.msie||n.browser.safari?n(this).bind("selectstart",function(){return!1}):n.browser.mozilla?(n(this).css("MozUserSelect","none"),n("body").trigger("focus")):n.browser.opera?n(this).bind("mousedown",function(){return!1}):n(this).prop("unselectable","on")}):this.each(function(){n.browser.msie||n.browser.safari?n(this).unbind("selectstart"):n.browser.mozilla?n(this).css("MozUserSelect","inherit"):n.browser.opera?n(this).unbind("mousedown"):n(this).removeAttr("unselectable","on")})}}(jQuery),function(n){ngp.extend("ngp.supergrid",{GetHelper:function(t){var i={SimpleTemplate:function(t,i,r,u){this.DataItems=i;this.NonDataItems=r;this.Tmpl=u?n("#"+t):t;this.Render=function(t){var i,r,f,o,e;if(this.NonDataItems){i=n.extend({},this.NonDataItems);for(r in i)i[r]&&i[r].hasToken()&&(i[r]=i[r].formatWithData(this.DataItems,t))}return f=this.NonDataItems?n.extend(i||{},t):t,u?(o=n("<div><\/div>").append(this.Tmpl.tmpl(f)),o.html()):(e=""+this.Tmpl,this.DataItems?e.formatWithData(this.DataItems,f):e)}},MicroTemplates:{Date:'<span class="rightJustify">{0}<\/span>',AmountWithLink:'<a href="{0}" class="rightJustify" title="{1}">{2}<\/a>',AmountWithoutLink:'<span class="rightJustify">{0}<\/span>',ActionAjaxLink:'<div class="action {0}" name="{0}"><a data-click-method="{1}" data-click-params="{2}" title="{3}"><\/a><\/div>',ActionLink:'<div class="action {0}" name="{0}"><a href="{1}" title="{2}"><\/a><\/div>',TitleActionJsLink:'<a class="{0}" data-click-method="{1}" data-click-params="{2}" title="{3}">{4}<\/a>',TitleActionLink:'<a class="{0}" href="{1}" title="{2}">{3}<\/a>',TextLink:'<a href="{0}" title="{1}">{2}<\/a>',DisplayName:'<span class="listName">{0}<\/span>',NoDataMessage:'<div class="noItemsMessageDiv">{0}<\/div>'},FormatMessage:function(n){var t=i.Settings.Messages[n];return t.Template.format(t.Message)},RenderGrid:function(r){if(i.GridTable=n(t),r)var u=n.extend(!0,{dataType:"json",usepager:!0,title:!1,nowrap:!0,useRp:!0,resizable:!0,height:"auto",rp:25,rpOptions:[25,50,75,100],preProcess:preprocessData,onError:function(){FeedBack.showError("Error loading the grid")}},r||{});else u={url:i.Settings.Links.List,dataType:"json",colModel:i.ColumnModel,sortname:i.Settings.SortName,sortorder:i.Settings.SortOrder,usepager:!0,title:!1,nowrap:!0,useRp:!0,resizable:!0,height:"auto",rp:25,rpOptions:[25,50,75,100],pagestat:i.Settings.Messages.PageStat.Messages,nomsg:i.Settings.Messages.PageStatNoData.Message,noItemsMessageInBody:i.FormatMessage("NoData"),preProcess:preprocessData,gridTitle:i.Settings.Terms.GridTitle,gridTitleActions:i.Settings.GridTitleActions(),renderSummary:i.Settings.RenderSummary,onRender:i.Settings.OnRender,onError:function(){FeedBack.showError("Error loading the grid")}},i.Settings.showSelectorColumn&&(u.showSelectorColumn=i.Settings.showSelectorColumn),i.Settings.singleSelect&&(u.singleSelect=i.Settings.singleSelect),i.Settings.onToggleCol&&(u.onToggleCol=i.Settings.onToggleCol);i.GridTable.supergrid(u)},Init:function(t){var i=t;t&&t.GridOptions?(this.Settings=t,this.Settings.Links.List=i.url,this.PageMode=t.PageMode,this.RenderGrid(t.GridOptions)):(i&&(this.Settings=n.extend({Links:{},Messages:{NoData:{Message:"No records found.",Template:"{0}"}},Terms:{GridTitle:!1}},i),this.ListUrl=i.Links.List,this.ColumnModel=i.ColumnModel,this.PageMode=i.PageMode),this.RenderGrid())},DeleteDialog:function(n,t){var r={dialogClass:"deleteDialogWrapper",title:t||"Delete Confirmation",width:450,minWidth:450,success:function(n){n.ResultCode==Constants.ResponseResultCode.Success&&i.GridTable.superRefresh()}};ngp.modalDialog.open(n,r)},DeleteConfirmed:function(){i.GridTable.superRefresh()}};return i}})}(jQuery),function(){function o(r){var u=t;r&&(t[r]||(t[r]={}),u=t[r]);u.define&&u.define.packaged||(n.original=u.define,u.define=n,u.define.packaged=!0);u.require&&u.require.packaged||(i.original=u.require,u.require=i,u.require.packaged=!0)}var u="",t=function(){return this}(),n;if(t||typeof window=="undefined"||(t=window),u||typeof requirejs=="undefined"){n=function(t,i,r){if(typeof t!="string"){n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=i);n.modules[t]||(n.payloads[t]=r,n.modules[t]=null)};n.modules={};n.payloads={};var f=function(n,t,r){var f,o,u,h,s;if(typeof t=="string"){if(f=e(n,t),f!=undefined)return r&&r(),f}else if(Object.prototype.toString.call(t)==="[object Array]"){for(o=[],u=0,h=t.length;u<h;++u){if(s=e(n,t[u]),s==undefined&&i.original)return;o.push(s)}return r&&r.apply(null,o)||!0}},i=function(n,t){var r=f("",n,t);return r==undefined&&i.original?i.original.apply(this,arguments):r},r=function(n,t){var i,u,f;if(t.indexOf("!")!==-1)return i=t.split("!"),r(n,i[0])+"!"+r(n,i[1]);if(t.charAt(0)==".")for(u=n.split("/").slice(0,-1).join("/"),t=u+"/"+t;t.indexOf(".")!==-1&&f!=t;)f=t,t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"");return t},e=function(t,i){var u;if(i=r(t,i),u=n.modules[i],!u){if(u=n.payloads[i],typeof u=="function"){var e={},o={id:i,uri:"",exports:e,packaged:!0},s=function(n,t){return f(i,n,t)},h=u(s,e,o);e=h||o.exports;n.modules[i]=e;delete n.payloads[i]}u=n.modules[i]=e||u}return u};o(u)}}();define("ace/lib/regexp",["require","exports","module"],function(){"use strict";function r(n){return(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.extended?"x":"")+(n.sticky?"y":"")}function u(n,t,i){if(Array.prototype.indexOf)return n.indexOf(t,i);for(var r=i||0;r<n.length;r++)if(n[r]===t)return r;return-1}var n={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=n.exec.call(/()??/,"")[1]===undefined,t=function(){var t=/^/g;return n.test.call(t,""),!t.lastIndex}();t&&i||(RegExp.prototype.exec=function(f){var e=n.exec.apply(this,arguments),s,h,o;if(typeof f=="string"&&e){if(!i&&e.length>1&&u(e,"")>-1&&(h=RegExp(this.source,n.replace.call(r(this),"g","")),n.replace.call(f.slice(e.index),h,function(){for(var n=1;n<arguments.length-2;n++)arguments[n]===undefined&&(e[n]=undefined)})),this._xregexp&&this._xregexp.captureNames)for(o=1;o<e.length;o++)s=this._xregexp.captureNames[o-1],s&&(e[s]=e[o]);!t&&this.global&&!e[0].length&&this.lastIndex>e.index&&this.lastIndex--}return e},t||(RegExp.prototype.test=function(t){var i=n.exec.call(this,t);return i&&this.global&&!i[0].length&&this.lastIndex>i.index&&this.lastIndex--,!!i}))});define("ace/lib/es5-shim",["require","exports","module"],function(){function c(){}function g(n){try{return Object.defineProperty(n,"sentinel",{}),"sentinel"in n}catch(t){}}function et(n){return n=+n,n!==n?n=0:n!==0&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}var b,v,r,k,d,nt,tt,h,at,f,ut,ft,u;Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,r,i;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);return r=o.call(arguments,1),i=function(){if(this instanceof i){var u=t.apply(this,r.concat(o.call(arguments)));return Object(u)===u?u:this}return t.apply(n,r.concat(o.call(arguments)))},t.prototype&&(c.prototype=t.prototype,i.prototype=new c,c.prototype=null),i});var e=Function.prototype.call,ot=Array.prototype,t=Object.prototype,o=ot.slice,n=e.bind(t.toString),i=e.bind(t.hasOwnProperty),p,w,l,a,s;if((s=i(t,"__defineGetter__"))&&(p=e.bind(t.__defineGetter__),w=e.bind(t.__defineSetter__),l=e.bind(t.__lookupGetter__),a=e.bind(t.__lookupSetter__)),[1,2].splice(0).length!=2&&(function(){function i(n){var t=new Array(n+2);return t[0]=t[1]=0,t}var n=[],t;return n.splice.apply(n,i(20)),n.splice.apply(n,i(26)),t=n.length,n.splice(5,0,"XXX"),t+1==n.length,t+1==n.length?!0:void 0}()?(b=Array.prototype.splice,Array.prototype.splice=function(n,t){return arguments.length?b.apply(this,[n===void 0?0:n,t===void 0?this.length-n:t].concat(o.call(arguments,2))):[]}):Array.prototype.splice=function(n,t){var r=this.length,i;n>0?n>r&&(n=r):n==void 0?n=0:n<0&&(n=Math.max(r+n,0));n+t<r||(t=r-n);var a=this.slice(n,n+t),e=o.call(arguments,2),f=e.length;if(n===r)f&&this.push.apply(this,e);else{var h=Math.min(t,r-n),u=n+h,s=u+f-h,l=r-u,c=r-h;if(s<u)for(i=0;i<l;++i)this[s+i]=this[u+i];else if(s>u)for(i=l;i--;)this[s+i]=this[u+i];if(f&&n===c)this.length=c,this.push.apply(this,e);else for(this.length=c+f,i=0;i<f;++i)this[n+i]=e[i]}return a}),Array.isArray||(Array.isArray=function(t){return n(t)=="[object Array]"}),v=Object("a"),r=v[0]!="a"||!(0 in v),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e=u(this),f=r&&n(this)=="[object String]"?this.split(""):e,o=arguments[1],i=-1,s=f.length>>>0;if(n(t)!="[object Function]")throw new TypeError;while(++i<s)i in f&&t.call(o,f[i],i,e)}),Array.prototype.map||(Array.prototype.map=function(t){var e=u(this),f=r&&n(this)=="[object String]"?this.split(""):e,o=f.length>>>0,s=Array(o),h=arguments[1],i;if(n(t)!="[object Function]")throw new TypeError(t+" is not a function");for(i=0;i<o;i++)i in f&&(s[i]=t.call(h,f[i],i,e));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var o=u(this),f=r&&n(this)=="[object String]"?this.split(""):o,h=f.length>>>0,s=[],e,c=arguments[1],i;if(n(t)!="[object Function]")throw new TypeError(t+" is not a function");for(i=0;i<h;i++)i in f&&(e=f[i],t.call(c,e,i,o)&&s.push(e));return s}),Array.prototype.every||(Array.prototype.every=function(t){var e=u(this),f=r&&n(this)=="[object String]"?this.split(""):e,o=f.length>>>0,s=arguments[1],i;if(n(t)!="[object Function]")throw new TypeError(t+" is not a function");for(i=0;i<o;i++)if(i in f&&!t.call(s,f[i],i,e))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var e=u(this),f=r&&n(this)=="[object String]"?this.split(""):e,o=f.length>>>0,s=arguments[1],i;if(n(t)!="[object Function]")throw new TypeError(t+" is not a function");for(i=0;i<o;i++)if(i in f&&t.call(s,f[i],i,e))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var s=u(this),f=r&&n(this)=="[object String]"?this.split(""):s,o=f.length>>>0,i,e;if(n(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!o&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");if(i=0,arguments.length>=2)e=arguments[1];else do{if(i in f){e=f[i++];break}if(++i>=o)throw new TypeError("reduce of empty array with no initial value");}while(1);for(;i<o;i++)i in f&&(e=t.call(void 0,e,f[i],i,s));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var o=u(this),e=r&&n(this)=="[object String]"?this.split(""):o,s=e.length>>>0,f,i;if(n(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!s&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");if(i=s-1,arguments.length>=2)f=arguments[1];else do{if(i in e){f=e[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value");}while(1);do i in this&&(f=t.call(void 0,f,e[i],i,o));while(i--);return f}),Array.prototype.indexOf&&[0,1].indexOf(1,2)==-1||(Array.prototype.indexOf=function(t){var f=r&&n(this)=="[object String]"?this.split(""):u(this),e=f.length>>>0,i;if(!e)return-1;for(i=0,arguments.length>1&&(i=et(arguments[1])),i=i>=0?i:Math.max(0,e+i);i<e;i++)if(i in f&&f[i]===t)return i;return-1}),Array.prototype.lastIndexOf&&[0,1].lastIndexOf(0,-3)==-1||(Array.prototype.lastIndexOf=function(t){var f=r&&n(this)=="[object String]"?this.split(""):u(this),e=f.length>>>0,i;if(!e)return-1;for(i=e-1,arguments.length>1&&(i=Math.min(i,et(arguments[1]))),i=i>=0?i:e-Math.abs(i);i>=0;i--)if(i in f&&t===f[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(n){return n.__proto__||(n.constructor?n.constructor.prototype:t)}),Object.getOwnPropertyDescriptor||(k="Object.getOwnPropertyDescriptor called on a non-object: ",Object.getOwnPropertyDescriptor=function(n,r){var u,o,f,e;if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(i(n,r))return(u={enumerable:!0,configurable:!0},s&&(o=n.__proto__,n.__proto__=t,f=l(n,r),e=a(n,r),n.__proto__=o,f||e))?(f&&(u.get=f),e&&(u.set=e),u):(u.value=n[r],u)}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(n){return Object.keys(n)}),Object.create||(d=Object.prototype.__proto__===null?function(){return{__proto__:null}}:function(){var n={};for(var t in n)n[t]=null;return n.constructor=n.hasOwnProperty=n.propertyIsEnumerable=n.isPrototypeOf=n.toLocaleString=n.toString=n.valueOf=n.__proto__=null,n},Object.create=function(n,t){var i,r;if(n===null)i=d();else{if(typeof n!="object")throw new TypeError("typeof prototype["+typeof n+"] != 'object'");r=function(){};r.prototype=n;i=new r;i.__proto__=n}return t!==void 0&&Object.defineProperties(i,t),i}),Object.defineProperty&&(nt=g({}),tt=typeof document=="undefined"||g(document.createElement("div")),nt&&tt||(h=Object.defineProperty)),!Object.defineProperty||h){var st="Property description must be an object: ",ht="Object.defineProperty called on non-object: ",ct="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(n,r,u){if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(ht+n);if(typeof u!="object"&&typeof u!="function"||u===null)throw new TypeError(st+u);if(h)try{return h.call(Object,n,r,u)}catch(e){}if(i(u,"value"))if(s&&(l(n,r)||a(n,r))){var f=n.__proto__;n.__proto__=t;delete n[r];n[r]=u.value;n.__proto__=f}else n[r]=u.value;else{if(!s)throw new TypeError(ct);i(u,"get")&&p(n,r,u.get);i(u,"set")&&w(n,r,u.set)}return n}}Object.defineProperties||(Object.defineProperties=function(n,t){for(var r in t)i(t,r)&&Object.defineProperty(n,r,t[r]);return n});Object.seal||(Object.seal=function(n){return n});Object.freeze||(Object.freeze=function(n){return n});try{Object.freeze(function(){})}catch(li){Object.freeze=function(n){return function(t){return typeof t=="function"?t:n(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(n){return n}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(n){var t,r;if(Object(n)===n)throw new TypeError;for(t="";i(n,t);)t+="?";return n[t]=!0,r=i(n,t),delete n[t],r}),!Object.keys){var it=!0,rt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],lt=rt.length;for(at in{toString:null})it=!1;Object.keys=function(n){var t,u,r,e,f;if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError("Object.keys called on a non-object");t=[];for(u in n)i(n,u)&&t.push(u);if(it)for(r=0,e=lt;r<e;r++)f=rt[r],i(n,f)&&t.push(f);return t}}Date.now||(Date.now=function(){return(new Date).getTime()});f="\t\n\x0b\f\r   ᠎             　\u2028\u2029﻿";(!String.prototype.trim||f.trim())&&(f="["+f+"]",ut=new RegExp("^"+f+f+"*"),ft=new RegExp(f+f+"*$"),String.prototype.trim=function(){return String(this).replace(ut,"").replace(ft,"")});u=function(n){if(n==null)throw new TypeError("can't convert "+n+" to object");return Object(n)}});define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(n){"use strict";n("./regexp");n("./es5-shim")});define("ace/lib/dom",["require","exports","module"],function(n,t){"use strict";var i="http://www.w3.org/1999/xhtml";if(t.getDocumentHead=function(n){return n||(n=document),n.head||n.getElementsByTagName("head")[0]||n.documentElement},t.createElement=function(n,t){return document.createElementNS?document.createElementNS(t||i,n):document.createElement(n)},t.hasCssClass=function(n,t){var i=(n.className+"").split(/\s+/g);return i.indexOf(t)!==-1},t.addCssClass=function(n,i){t.hasCssClass(n,i)||(n.className+=" "+i)},t.removeCssClass=function(n,t){for(var i=n.className.split(/\s+/g),r;;){if(r=i.indexOf(t),r==-1)break;i.splice(r,1)}n.className=i.join(" ")},t.toggleCssClass=function(n,t){for(var i=n.className.split(/\s+/g),r=!0,u;;){if(u=i.indexOf(t),u==-1)break;r=!1;i.splice(u,1)}return r&&i.push(t),n.className=i.join(" "),r},t.setCssClass=function(n,i,r){r?t.addCssClass(n,i):t.removeCssClass(n,i)},t.hasCssString=function(n,t){var r=0,i;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){while(r<i.length)if(i[r++].owningElement.id===n)return!0}else if(i=t.getElementsByTagName("style"))while(r<i.length)if(i[r++].id===n)return!0;return!1},t.importCssString=function(n,i,r){if(r=r||document,i&&t.hasCssString(i,r))return null;var u;i&&(n+="\n/*# sourceURL=ace/css/"+i+" */");r.createStyleSheet?(u=r.createStyleSheet(),u.cssText=n,i&&(u.owningElement.id=i)):(u=t.createElement("style"),u.appendChild(r.createTextNode(n)),i&&(u.id=i),t.getDocumentHead(r).appendChild(u))},t.importCssStylsheet=function(n,i){if(i.createStyleSheet)i.createStyleSheet(n);else{var r=t.createElement("link");r.rel="stylesheet";r.href=n;t.getDocumentHead(i).appendChild(r)}},t.getInnerWidth=function(n){return parseInt(t.computedStyle(n,"paddingLeft"),10)+parseInt(t.computedStyle(n,"paddingRight"),10)+n.clientWidth},t.getInnerHeight=function(n){return parseInt(t.computedStyle(n,"paddingTop"),10)+parseInt(t.computedStyle(n,"paddingBottom"),10)+n.clientHeight},t.scrollbarWidth=function(n){var r=t.createElement("ace_inner"),u,i,e,o,f;return r.style.width="100%",r.style.minWidth="0px",r.style.height="200px",r.style.display="block",u=t.createElement("ace_outer"),i=u.style,i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",u.appendChild(r),e=n.documentElement,e.appendChild(u),o=r.offsetWidth,i.overflow="scroll",f=r.offsetWidth,o==f&&(f=u.clientWidth),e.removeChild(u),o-f},typeof document=="undefined"){t.importCssString=function(){};return}window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft});t.computedStyle=window.getComputedStyle?function(n,t){return t?(window.getComputedStyle(n,"")||{})[t]||"":window.getComputedStyle(n,"")||{}}:function(n,t){return t?n.currentStyle[t]:n.currentStyle};t.setInnerHtml=function(n,t){var i=n.cloneNode(!1);return i.innerHTML=t,n.parentNode.replaceChild(i,n),i};"textContent"in document.documentElement?(t.setInnerText=function(n,t){n.textContent=t},t.getInnerText=function(n){return n.textContent}):(t.setInnerText=function(n,t){n.innerText=t},t.getInnerText=function(n){return n.innerText});t.getParentWindow=function(n){return n.defaultView||n.parentWindow}});define("ace/lib/oop",["require","exports","module"],function(n,t){"use strict";t.inherits=function(n,t){n.super_=t;n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})};t.mixin=function(n,t){for(var i in t)n[i]=t[i];return n};t.implement=function(n,i){t.mixin(n,i)}});define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(n,t){"use strict";n("./fixoldbrowsers");var i=n("./oop"),r=function(){var n={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:"*"}},r;for(var t in n.FUNCTION_KEYS)r=n.FUNCTION_KEYS[t].toLowerCase(),n[r]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)r=n.PRINTABLE_KEYS[t].toLowerCase(),n[r]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],n[173]="-",function(){for(var i=["cmd","ctrl","alt","shift"],t=Math.pow(2,i.length);t--;)n.KEY_MODS[t]=i.filter(function(i){return t&n.KEY_MODS[i]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r);t.keyCodeToString=function(n){var t=r[n];return typeof t!="string"&&(t=String.fromCharCode(n)),t.toLowerCase()}});define("ace/lib/useragent",["require","exports","module"],function(n,t){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},typeof navigator=="object"){var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r=="win";t.isMac=r=="mac";t.isLinux=r=="linux";t.isIE=navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]);t.isOldIE=t.isIE&&t.isIE<9;t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&window.navigator.product==="Gecko";t.isOldGecko=t.isGecko&&parseInt((i.match(/rv:(\d+)/)||[])[1],10)<4;t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]";t.isWebKit=parseFloat(i.split("WebKit/")[1])||undefined;t.isChrome=parseFloat(i.split(" Chrome/")[1])||undefined;t.isAIR=i.indexOf("AdobeAIR")>=0;t.isIPad=i.indexOf("iPad")>=0;t.isTouchPad=i.indexOf("TouchPad")>=0;t.isChromeOS=i.indexOf(" CrOS ")>=0}});define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,t){"use strict";function o(n,t,o){var s=f(t),c,h;if(!i.isMac&&r){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(s|=8),r.altGr)if((3&s)!=3)r.altGr=0;else return;(o===18||o===17)&&(h="location"in t?t.location:t.keyLocation,o===17&&h===1?r[o]==1&&(e=t.timeStamp):o===18&&s===3&&h===2&&(c=t.timeStamp-e,c<50&&(r.altGr=!0)))}if(o in u.MODIFIER_KEYS&&(o=-1),s&8&&o>=91&&o<=93&&(o=-1),s||o!==13||(h="location"in t?t.location:t.keyLocation,h!==3||(n(t,s,-o),!t.defaultPrevented))){if(i.isChromeOS&&s&8){if(n(t,s,o),t.defaultPrevented)return;s&=-9}return!s&&!(o in u.FUNCTION_KEYS)&&!(o in u.PRINTABLE_KEYS)?!1:n(t,s,o)}}function s(){r=Object.create(null)}var u=n("./keys"),i=n("./useragent"),r=null,e=0,f,h;t.addListener=function(n,t,i){if(n.addEventListener)return n.addEventListener(t,i,!1);if(n.attachEvent){var r=function(){i.call(n,window.event)};i._wrapper=r;n.attachEvent("on"+t,r)}};t.removeListener=function(n,t,i){if(n.removeEventListener)return n.removeEventListener(t,i,!1);n.detachEvent&&n.detachEvent("on"+t,i._wrapper||i)};t.stopEvent=function(n){return t.stopPropagation(n),t.preventDefault(n),!1};t.stopPropagation=function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0};t.preventDefault=function(n){n.preventDefault?n.preventDefault():n.returnValue=!1};t.getButton=function(n){return n.type=="dblclick"?0:n.type=="contextmenu"||i.isMac&&n.ctrlKey&&!n.altKey&&!n.shiftKey?2:n.preventDefault?n.button:{1:0,2:2,4:1}[n.button]};t.capture=function(n,i,r){function u(n){i&&i(n);r&&r(n);t.removeListener(document,"mousemove",i,!0);t.removeListener(document,"mouseup",u,!0);t.removeListener(document,"dragstart",u,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",u,!0),t.addListener(document,"dragstart",u,!0),u};t.addTouchMoveListener=function(n,i){if("ontouchmove"in n){var r,u;t.addListener(n,"touchstart",function(n){var t=n.changedTouches[0];r=t.clientX;u=t.clientY});t.addListener(n,"touchmove",function(n){var f=1,t=n.changedTouches[0];n.wheelX=-(t.clientX-r)/f;n.wheelY=-(t.clientY-u)/f;r=t.clientX;u=t.clientY;i(n)})}};t.addMouseWheelListener=function(n,i){"onmousewheel"in n?t.addListener(n,"mousewheel",function(n){var t=8;n.wheelDeltaX!==undefined?(n.wheelX=-n.wheelDeltaX/t,n.wheelY=-n.wheelDeltaY/t):(n.wheelX=0,n.wheelY=-n.wheelDelta/t);i(n)}):"onwheel"in n?t.addListener(n,"wheel",function(n){var t=.35;switch(n.deltaMode){case n.DOM_DELTA_PIXEL:n.wheelX=n.deltaX*t||0;n.wheelY=n.deltaY*t||0;break;case n.DOM_DELTA_LINE:case n.DOM_DELTA_PAGE:n.wheelX=(n.deltaX||0)*5;n.wheelY=(n.deltaY||0)*5}i(n)}):t.addListener(n,"DOMMouseScroll",function(n){n.axis&&n.axis==n.HORIZONTAL_AXIS?(n.wheelX=(n.detail||0)*5,n.wheelY=0):(n.wheelX=0,n.wheelY=(n.detail||0)*5);i(n)})};t.addMultiMouseDownListener=function(n,r,u,f){function l(n){if(t.getButton(n)!==0?e=0:n.detail>1?(e++,e>4&&(e=1)):e=1,i.isIE){var l=Math.abs(n.clientX-s)>5||Math.abs(n.clientY-h)>5;(!o||l)&&(e=1);o&&clearTimeout(o);o=setTimeout(function(){o=null},r[e-1]||600);e==1&&(s=n.clientX,h=n.clientY)}if(n._clicks=e,u[f]("mousedown",n),e>4)e=0;else if(e>1)return u[f](c[e],n)}function a(n){e=2;o&&clearTimeout(o);o=setTimeout(function(){o=null},r[e-1]||600);u[f]("mousedown",n);u[f](c[e],n)}var e=0,s,h,o,c={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(n)||(n=[n]);n.forEach(function(n){t.addListener(n,"mousedown",l);i.isOldIE&&t.addListener(n,"dblclick",a)})};f=i.isMac&&i.isOpera&&!("KeyboardEvent"in window)?function(n){return 0|(n.metaKey?1:0)|(n.altKey?2:0)|(n.shiftKey?4:0)|(n.ctrlKey?8:0)}:function(n){return 0|(n.ctrlKey?1:0)|(n.altKey?2:0)|(n.shiftKey?4:0)|(n.metaKey?8:0)};t.getModifierString=function(n){return u.KEY_MODS[f(n)]};t.addCommandKeyListener=function(n,u){var f=t.addListener,h,e;!i.isOldGecko&&(!i.isOpera||"KeyboardEvent"in window)?(e=null,f(n,"keydown",function(n){r[n.keyCode]=(r[n.keyCode]||0)+1;var t=o(u,n,n.keyCode);return e=n.defaultPrevented,t}),f(n,"keypress",function(n){e&&(n.ctrlKey||n.altKey||n.shiftKey||n.metaKey)&&(t.stopEvent(n),e=null)}),f(n,"keyup",function(n){r[n.keyCode]=null}),r||(s(),f(window,"focus",s))):(h=null,f(n,"keydown",function(n){h=n.keyCode}),f(n,"keypress",function(n){return o(u,n,h)}))};typeof window=="object"&&window.postMessage&&!i.isOldIE&&(h=1,t.nextTick=function(n,i){i=i||window;var r="zero-timeout-message-"+h;t.addListener(i,"message",function u(f){f.data==r&&(t.stopPropagation(f),t.removeListener(i,"message",u),n())});i.postMessage(r,"*")});t.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame);t.nextFrame=t.nextFrame?t.nextFrame.bind(window):function(n){setTimeout(n,17)}});define("ace/lib/lang",["require","exports","module"],function(n,t){"use strict";t.last=function(n){return n[n.length-1]};t.stringReverse=function(n){return n.split("").reverse().join("")};t.stringRepeat=function(n,t){for(var i="";t>0;)t&1&&(i+=n),(t>>=1)&&(n+=n);return i};var r=/^\s\s*/,u=/\s\s*$/;t.stringTrimLeft=function(n){return n.replace(r,"")};t.stringTrimRight=function(n){return n.replace(u,"")};t.copyObject=function(n){var t={};for(var i in n)t[i]=n[i];return t};t.copyArray=function(n){for(var i=[],t=0,r=n.length;t<r;t++)i[t]=n[t]&&typeof n[t]=="object"?this.copyObject(n[t]):n[t];return i};t.deepCopy=function i(n){var r,t;if(typeof n!="object"||!n)return n;if(Array.isArray(n)){for(r=[],t=0;t<n.length;t++)r[t]=i(n[t]);return r}if(Object.prototype.toString.call(n)!=="[object Object]")return n;r={};for(t in n)r[t]=i(n[t]);return r};t.arrayToMap=function(n){for(var i={},t=0;t<n.length;t++)i[n[t]]=1;return i};t.createMap=function(n){var t=Object.create(null);for(var i in n)t[i]=n[i];return t};t.arrayRemove=function(n,t){for(var i=0;i<=n.length;i++)t===n[i]&&n.splice(i,1)};t.escapeRegExp=function(n){return n.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")};t.escapeHTML=function(n){return n.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")};t.getMatchOffsets=function(n,t){var i=[];return n.replace(t,function(n){i.push({offset:arguments[arguments.length-2],length:n.length})}),i};t.deferredCall=function(n){var i=null,r=function(){i=null;n()},t=function(n){return t.cancel(),i=setTimeout(r,n||0),t};return t.schedule=t,t.call=function(){return this.cancel(),n(),t},t.cancel=function(){return clearTimeout(i),i=null,t},t.isPending=function(){return i},t};t.delayedCall=function(n,t){var i=null,u=function(){i=null;n()},r=function(n){i==null&&(i=setTimeout(u,n||t))};return r.delay=function(n){i&&clearTimeout(i);i=setTimeout(u,n||t)},r.schedule=r,r.call=function(){this.cancel();n()},r.cancel=function(){i&&clearTimeout(i);i=null},r.isPending=function(){return i},r}});define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(n,t){"use strict";var i=n("../lib/event"),r=n("../lib/useragent"),f=n("../lib/dom"),u=n("../lib/lang"),e=r.isChrome<18,o=r.isIE,s=function(n,t){function l(n){if(!h){if(h=!0,a)t=0,i=n?0:s.value.length-1;else var t=n?2:1,i=2;try{s.setSelectionRange(t,i)}catch(r){}h=!1}}function p(){h||(s.value=c,r.isWebKit&&lt.schedule())}function g(){clearTimeout(ht);ht=setTimeout(function(){y&&(s.style.cssText=y,y="");t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},r.isOldIE?200:0)}var s=f.createElement("textarea"),v,ct,lt,it,vt,yt,a,ht,nt;s.className="ace_text-input";r.isTouchPad&&s.setAttribute("x-palm-disable-auto-cap",!0);s.setAttribute("wrap","off");s.setAttribute("autocorrect","off");s.setAttribute("autocapitalize","off");s.setAttribute("spellcheck",!1);s.style.opacity="0";r.isOldIE&&(s.style.top="-1000px");n.insertBefore(s,n.firstChild);var c="\x01\x01",w=!1,tt=!1,h=!1,y="",b=!0;try{v=document.activeElement===s}catch(ni){}if(i.addListener(s,"blur",function(n){t.onBlur(n);v=!1}),i.addListener(s,"focus",function(n){v=!0;t.onFocus(n);l()}),this.focus=function(){if(y)return s.focus();var n=s.style.top;s.style.position="fixed";s.style.top="0px";s.focus();setTimeout(function(){s.style.position="";s.style.top=="0px"&&(s.style.top=n)},0)},this.blur=function(){s.blur()},this.isFocused=function(){return v},ct=u.delayedCall(function(){v&&l(b)}),lt=u.delayedCall(function(){h||(s.value=c,v&&l())}),r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=b&&(b=!b,ct.schedule())}),p(),v&&t.onFocus(),it=function(n){return n.selectionStart===0&&n.selectionEnd===n.value.length},!s.setSelectionRange&&s.createTextRange&&(s.setSelectionRange=function(n,t){var i=this.createTextRange();i.collapse(!0);i.moveStart("character",n);i.moveEnd("character",t);i.select()},it=function(n){try{var t=n.ownerDocument.selection.createRange()}catch(i){}return!t||t.parentElement()!=n?!1:t.text==n.value}),r.isOldIE){var rt=!1,at=function(n){if(!rt){var t=s.value;if(!h&&t&&t!=c){if(n&&t==c[0])return ut.schedule();ft(t);rt=!0;p();rt=!1}}},ut=u.delayedCall(at);i.addListener(s,"propertychange",at);vt={13:1,27:1};i.addListener(s,"keyup",function(n){if(h&&(!s.value||vt[n.keyCode])&&setTimeout(d,0),(s.value.charCodeAt(0)||0)<129)return ut.call();h?ot():gt()});i.addListener(s,"keydown",function(){ut.schedule(50)})}yt=function(){w?w=!1:it(s)?(t.selectAll(),l()):a&&l(t.selection.isEmpty())};a=null;this.setInputHandler=function(n){a=n};this.getInputHandler=function(){return a};var k=!1,ft=function(n){if(a&&(n=a(n),a=null),tt){if(l(),n)t.onPaste(n);tt=!1}else if(n==c.charAt(0))k?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"});else if(n.substring(0,2)==c?n=n.substr(2):n.charAt(0)==c.charAt(0)?n=n.substr(1):n.charAt(n.length-1)==c.charAt(0)&&(n=n.slice(0,-1)),n.charAt(n.length-1)==c.charAt(0)&&(n=n.slice(0,-1)),n)t.onTextInput(n);k&&(k=!1)},pt=function(){if(!h){var n=s.value;ft(n);p()}},et=function(n,t,i){var r=n.clipboardData||window.clipboardData,u;if(r&&!e){u=o||i?"Text":"text/plain";try{return t?r.setData(u,t)!==!1:r.getData(u)}catch(n){if(!i)return et(n,t,!0)}}},wt=function(n,r){var u=t.getCopyText();if(!u)return i.preventDefault(n);et(n,u)?(r?t.onCut():t.onCopy(),i.preventDefault(n)):(w=!0,s.value=u,s.select(),setTimeout(function(){w=!1;p();l();r?t.onCut():t.onCopy()}))},bt=function(n){wt(n,!0)},kt=function(n){wt(n,!1)},dt=function(n){var u=et(n);if(typeof u=="string"){if(u)t.onPaste(u,n);r.isIE&&setTimeout(l);i.preventDefault(n)}else s.value="",tt=!0};i.addCommandKeyListener(s,t.onCommandKey.bind(t));i.addListener(s,"select",yt);i.addListener(s,"input",pt);i.addListener(s,"cut",bt);i.addListener(s,"copy",kt);i.addListener(s,"paste",dt);"oncut"in s&&"oncopy"in s&&"onpaste"in s||i.addListener(n,"keydown",function(n){if((!r.isMac||n.metaKey)&&n.ctrlKey)switch(n.keyCode){case 67:kt(n);break;case 86:dt(n);break;case 88:bt(n)}});var gt=function(){if(!h&&t.onCompositionStart&&!t.$readOnly){h={};h.canUndo=t.session.$undoManager;t.onCompositionStart();setTimeout(ot,0);t.on("mousedown",d);h.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection());t.session.markUndoGroup()}},ot=function(){var n,i;if(h&&t.onCompositionUpdate&&!t.$readOnly&&(n=s.value.replace(/\x01/g,""),h.lastValue!==n)){t.onCompositionUpdate(n);h.lastValue&&t.undo();h.canUndo&&(h.lastValue=n);h.lastValue&&(i=t.selection.getRange(),t.insert(h.lastValue),t.session.markUndoGroup(),h.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection())}},d=function(n){var i,u;t.onCompositionEnd&&!t.$readOnly&&(i=h,h=!1,u=setTimeout(function(){u=null;var n=s.value.replace(/\x01/g,"");h||(n==i.lastValue?p():!i.lastValue&&n&&(p(),ft(n)))}),a=function(n){return(u&&clearTimeout(u),n=n.replace(/\x01/g,""),n==i.lastValue)?"":(i.lastValue&&u&&t.undo(),n)},t.onCompositionEnd(),t.removeListener("mousedown",d),n.type=="compositionend"&&i.range&&t.selection.setRange(i.range),r.isChrome&&r.isChrome>=53&&pt())},st=u.delayedCall(ot,50);i.addListener(s,"compositionstart",gt);r.isGecko?i.addListener(s,"text",function(){st.schedule()}):(i.addListener(s,"keyup",function(){st.schedule()}),i.addListener(s,"keydown",function(){st.schedule()}));i.addListener(s,"compositionend",d);this.getElement=function(){return s};this.setReadOnly=function(n){s.readOnly=n};this.onContextMenu=function(n){k=!0;l(t.selection.isEmpty());t._emit("nativecontextmenu",{target:t,domEvent:n});this.moveToMouse(n,!0)};this.moveToMouse=function(n,u){if(u||!r.isOldIE){y||(y=s.style.cssText);s.style.cssText=(u?"z-index:100000;":"")+"height:"+s.style.height+";"+(r.isIE?"opacity:0.1;":"");var e=t.container.getBoundingClientRect(),c=f.computedStyle(t.container),o=e.top+(parseInt(c.borderTopWidth)||0),l=e.left+(parseInt(e.borderLeftWidth)||0),a=e.bottom-o-s.clientHeight-2,h=function(n){s.style.left=n.clientX-l-2+"px";s.style.top=Math.min(n.clientY-o-2,a)+"px"};(h(n),n.type=="mousedown")&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(ht),r.isWin&&!r.isOldIE&&i.capture(t.container,h,g))}};this.onContextMenuClose=g;nt=function(n){t.textInput.onContextMenu(n);g()};i.addListener(s,"mouseup",nt);i.addListener(s,"mousedown",function(n){n.preventDefault();g()});i.addListener(t.renderer.scroller,"contextmenu",nt);i.addListener(s,"contextmenu",nt)};t.TextInput=s});define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,t){"use strict";function i(n){var t,i;n.$clickSelection=null;t=n.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(n));t.setDefaultHandler("dblclick",this.onDoubleClick.bind(n));t.setDefaultHandler("tripleclick",this.onTripleClick.bind(n));t.setDefaultHandler("quadclick",this.onQuadClick.bind(n));t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));t.setDefaultHandler("touchmove",this.onTouchMove.bind(n));i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(t){n[t]=this[t]},this);n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange");n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}function f(n,t,i,r){return Math.sqrt(Math.pow(i-n,2)+Math.pow(r-t,2))}function r(n,t){var i;return i=n.start.row==n.end.row?2*t.column-n.start.column-n.end.column:n.start.row!=n.end.row-1||n.start.column||n.end.column?2*t.row-n.start.row-n.end.row:t.column-4,i<0?{cursor:n.start,anchor:n.end}:{cursor:n.end,anchor:n.start}}var e=n("../lib/dom"),o=n("../lib/event"),s=n("../lib/useragent"),u=0;(function(){this.onMouseDown=function(n){var e=n.inSelection(),r=n.getDocumentPosition(),t,i,u,f;if(this.mousedownEvent=n,t=this.editor,i=n.getButton(),i!==0){if(u=t.getSelectionRange(),f=u.isEmpty(),t.$blockScrolling++,(f||i==1)&&t.selection.moveToPosition(r),t.$blockScrolling--,i==2)t.textInput.onContextMenu(n.domEvent);return}if(this.mousedownEvent.time=Date.now(),e&&!t.isFocused()&&(t.focus(),this.$focusTimout&&!this.$clickSelection&&!t.inMultiSelectMode)){this.setState("focusWait");this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(r,n.domEvent._clicks>1),n.preventDefault()};this.startSelect=function(n,t){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++;this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(n):t||i.selection.moveToPosition(n);t||this.select();i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture();i.setStyle("ace_selecting");this.setState("select");i.$blockScrolling--};this.select=function(){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),u,f;n.$blockScrolling++;this.$clickSelection&&(u=this.$clickSelection.comparePoint(i),u==-1?t=this.$clickSelection.end:u==1?t=this.$clickSelection.start:(f=r(this.$clickSelection,i),i=f.cursor,t=f.anchor),n.selection.setSelectionAnchor(t.row,t.column));n.selection.selectToPosition(i);n.$blockScrolling--;n.renderer.scrollCursorIntoView()};this.extendSelectionBy=function(n){var f,u=this.editor,t=u.renderer.screenToTextCoordinates(this.x,this.y),i=u.selection[n](t.row,t.column),e,o,s;u.$blockScrolling++;this.$clickSelection&&(e=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end),e==-1&&o<=0?(f=this.$clickSelection.end,(i.end.row!=t.row||i.end.column!=t.column)&&(t=i.start)):o==1&&e>=0?(f=this.$clickSelection.start,(i.start.row!=t.row||i.start.column!=t.column)&&(t=i.end)):e==-1&&o==1?(t=i.end,f=i.start):(s=r(this.$clickSelection,t),t=s.cursor,f=s.anchor),u.selection.setSelectionAnchor(f.row,f.column));u.selection.selectToPosition(t);u.$blockScrolling--;u.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 n=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>u||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())};this.onDoubleClick=function(n){var i=n.getDocumentPosition(),r=this.editor,u=r.session,t=u.getBracketRange(i);t?(t.isEmpty()&&(t.start.column--,t.end.column++),this.setState("select")):(t=r.selection.getWordRange(i.row,i.column),this.setState("selectByWords"));this.$clickSelection=t;this.select()};this.onTripleClick=function(n){var r=n.getDocumentPosition(),i=this.editor,t;this.setState("selectByLines");t=i.getSelectionRange();t.isMultiLine()&&t.contains(r.row,r.column)?(this.$clickSelection=i.selection.getLineRange(t.start.row),this.$clickSelection.end=i.selection.getLineRange(t.end.row).end):this.$clickSelection=i.selection.getLineRange(r.row);this.select()};this.onQuadClick=function(){var n=this.editor;n.selectAll();this.$clickSelection=n.getSelectionRange();this.setState("selectAll")};this.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var t=n.domEvent.timeStamp,r=t-(this.$lastScrollTime||0),i=this.editor,u=i.renderer.isScrollableBy(n.wheelX*n.speed,n.wheelY*n.speed);if(u||r<200)return this.$lastScrollTime=t,i.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}};this.onTouchMove=function(n){var t=n.domEvent.timeStamp,r=t-(this.$lastScrollTime||0),i=this.editor,u=i.renderer.isScrollableBy(n.wheelX*n.speed,n.wheelY*n.speed);if(u||r<200)return this.$lastScrollTime=t,i.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}}).call(i.prototype);t.DefaultHandlers=i});define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(n,t){"use strict";function r(n){this.isOpen=!1;this.$element=null;this.$parentNode=n}var u=n("./lib/oop"),i=n("./lib/dom");(function(){this.$init=function(){return this.$element=i.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(n){i.setInnerText(this.getElement(),n)};this.setHtml=function(n){this.getElement().innerHTML=n};this.setPosition=function(n,t){this.getElement().style.left=n+"px";this.getElement().style.top=t+"px"};this.setClassName=function(n){i.addCssClass(this.getElement(),n)};this.show=function(n,t,i){n!=null&&this.setText(n);t!=null&&i!=null&&this.setPosition(t,i);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}}).call(r.prototype);t.Tooltip=r});define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(n,t){"use strict";function o(n){function a(){var u=f.getDocumentPosition().row,i=c.$annotations[u],e,a,r;if(!i||(e=t.session.getLength(),u==e&&(a=t.renderer.pixelToScreenCoordinates(0,f.y).row,r=f.$pos,a>t.session.documentToScreenRow(r.row,r.column))))return o();if(h!=i){h=i.text.join("<br/>");s.setHtml(h);s.show();t._signal("showGutterTooltip",s);t.on("mousewheel",o);if(n.$tooltipFollowsMouse)l(f);else{var p=f.domEvent.target,v=p.getBoundingClientRect(),y=s.getElement().style;y.left=v.right+"px";y.top=v.bottom+"px"}}}function o(){i&&(i=clearTimeout(i));h&&(s.hide(),h=null,t._signal("hideGutterTooltip",s),t.removeEventListener("mousewheel",o))}function l(n){s.setPosition(n.x,n.y)}var t=n.editor,c=t.renderer.$gutterLayer,s=new r(t.container),i,f,h;n.editor.setDefaultHandler("guttermousedown",function(i){var u,r,f;if(t.isFocused()&&i.getButton()==0&&(u=c.getRegion(i),u!="foldWidgets")){if(r=i.getDocumentPosition().row,f=t.session.selection,i.getShiftKey())f.selectTo(r,0);else{if(i.domEvent.detail==2)return t.selectAll(),i.preventDefault();n.$clickSelection=t.selection.getLineRange(r)}return n.setState("selectByLines"),n.captureMouse(i),i.preventDefault()}});n.editor.setDefaultHandler("guttermousemove",function(t){var r=t.domEvent.target||t.domEvent.srcElement;if(u.hasCssClass(r,"ace_fold-widget"))return o();(h&&n.$tooltipFollowsMouse&&l(t),f=t,i)||(i=setTimeout(function(){i=null;f&&!n.isMousePressed?a():o()},50))});e.addListener(t.renderer.$gutter,"mouseout",function(){(f=null,h&&!i)&&(i=setTimeout(function(){i=null;o()},50))});t.on("changeSession",o)}function r(n){i.call(this,n)}var u=n("../lib/dom"),f=n("../lib/oop"),e=n("../lib/event"),i=n("../tooltip").Tooltip;f.inherits(r,i),function(){this.setPosition=function(n,t){var r=window.innerWidth||document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight,u=this.getWidth(),f=this.getHeight();n+=15;t+=15;n+u>r&&(n-=n+u-r);t+f>e&&(t-=20+f);i.prototype.setPosition.call(this,n,t)}}.call(r.prototype);t.GutterHandler=o});define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,t){"use strict";var i=n("../lib/event"),r=n("../lib/useragent"),u=t.MouseEvent=function(n,t){this.domEvent=n;this.editor=t;this.x=this.clientX=n.clientX;this.y=this.clientY=n.clientY;this.$pos=null;this.$inSelection=null;this.propagationStopped=!1;this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent);this.propagationStopped=!0};this.preventDefault=function(){i.preventDefault(this.domEvent);this.defaultPrevented=!0};this.stop=function(){this.stopPropagation();this.preventDefault()};this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)};this.inSelection=function(){var i,n,t;return this.$inSelection!==null?this.$inSelection:(i=this.editor,n=i.getSelectionRange(),n.isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=n.contains(t.row,t.column)),this.$inSelection)};this.getButton=function(){return i.getButton(this.domEvent)};this.getShiftKey=function(){return this.domEvent.shiftKey};this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(u.prototype)});define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,t){"use strict";function f(n){function ct(n,i){var r=Date.now(),e=!i||n.row!=i.row,o=!i||n.column!=i.column,f;!k||e||o?(t.$blockScrolling+=1,t.moveCursorToPosition(n),t.$blockScrolling-=1,k=r,it={x:v,y:y}):(f=u(it.x,it.y,v,y),f>h?k=null:r-k>=s&&(t.renderer.scrollCursorIntoView(),k=null))}function lt(n,i){var e=Date.now(),s=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.characterWidth,f=t.renderer.scroller.getBoundingClientRect(),r={x:{left:v-f.left,right:f.right-v},y:{top:y-f.top,bottom:f.bottom-y}},c=Math.min(r.x.left,r.x.right),l=Math.min(r.y.top,r.y.bottom),u={row:n.row,column:n.column};c/h<=2&&(u.column+=r.x.left<r.x.right?-3:2);l/s<=1&&(u.row+=r.y.top<r.y.bottom?-1:1);var a=n.row!=u.row,p=n.column!=u.column,w=!i||n.row!=i.row;a||p&&!w?g?e-g>=o&&t.renderer.scrollCursorIntoView(u):g=e:g=null}function ft(){var n=f;f=t.renderer.screenToTextCoordinates(v,y);ct(f,n);lt(f,n)}function et(){c=t.selection.toOrientedRange();a=t.session.addMarker(c,"ace_selection",t.getSelectionStyle());t.clearSelection();t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1);clearInterval(tt);ft();tt=setInterval(ft,20);p=0;i.addListener(document,"mousemove",ot)}function rt(){clearInterval(tt);t.session.removeMarker(a);a=null;t.$blockScrolling+=1;t.selection.fromOrientedRange(c);t.$blockScrolling-=1;t.isFocused()&&!nt&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly());c=null;f=null;p=0;g=null;k=null;i.removeListener(document,"mousemove",ot)}function ot(){d==null&&(d=setTimeout(function(){d!=null&&a&&rt()},20))}function st(n){var t=n.types;return!t||Array.prototype.some.call(t,function(n){return n=="text/plain"||n=="Text"})}function ht(n){var u=["copy","copymove","all","uninitialized"],f=r.isMac?n.altKey:n.ctrlKey,i="uninitialized",t;try{i=n.dataTransfer.effectAllowed.toLowerCase()}catch(n){}return t="none",f&&u.indexOf(i)>=0?t="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?t="move":u.indexOf(i)>=0&&(t="copy"),t}var t=n.editor,w=e.createElement("img"),ut,l,a,v,y,tt,c,f,p,b,nt,g,k,it,d;w.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";r.isOpera&&(w.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");ut=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];ut.forEach(function(t){n[t]=this[t]},this);t.addEventListener("mousedown",this.onMouseDown.bind(n));l=t.container;p=0;this.onDragStart=function(n){var u,i;if(this.cancelDrag||!l.draggable)return u=this,setTimeout(function(){u.startSelect();u.captureMouse(n)},0),n.preventDefault();c=t.getSelectionRange();i=n.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove";r.isOpera&&(t.container.appendChild(w),w.scrollTop=0);i.setDragImage&&i.setDragImage(w,0,0);r.isOpera&&t.container.removeChild(w);i.clearData();i.setData("Text",t.session.getTextRange());nt=!0;this.setState("drag")};this.onDragEnd=function(n){if(l.draggable=!1,nt=!1,this.setState(null),!t.getReadOnly()){var i=n.dataTransfer.dropEffect;b||i!="move"||t.session.remove(t.getSelectionRange());t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging");this.editor.renderer.setCursorStyle("")};this.onDragEnter=function(n){if(!t.getReadOnly()&&st(n.dataTransfer))return v=n.clientX,y=n.clientY,a||et(),p++,n.dataTransfer.dropEffect=b=ht(n),i.preventDefault(n)};this.onDragOver=function(n){if(!t.getReadOnly()&&st(n.dataTransfer))return v=n.clientX,y=n.clientY,a||(et(),p++),d!==null&&(d=null),n.dataTransfer.dropEffect=b=ht(n),i.preventDefault(n)};this.onDragLeave=function(n){return p--,p<=0&&a?(rt(),b=null,i.preventDefault(n)):void 0};this.onDrop=function(n){var r,u;if(f){if(r=n.dataTransfer,nt)switch(b){case"move":c=c.contains(f.row,f.column)?{start:f,end:f}:t.moveText(c,f);break;case"copy":c=t.moveText(c,f,!0)}else u=r.getData("Text"),c={start:f,end:t.session.insert(f,u)},t.focus(),b=null;return rt(),i.preventDefault(n)}};i.addListener(l,"dragstart",this.onDragStart.bind(n));i.addListener(l,"dragend",this.onDragEnd.bind(n));i.addListener(l,"dragenter",this.onDragEnter.bind(n));i.addListener(l,"dragover",this.onDragOver.bind(n));i.addListener(l,"dragleave",this.onDragLeave.bind(n));i.addListener(l,"drop",this.onDrop.bind(n));d=null}function u(n,t,i,r){return Math.sqrt(Math.pow(i-n,2)+Math.pow(r-t,2))}var e=n("../lib/dom"),i=n("../lib/event"),r=n("../lib/useragent"),o=200,s=200,h=5;(function(){this.dragWait=function(){var n=Date.now()-this.mousedownEvent.time;n>this.editor.getDragDelay()&&this.startDrag()};this.dragWaitEnd=function(){var n=this.editor.container;n.draggable=!1;this.startSelect(this.mousedownEvent.getDocumentPosition());this.selectEnd()};this.dragReadyEnd=function(){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());this.editor.unsetStyle("ace_dragging");this.editor.renderer.setCursorStyle("");this.dragWaitEnd()};this.startDrag=function(){var n,t,i;this.cancelDrag=!1;n=this.editor;t=n.container;t.draggable=!0;n.renderer.$cursorLayer.setBlinking(!1);n.setStyle("ace_dragging");i=r.isWin?"default":"move";n.renderer.setCursorStyle(i);this.setState("dragReady")};this.onMouseDrag=function(){var t=this.editor.container,n;r.isIE&&this.state=="dragReady"&&(n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),n>3&&t.dragDrop());this.state==="dragWait"&&(n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))};this.onMouseDown=function(n){var t,u;if(this.$dragEnabled){this.mousedownEvent=n;var i=this.editor,f=n.inSelection(),e=n.getButton(),o=n.domEvent.detail||1;if(o===1&&e===0&&f){if(n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey()))return;this.mousedownEvent.time=Date.now();t=n.domEvent.target||n.domEvent.srcElement;"unselectable"in t&&(t.unselectable="on");i.getDragDelay()?(r.isWebKit&&(this.cancelDrag=!0,u=i.container,u.draggable=!0),this.setState("dragWait")):this.startDrag();this.captureMouse(n,this.onMouseDrag.bind(this));n.defaultPrevented=!0}}}}).call(f.prototype);t.DragdropHandler=f});define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,t){"use strict";var i=n("./dom");t.get=function(n,t){var i=new XMLHttpRequest;i.open("GET",n,!0);i.onreadystatechange=function(){i.readyState===4&&t(i.responseText)};i.send(null)};t.loadScript=function(n,t){var u=i.getDocumentHead(),r=document.createElement("script");r.src=n;u.appendChild(r);r.onload=r.onreadystatechange=function(n,i){(i||!r.readyState||r.readyState=="loaded"||r.readyState=="complete")&&(r=r.onload=r.onreadystatechange=null,i||t())}};t.qualifyURL=function(n){var t=document.createElement("a");return t.href=n,t.href}});define("ace/lib/event_emitter",["require","exports","module"],function(n,t){"use strict";var i={},r=function(){this.propagationStopped=!0},u=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(n,t){var i,f,e;if(this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={}),i=this._eventRegistry[n]||[],f=this._defaultHandlers[n],i.length||f){for(typeof t=="object"&&t||(t={}),t.type||(t.type=n),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=u),i=i.slice(),e=0;e<i.length;e++)if(i[e](t,this),t.propagationStopped)break;if(f&&!t.defaultPrevented)return f(t,this)}};i._signal=function(n,t){var i=(this._eventRegistry||{})[n],r;if(i)for(i=i.slice(),r=0;r<i.length;r++)i[r](t,this)};i.once=function(n,t){var i=this;t&&this.addEventListener(n,function r(){i.removeEventListener(n,r);t.apply(null,arguments)})};i.setDefaultHandler=function(n,t){var i=this._defaultHandlers,f,r,u;i||(i=this._defaultHandlers={_disabled_:{}});i[n]&&(f=i[n],r=i._disabled_[n],r||(i._disabled_[n]=r=[]),r.push(f),u=r.indexOf(t),u!=-1&&r.splice(u,1));i[n]=t};i.removeDefaultHandler=function(n,t){var r=this._defaultHandlers,i,f,u;r&&(i=r._disabled_[n],r[n]==t?(f=r[n],i&&this.setDefaultHandler(n,i.pop())):i&&(u=i.indexOf(t),u!=-1&&i.splice(u,1)))};i.on=i.addEventListener=function(n,t,i){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[n];return r||(r=this._eventRegistry[n]=[]),r.indexOf(t)==-1&&r[i?"unshift":"push"](t),t};i.off=i.removeListener=i.removeEventListener=function(n,t){var i,r;(this._eventRegistry=this._eventRegistry||{},i=this._eventRegistry[n],i)&&(r=i.indexOf(t),r!==-1&&i.splice(r,1))};i.removeAllListeners=function(n){this._eventRegistry&&(this._eventRegistry[n]=[])};t.EventEmitter=i});define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,t){"no use strict";function i(){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}function o(n,t){var i=new Error(n);i.data=t;typeof console=="object"&&console.error&&console.error(i);setTimeout(function(){throw i;})}var r=n("./oop"),f=n("./event_emitter").EventEmitter,e={setOptions:function(n){Object.keys(n).forEach(function(t){this.setOption(t,n[t])},this)},getOptions:function(n){var t={};return n?Array.isArray(n)||(t=n,n=Object.keys(t)):n=Object.keys(this.$options),n.forEach(function(n){t[n]=this.getOption(n)},this),t},setOption:function(n,t){if(this["$"+n]!==t){var r=this.$options[n];if(!r)return i('misspelled option "'+n+'"');if(r.forwardTo)return this[r.forwardTo]&&this[r.forwardTo].setOption(n,t);r.handlesSet||(this["$"+n]=t);r&&r.set&&r.set.call(this,t)}},getOption:function(n){var t=this.$options[n];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(n):t&&t.get?t.get.call(this):this["$"+n]:i('misspelled option "'+n+'"')}},u=function(){this.$defaultOptions={}};(function(){r.implement(this,f);this.defineOptions=function(n,t,i){return n.$options||(this.$defaultOptions[t]=n.$options={}),Object.keys(i).forEach(function(t){var r=i[t];typeof r=="string"&&(r={forwardTo:r});r.name||(r.name=t);n.$options[r.name]=r;"initialValue"in r&&(n["$"+r.name]=r.initialValue)}),r.implement(n,e),this};this.resetOptions=function(n){Object.keys(n.$options).forEach(function(t){var i=n.$options[t];"value"in i&&n.setOption(t,i.value)})};this.setDefaultValue=function(n,t,i){var r=this.$defaultOptions[n]||(this.$defaultOptions[n]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,i):r[t].value=i)};this.setDefaultValues=function(n,t){Object.keys(t).forEach(function(i){this.setDefaultValue(n,i,t[i])},this)};this.warn=i;this.reportError=o}).call(u.prototype);t.AppConfig=u});define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(n,t,i){"no use strict";function f(f){var o,s,y,p,c,d,l,w,a;if(u&&u.document){r.packaged=f||n.packaged||i.packaged||u.define&&define.packaged;var e={},v="",b=document.currentScript||document._currentScript,g=b&&b.ownerDocument||document,k=g.getElementsByTagName("script");for(o=0;o<k.length;o++)if(s=k[o],y=s.src||s.getAttribute("src"),y){for(p=s.attributes,c=0,d=p.length;c<d;c++)l=p[c],l.name.indexOf("data-ace-")===0&&(e[h(l.name.replace(/^data-ace-/,""))]=l.value);w=y.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);w&&(v=w[1])}v&&(e.base=e.base||v,e.packaged=!0);e.basePath=e.base;e.workerPath=e.workerPath||e.base;e.modePath=e.modePath||e.base;e.themePath=e.themePath||e.base;delete e.base;for(a in e)typeof e[a]!="undefined"&&t.set(a,e[a])}}function h(n){return n.replace(/-(.)/g,function(n,t){return t.toUpperCase()})}var e=n("./lib/lang"),c=n("./lib/oop"),o=n("./lib/net"),s=n("./lib/app_config").AppConfig,u,r;i.exports=t=new s;u=function(){return this||typeof window!="undefined"&&window}();r={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(n){if(!r.hasOwnProperty(n))throw new Error("Unknown config key: "+n);return r[n]};t.set=function(n,t){if(!r.hasOwnProperty(n))throw new Error("Unknown config key: "+n);r[n]=t};t.all=function(){return e.copyObject(r)};t.moduleUrl=function(n,t){var i,e,u,o,f;return r.$moduleUrls[n]?r.$moduleUrls[n]:(i=n.split("/"),t=t||i[i.length-2]||"",e=t=="snippets"?"/":"-",u=i[i.length-1],t=="worker"&&e=="-"&&(o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g"),u=u.replace(o,"")),(!u||u==t)&&i.length>1&&(u=i[i.length-2]),f=r[t+"Path"],f==null?f=r.basePath:e=="/"&&(t=e=""),f&&f.slice(-1)!="/"&&(f+="/"),f+t+e+u+this.get("suffix"))};t.setModuleUrl=function(n,t){return r.$moduleUrls[n]=t};t.$loading={};t.loadModule=function(i,r){var u,e,f;Array.isArray(i)&&(e=i[0],i=i[1]);try{u=n(i)}catch(s){}if(u&&!t.$loading[i])return r&&r(u);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(r),!(t.$loading[i].length>1)){if(f=function(){n([i],function(n){t._emit("load.module",{name:i,module:n});var r=t.$loading[i];t.$loading[i]=null;r.forEach(function(t){t&&t(n)})})},!t.get("packaged"))return f();o.loadScript(t.moduleUrl(i,e),f)}};f(!0);t.init=f});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(n,t){"use strict";var i=n("../lib/event"),u=n("../lib/useragent"),e=n("./default_handlers").DefaultHandlers,o=n("./default_gutter_handler").GutterHandler,r=n("./mouse_event").MouseEvent,s=n("./dragdrop_handler").DragdropHandler,h=n("../config"),f=function(n){var h=this,r,f,t;this.editor=n;new e(this);new o(this);new s(this);r=function(){var t=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());t&&window.focus();n.focus()};f=n.renderer.getMouseEventTarget();i.addListener(f,"click",this.onMouseEvent.bind(this,"click"));i.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"));i.addMultiMouseDownListener([f,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent");i.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"));i.addTouchMoveListener(n.container,this.onTouchMove.bind(this,"touchmove"));t=n.renderer.$gutter;i.addListener(t,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"));i.addListener(t,"click",this.onMouseEvent.bind(this,"gutterclick"));i.addListener(t,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"));i.addListener(t,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"));i.addListener(f,"mousedown",r);i.addListener(t,"mousedown",r);u.isIE&&n.renderer.scrollBarV&&(i.addListener(n.renderer.scrollBarV.element,"mousedown",r),i.addListener(n.renderer.scrollBarH.element,"mousedown",r));n.on("mousemove",function(t){if(!h.state&&!h.$dragDelay&&h.$dragEnabled){var i=n.renderer.screenToTextCoordinates(t.x,t.y),r=n.session.selection.getRange(),u=n.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?u.setCursorStyle("default"):u.setCursorStyle("")}})};(function(){this.onMouseEvent=function(n,t){this.editor._emit(n,new r(t,this.editor))};this.onMouseMove=function(n,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(n,new r(t,this.editor))};this.onMouseWheel=function(n,t){var i=new r(t,this.editor);i.speed=this.$scrollSpeed*2;i.wheelX=t.wheelX;i.wheelY=t.wheelY;this.editor._emit(n,i)};this.onTouchMove=function(n,t){var i=new r(t,this.editor);i.speed=1;i.wheelX=t.wheelX;i.wheelY=t.wheelY;this.editor._emit(n,i)};this.setState=function(n){this.state=n};this.captureMouse=function(n,t){var e,c;this.x=n.x;this.y=n.y;this.isMousePressed=!0;e=this.editor.renderer;e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=null);var f=this,o=function(n){if(n){if(u.isWebKit&&!n.which&&f.releaseMouse)return f.releaseMouse();f.x=n.clientX;f.y=n.clientY;t&&t(n);f.mouseEvent=new r(n,f.editor);f.$mouseMoved=!0}},s=function(n){clearInterval(c);h();f[f.state+"End"]&&f[f.state+"End"](n);f.state="";e.$keepTextAreaAtCursor==null&&(e.$keepTextAreaAtCursor=!0,e.$moveTextAreaToCursor());f.isMousePressed=!1;f.$onCaptureMouseMove=f.releaseMouse=null;n&&f.onMouseEvent("mouseup",n)},h=function(){f[f.state]&&f[f.state]();f.$mouseMoved=!1};if(u.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){s(n)});f.$onCaptureMouseMove=o;f.releaseMouse=i.capture(this.editor.container,o,s);c=setInterval(h,20)};this.releaseMouse=null;this.cancelContextMenu=function(){var n=function(t){t&&t.domEvent&&t.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(n,10);this.editor.on("nativecontextmenu",n)}}).call(f.prototype);h.defineOptions(f.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:u.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}});t.MouseHandler=f});define("ace/mouse/fold_handler",["require","exports","module"],function(n,t){"use strict";function i(n){n.on("click",function(t){var u=t.getDocumentPosition(),i=n.session,r=i.getFoldAt(u.row,u.column,1);r&&(t.getAccelKey()?i.removeFold(r):i.expandFold(r),t.stop())});n.on("gutterclick",function(t){var u=n.renderer.$gutterLayer.getRegion(t),i,r;if(u=="foldWidgets"){if(i=t.getDocumentPosition().row,r=n.session,r.foldWidgets&&r.foldWidgets[i])n.session.onFoldWidgetClick(i,t);n.isFocused()||n.focus();t.stop()}});n.on("gutterdblclick",function(t){var o=n.renderer.$gutterLayer.getRegion(t),f;if(o=="foldWidgets"){var r=t.getDocumentPosition().row,i=n.session,e=i.getParentFoldRangeData(r,!0),u=e.range||e.firstRange;u&&(r=u.start.row,f=i.getFoldAt(r,i.getLine(r).length,1),f?i.removeFold(f):(i.addFold("...",u),n.renderer.scrollCursorIntoView({row:u.start.row,column:0})));t.stop()}})}t.FoldHandler=i});define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,t){"use strict";var r=n("../lib/keys"),u=n("../lib/event"),i=function(n){this.$editor=n;this.$data={editor:n};this.$handlers=[];this.setDefaultHandler(n.commands)};(function(){this.setDefaultHandler=function(n){this.removeKeyboardHandler(this.$defaultHandler);this.$defaultHandler=n;this.addKeyboardHandler(n,0)};this.setKeyboardHandler=function(n){var t=this.$handlers;if(t[t.length-1]!=n){while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(n,1)}};this.addKeyboardHandler=function(n,t){if(n){typeof n!="function"||n.handleKeyboard||(n.handleKeyboard=n);var i=this.$handlers.indexOf(n);i!=-1&&this.$handlers.splice(i,1);t==undefined?this.$handlers.push(n):this.$handlers.splice(t,0,n);i==-1&&n.attach&&n.attach(this.$editor)}};this.removeKeyboardHandler=function(n){var t=this.$handlers.indexOf(n);return t==-1?!1:(this.$handlers.splice(t,1),n.detach&&n.detach(this.$editor),!0)};this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]};this.getStatusText=function(){var n=this.$data,t=n.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,n)||""}).filter(Boolean).join(" ")};this.$callKeyboardHandlers=function(n,t,i,r){for(var f,e=!1,o=this.$editor.commands,s=this.$handlers.length;s--;)if((f=this.$handlers[s].handleKeyboard(this.$data,n,t,i,r),f&&f.command)&&(e=f.command=="null"?!0:o.exec(f.command,this.$editor,f.args,r),e&&r&&n!=-1&&f.passEvent!=!0&&f.command.passEvent!=!0&&u.stopEvent(r),e))break;return e||n!=-1||(f={command:"insertstring"},e=o.exec("insertstring",this.$editor,t)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",f),e};this.onCommandKey=function(n,t,i){var u=r.keyCodeToString(i);this.$callKeyboardHandlers(t,u,i,n)};this.onTextInput=function(n){this.$callKeyboardHandlers(-1,n)}}).call(i.prototype);t.KeyBinding=i});define("ace/range",["require","exports","module"],function(n,t){"use strict";var r=function(n,t){return n.row-t.row||n.column-t.column},i=function(n,t,i,r){this.start={row:n,column:t};this.end={row:i,column:r}};(function(){this.isEqual=function(n){return this.start.row===n.start.row&&this.end.row===n.end.row&&this.start.column===n.start.column&&this.end.column===n.end.column};this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"};this.contains=function(n,t){return this.compare(n,t)==0};this.compareRange=function(n){var t,r=n.end,i=n.start;return t=this.compare(r.row,r.column),t==1?(t=this.compare(i.row,i.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(i.row,i.column),t==-1?-1:t==1?42:0)};this.comparePoint=function(n){return this.compare(n.row,n.column)};this.containsRange=function(n){return this.comparePoint(n.start)==0&&this.comparePoint(n.end)==0};this.intersects=function(n){var t=this.compareRange(n);return t==-1||t==0||t==1};this.isEnd=function(n,t){return this.end.row==n&&this.end.column==t};this.isStart=function(n,t){return this.start.row==n&&this.start.column==t};this.setStart=function(n,t){typeof n=="object"?(this.start.column=n.column,this.start.row=n.row):(this.start.row=n,this.start.column=t)};this.setEnd=function(n,t){typeof n=="object"?(this.end.column=n.column,this.end.row=n.row):(this.end.row=n,this.end.column=t)};this.inside=function(n,t){return this.compare(n,t)==0?this.isEnd(n,t)||this.isStart(n,t)?!1:!0:!1};this.insideStart=function(n,t){return this.compare(n,t)==0?this.isEnd(n,t)?!1:!0:!1};this.insideEnd=function(n,t){return this.compare(n,t)==0?this.isStart(n,t)?!1:!0:!1};this.compare=function(n,t){return!this.isMultiLine()&&n===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:n<this.start.row?-1:n>this.end.row?1:this.start.row===n?t>=this.start.column?0:-1:this.end.row===n?t<=this.end.column?0:1:0};this.compareStart=function(n,t){return this.start.row==n&&this.start.column==t?-1:this.compare(n,t)};this.compareEnd=function(n,t){return this.end.row==n&&this.end.column==t?1:this.compare(n,t)};this.compareInside=function(n,t){return this.end.row==n&&this.end.column==t?1:this.start.row==n&&this.start.column==t?-1:this.compare(n,t)};this.clipRows=function(n,t){var r,u;return this.end.row>t?r={row:t+1,column:0}:this.end.row<n&&(r={row:n,column:0}),this.start.row>t?u={row:t+1,column:0}:this.start.row<n&&(u={row:n,column:0}),i.fromPoints(u||this.start,r||this.end)};this.extend=function(n,t){var r=this.compare(n,t),u,f;return r==0?this:(r==-1?u={row:n,column:t}:f={row:n,column:t},i.fromPoints(u||this.start,f||this.end))};this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column};this.isMultiLine=function(){return this.start.row!==this.end.row};this.clone=function(){return i.fromPoints(this.start,this.end)};this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)};this.toScreenRange=function(n){var t=n.documentToScreenPosition(this.start),r=n.documentToScreenPosition(this.end);return new i(t.row,t.column,r.row,r.column)};this.moveBy=function(n,t){this.start.row+=n;this.start.column+=t;this.end.row+=n;this.end.column+=t}}).call(i.prototype);i.fromPoints=function(n,t){return new i(n.row,n.column,t.row,t.column)};i.comparePoints=r;i.comparePoints=function(n,t){return n.row-t.row||n.column-t.column};t.Range=i});define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,t){"use strict";var f=n("./lib/oop"),r=n("./lib/lang"),e=n("./lib/event_emitter").EventEmitter,i=n("./range").Range,u=function(n){this.session=n;this.doc=n.getDocument();this.clearSelection();this.lead=this.selectionLead=this.doc.createAnchor(0,0);this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(n){t._emit("changeCursor");t.$isEmpty||t._emit("changeSelection");t.$keepDesiredColumnOnChange||n.old.column==n.value.column||(t.$desiredColumn=null)});this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){f.implement(this,e);this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column};this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()};this.getCursor=function(){return this.lead.getPosition()};this.setSelectionAnchor=function(n,t){this.anchor.setPosition(n,t);this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))};this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()};this.getSelectionLead=function(){return this.lead.getPosition()};this.shiftSelection=function(n){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+n);return}var t=this.getSelectionAnchor(),i=this.getSelectionLead(),r=this.isBackwards();r&&t.column===0||this.setSelectionAnchor(t.row,t.column+n);(r||i.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(i.row,i.column+n)})};this.isBackwards=function(){var n=this.anchor,t=this.lead;return n.row>t.row||n.row==t.row&&n.column>t.column};this.getRange=function(){var t=this.anchor,n=this.lead;return this.isEmpty()?i.fromPoints(n,n):this.isBackwards()?i.fromPoints(n,t):i.fromPoints(t,n)};this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))};this.selectAll=function(){var n=this.doc.getLength()-1;this.setSelectionAnchor(0,0);this.moveCursorTo(n,this.doc.getLine(n).length)};this.setRange=this.setSelectionRange=function(n,t){t?(this.setSelectionAnchor(n.end.row,n.end.column),this.selectTo(n.start.row,n.start.column)):(this.setSelectionAnchor(n.start.row,n.start.column),this.selectTo(n.end.row,n.end.column));this.getRange().isEmpty()&&(this.$isEmpty=!0);this.$desiredColumn=null};this.$moveSelection=function(n){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column);n.call(this)};this.selectTo=function(n,t){this.$moveSelection(function(){this.moveCursorTo(n,t)})};this.selectToPosition=function(n){this.$moveSelection(function(){this.moveCursorToPosition(n)})};this.moveTo=function(n,t){this.clearSelection();this.moveCursorTo(n,t)};this.moveToPosition=function(n){this.clearSelection();this.moveCursorToPosition(n)};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(n,t){if(typeof t=="undefined"){var i=n||this.lead;n=i.row;t=i.column}return this.session.getWordRange(n,t)};this.selectWord=function(){this.setSelectionRange(this.getWordRange())};this.selectAWord=function(){var n=this.getCursor(),t=this.session.getAWordRange(n.row,n.column);this.setSelectionRange(t)};this.getLineRange=function(n,t){var r=typeof n=="number"?n:this.lead.row,u,f=this.session.getFoldLine(r);return f?(r=f.start.row,u=f.end.row):u=r,t===!0?new i(r,0,u,this.session.getLine(u).length):new i(r,0,u+1,0)};this.selectLine=function(){this.setSelectionRange(this.getLineRange())};this.moveCursorUp=function(){this.moveCursorBy(-1,0)};this.moveCursorDown=function(){this.moveCursorBy(1,0)};this.moveCursorLeft=function(){var n=this.lead.getPosition(),i,t;(i=this.session.getFoldAt(n.row,n.column,-1))?this.moveCursorTo(i.start.row,i.start.column):n.column===0?n.row>0&&this.moveCursorTo(n.row-1,this.doc.getLine(n.row-1).length):(t=this.session.getTabSize(),this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(n.column-t,n.column).split(" ").length-1==t?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1))};this.moveCursorRight=function(){var n=this.lead.getPosition(),i,t;(i=this.session.getFoldAt(n.row,n.column,1))?this.moveCursorTo(i.end.row,i.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(t=this.session.getTabSize(),n=this.lead,this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(n.column,n.column+t).split(" ").length-1==t?this.moveCursorBy(0,t):this.moveCursorBy(0,1))};this.moveCursorLineStart=function(){var t=this.lead.row,i=this.lead.column,u=this.session.documentToScreenRow(t,i),n=this.session.screenToDocumentPosition(u,0),f=this.session.getDisplayLine(t,null,n.row,n.column),r=f.match(/^\s*/);r[0].length==i||this.session.$useEmacsStyleLineStart||(n.column+=r[0].length);this.moveCursorToPosition(n)};this.moveCursorLineEnd=function(){var r=this.lead,n=this.session.getDocumentLastRowColumnPosition(r.row,r.column),t,i;this.lead.column==n.column&&(t=this.session.getLine(n.row),n.column==t.length&&(i=t.search(/\s+$/),i>0&&(n.column=i)));this.moveCursorTo(n.row,n.column)};this.moveCursorFileEnd=function(){var n=this.doc.getLength()-1,t=this.doc.getLine(n).length;this.moveCursorTo(n,t)};this.moveCursorFileStart=function(){this.moveCursorTo(0,0)};this.moveCursorLongWordRight=function(){var t=this.lead.row,n=this.lead.column,i=this.doc.getLine(t),u=i.substring(n),f,r;if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,r=this.session.getFoldAt(t,n,1),r){this.moveCursorTo(r.end.row,r.end.column);return}if((f=this.session.nonTokenRe.exec(u))&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,u=i.substring(n)),n>=i.length){this.moveCursorTo(t,i.length);this.moveCursorRight();t<this.doc.getLength()-1&&this.moveCursorWordRight();return}(f=this.session.tokenRe.exec(u))&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0);this.moveCursorTo(t,n)};this.moveCursorLongWordLeft=function(){var t=this.lead.row,n=this.lead.column,f,u,i,e;if(f=this.session.getFoldAt(t,n,-1)){this.moveCursorTo(f.start.row,f.start.column);return}if(u=this.session.getFoldStringAt(t,n,-1),u==null&&(u=this.doc.getLine(t).substring(0,n)),i=r.stringReverse(u),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(e=this.session.nonTokenRe.exec(i))&&(n-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(t,0);this.moveCursorLeft();t>0&&this.moveCursorWordLeft();return}(e=this.session.tokenRe.exec(i))&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0);this.moveCursorTo(t,n)};this.$shortWordEndIndex=function(n){var f,t=0,i,u=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,f=this.session.tokenRe.exec(n))t=this.session.tokenRe.lastIndex;else{while((i=n[t])&&u.test(i))t++;if(t<1)for(r.lastIndex=0;(i=n[t])&&!r.test(i);)if(r.lastIndex=0,t++,u.test(i))if(t>2){t--;break}else{while((i=n[t])&&u.test(i))t++;if(t>2)break}}return r.lastIndex=0,t};this.moveCursorShortWordRight=function(){var n=this.lead.row,t=this.lead.column,u=this.doc.getLine(n),i=u.substring(t),r=this.session.getFoldAt(n,t,1),f,e;if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==u.length){f=this.doc.getLength();do n++,i=this.doc.getLine(n);while(n<f&&/^\s*$/.test(i));/^\s+/.test(i)||(i="");t=0}e=this.$shortWordEndIndex(i);this.moveCursorTo(n,t+e)};this.moveCursorShortWordLeft=function(){var t=this.lead.row,i=this.lead.column,u,n,f,e;if(u=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(u.start.row,u.start.column);if(n=this.session.getLine(t).substring(0,i),i===0){do t--,n=this.doc.getLine(t);while(t>0&&/^\s*$/.test(n));i=n.length;/\s+$/.test(n)||(n="")}return f=r.stringReverse(n),e=this.$shortWordEndIndex(f),this.moveCursorTo(t,i-e)};this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()};this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()};this.moveCursorBy=function(n,t){var r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;t===0&&(this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column);i=this.session.screenToDocumentPosition(r.row+n,r.column);n!==0&&t===0&&i.row===this.lead.row&&i.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[i.row]&&(i.row>0||n>0)&&i.row++;this.moveCursorTo(i.row,i.column+t,t===0)};this.moveCursorToPosition=function(n){this.moveCursorTo(n.row,n.column)};this.moveCursorTo=function(n,t,i){var r=this.session.getFoldAt(n,t,1);r&&(n=r.start.row,t=r.start.column);this.$keepDesiredColumnOnChange=!0;this.lead.setPosition(n,t);this.$keepDesiredColumnOnChange=!1;i||(this.$desiredColumn=null)};this.moveCursorToScreen=function(n,t,i){var r=this.session.screenToDocumentPosition(n,t);this.moveCursorTo(r.row,r.column,i)};this.detach=function(){this.lead.detach();this.anchor.detach();this.session=this.doc=null};this.fromOrientedRange=function(n){this.setSelectionRange(n,n.cursor==n.start);this.$desiredColumn=n.desiredColumn||this.$desiredColumn};this.toOrientedRange=function(n){var t=this.getRange();return n?(n.start.column=t.start.column,n.start.row=t.start.row,n.end.column=t.end.column,n.end.row=t.end.row):n=t,n.cursor=this.isBackwards()?n.start:n.end,n.desiredColumn=this.$desiredColumn,n};this.getRangeOfMovements=function(n){var t=this.getCursor(),r;try{return n(this),r=this.getCursor(),i.fromPoints(t,r)}catch(u){return i.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}};this.toJSON=function(){var n;return this.rangeCount?n=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t}):(n=this.getRange(),n.isBackwards=this.isBackwards()),n};this.fromJSON=function(n){var t,r;if(n.start==undefined){if(this.rangeList){for(this.toSingleRange(n[0]),t=n.length;t--;)r=i.fromPoints(n[t].start,n[t].end),n[t].isBackwards&&(r.cursor=r.start),this.addRange(r,!0);return}n=n[0]}this.rangeList&&this.toSingleRange(n);this.setSelectionRange(n,n.isBackwards)};this.isEqual=function(n){if((n.length||this.rangeCount)&&n.length!=this.rangeCount)return!1;if(!n.length||!this.ranges)return this.getRange().isEqual(n);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(n[t]))return!1;return!0}}).call(u.prototype);t.Selection=u});define("ace/tokenizer",["require","exports","module","ace/config"],function(n,t){"use strict";var u=n("./config"),i=2e3,r=function(n){var f,r,t,u,i;this.states=n;this.regExps={};this.matchMappings={};for(f in this.states){var c=this.states[f],e=[],o=0,s=this.matchMappings[f]={defaultToken:"text"},h="g",l=[];for(r=0;r<c.length;r++)(t=c[r],t.defaultToken&&(s.defaultToken=t.defaultToken),t.caseInsensitive&&(h="gi"),t.regex!=null)&&(t.regex instanceof RegExp&&(t.regex=t.regex.toString().slice(1,-1)),u=t.regex,i=new RegExp("(?:("+u+")|(.))").exec("a").length-2,Array.isArray(t.token)?t.token.length==1||i==1?t.token=t.token[0]:i-1!=t.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:t,groupCount:i-1}),t.token=t.token[0]):(t.tokenArray=t.token,t.token=null,t.onMatch=this.$arrayTokens):typeof t.token!="function"||t.onMatch||(t.onMatch=i>1?this.$applyToken:t.token),i>1&&(/\\\d/.test(t.regex)?u=t.regex.replace(/\\([0-9]+)/g,function(n,t){return"\\"+(parseInt(t,10)+o+1)}):(i=1,u=this.removeCapturingGroups(t.regex)),t.splitRegex||typeof t.token=="string"||l.push(t)),s[o]=r,o+=i,e.push(u),t.onMatch||(t.onMatch=null));e.length||(s[0]=0,e.push("$"));l.forEach(function(n){n.splitRegex=this.createSplitterRegexp(n.regex,h)},this);this.regExps[f]=new RegExp("("+e.join(")|(")+")|($)",h)}};(function(){this.$setMaxTokenCount=function(n){i=n|0};this.$applyToken=function(n){var u=this.splitRegex.exec(n).slice(1),i=this.token.apply(this,u),r,t,f;if(typeof i=="string")return[{type:i,value:n}];for(r=[],t=0,f=i.length;t<f;t++)u[t]&&(r[r.length]={type:i[t],value:u[t]});return r};this.$arrayTokens=function(n){var i,r,u,t,f;if(!n)return[];if(i=this.splitRegex.exec(n),!i)return"text";for(r=[],u=this.tokenArray,t=0,f=u.length;t<f;t++)i[t+1]&&(r[r.length]={type:u[t],value:i[t+1]});return r};this.removeCapturingGroups=function(n){return n.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(n,t){return t?"(?:":n})};this.createSplitterRegexp=function(n,t){if(n.indexOf("(?=")!=-1){var r=0,u=!1,i={};n.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(n,t,f,e,o,s){return u?u=o!="]":o?u=!0:e?(r==i.stack&&(i.end=s+1,i.stack=-1),r--):f&&(r++,f.length!=1&&(i.stack=r,i.start=s)),n});i.end!=null&&/^\)*$/.test(n.substr(i.end))&&(n=n.substring(0,i.start)+n.substr(i.end))}return n.charAt(0)!="^"&&(n="^"+n),n.charAt(n.length-1)!="$"&&(n+="$"),new RegExp(n,(t||"").replace("g",""))};this.getLineTokens=function(n,t){var f,r,c,p,a,b,s;t&&typeof t!="string"?(f=t.slice(0),t=f[0],t==="#tmp"&&(f.shift(),t=f.shift())):f=[];r=t||"start";c=this.states[r];c||(r="start",c=this.states[r]);p=this.matchMappings[r];a=this.regExps[r];a.lastIndex=0;for(var w,l=[],h=0,k=0,u={type:null,value:""};w=a.exec(n);){var o=p.defaultToken,e=null,v=w[0],y=a.lastIndex;for(y-v.length>h&&(b=n.substring(h,y-v.length),u.type==o?u.value+=b:(u.type&&l.push(u),u={type:o,value:b})),s=0;s<w.length-2;s++)if(w[s+1]!==undefined){e=c[p[s]];o=e.onMatch?e.onMatch(v,r,f):e.token;e.next&&(r=typeof e.next=="string"?e.next:e.next(r,f),c=this.states[r],c||(this.reportError("state doesn't exist",r),r="start",c=this.states[r]),p=this.matchMappings[r],h=y,a=this.regExps[r],a.lastIndex=y);break}if(v)if(typeof o=="string")e&&e.merge===!1||u.type!==o?(u.type&&l.push(u),u={type:o,value:v}):u.value+=v;else if(o)for(u.type&&l.push(u),u={type:null,value:""},s=0;s<o.length;s++)l.push(o[s]);if(h==n.length)break;if(h=y,k++>i){for(k>2*n.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:n});h<n.length;)u.type&&l.push(u),u={value:n.substring(h,h+=2e3),type:"overflow"};r="start";f=[];break}}return u.type&&l.push(u),f.length>1&&f[0]!==r&&f.unshift("#tmp",r),{tokens:l,state:f.length?f:r}};this.reportError=u.reportError}).call(r.prototype);t.Tokenizer=r});define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(n,t){"use strict";var r=n("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(n,t){var r,u,f,i;if(!t){for(r in n)this.$rules[r]=n[r];return}for(r in n){for(u=n[r],f=0;f<u.length;f++)i=u[f],(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(t)!==0&&(i.next=t+i.next),i.nextState&&i.nextState.indexOf(t)!==0&&(i.nextState=t+i.nextState));this.$rules[t+r]=u}};this.getRules=function(){return this.$rules};this.embedRules=function(n,t,i,u,f){var o=typeof n=="function"?(new n).getRules():n,s,h,e;if(u)for(e=0;e<u.length;e++)u[e]=t+u[e];else{u=[];for(s in o)u.push(t+s)}if(this.addRules(o,t),i)for(h=Array.prototype[f?"push":"unshift"],e=0;e<u.length;e++)h.apply(this.$rules[u[e]],r.deepCopy(i));this.$embeds||(this.$embeds=[]);this.$embeds.push(t)};this.getEmbeds=function(){return this.$embeds};var n=function(n,t){return(n!="start"||t.length)&&t.unshift(this.nextState,n),this.nextState},t=function(n,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function r(f){var c=i[f],h,e,l,a,o,s,y,v;for(c.processed=!0,h=0;h<c.length;h++){if(e=c[h],l=null,Array.isArray(e)&&(l=e,e={}),!e.regex&&e.start&&(e.regex=e.start,e.next||(e.next=[]),e.next.push({defaultToken:e.token},{token:e.token+".end",regex:e.end||e.start,next:"pop"}),e.token=e.token+".start",e.push=!0),a=e.next||e.push,a&&Array.isArray(a)?(o=e.stateName,o||(o=e.token,typeof o!="string"&&(o=o[0]||""),i[o]&&(o+=u++)),i[o]=a,e.next=o,r(o)):a=="pop"&&(e.next=t),e.push&&(e.nextState=e.next||e.push,e.next=n,delete e.push),e.rules)for(s in e.rules)i[s]?i[s].push&&i[s].push.apply(i[s],e.rules[s]):i[s]=e.rules[s];y=typeof e=="string"?e:typeof e.include=="string"?e.include:"";y&&(l=i[y]);l&&(v=[h,1].concat(l),e.noEscape&&(v=v.filter(function(n){return!n.next})),c.splice.apply(c,v),h--);e.keywordMap&&(e.token=this.createKeywordMapper(e.keywordMap,e.defaultToken||"text",e.caseInsensitive),delete e.defaultToken)}}var u=0,i=this.$rules;Object.keys(i).forEach(r,this)};this.createKeywordMapper=function(n,t,i,r){var u=Object.create(null);return Object.keys(n).forEach(function(t){var f=n[t],e,o;for(i&&(f=f.toLowerCase()),e=f.split(r||"|"),o=e.length;o--;)u[e[o]]=t}),Object.getPrototypeOf(u)&&(u.__proto__=null),this.$keywordList=Object.keys(u),n=null,i?function(n){return u[n.toLowerCase()]||t}:function(n){return u[n]||t}};this.getKeywords=function(){return this.$keywords}}).call(i.prototype);t.TextHighlightRules=i});define("ace/mode/behaviour",["require","exports","module"],function(n,t){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(n,t,i){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[n]:this.$behaviours[n]={}}this.$behaviours[n][t]=i};this.addBehaviours=function(n){var t,i;for(t in n)for(i in n[t])this.add(t,i,n[t][i])};this.remove=function(n){this.$behaviours&&this.$behaviours[n]&&delete this.$behaviours[n]};this.inherit=function(n,t){var i;i=typeof n=="function"?(new n).getBehaviours(t):n.getBehaviours(t);this.addBehaviours(i)};this.getBehaviours=function(n){var i,t;if(n){for(i={},t=0;t<n.length;t++)this.$behaviours[n[t]]&&(i[n[t]]=this.$behaviours[n[t]]);return i}return this.$behaviours}}).call(i.prototype);t.Behaviour=i});define("ace/token_iterator",["require","exports","module"],function(n,t){"use strict";var i=function(n,t,i){this.$session=n;this.$row=t;this.$rowTokens=n.getTokens(t);var r=n.getTokenAt(t,i);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row);this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]};this.stepForward=function(){this.$tokenIndex+=1;for(var n;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,n||(n=this.$session.getLength()),this.$row>=n)return this.$row=n-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 i=this.$rowTokens,t=this.$tokenIndex,n=i[t].start;if(n!==undefined)return n;for(n=0;t>0;)t-=1,n+=i[t].value.length;return n};this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(i.prototype);t.TokenIterator=i});define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,t){"use strict";var h=n("../../lib/oop"),c=n("../behaviour").Behaviour,o=n("../../token_iterator").TokenIterator,l=n("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],i,f={},u=function(n){var t=-1;if(n.multiSelect&&(t=n.selection.index,f.rangeCount!=n.multiSelect.rangeCount&&(f={rangeCount:n.multiSelect.rangeCount})),f[t])return i=f[t];i=f[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},e=function(n,t,i,r){var u=n.end.row-n.start.row;return{text:i+t+r,selection:[0,n.start.column+1,u,n.end.column+(u?0:1)]}},r=function(){this.add("braces","insertion",function(n,t,f,o,s){var h=f.getCursorPosition(),c=o.doc.getLine(h.row),b,a,d,y,v,k,p,w;if(s=="{"){if(u(f),b=f.getSelectionRange(),a=o.doc.getTextRange(b),a!==""&&a!=="{"&&f.getWrapBehavioursEnabled())return e(b,a,"{","}");if(r.isSaneInsertion(f,o))return/[\]\}\)]/.test(c[h.column])||f.inMultiSelectMode?(r.recordAutoInsert(f,o,"}"),{text:"{}",selection:[1,1]}):(r.recordMaybeInsert(f,o,"{"),{text:"{",selection:[1,1]})}else if(s=="}"){if(u(f),v=c.substring(h.column,h.column+1),v=="}"&&(d=o.$findOpeningBracket("}",{column:h.column+1,row:h.row}),d!==null&&r.isAutoInsertedClosing(h,c,s)))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if(s=="\n"||s=="\r\n"){if(u(f),y="",r.isMaybeInsertedClosing(h,c)&&(y=l.stringRepeat("}",i.maybeInsertedBrackets),r.clearMaybeInsertedClosing()),v=c.substring(h.column,h.column+1),v==="}"){if(k=o.findMatchingBracket({row:h.row,column:h.column+1},"}"),!k)return null;p=this.$getIndent(o.getLine(k.row))}else if(y)p=this.$getIndent(c);else{r.clearMaybeInsertedClosing();return}return w=p+o.getTabString(),{text:"\n"+w+"\n"+p+y,selection:[1,w.length,1,w.length]}}r.clearMaybeInsertedClosing()}});this.add("braces","deletion",function(n,t,r,f,e){var h=f.doc.getTextRange(e),o,s;if(!e.isMultiLine()&&h=="{"){if(u(r),o=f.doc.getLine(e.start.row),s=o.substring(e.end.column,e.end.column+1),s=="}")return e.end.column++,e;i.maybeInsertedBrackets--}});this.add("parens","insertion",function(n,t,i,f,o){var h,c,a;if(o=="("){if(u(i),h=i.getSelectionRange(),c=f.doc.getTextRange(h),c!==""&&i.getWrapBehavioursEnabled())return e(h,c,"(",")");if(r.isSaneInsertion(i,f))return r.recordAutoInsert(i,f,")"),{text:"()",selection:[1,1]}}else if(o==")"){u(i);var s=i.getCursorPosition(),l=f.doc.getLine(s.row),v=l.substring(s.column,s.column+1);if(v==")"&&(a=f.$findOpeningBracket(")",{column:s.column+1,row:s.row}),a!==null&&r.isAutoInsertedClosing(s,l,o)))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}});this.add("parens","deletion",function(n,t,i,r,f){var s=r.doc.getTextRange(f),e,o;if(!f.isMultiLine()&&s=="("&&(u(i),e=r.doc.getLine(f.start.row),o=e.substring(f.start.column+1,f.start.column+2),o==")"))return f.end.column++,f});this.add("brackets","insertion",function(n,t,i,f,o){var h,c,a;if(o=="["){if(u(i),h=i.getSelectionRange(),c=f.doc.getTextRange(h),c!==""&&i.getWrapBehavioursEnabled())return e(h,c,"[","]");if(r.isSaneInsertion(i,f))return r.recordAutoInsert(i,f,"]"),{text:"[]",selection:[1,1]}}else if(o=="]"){u(i);var s=i.getCursorPosition(),l=f.doc.getLine(s.row),v=l.substring(s.column,s.column+1);if(v=="]"&&(a=f.$findOpeningBracket("]",{column:s.column+1,row:s.row}),a!==null&&r.isAutoInsertedClosing(s,l,o)))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}});this.add("brackets","deletion",function(n,t,i,r,f){var s=r.doc.getTextRange(f),e,o;if(!f.isMultiLine()&&s=="["&&(u(i),e=r.doc.getLine(f.start.row),o=e.substring(f.start.column+1,f.start.column+2),o=="]"))return f.end.column++,f});this.add("string_dquotes","insertion",function(n,t,i,r,f){var v,y,c,l,g,nt;if(f=='"'||f=="'"){if(this.lineCommentStart&&this.lineCommentStart.indexOf(f)!=-1)return;u(i);var s=f,k=i.getSelectionRange(),h=r.doc.getTextRange(k);if(h!==""&&h!=="'"&&h!='"'&&i.getWrapBehavioursEnabled())return e(k,h,s,s);if(!h){var o=i.getCursorPosition(),d=r.doc.getLine(o.row),p=d.substring(o.column-1,o.column),w=d.substring(o.column,o.column+1),a=r.getTokenAt(o.row,o.column),b=r.getTokenAt(o.row,o.column+1);if(p=="\\"&&a&&/escape/.test(a.type))return null;if(v=a&&/string|escape/.test(a.type),y=!b||/string|escape/.test(b.type),w==s)c=v!==y,c&&/string\.end/.test(b.type)&&(c=!1);else{if(v&&!y||v&&y||(l=r.$mode.tokenRe,l.lastIndex=0,g=l.test(p),l.lastIndex=0,nt=l.test(p),g||nt)||w&&!/[\s;,.})\]\\]/.test(w))return null;c=!0}return{text:c?s+s:"",selection:[1,1]}}}});this.add("string_dquotes","deletion",function(n,t,i,r,f){var e=r.doc.getTextRange(f),o,s;if(!f.isMultiLine()&&(e=='"'||e=="'")&&(u(i),o=r.doc.getLine(f.start.row),s=o.substring(f.start.column+1,f.start.column+2),s==e))return f.end.column++,f})};r.isSaneInsertion=function(n,t){var i=n.getCursorPosition(),r=new o(t,i.row,i.column),u;return!this.$matchTokenType(r.getCurrentToken()||"text",s)&&(u=new o(t,i.row,i.column+1),!this.$matchTokenType(u.getCurrentToken()||"text",s))?!1:(r.stepForward(),r.getCurrentTokenRow()!==i.row||this.$matchTokenType(r.getCurrentToken()||"text",a))};r.$matchTokenType=function(n,t){return t.indexOf(n.type||n)>-1};r.recordAutoInsert=function(n,t,r){var u=n.getCursorPosition(),f=t.doc.getLine(u.row);this.isAutoInsertedClosing(u,f,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0);i.autoInsertedRow=u.row;i.autoInsertedLineEnd=r+f.substr(u.column);i.autoInsertedBrackets++};r.recordMaybeInsert=function(n,t,r){var u=n.getCursorPosition(),f=t.doc.getLine(u.row);this.isMaybeInsertedClosing(u,f)||(i.maybeInsertedBrackets=0);i.maybeInsertedRow=u.row;i.maybeInsertedLineStart=f.substr(0,u.column)+r;i.maybeInsertedLineEnd=f.substr(u.column);i.maybeInsertedBrackets++};r.isAutoInsertedClosing=function(n,t,r){return i.autoInsertedBrackets>0&&n.row===i.autoInsertedRow&&r===i.autoInsertedLineEnd[0]&&t.substr(n.column)===i.autoInsertedLineEnd};r.isMaybeInsertedClosing=function(n,t){return i.maybeInsertedBrackets>0&&n.row===i.maybeInsertedRow&&t.substr(n.column)===i.maybeInsertedLineEnd&&t.substr(0,n.column)==i.maybeInsertedLineStart};r.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1);i.autoInsertedBrackets--};r.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)};h.inherits(r,c);t.CstyleBehaviour=r});define("ace/unicode",["require","exports","module"],function(n,t){"use strict";function i(n){var r=/\w{4}/g;for(var i in n)t.packages[i]=n[i].replace(r,"\\u$&")}t.packages={};i({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"})});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(n,t){"use strict";var o=n("../tokenizer").Tokenizer,s=n("./text_highlight_rules").TextHighlightRules,h=n("./behaviour/cstyle").CstyleBehaviour,i=n("../unicode"),r=n("../lib/lang"),u=n("../token_iterator").TokenIterator,f=n("../range").Range,e=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new h;this.tokenRe=new RegExp("^["+i.packages.L+i.packages.Mn+i.packages.Mc+i.packages.Nd+i.packages.Pc+"\\$_]+","g");this.nonTokenRe=new RegExp("^(?:[^"+i.packages.L+i.packages.Mn+i.packages.Mc+i.packages.Nd+i.packages.Pc+"\\$_]|\\s])+","g");this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer};this.lineCommentStart="";this.blockComment="";this.toggleCommentLines=function(n,t,i,u){function b(n){for(var t=i;t<=u;t++)n(e.getLine(t),t)}var e=t.doc,a=!0,c=!0,f=Infinity,o=t.getTabSize(),v=!1,s,h,l;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(s=this.lineCommentStart.map(r.escapeRegExp).join("|"),h=this.lineCommentStart[0]):(s=r.escapeRegExp(this.lineCommentStart),h=this.lineCommentStart);s=new RegExp("^(\\s*)(?:"+s+") ?");v=t.getUseSoftTabs();var g=function(n,t){var r=n.match(s),u,i;r&&(u=r[1].length,i=r[0].length,w(n,u,i)||r[0][i-1]!=" "||i--,e.removeInLine(t,u,i))},nt=h+" ",d=function(n,t){(!a||/\S/.test(n))&&(w(n,f,f)?e.insertInLine({row:t,column:f},nt):e.insertInLine({row:t,column:f},h))},p=function(n){return s.test(n)},w=function(n,t,i){for(var r=0;t--&&n.charAt(t)==" ";)r++;if(r%o!=0)return!1;for(r=0;n.charAt(i++)==" ";)r++;return o>2?r%o!=o-1:r%o==0}}else{if(!this.blockComment)return!1;var h=this.blockComment.start,y=this.blockComment.end,s=new RegExp("^(\\s*)(?:"+r.escapeRegExp(h)+")"),k=new RegExp("(?:"+r.escapeRegExp(y)+")\\s*$"),d=function(n,t){p(n,t)||(!a||/\S/.test(n))&&(e.insertInLine({row:t,column:n.length},y),e.insertInLine({row:t,column:f},h))},g=function(n,t){var i;(i=n.match(k))&&e.removeInLine(t,n.length-i[0].length,n.length);(i=n.match(s))&&e.removeInLine(t,i[1].length,i[0].length)},p=function(n,i){var u,r;if(s.test(n))return!0;for(u=t.getTokens(i),r=0;r<u.length;r++)if(u[r].type==="comment")return!0}}l=Infinity;b(function(n,t){var i=n.search(/\S/);i!==-1?(i<f&&(f=i),c&&!p(n,t)&&(c=!1)):l>n.length&&(l=n.length)});f==Infinity&&(f=l,a=!1,c=!1);v&&f%o!=0&&(f=Math.floor(f/o)*o);b(c?g:d)};this.toggleBlockComment=function(n,t,i,r){var e=this.blockComment,p,w,s,o,h,c,l;if(e){!e.start&&e[0]&&(e=e[0]);var s=new u(t,r.row,r.column),o=s.getCurrentToken(),b=t.selection,a=t.selection.toOrientedRange(),v,y;if(o&&/comment/.test(o.type)){while(o&&/comment/.test(o.type)){if(h=o.value.indexOf(e.start),h!=-1){c=s.getCurrentTokenRow();l=s.getCurrentTokenColumn()+h;p=new f(c,l,c,l+e.start.length);break}o=s.stepBackward()}for(s=new u(t,r.row,r.column),o=s.getCurrentToken();o&&/comment/.test(o.type);){if(h=o.value.indexOf(e.end),h!=-1){c=s.getCurrentTokenRow();l=s.getCurrentTokenColumn()+h;w=new f(c,l,c,l+e.end.length);break}o=s.stepForward()}w&&t.remove(w);p&&(t.remove(p),v=p.start.row,y=-e.start.length)}else y=e.start.length,v=i.start.row,t.insert(i.end,e.end),t.insert(i.start,e.start);a.start.row==v&&(a.start.column+=y);a.end.row==v&&(a.end.column+=y);t.selection.fromOrientedRange(a)}};this.getNextLineIndent=function(n,t){return this.$getIndent(t)};this.checkOutdent=function(){return!1};this.autoOutdent=function(){};this.$getIndent=function(n){return n.match(/^\s*/)[0]};this.createWorker=function(){return null};this.createModeDelegates=function(n){var i,t;this.$embeds=[];this.$modes={};for(t in n)n[t]&&(this.$embeds.push(t),this.$modes[t]=new n[t]);for(i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;t<i.length;t++)(function(n){var r=i[t],u=n[r];n[i[t]]=function(){return this.$delegator(r,arguments,u)}})(this)};this.$delegator=function(n,t,i){var u=t[0],r,f,e,o;for(typeof u!="string"&&(u=u[0]),r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]&&(f=u.split(this.$embeds[r]),!f[0]&&f[1]))return t[0]=f[1],e=this.$modes[this.$embeds[r]],e[n].apply(e,t);return o=i.apply(this,t),i?o:undefined};this.transformAction=function(n,t){var i,r,u;if(this.$behaviour){i=this.$behaviour.getBehaviours();for(r in i)if(i[r][t]&&(u=i[r][t].apply(this,arguments),u))return u}};this.getKeywords=function(n){var e,r,i,t,o,f,s,u;if(!this.completionKeywords){e=this.$tokenizer.rules;r=[];for(u in e)for(i=e[u],t=0,o=i.length;t<o;t++)if(typeof i[t].token=="string")/keyword|support|storage/.test(i[t].token)&&r.push(i[t].regex);else if(typeof i[t].token=="object")for(f=0,s=i[t].token.length;f<s;f++)/keyword|support|storage/.test(i[t].token[f])&&(u=i[t].regex.match(/\(.+?\)/g)[f],r.push(u.substr(1,u.length-2)));this.completionKeywords=r}return n?r.concat(this.$keywordList||[]):this.$keywordList};this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]};this.getCompletions=function(){var n=this.$keywordList||this.$createKeywordList();return n.map(function(n){return{name:n,value:n,score:0,meta:"keyword"}})};this.$id="ace/mode/text"}).call(e.prototype);t.Mode=e});define("ace/apply_delta",["require","exports","module"],function(n,t){"use strict";t.applyDelta=function(n,t){var i=t.start.row,u=t.start.column,r=n[i]||"",o,s,e,f;switch(t.action){case"insert":o=t.lines;o.length===1?n[i]=r.substring(0,u)+t.lines[0]+r.substring(u):(s=[i,1].concat(t.lines),n.splice.apply(n,s),n[i]=r.substring(0,u)+n[i],n[i+t.lines.length-1]+=r.substring(u));break;case"remove":e=t.end.column;f=t.end.row;i===f?n[i]=r.substring(0,u)+r.substring(e):n.splice(i,f-i+1,r.substring(0,u)+n[f].substring(e))}}});define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,t){"use strict";var i=n("./lib/oop"),r=n("./lib/event_emitter").EventEmitter,u=t.Anchor=function(n,t,i){this.$onChange=this.onChange.bind(this);this.attach(n);typeof i=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){function n(n,t,i){var r=i?n.column<=t.column:n.column<t.column;return n.row<t.row||n.row==t.row&&r}function t(t,i,r){var f=t.action=="insert",o=(f?1:-1)*(t.end.row-t.start.row),s=(f?1:-1)*(t.end.column-t.start.column),u=t.start,e=f?u:t.end;return n(i,u,r)?{row:i.row,column:i.column}:n(e,i,!r)?{row:i.row+o,column:i.column+(i.row==e.row?s:0)}:{row:u.row,column:u.column}}i.implement(this,r);this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)};this.getDocument=function(){return this.document};this.$insertRight=!1;this.onChange=function(n){if((n.start.row!=n.end.row||n.start.row==this.row)&&!(n.start.row>this.row)){var i=t(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}};this.setPosition=function(n,t,i){var r,u;(r=i?{row:n,column:t}:this.$clipPositionToDocument(n,t),this.row!=r.row||this.column!=r.column)&&(u={row:this.row,column:this.column},this.row=r.row,this.column=r.column,this._signal("change",{old:u,value:r}))};this.detach=function(){this.document.removeEventListener("change",this.$onChange)};this.attach=function(n){this.document=n||this.document;this.document.on("change",this.$onChange)};this.$clipPositionToDocument=function(n,t){var i={};return n>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):n<0?(i.row=0,i.column=0):(i.row=n,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(u.prototype)});define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,t){"use strict";var u=n("./lib/oop"),f=n("./apply_delta").applyDelta,e=n("./lib/event_emitter").EventEmitter,i=n("./range").Range,o=n("./anchor").Anchor,r=function(n){this.$lines=[""];n.length===0?this.$lines=[""]:Array.isArray(n)?this.insertMergedLines({row:0,column:0},n):this.insert({row:0,column:0},n)};(function(){u.implement(this,e);this.setValue=function(n){var t=this.getLength()-1;this.remove(new i(0,0,t,this.getLine(t).length));this.insert({row:0,column:0},n)};this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())};this.createAnchor=function(n,t){return new o(this,n,t)};this.$split="aaa".split(/a/).length===0?function(n){return n.replace(/\r\n|\r/g,"\n").split("\n")}:function(n){return n.split(/\r\n|\r|\n/)};this.$detectNewLine=function(n){var t=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[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(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))};this.getNewLineMode=function(){return this.$newLineMode};this.isNewLine=function(n){return n=="\r\n"||n=="\r"||n=="\n"};this.getLine=function(n){return this.$lines[n]||""};this.getLines=function(n,t){return this.$lines.slice(n,t+1)};this.getAllLines=function(){return this.getLines(0,this.getLength())};this.getLength=function(){return this.$lines.length};this.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())};this.getLinesForRange=function(n){var t,i;return n.start.row===n.end.row?t=[this.getLine(n.start.row).substring(n.start.column,n.end.column)]:(t=this.getLines(n.start.row,n.end.row),t[0]=(t[0]||"").substring(n.start.column),i=t.length-1,n.end.row-n.start.row==i&&(t[i]=t[i].substring(0,n.end.column))),t};this.insertLines=function(n,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,t)};this.removeLines=function(n,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,t)};this.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])};this.insert=function(n,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(n,this.$split(t))};this.insertInLine=function(n,t){var r=this.clippedPos(n.row,n.column),i=this.pos(n.row,n.column+t.length);return this.applyDelta({start:r,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)};this.clippedPos=function(n,t){var i=this.getLength(),r;return n===undefined?n=i:n<0?n=0:n>=i&&(n=i-1,t=undefined),r=this.getLine(n),t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:n,column:t}};this.clonePos=function(n){return{row:n.row,column:n.column}};this.pos=function(n,t){return{row:n,column:t}};this.$clipPosition=function(n){var t=this.getLength();return n.row>=t?(n.row=Math.max(0,t-1),n.column=this.getLine(t-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n};this.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var i=0;n<this.getLength()?(t=t.concat([""]),i=0):(t=[""].concat(t),n--,i=this.$lines[n].length);this.insertMergedLines({row:n,column:i},t)};this.insertMergedLines=function(n,t){var i=this.clippedPos(n.row,n.column),r={row:i.row+t.length-1,column:(t.length==1?i.column:0)+t[t.length-1].length};return this.applyDelta({start:i,end:r,action:"insert",lines:t}),this.clonePos(r)};this.remove=function(n){var t=this.clippedPos(n.start.row,n.start.column),i=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})}),this.clonePos(t)};this.removeInLine=function(n,t,i){var r=this.clippedPos(n,t),u=this.clippedPos(n,i);return this.applyDelta({start:r,end:u,action:"remove",lines:this.getLinesForRange({start:r,end:u})},!0),this.clonePos(r)};this.removeFullLines=function(n,t){n=Math.min(Math.max(0,n),this.getLength()-1);t=Math.min(Math.max(0,t),this.getLength()-1);var u=t==this.getLength()-1&&n>0,f=t<this.getLength()-1,e=u?n-1:n,s=u?this.getLine(e).length:0,o=f?t+1:t,h=f?0:this.getLine(o).length,r=new i(e,s,o,h),c=this.$lines.slice(n,t+1);return this.applyDelta({start:r.start,end:r.end,action:"remove",lines:this.getLinesForRange(r)}),c};this.removeNewLine=function(n){n<this.getLength()-1&&n>=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})};this.replace=function(n,t){return(n instanceof i||(n=i.fromPoints(n.start,n.end)),t.length===0&&n.isEmpty())?n.start:t==this.getTextRange(n)?n.end:(this.remove(n),t?this.insert(n.start,t):n.start)};this.applyDeltas=function(n){for(var t=0;t<n.length;t++)this.applyDelta(n[t])};this.revertDeltas=function(n){for(var t=n.length-1;t>=0;t--)this.revertDelta(n[t])};this.applyDelta=function(n,t){var r=n.action=="insert";(r?n.lines.length<=1&&!n.lines[0]:!i.comparePoints(n.start,n.end))||(r&&n.lines.length>2e4&&this.$splitAndapplyLargeDelta(n,2e4),f(this.$lines,n,t),this._signal("change",n))};this.$splitAndapplyLargeDelta=function(n,t){var o=n.lines,s=o.length,f=n.start.row,e=n.start.column,r=0,i=0,u;do{if(r=i,i+=t-1,u=o.slice(r,i),i>s){n.lines=u;n.start.row=f+r;n.start.column=e;break}u.push("");this.applyDelta({start:this.pos(f+r,e),end:this.pos(f+i,e=0),action:n.action,lines:u},!0)}while(1)};this.revertDelta=function(n){this.applyDelta({start:this.clonePos(n.start),end:this.clonePos(n.end),action:n.action=="insert"?"remove":"insert",lines:n.lines.slice()})};this.indexToPosition=function(n,t){for(var r=this.$lines||this.getAllLines(),f=this.getNewLineCharacter().length,i=t||0,u=r.length;i<u;i++)if(n-=r[i].length+f,n<0)return{row:i,column:n+r[i].length+f};return{row:u-1,column:r[u-1].length}};this.positionToIndex=function(n,t){for(var r=this.$lines||this.getAllLines(),f=this.getNewLineCharacter().length,u=0,e=Math.min(n.row,r.length),i=t||0;i<e;++i)u+=r[i].length+f;return u+n.column}}).call(r.prototype);t.Document=r});define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,t){"use strict";var r=n("./lib/oop"),u=n("./lib/event_emitter").EventEmitter,i=function(n){this.running=!1;this.lines=[];this.states=[];this.currentLine=0;this.tokenizer=n;var t=this;this.$worker=function(){var f,r;if(t.running){for(var e=new Date,n=t.currentLine,i=-1,o=t.doc,u=n;t.lines[n];)n++;for(f=o.getLength(),r=0,t.running=!1;n<f;){t.$tokenizeRow(n);i=n;do n++;while(t.lines[n]);if(r++,r%5==0&&new Date-e>20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=n;u<=i&&t.fireUpdateEvent(u,i)}}};(function(){r.implement(this,u);this.setTokenizer=function(n){this.tokenizer=n;this.lines=[];this.states=[];this.start(0)};this.setDocument=function(n){this.doc=n;this.lines=[];this.states=[];this.stop()};this.fireUpdateEvent=function(n,t){var i={first:n,last:t};this._signal("update",{data:i})};this.start=function(n){this.currentLine=Math.min(n||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(n){var t=n.start.row,i=n.end.row-t,r;i===0?this.lines[t]=null:n.action=="remove"?(this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null)):(r=Array(i+1),r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r));this.currentLine=Math.min(t,this.currentLine,this.doc.getLength());this.stop()};this.stop=function(){this.running&&clearTimeout(this.running);this.running=!1};this.getTokens=function(n){return this.lines[n]||this.$tokenizeRow(n)};this.getState=function(n){return this.currentLine==n&&this.$tokenizeRow(n),this.states[n]||"start"};this.$tokenizeRow=function(n){var i=this.doc.getLine(n),r=this.states[n-1],t=this.tokenizer.getLineTokens(i,r,n);return this.states[n]+""!=t.state+""?(this.states[n]=t.state,this.lines[n+1]=null,this.currentLine>n+1&&(this.currentLine=n+1)):this.currentLine==n&&(this.currentLine=n+1),this.lines[n]=t.tokens}}).call(i.prototype);t.BackgroundTokenizer=i});define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,t){"use strict";var r=n("./lib/lang"),f=n("./lib/oop"),u=n("./range").Range,i=function(n,t,i){this.setRegexp(n);this.clazz=t;this.type=i||"text"};(function(){this.MAX_RANGES=500;this.setRegexp=function(n){this.regExp+""!=n+""&&(this.regExp=n,this.cache=[])};this.update=function(n,t,i,f){var h,c,o,e,s;if(this.regExp)for(h=f.firstRow,c=f.lastRow,o=h;o<=c;o++)for(e=this.cache[o],e==null&&(e=r.getMatchOffsets(i.getLine(o),this.regExp),e.length>this.MAX_RANGES&&(e=e.slice(0,this.MAX_RANGES)),e=e.map(function(n){return new u(o,n.offset,o,n.offset+n.length)}),this.cache[o]=e.length?e:""),s=e.length;s--;)t.drawSingleLineMarker(n,e[s].toScreenRange(i),this.clazz,f)}}).call(i.prototype);t.SearchHighlight=i});define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,t){"use strict";function i(n,t){this.foldData=n;Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,i.end.row,i.end.column);this.start=this.range.start;this.end=this.range.end;this.folds.forEach(function(n){n.setFoldLine(this)},this)}var r=n("../range").Range;(function(){this.shiftRow=function(n){this.start.row+=n;this.end.row+=n;this.folds.forEach(function(t){t.start.row+=n;t.end.row+=n})};this.addFold=function(n){if(n.sameRow){if(n.start.row<this.startRow||n.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(n);this.folds.sort(function(n,t){return-n.range.compareEnd(t.start.row,t.start.column)});this.range.compareEnd(n.start.row,n.start.column)>0?(this.end.row=n.end.row,this.end.column=n.end.column):this.range.compareStart(n.end.row,n.end.column)<0&&(this.start.row=n.start.row,this.start.column=n.start.column)}else if(n.start.row==this.end.row)this.folds.push(n),this.end.row=n.end.row,this.end.column=n.end.column;else if(n.end.row==this.start.row)this.folds.unshift(n),this.start.row=n.start.row,this.start.column=n.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");n.foldLine=this};this.containsRow=function(n){return n>=this.start.row&&n<=this.end.row};this.walk=function(n,t,i){var u=0,h=this.folds,r,s,f,e=!0,o;for(t==null&&(t=this.end.row,i=this.end.column),o=0;o<h.length;o++){if(r=h[o],s=r.range.compareStart(t,i),s==-1){n(null,t,i,u,e);return}if(f=n(null,r.start.row,r.start.column,u,e),f=!f&&n(r.placeholder,r.start.row,r.start.column,u),f||s===0)return;e=!r.sameRow;u=r.end.column}n(null,t,i,u,e)};this.getNextFoldTo=function(n,t){for(var i,r,u=0;u<this.folds.length;u++){if(i=this.folds[u],r=i.range.compareEnd(n,t),r==-1)return{fold:i,kind:"after"};if(r===0)return{fold:i,kind:"inside"}}return null};this.addRemoveChars=function(n,t,i){var e=this.getNextFoldTo(n,t),r,f,u;if(e)if(r=e.fold,e.kind=="inside"&&r.start.column!=t&&r.start.row!=n)window.console&&window.console.log(n,t,r);else if(r.start.row==n){for(f=this.folds,u=f.indexOf(r),u===0&&(this.start.column+=i),u;u<f.length;u++){if(r=f[u],r.start.column+=i,!r.sameRow)return;r.end.column+=i}this.end.column+=i}};this.split=function(n,t){var u=this.getNextFoldTo(n,t),o;if(!u||u.kind=="inside")return null;var h=u.fold,r=this.folds,f=this.foldData,e=r.indexOf(h),s=r[e-1];return this.end.row=s.end.row,this.end.column=s.end.column,r=r.splice(e,r.length-e),o=new i(f,r),f.splice(f.indexOf(this)+1,0,o),o};this.merge=function(n){for(var i,r=n.folds,t=0;t<r.length;t++)this.addFold(r[t]);i=this.foldData;i.splice(i.indexOf(n),1)};this.toString=function(){var n=[this.range.toString()+": ["];return this.folds.forEach(function(t){n.push("  "+t.toString())}),n.push("]"),n.join("\n")};this.idxToPosition=function(n){for(var t,r=0,i=0;i<this.folds.length;i++){if(t=this.folds[i],n-=t.start.column-r,n<0)return{row:t.start.row,column:t.start.column+n};if(n-=t.placeholder.length,n<0)return t.start;r=t.end.column}return{row:this.end.row,column:this.end.column+n}}}).call(i.prototype);t.FoldLine=i});define("ace/range_list",["require","exports","module","ace/range"],function(n,t){"use strict";var u=n("./range").Range,i=u.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=i;this.pointIndex=function(n,t,r){for(var e,o,f,s=this.ranges,u=r||0;u<s.length;u++)if(e=s[u],o=i(n,e.end),!(o>0))return(f=i(n,e.start),o===0)?t&&f!==0?-u-2:u:f>0||f===0&&!t?u:-u-1;return-u-1};this.add=function(n){var r=!n.isEmpty(),t=this.pointIndex(n.start,r),i;return t<0&&(t=-t-1),i=this.pointIndex(n.end,r,t),i<0?i=-i-1:i++,this.ranges.splice(t,i-t,n)};this.addList=function(n){for(var t=[],i=n.length;i--;)t.push.apply(t,this.add(n[i]));return t};this.substractPoint=function(n){var t=this.pointIndex(n);if(t>=0)return this.ranges.splice(t,1)};this.merge=function(){var e=[],t=this.ranges,n,r,u,f;for(t=t.sort(function(n,t){return i(n.start,t.start)}),n=t[0],u=1;u<t.length;u++)(r=n,n=t[u],f=i(r.end,n.start),f<0)||(f!=0||r.isEmpty()||n.isEmpty())&&(i(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(u,1),e.push(n),n=r,u--);return this.ranges=t,e};this.contains=function(n,t){return this.pointIndex({row:n,column:t})>=0};this.containsPoint=function(n){return this.pointIndex(n)>=0};this.rangeAtPoint=function(n){var t=this.pointIndex(n);if(t>=0)return this.ranges[t]};this.clipRows=function(n,t){var u=this.ranges,i,r,e,f;if(u[0].start.row>t||u[u.length-1].start.row<n)return[];for(i=this.pointIndex({row:n,column:0}),i<0&&(i=-i-1),r=this.pointIndex({row:t,column:0},i),r<0&&(r=-r-1),e=[],f=i;f<r;f++)e.push(u[f]);return e};this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)};this.attach=function(n){this.session&&this.detach();this.session=n;this.onChange=this.$onChange.bind(this);this.session.on("change",this.onChange)};this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)};this.$onChange=function(n){var o,r,i,e,t;n.action=="insert"?(r=n.start,o=n.end):(o=n.start,r=n.end);var u=r.row,c=o.row,f=c-u,s=-r.column+o.column,h=this.ranges;for(i=0,e=h.length;i<e;i++)if(t=h[i],!(t.end.row<u)){if(t.start.row>u)break;if(t.start.row==u&&t.start.column>=r.column&&(t.start.column==r.column&&this.$insertRight||(t.start.column+=s,t.start.row+=f)),t.end.row==u&&t.end.column>=r.column){if(t.end.column==r.column&&this.$insertRight)continue;t.end.column==r.column&&s>0&&i<e-1&&t.end.column>t.start.column&&t.end.column==h[i+1].start.column&&(t.end.column-=s);t.end.column+=s;t.end.row+=f}}if(f!=0&&i<e)for(;i<e;i++)t=h[i],t.start.row+=f,t.end.row+=f}}).call(r.prototype);t.RangeList=r});define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(n,t){"use strict";function r(n,t){n.row-=t.row;n.row==0&&(n.column-=t.column)}function o(n,t){r(n.start,t);r(n.end,t)}function u(n,t){n.row==0&&(n.column+=t.column);n.row+=t.row}function s(n,t){u(n.start,t);u(n.end,t)}var h=n("../range").Range,f=n("../range_list").RangeList,e=n("../lib/oop"),i=t.Fold=function(n,t){this.foldLine=null;this.placeholder=t;this.range=n;this.start=n.start;this.end=n.end;this.sameRow=n.start.row==n.end.row;this.subFolds=this.ranges=[]};e.inherits(i,f),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()};this.setFoldLine=function(n){this.foldLine=n;this.subFolds.forEach(function(t){t.setFoldLine(n)})};this.clone=function(){var t=this.range.clone(),n=new i(t,this.placeholder);return this.subFolds.forEach(function(t){n.subFolds.push(t.clone())}),n.collapseChildren=this.collapseChildren,n};this.addSubFold=function(n){var t,e,u,f,r,i,s,h;if(!this.range.isEqual(n)){if(!this.range.containsRange(n))throw new Error("A fold can't intersect already existing fold"+n.range+this.range);for(o(n,this.start),u=n.start.row,f=n.start.column,t=0,i=-1;t<this.subFolds.length;t++)if(i=this.subFolds[t].range.compare(u,f),i!=1)break;if(e=this.subFolds[t],i==0)return e.addSubFold(n);for(u=n.range.end.row,f=n.range.end.column,r=t,i=-1;r<this.subFolds.length;r++)if(i=this.subFolds[r].range.compare(u,f),i!=1)break;if(s=this.subFolds[r],i==0)throw new Error("A fold can't intersect already existing fold"+n.range+this.range);return h=this.subFolds.splice(t,r-t,n),n.setFoldLine(this.foldLine),n}};this.restoreRange=function(n){return s(n,this.start)}}.call(i.prototype)});define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(n,t){"use strict";function e(){this.getFoldAt=function(n,t,i){var e=this.getFoldLine(n),f,u,r;if(!e)return null;for(f=e.folds,u=0;u<f.length;u++)if(r=f[u],r.range.contains(n,t)){if(i==1&&r.range.isEnd(n,t))continue;else if(i==-1&&r.range.isStart(n,t))continue;return r}};this.getFoldsInRange=function(n){var o=n.start,s=n.end,u=this.$foldData,h=[],i,t,f,r,e;for(o.column+=1,s.column-=1,i=0;i<u.length;i++){if(t=u[i].range.compareRange(n),t==2)continue;else if(t==-2)break;for(f=u[i].folds,r=0;r<f.length;r++){if(e=f[r],t=e.range.compareRange(n),t==-2)break;else if(t==2)continue;else if(t==42)break;h.push(e)}}return o.column-=1,s.column+=1,h};this.getFoldsInRangeList=function(n){var t;return Array.isArray(n)?(t=[],n.forEach(function(n){t=t.concat(this.getFoldsInRange(n))},this)):t=this.getFoldsInRange(n),t};this.getAllFolds=function(){for(var t,r=[],i=this.$foldData,n=0;n<i.length;n++)for(t=0;t<i[n].folds.length;t++)r.push(i[n].folds[t]);return r};this.getFoldStringAt=function(n,t,i,r){var u,f,e,o,s;if(r=r||this.getFoldLine(n),!r)return null;for(u={end:{column:0}},o=0;o<r.folds.length;o++){if(e=r.folds[o],s=e.range.compareEnd(n,t),s==-1){f=this.getLine(e.start.row).substring(u.end.column,e.start.column);break}else if(s===0)return null;u=e}return f||(f=this.getLine(e.start.row).substring(u.end.column)),i==-1?f.substring(0,t-u.end.column):i==1?f.substring(t-u.end.column):f};this.getFoldLine=function(n,t){var u=this.$foldData,i=0,r;for(t&&(i=u.indexOf(t)),i==-1&&(i=0),i;i<u.length;i++){if(r=u[i],r.start.row<=n&&r.end.row>=n)return r;if(r.end.row>n)return null}return null};this.getNextFoldLine=function(n,t){var r=this.$foldData,i=0,u;for(t&&(i=r.indexOf(t)),i==-1&&(i=0),i;i<r.length;i++)if(u=r[i],u.end.row>=n)return u;return null};this.getFoldedRowCount=function(n,t){for(var e=this.$foldData,r=t-n+1,f=0;f<e.length;f++){var o=e[f],u=o.end.row,i=o.start.row;if(u>=t){i<t&&(i>=n?r-=t-i:r=0);break}else u>=n&&(r-=i>=n?u-i:u-n+1)}return r};this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),n};this.addFold=function(n,t){var v=this.$foldData,y=!1,i,o,h,l,c,f,a;n instanceof u?i=n:(i=new u(t,n),i.collapseChildren=t.collapseChildren);this.$clipRangeToDocument(i.range);var s=i.start.row,p=i.start.column,e=i.end.row,w=i.end.column;if(!(s<e||s==e&&p<=w-2))throw new Error("The range has to be at least 2 characters width");if(o=this.getFoldAt(s,p,1),h=this.getFoldAt(e,w,-1),o&&h==o)return o.addSubFold(i);for(o&&!o.range.isStart(s,p)&&this.removeFold(o),h&&!h.range.isEnd(e,w)&&this.removeFold(h),l=this.getFoldsInRange(i.range),l.length>0&&(this.removeFolds(l),l.forEach(function(n){i.addSubFold(n)})),c=0;c<v.length;c++)if(f=v[c],e==f.start.row){f.addFold(i);y=!0;break}else if(s==f.end.row){if(f.addFold(i),y=!0,!i.sameRow&&(a=v[c+1],a&&a.start.row==e)){f.merge(a);break}break}else if(e<=f.start.row)break;return y||(f=this.$addFoldLine(new r(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i};this.addFolds=function(n){n.forEach(function(n){this.addFold(n)},this)};this.removeFold=function(n){var i=n.foldLine,u=i.start.row,f=i.end.row,e=this.$foldData,t=i.folds,r;t.length==1?e.splice(e.indexOf(i),1):i.range.isEnd(n.end.row,n.end.column)?(t.pop(),i.end.row=t[t.length-1].end.row,i.end.column=t[t.length-1].end.column):i.range.isStart(n.start.row,n.start.column)?(t.shift(),i.start.row=t[0].start.row,i.start.column=t[0].start.column):n.sameRow?t.splice(t.indexOf(n),1):(r=i.split(n.start.row,n.start.column),t=r.folds,t.shift(),r.start.row=t[0].start.row,r.start.column=t[0].start.column);this.$updating||(this.$useWrapMode?this.$updateWrapData(u,f):this.$updateRowLengthCache(u,f));this.$modified=!0;this._signal("changeFold",{data:n,action:"remove"})};this.removeFolds=function(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t]);i.forEach(function(n){this.removeFold(n)},this);this.$modified=!0};this.expandFold=function(n){this.removeFold(n);n.subFolds.forEach(function(t){n.restoreRange(t);this.addFold(t)},this);n.collapseChildren>0&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1);n.subFolds=[]};this.expandFolds=function(n){n.forEach(function(n){this.expandFold(n)},this)};this.unfold=function(n,t){var u,r,f;if(n==null?(u=new i(0,0,this.getLength(),0),t=!0):u=typeof n=="number"?new i(n,0,n,this.getLine(n).length):"row"in n?i.fromPoints(n,n):n,r=this.getFoldsInRangeList(u),t)this.removeFolds(r);else for(f=r;f.length;)this.expandFolds(f),f=this.getFoldsInRangeList(u);if(r.length)return r};this.isRowFolded=function(n,t){return!!this.getFoldLine(n,t)};this.getRowFoldEnd=function(n,t){var i=this.getFoldLine(n,t);return i?i.end.row:n};this.getRowFoldStart=function(n,t){var i=this.getFoldLine(n,t);return i?i.start.row:n};this.getFoldDisplayLine=function(n,t,i,r,u){r==null&&(r=n.start.row);u==null&&(u=0);t==null&&(t=n.end.row);i==null&&(i=this.getLine(t).length);var e=this.doc,f="";return n.walk(function(n,t,i,o){if(!(t<r)){if(t==r){if(i<u)return;o=Math.max(u,o)}f+=n!=null?n:e.getLine(t).substring(o,i)}},t,i),f};this.getDisplayLine=function(n,t,i,r){var f=this.getFoldLine(n),u;return f?this.getFoldDisplayLine(f,n,t,i,r):(u=this.doc.getLine(n),u.substring(r||0,t||u.length))};this.$cloneFoldData=function(){var n=[];return n=this.$foldData.map(function(t){var i=t.folds.map(function(n){return n.clone()});return new r(n,i)})};this.toggleFold=function(n){var o=this.selection,t=o.getRange(),i,r,u,e,f;if(t.isEmpty()){if(u=t.start,i=this.getFoldAt(u.row,u.column),i){this.expandFold(i);return}(r=this.findMatchingBracket(u))?t.comparePoint(r)==1?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:u.row,column:u.column+1}))?(t.comparePoint(r)==1?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(u.row,u.column)||t}else{if(e=this.getFoldsInRange(t),n&&e.length){this.expandFolds(e);return}e.length==1&&(i=e[0])}if(i||(i=this.getFoldAt(t.start.row,t.start.column)),i&&i.range.toString()==t.toString()){this.expandFold(i);return}if(f="...",!t.isMultiLine()){if(f=this.getTextRange(t),f.length<4)return;f=f.trim().substring(0,2)+".."}this.addFold(f,t)};this.getCommentFoldRange=function(n,t,r){var e=new f(this,n,t),u=e.getCurrentToken(),o,s;if(u&&/^comment|string/.test(u.type)){if(o=new i,s=new RegExp(u.type.replace(/\..*/,"\\.")),r!=1){do u=e.stepBackward();while(u&&s.test(u.type));e.stepForward()}if(o.start.row=e.getCurrentTokenRow(),o.start.column=e.getCurrentTokenColumn()+2,e=new f(this,n,t),r!=-1){do u=e.stepForward();while(u&&s.test(u.type));u=e.stepBackward()}else u=e.getCurrentToken();return o.end.row=e.getCurrentTokenRow(),o.end.column=e.getCurrentTokenColumn()+u.value.length-2,o}};this.foldAll=function(n,t,i){var f,r,u,e;if(i==undefined&&(i=1e5),f=this.foldWidgets,f)for(t=t||this.getLength(),n=n||0,r=n;r<t;r++)if((f[r]==null&&(f[r]=this.getFoldWidget(r)),f[r]=="start")&&(u=this.getFoldWidgetRange(r),u&&u.isMultiLine()&&u.end.row<=t&&u.start.row>=n)){r=u.end.row;try{e=this.addFold("...",u);e&&(e.collapseChildren=i)}catch(o){}}};this.$foldStyles={manual:1,markbegin:1,markbeginend:1};this.$foldStyle="markbegin";this.setFoldStyle=function(n){if(!this.$foldStyles[n])throw new Error("invalid fold style: "+n+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=n){this.$foldStyle=n;n=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null);this.$setFolding(t)}};this.$setFolding=function(n){if(this.$foldMode!=n){if(this.$foldMode=n,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!n||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[];this.getFoldWidget=n.getFoldWidget.bind(n,this,this.$foldStyle);this.getFoldWidgetRange=n.getFoldWidgetRange.bind(n,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(n,t){var u=this.foldWidgets,i,e,f,r;if(!u||t&&u[n])return{};for(i=n-1;i>=0;){if(f=u[i],f==null&&(f=u[i]=this.getFoldWidget(i)),f=="start"&&(r=this.getFoldWidgetRange(i),e||(e=r),r&&r.end.row>=n))break;i--}return{range:i!==-1&&r,firstRange:e}};this.onFoldWidgetClick=function(n,t){var r,u,i;t=t.domEvent;r={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};u=this.$toggleFoldWidget(n,r);u||(i=t.target||t.srcElement,i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid"))};this.$toggleFoldWidget=function(n,t){var i,u,o,f;if(this.getFoldWidget){var s=this.getFoldWidget(n),h=this.getLine(n),e=s==="end"?-1:1,r=this.getFoldAt(n,e===-1?0:h.length,e);return r?(t.children||t.all?this.removeFold(r):this.expandFold(r),r):(i=this.getFoldWidgetRange(n,!0),i&&!i.isMultiLine()&&(r=this.getFoldAt(i.start.row,i.start.column,1),r&&i.isEqual(r.range)))?(this.removeFold(r),r):(t.siblings?(u=this.getParentFoldRangeData(n),u.range&&(o=u.range.start.row+1,f=u.range.end.row),this.foldAll(o,f,t.all?1e4:0)):t.children?(f=i?i.end.row:this.getLength(),this.foldAll(n+1,f,t.all?1e4:0)):i&&(t.all&&(i.collapseChildren=1e4),this.addFold("...",i)),i)}};this.toggleFoldWidget=function(){var n=this.selection.getCursor().row,t,i,r;(n=this.getRowFoldStart(n),t=this.$toggleFoldWidget(n,{}),t)||(i=this.getParentFoldRangeData(n,!0),t=i.range||i.firstRange,t&&(n=t.start.row,r=this.getFoldAt(n,this.getLine(n).length,1),r?this.removeFold(r):this.addFold("...",t)))};this.updateFoldWidgets=function(n){var t=n.start.row,i=n.end.row-t,r;i===0?this.foldWidgets[t]=null:n.action=="remove"?this.foldWidgets.splice(t,i+1,null):(r=Array(i+1),r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r))};this.tokenizerUpdateFoldWidgets=function(n){var t=n.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var i=n("../range").Range,r=n("./fold_line").FoldLine,u=n("./fold").Fold,f=n("../token_iterator").TokenIterator;t.Folding=e});define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,t){"use strict";function u(){this.findMatchingBracket=function(n,t){var r,i;return n.column==0?null:(r=t||this.getLine(n.row).charAt(n.column-1),r=="")?null:(i=r.match(/([\(\[\{])|([\)\]\}])/),!i)?null:i[1]?this.$findClosingBracket(i[1],n):this.$findOpeningBracket(i[2],n)};this.getBracketRange=function(n){var o=this.getLine(n.row),e=!0,t,f=o.charAt(n.column-1),i=f&&f.match(/([\(\[\{])|([\)\]\}])/),u;if(i||(f=o.charAt(n.column),n={row:n.row,column:n.column+1},i=f&&f.match(/([\(\[\{])|([\)\]\}])/),e=!1),!i)return null;if(i[1]){if(u=this.$findClosingBracket(i[1],n),!u)return null;t=r.fromPoints(n,u);e||(t.end.column++,t.start.column--);t.cursor=t.end}else{if(u=this.$findOpeningBracket(i[2],n),!u)return null;t=r.fromPoints(u,n);e||(t.start.column++,t.end.column--);t.cursor=t.start}return t};this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"};this.$findOpeningBracket=function(n,t,r){var c=this.$brackets[n],s=1,f=new i(this,t.row,t.column),u=f.getCurrentToken(),e,o,h;if(u||(u=f.stepForward()),u){for(r||(r=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+")),e=t.column-f.getCurrentTokenColumn()-2,o=u.value;;){while(e>=0){if(h=o.charAt(e),h==c){if(s-=1,s==0)return{row:f.getCurrentTokenRow(),column:e+f.getCurrentTokenColumn()}}else h==n&&(s+=1);e-=1}do u=f.stepBackward();while(u&&!r.test(u.type));if(u==null)break;o=u.value;e=o.length-1}return null}};this.$findClosingBracket=function(n,t,r){var l=this.$brackets[n],o=1,f=new i(this,t.row,t.column),u=f.getCurrentToken(),e,s,c,h;if(u||(u=f.stepForward()),u){for(r||(r=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+")),e=t.column-f.getCurrentTokenColumn();;){for(s=u.value,c=s.length;e<c;){if(h=s.charAt(e),h==l){if(o-=1,o==0)return{row:f.getCurrentTokenRow(),column:e+f.getCurrentTokenColumn()}}else h==n&&(o+=1);e+=1}do u=f.stepForward();while(u&&!r.test(u.type));if(u==null)break;e=0}return null}}}var i=n("../token_iterator").TokenIterator,r=n("../range").Range;t.BracketMatch=u});define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,t){"use strict";var e=n("./lib/oop"),f=n("./lib/lang"),u=n("./config"),o=n("./lib/event_emitter").EventEmitter,s=n("./selection").Selection,h=n("./mode/text").Mode,i=n("./range").Range,c=n("./document").Document,l=n("./background_tokenizer").BackgroundTokenizer,a=n("./search_highlight").SearchHighlight,r=function(n,t){this.$breakpoints=[];this.$decorations=[];this.$frontMarkers={};this.$backMarkers={};this.$markerId=1;this.$undoSelect=!0;this.$foldData=[];this.id="session"+ ++r.$uid;this.$foldData.toString=function(){return this.join("\n")};this.on("changeFold",this.onChangeFold.bind(this));this.$onChange=this.onChange.bind(this);typeof n=="object"&&n.getLine||(n=new c(n));this.setDocument(n);this.selection=new s(this);u.resetOptions(this);this.setMode(t);u._signal("session",this)};(function(){function w(n){return n<4352?!1:n>=4352&&n<=4447||n>=4515&&n<=4519||n>=4602&&n<=4607||n>=9001&&n<=9002||n>=11904&&n<=11929||n>=11931&&n<=12019||n>=12032&&n<=12245||n>=12272&&n<=12283||n>=12288&&n<=12350||n>=12353&&n<=12438||n>=12441&&n<=12543||n>=12549&&n<=12589||n>=12593&&n<=12686||n>=12688&&n<=12730||n>=12736&&n<=12771||n>=12784&&n<=12830||n>=12832&&n<=12871||n>=12880&&n<=13054||n>=13056&&n<=19903||n>=19968&&n<=42124||n>=42128&&n<=42182||n>=43360&&n<=43388||n>=44032&&n<=55203||n>=55216&&n<=55238||n>=55243&&n<=55291||n>=63744&&n<=64255||n>=65040&&n<=65049||n>=65072&&n<=65106||n>=65108&&n<=65126||n>=65128&&n<=65131||n>=65281&&n<=65376||n>=65504&&n<=65510}e.implement(this,o);this.setDocument=function(n){this.doc&&this.doc.removeListener("change",this.$onChange);this.doc=n;n.on("change",this.$onChange);this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument());this.resetCaches()};this.getDocument=function(){return this.doc};this.$resetRowCache=function(n){if(!n){this.$docRowCache=[];this.$screenRowCache=[];return}var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,n)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))};this.$getRowCacheIndex=function(n,t){for(var r=0,u=n.length-1,i,f;r<=u;)if(i=r+u>>1,f=n[i],t>f)r=i+1;else if(t<f)u=i-1;else return i;return r-1};this.resetCaches=function(){this.$modified=!0;this.$wrapData=[];this.$rowLengthCache=[];this.$resetRowCache(0);this.bgTokenizer&&this.bgTokenizer.start(0)};this.onChangeFold=function(n){var t=n.data;this.$resetRowCache(t.start.row)};this.onChange=function(n){this.$modified=!0;this.$resetRowCache(n.start.row);var t=this.$updateInternalDataOnChange(n);this.$fromUndo||!this.$undoManager||n.ignore||(this.$deltasDoc.push(n),t&&t.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule());this.bgTokenizer&&this.bgTokenizer.$updateOnChange(n);this._signal("change",n)};this.setValue=function(n){this.doc.setValue(n);this.selection.moveTo(0,0);this.$resetRowCache(0);this.$deltas=[];this.$deltasDoc=[];this.$deltasFold=[];this.setUndoManager(this.$undoManager);this.getUndoManager().reset()};this.getValue=this.toString=function(){return this.doc.getValue()};this.getSelection=function(){return this.selection};this.getState=function(n){return this.bgTokenizer.getState(n)};this.getTokens=function(n){return this.bgTokenizer.getTokens(n)};this.getTokenAt=function(n,t){var u=this.bgTokenizer.getTokens(n),r,f=0,i;if(t==null)i=u.length-1,f=this.getLine(n).length;else for(i=0;i<u.length;i++)if(f+=u[i].value.length,f>=t)break;return(r=u[i],!r)?null:(r.index=i,r.start=f-r.value.length,r)};this.setUndoManager=function(n){if(this.$undoManager=n,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),n){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel();t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]);t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]);t.$deltas.length>0&&n.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas});t.mergeUndoDeltas=!1;t.$deltas=[]};this.$informUndoManager=f.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()?f.stringRepeat(" ",this.getTabSize()):"\t"};this.setUseSoftTabs=function(n){this.setOption("useSoftTabs",n)};this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs};this.setTabSize=function(n){this.setOption("tabSize",n)};this.getTabSize=function(){return this.$tabSize};this.isTabStop=function(n){return this.$useSoftTabs&&n.column%this.$tabSize==0};this.$overwrite=!1;this.setOverwrite=function(n){this.setOption("overwrite",n)};this.getOverwrite=function(){return this.$overwrite};this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)};this.addGutterDecoration=function(n,t){this.$decorations[n]||(this.$decorations[n]="");this.$decorations[n]+=" "+t;this._signal("changeBreakpoint",{})};this.removeGutterDecoration=function(n,t){this.$decorations[n]=(this.$decorations[n]||"").replace(" "+t,"");this._signal("changeBreakpoint",{})};this.getBreakpoints=function(){return this.$breakpoints};this.setBreakpoints=function(n){this.$breakpoints=[];for(var t=0;t<n.length;t++)this.$breakpoints[n[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})};this.clearBreakpoints=function(){this.$breakpoints=[];this._signal("changeBreakpoint",{})};this.setBreakpoint=function(n,t){t===undefined&&(t="ace_breakpoint");t?this.$breakpoints[n]=t:delete this.$breakpoints[n];this._signal("changeBreakpoint",{})};this.clearBreakpoint=function(n){delete this.$breakpoints[n];this._signal("changeBreakpoint",{})};this.addMarker=function(n,t,i,r){var u=this.$markerId++,f={range:n,type:i||"line",renderer:typeof i=="function"?i:null,clazz:t,inFront:!!r,id:u};return r?(this.$frontMarkers[u]=f,this._signal("changeFrontMarker")):(this.$backMarkers[u]=f,this._signal("changeBackMarker")),u};this.addDynamicMarker=function(n,t){if(n.update){var i=this.$markerId++;return n.id=i,n.inFront=!!t,t?(this.$frontMarkers[i]=n,this._signal("changeFrontMarker")):(this.$backMarkers[i]=n,this._signal("changeBackMarker")),n}};this.removeMarker=function(n){var t=this.$frontMarkers[n]||this.$backMarkers[n],i;t&&(i=t.inFront?this.$frontMarkers:this.$backMarkers,t&&(delete i[n],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker")))};this.getMarkers=function(n){return n?this.$frontMarkers:this.$backMarkers};this.highlight=function(n){if(!this.$searchHighlight){var t=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(n)};this.highlightLines=function(n,t,r,u){typeof t!="number"&&(r=t,t=n);r||(r="ace_step");var f=new i(n,0,t,Infinity);return f.id=this.addMarker(f,r,"fullLine",u),f};this.setAnnotations=function(n){this.$annotations=n;this._signal("changeAnnotation",{})};this.getAnnotations=function(){return this.$annotations||[]};this.clearAnnotations=function(){this.setAnnotations([])};this.$detectNewLine=function(n){var t=n.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"};this.getWordRange=function(n,t){var u=this.getLine(n),e=!1,o,r,f;if(t>0&&(e=!!u.charAt(t-1).match(this.tokenRe)),e||(e=!!u.charAt(t).match(this.tokenRe)),o=e?this.tokenRe:/^\s+$/.test(u.slice(t-1,t+1))?/\s/:this.nonTokenRe,r=t,r>0){do r--;while(r>=0&&u.charAt(r).match(o));r++}for(f=t;f<u.length&&u.charAt(f).match(o);)f++;return new i(n,r,n,f)};this.getAWordRange=function(n,t){for(var i=this.getWordRange(n,t),r=this.getLine(i.end.row);r.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i};this.setNewLineMode=function(n){this.doc.setNewLineMode(n)};this.getNewLineMode=function(){return this.doc.getNewLineMode()};this.setUseWorker=function(n){this.setOption("useWorker",n)};this.getUseWorker=function(){return this.$useWorker};this.onReloadTokenizer=function(n){var t=n.data;this.bgTokenizer.start(t.first);this._signal("tokenizerUpdate",n)};this.$modes={};this.$mode=null;this.$modeId=null;this.setMode=function(n,t){if(n&&typeof n=="object"){if(n.getTokenizer)return this.$onChangeMode(n);var r=n,i=r.path}else i=n||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[i]&&!r){this.$onChangeMode(this.$modes[i]);t&&t();return}this.$modeId=i;u.loadModule(["mode",i],function(n){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!r?this.$onChangeMode(this.$modes[i]):n&&n.Mode&&(n=new n.Mode(r),r||(this.$modes[i]=n,n.$id=i),this.$onChangeMode(n));t&&t()}.bind(this));this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)};this.$onChangeMode=function(n,t){var i,r,u;(t||(this.$modeId=n.$id),this.$mode!==n)&&(this.$mode=n,this.$stopWorker(),this.$useWorker&&this.$startWorker(),i=n.getTokenizer(),i.addEventListener!==undefined&&(r=this.onReloadTokenizer.bind(this),i.addEventListener("update",r)),this.bgTokenizer?this.bgTokenizer.setTokenizer(i):(this.bgTokenizer=new l(i),u=this,this.bgTokenizer.addEventListener("update",function(n){u._signal("tokenizerUpdate",n)})),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=n.tokenRe,this.nonTokenRe=n.nonTokenRe,t||(n.attachToSession&&n.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(n.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode")))};this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)};this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(n){u.warn("Could not load worker",n);this.$worker=null}};this.getMode=function(){return this.$mode};this.$scrollTop=0;this.setScrollTop=function(n){this.$scrollTop===n||isNaN(n)||(this.$scrollTop=n,this._signal("changeScrollTop",n))};this.getScrollTop=function(){return this.$scrollTop};this.$scrollLeft=0;this.setScrollLeft=function(n){this.$scrollLeft===n||isNaN(n)||(this.$scrollLeft=n,this._signal("changeScrollLeft",n))};this.getScrollLeft=function(){return this.$scrollLeft};this.getScreenWidth=function(){return(this.$computeWidth(),this.lineWidgets)?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth};this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var n=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>n&&(n=t.screenWidth)}),this.lineWidgetWidth=n};this.$computeWidth=function(n){var t;if(this.$modified||n){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var f=this.doc.getAllLines(),r=this.$rowLengthCache,u=0,e=0,i=this.$foldData[e],o=i?i.start.row:Infinity,s=f.length;for(t=0;t<s;t++){if(t>o){if(t=i.end.row+1,t>=s)break;i=this.$foldData[e++];o=i?i.start.row:Infinity}r[t]==null&&(r[t]=this.$getStringScreenWidth(f[t])[0]);r[t]>u&&(u=r[t])}this.screenWidth=u}};this.getLine=function(n){return this.doc.getLine(n)};this.getLines=function(n,t){return this.doc.getLines(n,t)};this.getLength=function(){return this.doc.getLength()};this.getTextRange=function(n){return this.doc.getTextRange(n||this.selection.getRange())};this.insert=function(n,t){return this.doc.insert(n,t)};this.remove=function(n){return this.doc.remove(n)};this.removeFullLines=function(n,t){return this.doc.removeFullLines(n,t)};this.undoChanges=function(n,t){var i,u,r;if(n.length){for(this.$fromUndo=!0,i=null,u=n.length-1;u!=-1;u--)r=n[u],r.group=="doc"?(this.doc.revertDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!0,i)):r.deltas.forEach(function(n){this.addFolds(n.folds)},this);return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}};this.redoChanges=function(n,t){var i,r,u;if(n.length){for(this.$fromUndo=!0,i=null,r=0;r<n.length;r++)u=n[r],u.group=="doc"&&(this.doc.applyDeltas(u.deltas),i=this.$getUndoSelection(u.deltas,!1,i));return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}};this.setUndoSelect=function(n){this.$undoSelect=n};this.$getUndoSelection=function(n,t,r){function c(n){return t?n.action!=="insert":n.action==="insert"}var f=n[0],u,e,o=!1,s,h;for(c(f)?(u=i.fromPoints(f.start,f.end),o=!0):(u=i.fromPoints(f.start,f.start),o=!1),s=1;s<n.length;s++)f=n[s],c(f)?(e=f.start,u.compare(e.row,e.column)==-1&&u.setStart(e),e=f.end,u.compare(e.row,e.column)==1&&u.setEnd(e),o=!0):(e=f.start,u.compare(e.row,e.column)==-1&&(u=i.fromPoints(f.start,f.start)),o=!1);return r!=null&&(i.comparePoints(r.start,u.start)===0&&(r.start.column+=u.end.column-u.start.column,r.end.column+=u.end.column-u.start.column),h=r.compareRange(u),h==1?u.setStart(r.start):h==-1&&u.setEnd(r.end)),u};this.replace=function(n,t){return this.doc.replace(n,t)};this.moveText=function(n,t,r){var c=this.getTextRange(n),s=this.getFoldsInRange(n),u=i.fromPoints(t,t),f,e;if(r||(this.remove(n),f=n.start.row-n.end.row,e=f?-n.end.column:n.start.column-n.end.column,e&&(u.start.row==n.end.row&&u.start.column>n.end.column&&(u.start.column+=e),u.end.row==n.end.row&&u.end.column>n.end.column&&(u.end.column+=e)),f&&u.start.row>=n.end.row&&(u.start.row+=f,u.end.row+=f)),u.end=this.insert(u.start,c),s.length){var o=n.start,h=u.start,f=h.row-o.row,e=h.column-o.column;this.addFolds(s.map(function(n){return n=n.clone(),n.start.row==o.row&&(n.start.column+=e),n.end.row==o.row&&(n.end.column+=e),n.start.row+=f,n.end.row+=f,n}))}return u};this.indentRows=function(n,t,i){i=i.replace(/\t/g,this.getTabString());for(var r=n;r<=t;r++)this.doc.insertInLine({row:r,column:0},i)};this.outdentRows=function(n){for(var f,t,e=n.collapseRows(),r=new i(0,0,0,0),o=this.getTabSize(),u=e.start.row;u<=e.end.row;++u){for(f=this.getLine(u),r.start.row=u,r.end.row=u,t=0;t<o;++t)if(f.charAt(t)!=" ")break;t<o&&f.charAt(t)=="\t"?(r.start.column=t,r.end.column=t+1):(r.start.column=0,r.end.column=t);this.remove(r)}};this.$moveLines=function(n,t,r){var f,u;if(n=this.getRowFoldStart(n),t=this.getRowFoldEnd(t),r<0){if(f=this.getRowFoldStart(n+r),f<0)return 0;u=f-n}else if(r>0){if(f=this.getRowFoldEnd(t+r),f>this.doc.getLength()-1)return 0;u=f-t}else n=this.$clipRowToDocument(n),t=this.$clipRowToDocument(t),u=t-n+1;var o=new i(n,0,t,Number.MAX_VALUE),e=this.getFoldsInRange(o).map(function(n){return n=n.clone(),n.start.row+=u,n.end.row+=u,n}),s=r==0?this.doc.getLines(n,t):this.doc.removeFullLines(n,t);return this.doc.insertFullLines(n+u,s),e.length&&this.addFolds(e),u};this.moveLinesUp=function(n,t){return this.$moveLines(n,t,-1)};this.moveLinesDown=function(n,t){return this.$moveLines(n,t,1)};this.duplicateLines=function(n,t){return this.$moveLines(n,t,0)};this.$clipRowToDocument=function(n){return Math.max(0,Math.min(n,this.doc.getLength()-1))};this.$clipColumnToRow=function(n,t){return t<0?0:Math.min(this.doc.getLine(n).length,t)};this.$clipPositionToDocument=function(n,t){if(t=Math.max(0,t),n<0)n=0,t=0;else{var i=this.doc.getLength();n>=i?(n=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(n).length,t)}return{row:n,column:t}};this.$clipRangeToDocument=function(n){n.start.row<0?(n.start.row=0,n.start.column=0):n.start.column=this.$clipColumnToRow(n.start.row,n.start.column);var t=this.doc.getLength()-1;return n.end.row>t?(n.end.row=t,n.end.column=this.doc.getLine(t).length):n.end.column=this.$clipColumnToRow(n.end.row,n.end.column),n};this.$wrapLimit=80;this.$useWrapMode=!1;this.$wrapLimitRange={min:null,max:null};this.setUseWrapMode=function(n){if(n!=this.$useWrapMode){if(this.$useWrapMode=n,this.$modified=!0,this.$resetRowCache(0),n){var t=this.getLength();this.$wrapData=Array(t);this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}};this.getUseWrapMode=function(){return this.$useWrapMode};this.setWrapLimitRange=function(n,t){(this.$wrapLimitRange.min!==n||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:n,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))};this.adjustWrapLimit=function(n,t){var i=this.$wrapLimitRange,r;return(i.max<0&&(i={min:t,max:t}),r=this.$constrainWrapLimit(n,i.min,i.max),r!=this.$wrapLimit&&r>1)?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1};this.$constrainWrapLimit=function(n,t,i){return t&&(n=Math.max(t,n)),i&&(n=Math.min(i,n)),n};this.getWrapLimit=function(){return this.$wrapLimit};this.setWrapLimit=function(n){this.setWrapLimitRange(n,n)};this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}};this.$updateInternalDataOnChange=function(n){var l=this.$useWrapMode,p=n.action,f=n.start,e=n.end,i=f.row,s=e.row,r=s-i,h=null,o,u,c,a,v,y,t;if(this.$updating=!0,r!=0)if(p==="remove"){for(this[l?"$wrapData":"$rowLengthCache"].splice(i,r),o=this.$foldData,h=this.getFoldsInRange(n),this.removeFolds(h),t=this.getFoldLine(e.row),u=0,t&&(t.addRemoveChars(e.row,e.column,f.column-e.column),t.shiftRow(-r),c=this.getFoldLine(i),c&&c!==t&&(c.merge(t),t=c),u=o.indexOf(t)+1),u;u<o.length;u++)t=o[u],t.start.row>=e.row&&t.shiftRow(-r);s=i}else{a=Array(r);a.unshift(i,0);v=l?this.$wrapData:this.$rowLengthCache;v.splice.apply(v,a);var o=this.$foldData,t=this.getFoldLine(i),u=0;for(t&&(y=t.range.compareInside(f.row,f.column),y==0?(t=t.split(f.row,f.column),t&&(t.shiftRow(r),t.addRemoveChars(s,0,e.column-f.column))):y==-1&&(t.addRemoveChars(i,0,e.column-f.column),t.shiftRow(r)),u=o.indexOf(t)+1),u;u<o.length;u++)t=o[u],t.start.row>=i&&t.shiftRow(r)}else r=Math.abs(n.start.column-n.end.column),p==="remove"&&(h=this.getFoldsInRange(n),this.removeFolds(h),r=-r),t=this.getFoldLine(i),t&&t.addRemoveChars(i,f.column,r);return l&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,l?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),h};this.$updateRowLengthCache=function(n,t){this.$rowLengthCache[n]=null;this.$rowLengthCache[t]=null};this.$updateWrapData=function(t,i){var o=this.doc.getAllLines(),s=this.getTabSize(),h=this.$wrapData,c=this.$wrapLimit,u,f,e=t;for(i=Math.min(i,o.length-1);e<=i;)f=this.getFoldLine(e,f),f?(u=[],f.walk(function(t,i,f,e){var s,h;if(t!=null)for(s=this.$getDisplayTokens(t,u.length),s[0]=n,h=1;h<s.length;h++)s[h]=r;else s=this.$getDisplayTokens(o[i].substring(e,f),u.length);u=u.concat(s)}.bind(this),f.end.row,o[f.end.row].length+1),h[f.start.row]=this.$computeWrapSplits(u,c,s),e=f.end.row+1):(u=this.$getDisplayTokens(o[e]),h[e]=this.$computeWrapSplits(u,c,s),e++)};var s=1,c=2,n=3,r=4,v=9,t=10,y=11,p=12;this.$computeWrapSplits=function(i,u,f){function nt(){var n=0,r,u;if(d===0)return n;if(w)for(r=0;r<i.length;r++)if(u=i[r],u==t)n+=1;else if(u==y)n+=f;else if(u==p)continue;else break;return k&&w!==!1&&(n+=f),Math.min(n,d)}function l(n){var r=i.slice(o,n),t=r.length;r.join("").replace(/12/g,function(){t-=1}).replace(/2/g,function(){t-=1});a.length||(s=nt(),a.indent=s);b+=t;a.push(b);o=n}var s,e,h;if(i.length==0)return[];var a=[],g=i.length,o=0,b=0,k=this.$wrapAsCode,w=this.$indentedSoftWrap,d=u<=Math.max(2*f,8)||w===!1?0:Math.floor(u/2);for(s=0;g-o>u-s;){if(e=o+u-s,i[e-1]>=t&&i[e]>=t){l(e);continue}if(i[e]==n||i[e]==r){for(e;e!=o-1;e--)if(i[e]==n)break;if(e>o){l(e);continue}for(e=o+u,e;e<i.length;e++)if(i[e]!=r)break;if(e==i.length)break;l(e);continue}for(h=Math.max(e-(u-(u>>2)),o-1);e>h&&i[e]<n;)e--;if(k){while(e>h&&i[e]<n)e--;while(e>h&&i[e]==v)e--}else while(e>h&&i[e]<t)e--;if(e>h){l(++e);continue}e=o+u;i[e]==c&&e--;l(e-s)}return a};this.$getDisplayTokens=function(n,i){var u=[],o,f,r,e;for(i=i||0,f=0;f<n.length;f++)if(r=n.charCodeAt(f),r==9)for(o=this.getScreenTabSize(u.length+i),u.push(y),e=1;e<o;e++)u.push(p);else r==32?u.push(t):r>39&&r<48||r>57&&r<64?u.push(v):r>=4352&&w(r)?u.push(s,c):u.push(s);return u};this.$getStringScreenWidth=function(n,t,i){if(t==0)return[0,0];t==null&&(t=Infinity);i=i||0;for(var u,r=0;r<n.length;r++)if(u=n.charCodeAt(r),i+=u==9?this.getScreenTabSize(i):u>=4352&&w(u)?2:1,i>t)break;return[i,r]};this.lineWidgets=null;this.getRowLength=function(n){if(this.lineWidgets)var t=this.lineWidgets[n]&&this.lineWidgets[n].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+1+t:1+t};this.getRowLineCount=function(n){return this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+1:1};this.getRowWrapIndent=function(n){if(this.$useWrapMode){var i=this.screenToDocumentPosition(n,Number.MAX_VALUE),t=this.$wrapData[i.row];return t.length&&t[0]<i.column?t.indent:0}return 0};this.getScreenLastRowColumn=function(n){var t=this.screenToDocumentPosition(n,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)};this.getDocumentLastRowColumn=function(n,t){var i=this.documentToScreenRow(n,t);return this.getScreenLastRowColumn(i)};this.getDocumentLastRowColumnPosition=function(n,t){var i=this.documentToScreenRow(n,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)};this.getRowSplitData=function(n){return this.$useWrapMode?this.$wrapData[n]:undefined};this.getScreenTabSize=function(n){return this.$tabSize-n%this.$tabSize};this.screenToDocumentRow=function(n,t){return this.screenToDocumentPosition(n,t).row};this.screenToDocumentColumn=function(n,t){return this.screenToDocumentPosition(n,t).column};this.screenToDocumentPosition=function(n,t){var w,p,u,l;if(n<0)return{row:0,column:0};var o,i=0,f=0,a,e=0,s=0,h=this.$screenRowCache,v=this.$getRowCacheIndex(h,n),y=h.length;if(y&&v>=0)var e=h[v],i=this.$docRowCache[v],w=n>h[y-1];else w=!y;for(var c=this.getLength()-1,r=this.getNextFoldLine(i),b=r?r.start.row:Infinity;e<=n;){if(s=this.getRowLength(i),e+s>n||i>=c)break;else e+=s,i++,i>b&&(i=r.end.row+1,r=this.getNextFoldLine(i,r),b=r?r.start.row:Infinity);w&&(this.$docRowCache.push(i),this.$screenRowCache.push(e))}if(r&&r.start.row<=i)o=this.getFoldDisplayLine(r),i=r.start.row;else{if(e+s<=n||i>c)return{row:c,column:this.getLine(c).length};o=this.getLine(i);r=null}return(p=0,this.$useWrapMode&&(u=this.$wrapData[i],u&&(l=Math.floor(n-e),a=u[l],l>0&&u.length&&(p=u.indent,f=u[l-1]||u[u.length-1],o=o.substring(f)))),f+=this.$getStringScreenWidth(o,t-p)[1],this.$useWrapMode&&f>=a&&(f=a-1),r)?r.idxToPosition(f):{row:i,column:f}};this.documentToScreenPosition=function(n,t){var a,b,i,l,u,w,e,o;a=typeof t=="undefined"?this.$clipPositionToDocument(n.row,n.column):this.$clipPositionToDocument(n,t);n=a.row;t=a.column;var s=0,v=null,h=null;h=this.getFoldAt(n,t,1);h&&(n=h.start.row,t=h.start.column);var f,r=0,c=this.$docRowCache,y=this.$getRowCacheIndex(c,n),p=c.length;if(p&&y>=0)var r=c[y],s=this.$screenRowCache[y],b=n>c[p-1];else b=!p;for(i=this.getNextFoldLine(r),l=i?i.start.row:Infinity;r<n;){if(r>=l){if(f=i.end.row+1,f>n)break;i=this.getNextFoldLine(f,i);l=i?i.start.row:Infinity}else f=r+1;s+=this.getRowLength(r);r=f;b&&(this.$docRowCache.push(r),this.$screenRowCache.push(s))}if(u="",i&&r>=l?(u=this.getFoldDisplayLine(i,n,t),v=i.start.row):(u=this.getLine(n).substring(0,t),v=n),w=0,this.$useWrapMode&&(e=this.$wrapData[v],e)){for(o=0;u.length>=e[o];)s++,o++;u=u.substring(e[o-1]||0,u.length);w=o>0?e.indent:0}return{row:s,column:w+this.$getStringScreenWidth(u)[0]}};this.documentToScreenColumn=function(n,t){return this.documentToScreenPosition(n,t).column};this.documentToScreenRow=function(n,t){return this.documentToScreenPosition(n,t).row};this.getScreenLength=function(){var i=0,n=null,u,t,f;if(this.$useWrapMode)for(var o=this.$wrapData.length,r=0,t=0,n=this.$foldData[t++],e=n?n.start.row:Infinity;r<o;)f=this.$wrapData[r],i+=f?f.length+1:1,r++,r>e&&(r=n.end.row+1,n=this.$foldData[t++],e=n?n.start.row:Infinity);else for(i=this.getLength(),u=this.$foldData,t=0;t<u.length;t++)n=u[t],i-=n.end.row-n.start.row;return this.lineWidgets&&(i+=this.$getWidgetScreenLength()),i};this.$setFontMetrics=function(n){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,i,r){if(i===0)return[0,0];i||(i=Infinity);r=r||0;for(var f,u=0;u<t.length;u++)if(f=t.charAt(u),r+=f==="\t"?this.getScreenTabSize(r):n.getCharacterWidth(f),r>i)break;return[r,u]})};this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null);this.$stopWorker()}}).call(r.prototype);n("./edit_session/folding").Folding.call(r.prototype);n("./edit_session/bracket_match").BracketMatch.call(r.prototype);u.defineOptions(r.prototype,"session",{wrap:{set:function(n){if(n&&n!="off"?n=="free"?n=!0:n=="printMargin"?n=-1:typeof n=="string"&&(n=parseInt(n,10)||!1):n=!1,this.$wrap!=n)if(this.$wrap=n,n){var t=typeof n=="number"?n:null;this.setWrapLimitRange(t,t);this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(n){n=n=="auto"?this.$mode.type!="text":n!="text";n!=this.$wrapAsCode&&(this.$wrapAsCode=n,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(n){this.$useWorker=n;this.$stopWorker();n&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(n){isNaN(n)||this.$tabSize===n||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=n,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(n){this.doc.setNewLineMode(n)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(n){this.setMode(n)},get:function(){return this.$modeId}}});t.EditSession=r});define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,t){"use strict";function e(n,t){function i(n){return/\w/.test(n)||t.regExp?"\\b":""}return i(n[0])+n+i(n[n.length-1])}var i=n("./lib/lang"),f=n("./lib/oop"),r=n("./range").Range,u=function(){this.$options={}};(function(){this.set=function(n){return f.mixin(this.$options,n),this};this.getOptions=function(){return i.copyObject(this.$options)};this.setOptions=function(n){this.$options=n};this.find=function(n){var i=this.$options,u=this.$matchIterator(n,i),t;return u?(t=null,u.forEach(function(n,u,f){if(n.start)t=n;else{var e=n.offset+(f||0);if(t=new r(u,e,u,e+n.length),!n.length&&i.start&&i.start.start&&i.skipCurrent!=!1&&t.isEqual(i.start))return t=null,!1}return!0}),t):!1};this.findAll=function(n){var l=this.$options,s,p,a,e,u,y,t,v;if(!l.needle)return[];this.$assembleRegExp(l);var o=l.range,h=o?n.getLines(o.start.row,o.end.row):n.doc.getAllLines(),f=[],c=l.re;if(l.$isMultiLine){s=c.length;p=h.length-s;n:for(e=c.offset||0;e<=p;e++){for(t=0;t<s;t++)if(h[e+t].search(c[t])==-1)continue n;var w=h[e],k=h[e+s-1],b=w.length-w.match(c[0])[0].length,d=k.match(c[s-1])[0].length;a&&a.end.row===e&&a.end.column>b||(f.push(a=new r(e,b,e+s-1,d)),s>2&&(e=e+s-2))}}else for(u=0;u<h.length;u++)for(y=i.getMatchOffsets(h[u],c),t=0;t<y.length;t++)v=y[t],f.push(new r(u,v.offset,u,v.offset+v.length));if(o){for(var g=o.start.column,nt=o.start.column,u=0,t=f.length-1;u<t&&f[u].start.column<g&&f[u].start.row==o.start.row;)u++;while(u<t&&f[t].end.column>nt&&f[t].end.row==o.end.row)t--;for(f=f.slice(u,t+1),u=0,t=f.length;u<t;u++)f[u].start.row+=o.start.row,f[u].end.row+=o.start.row}return f};this.replace=function(n,t){var u=this.$options,f=this.$assembleRegExp(u),e,i,r;if(u.$isMultiLine)return t;if(f){if(e=f.exec(n),!e||e[0].length!=n.length)return null;if(t=n.replace(f,t),u.preserveCase){for(t=t.split(""),i=Math.min(n.length,n.length);i--;)r=n[i],t[i]=r&&r.toLowerCase()!=r?t[i].toUpperCase():t[i].toLowerCase();t=t.join("")}return t}};this.$matchIterator=function(n,t){var u=this.$assembleRegExp(t),f,e,o,s;return u?(t.$isMultiLine?(e=u.length,o=function(t,i,o){var c=t.search(u[0]),s,l,h;if(c!=-1){for(s=1;s<e;s++)if(t=n.getLine(i+s),t.search(u[s])==-1)return;return l=t.match(u[e-1])[0].length,h=new r(i,c,i+e-1,l),u.offset==1?(h.start.row--,h.start.column=Number.MAX_VALUE):o&&(h.start.column+=o),f(h)?!0:void 0}}):o=t.backwards?function(n,t,r){for(var o=i.getMatchOffsets(n,u),e=o.length-1;e>=0;e--)if(f(o[e],t,r))return!0}:function(n,t,r){for(var o=i.getMatchOffsets(n,u),e=0;e<o.length;e++)if(f(o[e],t,r))return!0},s=this.$lineIterator(n,t),{forEach:function(n){f=n;s.forEach(o)}}):!1};this.$assembleRegExp=function(n,t){var r,u,f;if(n.needle instanceof RegExp)return n.re=n.needle;if(r=n.needle,!n.needle)return n.re=!1;if(n.regExp||(r=i.escapeRegExp(r)),n.wholeWord&&(r=e(r,n)),u=n.caseSensitive?"gm":"gmi",n.$isMultiLine=!t&&/[\n\r]/.test(r),n.$isMultiLine)return n.re=this.$assembleMultilineRegExp(r,u);try{f=new RegExp(r,u)}catch(o){f=!1}return n.re=f};this.$assembleMultilineRegExp=function(n,t){for(var r=n.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],u=0;u<r.length;u++)try{i.push(new RegExp(r[u],t))}catch(f){return!1}return r[0]==""?(i.shift(),i.offset=1):i.offset=0,i};this.$lineIterator=function(n,t){var e=t.backwards==!0,o=t.skipCurrent!=!1,r=t.range,i=t.start;i||(i=r?r[e?"end":"start"]:n.selection.getRange());i.start&&(i=i[o!=e?"end":"start"]);var u=r?r.start.row:0,f=r?r.end.row:n.getLength()-1,s=e?function(r){var e=i.row,o=n.getLine(e).substring(0,i.column);if(!r(o,e)){for(e--;e>=u;e--)if(r(n.getLine(e),e))return;if(t.wrap!=!1)for(e=f,u=i.row;e>=u;e--)if(r(n.getLine(e),e))return}}:function(r){var e=i.row,o=n.getLine(e).substr(i.column);if(!r(o,e,i.column)){for(e=e+1;e<=f;e++)if(r(n.getLine(e),e))return;if(t.wrap!=!1)for(e=u,f=i.row;e<=f;e++)if(r(n.getLine(e),e))return}};return{forEach:s}}}).call(u.prototype);t.Search=u});define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,t){"use strict";function u(n,t){this.platform=t||(e.isMac?"mac":"win");this.commands={};this.commandKeyBinding={};this.addCommands(n);this.$singleCommand=!0}function f(n,t){u.call(this,n,t);this.$singleCommand=!1}var i=n("../lib/keys"),e=n("../lib/useragent"),r=i.KEY_MODS;f.prototype=u.prototype,function(){function n(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||0}this.addCommand=function(n){this.commands[n.name]&&this.removeCommand(n);this.commands[n.name]=n;n.bindKey&&this._buildKeyHash(n)};this.removeCommand=function(n,t){var e=n&&(typeof n=="string"?n:n.name),r,u,i,f;n=this.commands[e];t||delete this.commands[e];r=this.commandKeyBinding;for(u in r)i=r[u],i==n?delete r[u]:Array.isArray(i)&&(f=i.indexOf(n),f!=-1&&(i.splice(f,1),i.length==1&&(r[u]=i[0])))};this.bindKey=function(n,t,i){if(typeof n=="object"&&n&&(i==undefined&&(i=n.position),n=n[this.platform]),n){if(typeof t=="function")return this.addCommand({exec:t,bindKey:n,name:t.name||n});n.split("|").forEach(function(n){var u="",f,e,o;n.indexOf(" ")!=-1&&(f=n.split(/\s+/),n=f.pop(),f.forEach(function(n){var t=this.parseKeys(n),i=r[t.hashId]+t.key;u+=(u?" ":"")+i;this._addCommandToBinding(u,"chainKeys")},this),u+=" ");e=this.parseKeys(n);o=r[e.hashId]+e.key;this._addCommandToBinding(u+o,t,i)},this)}};this._addCommandToBinding=function(t,i,r){var u=this.commandKeyBinding,f,e,o,s;if(i)if(!u[t]||this.$singleCommand)u[t]=i;else{for(Array.isArray(u[t])?(f=u[t].indexOf(i))!=-1&&u[t].splice(f,1):u[t]=[u[t]],typeof r!="number"&&(r=r||i.isDefault?-100:n(i)),e=u[t],f=0;f<e.length;f++)if(o=e[f],s=n(o),s>r)break;e.splice(f,0,i)}else delete u[t]};this.addCommands=function(n){n&&Object.keys(n).forEach(function(t){var i=n[t];if(i){if(typeof i=="string")return this.bindKey(i,t);(typeof i=="function"&&(i={exec:i}),typeof i=="object")&&(i.name||(i.name=t),this.addCommand(i))}},this)};this.removeCommands=function(n){Object.keys(n).forEach(function(t){this.removeCommand(n[t])},this)};this.bindKeys=function(n){Object.keys(n).forEach(function(t){this.bindKey(t,n[t])},this)};this._buildKeyHash=function(n){this.bindKey(n.bindKey,n)};this.parseKeys=function(n){var t=n.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(n){return n}),r=t.pop(),o=i[r],f,u,e;if(i.FUNCTION_KEYS[o])r=i.FUNCTION_KEYS[o].toLowerCase();else if(t.length){if(t.length==1&&t[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}else return{key:r,hashId:-1};for(f=0,u=t.length;u--;){if(e=i.KEY_MODS[t[u]],e==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[u]+" in "+n),!1;f|=e}return{key:r,hashId:f}};this.findKeyCommand=function(n,t){var i=r[n]+t;return this.commandKeyBinding[i]};this.handleKeyboard=function(n,t,i,u){if(!(u<0)){var e=r[t]+i,f=this.commandKeyBinding[e];return(n.$keyChain&&(n.$keyChain+=" "+e,f=this.commandKeyBinding[n.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys"))?(n.$keyChain=n.$keyChain||e,{command:"null"}):(n.$keyChain&&(t&&t!=4||i.length!=1?(t==-1||u>0)&&(n.$keyChain=""):n.$keyChain=n.$keyChain.slice(0,-e.length-1)),{command:f})}};this.getStatusText=function(n,t){return t.$keyChain||""}}.call(u.prototype);t.HashHandler=u;t.MultiHashHandler=f});define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,t){"use strict";var r=n("../lib/oop"),u=n("../keyboard/hash_handler").MultiHashHandler,f=n("../lib/event_emitter").EventEmitter,i=function(n,t){u.call(this,t,n);this.byName=this.commands;this.setDefaultHandler("exec",function(n){return n.command.exec(n.editor,n.args||{})})};r.inherits(i,u),function(){r.implement(this,f);this.exec=function(n,t,i){var u,r;if(Array.isArray(n)){for(u=n.length;u--;)if(this.exec(n[u],t,i))return!0;return!1}return(typeof n=="string"&&(n=this.commands[n]),!n)?!1:t&&t.$readOnly&&!n.readOnly?!1:(r={editor:t,command:n,args:i},r.returnValue=this._emit("exec",r),this._signal("afterExec",r),r.returnValue===!1?!1:!0)};this.toggleRecording=function(n){if(!this.$inReplay){if(n&&n._emit("changeStatus"),this.recording)return this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1;this.$addCommandToMacro||(this.$addCommandToMacro=function(n){this.macro.push([n.command,n.args])}.bind(this));this.oldMacro=this.macro;this.macro=[];this.on("exec",this.$addCommandToMacro);return this.recording=!0}};this.replay=function(n){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0;this.macro.forEach(function(t){typeof t=="string"?this.exec(t,n):this.exec(t[0],n,t[1])},this)}finally{this.$inReplay=!1}}};this.trimMacro=function(n){return n.map(function(n){return typeof n[0]!="string"&&(n[0]=n[0].name),n[1]||(n=n[0]),n})}}.call(i.prototype);t.CommandManager=i});define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,t){"use strict";function i(n,t){return{win:n,mac:t}}var f=n("../lib/lang"),r=n("../config"),u=n("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:i("Ctrl-,","Command-,"),exec:function(n){r.loadModule("ace/ext/settings_menu",function(t){t.init(n);n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:i("Alt-E","F4"),exec:function(n){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(n){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:i("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",bindKey:i(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:i("Ctrl-L","Command-L"),exec:function(n){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||n.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:i("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:i("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:i("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:i("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:i("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll();n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:i("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:i("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",bindKey:i("Ctrl-F","Command-F"),exec:function(n){r.loadModule("ace/ext/searchbox",function(t){t.Search(n)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:i("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:i("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:i("Up","Up|Ctrl-P"),exec:function(n,t){n.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:i("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:i("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:i("Down","Down|Ctrl-N"),exec:function(n,t){n.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:i("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:i("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:i("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:i("Left","Left|Ctrl-B"),exec:function(n,t){n.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:i("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:i("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:i("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:i("Right","Right|Ctrl-F"),exec:function(n,t){n.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:i(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:i(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:i("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:i("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",bindKey:i("Ctrl-P","Ctrl-P"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:i("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:i("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:i(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(){},readOnly:!0},{name:"cut",exec:function(n){var t=n.getSelectionRange();n._emit("cut",t);n.selection.isEmpty()||(n.session.remove(t),n.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(n,t){n.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:i("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:i("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(n){r.loadModule("ace/ext/searchbox",function(t){t.Search(n,!0)})}},{name:"undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:i("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:i("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:i("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:i("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:i("Alt-Delete","Ctrl-K"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:i("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(n,t){n.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(n,t){n.insert(f.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:i(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:i("Ctrl-T","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:i("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var t=n.selection.getRange();t.start.column=t.end.column=0;t.end.row++;n.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:i(null,null),exec:function(n){for(var r,h=n.selection.isBackwards(),t=h?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),e=h?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),i=n.session.doc.getLine(t.row).length,l=n.session.doc.getTextRange(n.selection.getRange()),c=l.replace(/\n\s*/," ").length,o=n.session.doc.getLine(t.row),s=t.row+1;s<=e.row+1;s++)r=f.stringTrimLeft(f.stringTrimRight(n.session.doc.getLine(s))),r.length!==0&&(r=" "+r),o+=r;e.row+1<n.session.doc.getLength()-1&&(o+=n.session.doc.getNewLineCharacter());n.clearSelection();n.session.doc.replace(new u(t.row,0,e.row+2,0),o);c>0?(n.selection.moveCursorTo(t.row,t.column),n.selection.selectTo(t.row,t.column+c)):(i=n.session.doc.getLine(t.row).length>i?i+1:i,n.selection.moveCursorTo(t.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:i(null,null),exec:function(n){var f=n.session.doc.getLength()-1,e=n.session.doc.getLine(f).length,i=n.selection.rangeList.ranges,r=[],t;for(i.length<1&&(i=[n.selection.getRange()]),t=0;t<i.length;t++)t==i.length-1&&(i[t].end.row===f&&i[t].end.column===e||r.push(new u(i[t].end.row,i[t].end.column,f,e))),t===0?i[t].start.row===0&&i[t].start.column===0||r.push(new u(0,0,i[t].start.row,i[t].start.column)):r.push(new u(i[t-1].end.row,i[t-1].end.column,i[t].start.row,i[t].start.column));for(n.exitMultiSelectMode(),n.clearSelection(),t=0;t<r.length;t++)n.selection.addRange(r[t],!1)},readOnly:!0,scrollIntoView:"none"}]});define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(n,t){"use strict";n("./lib/fixoldbrowsers");var e=n("./lib/oop"),o=n("./lib/dom"),u=n("./lib/lang"),h=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,l=n("./mouse/mouse_handler").MouseHandler,a=n("./mouse/fold_handler").FoldHandler,v=n("./keyboard/keybinding").KeyBinding,y=n("./edit_session").EditSession,p=n("./search").Search,i=n("./range").Range,w=n("./lib/event_emitter").EventEmitter,b=n("./commands/command_manager").CommandManager,k=n("./commands/default_commands").commands,r=n("./config"),s=n("./token_iterator").TokenIterator,f=function(n,t){var i=n.getContainerElement();this.container=i;this.renderer=n;this.commands=new b(h.isMac?"mac":"win",k);this.textInput=new c(n.getTextAreaContainer(),this);this.renderer.textarea=this.textInput.getElement();this.keyBinding=new v(this);this.$mouseHandler=new l(this);new a(this);this.$blockScrolling=0;this.$search=(new p).set({wrap:!0});this.$historyTracker=this.$historyTracker.bind(this);this.commands.on("exec",this.$historyTracker);this.$initOperationListeners();this._$emitInputEvent=u.delayedCall(function(){this._signal("input",{});this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this));this.on("change",function(n,t){t._$emitInputEvent.schedule(31)});this.setSession(t||new y(""));r.resetOptions(this);r._signal("editor",this)};(function(){e.implement(this,w);this.$initOperationListeners=function(){this.selections=[];this.commands.on("exec",this.startOperation.bind(this),!0);this.commands.on("afterExec",this.endOperation.bind(this),!0);this.$opResetTimer=u.delayedCall(this.endOperation.bind(this));this.on("change",function(){this.curOp||this.startOperation();this.curOp.docChanged=!0}.bind(this),!0);this.on("changeSelection",function(){this.curOp||this.startOperation();this.curOp.selectionChanged=!0}.bind(this),!0)};this.curOp=null;this.prevOp={};this.startOperation=function(n){if(this.curOp){if(!n||this.curOp.command)return;this.prevOp=this.curOp}n||(this.previousCommand=null,n={});this.$opResetTimer.schedule();this.curOp={command:n.command||{},args:n.args,scrollTop:this.renderer.scrollTop};this.curOp.command.name&&this.curOp.command.scrollIntoView!==undefined&&this.$blockScrolling++};this.endOperation=function(n){var i,t,r,u;if(this.curOp){if(n&&n.returnValue===!1)return this.curOp=null;if(this._signal("beforeEndOperation"),i=this.curOp.command,i.name&&this.$blockScrolling>0&&this.$blockScrolling--,t=i&&i.scrollIntoView,t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":r=this.selection.getRange();u=this.renderer.layerConfig;(r.start.row>=u.lastRow||r.end.row<=u.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}t=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp;this.curOp=null}};this.$mergeableCommands=["backspace","del","insertstring"];this.$historyTracker=function(n){var u;if(this.$mergeUndoDeltas){var i=this.prevOp,r=this.$mergeableCommands,t=i.command&&n.command.name==i.command.name;n.command.name=="insertstring"?(u=n.args,this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),t=t&&this.mergeNextCommand&&(!/\s/.test(u)||/\s/.test(i.args)),this.mergeNextCommand=!0):t=t&&r.indexOf(n.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(t=!1);t?this.session.mergeUndoDeltas=!0:r.indexOf(n.command.name)!==-1&&(this.sequenceStartTime=Date.now())}};this.setKeyboardHandler=function(n,t){if(n&&typeof n=="string"){this.$keybindingId=n;var i=this;r.loadModule(["keybinding",n],function(r){i.$keybindingId==n&&i.keyBinding.setKeyboardHandler(r&&r.handler);t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(n),t&&t()};this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()};this.setSession=function(n){var t,i;if(this.session!=n){if(this.curOp&&this.endOperation(),this.curOp={},t=this.session,t&&(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),i=this.session.getSelection(),i.off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)),this.session=n,n){this.$onDocumentChange=this.onDocumentChange.bind(this);n.on("change",this.$onDocumentChange);this.renderer.setSession(n);this.$onChangeMode=this.onChangeMode.bind(this);n.on("changeMode",this.$onChangeMode);this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this);n.on("tokenizerUpdate",this.$onTokenizerUpdate);this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer);n.on("changeTabSize",this.$onChangeTabSize);this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this);n.on("changeWrapLimit",this.$onChangeWrapLimit);this.$onChangeWrapMode=this.onChangeWrapMode.bind(this);n.on("changeWrapMode",this.$onChangeWrapMode);this.$onChangeFold=this.onChangeFold.bind(this);n.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=n.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()}else this.selection=null,this.renderer.setSession(n);this._signal("changeSession",{session:n,oldSession:t});this.curOp=null;t&&t._signal("changeEditor",{oldEditor:this});n&&n._signal("changeEditor",{editor:this})}};this.getSession=function(){return this.session};this.setValue=function(n,t){return this.session.doc.setValue(n),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),n};this.getValue=function(){return this.session.getValue()};this.getSelection=function(){return this.selection};this.resize=function(n){this.renderer.onResize(n)};this.setTheme=function(n,t){this.renderer.setTheme(n,t)};this.getTheme=function(){return this.renderer.getTheme()};this.setStyle=function(n){this.renderer.setStyle(n)};this.unsetStyle=function(n){this.renderer.unsetStyle(n)};this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container,"fontSize")};this.setFontSize=function(n){this.setOption("fontSize",n)};this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var n=this;this.$highlightPending=!0;setTimeout(function(){var t,r,u;(n.$highlightPending=!1,t=n.session,t&&t.bgTokenizer)&&(r=t.findMatchingBracket(n.getCursorPosition()),r?u=new i(r.row,r.column,r.row,r.column+1):t.$mode.getMatching&&(u=t.$mode.getMatching(n.session)),u&&(t.$bracketHighlight=t.addMarker(u,"ace_bracket","text")))},50)}};this.$highlightTags=function(){if(!this.$highlightTagPending){var n=this;this.$highlightTagPending=!0;setTimeout(function(){var t;if(n.$highlightTagPending=!1,t=n.session,t&&t.bgTokenizer){var h=n.getCursorPosition(),f=new s(n.session,h.row,h.column),r=f.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type)){t.removeMarker(t.$tagHighlight);t.$tagHighlight=null;return}if(r.type.indexOf("tag-open")==-1||(r=f.stepForward(),r)){var c=r.value,e=0,u=f.stepBackward();if(u.value=="<"){do u=r,r=f.stepForward(),r&&r.value===c&&r.type.indexOf("tag-name")!==-1&&(u.value==="<"?e++:u.value==="<\/"&&e--);while(r&&e>=0)}else{do r=u,u=f.stepBackward(),r&&r.value===c&&r.type.indexOf("tag-name")!==-1&&(u.value==="<"?e++:u.value==="<\/"&&e--);while(u&&e<=0);f.stepForward()}if(!r){t.removeMarker(t.$tagHighlight);t.$tagHighlight=null;return}var l=f.getCurrentTokenRow(),a=f.getCurrentTokenColumn(),o=new i(l,a,l,a+r.value.length),v=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&v!=undefined&&o.compareRange(v.range)!==0&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null);o&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(o,"ace_bracket","text"))}}},50)}};this.focus=function(){var n=this;setTimeout(function(){n.textInput.focus()});this.textInput.focus()};this.isFocused=function(){return this.textInput.isFocused()};this.blur=function(){this.textInput.blur()};this.onFocus=function(n){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",n))};this.onBlur=function(n){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",n))};this.$cursorChange=function(){this.renderer.updateCursor()};this.onDocumentChange=function(n){var t=this.session.$useWrapMode,i=n.start.row==n.end.row?n.end.row:Infinity;this.renderer.updateLines(n.start.row,i,t);this._signal("change",n);this.$cursorChange();this.$updateHighlightActiveLine()};this.onTokenizerUpdate=function(n){var t=n.data;this.renderer.updateLines(t.first,t.last)};this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())};this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())};this.onCursorChange=function(){this.$cursorChange();this.$blockScrolling||(r.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView());this.$highlightBrackets();this.$highlightTags();this.$updateHighlightActiveLine();this._signal("changeSelection")};this.$updateHighlightActiveLine=function(){var n=this.getSession(),t,r;this.$highlightActiveLine&&(this.$selectionStyle=="line"&&this.selection.isMultiLine()||(t=this.getCursorPosition()),!this.renderer.$maxLines||this.session.getLength()!==1||this.renderer.$minLines>1||(t=!1));n.$highlightLineMarker&&!t?(n.removeMarker(n.$highlightLineMarker.id),n.$highlightLineMarker=null):!n.$highlightLineMarker&&t?(r=new i(t.row,t.column,t.row,Infinity),r.id=n.addMarker(r,"ace_active-line","screenLine"),n.$highlightLineMarker=r):t&&(n.$highlightLineMarker.start.row=t.row,n.$highlightLineMarker.end.row=t.row,n.$highlightLineMarker.start.column=t.column,n._signal("changeBackMarker"))};this.onSelectionChange=function(){var n=this.session,t,i,r;n.$selectionMarker&&n.removeMarker(n.$selectionMarker);n.$selectionMarker=null;this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),i=this.getSelectionStyle(),n.$selectionMarker=n.addMarker(t,"ace_selection",i));r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r);this._signal("changeSelection")};this.$getSelectionHighLightRegexp=function(){var e=this.session,n=this.getSelectionRange();if(!n.isEmpty()&&!n.isMultiLine()){var r=n.start.column-1,u=n.end.column+1,i=e.getLine(n.start.row),f=i.length,t=i.substring(Math.max(r,0),Math.min(u,f));if((!(r>=0)||!/^[\w\d]/.test(t))&&(!(u<=f)||!/[\w\d]$/.test(t)))return(t=i.substring(n.start.column,n.end.column),!/^[\w\d]+$/.test(t))?void 0:this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:t})}};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(n){this.renderer.updateText();this._emit("changeMode",n)};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 n=this.getSelectedText();return this._signal("copy",n),n};this.onCopy=function(){this.commands.exec("copy",this)};this.onCut=function(){this.commands.exec("cut",this)};this.onPaste=function(n,t){var i={text:n,event:t};this.commands.exec("paste",this,i)};this.$handlePaste=function(n){var i,t,r,u,f;if(typeof n=="string"&&(n={text:n}),this._signal("paste",n),i=n.text,!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(i);else{if(t=i.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges,t.length>r.length||t.length<2||!t[1])return this.commands.exec("insertstring",this,i);for(u=r.length;u--;)f=r[u],f.isEmpty()||this.session.remove(f),this.session.insert(f.start,t[u])}};this.execCommand=function(n,t){return this.commands.exec(n,this,t)};this.insert=function(n,t){var f=this.session,s=f.getMode(),r=this.getCursorPosition(),u,e,o,c,a;this.getBehavioursEnabled()&&!t&&(u=s.transformAction(f.getState(r.row),"insertion",this,f,n),u&&(n!==u.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),n=u.text));n=="\t"&&(n=this.session.getTabString());this.selection.isEmpty()?this.session.getOverwrite()&&(e=new i.fromPoints(r,r),e.end.column+=n.length,this.session.remove(e)):(e=this.getSelectionRange(),r=this.session.remove(e),this.clearSelection());(n=="\n"||n=="\r\n")&&(o=f.getLine(r.row),r.column>o.search(/\S|$/)&&(c=o.substr(r.column).search(/\S|$/),f.doc.removeInLine(r.row,r.column,r.column+c)));this.clearSelection();var l=r.column,h=f.getState(r.row),o=f.getLine(r.row),v=s.checkOutdent(h,o,n),y=f.insert(r,n);u&&u.selection&&(u.selection.length==2?this.selection.setSelectionRange(new i(r.row,l+u.selection[0],r.row,l+u.selection[1])):this.selection.setSelectionRange(new i(r.row+u.selection[0],u.selection[1],r.row+u.selection[2],u.selection[3])));f.getDocument().isNewLine(n)&&(a=s.getNextLineIndent(h,o.slice(0,r.column),f.getTabString()),f.insert({row:r.row+1,column:0},a));v&&s.autoOutdent(h,f,r.row)};this.onTextInput=function(n){this.keyBinding.onTextInput(n)};this.onCommandKey=function(n,t,i){this.keyBinding.onCommandKey(n,t,i)};this.setOverwrite=function(n){this.session.setOverwrite(n)};this.getOverwrite=function(){return this.session.getOverwrite()};this.toggleOverwrite=function(){this.session.toggleOverwrite()};this.setScrollSpeed=function(n){this.setOption("scrollSpeed",n)};this.getScrollSpeed=function(){return this.getOption("scrollSpeed")};this.setDragDelay=function(n){this.setOption("dragDelay",n)};this.getDragDelay=function(){return this.getOption("dragDelay")};this.setSelectionStyle=function(n){this.setOption("selectionStyle",n)};this.getSelectionStyle=function(){return this.getOption("selectionStyle")};this.setHighlightActiveLine=function(n){this.setOption("highlightActiveLine",n)};this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")};this.setHighlightGutterLine=function(n){this.setOption("highlightGutterLine",n)};this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")};this.setHighlightSelectedWord=function(n){this.setOption("highlightSelectedWord",n)};this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord};this.setAnimatedScroll=function(n){this.renderer.setAnimatedScroll(n)};this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()};this.setShowInvisibles=function(n){this.renderer.setShowInvisibles(n)};this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()};this.setDisplayIndentGuides=function(n){this.renderer.setDisplayIndentGuides(n)};this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()};this.setShowPrintMargin=function(n){this.renderer.setShowPrintMargin(n)};this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()};this.setPrintMarginColumn=function(n){this.renderer.setPrintMarginColumn(n)};this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()};this.setReadOnly=function(n){this.setOption("readOnly",n)};this.getReadOnly=function(){return this.getOption("readOnly")};this.setBehavioursEnabled=function(n){this.setOption("behavioursEnabled",n)};this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")};this.setWrapBehavioursEnabled=function(n){this.setOption("wrapBehavioursEnabled",n)};this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")};this.setShowFoldWidgets=function(n){this.setOption("showFoldWidgets",n)};this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")};this.setFadeFoldWidgets=function(n){this.setOption("fadeFoldWidgets",n)};this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")};this.remove=function(n){var t,r,u;if(this.selection.isEmpty()&&(n=="left"?this.selection.selectLeft():this.selection.selectRight()),t=this.getSelectionRange(),this.getBehavioursEnabled()){var i=this.session,e=i.getState(t.start.row),f=i.getMode().transformAction(e,"deletion",this,i,t);t.end.column===0&&(r=i.getTextRange(t),r[r.length-1]=="\n"&&(u=i.getLine(t.end.row),/^\s+$/.test(u)&&(t.end.column=u.length)));f&&(t=f)}this.session.remove(t);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 n=this.getSelectionRange();n.start.column==n.end.column&&n.start.row==n.end.row&&(n.end.column=0,n.end.row++);this.session.remove(n);this.clearSelection()};this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var n=this.getCursorPosition();this.insert("\n");this.moveCursorToPosition(n)};this.transposeLetters=function(){var t,n,r,u,f;this.selection.isEmpty()&&(t=this.getCursorPosition(),n=t.column,n!==0)&&(r=this.session.getLine(t.row),n<r.length?(u=r.charAt(n)+r.charAt(n-1),f=new i(t.row,n-1,t.row,n+1)):(u=r.charAt(n-1)+r.charAt(n-2),f=new i(t.row,n-2,t.row,n)),this.session.replace(f,u))};this.toLowerCase=function(){var i=this.getSelectionRange(),n,t;this.selection.isEmpty()&&this.selection.selectWord();n=this.getSelectionRange();t=this.session.getTextRange(n);this.session.replace(n,t.toLowerCase());this.selection.setSelectionRange(i)};this.toUpperCase=function(){var i=this.getSelectionRange(),n,t;this.selection.isEmpty()&&this.selection.selectWord();n=this.getSelectionRange();t=this.session.getTextRange(n);this.session.replace(n,t.toUpperCase());this.selection.setSelectionRange(i)};this.indent=function(){var t=this.session,n=this.getSelectionRange(),o,i,e,r;if(n.start.row<n.end.row){i=this.$getSelectedRows();t.indentRows(i.first,i.last,"\t");return}if(n.start.column<n.end.column&&(o=t.getTextRange(n),!/^\s+$/.test(o))){i=this.$getSelectedRows();t.indentRows(i.first,i.last,"\t");return}var c=t.getLine(n.start.row),s=n.start,f=t.getTabSize(),h=t.documentToScreenColumn(s.row,s.column);if(this.session.getUseSoftTabs())r=f-h%f,e=u.stringRepeat(" ",r);else{for(r=h%f;c[n.start.column-1]==" "&&r;)n.start.column--,r--;this.selection.setSelectionRange(n);e="\t"}return this.insert(e)};this.blockIndent=function(){var n=this.$getSelectedRows();this.session.indentRows(n.first,n.last,"\t")};this.blockOutdent=function(){var n=this.session.getSelection();this.session.outdentRows(n.getRange())};this.sortLines=function(){for(var t=this.$getSelectedRows(),u=this.session,f=[],r,e,n=t.first;n<=t.last;n++)f.push(u.getLine(n));for(f.sort(function(n,t){return n.toLowerCase()<t.toLowerCase()?-1:n.toLowerCase()>t.toLowerCase()?1:0}),r=new i(0,0,0,0),n=t.first;n<=t.last;n++)e=u.getLine(n),r.start.row=n,r.end.row=n,r.end.column=e.length,u.replace(r,f[n-t.first])};this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),n=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,n.first,n.last)};this.toggleBlockComment=function(){var n=this.getCursorPosition(),t=this.session.getState(n.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,n)};this.getNumberAt=function(n,t){var r=/[\-]?[0-9]+(?:\.[0-9]+)?/g,u,i;for(r.lastIndex=0,u=this.session.getLine(n);r.lastIndex<t;)if(i=r.exec(u),i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length};return null};this.modifyNumber=function(n){var u=this.selection.getCursor().row,r=this.selection.getCursor().column,l=new i(u,r-1,u,r),h=this.session.getTextRange(l),t,s,c;if(!isNaN(parseFloat(h))&&isFinite(h)&&(t=this.getNumberAt(u,r),t)){var e=t.value.indexOf(".")>=0?t.start+t.value.indexOf(".")+1:t.end,o=t.start+t.value.length-e,f=parseFloat(t.value);f*=Math.pow(10,o);n*=e!==t.end&&r<e?Math.pow(10,t.end-r-1):Math.pow(10,t.end-r);f+=n;f/=Math.pow(10,o);s=f.toFixed(o);c=new i(u,t.start,u,t.end);this.session.replace(c,s);this.moveCursorTo(u,Math.max(t.start+1,r+s.length-t.value.length))}};this.removeLines=function(){var n=this.$getSelectedRows();this.session.removeFullLines(n.first,n.last);this.clearSelection()};this.duplicateSelection=function(){var t=this.selection,i=this.session,n=t.getRange(),f=t.isBackwards(),r,u,e;n.isEmpty()?(r=n.start.row,i.duplicateLines(r,r)):(u=f?n.start:n.end,e=i.insert(u,i.getTextRange(n),!1),n.start=u,n.end=e,t.setSelectionRange(n,f))};this.moveLinesDown=function(){this.$moveLines(1,!1)};this.moveLinesUp=function(){this.$moveLines(-1,!1)};this.moveText=function(n,t,i){return this.session.moveText(n,t,i)};this.copyLinesUp=function(){this.$moveLines(-1,!0)};this.copyLinesDown=function(){this.$moveLines(1,!0)};this.$moveLines=function(n,t){var f,l,r=this.selection,h,u,i,o,y,s,c;if(!r.inMultiSelectMode||this.inVirtualSelectionMode)h=r.toOrientedRange(),f=this.$getSelectedRows(h),l=this.session.$moveLines(f.first,f.last,t?0:n),t&&n==-1&&(l=0),h.moveBy(l,0),r.fromOrientedRange(h);else{u=r.rangeList.ranges;r.rangeList.detach(this.session);this.inVirtualSelectionMode=!0;var e=0,a=0,v=u.length;for(i=0;i<v;i++){for(o=i,u[i].moveBy(e,0),f=this.$getSelectedRows(u[i]),y=f.first,s=f.last;++i<v;){if(a&&u[i].moveBy(a,0),c=this.$getSelectedRows(u[i]),t&&c.first!=s)break;else if(!t&&c.first>s+1)break;s=c.last}for(i--,e=this.session.$moveLines(y,s,t?0:n),t&&n==-1&&(o=i+1);o<=i;)u[o].moveBy(e,0),o++;t||(e=0);a+=e}r.fromOrientedRange(r.ranges[0]);r.rangeList.attach(this.session);this.inVirtualSelectionMode=!1}};this.$getSelectedRows=function(n){return n=(n||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(n.start.row),last:this.session.getRowFoldEnd(n.end.row)}};this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())};this.onCompositionUpdate=function(n){this.renderer.setCompositionText(n)};this.onCompositionEnd=function(){this.renderer.hideComposition()};this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()};this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()};this.isRowVisible=function(n){return n>=this.getFirstVisibleRow()&&n<=this.getLastVisibleRow()};this.isRowFullyVisible=function(n){return n>=this.renderer.getFirstFullyVisibleRow()&&n<=this.renderer.getLastFullyVisibleRow()};this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1};this.$moveByPage=function(n,t){var i=this.renderer,r=this.renderer.layerConfig,u=n*Math.floor(r.height/r.lineHeight),f;this.$blockScrolling++;t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(u,0)}):t===!1&&(this.selection.moveCursorBy(u,0),this.selection.clearSelection());this.$blockScrolling--;f=i.scrollTop;i.scrollBy(0,u*r.lineHeight);t!=null&&i.scrollCursorIntoView(null,.5);i.animateScrolling(f)};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(n){this.renderer.scrollToRow(n)};this.scrollToLine=function(n,t,i,r){this.renderer.scrollToLine(n,t,i,r)};this.centerSelection=function(){var n=this.getSelectionRange(),t={row:Math.floor(n.start.row+(n.end.row-n.start.row)/2),column:Math.floor(n.start.column+(n.end.column-n.start.column)/2)};this.renderer.alignCursor(t,.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(n,t){this.selection.moveCursorTo(n,t)};this.moveCursorToPosition=function(n){this.selection.moveCursorToPosition(n)};this.jumpToMatching=function(n,t){var c=this.getCursorPosition(),e=new s(this.session,c.row,c.column),h=e.getCurrentToken(),r=h||e.stepForward(),u,f,p;if(r){var y,l=!1,o={},a=c.column-r.start,v,w={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;a<r.value.length&&!l;a++)if(w[r.value[a]]){v=w[r.value[a]]+"."+r.type.replace("rparen","lparen");isNaN(o[v])&&(o[v]=0);switch(r.value[a]){case"(":case"[":case"{":o[v]++;break;case")":case"]":case"}":o[v]--;o[v]===-1&&(y="bracket",l=!0)}}}else r&&r.type.indexOf("tag-name")!==-1&&(isNaN(o[r.value])&&(o[r.value]=0),h.value==="<"?o[r.value]++:h.value==="<\/"&&o[r.value]--,o[r.value]===-1&&(y="tag",l=!0));l||(h=r,r=e.stepForward(),a=0)}while(r&&!l);if(y){if(y==="bracket")u=this.session.getBracketRange(c),u||(u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn()+a-1,e.getCurrentTokenRow(),e.getCurrentTokenColumn()+a-1),f=u.start,(t||f.row===c.row&&Math.abs(f.column-c.column)<2)&&(u=this.session.getBracketRange(f)));else if(y==="tag"){if(r&&r.type.indexOf("tag-name")!==-1)p=r.value;else return;if(u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn()-2,e.getCurrentTokenRow(),e.getCurrentTokenColumn()-2),u.compare(c.row,c.column)===0){l=!1;do r=h,h=e.stepBackward(),h&&(h.type.indexOf("tag-close")!==-1&&u.setEnd(e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),r.value===p&&r.type.indexOf("tag-name")!==-1&&(h.value==="<"?o[p]++:h.value==="<\/"&&o[p]--,o[p]===0&&(l=!0)));while(h&&!l)}r&&r.type.indexOf("tag-name")&&(f=u.start,f.row==c.row&&Math.abs(f.column-c.column)<2&&(f=u.end))}f=u&&u.cursor||f;f&&(n?u&&t?this.selection.setRange(u):u&&u.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}};this.gotoLine=function(n,t,i){this.selection.clearSelection();this.session.unfold({row:n-1,column:t||0});this.$blockScrolling+=1;this.exitMultiSelectMode&&this.exitMultiSelectMode();this.moveCursorTo(n-1,t||0);this.$blockScrolling-=1;this.isRowFullyVisible(n-1)||this.scrollToLine(n-1,!0,i)};this.navigateTo=function(n,t){this.selection.moveTo(n,t)};this.navigateUp=function(n){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection();this.selection.moveCursorBy(-n||-1,0)};this.navigateDown=function(n){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection();this.selection.moveCursorBy(n||1,0)};this.navigateLeft=function(n){if(this.selection.isEmpty())for(n=n||1;n--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()};this.navigateRight=function(n){if(this.selection.isEmpty())for(n=n||1;n--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()};this.navigateLineStart=function(){this.selection.moveCursorLineStart();this.clearSelection()};this.navigateLineEnd=function(){this.selection.moveCursorLineEnd();this.clearSelection()};this.navigateFileEnd=function(){this.selection.moveCursorFileEnd();this.clearSelection()};this.navigateFileStart=function(){this.selection.moveCursorFileStart();this.clearSelection()};this.navigateWordRight=function(){this.selection.moveCursorWordRight();this.clearSelection()};this.navigateWordLeft=function(){this.selection.moveCursorWordLeft();this.clearSelection()};this.replace=function(n,t){t&&this.$search.set(t);var i=this.$search.find(this.session),r=0;return i?(this.$tryReplace(i,n)&&(r=1),i!==null&&(this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),r):r};this.replaceAll=function(n,t){var i,r,f,u;if(t&&this.$search.set(t),i=this.$search.findAll(this.session),r=0,!i.length)return r;for(this.$blockScrolling+=1,f=this.getSelectionRange(),this.selection.moveTo(0,0),u=i.length-1;u>=0;--u)this.$tryReplace(i[u],n)&&r++;return this.selection.setSelectionRange(f),this.$blockScrolling-=1,r};this.$tryReplace=function(n,t){var i=this.session.getTextRange(n);return t=this.$search.replace(i,t),t!==null?(n.end=this.session.replace(n,t),n):null};this.getLastSearchOptions=function(){return this.$search.getOptions()};this.find=function(n,t,i){var r,u;if(t||(t={}),typeof n=="string"||n instanceof RegExp?t.needle=n:typeof n=="object"&&e.mixin(t,n),r=this.selection.getRange(),t.needle==null&&(n=this.session.getTextRange(r)||this.$search.$options.needle,n||(r=this.session.getWordRange(r.start.row,r.start.column),n=this.session.getTextRange(r)),this.$search.set({needle:n})),this.$search.set(t),t.start||this.$search.set({start:r}),u=this.$search.find(this.session),t.preventScroll)return u;if(u)return this.revealRange(u,i),u;t.backwards?r.start=r.end:r.end=r.start;this.selection.setRange(r)};this.findNext=function(n,t){this.find({skipCurrent:!0,backwards:!1},n,t)};this.findPrevious=function(n,t){this.find(n,{skipCurrent:!0,backwards:!0},t)};this.revealRange=function(n,t){this.$blockScrolling+=1;this.session.unfold(n);this.selection.setSelectionRange(n);this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(n.start,n.end,.5);t!==!1&&this.renderer.animateScrolling(i)};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(n){var u,r,t,i;if(n){r=this;t=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));i=this.$scrollAnchor;i.style.cssText="position:absolute";this.container.insertBefore(i,this.container.firstChild);var f=this.on("changeSelection",function(){t=!0}),e=this.renderer.on("beforeRender",function(){t&&(u=r.renderer.container.getBoundingClientRect())}),o=this.renderer.on("afterRender",function(){if(t&&u&&(r.isFocused()||r.searchBox&&r.searchBox.isFocused())){var e=r.renderer,n=e.$cursorLayer.$pixelPos,f=e.layerConfig,o=n.top-f.offset;t=n.top>=0&&o+u.top<0?!0:n.top<f.height&&n.top+u.top+f.lineHeight>window.innerHeight?!1:null;t!=null&&(i.style.top=o+"px",i.style.left=n.left+"px",i.style.height=f.lineHeight+"px",i.scrollIntoView(t));t=u=null}});this.setAutoScrollEditorIntoView=function(n){n||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",f),this.renderer.off("afterRender",o),this.renderer.off("beforeRender",e))}}};this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",n=this.renderer.$cursorLayer;n&&(n.setSmoothBlinking(/smooth/.test(t)),n.isBlinking=!this.$readOnly&&t!="wide",o.setCssClass(n.element,"ace_slim-cursors",/slim/.test(t)))}}).call(f.prototype);r.defineOptions(f.prototype,"editor",{selectionStyle:{set:function(n){this.onSelectionChange();this._signal("changeSelectionStyle",{data:n})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){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(n){this.setAutoScrollEditorIntoView(n)}},keyboardHandler:{set:function(n){this.setKeyboardHandler(n)},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"});t.Editor=f});define("ace/undomanager",["require","exports","module"],function(n,t){"use strict";var i=function(){this.reset()};(function(){function t(n){return{action:n.action,start:n.start,end:n.end,lines:n.lines.length==1?null:n.lines,text:n.lines.length==1?n.lines[0]:null}}function i(n){return{action:n.action,start:n.start,end:n.end,lines:n.lines||[n.text]}}function n(n,t){for(var i,f,r,o,e=new Array(n.length),u=0;u<n.length;u++){for(i=n[u],f={group:i.group,deltas:new Array(i.length)},r=0;r<i.deltas.length;r++)o=i.deltas[r],f.deltas[r]=t(o);e[u]=f}return e}this.execute=function(n){var t=n.args[0];this.$doc=n.args[1];n.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t));this.$undoStack.push(t);this.$redoStack=[];this.dirtyCounter<0&&(this.dirtyCounter=NaN);this.dirtyCounter++};this.undo=function(n){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,n),this.$redoStack.push(t),this.dirtyCounter--),i};this.redo=function(n){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(this.$deserializeDeltas(t),n),this.$undoStack.push(t),this.dirtyCounter++),i};this.reset=function(){this.$undoStack=[];this.$redoStack=[];this.dirtyCounter=0};this.hasUndo=function(){return this.$undoStack.length>0};this.hasRedo=function(){return this.$redoStack.length>0};this.markClean=function(){this.dirtyCounter=0};this.isClean=function(){return this.dirtyCounter===0};this.$serializeDeltas=function(i){return n(i,t)};this.$deserializeDeltas=function(t){return n(t,i)}}).call(i.prototype);t.UndoManager=i});define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(n,t){"use strict";var i=n("../lib/dom"),u=n("../lib/oop"),f=n("../lib/lang"),e=n("../lib/event_emitter").EventEmitter,r=function(n){this.element=i.createElement("div");this.element.className="ace_layer ace_gutter-layer";n.appendChild(this.element);this.setShowFoldWidgets(this.$showFoldWidgets);this.gutterWidth=0;this.$annotations=[];this.$updateAnnotations=this.$updateAnnotations.bind(this);this.$cells=[]};(function(){u.implement(this,e);this.setSession=function(n){if(this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=n,n)n.on("change",this.$updateAnnotations)};this.addGutterDecoration=function(n,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration");this.session.addGutterDecoration(n,t)};this.removeGutterDecoration=function(n,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration");this.session.removeGutterDecoration(n,t)};this.setAnnotations=function(n){var r,i,e;for(this.$annotations=[],r=0;r<n.length;r++){var u=n[r],o=u.row,t=this.$annotations[o];t||(t=this.$annotations[o]={text:[]});i=u.text;i=i?f.escapeHTML(i):u.html||"";t.text.indexOf(i)===-1&&t.text.push(i);e=u.type;e=="error"?t.className=" ace_error":e=="warning"&&t.className!=" ace_error"?t.className=" ace_warning":e!="info"||t.className||(t.className=" ace_info")}};this.$updateAnnotations=function(n){var t,i,r;this.$annotations.length&&(t=n.start.row,i=n.end.row-t,i===0||(n.action=="remove"?this.$annotations.splice(t,i+1,null):(r=new Array(i+1),r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r))))};this.update=function(n){for(var u=this.session,b=n.firstRow,nt=Math.min(n.lastRow+n.gutterOffset,u.getLength()-1),e=u.getNextFoldLine(b),a=e?e.start.row:Infinity,v=this.$showFoldWidgets&&u.foldWidgets,k=u.$breakpoints,d=u.$decorations,g=u.$firstLineNumber,c=0,l=u.gutterRenderer||this.$renderer,t=null,y=-1,r=b,s,f,o,p,h,w;;){if(r>a&&(r=e.end.row+1,e=u.getNextFoldLine(r,e),a=e?e.start.row:Infinity),r>nt){while(this.$cells.length>y+1)t=this.$cells.pop(),this.element.removeChild(t.element);break}t=this.$cells[++y];t||(t={element:null,textNode:null,foldWidget:null},t.element=i.createElement("div"),t.textNode=document.createTextNode(""),t.element.appendChild(t.textNode),this.element.appendChild(t.element),this.$cells[y]=t);f="ace_gutter-cell ";k[r]&&(f+=k[r]);d[r]&&(f+=d[r]);this.$annotations[r]&&(f+=this.$annotations[r].className);t.element.className!=f&&(t.element.className=f);o=u.getRowLength(r)*n.lineHeight+"px";o!=t.element.style.height&&(t.element.style.height=o);v&&(s=v[r],s==null&&(s=v[r]=u.getFoldWidget(r)));s?(t.foldWidget||(t.foldWidget=i.createElement("span"),t.element.appendChild(t.foldWidget)),f="ace_fold-widget ace_"+s,f+=s=="start"&&r==a&&r<e.end.row?" ace_closed":" ace_open",t.foldWidget.className!=f&&(t.foldWidget.className=f),o=n.lineHeight+"px",t.foldWidget.style.height!=o&&(t.foldWidget.style.height=o)):t.foldWidget&&(t.element.removeChild(t.foldWidget),t.foldWidget=null);p=c=l?l.getText(u,r):r+g;p!=t.textNode.data&&(t.textNode.data=p);r++}this.element.style.height=n.minHeight+"px";(this.$fixedWidth||u.$useWrapMode)&&(c=u.getLength()+g);h=l?l.getWidth(u,c,n):c.toString().length*n.characterWidth;w=this.$padding||this.$computePadding();h+=w.left+w.right;h===this.gutterWidth||isNaN(h)||(this.gutterWidth=h,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",h))};this.$fixedWidth=!1;this.$showLineNumbers=!0;this.$renderer="";this.setShowLineNumbers=function(n){this.$renderer=!n&&{getWidth:function(){return""},getText:function(){return""}}};this.getShowLineNumbers=function(){return this.$showLineNumbers};this.$showFoldWidgets=!0;this.setShowFoldWidgets=function(n){n?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled");this.$showFoldWidgets=n;this.$padding=null};this.getShowFoldWidgets=function(){return this.$showFoldWidgets};this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var n=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(n.paddingLeft)+1||0,this.$padding.right=parseInt(n.paddingRight)||0,this.$padding};this.getRegion=function(n){var t=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return n.x<t.left+i.left?"markers":this.$showFoldWidgets&&n.x>i.right-t.right?"foldWidgets":void 0}}).call(r.prototype);t.Gutter=r});define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,t){"use strict";var r=n("../range").Range,u=n("../lib/dom"),i=function(n){this.element=u.createElement("div");this.element.className="ace_layer ace_marker-layer";n.appendChild(this.element)};(function(){function n(n,t,i,r){return(n?1:0)|(t?2:0)|(i?4:0)|(r?8:0)}this.$padding=0;this.setPadding=function(n){this.$padding=n};this.setSession=function(n){this.session=n};this.setMarkers=function(n){this.markers=n};this.update=function(n){var n=n||this.config,r,u,t,i,f,e;if(n){this.config=n;r=[];for(u in this.markers){if(t=this.markers[u],!t.range){t.update(r,this,this.session,n);continue}(i=t.range.clipRows(n.firstRow,n.lastRow),i.isEmpty())||(i=i.toScreenRange(this.session),t.renderer?(f=this.$getTop(i.start.row,n),e=this.$padding+i.start.column*n.characterWidth,t.renderer(r,i,e,f,n)):t.type=="fullLine"?this.drawFullLineMarker(r,i,t.clazz,n):t.type=="screenLine"?this.drawScreenLineMarker(r,i,t.clazz,n):i.isMultiLine()?t.type=="text"?this.drawTextMarker(r,i,t.clazz,n):this.drawMultiLineMarker(r,i,t.clazz,n):this.drawSingleLineMarker(r,i,t.clazz+" ace_start ace_br15",n))}this.element.innerHTML=r.join("")}};this.$getTop=function(n,t){return(n-t.firstRowScreen)*t.lineHeight};this.drawTextMarker=function(t,i,u,f,e){for(var v=this.session,s=i.start.row,h=i.end.row,o=s,y=0,c=0,a=v.getScreenLastRowColumn(o),l=new r(o,i.start.column,o,c);o<=h;o++)l.start.row=l.end.row=o,l.start.column=o==s?i.start.column:v.getRowWrapIndent(o),l.end.column=a,y=c,c=a,a=o+1<h?v.getScreenLastRowColumn(o+1):o==h?0:i.end.column,this.drawSingleLineMarker(t,l,u+(o==s?" ace_start":"")+" ace_br"+n(o==s||o==s+1&&i.start.column,y<c,c>a,o==h),f,o==h?0:1,e)};this.drawMultiLineMarker=function(n,t,i,r,u){var o=this.$padding,f=r.lineHeight,e=this.$getTop(t.start.row,r),c=o+t.start.column*r.characterWidth,h,s;(u=u||"",n.push("<div class='",i," ace_br1 ace_start' style='","height:",f,"px;","right:0;","top:",e,"px;","left:",c,"px;",u,"'><\/div>"),e=this.$getTop(t.end.row,r),h=t.end.column*r.characterWidth,n.push("<div class='",i," ace_br12' style='","height:",f,"px;","width:",h,"px;","top:",e,"px;","left:",o,"px;",u,"'><\/div>"),f=(t.end.row-t.start.row-1)*r.lineHeight,f<=0)||(e=this.$getTop(t.start.row+1,r),s=(t.start.column?1:0)|(t.end.column?0:8),n.push("<div class='",i,s?" ace_br"+s:"","' style='","height:",f,"px;","right:0;","top:",e,"px;","left:",o,"px;",u,"'><\/div>"))};this.drawSingleLineMarker=function(n,t,i,r,u,f){var e=r.lineHeight,o=(t.end.column+(u||0)-t.start.column)*r.characterWidth,s=this.$getTop(t.start.row,r),h=this.$padding+t.start.column*r.characterWidth;n.push("<div class='",i,"' style='","height:",e,"px;","width:",o,"px;","top:",s,"px;","left:",h,"px;",f||"","'><\/div>")};this.drawFullLineMarker=function(n,t,i,r,u){var f=this.$getTop(t.start.row,r),e=r.lineHeight;t.start.row!=t.end.row&&(e+=this.$getTop(t.end.row,r)-f);n.push("<div class='",i,"' style='","height:",e,"px;","top:",f,"px;","left:0;right:0;",u||"","'><\/div>")};this.drawScreenLineMarker=function(n,t,i,r,u){var f=this.$getTop(t.start.row,r),e=r.lineHeight;n.push("<div class='",i,"' style='","height:",e,"px;","top:",f,"px;","left:0;right:0;",u||"","'><\/div>")}}).call(i.prototype);t.Marker=i});define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(n,t){"use strict";var f=n("../lib/oop"),r=n("../lib/dom"),i=n("../lib/lang"),o=n("../lib/useragent"),e=n("../lib/event_emitter").EventEmitter,u=function(n){this.element=r.createElement("div");this.element.className="ace_layer ace_text-layer";n.appendChild(this.element);this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){f.implement(this,e);this.EOF_CHAR="¶";this.EOL_CHAR_LF="¬";this.EOL_CHAR_CRLF="¤";this.EOL_CHAR=this.EOL_CHAR_LF;this.TAB_CHAR="—";this.SPACE_CHAR="·";this.$padding=0;this.$updateEolChar=function(){var n=this.session.doc.getNewLineCharacter()=="\n"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0};this.setPadding=function(n){this.$padding=n;this.element.style.padding="0 "+n+"px"};this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0};this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0};this.$setFontMetrics=function(n){this.$fontMetrics=n;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(n){this.session=n;n&&this.$computeTabString()};this.showInvisibles=!1;this.setShowInvisibles=function(n){return this.showInvisibles==n?!1:(this.showInvisibles=n,this.$computeTabString(),!0)};this.displayIndentGuides=!0;this.setDisplayIndentGuides=function(n){return this.displayIndentGuides==n?!1:(this.displayIndentGuides=n,this.$computeTabString(),!0)};this.$tabStrings=[];this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize(),r,n,t,f;for(this.tabSize=e,r=this.$tabStrings=[0],n=1;n<e+1;n++)this.showInvisibles?r.push("<span class='ace_invisible ace_invisible_tab'>"+i.stringRepeat(this.TAB_CHAR,n)+"<\/span>"):r.push(i.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var u="ace_indent-guide",o="",s="";this.showInvisibles?(u+=" ace_invisible",o=" ace_invisible_space",s=" ace_invisible_tab",t=i.stringRepeat(this.SPACE_CHAR,this.tabSize),f=i.stringRepeat(this.TAB_CHAR,this.tabSize)):(t=i.stringRepeat(" ",this.tabSize),f=t);this.$tabStrings[" "]="<span class='"+u+o+"'>"+t+"<\/span>";this.$tabStrings["\t"]="<span class='"+u+s+"'>"+f+"<\/span>"}};this.updateLines=function(n,t,i){var r,u,e,s;(this.config.lastRow!=n.lastRow||this.config.firstRow!=n.firstRow)&&this.scrollLines(n);this.config=n;var f=Math.max(t,n.firstRow),c=Math.min(i,n.lastRow),l=this.element.childNodes,h=0;for(r=n.firstRow;r<f;r++){if(u=this.session.getFoldLine(r),u)if(u.containsRow(f)){f=u.start.row;break}else r=u.end.row;h++}for(var r=f,u=this.session.getNextFoldLine(r),o=u?u.start.row:Infinity;;){if(r>o&&(r=u.end.row+1,u=this.session.getNextFoldLine(r,u),o=u?u.start.row:Infinity),r>c)break;e=l[h++];e&&(s=[],this.$renderLine(s,r,!this.$useLineGroups(),r==o?u:!1),e.style.height=n.lineHeight*this.session.getRowLength(r)+"px",e.innerHTML=s.join(""));r++}};this.scrollLines=function(n){var t=this.config,i,r,u;if((this.config=n,!t||t.lastRow<n.firstRow)||n.lastRow<t.firstRow)return this.update(n);if(i=this.element,t.firstRow<n.firstRow)for(r=this.session.getFoldedRowCount(t.firstRow,n.firstRow-1);r>0;r--)i.removeChild(i.firstChild);if(t.lastRow>n.lastRow)for(r=this.session.getFoldedRowCount(n.lastRow+1,t.lastRow);r>0;r--)i.removeChild(i.lastChild);n.firstRow<t.firstRow&&(u=this.$renderLinesFragment(n,n.firstRow,t.firstRow-1),i.firstChild?i.insertBefore(u,i.firstChild):i.appendChild(u));n.lastRow>t.lastRow&&(u=this.$renderLinesFragment(n,t.lastRow+1,n.lastRow),i.appendChild(u))};this.$renderLinesFragment=function(n,t,i){for(var o=this.element.ownerDocument.createDocumentFragment(),u=t,f=this.session.getNextFoldLine(u),s=f?f.start.row:Infinity,e,h;;){if(u>s&&(u=f.end.row+1,f=this.session.getNextFoldLine(u,f),s=f?f.start.row:Infinity),u>i)break;if(e=r.createElement("div"),h=[],this.$renderLine(h,u,!1,u==s?f:!1),e.innerHTML=h.join(""),this.$useLineGroups())e.className="ace_line_group",o.appendChild(e),e.style.height=n.lineHeight*this.session.getRowLength(u)+"px";else while(e.firstChild)o.appendChild(e.firstChild);u++}return o};this.update=function(n){this.config=n;for(var r=[],f=n.firstRow,e=n.lastRow,t=f,i=this.session.getNextFoldLine(t),u=i?i.start.row:Infinity;;){if(t>u&&(t=i.end.row+1,i=this.session.getNextFoldLine(t,i),u=i?i.start.row:Infinity),t>e)break;this.$useLineGroups()&&r.push("<div class='ace_line_group' style='height:",n.lineHeight*this.session.getRowLength(t),"px'>");this.$renderLine(r,t,!1,t==u?i:!1);this.$useLineGroups()&&r.push("<\/div>");t++}this.element.innerHTML=r.join("")};this.$textToken={text:!0,rparen:!0,lparen:!0};this.$renderToken=function(n,t,r,u){var f=this,h=function(n,r,u,e){var o,s,h;return r?f.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+i.stringRepeat(f.SPACE_CHAR,n.length)+"<\/span>":n:n=="&"?"&#38;":n=="<"?"&#60;":n==">"?"&#62;":n=="\t"?(o=f.session.getScreenTabSize(t+e),t+=o-1,f.$tabStrings[o]):n=="　"?(s=f.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h=f.showInvisibles?f.SPACE_CHAR:"",t+=1,"<span class='"+s+"' style='width:"+f.config.characterWidth*2+"px'>"+h+"<\/span>"):u?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+f.SPACE_CHAR+"<\/span>":(t+=1,"<span class='ace_cjk' style='width:"+f.config.characterWidth*2+"px'>"+n+"<\/span>")},o=u.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]/g,h),s,e;return this.$textToken[r.type]?n.push(o):(s="ace_"+r.type.replace(/\./g," ace_"),e="",r.type=="fold"&&(e=" style='width:"+r.value.length*this.config.characterWidth+"px;' "),n.push("<span class='",s,"'",e,">",o,"<\/span>")),t+u.length};this.renderIndentGuide=function(n,t,r){var u=t.search(this.$indentGuideRe);return u<=0||u>=r?t:t[0]==" "?(u-=u%this.tabSize,n.push(i.stringRepeat(this.$tabStrings[" "],u/this.tabSize)),t.substr(u)):t[0]=="\t"?(n.push(i.stringRepeat(this.$tabStrings["\t"],u)),t.substr(u)):t};this.$renderWrappedLine=function(n,t,r,u){for(var h,f,e=0,l=0,o=r[0],s=0,c=0;c<t.length;c++){if(h=t[c],f=h.value,c==0&&this.displayIndentGuides){if(e=f.length,f=this.renderIndentGuide(n,f,o),!f)continue;e-=f.length}if(e+f.length<o)s=this.$renderToken(n,s,h,f),e+=f.length;else{while(e+f.length>=o)s=this.$renderToken(n,s,h,f.substring(0,o-e)),f=f.substring(o-e),e=o,u||n.push("<\/div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),n.push(i.stringRepeat(" ",r.indent)),l++,s=0,o=r[l]||Number.MAX_VALUE;f.length!=0&&(e+=f.length,s=this.$renderToken(n,s,h,f))}}};this.$renderSimpleLine=function(n,t){var u=0,r=t[0],i=r.value,f;for(this.displayIndentGuides&&(i=this.renderIndentGuide(n,i)),i&&(u=this.$renderToken(n,u,r,i)),f=1;f<t.length;f++)r=t[f],i=r.value,u=this.$renderToken(n,u,r,i)};this.$renderLine=function(n,t,i,r){var u,f;r||r==!1||(r=this.session.getFoldLine(t));u=r?this.$getFoldLineTokens(t,r):this.session.getTokens(t);i||n.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>");u.length&&(f=this.session.getRowSplitData(t),f&&f.length?this.$renderWrappedLine(n,u,f,i):this.$renderSimpleLine(n,u));this.showInvisibles&&(r&&(t=r.end.row),n.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"<\/span>"));i||n.push("<\/div>")};this.$getFoldLineTokens=function(n,t){function f(n,t,r){for(var u=0,e=0,f;e+n[u].value.length<t;)if(e+=n[u].value.length,u++,u==n.length)return;for(e!=t&&(f=n[u].value.substring(t-e),f.length>r-t&&(f=f.substring(0,r-t)),i.push({type:n[u].type,value:f}),e=t+f.length,u+=1);e<r&&u<n.length;)f=n[u].value,f.length+e>r?i.push({type:n[u].type,value:f.substring(0,r-e)}):i.push(n[u]),e+=f.length,u+=1}var u=this.session,i=[],r=u.getTokens(n);return t.walk(function(n,t,e,o,s){n!=null?i.push({type:"fold",value:n}):(s&&(r=u.getTokens(t)),r.length&&f(r,o,e))},t.end.row,this.session.getLine(t.end.row).length),i};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(u.prototype);t.Text=u});define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,t){"use strict";var i=n("../lib/dom"),r,u=function(n){this.element=i.createElement("div");this.element.className="ace_layer ace_cursor-layer";n.appendChild(this.element);r===undefined&&(r=!("opacity"in this.element.style));this.isVisible=!1;this.isBlinking=!0;this.blinkInterval=1e3;this.smoothBlinking=!1;this.cursors=[];this.cursor=this.addCursor();i.addCssClass(this.element,"ace_hidden-cursors");this.$updateCursors=(r?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(n){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=n?"":"hidden"};this.$updateOpacity=function(n){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=n?"":"0"};this.$padding=0;this.setPadding=function(n){this.$padding=n};this.setSession=function(n){this.session=n};this.setBlinking=function(n){n!=this.isBlinking&&(this.isBlinking=n,this.restartTimer())};this.setBlinkInterval=function(n){n!=this.blinkInterval&&(this.blinkInterval=n,this.restartTimer())};this.setSmoothBlinking=function(n){n==this.smoothBlinking||r||(this.smoothBlinking=n,i.setCssClass(this.element,"ace_smooth-blinking",n),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())};this.addCursor=function(){var n=i.createElement("div");return n.className="ace_cursor",this.element.appendChild(n),this.cursors.push(n),n};this.removeCursor=function(){if(this.cursors.length>1){var n=this.cursors.pop();return n.parentNode.removeChild(n),n}};this.hideCursor=function(){this.isVisible=!1;i.addCssClass(this.element,"ace_hidden-cursors");this.restartTimer()};this.showCursor=function(){this.isVisible=!0;i.removeCssClass(this.element,"ace_hidden-cursors");this.restartTimer()};this.restartTimer=function(){var n=this.$updateCursors,t;(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),n(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)&&(this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),t=function(){this.timeoutId=setTimeout(function(){n(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){n(!0);t()},this.blinkInterval),t())};this.getPixelPosition=function(n,t){if(!this.config||!this.session)return{left:0,top:0};n||(n=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(n),r=this.$padding+i.column*this.config.characterWidth,u=(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:u}};this.update=function(n){var r,e,t,u,o;this.config=n;var i=this.session.$selectionMarkers,r=0,f=0;for((i===undefined||i.length===0)&&(i=[{cursor:null}]),r=0,e=i.length;r<e;r++)(t=this.getPixelPosition(i[r].cursor,!0),(t.top>n.height+n.offset||t.top<0)&&r>1)||(u=(this.cursors[f++]||this.addCursor()).style,this.drawCursor?this.drawCursor(u,t,n,i[r],this.session):(u.left=t.left+"px",u.top=t.top+"px",u.width=n.characterWidth+"px",u.height=n.lineHeight+"px"));while(this.cursors.length>f)this.removeCursor();o=this.session.getOverwrite();this.$setOverwrite(o);this.$pixelPos=t;this.restartTimer()};this.drawCursor=null;this.$setOverwrite=function(n){n!=this.overwrite&&(this.overwrite=n,n?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))};this.destroy=function(){clearInterval(this.intervalId);clearTimeout(this.timeoutId)}}).call(u.prototype);t.Cursor=u});define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,t){"use strict";var f=n("./lib/oop"),e=n("./lib/dom"),o=n("./lib/event"),h=n("./lib/event_emitter").EventEmitter,s=32768,r=function(n){this.element=e.createElement("div");this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix;this.inner=e.createElement("div");this.inner.className="ace_scrollbar-inner";this.element.appendChild(this.inner);n.appendChild(this.element);this.setVisible(!1);this.skipEvent=!1;o.addListener(this.element,"scroll",this.onScroll.bind(this));o.addListener(this.element,"mousedown",o.preventDefault)},i,u;(function(){f.implement(this,h);this.setVisible=function(n){this.element.style.display=n?"":"none";this.isVisible=n;this.coeff=1}}).call(r.prototype);i=function(n,t){r.call(this,n);this.scrollTop=0;this.scrollHeight=0;t.$scrollbarWidth=this.width=e.scrollbarWidth(n.ownerDocument);this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};f.inherits(i,r),function(){this.classSuffix="-v";this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var n=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-n)/(this.coeff-n)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1};this.getWidth=function(){return this.isVisible?this.width:0};this.setHeight=function(n){this.element.style.height=n+"px"};this.setInnerHeight=this.setScrollHeight=function(n){this.scrollHeight=n;n>s?(this.coeff=s/n,n=s):this.coeff!=1&&(this.coeff=1);this.inner.style.height=n+"px"};this.setScrollTop=function(n){this.scrollTop!=n&&(this.skipEvent=!0,this.scrollTop=n,this.element.scrollTop=n*this.coeff)}}.call(i.prototype);u=function(n,t){r.call(this,n);this.scrollLeft=0;this.height=t.$scrollbarWidth;this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};f.inherits(u,r),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(n){this.element.style.width=n+"px"};this.setInnerWidth=function(n){this.inner.style.width=n+"px"};this.setScrollWidth=function(n){this.inner.style.width=n+"px"};this.setScrollLeft=function(n){this.scrollLeft!=n&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=n)}}.call(u.prototype);t.ScrollBar=i;t.ScrollBarV=i;t.ScrollBarH=u;t.VScrollBar=i;t.HScrollBar=u});define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,t){"use strict";var r=n("./lib/event"),i=function(n,t){this.onRender=n;this.pending=!1;this.changes=0;this.window=t||window};(function(){this.schedule=function(n){if(this.changes=this.changes|n,!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;for(var n;n=t.changes;){t.changes=0;t.onRender(n)}},this.window)}}}).call(i.prototype);t.RenderLoop=i});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(n,t){var f=n("../lib/oop"),r=n("../lib/dom"),u=n("../lib/lang"),e=n("../lib/useragent"),o=n("../lib/event_emitter").EventEmitter,i=0,s=t.FontMetrics=function(n){this.el=r.createElement("div");this.$setMeasureNodeStyles(this.el.style,!0);this.$main=r.createElement("div");this.$setMeasureNodeStyles(this.$main.style);this.$measureNode=r.createElement("div");this.$setMeasureNodeStyles(this.$measureNode.style);this.el.appendChild(this.$main);this.el.appendChild(this.$measureNode);n.appendChild(this.el);i||this.$testFractionalRect();this.$measureNode.innerHTML=u.stringRepeat("X",i);this.$characterSize={width:0,height:0};this.checkForSizeChanges()};(function(){f.implement(this,o);this.$characterSize={width:0,height:0};this.$testFractionalRect=function(){var n=r.createElement("div"),t;this.$setMeasureNodeStyles(n.style);n.style.width="0.2px";document.documentElement.appendChild(n);t=n.getBoundingClientRect().width;i=t>0&&t<1?50:100;n.parentNode.removeChild(n)};this.$setMeasureNodeStyles=function(n,t){n.width=n.height="auto";n.left=n.top="0px";n.visibility="hidden";n.position="absolute";n.whiteSpace="pre";e.isIE<8?n["font-family"]="inherit":n.font="inherit";n.overflow=t?"hidden":"visible"};this.checkForSizeChanges=function(){var n=this.$measureSizes(),t;n&&(this.$characterSize.width!==n.width||this.$characterSize.height!==n.height)&&(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=n,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===n.width&&t.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(){var n,t;if(i===50){n=null;try{n=this.$measureNode.getBoundingClientRect()}catch(r){n={width:0,height:0}}t={height:n.height,width:n.width/i}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/i};return t.width===0||t.height===0?null:t};this.$measureCharWidth=function(n){this.$main.innerHTML=u.stringRepeat(n,i);var t=this.$main.getBoundingClientRect();return t.width/i};this.getCharacterWidth=function(n){var t=this.charSizes[n];return t===undefined&&(t=this.charSizes[n]=this.$measureCharWidth(n)/this.$characterSize.width),t};this.destroy=function(){clearInterval(this.$pollSizeChangesTimer);this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(s.prototype)});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(n,t){"use strict";var e=n("./lib/oop"),i=n("./lib/dom"),r=n("./config"),o=n("./lib/useragent"),s=n("./layer/gutter").Gutter,f=n("./layer/marker").Marker,h=n("./layer/text").Text,c=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,a=n("./scrollbar").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,p=n("./lib/event_emitter").EventEmitter,u;i.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;}.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_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_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.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_editor.css");u=function(n,t){var u=this,e;this.container=n||i.createElement("div");this.$keepTextAreaAtCursor=!o.isOldIE;i.addCssClass(this.container,"ace_editor");this.setTheme(t);this.$gutter=i.createElement("div");this.$gutter.className="ace_gutter";this.container.appendChild(this.$gutter);this.scroller=i.createElement("div");this.scroller.className="ace_scroller";this.container.appendChild(this.scroller);this.content=i.createElement("div");this.content.className="ace_content";this.scroller.appendChild(this.content);this.$gutterLayer=new s(this.$gutter);this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this));this.$markerBack=new f(this.content);e=this.$textLayer=new h(this.content);this.canvas=e.element;this.$markerFront=new f(this.content);this.$cursorLayer=new c(this.content);this.$horizScroll=!1;this.$vScroll=!1;this.scrollBar=this.scrollBarV=new a(this.container,this);this.scrollBarH=new l(this.container,this);this.scrollBarV.addEventListener("scroll",function(n){u.$scrollAnimation||u.session.setScrollTop(n.data-u.scrollMargin.top)});this.scrollBarH.addEventListener("scroll",function(n){u.$scrollAnimation||u.session.setScrollLeft(n.data-u.scrollMargin.left)});this.scrollTop=0;this.scrollLeft=0;this.cursorPos={row:0,column:0};this.$fontMetrics=new y(this.container);this.$textLayer.$setFontMetrics(this.$fontMetrics);this.$textLayer.addEventListener("changeCharacterSize",function(n){u.updateCharacterSize();u.onResize(!0,u.gutterWidth,u.$size.width,u.$size.height);u._signal("changeCharacterSize",n)});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 v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView);this.$loop.schedule(this.CHANGE_FULL);this.updateCharacterSize();this.setPadding(4);r.resetOptions(this);r._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;e.implement(this,p);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(n){if(this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=n,n&&this.scrollMargin.top&&n.getScrollTop()<=0&&n.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(n),this.$markerBack.setSession(n),this.$markerFront.setSession(n),this.$gutterLayer.setSession(n),this.$textLayer.setSession(n),n){this.$loop.schedule(this.CHANGE_FULL);this.session.$setFontMetrics(this.$fontMetrics);this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null;this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this);this.onChangeNewLineMode();this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode)}};this.updateLines=function(n,t,i){if(t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>n&&(this.$changedLines.firstRow=n),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:n,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow)if(i)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)};this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT);this.$textLayer.$updateEolChar()};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(n){n?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(n,t,i,r){var u,f;if(!(this.resizing>2)){if(this.resizing>0?this.resizing++:this.resizing=n?1:0,u=this.container,r||(r=u.clientHeight||u.scrollHeight),i||(i=u.clientWidth||u.scrollWidth),f=this.$updateCachedSize(n,t,i,r),!this.$size.scrollerHeight||!i&&!r)return this.resizing=0;n&&(this.$gutterLayer.$padding=null);n?this.$renderChanges(f|this.$changes,!0):this.$loop.schedule(f|this.$changes);this.resizing&&(this.resizing=0);this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}};this.$updateCachedSize=function(n,t,i,r){r-=this.$extraHeight||0;var f=0,u=this.$size,e={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};return r&&(n||u.height!=r)&&(u.height=r,f|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",f=f|this.CHANGE_SCROLL),i&&(n||u.width!=i)&&(f|=this.CHANGE_SIZE,u.width=i,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",u.scrollerWidth=Math.max(0,i-t-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()||n)&&(f|=this.CHANGE_FULL)),u.$dirty=!i||!r,f&&this._signal("resize",e),f};this.onGutterResize=function(){var n=this.$showGutter?this.$gutter.offsetWidth:0;n!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,n,this.$size.width,this.$size.height));this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))};this.adjustWrapLimit=function(){var n=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(n/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)};this.setAnimatedScroll=function(n){this.setOption("animatedScroll",n)};this.getAnimatedScroll=function(){return this.$animatedScroll};this.setShowInvisibles=function(n){this.setOption("showInvisibles",n)};this.getShowInvisibles=function(){return this.getOption("showInvisibles")};this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")};this.setDisplayIndentGuides=function(n){this.setOption("displayIndentGuides",n)};this.setShowPrintMargin=function(n){this.setOption("showPrintMargin",n)};this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")};this.setPrintMarginColumn=function(n){this.setOption("printMarginColumn",n)};this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")};this.getShowGutter=function(){return this.getOption("showGutter")};this.setShowGutter=function(n){return this.setOption("showGutter",n)};this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")};this.setFadeFoldWidgets=function(n){this.setOption("fadeFoldWidgets",n)};this.setHighlightGutterLine=function(n){this.setOption("highlightGutterLine",n)};this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")};this.$updateGutterLineHighlight=function(){var t=this.$cursorLayer.$pixelPos,i=this.layerConfig.lineHeight,n;this.session.getUseWrapMode()&&(n=this.session.selection.getCursor(),n.column=0,t=this.$cursorLayer.getPixelPosition(n,!0),i*=this.session.getRowLength(n.row));this.$gutterLineHighlight.style.top=t.top-this.layerConfig.offset+"px";this.$gutterLineHighlight.style.height=i+"px"};this.$updatePrintMargin=function(){var n,t;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||(n=i.createElement("div"),n.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",n.appendChild(this.$printMarginEl),this.content.insertBefore(n,this.content.firstChild)),t=this.$printMarginEl.style,t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit())};this.getContainerElement=function(){return this.container};this.getMouseEventTarget=function(){return this.scroller};this.getTextAreaContainer=function(){return this.container};this.$moveTextAreaToCursor=function(){var n,r,t,e;if(this.$keepTextAreaAtCursor){var f=this.layerConfig,u=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;if(u-=f.offset,n=this.textarea.style,r=this.lineHeight,u<0||u>f.height-r){n.top=n.left="0";return}t=this.characterWidth;this.$composition&&(e=this.textarea.value.replace(/^\x01+/,""),t*=this.session.$getStringScreenWidth(e)[0]+2,r+=2);i-=this.scrollLeft;i>this.$size.scrollerWidth-t&&(i=this.$size.scrollerWidth-t);i+=this.gutterWidth;n.height=r+"px";n.width=t+"px";n.left=Math.min(i,this.$size.scrollerWidth-t)+"px";n.top=Math.min(u,this.$size.height-r)+"px"}};this.getFirstVisibleRow=function(){return this.layerConfig.firstRow};this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)};this.getLastFullyVisibleRow=function(){var n=this.layerConfig,t=n.lastRow,i=this.session.documentToScreenRow(t,0)*n.lineHeight;return i-this.session.getScrollTop()>n.height-n.lineHeight?t-1:t};this.getLastVisibleRow=function(){return this.layerConfig.lastRow};this.$padding=null;this.setPadding=function(n){this.$padding=n;this.$textLayer.setPadding(n);this.$cursorLayer.setPadding(n);this.$markerFront.setPadding(n);this.$markerBack.setPadding(n);this.$loop.schedule(this.CHANGE_FULL);this.$updatePrintMargin()};this.setScrollMargin=function(n,t,i,r){var u=this.scrollMargin;u.top=n|0;u.bottom=t|0;u.right=r|0;u.left=i|0;u.v=u.top+u.bottom;u.h=u.left+u.right;u.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-u.top);this.updateFull()};this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible};this.setHScrollBarAlwaysVisible=function(n){this.setOption("hScrollBarAlwaysVisible",n)};this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible};this.setVScrollBarAlwaysVisible=function(n){this.setOption("vScrollBarAlwaysVisible",n)};this.$updateScrollBarV=function(){var n=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(n-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>n-t&&(n=this.scrollTop+t,this.scrollBarV.scrollTop=null));this.scrollBarV.setScrollHeight(n+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(n,t){var i,r;if(this.$changes&&(n|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!n&&!t){this.$changes|=n;return}if(this.$size.$dirty){this.$changes|=n;return this.onResize(!0)}if(this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),i=this.layerConfig,(n&this.CHANGE_FULL||n&this.CHANGE_SIZE||n&this.CHANGE_TEXT||n&this.CHANGE_LINES||n&this.CHANGE_SCROLL||n&this.CHANGE_H_SCROLL)&&(n|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen&&(r=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight,r>0&&(this.scrollTop=r,n=n|this.CHANGE_SCROLL|this.$computeLayerConfig())),i=this.layerConfig,this.$updateScrollBarV(),n&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"),n&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),n&this.CHANGE_FULL){this.$textLayer.update(i);this.$showGutter&&this.$gutterLayer.update(i);this.$markerBack.update(i);this.$markerFront.update(i);this.$cursorLayer.update(i);this.$moveTextAreaToCursor();this.$highlightGutterLine&&this.$updateGutterLineHighlight();this._signal("afterRender");return}if(n&this.CHANGE_SCROLL){n&this.CHANGE_TEXT||n&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i);this.$showGutter&&this.$gutterLayer.update(i);this.$markerBack.update(i);this.$markerFront.update(i);this.$cursorLayer.update(i);this.$highlightGutterLine&&this.$updateGutterLineHighlight();this.$moveTextAreaToCursor();this._signal("afterRender");return}n&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):n&this.CHANGE_LINES?(this.$updateLines()||n&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(n&this.CHANGE_TEXT||n&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i);n&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight());n&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i);n&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i);this._signal("afterRender")};this.$autosize=function(){var i=this.session.getScreenLength()*this.lineHeight,r=this.$maxLines*this.lineHeight,n=Math.min(r,Math.max((this.$minLines||1)*this.lineHeight,i))+this.scrollMargin.v+(this.$extraHeight||0),t,u;this.$horizScroll&&(n+=this.scrollBarH.getHeight());this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);t=i>r;(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||t!=this.$vScroll)&&(t!=this.$vScroll&&(this.$vScroll=t,this.scrollBarV.setVisible(t)),u=this.container.clientWidth,this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,n),this.desiredHeight=n,this._signal("autosize"))};this.$computeLayerConfig=function(){var i=this.session,n=this.$size,w=n.height<=2*this.lineHeight,nt=this.session.getScreenLength(),e=nt*this.lineHeight,f=this.$getLongestLine(),a=!w&&(this.$hScrollBarAlwaysVisible||n.scrollerWidth-f-2*this.$padding<0),b=this.$horizScroll!==a,k,r,s,h,p,l;b&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));k=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var o=this.scrollTop%this.lineHeight,v=n.scrollerHeight+this.lineHeight,d=!this.$maxLines&&this.$scrollPastEnd?(n.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;e+=d;r=this.scrollMargin;this.session.setScrollTop(Math.max(-r.top,Math.min(this.scrollTop,e-n.scrollerHeight+r.bottom)));this.session.setScrollLeft(Math.max(-r.left,Math.min(this.scrollLeft,f+2*this.$padding-n.scrollerWidth+r.right)));s=!w&&(this.$vScrollBarAlwaysVisible||n.scrollerHeight-e+d<0||this.scrollTop>r.top);h=k!==s;h&&(this.$vScroll=s,this.scrollBarV.setVisible(s));var tt=Math.ceil(v/this.lineHeight)-1,t=Math.max(0,Math.round((this.scrollTop-o)/this.lineHeight)),c=t+tt,y,g,u=this.lineHeight;return t=i.screenToDocumentRow(t,0),p=i.getFoldLine(t),p&&(t=p.start.row),y=i.documentToScreenRow(t,0),g=i.getRowLength(t)*u,c=Math.min(i.screenToDocumentRow(c,0),i.getLength()-1),v=n.scrollerHeight+i.getRowLength(c)*u+g,o=this.scrollTop-y*u,l=0,this.layerConfig.width!=f&&(l=this.CHANGE_H_SCROLL),(b||h)&&(l=this.$updateCachedSize(!0,this.gutterWidth,n.width,n.height),this._signal("scrollbarVisibilityChanged"),h&&(f=this.$getLongestLine())),this.layerConfig={width:f,padding:this.$padding,firstRow:t,firstRowScreen:y,lastRow:c,lineHeight:u,characterWidth:this.characterWidth,minHeight:v,maxHeight:e,offset:o,gutterOffset:u?Math.max(0,Math.ceil((o+n.height-n.scrollerHeight)/u)):0,height:this.$size.scrollerHeight},l};this.$updateLines=function(){var i=this.$changedLines.firstRow,t=this.$changedLines.lastRow,n;if((this.$changedLines=null,n=this.layerConfig,!(i>n.lastRow+1))&&!(t<n.firstRow)){if(t===Infinity){this.$showGutter&&this.$gutterLayer.update(n);this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,i,t),!0}};this.$getLongestLine=function(){var n=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(n+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(n*this.characterWidth))};this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0));this.$loop.schedule(this.CHANGE_MARKER_FRONT)};this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers());this.$loop.schedule(this.CHANGE_MARKER_BACK)};this.addGutterDecoration=function(n,t){this.$gutterLayer.addGutterDecoration(n,t)};this.removeGutterDecoration=function(n,t){this.$gutterLayer.removeGutterDecoration(n,t)};this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)};this.setAnnotations=function(n){this.$gutterLayer.setAnnotations(n);this.$loop.schedule(this.CHANGE_GUTTER)};this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)};this.hideCursor=function(){this.$cursorLayer.hideCursor()};this.showCursor=function(){this.$cursorLayer.showCursor()};this.scrollSelectionIntoView=function(n,t,i){this.scrollCursorIntoView(n,i);this.scrollCursorIntoView(t,i)};this.scrollCursorIntoView=function(n,t,i){var f;if(this.$size.scrollerHeight!==0){var o=this.$cursorLayer.getPixelPosition(n),u=o.left,r=o.top,s=i&&i.top||0,h=i&&i.bottom||0,e=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;e+s>r?(t&&e+s>r+this.lineHeight&&(r-=t*this.$size.scrollerHeight),r===0&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):e+this.$size.scrollerHeight-h<r+this.lineHeight&&(t&&e+this.$size.scrollerHeight-h<r-this.lineHeight&&(r+=t*this.$size.scrollerHeight),this.session.setScrollTop(r+this.lineHeight-this.$size.scrollerHeight));f=this.scrollLeft;f>u?(u<this.$padding+2*this.layerConfig.characterWidth&&(u=-this.scrollMargin.left),this.session.setScrollLeft(u)):f+this.$size.scrollerWidth<u+this.characterWidth?this.session.setScrollLeft(Math.round(u+this.characterWidth-this.$size.scrollerWidth)):f<=this.$padding&&u-f<this.characterWidth&&this.session.setScrollLeft(0)}};this.getScrollTop=function(){return this.session.getScrollTop()};this.getScrollLeft=function(){return this.session.getScrollLeft()};this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight};this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)};this.scrollToRow=function(n){this.session.setScrollTop(n*this.lineHeight)};this.alignCursor=function(n,t){typeof n=="number"&&(n={row:n,column:0});var r=this.$cursorLayer.getPixelPosition(n),u=this.$size.scrollerHeight-this.lineHeight,i=r.top-u*(t||0);return this.session.setScrollTop(i),i};this.STEPS=8;this.$calcSteps=function(n,t){for(var i=0,u=this.STEPS,r=[],f=function(n,t,i){return i*(Math.pow(n-1,3)+1)+t},i=0;i<u;++i)r.push(f(i/this.STEPS,n,t-n));return r};this.scrollToLine=function(n,t,i,r){var e=this.$cursorLayer.getPixelPosition({row:n,column:0}),u=e.top,f;t&&(u-=this.$size.scrollerHeight/2);f=this.scrollTop;this.session.setScrollTop(u);i!==!1&&this.animateScrolling(f,r)};this.animateScrolling=function(n,t){var r=this.scrollTop,i,f,u;this.$animatedScroll&&(i=this,n!=r)&&(this.$scrollAnimation&&(f=this.$scrollAnimation.steps,f.length&&(n=f[0],n==r))||(u=i.$calcSteps(n,r),this.$scrollAnimation={from:n,to:r,steps:u},clearInterval(this.$timer),i.session.setScrollTop(u.shift()),i.session.$scrollTop=r,this.$timer=setInterval(function(){u.length?(i.session.setScrollTop(u.shift()),i.session.$scrollTop=r):r!=null?(i.session.$scrollTop=-1,i.session.setScrollTop(r),r=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())},10)))};this.scrollToY=function(n){this.scrollTop!==n&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=n)};this.scrollToX=function(n){this.scrollLeft!==n&&(this.scrollLeft=n);this.$loop.schedule(this.CHANGE_H_SCROLL)};this.scrollTo=function(n,t){this.session.setScrollTop(t);this.session.setScrollLeft(t)};this.scrollBy=function(n,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t);n&&this.session.setScrollLeft(this.session.getScrollLeft()+n)};this.isScrollableBy=function(n,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:n<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:n>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0};this.pixelToScreenCoordinates=function(n,t){var i=this.scroller.getBoundingClientRect(),r=(n+this.scrollLeft-i.left-this.$padding)/this.characterWidth,f=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),u=Math.round(r);return{row:f,column:u,side:r-u>0?1:-1}};this.screenToTextCoordinates=function(n,t){var i=this.scroller.getBoundingClientRect(),r=Math.round((n+this.scrollLeft-i.left-this.$padding)/this.characterWidth),u=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(u,Math.max(r,0))};this.textToScreenCoordinates=function(n,t){var i=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(n,t),u=this.$padding+Math.round(r.column*this.characterWidth),f=r.row*this.lineHeight;return{pageX:i.left+u-this.scrollLeft,pageY:i.top+f-this.scrollTop}};this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")};this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")};this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText});this.$keepTextAreaAtCursor=!0;i.addCssClass(this.textarea,"ace_composition");this.textarea.style.cssText="";this.$moveTextAreaToCursor()};this.setCompositionText=function(){this.$moveTextAreaToCursor()};this.hideComposition=function(){this.$composition&&(i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)};this.setTheme=function(n,t){function e(r){if(u.$themeId!=n)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+n+" or it didn't call define");i.importCssString(r.cssText,r.cssClass,u.container.ownerDocument);u.theme&&i.removeCssClass(u.container,u.theme.cssClass);var f="padding"in r?r.padding:"padding"in(u.theme||{})?4:u.$padding;u.$padding&&f!=u.$padding&&u.setPadding(f);u.$theme=r.cssClass;u.theme=r;i.addCssClass(u.container,r.cssClass);i.setCssClass(u.container,"ace_dark",r.isDark);u.$size&&(u.$size.width=0,u.$updateSizeAsync());u._dispatchEvent("themeLoaded",{theme:r});t&&t()}var u=this,f;this.$themeId=n;u._dispatchEvent("themeChange",{theme:n});n&&typeof n!="string"?e(n):(f=n||this.$options.theme.initialValue,r.loadModule(["theme",f],e))};this.getTheme=function(){return this.$themeId};this.setStyle=function(n,t){i.setCssClass(this.container,n,t!==!1)};this.unsetStyle=function(n){i.removeCssClass(this.container,n)};this.setCursorStyle=function(n){this.scroller.style.cursor!=n&&(this.scroller.style.cursor=n)};this.setMouseCursor=function(n){this.scroller.style.cursor=n};this.destroy=function(){this.$textLayer.destroy();this.$cursorLayer.destroy()}}.call(u.prototype);r.defineOptions(u.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(n){this.$textLayer.setShowInvisibles(n)&&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(n){typeof n=="number"&&(this.$printMarginColumn=n);this.$showPrintMargin=!!n;this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(n){this.$gutter.style.display=n?"block":"none";this.$loop.schedule(this.CHANGE_FULL);this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(n){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",n)},initialValue:!1},showFoldWidgets:{set:function(n){this.$gutterLayer.setShowFoldWidgets(n)},initialValue:!0},showLineNumbers:{set:function(n){this.$gutterLayer.setShowLineNumbers(n);this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(n){this.$textLayer.setDisplayIndentGuides(n)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(n){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement("div");this.$gutterLineHighlight.className="ace_gutter-active-line";this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=n?"":"none";this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!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(n){typeof n=="number"&&(n=n+"px");this.container.style.fontSize=n;this.updateFontSize()},initialValue:12},fontFamily:{set:function(n){this.container.style.fontFamily=n;this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},maxPixelHeight:{set:function(){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(n){(n=+n||0,this.$scrollPastEnd!=n)&&(this.$scrollPastEnd=n,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(n){this.$gutterLayer.$fixedWidth=!!n;this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(n){this.setTheme(n)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}});t.VirtualRenderer=u});define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,t){"use strict";var o=n("../lib/oop"),f=n("../lib/net"),e=n("../lib/event_emitter").EventEmitter,i=n("../config"),r=function(t,r,u,f){var e,o;this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this);this.changeListener=this.changeListener.bind(this);this.onMessage=this.onMessage.bind(this);n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl);i.get("packaged")||!n.toUrl?f=f||i.moduleUrl(r,"worker"):(e=this.$normalizePath,f=f||e(n.toUrl("ace/worker/worker.js",null,"_")),o={},t.forEach(function(t){o[t]=e(n.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}));try{this.$worker=new Worker(f)}catch(s){if(s instanceof window.DOMException){var l=this.$workerBlob(f),h=window.URL||window.webkitURL,c=h.createObjectURL(l);this.$worker=new Worker(c);h.revokeObjectURL(c)}else throw s;}this.$worker.postMessage({init:!0,tlns:o,module:r,classname:u});this.callbackId=1;this.callbacks={};this.$worker.onmessage=this.onMessage},u;(function(){o.implement(this,e);this.onMessage=function(n){var t=n.data,i;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}};this.reportError=function(n){window.console&&console.error&&console.error(n)};this.$normalizePath=function(n){return f.qualifyURL(n)};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(n,t){this.$worker.postMessage({command:n,args:t})};this.call=function(n,t,i){if(i){var r=this.callbackId++;this.callbacks[r]=i;t.push(r)}this.send(n,t)};this.emit=function(n,t){try{this.$worker.postMessage({event:n,data:{data:t.data}})}catch(i){console.error(i.stack)}};this.attachToDocument=function(n){this.$doc&&this.terminate();this.$doc=n;this.call("setValue",[n.getValue()]);n.on("change",this.changeListener)};this.changeListener=function(n){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0));n.action=="insert"?this.deltaQueue.push(n.start,n.lines):this.deltaQueue.push(n.start,n.end)};this.$sendDeltaQueue=function(){var n=this.deltaQueue;n&&(this.deltaQueue=null,n.length>50&&n.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:n}))};this.$workerBlob=function(n){var i="importScripts('"+f.qualifyURL(n)+"');",r,t;try{return new Blob([i],{type:"application/javascript"})}catch(u){return r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,t=new r,t.append(i),t.getBlob("application/javascript")}}}).call(r.prototype);u=function(n,t,r){var s;this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this);this.changeListener=this.changeListener.bind(this);this.callbackId=1;this.callbacks={};this.messageBuffer=[];var f=null,h=!1,u=Object.create(e),o=this;this.$worker={};this.$worker.terminate=function(){};this.$worker.postMessage=function(n){o.messageBuffer.push(n);f&&(h?setTimeout(s):s())};this.setEmitSync=function(n){h=n};s=function(){var n=o.messageBuffer.shift();n.command?f[n.command].apply(f,n.args):n.event&&u._signal(n.event,n.data)};u.postMessage=function(n){o.onMessage({data:n})};u.callback=function(n,t){this.postMessage({type:"call",id:t,data:n})};u.emit=function(n,t){this.postMessage({type:"event",name:n,data:t})};i.loadModule(["worker",t],function(n){for(f=new n[r](u);o.messageBuffer.length;)s()})};u.prototype=r.prototype;t.UIWorkerClient=u;t.WorkerClient=r});define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,t){"use strict";var i=n("./range").Range,u=n("./lib/event_emitter").EventEmitter,f=n("./lib/oop"),r=function(n,t,i,r,u,f){var o=this,e;this.length=t;this.session=n;this.doc=n.getDocument();this.mainClass=u;this.othersClass=f;this.$onUpdate=this.onUpdate.bind(this);this.doc.on("change",this.$onUpdate);this.$others=r;this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})};this.$pos=i;e=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=e.length;this.setup();n.selection.on("changeCursor",this.$onCursorChange)};(function(){f.implement(this,u);this.setup=function(){var u=this,r=this.doc,t=this.session,n;this.selectionBefore=t.selection.toJSON();t.selection.inMultiSelectMode&&t.selection.toSingleRange();this.pos=r.createAnchor(this.$pos.row,this.$pos.column);n=this.pos;n.$insertRight=!0;n.detach();n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1);this.others=[];this.$others.forEach(function(n){var t=r.createAnchor(n.row,n.column);t.$insertRight=!0;t.detach();u.others.push(t)});t.setUndoSelect(!1)};this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,n=this;this.othersActive=!0;this.others.forEach(function(r){r.markerId=t.addMarker(new i(r.row,r.column,r.row,r.column+n.length),n.othersClass,null,!1)})}};this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}};this.onUpdate=function(n){var t,r,f,u;if(this.$updating)return this.updateAnchors(n);if((t=n,t.start.row===t.end.row)&&t.start.row===this.pos.row){this.$updating=!0;var e=n.action==="insert"?t.end.column-t.start.column:t.start.column-t.end.column,o=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;if(this.updateAnchors(n),o&&(this.length+=e),o&&!this.session.$fromUndo)if(n.action==="insert")for(r=this.others.length-1;r>=0;r--)f=this.others[r],u={row:f.row,column:f.column+s},this.doc.insertMergedLines(u,n.lines);else if(n.action==="remove")for(r=this.others.length-1;r>=0;r--)f=this.others[r],u={row:f.row,column:f.column+s},this.doc.remove(new i(u.row,u.column,u.row,u.column-e));this.$updating=!1;this.updateMarkers()}};this.updateAnchors=function(n){this.pos.onChange(n);for(var t=this.others.length;t--;)this.others[t].onChange(n);this.updateMarkers()};this.updateMarkers=function(){var n;if(!this.$updating){var u=this,t=this.session,r=function(n,r){t.removeMarker(n.markerId);n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+u.length),r,null,!1)};for(r(this.pos,this.mainClass),n=this.others.length;n--;)r(this.others[n],this.othersClass)}};this.onCursorChange=function(n){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",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}};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(){var n,i,t;if(this.$undoStackDepth!==-1){for(n=this.session.getUndoManager(),i=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,t=0;t<i;t++)n.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(r.prototype);t.PlaceHolder=r});define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,t){function i(n,t){return n.row==t.row&&n.column==t.column}function f(n){var c=n.domEvent,h=c.altKey,l=c.shiftKey,k=c.ctrlKey,a=n.getAccelKey(),p=n.getButton(),o,b,y,e,rt,ut,ft,et;if(k&&r.isMac&&(p=c.button),n.editor.inMultiSelectMode&&p==2){n.editor.textInput.onContextMenu(n.domEvent);return}if(!k&&!h&&!a){p===0&&n.editor.inMultiSelectMode&&n.editor.exitMultiSelectMode();return}if(p===0){var t=n.editor,f=t.selection,v=t.inMultiSelectMode,d=n.getDocumentPosition(),ot=f.getCursor(),st=n.inSelection()||f.isEmpty()&&i(d,ot),g=n.x,nt=n.y,ht=function(n){g=n.clientX;nt=n.clientY},it=t.session,tt=t.renderer.pixelToScreenCoordinates(g,nt),w=tt,s;if(t.$mouseHandler.$enableJumpToDef)k&&h||a&&h?s=l?"block":"add":h&&t.$blockSelectEnabled&&(s="block");else if(a&&!h){if(s="add",!v&&l)return}else h&&t.$blockSelectEnabled&&(s="block");if(s&&r.isMac&&c.ctrlKey&&t.$mouseHandler.cancelContextMenu(),s=="add"){if(!v&&st)return;v||(o=f.toOrientedRange(),t.addSelectionMarker(o));b=f.rangeList.rangeAtPoint(d);t.$blockScrolling++;t.inVirtualSelectionMode=!0;l&&(b=null,o=f.ranges[0]||o,t.removeSelectionMarker(o));t.once("mouseup",function(){var n=f.toOrientedRange();b&&n.isEmpty()&&i(b.cursor,n.cursor)?f.substractPoint(n.cursor):(l?f.substractPoint(o.cursor):o&&(t.removeSelectionMarker(o),f.addRange(o)),f.addRange(n));t.$blockScrolling--;t.inVirtualSelectionMode=!1})}else if(s=="block")return n.stop(),t.inVirtualSelectionMode=!0,e=[],rt=function(){var n=t.renderer.pixelToScreenCoordinates(g,nt),r=it.screenToDocumentPosition(n.row,n.column);i(w,n)&&i(r,f.lead)||(w=n,t.$blockScrolling++,t.selection.moveToPosition(r),t.renderer.scrollCursorIntoView(),t.removeSelectionMarkers(e),e=f.rectangularRangeBlock(w,tt),t.$mouseHandler.$clickSelection&&e.length==1&&e[0].isEmpty()&&(e[0]=t.$mouseHandler.$clickSelection.clone()),e.forEach(t.addSelectionMarker,t),t.updateSelectionMarkers(),t.$blockScrolling--)},t.$blockScrolling++,v&&!a?f.toSingleRange():!v&&a&&(y=f.toOrientedRange(),t.addSelectionMarker(y)),l?tt=it.documentToScreenPosition(f.lead):f.moveToPosition(d),t.$blockScrolling--,w={row:-1,column:-1},ut=function(){clearInterval(et);t.removeSelectionMarkers(e);e.length||(e=[f.toOrientedRange()]);t.$blockScrolling++;y&&(t.removeSelectionMarker(y),f.toSingleRange(y));for(var n=0;n<e.length;n++)f.addRange(e[n]);t.inVirtualSelectionMode=!1;t.$mouseHandler.$clickSelection=null;t.$blockScrolling--},ft=rt,u.capture(t.container,ht,ut),et=setInterval(function(){ft()},20),n.preventDefault()}}var u=n("../lib/event"),r=n("../lib/useragent");t.onMouseDown=f});define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,t){t.defaultCommands=[{name:"addCursorAbove",exec:function(n){n.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(n){n.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(n){n.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(n){n.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(n){n.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(n){n.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(n){n.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(n){n.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(n){n.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(n){n.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(n){n.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}];t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(n){n.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(n){return n&&n.inMultiSelectMode}}];var i=n("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)});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(n,t){function y(n,t,i){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=i==-1,u.find(n)}function p(n,t){return n.row==t.row&&n.column==t.column}function a(n){if(!n.$multiselectOnSessionChange){n.$onAddRange=n.$onAddRange.bind(n);n.$onRemoveRange=n.$onRemoveRange.bind(n);n.$onMultiSelect=n.$onMultiSelect.bind(n);n.$onSingleSelect=n.$onSingleSelect.bind(n);n.$multiselectOnSessionChange=t.onSessionChange.bind(n);n.$checkMultiselectChange=n.$checkMultiselectChange.bind(n);n.$multiselectOnSessionChange(n);n.on("changeSession",n.$multiselectOnSessionChange);n.on("mousedown",f);n.commands.addCommands(r.defaultCommands);w(n)}}function w(n){function r(){t&&(n.renderer.setMouseCursor(""),t=!1)}var i=n.textInput.getElement(),t=!1;e.addListener(i,"keydown",function(i){var u=i.keyCode==18&&!(i.ctrlKey||i.shiftKey||i.metaKey);n.$blockSelectEnabled&&u?t||(n.renderer.setMouseCursor("crosshair"),t=!0):t&&r()});e.addListener(i,"keyup",r);e.addListener(i,"blur",r)}var v=n("./range_list").RangeList,i=n("./range").Range,s=n("./selection").Selection,f=n("./mouse/multi_select_handler").onMouseDown,e=n("./lib/event"),h=n("./lib/lang"),r=n("./commands/multi_select_commands"),c,u,l,o;t.commands=r.defaultCommands.concat(r.multiSelectCommands);c=n("./search").Search;u=new c;l=n("./edit_session").EditSession,function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(l.prototype),function(){this.ranges=null;this.rangeList=null;this.addRange=function(n,t){var i,r;if(n){if(!this.inMultiSelectMode&&this.rangeCount===0){if(i=this.toOrientedRange(),this.rangeList.add(i),this.rangeList.add(n),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(n);this.rangeList.removeAll();this.rangeList.add(i);this.$onAddRange(i)}return n.cursor||(n.cursor=n.end),r=this.rangeList.add(n),this.$onAddRange(n),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(n)}};this.toSingleRange=function(n){n=n||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t);n&&this.fromOrientedRange(n)};this.substractPoint=function(n){var t=this.rangeList.substractPoint(n);if(t)return this.$onRemoveRange(t),t[0]};this.mergeOverlappingRanges=function(){var n=this.rangeList.merge();n.length?this.$onRemoveRange(n):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])};this.$onAddRange=function(n){this.rangeCount=this.rangeList.ranges.length;this.ranges.unshift(n);this._signal("addRange",{range:n})};this.$onRemoveRange=function(n){var t,i,r;for(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode&&(t=this.rangeList.ranges.pop(),n.push(t),this.rangeCount=0),i=n.length;i--;)r=this.ranges.indexOf(n[i]),this.ranges.splice(r,1);this._signal("removeRange",{ranges:n});this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session));t=t||this.ranges[0];t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)};this.$initRangeList=function(){this.rangeList||(this.rangeList=new v,this.ranges=[],this.rangeCount=0)};this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]};this.splitIntoLines=function(){var u,f,r,t,e;if(this.rangeCount>1){var o=this.rangeList.ranges,s=o[o.length-1],n=i.fromPoints(o[0].start,s.end);this.toSingleRange();this.setSelectionRange(n,s.cursor==s.start)}else{var n=this.getRange(),l=this.isBackwards(),h=n.start.row,c=n.end.row;if(h==c){l?(u=n.end,f=n.start):(u=n.start,f=n.end);this.addRange(i.fromPoints(f,f));this.addRange(i.fromPoints(u,u));return}for(r=[],t=this.getLineRange(h,!0),t.start.column=n.start.column,r.push(t),e=h+1;e<c;e++)r.push(this.getLineRange(e,!0));t=this.getLineRange(c,!0);t.end.column=n.end.column;r.push(t);r.forEach(this.addRange,this)}};this.toggleBlockSelection=function(){if(this.rangeCount>1){var n=this.rangeList.ranges,t=n[n.length-1],r=i.fromPoints(n[0].start,t.end);this.toSingleRange();this.setSelectionRange(r,t.cursor==t.start)}else{var u=this.session.documentToScreenPosition(this.selectionLead),f=this.session.documentToScreenPosition(this.selectionAnchor),e=this.rectangularRangeBlock(u,f);e.forEach(this.addRange,this)}};this.rectangularRangeBlock=function(n,t,r){var u=[],b=n.column<t.column,s,v,y,e,l,h,f,w,o,a,c;for(b?(s=n.column,v=t.column):(s=t.column,v=n.column),y=n.row<t.row,y?(e=n.row,l=t.row):(e=t.row,l=n.row),s<0&&(s=0),e<0&&(e=0),e==l&&(r=!0),h=e;h<=l;h++){if(f=i.fromPoints(this.session.screenToDocumentPosition(h,s),this.session.screenToDocumentPosition(h,v)),f.isEmpty()){if(w&&p(f.end,w))break;w=f.end}f.cursor=b?f.start:f.end;u.push(f)}if(y&&u.reverse(),!r){for(o=u.length-1;u[o].isEmpty()&&o>0;)o--;if(o>0)for(a=0;u[a].isEmpty();)a++;for(c=o;c>=a;c--)u[c].isEmpty()&&u.splice(c,1)}return u}}.call(s.prototype);o=n("./editor").Editor,function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor();this.renderer.updateBackMarkers()};this.addSelectionMarker=function(n){n.cursor||(n.cursor=n.end);var t=this.getSelectionStyle();return n.marker=this.session.addMarker(n,"ace_selection",t),this.session.$selectionMarkers.push(n),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,n};this.removeSelectionMarker=function(n){if(n.marker){this.session.removeMarker(n.marker);var t=this.session.$selectionMarkers.indexOf(n);t!=-1&&this.session.$selectionMarkers.splice(t,1);this.session.selectionMarkerCount=this.session.$selectionMarkers.length}};this.removeSelectionMarkers=function(n){for(var t,r,i=this.session.$selectionMarkers,u=n.length;u--;)(t=n[u],t.marker)&&(this.session.removeMarker(t.marker),r=i.indexOf(t),r!=-1&&i.splice(r,1));this.session.selectionMarkerCount=i.length};this.$onAddRange=function(n){this.addSelectionMarker(n.range);this.renderer.updateCursor();this.renderer.updateBackMarkers()};this.$onRemoveRange=function(n){this.removeSelectionMarkers(n.ranges);this.renderer.updateCursor();this.renderer.updateBackMarkers()};this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(r.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())};this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(r.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))};this.$onMultiSelectExec=function(n){var i=n.command,t=n.editor,r;if(t.multiSelect)return i.multiSelectAction?i.multiSelectAction=="forEach"?r=t.forEachSelection(i,n.args):i.multiSelectAction=="forEachLine"?r=t.forEachSelection(i,n.args,!0):i.multiSelectAction=="single"?(t.exitMultiSelectMode(),r=i.exec(t,n.args||{})):r=i.multiSelectAction(t,n.args||{}):(r=i.exec(t,n.args||{}),t.multiSelect.addRange(t.multiSelect.toOrientedRange()),t.multiSelect.mergeOverlappingRanges()),r};this.forEachSelection=function(n,t,i){var a,e,r,l,o;if(!this.inVirtualSelectionMode){var v=i&&i.keepOrder,y=i==!0||i&&i.$byLines,h=this.session,u=this.selection,p=u.rangeList,f=(v?u:p).ranges,c;if(!f.length)return n.exec?n.exec(this,t||{}):n(this,t||{});for(a=u._eventRegistry,u._eventRegistry={},e=new s(h),this.inVirtualSelectionMode=!0,r=f.length;r--;){if(y)while(r>0&&f[r].start.row==f[r-1].end.row)r--;e.fromOrientedRange(f[r]);e.index=r;this.selection=h.selection=e;l=n.exec?n.exec(this,t||{}):n(this,t||{});c||l===undefined||(c=l);e.toOrientedRange(f[r])}return e.detach(),this.selection=h.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=a,u.mergeOverlappingRanges(),o=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),o&&o.from==o.to&&this.renderer.animateScrolling(o.from),c}};this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()};this.getSelectedText=function(){var n="",r,t,i,u;if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(r=this.multiSelect.rangeList.ranges,t=[],i=0;i<r.length;i++)t.push(this.session.getTextRange(r[i]));u=this.session.getDocument().getNewLineCharacter();n=t.join(u);n.length==(t.length-1)*u.length&&(n="")}else this.selection.isEmpty()||(n=this.session.getTextRange(this.getSelectionRange()));return n};this.$checkMultiselectChange=function(n,t){var i,r;if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){if(i=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;r=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor;(r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column)&&this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}};this.findAll=function(n,t,i){var u,r,f,e;if(t=t||{},t.needle=n||t.needle,t.needle==undefined&&(u=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(u)),this.$search.set(t),r=this.$search.findAll(this.session),!r.length)return 0;for(this.$blockScrolling+=1,f=this.multiSelect,i||f.toSingleRange(r[0]),e=r.length;e--;)f.addRange(r[e],!0);return u&&f.rangeList.rangeAtPoint(u.start)&&f.addRange(u,!0),this.$blockScrolling-=1,r.length};this.selectMoreLines=function(n,t){var r=this.selection.toOrientedRange(),c=r.cursor==r.end,f=this.session.documentToScreenPosition(r.cursor),e,s,o,u,h;this.selection.$desiredColumn&&(f.column=this.selection.$desiredColumn);e=this.session.screenToDocumentPosition(f.row+n,f.column);r.isEmpty()?o=e:(s=this.session.documentToScreenPosition(c?r.end:r.start),o=this.session.screenToDocumentPosition(s.row+n,s.column));c?(u=i.fromPoints(e,o),u.cursor=u.start):(u=i.fromPoints(o,e),u.cursor=u.end);u.desiredColumn=f.column;this.selection.inMultiSelectMode?t&&(h=r.cursor):this.selection.addRange(r);this.selection.addRange(u);h&&this.selection.substractPoint(h)};this.transposeSelections=function(n){for(var u,t,r,e=this.session,o=e.multiSelect,f=o.ranges,i=f.length;i--;)t=f[i],t.isEmpty()&&(r=e.getWordRange(t.start.row,t.start.column),t.start.row=r.start.row,t.start.column=r.start.column,t.end.row=r.end.row,t.end.column=r.end.column);for(o.mergeOverlappingRanges(),u=[],i=f.length;i--;)t=f[i],u.unshift(e.getTextRange(t));for(n<0?u.unshift(u.pop()):u.push(u.shift()),i=f.length;i--;)t=f[i],r=t.clone(),e.replace(t,u[i]),t.start.row=r.start.row,t.start.column=r.start.column};this.selectMore=function(n,t,i){var f=this.session,o=f.multiSelect,r=o.toOrientedRange(),e,u;r.isEmpty()&&(r=f.getWordRange(r.start.row,r.start.column),r.cursor=n==-1?r.start:r.end,this.multiSelect.addRange(r),i)||(e=f.getTextRange(r),u=y(f,e,n),u&&(u.cursor=n==-1?u.start:u.end,this.$blockScrolling+=1,this.session.unfold(u),this.multiSelect.addRange(u),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor))};this.alignCursors=function(){var e=this.session,l=e.multiSelect,t=l.ranges,y=-1,p=t.filter(function(n){if(n.cursor.row==y)return!0;y=n.cursor.row}),o,s,u;if(t.length&&p.length!=t.length-1){p.forEach(function(n){l.substractPoint(n.cursor)});var c=0,v=Infinity,w=t.map(function(n){var i=n.cursor,r=e.getLine(i.row),t=r.substr(i.column).search(/\S/g);return t==-1&&(t=0),i.column>c&&(c=i.column),t<v&&(v=t),t});t.forEach(function(n,t){var r=n.cursor,u=c-r.column,f=w[t]-v;u>f?e.insert(r,h.stringRepeat(" ",u-f)):e.remove(new i(r.row,r.column,r.row,r.column-u+f));n.start.column=n.end.column=c;n.start.row=n.end.row=r.row;n.cursor=n.end});l.fromOrientedRange(t[0]);this.renderer.updateCursor();this.renderer.updateBackMarkers()}else{var f=this.selection.getRange(),n=f.start.row,r=f.end.row,a=n==r;if(a){o=this.session.getLength();do s=this.session.getLine(r);while(/[=:]/.test(s)&&++r<o);do s=this.session.getLine(n);while(/[=:]/.test(s)&&--n>0);n<0&&(n=0);r>=o&&(r=o-1)}u=this.session.removeFullLines(n,r);u=this.$reAlignText(u,a);this.session.insert({row:n,column:0},u.join("\n")+"\n");a||(f.start.column=0,f.end.column=u[u.length-1].length);this.selection.setRange(f)}};this.$reAlignText=function(n,t){function f(n){return h.stringRepeat(" ",n)}function s(n){return n[2]?f(i)+n[2]+f(u-n[2].length+r)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}function c(n){return n[2]?f(i+u-n[2].length)+n[2]+f(r," ")+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}function l(n){return n[2]?f(i)+n[2]+f(r)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}var e=!0,o=!0,i,u,r;return n.map(function(n){var t=n.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,u=t[2].length,r=t[3].length,t):(i+u+r!=t[1].length+t[2].length+t[3].length&&(o=!1),i!=t[1].length&&(e=!1),i>t[1].length&&(i=t[1].length),u<t[2].length&&(u=t[2].length),r>t[3].length&&(r=t[3].length),t):[n]}).map(t?s:e?o?c:s:l)}}.call(o.prototype);t.onSessionChange=function(n){var t=n.session,i;if(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,i=n.oldSession,i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t){t.multiSelect.on("addRange",this.$onAddRange);t.multiSelect.on("removeRange",this.$onRemoveRange);t.multiSelect.on("multiSelect",this.$onMultiSelect);t.multiSelect.on("singleSelect",this.$onSingleSelect);t.multiSelect.lead.on("change",this.$checkMultiselectChange);t.multiSelect.anchor.on("change",this.$checkMultiselectChange)}t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};t.MultiSelect=a;n("./config").defineOptions(o.prototype,"editor",{enableMultiselect:{set:function(n){if(a(this),n){this.on("changeSession",this.$multiselectOnSessionChange);this.on("mousedown",f)}else this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",f)},value:!0},enableBlockSelect:{set:function(n){this.$blockSelectEnabled=n},value:!0}})});define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,t){"use strict";var i=n("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null;this.foldingStopMarker=null;this.getFoldWidget=function(n,t,i){var r=n.getLine(i);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""};this.getFoldWidgetRange=function(){return null};this.indentationBlock=function(n,t,r){var e=/\S/,o=n.getLine(t),s=o.search(e),f,c;if(s!=-1){for(var l=r||o.length,a=n.getLength(),h=t,u=t;++t<a;)if(f=n.getLine(t).search(e),f!=-1){if(f<=s)break;u=t}if(u>h)return c=n.getLine(u).length,new i(h,l,u,c)}};this.openingBracketBlock=function(n,t,r,u,f){var s={row:r,column:u+1},e=n.$findClosingBracket(t,s,f),o;if(e)return o=n.foldWidgets[e.row],o==null&&(o=n.getFoldWidget(e.row)),o=="start"&&e.row>s.row&&(e.row--,e.column=n.getLine(e.row).length),i.fromPoints(s,e)};this.closingBracketBlock=function(n,t,r,u){var f={row:r,column:u},e=n.$findOpeningBracket(t,f);if(e)return e.column++,f.column--,i.fromPoints(e,f)}}).call(r.prototype)});define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(n,t){"use strict";t.isDark=!1;t.cssClass="ace-tm";t.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;}';var i=n("../lib/dom");i.importCssString(t.cssText,t.cssClass)});define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(n,t){"use strict";function r(n){this.session=n;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)}var u=n("./lib/oop"),i=n("./lib/dom"),f=n("./range").Range;(function(){this.getRowLength=function(n){var t;return t=this.lineWidgets?this.lineWidgets[n]&&this.lineWidgets[n].rowCount||0:0,this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+1+t:1+t};this.$getWidgetScreenLength=function(){var n=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(n+=t.rowCount)}),n};this.$onChangeEditor=function(n){this.attach(n.editor)};this.attach=function(n){if((n&&n.widgetManager&&n.widgetManager!=this&&n.widgetManager.detach(),this.editor!=n)&&(this.detach(),this.editor=n,n)){n.widgetManager=this;n.renderer.on("beforeRender",this.measureWidgets);n.renderer.on("afterRender",this.renderWidgets)}};this.detach=function(){var n=this.editor,t;n&&(this.editor=null,n.widgetManager=null,n.renderer.off("beforeRender",this.measureWidgets),n.renderer.off("afterRender",this.renderWidgets),t=this.session.lineWidgets,t&&t.forEach(function(n){n&&n.el&&n.el.parentNode&&(n._inDocument=!1,n.el.parentNode.removeChild(n.el))}))};this.updateOnFold=function(n,t){var i=t.lineWidgets,f;if(i&&n.action){var o=n.data,u=o.start.row,r=o.end.row,e=n.action=="add";for(f=u+1;f<r;f++)i[f]&&(i[f].hidden=e);i[r]&&(e?i[u]?i[r].hidden=e:i[u]=i[r]:(i[u]==i[r]&&(i[u]=undefined),i[r].hidden=e))}};this.updateOnChange=function(n){var t=this.session.lineWidgets,i,r,f,u;t&&(i=n.start.row,r=n.end.row-i,r===0||(n.action=="remove"?(f=t.splice(i+1,r),f.forEach(function(n){n&&this.removeLineWidget(n)},this),this.$updateRows()):(u=new Array(r),u.unshift(i,0),t.splice.apply(t,u),this.$updateRows())))};this.$updateRows=function(){var t=this.session.lineWidgets,n;t&&(n=!0,t.forEach(function(t,i){if(t)for(n=!1,t.row=i;t.$oldWidget;)t.$oldWidget.row=i,t=t.$oldWidget}),n&&(this.session.lineWidgets=null))};this.addLineWidget=function(n){var t,u,r,f;this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));t=this.session.lineWidgets[n.row];t&&(n.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1));this.session.lineWidgets[n.row]=n;n.session=this.session;u=this.editor.renderer;n.html&&!n.el&&(n.el=i.createElement("div"),n.el.innerHTML=n.html);n.el&&(i.addCssClass(n.el,"ace_lineWidgetContainer"),n.el.style.position="absolute",n.el.style.zIndex=5,u.container.appendChild(n.el),n._inDocument=!0);n.coverGutter||(n.el.style.zIndex=3);n.pixelHeight==null&&(n.pixelHeight=n.el.offsetHeight);n.rowCount==null&&(n.rowCount=n.pixelHeight/u.layerConfig.lineHeight);r=this.session.getFoldAt(n.row,0);n.$fold=r;r&&(f=this.session.lineWidgets,n.row!=r.end.row||f[r.start.row]?n.hidden=!0:f[r.start.row]=n);this.session._emit("changeFold",{data:{start:{row:n.row}}});this.$updateRows();this.renderWidgets(null,u);this.onWidgetChanged(n);return n};this.removeLineWidget=function(n){if(n._inDocument=!1,n.session=null,n.el&&n.el.parentNode&&n.el.parentNode.removeChild(n.el),n.editor&&n.editor.destroy)try{n.editor.destroy()}catch(i){}if(this.session.lineWidgets){var t=this.session.lineWidgets[n.row];if(t==n){if(this.session.lineWidgets[n.row]=n.$oldWidget,n.$oldWidget)this.onWidgetChanged(n.$oldWidget)}else while(t){if(t.$oldWidget==n){t.$oldWidget=n.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:n.row}}});this.$updateRows()};this.getWidgetsAtRow=function(n){for(var i=this.session.lineWidgets,t=i&&i[n],r=[];t;)r.push(t),t=t.$oldWidget;return r};this.onWidgetChanged=function(n){this.session._changedWidgets.push(n);this.editor&&this.editor.renderer.updateFull()};this.measureWidgets=function(n,t){var f=this.session._changedWidgets,o=t.layerConfig,u,e,i,r;if(f&&f.length){for(u=Infinity,e=0;e<f.length;e++)if((i=f[e],i&&i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0;t.container.appendChild(i.el)}i.h=i.el.offsetHeight;i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/o.characterWidth));r=i.h/o.lineHeight;i.coverLine&&(r-=this.session.getRowLineCount(i.row),r<0&&(r=0));i.rowCount!=r&&(i.rowCount=r,i.row<u&&(u=i.row))}u!=Infinity&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null);this.session._changedWidgets=[]}};this.renderWidgets=function(n,t){var r=t.layerConfig,e=this.session.lineWidgets,u,h,f,i,o,s;if(e){for(u=Math.min(this.firstRow,r.firstRow),h=Math.max(this.lastRow,r.lastRow,e.length);u>0&&!e[u];)u--;for(this.firstRow=r.firstRow,this.lastRow=r.lastRow,t.$cursorLayer.config=r,f=u;f<=h;f++)if(i=e[f],i&&i.el){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,t.container.appendChild(i.el));o=t.$cursorLayer.getPixelPosition({row:f,column:0},!0).top;i.coverLine||(o+=r.lineHeight*this.session.getRowLineCount(i.row));i.el.style.top=o-r.offset+"px";s=i.coverGutter?0:t.gutterWidth;i.fixedWidth||(s-=t.scrollLeft);i.el.style.left=s+"px";i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=r.width+2*r.padding+"px");i.el.style.right=i.fixedWidth?t.scrollBar.getWidth()+"px":""}}}}).call(r.prototype);t.LineWidgets=r});define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(n,t){"use strict";function f(n,t,i){for(var u=0,f=n.length-1,r,e;u<=f;)if(r=u+f>>1,e=i(t,n[r]),e>0)u=r+1;else if(e<0)f=r-1;else return r;return-(u+1)}function e(n,t,i){var o=n.getAnnotations().sort(r.comparePoints),e,u,s;if(o.length&&(e=f(o,{row:t,column:-1},r.comparePoints),e<0&&(e=-e-1),e>=o.length?e=i>0?0:o.length-1:e===0&&i<0&&(e=o.length-1),u=o[e],u&&i)){if(u.row===t){do u=o[e+=i];while(u&&u.row===t);if(!u)return o.slice()}s=[];t=u.row;do s[i<0?"unshift":"push"](u),u=o[e+=i];while(u&&u.row==t);return s.length&&s}}var u=n("../line_widgets").LineWidgets,i=n("../lib/dom"),r=n("../range").Range;t.showErrorMarker=function(n,t){var o=n.session,a,h,s,w,y;o.widgetManager||(o.widgetManager=new u(o),o.widgetManager.attach(n));var f=n.getCursorPosition(),c=f.row,l=o.widgetManager.getWidgetsAtRow(c).filter(function(n){return n.type=="errorMarker"})[0];if(l?l.destroy():c-=t,a=e(o,c,t),a)s=a[0],f.column=(s.pos&&typeof s.column!="number"?s.pos.sc:s.column)||0,f.row=s.row,h=n.renderer.$gutterLayer.$annotations[f.row];else{if(l)return;h={text:["Looks good!"],className:"ace_ok"}}n.session.unfold(f.row);n.selection.moveToPosition(f);var r={row:f.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},v=r.el.appendChild(i.createElement("div")),p=r.el.appendChild(i.createElement("div"));p.className="error_widget_arrow "+h.className;w=n.renderer.$cursorLayer.getPixelPosition(f).left;p.style.left=w+n.renderer.gutterWidth-5+"px";r.el.className="error_widget_wrapper";v.className="error_widget "+h.className;v.innerHTML=h.text.join("<br>");v.appendChild(i.createElement("div"));y=function(n,t,i){if(t===0&&(i==="esc"||i==="return"))return r.destroy(),{command:"null"}};r.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(y),o.widgetManager.removeLineWidget(r),n.off("changeSelection",r.destroy),n.off("changeSession",r.destroy),n.off("mouseup",r.destroy),n.off("change",r.destroy))};n.keyBinding.addKeyboardHandler(y);n.on("changeSelection",r.destroy);n.on("changeSession",r.destroy);n.on("mouseup",r.destroy);n.on("change",r.destroy);n.session.widgetManager.addLineWidget(r);r.el.onmousedown=n.focus.bind(n);n.renderer.scrollCursorIntoView(null,.5,{bottom:r.el.offsetHeight})};i.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;    }","")});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(n,t){"use strict";n("./lib/fixoldbrowsers");var i=n("./lib/dom"),r=n("./lib/event"),u=n("./editor").Editor,f=n("./edit_session").EditSession,e=n("./undomanager").UndoManager,o=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client");n("./keyboard/hash_handler");n("./placeholder");n("./multi_select");n("./mode/folding/fold_mode");n("./theme/textmate");n("./ext/error_marker");t.config=n("./config");t.require=n;typeof define=="function"&&(t.define=define);t.edit=function(n){var c,h,e,l,f,s;if(typeof n=="string"&&(c=n,n=document.getElementById(c),!n))throw new Error("ace.edit can't find div #"+c);if(n&&n.env&&n.env.editor instanceof u)return n.env.editor;h="";n&&/input|textarea/i.test(n.tagName)?(e=n,h=e.value,n=i.createElement("pre"),e.parentNode.replaceChild(n,e)):n&&(h=i.getInnerText(n),n.innerHTML="");l=t.createEditSession(h);f=new u(new o(n));f.setSession(l);s={document:l,editor:f,onResize:f.resize.bind(f,null)};e&&(s.textarea=e);r.addListener(window,"resize",s.onResize);f.on("destroy",function(){r.removeListener(window,"resize",s.onResize);s.editor.container.env=null});return f.container.env=f.env=s,f};t.createEditSession=function(n,t){var i=new f(n,t);return i.setUndoManager(new e),i};t.EditSession=f;t.UndoManager=e;t.version="1.2.6"}),function(){window.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=window.define);window.ace||(window.ace=n);for(var t in n)n.hasOwnProperty(t)&&(window.ace[t]=n[t])})}();!function(){"use strict";function i(n){return angular.isUndefined(n)||null===n}var n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",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",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",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",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(t){var i=t.which;switch(i){case n.COMMAND:case n.SHIFT:case n.CTRL:case n.ALT:return!0}return!!(t.metaKey||t.ctrlKey||t.altKey)},isFunctionKey:function(n){return n=n.which?n.which:n,n>=112&&n<=123},isVerticalMovement:function(t){return~[n.UP,n.DOWN].indexOf(t)},isHorizontalMovement:function(t){return~[n.LEFT,n.RIGHT,n.BACKSPACE,n.DELETE].indexOf(t)},toSeparator:function(t){var i={ENTER:"\n",TAB:"\t",SPACE:" "}[t];return i?i:n[t]?void 0:t}},r,t;void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(n){return angular.element(this[0].querySelectorAll(n))});void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(n){for(var t=this[0],i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t;){if(i.bind(t)(n))return t;t=t.parentElement}return!1});r=0;t=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,skipFocusser:!1,dropdownPosition:"auto",removeSelected:!0,resetSearchInput:!0,generateId:function(){return r++},appendToBody:!1,spinnerEnabled:!1,spinnerClass:"glyphicon glyphicon-refresh ui-select-spin",backspaceReset:!0}).service("uiSelectMinErr",function(){var n=angular.$$minErr("ui.select");return function(){var t=n.apply(this,arguments),i=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(i)}}).directive("uisTranscludeAppend",function(){return{link:function(n,t,i,r,u){u(n,function(n){t.append(n)})}}}).filter("highlight",function(){function n(n){return(""+n).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,i){return i&&t?(""+t).replace(new RegExp(n(i),"gi"),'<span class="ui-select-highlight">$&<\/span>'):t}}).factory("uisOffset",["$document","$window",function(n,t){return function(i){var r=i[0].getBoundingClientRect();return{width:r.width||i.prop("offsetWidth"),height:r.height||i.prop("offsetHeight"),top:r.top+(t.pageYOffset||n[0].documentElement.scrollTop),left:r.left+(t.pageXOffset||n[0].documentElement.scrollLeft)}}}]);t.factory("$$uisDebounce",["$timeout",function(n){return function(t,i){var r;return function(){var u=this,f=Array.prototype.slice.call(arguments);r&&n.cancel(r);r=n(function(){t.apply(u,f)},i)}}}]);t.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile","$window",function(n,t,i,r,u){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-choices");var i=t.parent().attr("theme")||n.theme;return i+"/choices.tpl.html"},compile:function(r,f){var s,l,h,c,e,o,a;if(!f.repeat)throw i("repeat","Expected 'repeat' expression.");if(s=f.groupBy,l=f.groupFilter,s){if(h=r.querySelectorAll(".ui-select-choices-group"),1!==h.length)throw i("rows","Expected 1 .ui-select-choices-group but got '{0}'.",h.length);h.attr("ng-repeat",t.getGroupNgRepeatExpression())}if(c=t.parse(f.repeat),e=r.querySelectorAll(".ui-select-choices-row"),1!==e.length)throw i("rows","Expected 1 .ui-select-choices-row but got '{0}'.",e.length);if(e.attr("ng-repeat",c.repeatExpression(s)).attr("ng-if","$select.open"),o=r.querySelectorAll(".ui-select-choices-row-inner"),1!==o.length)throw i("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",o.length);return o.attr("uis-transclude-append",""),a=u.document.addEventListener?e:o,a.attr("ng-click","$select.select("+c.itemName+",$select.skipFocusser,$event)"),function(t,i,u,f){f.parseRepeatAttr(u.repeat,s,l);f.disableChoiceExpression=u.uiDisableChoice;f.onHighlightCallback=u.onHighlight;f.minimumInputLength=parseInt(u.minimumInputLength)||0;f.dropdownPosition=u.position?u.position.toLowerCase():n.dropdownPosition;t.$watch("$select.search",function(n){n&&!f.open&&f.multiple&&f.activate(!1,!0);f.activeIndex=f.tagging.isActivated?-1:0;!u.minimumInputLength||f.search.length>=u.minimumInputLength?f.refresh(u.refresh):f.items=[]});u.$observe("refreshDelay",function(){var i=t.$eval(u.refreshDelay);f.refreshDelay=void 0!==i?i:n.refreshDelay});t.$watch("$select.open",function(n){n?(r.attr("role","listbox"),f.refresh(u.refresh)):i.removeAttr("role")})}}}}]);t.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","$$uisDebounce","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse","$injector","$window",function(t,r,u,f,e,o,s,h,c,l,a){function rt(n,t,i){if(n.findIndex)return n.findIndex(t,i);for(var f,u=Object(n),e=u.length>>>0,r=0;r<e;r++)if(f=u[r],t.call(i,f,r,u))return r;return-1}function w(){v.resetSearchInput&&(v.search=k,v.selected&&v.items.length&&!v.multiple&&(v.activeIndex=rt(v.items,function(n){return angular.equals(this,n)},v.selected)))}function ut(n,t){for(var i,u=[],r=0;r<t.length;r++)for(i=0;i<n.length;i++)n[i].name==[t[r]]&&u.push(n[i]);return u}function ft(n,t){var i=y.indexOf(n);t&&i===-1&&y.push(n);!t&&i>-1&&y.splice(i,1)}function b(n){return y.indexOf(n)>-1}function et(n){function i(n,i){var r=t.indexOf(n);i&&r===-1&&t.push(n);!i&&r>-1&&t.splice(r,1)}function r(n){return t.indexOf(n)>-1}if(n){var t=[];v.isLocked=function(n,t){var u=!1,f=v.selected[t];return f&&(n?(u=!!n.$eval(v.lockChoiceExpression),i(f,u)):u=r(f)),u}}}function ot(t){var f=!0,i,u,r;switch(t){case n.DOWN:if(!v.open&&v.multiple)v.activate(!1,!0);else if(v.activeIndex<v.items.length-1)for(i=++v.activeIndex;b(v.items[i])&&i<v.items.length;)v.activeIndex=++i;break;case n.UP:if(u=0===v.search.length&&v.tagging.isActivated?-1:0,!v.open&&v.multiple)v.activate(!1,!0);else if(v.activeIndex>u)for(r=--v.activeIndex;b(v.items[r])&&r>u;)v.activeIndex=--r;break;case n.TAB:v.multiple&&!v.open||v.select(v.items[v.activeIndex],!0);break;case n.ENTER:v.open&&(v.tagging.isActivated||v.activeIndex>=0)?v.select(v.items[v.activeIndex],v.skipFocusser):v.activate(!1,!0);break;case n.ESC:v.close();break;default:f=!1}return f}function it(){var n=r.querySelectorAll(".ui-select-choices-content"),u=n.querySelectorAll(".ui-select-choices-row");if(u.length<1)throw s("choices","Expected multiple .ui-select-choices-row but got '{0}'.",u.length);if(!(v.activeIndex<0)){var t=u[v.activeIndex],i=t.offsetTop+t.clientHeight-n[0].scrollTop,f=n[0].offsetHeight;i>f?n[0].scrollTop+=i-f:i<t.clientHeight&&(v.isGrouped&&0===v.activeIndex?n[0].scrollTop=0:n[0].scrollTop-=t.clientHeight-i)}}var v=this,k="",g,nt,y,p,d,tt;if(v.placeholder=h.placeholder,v.searchEnabled=h.searchEnabled,v.sortable=h.sortable,v.refreshDelay=h.refreshDelay,v.paste=h.paste,v.resetSearchInput=h.resetSearchInput,v.refreshing=!1,v.spinnerEnabled=h.spinnerEnabled,v.spinnerClass=h.spinnerClass,v.removeSelected=h.removeSelected,v.closeOnSelect=!0,v.skipFocusser=!1,v.search=k,v.activeIndex=0,v.items=[],v.open=!1,v.focus=!1,v.disabled=!1,v.selected=void 0,v.dropdownPosition="auto",v.focusser=void 0,v.multiple=void 0,v.disableChoiceExpression=void 0,v.tagging={isActivated:!1,fct:void 0},v.taggingTokens={isActivated:!1,tokens:void 0},v.lockChoiceExpression=void 0,v.clickTriggeredSelect=!1,v.$filter=f,v.$element=r,v.$animate=function(){try{return l.get("$animate")}catch(n){return null}}(),v.searchInput=r.querySelectorAll("input.ui-select-search"),1!==v.searchInput.length)throw s("searchInput","Expected 1 input.ui-select-search but got '{0}'.",v.searchInput.length);v.isEmpty=function(){return i(v.selected)||""===v.selected||v.multiple&&0===v.selected.length};v.activate=function(n,i){var e,o,f;v.disabled||v.open?v.open&&!v.searchEnabled&&v.close():(i||w(),t.$broadcast("uis:activate"),v.open=!0,v.activeIndex=v.activeIndex>=v.items.length?0:v.activeIndex,v.activeIndex===-1&&v.taggingLabel!==!1&&(v.activeIndex=0),e=r.querySelectorAll(".ui-select-choices-content"),o=r.querySelectorAll(".ui-select-search"),v.$animate&&v.$animate.on&&v.$animate.enabled(e[0])?(f=function(t,i){"start"===i&&0===v.items.length?(v.$animate.off("removeClass",o[0],f),u(function(){v.focusSearchInput(n)})):"close"===i&&(v.$animate.off("enter",e[0],f),u(function(){v.focusSearchInput(n)}))},v.items.length>0?v.$animate.on("enter",e[0],f):v.$animate.on("removeClass",o[0],f)):u(function(){v.focusSearchInput(n);!v.tagging.isActivated&&v.items.length>1&&it()}))};v.focusSearchInput=function(n){v.search=n||v.search;v.searchInput[0].focus()};v.findGroupByName=function(n){return v.groups&&v.groups.filter(function(t){return t.name===n})[0]};v.parseRepeatAttr=function(n,i,r){function e(n){var f=t.$eval(i),u;(v.groups=[],angular.forEach(n,function(n){var t=angular.isFunction(f)?f(n):n[f],i=v.findGroupByName(t);i?i.items.push(n):v.groups.push({name:t,items:[n]})}),r)&&(u=t.$eval(r),angular.isFunction(u)?v.groups=u(v.groups):angular.isArray(u)&&(v.groups=ut(v.groups,u)));v.items=[];v.groups.forEach(function(n){v.items=v.items.concat(n.items)})}function h(n){v.items=n||[]}v.setItemsFn=i?e:h;v.parserResult=o.parse(n);v.isGrouped=!!i;v.itemProperty=v.parserResult.itemName;var u=v.parserResult.source,f=function(){var n=u(t);t.$uisSource=Object.keys(n).map(function(t){var i={};return i[v.parserResult.keyName]=t,i.value=n[t],i})};v.parserResult.keyName&&(f(),v.parserResult.source=c("$uisSource"+v.parserResult.filters),t.$watch(u,function(n,t){n!==t&&f()},!0));v.refreshItems=function(n){var i,r;n=n||v.parserResult.source(t);i=v.selected;!v.isEmpty()&&(!angular.isArray(i)||i.length)&&v.multiple&&v.removeSelected?void 0!==n&&null!==n&&(r=n.filter(function(n){return angular.isArray(i)?i.every(function(t){return!angular.equals(n,t)}):!angular.equals(n,i)}),v.setItemsFn(r)):v.setItemsFn(n);"auto"!==v.dropdownPosition&&"up"!==v.dropdownPosition||t.calculateDropdownPos();t.$broadcast("uis:refresh")};t.$watchCollection(v.parserResult.source,function(n){if(void 0===n||null===n)v.items=[];else{if(!angular.isArray(n))throw s("items","Expected an array but got '{0}'.",n);v.refreshItems(n);angular.isDefined(v.ngModel.$modelValue)&&(v.ngModel.$modelValue=null)}})};v.refresh=function(n){void 0!==n&&(g&&u.cancel(g),g=u(function(){if(t.$select.search.length>=t.$select.minimumInputLength){var i=t.$eval(n);i&&angular.isFunction(i.then)&&!v.refreshing&&(v.refreshing=!0,i["finally"](function(){v.refreshing=!1}))}},v.refreshDelay))};v.isActive=function(n){if(!v.open)return!1;var i=v.items.indexOf(n[v.itemProperty]),t=i==v.activeIndex;return!(!t||i<0)&&(t&&!angular.isUndefined(v.onHighlightCallback)&&n.$eval(v.onHighlightCallback),t)};nt=function(n){return v.selected&&angular.isArray(v.selected)&&v.selected.filter(function(t){return angular.equals(t,n)}).length>0};y=[];v.isDisabled=function(n){if(v.open){var i=n[v.itemProperty],r=v.items.indexOf(i),t=!1;if(r>=0&&(angular.isDefined(v.disableChoiceExpression)||v.multiple)){if(i.isTag)return!1;v.multiple&&(t=nt(i));!t&&angular.isDefined(v.disableChoiceExpression)&&(t=!!n.$eval(v.disableChoiceExpression));ft(i,t)}return t}};v.select=function(n,r,u){if(i(n)||!b(n)){if(!v.items&&!v.search&&!v.tagging.isActivated)return;if(!n||!b(n)){if(v.clickTriggeredSelect=!1,u&&("click"===u.type||"touchend"===u.type)&&n&&(v.clickTriggeredSelect=!0),v.tagging.isActivated&&v.clickTriggeredSelect===!1){if(v.taggingLabel===!1)if(v.activeIndex<0){if(void 0===n&&(n=void 0!==v.tagging.fct?v.tagging.fct(v.search):v.search),!n||angular.equals(v.items[0],n))return}else n=v.items[v.activeIndex];else if(0===v.activeIndex){if(void 0===n)return;if(void 0!==v.tagging.fct&&"string"==typeof n){if(n=v.tagging.fct(n),!n)return}else"string"==typeof n&&(n=n.replace(v.taggingLabel,"").trim())}if(nt(n))return void v.close(r)}w();t.$broadcast("uis:select",n);v.closeOnSelect&&v.close(r)}}};v.close=function(n){v.open&&(v.ngModel&&v.ngModel.$setTouched&&v.ngModel.$setTouched(),v.open=!1,w(),t.$broadcast("uis:close",n))};v.setFocus=function(){v.focus||v.focusInput[0].focus()};v.clear=function(n){v.select(null);n.stopPropagation();u(function(){v.focusser[0].focus()},0,!1)};v.toggle=function(n){v.open?(v.close(),n.preventDefault(),n.stopPropagation()):v.activate()};v.isLocked=function(){return!1};t.$watch(function(){return angular.isDefined(v.lockChoiceExpression)&&""!==v.lockChoiceExpression},et);p=null;d=!1;v.sizeSearchInput=function(){var n=v.searchInput[0],f=v.$element[0],i=function(){return f.clientWidth*!!n.offsetParent},r=function(t){if(0===t)return!1;var i=t-n.offsetLeft;return i<50&&(i=t),v.searchInput.css("width",i+"px"),!0};v.searchInput.css("width","10px");u(function(){null!==p||r(i())||(p=t.$watch(function(){d||(d=!0,t.$$postDigest(function(){d=!1;r(i())&&(p(),p=null)}))},angular.noop))})};v.searchInput.on("keydown",function(i){var r=i.which;~[n.ENTER,n.ESC].indexOf(r)&&(i.preventDefault(),i.stopPropagation());t.$apply(function(){var f=!1,t;if((v.items.length>0||v.tagging.isActivated)&&(ot(r)||v.searchEnabled||(i.preventDefault(),i.stopPropagation()),v.taggingTokens.isActivated)){for(t=0;t<v.taggingTokens.tokens.length;t++)v.taggingTokens.tokens[t]===n.MAP[i.keyCode]&&v.search.length>0&&(f=!0);f&&u(function(){v.searchInput.triggerHandler("tagged");var t=v.search.replace(n.MAP[i.keyCode],"").trim();v.tagging.fct&&(t=v.tagging.fct(t));t&&v.select(t,!0)})}});n.isVerticalMovement(r)&&v.items.length>0&&it();r!==n.ENTER&&r!==n.ESC||(i.preventDefault(),i.stopPropagation())});v.searchInput.on("paste",function(t){var i,r,u,f,e;if(i=window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):(t.originalEvent||t).clipboardData.getData("text/plain"),i=v.search+i,i&&i.length>0)if(v.taggingTokens.isActivated){for(r=[],u=0;u<v.taggingTokens.tokens.length;u++)if(f=n.toSeparator(v.taggingTokens.tokens[u])||v.taggingTokens.tokens[u],i.indexOf(f)>-1){r=i.split(f);break}0===r.length&&(r=[i]);e=v.search;angular.forEach(r,function(n){var t=v.tagging.fct?v.tagging.fct(n):n;t&&v.select(t,!0)});v.search=e||k;t.preventDefault();t.stopPropagation()}else v.paste&&(v.paste(i),v.search=k,t.preventDefault(),t.stopPropagation())});v.searchInput.on("tagged",function(){u(function(){w()})});tt=e(function(){v.sizeSearchInput()},50);angular.element(a).bind("resize",tt);t.$on("$destroy",function(){v.searchInput.off("keyup keydown tagged blur paste");angular.element(a).off("resize",tt)});t.$watch("$select.activeIndex",function(n){n&&r.find("input").attr("aria-activedescendant","ui-select-choices-row-"+v.generatedId+"-"+n)});t.$watch("$select.open",function(n){n||r.find("input").removeAttr("aria-activedescendant")})}]);t.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(n,t,i,r,u,f,e){return{restrict:"EA",templateUrl:function(n,i){var r=i.theme||t.theme;return r+(angular.isDefined(i.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(u,o){var s=/{(.*)}\s*{(.*)}/.exec(o.ngClass),h;return s&&(h="{"+s[1]+", "+s[2]+"}",o.ngClass=h,u.attr("ng-class",h)),angular.isDefined(o.multiple)?u.append("<ui-select-multiple/>").removeAttr("multiple"):u.append("<ui-select-single/>"),o.inputId&&(u.querySelectorAll("input.ui-select-search")[0].id=o.inputId),function(u,o,s,h,c){function w(n){var i,t,f,r;l.open&&(i=!1,(i=window.jQuery?window.jQuery.contains(o[0],n.target):o[0].contains(n.target),i||l.clickTriggeredSelect)||(l.skipFocusser?t=!0:(f=["input","button","textarea","select"],r=angular.element(n.target).controller("uiSelect"),t=r&&r!==l,t||(t=~f.indexOf(n.target.tagName.toLowerCase()))),l.close(t),u.$digest()),l.clickTriggeredSelect=!1)}function tt(){var t=r(o);v=angular.element('<div class="ui-select-placeholder"><\/div>');v[0].style.width=t.width+"px";v[0].style.height=t.height+"px";o.after(v);k=o[0].style.width;n.find("body").append(o);o[0].style.position="absolute";o[0].style.left=t.left+"px";o[0].style.top=t.top+"px";o[0].style.width=t.width+"px"}function b(){null!==v&&(v.replaceWith(o),v=null,o[0].style.position="",o[0].style.left="",o[0].style.top="",o[0].style.width=k,l.setFocus())}var l=h[0],it=h[1],p;l.generatedId=t.generateId();l.baseTitle=s.title||"Select box";l.focusserTitle=l.baseTitle+" focus";l.focusserId="focusser-"+l.generatedId;l.closeOnSelect=function(){return angular.isDefined(s.closeOnSelect)?f(s.closeOnSelect)():t.closeOnSelect}();u.$watch("skipFocusser",function(){var n=u.$eval(s.skipFocusser);l.skipFocusser=void 0!==n?n:t.skipFocusser});l.onSelectCallback=f(s.onSelect);l.onRemoveCallback=f(s.onRemove);l.ngModel=it;l.choiceGrouped=function(n){return l.isGrouped&&n&&n.name};s.tabindex&&s.$observe("tabindex",function(n){l.focusInput.attr("tabindex",n);o.removeAttr("tabindex")});u.$watch(function(){return u.$eval(s.searchEnabled)},function(n){l.searchEnabled=void 0!==n?n:t.searchEnabled});u.$watch("sortable",function(){var n=u.$eval(s.sortable);l.sortable=void 0!==n?n:t.sortable});s.$observe("backspaceReset",function(){var n=u.$eval(s.backspaceReset);l.backspaceReset=void 0===n||n});s.$observe("limit",function(){l.limit=angular.isDefined(s.limit)?parseInt(s.limit,10):void 0});u.$watch("removeSelected",function(){var n=u.$eval(s.removeSelected);l.removeSelected=void 0!==n?n:t.removeSelected});s.$observe("disabled",function(){l.disabled=void 0!==s.disabled&&s.disabled});s.$observe("resetSearchInput",function(){var n=u.$eval(s.resetSearchInput);l.resetSearchInput=void 0===n||n});s.$observe("paste",function(){l.paste=u.$eval(s.paste)});s.$observe("tagging",function(){if(void 0!==s.tagging){var n=u.$eval(s.tagging);l.tagging={isActivated:!0,fct:n!==!0?n:void 0}}else l.tagging={isActivated:!1,fct:void 0}});s.$observe("taggingLabel",function(){void 0!==s.tagging&&(l.taggingLabel="false"===s.taggingLabel?!1:void 0!==s.taggingLabel?s.taggingLabel:"(new)")});s.$observe("taggingTokens",function(){if(void 0!==s.tagging){var n=void 0!==s.taggingTokens?s.taggingTokens.split("|"):[",","ENTER"];l.taggingTokens={isActivated:!0,tokens:n}}});s.$observe("spinnerEnabled",function(){var n=u.$eval(s.spinnerEnabled);l.spinnerEnabled=void 0!==n?n:t.spinnerEnabled});s.$observe("spinnerClass",function(){var n=s.spinnerClass;l.spinnerClass=void 0!==n?s.spinnerClass:t.spinnerClass});angular.isDefined(s.autofocus)&&e(function(){l.setFocus()});angular.isDefined(s.focusOn)&&u.$on(s.focusOn,function(){e(function(){l.setFocus()})});n.on("click",w);u.$on("$destroy",function(){n.off("click",w)});c(u,function(n){var f=angular.element("<div>").append(n),r=f.querySelectorAll(".ui-select-match"),t,u;if(r.removeAttr("ui-select-match"),r.removeAttr("data-ui-select-match"),1!==r.length)throw i("transcluded","Expected 1 .ui-select-match but got '{0}'.",r.length);if(o.querySelectorAll(".ui-select-match").replaceWith(r),t=f.querySelectorAll(".ui-select-choices"),t.removeAttr("ui-select-choices"),t.removeAttr("data-ui-select-choices"),1!==t.length)throw i("transcluded","Expected 1 .ui-select-choices but got '{0}'.",t.length);o.querySelectorAll(".ui-select-choices").replaceWith(t);u=f.querySelectorAll(".ui-select-no-choice");u.removeAttr("ui-select-no-choice");u.removeAttr("data-ui-select-no-choice");1==u.length&&o.querySelectorAll(".ui-select-no-choice").replaceWith(u)});p=u.$eval(s.appendToBody);(void 0!==p?p:t.appendToBody)&&(u.$watch("$select.open",function(n){n?tt():b()}),u.$on("$destroy",function(){b()}));var v=null,k="",a=null,y="direction-up";u.$watch("$select.open",function(){"auto"!==l.dropdownPosition&&"up"!==l.dropdownPosition||u.calculateDropdownPos()});var d=function(n,t){n=n||r(o);t=t||r(a);a[0].style.position="absolute";a[0].style.top=t.height*-1+"px";o.addClass(y)},rt=function(n,t){o.removeClass(y);n=n||r(o);t=t||r(a);a[0].style.position="";a[0].style.top=""},g=function(){e(function(){if("up"===l.dropdownPosition)d();else{o.removeClass(y);var t=r(o),i=r(a),u=n[0].documentElement.scrollTop||n[0].body.scrollTop;t.top+t.height+i.height>u+n[0].documentElement.clientHeight?d(t,i):rt(t,i)}a[0].style.opacity=1})},nt=!1;u.calculateDropdownPos=function(){if(l.open){if(a=angular.element(o).querySelectorAll(".ui-select-dropdown"),0===a.length)return;if(""!==l.search||nt||(a[0].style.opacity=0,nt=!0),!r(a).height&&l.$animate&&l.$animate.on&&l.$animate.enabled(a)){var n=!0;l.$animate.on("enter",a,function(t,i){"close"===i&&n&&(g(),n=!1)})}else g()}else{if(null===a||0===a.length)return;a[0].style.opacity=0;a[0].style.position="";a[0].style.top="";o.removeClass(y)}}}}}}]);t.directive("uiSelectMatch",["uiSelectConfig",function(n){function t(n,t){return n[0].hasAttribute(t)?n.attr(t):n[0].hasAttribute("data-"+t)?n.attr("data-"+t):n[0].hasAttribute("x-"+t)?n.attr("x-"+t):void 0}return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(i){i.addClass("ui-select-match");var r=i.parent(),u=t(r,"theme")||n.theme,f=angular.isDefined(t(r,"multiple"));return u+(f?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,i,r,u){function f(n){u.allowClear=!!angular.isDefined(n)&&(""===n||"true"===n.toLowerCase())}u.lockChoiceExpression=r.uiLockChoice;r.$observe("placeholder",function(t){u.placeholder=void 0!==t?t:n.placeholder});r.$observe("allowClear",f);f(r.allowClear);u.multiple&&u.sizeSearchInput()}}}]);t.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(t,r){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(n,t){var u,r=this,i=n.$select;angular.isUndefined(i.selected)&&(i.selected=[]);n.$evalAsync(function(){u=n.ngModel});r.activeMatchIndex=-1;r.updateModel=function(){u.$setViewValue(Date.now());r.refreshComponent()};r.refreshComponent=function(){i.refreshItems&&i.refreshItems();i.sizeSearchInput&&i.sizeSearchInput()};r.removeChoice=function(u){if(i.isLocked(null,u))return!1;var f=i.selected[u],e={};return e[i.parserResult.itemName]=f,i.selected.splice(u,1),r.activeMatchIndex=-1,i.sizeSearchInput(),t(function(){i.onRemoveCallback(n,{$item:f,$model:i.parserResult.modelMapper(n,e)})}),r.updateModel(),!0};r.getPlaceholder=function(){if(!i.selected||!i.selected.length)return i.placeholder}}],controllerAs:"$selectMultiple",link:function(u,f,e,o){function v(n){return angular.isNumber(n.selectionStart)?n.selectionStart:n.value.length}function y(t){function e(){switch(t){case n.LEFT:return~h.activeMatchIndex?f:r;case n.RIGHT:return~h.activeMatchIndex&&i!==r?l:(s.activate(),!1);case n.BACKSPACE:return~h.activeMatchIndex?h.removeChoice(i)?f:i:r;case n.DELETE:return!!~h.activeMatchIndex&&(h.removeChoice(h.activeMatchIndex),i)}}var o=v(s.searchInput[0]),c=s.selected.length,r=c-1,i=h.activeMatchIndex,l=h.activeMatchIndex+1,f=h.activeMatchIndex-1,u=i;return!(o>0||s.search.length&&t==n.RIGHT)&&(s.close(),u=e(),h.activeMatchIndex=s.selected.length&&u!==!1?Math.min(r,Math.max(0,u)):-1,!0)}function l(n){if(void 0===n||void 0===s.search)return!1;return n.filter(function(n){return void 0!==s.search.toUpperCase()&&void 0!==n&&n.toUpperCase()===s.search.toUpperCase()}).length>0}function a(n,t){var f=-1,r,i,u;if(angular.isArray(n))for(r=angular.copy(n),i=0;i<r.length;i++)void 0===s.tagging.fct?r[i]+" "+s.taggingLabel===t&&(f=i):(u=r[i],angular.isObject(u)&&(u.isTag=!0),angular.equals(u,t)&&(f=i));return f}var s=o[0],c=u.ngModel=o[1],h=u.$selectMultiple;s.multiple=!0;s.focusInput=s.searchInput;c.$isEmpty=function(n){return!n||0===n.length};c.$parsers.unshift(function(){for(var i,n={},r=[],t=s.selected.length-1;t>=0;t--)n={},n[s.parserResult.itemName]=s.selected[t],i=s.parserResult.modelMapper(u,n),r.unshift(i);return r});c.$formatters.unshift(function(n){var r,e=s.parserResult&&s.parserResult.source(u,{$select:{search:""}}),o={},t,f,i;if(!e)return n;if(t=[],f=function(n,i){var f,h,e;if(n&&n.length){for(f=n.length-1;f>=0;f--)if((o[s.parserResult.itemName]=n[f],r=s.parserResult.modelMapper(u,o),s.parserResult.trackByExp)&&(h=/(\w*)\./.exec(s.parserResult.trackByExp),e=/\.([^\s]+)/.exec(s.parserResult.trackByExp),h&&h.length>0&&h[1]==s.parserResult.itemName&&e&&e.length>0&&r[e[1]]==i[e[1]])||angular.equals(r,i))return t.unshift(n[f]),!0;return!1}},!n)return t;for(i=n.length-1;i>=0;i--)f(s.selected,n[i])||f(e,n[i])||t.unshift(n[i]);return t});u.$watchCollection(function(){return c.$modelValue},function(n,t){t!=n&&(angular.isDefined(c.$modelValue)&&(c.$modelValue=null),h.refreshComponent())});c.$render=function(){if(!angular.isArray(c.$viewValue)){if(!i(c.$viewValue))throw t("multiarr","Expected model value to be array but got '{0}'",c.$viewValue);c.$viewValue=[]}s.selected=c.$viewValue;h.refreshComponent();u.$evalAsync()};u.$on("uis:select",function(n,t){if(!(s.selected.length>=s.limit)){s.selected.push(t);var i={};i[s.parserResult.itemName]=t;r(function(){s.onSelectCallback(u,{$item:t,$model:s.parserResult.modelMapper(u,i)})});h.updateModel()}});u.$on("uis:activate",function(){h.activeMatchIndex=-1});u.$watch("$select.disabled",function(n,t){t&&!n&&s.sizeSearchInput()});s.searchInput.on("keydown",function(t){var i=t.which;u.$apply(function(){var r=!1;n.isHorizontalMovement(i)&&(r=y(i));r&&i!=n.TAB&&(t.preventDefault(),t.stopPropagation())})});s.searchInput.on("keyup",function(t){if(n.isVerticalMovement(t.which)||u.$evalAsync(function(){s.activeIndex=s.taggingLabel===!1?-1:0}),s.tagging.isActivated&&s.search.length>0){if(t.which===n.TAB||n.isControl(t)||n.isFunctionKey(t)||t.which===n.ESC||n.isVerticalMovement(t.which))return;if(s.activeIndex=s.taggingLabel===!1?-1:0,s.taggingLabel===!1)return;var r,v,e,h,i=angular.copy(s.items),f=angular.copy(s.items),o=!1,c=-1;if(void 0!==s.tagging.fct){if(e=s.$filter("filter")(i,{isTag:!0}),e.length>0&&(h=e[0]),i.length>0&&h&&(o=!0,i=i.slice(1,i.length),f=f.slice(1,f.length)),r=s.tagging.fct(s.search),f.some(function(n){return angular.equals(n,r)})||s.selected.some(function(n){return angular.equals(n,r)}))return void u.$evalAsync(function(){s.activeIndex=0;s.items=i});r&&(r.isTag=!0)}else{if(e=s.$filter("filter")(i,function(n){return n.match(s.taggingLabel)}),e.length>0&&(h=e[0]),v=i[0],void 0!==v&&i.length>0&&h&&(o=!0,i=i.slice(1,i.length),f=f.slice(1,f.length)),r=s.search+" "+s.taggingLabel,a(s.selected,s.search)>-1)return;if(l(f.concat(s.selected)))return void(o&&(i=f,u.$evalAsync(function(){s.activeIndex=0;s.items=i})));if(l(f))return void(o&&(s.items=f.slice(1,f.length)))}o&&(c=a(s.selected,r));c>-1?i=i.slice(c+1,i.length-1):(i=[],r&&i.push(r),i=i.concat(f));u.$evalAsync(function(){if(s.activeIndex=0,s.items=i,s.isGrouped){var n=r?i.slice(1):i;s.setItemsFn(n);r&&(s.items.unshift(r),s.groups.unshift({name:"",items:[r],tagging:!0}))}})}});s.searchInput.on("blur",function(){r(function(){h.activeMatchIndex=-1})})}}}]);t.directive("uiSelectNoChoice",["uiSelectConfig",function(n){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-no-choice");var i=t.parent().attr("theme")||n.theme;return i+"/no-choice.tpl.html"}}}]);t.directive("uiSelectSingle",["$timeout","$compile",function(t,r){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(u,f,e,o){var s=o[0],c=o[1],h;c.$parsers.unshift(function(n){if(i(n))return n;var r,t={};return t[s.parserResult.itemName]=n,r=s.parserResult.modelMapper(u,t)});c.$formatters.unshift(function(n){var o,t,f,e,r;if(i(n))return n;if(t=s.parserResult&&s.parserResult.source(u,{$select:{search:""}}),f={},t){if(e=function(t){return f[s.parserResult.itemName]=t,o=s.parserResult.modelMapper(u,f),o===n},s.selected&&e(s.selected))return s.selected;for(r=t.length-1;r>=0;r--)if(e(t[r]))return t[r]}return n});u.$watch("$select.selected",function(n){c.$viewValue!==n&&c.$setViewValue(n)});c.$render=function(){s.selected=c.$viewValue};u.$on("uis:select",function(n,r){s.selected=r;var f={};f[s.parserResult.itemName]=r;t(function(){s.onSelectCallback(u,{$item:r,$model:i(r)?r:s.parserResult.modelMapper(u,f)})})});u.$on("uis:close",function(n,i){t(function(){s.focusser.prop("disabled",!1);i||s.focusser[0].focus()},0,!1)});u.$on("uis:activate",function(){h.prop("disabled",!0)});h=angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />");r(h)(u);s.focusser=h;s.focusInput=h;f.parent().append(h);h.bind("focus",function(){u.$evalAsync(function(){s.focus=!0})});h.bind("blur",function(){u.$evalAsync(function(){s.focus=!1})});h.bind("keydown",function(t){return t.which===n.BACKSPACE&&s.backspaceReset!==!1?(t.preventDefault(),t.stopPropagation(),s.select(void 0),void u.$apply()):void(t.which===n.TAB||n.isControl(t)||n.isFunctionKey(t)||t.which===n.ESC||(t.which!=n.DOWN&&t.which!=n.UP&&t.which!=n.ENTER&&t.which!=n.SPACE||(t.preventDefault(),t.stopPropagation(),s.activate()),u.$digest()))});h.bind("keyup input",function(t){t.which===n.TAB||n.isControl(t)||n.isFunctionKey(t)||t.which===n.ESC||t.which==n.ENTER||t.which===n.BACKSPACE||(s.activate(h.val()),h.val(""),u.$digest())})}}}]);t.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(n,t,i){return{require:["^^uiSelect","^ngModel"],link:function(t,r,u,f){if(null===t[u.uiSelectSort])throw i("sort","Expected a list to sort");var a=f[0],w=f[1],b=angular.extend({axis:"horizontal"},t.$eval(u.uiSelectSortOptions)),v=b.axis,h="dragging",c="dropping",o="dropping-before",s="dropping-after";t.$watch(function(){return a.sortable},function(n){n?r.attr("draggable",!0):r.removeAttr("draggable")});r.on("dragstart",function(n){r.addClass(h);(n.dataTransfer||n.originalEvent.dataTransfer).setData("text",t.$index.toString())});r.on("dragend",function(){e(h)});var y,k=function(n,t){this.splice(t,0,this.splice(n,1)[0])},e=function(n){angular.forEach(a.$element.querySelectorAll("."+n),function(t){angular.element(t).removeClass(n)})},p=function(n){n.preventDefault();var t="vertical"===v?n.offsetY||n.layerY||(n.originalEvent?n.originalEvent.offsetY:0):n.offsetX||n.layerX||(n.originalEvent?n.originalEvent.offsetX:0);t<this["vertical"===v?"offsetHeight":"offsetWidth"]/2?(e(s),r.addClass(o)):(e(o),r.addClass(s))},l=function(t){t.preventDefault();var i=parseInt((t.dataTransfer||t.originalEvent.dataTransfer).getData("text"),10);n.cancel(y);y=n(function(){d(i)},20)},d=function(n){var i=t.$eval(u.uiSelectSort),h=i[n],f=null;f=r.hasClass(o)?n<t.$index?t.$index-1:t.$index:n<t.$index?t.$index:t.$index+1;k.apply(i,[n,f]);w.$setViewValue(Date.now());t.$apply(function(){t.$emit("uiSelectSort:change",{array:i,item:h,from:n,to:f})});e(c);e(o);e(s);r.off("drop",l)};r.on("dragenter",function(){r.hasClass(h)||(r.addClass(c),r.on("dragover",p),r.on("drop",l))});r.on("dragleave",function(n){n.target==r&&(e(c),e(o),e(s),r.off("dragover",p),r.off("drop",l))})}}}]);t.directive("uisOpenClose",["$parse","$timeout",function(n,t){return{restrict:"A",require:"uiSelect",link:function(i,r,u,f){f.onOpenCloseCallback=n(u.uisOpenClose);i.$watch("$select.open",function(n,r){n!==r&&t(function(){f.onOpenCloseCallback(i,{isOpen:n})})})}}}]);t.service("uisRepeatParser",["uiSelectMinErr","$parse",function(n,t){var i=this;i.parse=function(i){var r,u,f,e;if(r=i.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),!r)throw n("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",i);return u=r[5],f="",r[3]&&(u=r[5].replace(/(^\()|(\)$)/g,""),e=r[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/),e&&e[1].trim()&&(f=e[1],u=u.replace(f,""))),{itemName:r[4]||r[2],keyName:r[3],source:t(u),filters:f,trackByExp:r[6],modelMapper:t(r[1]||r[4]||r[2]),repeatExpression:function(n){var t=this.itemName+" in "+(n?"$group.items":"$select.items");return this.trackByExp&&(t+=" track by "+this.trackByExp),t}}};i.getGroupNgRepeatExpression=function(){return"$group in $select.groups track by $group.name"}}])}();angular.module("ui.select").run(["$templateCache",function(n){n.put("bootstrap/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu" ng-show="$select.open && $select.items.length > 0"><li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}"><div class="divider" ng-show="$select.isGrouped && $index > 0"><\/div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"><\/div><div ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option"><span class="ui-select-choices-row-inner"><\/span><\/div><\/li><\/ul>');n.put("bootstrap/match-multiple.tpl.html",'<span class="ui-select-match"><span ng-repeat="$item in $select.selected track by $index"><span class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&nbsp;&times;<\/span> <span uis-transclude-append=""><\/span><\/span><\/span><\/span>');n.put("bootstrap/match.tpl.html",'<div class="ui-select-match" ng-hide="$select.open && $select.searchEnabled" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}<\/span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""><\/span> <i class="caret pull-right" ng-click="$select.toggle($event)"><\/i> <a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="glyphicon glyphicon-remove" aria-hidden="true"><\/i><\/a><\/span><\/div>');n.put("bootstrap/no-choice.tpl.html",'<ul class="ui-select-no-choice dropdown-menu" ng-show="$select.items.length == 0"><li ng-transclude=""><\/li><\/ul>');n.put("bootstrap/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"><\/div><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-expanded="{{$select.open}}" aria-label="{{$select.baseTitle}}" ng-class="{\'spinner\': $select.refreshing}" ondrop="return false;"><\/div><div class="ui-select-choices"><\/div><div class="ui-select-no-choice"><\/div><\/div>');n.put("bootstrap/select.tpl.html",'<div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"><\/div><span ng-show="$select.open && $select.refreshing && $select.spinnerEnabled" class="ui-select-refreshing {{$select.spinnerClass}}"><\/span> <input type="search" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" class="form-control ui-select-search" ng-class="{ \'ui-select-search-hidden\' : !$select.searchEnabled }" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.open"><div class="ui-select-choices"><\/div><div class="ui-select-no-choice"><\/div><\/div>');n.put("select2/choices.tpl.html",'<ul tabindex="-1" class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind="$group.name"><\/div><ul id="ui-select-choices-{{ $select.generatedId }}" ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li role="option" ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"><\/div><\/li><\/ul><\/li><\/ul>');n.put("select2/match-multiple.tpl.html",'<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected track by $index" ng-class="{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span uis-transclude-append=""><\/span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"><\/a><\/li><\/span>');n.put("select2/match.tpl.html",'<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.toggle($event)" aria-label="{{ $select.baseTitle }} select"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}<\/span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""><\/span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.clear($event)"><\/abbr> <span class="select2-arrow ui-select-toggle"><b><\/b><\/span><\/a>');n.put("select2/no-choice.tpl.html",'<div class="ui-select-no-choice dropdown" ng-show="$select.items.length == 0"><div class="dropdown-content"><div data-selectable="" ng-transclude=""><\/div><\/div><\/div>');n.put("select2/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"><\/span><li class="select2-search-field"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="select2-input ui-select-search" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;" ondrop="return false;"><\/li><\/ul><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open || $select.items.length === 0}"><div class="ui-select-choices"><\/div><\/div><\/div>');n.put("select2/select.tpl.html",'<div class="ui-select-container select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"><\/div><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="search-container" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled, \'select2-search\':$select.searchEnabled}"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" ng-class="{\'select2-active\': $select.refreshing}" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" class="ui-select-search select2-input" ng-model="$select.search"><\/div><div class="ui-select-choices"><\/div><div class="ui-select-no-choice"><\/div><\/div><\/div>');n.put("selectize/choices.tpl.html",'<div ng-show="$select.open" class="ui-select-choices ui-select-dropdown selectize-dropdown" ng-class="{\'single\': !$select.multiple, \'multi\': $select.multiple}"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind="$group.name"><\/div><div role="option" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""><\/div><\/div><\/div><\/div><\/div>');n.put("selectize/match-multiple.tpl.html",'<div class="ui-select-match" data-value="" ng-repeat="$item in $select.selected track by $index" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'active\':$selectMultiple.activeMatchIndex === $index}" ui-select-sort="$select.selected"><span class="ui-select-match-item" ng-class="{\'select-locked\':$select.isLocked(this, $index)}"><span uis-transclude-append=""><\/span> <span class="remove ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&times;<\/span><\/span><\/div>');n.put("selectize/match.tpl.html",'<div ng-hide="$select.searchEnabled && ($select.open || $select.isEmpty())" class="ui-select-match"><span ng-show="!$select.searchEnabled && ($select.isEmpty() || $select.open)" class="ui-select-placeholder text-muted">{{$select.placeholder}}<\/span> <span ng-hide="$select.isEmpty() || $select.open" ng-transclude=""><\/span><\/div>');n.put("selectize/no-choice.tpl.html",'<div class="ui-select-no-choice selectize-dropdown" ng-show="$select.items.length == 0"><div class="selectize-dropdown-content"><div data-selectable="" ng-transclude=""><\/div><\/div><\/div>');n.put("selectize/select-multiple.tpl.html",'<div class="ui-select-container selectize-control multi plugin-remove_button" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()"><div class="ui-select-match"><\/div><input type="search" autocomplete="off" tabindex="-1" class="ui-select-search" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled}" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-model="$select.search" ng-disabled="$select.disabled" aria-expanded="{{$select.open}}" aria-label="{{ $select.baseTitle }}" ondrop="return false;"><\/div><div class="ui-select-choices"><\/div><div class="ui-select-no-choice"><\/div><\/div>');n.put("selectize/select.tpl.html",'<div class="ui-select-container selectize-control single" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()"><div class="ui-select-match"><\/div><input type="search" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled}" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="!$select.isEmpty() && !$select.open" ng-disabled="$select.disabled" aria-label="{{ $select.baseTitle }}"><\/div><div class="ui-select-choices"><\/div><div class="ui-select-no-choice"><\/div><\/div>')}])