//>>built define("xace/views/Editor","dcl/dcl xide/types xide/utils xaction/ActionProvider xace/views/ACEEditor xace/views/_Actions xaction/Toolbar xide/mixins/PersistenceMixin".split(" "),function(g,k,e,m,n,l,p,h){h=g([h.dcl],{declaredClass:"xace.views.EditorPersistence",defaultPrefenceTheme:"idle_fingers",defaultPrefenceFontSize:14,saveValueInPreferences:!0,getDefaultPreferences:function(){return e.mixin({theme:this.defaultPrefenceTheme,fontSize:this.defaultPrefenceFontSize},this.saveValueInPreferences?{value:this.get("value")}: null)},onAfterAction:function(a){var b=this.getEditor().getTheme();this.savePreferences({theme:b.replace("ace/theme/",""),fontSize:this.getEditor().getFontSize()});return this.inherited(arguments)},toPreferenceId:function(a){if(!a){var b=$("body");a="xTheme-";var d;_.each(["blue","gray","white","transparent"],function(c){d=a+c;b.hasClass(d)&&(a=d)})}return(a||this.cookiePrefix||"")+"_xace"},getDefaultOptions:function(){var a=this.inherited(arguments),b=this.loadPreferences(null);b&&e.mixin(a,b)|| this.savePreferences(this.getDefaultPreferences());return a}});g=g([l,n,m.dcl,h,p.dcl],{toolbarArgs:{actionFilter:{}},getBreadcrumbPath:function(){if(this.item)return{path:e.replaceAll("/","",this.item.mount)+":/"+this.item.path.replace("./","/")}},tabOrder:{Home:100,View:50,Settings:20},menuOrder:{File:110,Edit:100,View:90,Block:50,Settings:20,Navigation:10,Editor:9,Step:5,New:4,Window:3,Help:2},declaredClass:"xace/views/Editor",options:null,loadingIcon:"fa-spinner fa-spin",iconClassNormal:"fa-code", templateString:'\x3cdiv attachTo\x3d"template" class\x3d"grid-template widget" style\x3d"width: 100%;height: 100%;overflow: hidden !important;position: relative;padding: 0px;margin: 0px"\x3e\x3cdiv attachTo\x3d"header" class\x3d"view-header row bg-opaque" style\x3d"height: auto;width:inherit;height:auto;min-height: 33px"\x3e\x3c/div\x3e\x3cdiv attachTo\x3d"aceNode" class\x3d"view-body row" style\x3d"height:100%;width: 100%;position: relative;"\x3e\x3c/div\x3e\x3cdiv attachTo\x3d"footer" class\x3d"view-footer" style\x3d"position: absolute;bottom: 0px;width: 100%"\x3e\x3c/div\x3e\x3c/div\x3e', getContent:function(a,b,d){this.storeDelegate?this.storeDelegate.getContent(function(a){b(a)},a||this.item):d&&d("Editor::getContent : Have no store delegate!")},saveContent:function(a,b,d){var c=this;this.set("iconClass","fa-spinner fa-spin");var f=a||this.get("value");if(this.storeDelegate)return this.storeDelegate.saveContent(f,function(){c.set("iconClass",c.iconClassNormal);c.lastSavedContent=f;c.onContentChange(f);c.publish(k.EVENTS.ON_FILE_CONTENT_CHANGED,{path:c.options.filePath,item:c.item, content:f,editor:c},c)},null,c.item);d&&d("Editor::saveContent : Have no store delegate!");return!1},addCommands:function(){var a=this.getAce(),b=this;ace.require("ace/config").init();var d=[];this.hasHelp&&d.push({name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(a){b.showHelp(a)}});this.hasConsole&&d.push({name:"gotoline",bindKey:{win:"Ctrl-L",mac:"Command-L"},exec:function(a,b){if("object"==typeof b){var c=this.name+" "+a.getCursorPosition().row;a.cmdLine.setValue(c, 1);a.cmdLine.focus()}else b=parseInt(b,10),isNaN(b)||a.gotoLine(b)},readOnly:!0});a.commands.addCommands(d)},getWebRoot:function(){return this.ctx.getResourceManager().getVariable(k.RESOURCE_VARIABLES.APP_URL)},resize:function(){return this._resize()},onResize:function(){return this._resize()},_resize:function(){var a=this.getParent();this._isMaximized?e.resizeTo(this,this._maximizeContainer,!0,!0):a&&e.resizeTo(this,a,!0,!0);var a=this.getToolbar(),b=!1,d=$(this.aceNode);this._isMaximized&&a&&e.resizeTo(a, this.header,!0,!0);!a||a&&a.isEmpty()?b=!0:a&&(e.resizeTo(a,this.header,!1,!0),a.resize(),e.resizeTo(this.header,a,!0,!1));var c=$(this.domNode).height(),b=1==b?0:$(this.header).height(),f=$(this.footer).height(),c=c-b-f;a&&(c-=4);50