// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.editor.pool');
goog.require('cljs.core');
goog.require('lt.util.cljs');
goog.require('lt.objs.app');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.files');
goog.require('lt.util.dom');
goog.require('lt.objs.popup');
goog.require('lt.objs.popup');
goog.require('lt.objs.notifos');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('clojure.string');
goog.require('lt.objs.canvas');
goog.require('lt.util.cljs');
goog.require('lt.objs.files');
goog.require('lt.objs.app');
goog.require('clojure.string');
goog.require('lt.objs.editor');
goog.require('lt.objs.canvas');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.editor');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.document');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.document');
lt.objs.editor.pool.get_all = (function get_all(){return lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679));
});
lt.objs.editor.pool.__BEH__theme_changed = (function __BEH__theme_changed(this$,theme){var seq__11268 = cljs.core.seq.call(null,lt.objs.editor.pool.get_all.call(null));var chunk__11270 = null;var count__11271 = 0;var i__11272 = 0;while(true){
if((i__11272 < count__11271))
{var ed = cljs.core._nth.call(null,chunk__11270,i__11272);var e_11274 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_11274,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"theme","theme",1124231483),theme], null));
{
var G__11275 = seq__11268;
var G__11276 = chunk__11270;
var G__11277 = count__11271;
var G__11278 = (i__11272 + 1);
seq__11268 = G__11275;
chunk__11270 = G__11276;
count__11271 = G__11277;
i__11272 = G__11278;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11268);if(temp__4092__auto__)
{var seq__11268__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11268__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11268__$1);{
var G__11279 = cljs.core.chunk_rest.call(null,seq__11268__$1);
var G__11280 = c__4262__auto__;
var G__11281 = cljs.core.count.call(null,c__4262__auto__);
var G__11282 = 0;
seq__11268 = G__11279;
chunk__11270 = G__11280;
count__11271 = G__11281;
i__11272 = G__11282;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__11268__$1);var e_11283 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_11283,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"theme","theme",1124231483),theme], null));
{
var G__11284 = cljs.core.next.call(null,seq__11268__$1);
var G__11285 = null;
var G__11286 = 0;
var G__11287 = 0;
seq__11268 = G__11284;
chunk__11270 = G__11285;
count__11271 = G__11286;
i__11272 = G__11287;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","theme-changed","lt.objs.editor.pool/theme-changed",3228173365),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__theme_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"theme-change","theme-change",2937690022),null], null), null));
lt.objs.editor.pool.__BEH__line_numbers_changed = (function __BEH__line_numbers_changed(this$,numbers_QMARK_){var seq__11294 = cljs.core.seq.call(null,lt.objs.editor.pool.get_all.call(null));var chunk__11296 = null;var count__11297 = 0;var i__11298 = 0;while(true){
if((i__11298 < count__11297))
{var ed = cljs.core._nth.call(null,chunk__11296,i__11298);var e_11300 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_11300,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"lineNumbers","lineNumbers",3695398696),numbers_QMARK_], null));
{
var G__11301 = seq__11294;
var G__11302 = chunk__11296;
var G__11303 = count__11297;
var G__11304 = (i__11298 + 1);
seq__11294 = G__11301;
chunk__11296 = G__11302;
count__11297 = G__11303;
i__11298 = G__11304;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11294);if(temp__4092__auto__)
{var seq__11294__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11294__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11294__$1);{
var G__11305 = cljs.core.chunk_rest.call(null,seq__11294__$1);
var G__11306 = c__4262__auto__;
var G__11307 = cljs.core.count.call(null,c__4262__auto__);
var G__11308 = 0;
seq__11294 = G__11305;
chunk__11296 = G__11306;
count__11297 = G__11307;
i__11298 = G__11308;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__11294__$1);var e_11309 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_11309,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"lineNumbers","lineNumbers",3695398696),numbers_QMARK_], null));
{
var G__11310 = cljs.core.next.call(null,seq__11294__$1);
var G__11311 = null;
var G__11312 = 0;
var G__11313 = 0;
seq__11294 = G__11310;
chunk__11296 = G__11311;
count__11297 = G__11312;
i__11298 = G__11313;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","line-numbers-changed","lt.objs.editor.pool/line-numbers-changed",3386463165),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__line_numbers_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"line-numbers-change","line-numbers-change",1971958526),null], null), null));
lt.objs.editor.pool.__BEH__options_changed = (function __BEH__options_changed(this$,opts){var seq__11320 = cljs.core.seq.call(null,lt.objs.editor.pool.get_all.call(null));var chunk__11322 = null;var count__11323 = 0;var i__11324 = 0;while(true){
if((i__11324 < count__11323))
{var ed = cljs.core._nth.call(null,chunk__11322,i__11324);var e_11326 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_11326,opts);
{
var G__11327 = seq__11320;
var G__11328 = chunk__11322;
var G__11329 = count__11323;
var G__11330 = (i__11324 + 1);
seq__11320 = G__11327;
chunk__11322 = G__11328;
count__11323 = G__11329;
i__11324 = G__11330;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11320);if(temp__4092__auto__)
{var seq__11320__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11320__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11320__$1);{
var G__11331 = cljs.core.chunk_rest.call(null,seq__11320__$1);
var G__11332 = c__4262__auto__;
var G__11333 = cljs.core.count.call(null,c__4262__auto__);
var G__11334 = 0;
seq__11320 = G__11331;
chunk__11322 = G__11332;
count__11323 = G__11333;
i__11324 = G__11334;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__11320__$1);var e_11335 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_11335,opts);
{
var G__11336 = cljs.core.next.call(null,seq__11320__$1);
var G__11337 = null;
var G__11338 = 0;
var G__11339 = 0;
seq__11320 = G__11336;
chunk__11322 = G__11337;
count__11323 = G__11338;
i__11324 = G__11339;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","options-changed","lt.objs.editor.pool/options-changed",4573736972),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__options_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"options-changed","options-changed",3471589879),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","pool","lt.objs.editor.pool/pool",1675687809),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.pool","editor.pool",4270620527),null], null), null));
/**
* Return truthy if any editors are currently dirty/unsaved?
*/
lt.objs.editor.pool.unsaved_QMARK_ = (function unsaved_QMARK_(){return cljs.core.some.call(null,(function (p1__11340_SHARP_){return new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__11340_SHARP_));
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
});
/**
* Return editor objects that edit given path
*/
lt.objs.editor.pool.by_path = (function by_path(path){if(cljs.core.truth_(path))
{var path__$1 = clojure.string.lower_case.call(null,path);return cljs.core.filter.call(null,(function (p1__11341_SHARP_){return cljs.core._EQ_.call(null,clojure.string.lower_case.call(null,(function (){var or__3520__auto__ = cljs.core.get.call(null,new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__11341_SHARP_)),new cljs.core.Keyword(null,"path","path",1017337751));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})()),path__$1);
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
} else
{return null;
}
});
/**
* Return editor objects that edit paths containing given path string
*/
lt.objs.editor.pool.containing_path = (function containing_path(path){var path__$1 = clojure.string.lower_case.call(null,path);return cljs.core.filter.call(null,(function (p1__11342_SHARP_){return (clojure.string.lower_case.call(null,(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__11342_SHARP_)));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})()).indexOf(path__$1) > -1);
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
});
/**
* @param {...*} var_args
*/
lt.objs.editor.pool.button = (function() { 
var button__delegate = function (label,p__11343){var vec__11351 = p__11343;var cb = cljs.core.nth.call(null,vec__11351,0,null);var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.button.right","div.button.right",629503503),label], null));var seq__11352_11358 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){if(cljs.core.truth_(cb))
{return cb.call(null);
} else
{return null;
}
})], null)));var chunk__11353_11359 = null;var count__11354_11360 = 0;var i__11355_11361 = 0;while(true){
if((i__11355_11361 < count__11354_11360))
{var vec__11356_11362 = cljs.core._nth.call(null,chunk__11353_11359,i__11355_11361);var ev__3326__auto___11363 = cljs.core.nth.call(null,vec__11356_11362,0,null);var func__3327__auto___11364 = cljs.core.nth.call(null,vec__11356_11362,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11363,func__3327__auto___11364);
{
var G__11365 = seq__11352_11358;
var G__11366 = chunk__11353_11359;
var G__11367 = count__11354_11360;
var G__11368 = (i__11355_11361 + 1);
seq__11352_11358 = G__11365;
chunk__11353_11359 = G__11366;
count__11354_11360 = G__11367;
i__11355_11361 = G__11368;
continue;
}
} else
{var temp__4092__auto___11369 = cljs.core.seq.call(null,seq__11352_11358);if(temp__4092__auto___11369)
{var seq__11352_11370__$1 = temp__4092__auto___11369;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11352_11370__$1))
{var c__4262__auto___11371 = cljs.core.chunk_first.call(null,seq__11352_11370__$1);{
var G__11372 = cljs.core.chunk_rest.call(null,seq__11352_11370__$1);
var G__11373 = c__4262__auto___11371;
var G__11374 = cljs.core.count.call(null,c__4262__auto___11371);
var G__11375 = 0;
seq__11352_11358 = G__11372;
chunk__11353_11359 = G__11373;
count__11354_11360 = G__11374;
i__11355_11361 = G__11375;
continue;
}
} else
{var vec__11357_11376 = cljs.core.first.call(null,seq__11352_11370__$1);var ev__3326__auto___11377 = cljs.core.nth.call(null,vec__11357_11376,0,null);var func__3327__auto___11378 = cljs.core.nth.call(null,vec__11357_11376,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11377,func__3327__auto___11378);
{
var G__11379 = cljs.core.next.call(null,seq__11352_11370__$1);
var G__11380 = null;
var G__11381 = 0;
var G__11382 = 0;
seq__11352_11358 = G__11379;
chunk__11353_11359 = G__11380;
count__11354_11360 = G__11381;
i__11355_11361 = G__11382;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
};
var button = function (label,var_args){
var p__11343 = null;if (arguments.length > 1) {
  p__11343 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return button__delegate.call(this,label,p__11343);};
button.cljs$lang$maxFixedArity = 1;
button.cljs$lang$applyTo = (function (arglist__11383){
var label = cljs.core.first(arglist__11383);
var p__11343 = cljs.core.rest(arglist__11383);
return button__delegate(label,p__11343);
});
button.cljs$core$IFn$_invoke$arity$variadic = button__delegate;
return button;
})()
;
lt.objs.editor.pool.unsaved_prompt = (function unsaved_prompt(on_yes){return lt.objs.popup.popup_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"header","header",4087600639),"You will lose changes.",new cljs.core.Keyword(null,"body","body",1016933652),"If you close now, you'll lose any unsaved changes. Are you sure you want to do that?",new cljs.core.Keyword(null,"buttons","buttons",1255256819),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Discard changes",new cljs.core.Keyword(null,"action","action",3885920680),on_yes], null),lt.objs.popup.cancel_button], null)], null));
});
lt.objs.editor.pool.pool = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.editor.pool","pool","lt.objs.editor.pool/pool",1675687809));
/**
* Return current editor object (last active in pool)
*/
lt.objs.editor.pool.last_active = (function last_active(){var l = new cljs.core.Keyword(null,"last","last",1017218568).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.editor.pool.pool));if(cljs.core.truth_((function (){var and__3508__auto__ = l;if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.deref.call(null,l);
} else
{return and__3508__auto__;
}
})()))
{return l;
} else
{return null;
}
});
lt.objs.editor.pool.focus_last = (function focus_last(){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var temp__4092__auto____$1 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));if(cljs.core.truth_(temp__4092__auto____$1))
{var ed__$1 = temp__4092__auto____$1;lt.util.dom.focus.call(null,document.body);
return lt.objs.editor.focus.call(null,ed__$1);
} else
{return null;
}
} else
{return null;
}
});
lt.objs.editor.pool.__BEH__track_active = (function __BEH__track_active(this$){return lt.object.merge_BANG_.call(null,lt.objs.editor.pool.pool,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"last","last",1017218568),this$], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","track-active","lt.objs.editor.pool/track-active",2411159885),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__track_active,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null), null));
lt.objs.editor.pool.__BEH__stop_close_dirty = (function __BEH__stop_close_dirty(this$){if(cljs.core.truth_(lt.objs.editor.pool.unsaved_QMARK_.call(null)))
{lt.objs.app.prevent_close.call(null);
return lt.objs.editor.pool.unsaved_prompt.call(null,cljs.core.partial.call(null,lt.objs.app.close,true));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","stop-close-dirty","lt.objs.editor.pool/stop-close-dirty",4242047991),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__stop_close_dirty,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close","close",1108660586),null], null), null));
lt.objs.editor.pool.__BEH__stop_reload_dirty = (function __BEH__stop_reload_dirty(this$){if(cljs.core.truth_(lt.objs.editor.pool.unsaved_QMARK_.call(null)))
{lt.objs.app.prevent_close.call(null);
return lt.objs.editor.pool.unsaved_prompt.call(null,lt.objs.app.refresh);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","stop-reload-dirty","lt.objs.editor.pool/stop-reload-dirty",1623651344),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__stop_reload_dirty,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"reload","reload",4374230283),null], null), null));
lt.objs.editor.pool.__BEH__ed_close = (function __BEH__ed_close(this$){if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.objs.editor.pool.unsaved_prompt.call(null,(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"close.force","close.force",4409585383));
}));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"close.force","close.force",4409585383));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","ed-close","lt.objs.editor.pool/ed-close",2078681807),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__ed_close,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close","close",1108660586),null], null), null));
lt.objs.editor.pool.__BEH__focus_last_on_focus = (function __BEH__focus_last_on_focus(this$){return lt.objs.editor.pool.focus_last.call(null);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","focus-last-on-focus","lt.objs.editor.pool/focus-last-on-focus",3578091025),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__focus_last_on_focus,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.editor.pool.reload = (function reload(ed){lt.objs.editor.set_val_and_keep_cursor.call(null,ed,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))));
lt.objs.document.update_stats.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))));
return lt.object.merge_BANG_.call(null,ed,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"dirty","dirty",1109497668),false], null));
});
lt.objs.editor.pool.__BEH__watched__DOT__update = (function __BEH__watched__DOT__update(ws,f,stat){if(cljs.core.truth_(lt.objs.files.file_QMARK_.call(null,f)))
{var temp__4092__auto__ = cljs.core.first.call(null,lt.objs.editor.pool.by_path.call(null,f));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;if(lt.objs.document.check_mtime.call(null,lt.objs.document.__GT_stats.call(null,f),stat))
{return null;
} else
{if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))
{return null;
} else
{return lt.objs.editor.pool.reload.call(null,ed);
}
}
} else
{return null;
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","watched.update","lt.objs.editor.pool/watched.update",2487517840),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__watched__DOT__update,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watched.update","watched.update",1262966907),null], null), null));
lt.objs.editor.pool.set_syntax = (function set_syntax(ed,new_syn){var prev_info = new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));if(cljs.core.truth_(prev_info))
{lt.object.remove_tags.call(null,ed,new cljs.core.Keyword(null,"tags","tags",1017456523).cljs$core$IFn$_invoke$arity$1(prev_info));
} else
{}
lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.merge,cljs.core.dissoc.call(null,new_syn,new cljs.core.Keyword(null,"name","name",1017277949)));
lt.objs.editor.set_mode.call(null,ed,new cljs.core.Keyword(null,"mime","mime",1017255846).cljs$core$IFn$_invoke$arity$1(new_syn));
return lt.object.add_tags.call(null,ed,new cljs.core.Keyword(null,"tags","tags",1017456523).cljs$core$IFn$_invoke$arity$1(new_syn));
});
lt.objs.editor.pool.set_syntax_by_path = (function set_syntax_by_path(ed,path){return lt.objs.editor.pool.set_syntax.call(null,ed,lt.objs.files.path__GT_type.call(null,path));
});
lt.objs.editor.pool.__BEH__watched__DOT__delete = (function __BEH__watched__DOT__delete(ws,del){var editors = (function (){var or__3520__auto__ = cljs.core.seq.call(null,lt.objs.editor.pool.by_path.call(null,del));if(or__3520__auto__)
{return or__3520__auto__;
} else
{return cljs.core.filter.call(null,((function (or__3520__auto__){
return (function (p1__11384_SHARP_){var temp__4090__auto__ = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__11384_SHARP_)));if(cljs.core.truth_(temp__4090__auto__))
{var path = temp__4090__auto__;return cljs.core._EQ_.call(null,0,path.indexOf([cljs.core.str(del),cljs.core.str(lt.objs.files.separator)].join('')));
} else
{return false;
}
});})(or__3520__auto__))
,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
}
})();var seq__11389 = cljs.core.seq.call(null,editors);var chunk__11390 = null;var count__11391 = 0;var i__11392 = 0;while(true){
if((i__11392 < count__11391))
{var ed = cljs.core._nth.call(null,chunk__11390,i__11392);if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))
{} else
{lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"close","close",1108660586));
}
{
var G__11393 = seq__11389;
var G__11394 = chunk__11390;
var G__11395 = count__11391;
var G__11396 = (i__11392 + 1);
seq__11389 = G__11393;
chunk__11390 = G__11394;
count__11391 = G__11395;
i__11392 = G__11396;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11389);if(temp__4092__auto__)
{var seq__11389__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11389__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11389__$1);{
var G__11397 = cljs.core.chunk_rest.call(null,seq__11389__$1);
var G__11398 = c__4262__auto__;
var G__11399 = cljs.core.count.call(null,c__4262__auto__);
var G__11400 = 0;
seq__11389 = G__11397;
chunk__11390 = G__11398;
count__11391 = G__11399;
i__11392 = G__11400;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__11389__$1);if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))
{} else
{lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"close","close",1108660586));
}
{
var G__11401 = cljs.core.next.call(null,seq__11389__$1);
var G__11402 = null;
var G__11403 = 0;
var G__11404 = 0;
seq__11389 = G__11401;
chunk__11390 = G__11402;
count__11391 = G__11403;
i__11392 = G__11404;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","watched.delete","lt.objs.editor.pool/watched.delete",1927206258),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__watched__DOT__delete,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watched.delete","watched.delete",766354781),null], null), null));
lt.objs.editor.pool.__BEH__watched__DOT__rename = (function __BEH__watched__DOT__rename(this$,old,neue){if(cljs.core.truth_(lt.objs.files.file_QMARK_.call(null,old)))
{var temp__4092__auto__ = cljs.core.first.call(null,lt.objs.editor.pool.by_path.call(null,old));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.assoc,new cljs.core.Keyword(null,"path","path",1017337751),neue,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.files.basename.call(null,neue));
lt.objs.document.move_doc.call(null,old,neue);
lt.objs.editor.pool.set_syntax_by_path.call(null,ed,neue);
var temp__4092__auto____$1 = new cljs.core.Keyword("lt.objs.tabs","tabset","lt.objs.tabs/tabset",3378091779).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));if(cljs.core.truth_(temp__4092__auto____$1))
{var ts = temp__4092__auto____$1;return lt.object.raise.call(null,ts,new cljs.core.Keyword(null,"tab.updated","tab.updated",2727558868));
} else
{return null;
}
} else
{return null;
}
} else
{var old_folder = [cljs.core.str(old),cljs.core.str(lt.objs.files.separator)].join('');var open = cljs.core.filter.call(null,((function (old_folder){
return (function (p1__11405_SHARP_){return cljs.core._EQ_.call(null,0,(function (){var or__3520__auto__ = cljs.core.get.call(null,new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__11405_SHARP_)),new cljs.core.Keyword(null,"path","path",1017337751));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})().indexOf(old_folder));
});})(old_folder))
,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));var seq__11412 = cljs.core.seq.call(null,open);var chunk__11414 = null;var count__11415 = 0;var i__11416 = 0;while(true){
if((i__11416 < count__11415))
{var ed = cljs.core._nth.call(null,chunk__11414,i__11416);var neue_path_11418 = clojure.string.replace.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))),old,neue);lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.assoc,new cljs.core.Keyword(null,"path","path",1017337751),neue_path_11418,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.files.basename.call(null,neue_path_11418));
lt.objs.document.move_doc.call(null,old,neue_path_11418);
{
var G__11419 = seq__11412;
var G__11420 = chunk__11414;
var G__11421 = count__11415;
var G__11422 = (i__11416 + 1);
seq__11412 = G__11419;
chunk__11414 = G__11420;
count__11415 = G__11421;
i__11416 = G__11422;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11412);if(temp__4092__auto__)
{var seq__11412__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11412__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11412__$1);{
var G__11423 = cljs.core.chunk_rest.call(null,seq__11412__$1);
var G__11424 = c__4262__auto__;
var G__11425 = cljs.core.count.call(null,c__4262__auto__);
var G__11426 = 0;
seq__11412 = G__11423;
chunk__11414 = G__11424;
count__11415 = G__11425;
i__11416 = G__11426;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__11412__$1);var neue_path_11427 = clojure.string.replace.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))),old,neue);lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.assoc,new cljs.core.Keyword(null,"path","path",1017337751),neue_path_11427,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.files.basename.call(null,neue_path_11427));
lt.objs.document.move_doc.call(null,old,neue_path_11427);
{
var G__11428 = cljs.core.next.call(null,seq__11412__$1);
var G__11429 = null;
var G__11430 = 0;
var G__11431 = 0;
seq__11412 = G__11428;
chunk__11414 = G__11429;
count__11415 = G__11430;
i__11416 = G__11431;
continue;
}
}
} else
{return null;
}
}
break;
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","watched.rename","lt.objs.editor.pool/watched.rename",1794081507),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__watched__DOT__rename,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"rename","rename",4374276784),null,new cljs.core.Keyword(null,"watched.rename","watched.rename",1167218416),null], null), null));
/**
* Create a :lt.objs.editor/editor object with given info map and add it to current pool
*/
lt.objs.editor.pool.create = (function create(info){var ed = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.editor","editor","lt.objs.editor/editor",3793959614),info);lt.object.add_tags.call(null,ed,new cljs.core.Keyword(null,"tags","tags",1017456523).cljs$core$IFn$_invoke$arity$2(info,cljs.core.PersistentVector.EMPTY));
lt.object.merge_BANG_.call(null,ed,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.generation","editor.generation",4482163627),lt.objs.editor.__GT_generation.call(null,ed)], null));
lt.object.raise.call(null,lt.objs.editor.pool.pool,new cljs.core.Keyword(null,"create","create",3956577390),ed,info);
lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"create","create",3956577390));
return ed;
});
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"focus-last-editor","focus-last-editor",3007568513),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Focus last active editor",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.editor.pool.focus_last.call(null);
})], null));
lt.objs.editor.pool.syntax_selector = lt.objs.sidebar.command.filter_list.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"items","items",1114430258),(function (){return cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"name","name",1017277949),cljs.core.vals.call(null,new cljs.core.Keyword(null,"types","types",1124748267).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.files.files_obj))));
}),new cljs.core.Keyword(null,"key","key",1014010321),new cljs.core.Keyword(null,"name","name",1017277949),new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Syntax"], null));
lt.objs.editor.pool.__BEH__set_syntax = (function __BEH__set_syntax(this$,v){return lt.objs.sidebar.command.exec_active_BANG_.call(null,v);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","set-syntax","lt.objs.editor.pool/set-syntax",1300555571),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__set_syntax,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.objs.editor.pool.__BEH__init_syntax_selector = (function __BEH__init_syntax_selector(app){return lt.object.raise.call(null,lt.objs.editor.pool.syntax_selector,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","init-syntax-selector","lt.objs.editor.pool/init-syntax-selector",4625833809),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__init_syntax_selector,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null));
lt.object.add_behavior_BANG_.call(null,lt.objs.editor.pool.syntax_selector,new cljs.core.Keyword("lt.objs.editor.pool","set-syntax","lt.objs.editor.pool/set-syntax",1300555571));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"set-syntax","set-syntax",2718399264),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Set current editor syntax",new cljs.core.Keyword(null,"options","options",4059396624),lt.objs.editor.pool.syntax_selector,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (syn){var temp__4090__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4090__auto__))
{var last = temp__4090__auto__;return lt.objs.editor.pool.set_syntax.call(null,last,syn);
} else
{return lt.objs.notifos.set_msg_BANG_.call(null,"Set syntax requires an active editor");
}
})], null));
lt.objs.editor.pool.__BEH__line_comment_options = (function __BEH__line_comment_options(this$,options){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.editor.pool","comment-options","lt.objs.editor.pool/comment-options",1136977589),options], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","line-comment-options","lt.objs.editor.pool/line-comment-options",1061500094),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__line_comment_options,new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Set options for line commenting",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"map",new cljs.core.Keyword(null,"example","example",3985900764),"{:indent true}"], null)], null),new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"object.instant","object.instant",773332388),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"user","user",1017503549));
lt.objs.editor.pool.do_commenting = (function do_commenting(commenting_fn){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;var from = lt.objs.editor.__GT_cursor.call(null,cur,"start");var to = (cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null,cur))?lt.objs.editor.__GT_cursor.call(null,cur,"end"):from);var options = new cljs.core.Keyword("lt.objs.editor.pool","comment-options","lt.objs.editor.pool/comment-options",1136977589).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur));return commenting_fn.call(null,cur,from,to,options);
} else
{return null;
}
});
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"comment-selection","comment-selection",4639099664),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Comment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.line_comment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"block-comment-selection","block-comment-selection",3383649744),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Block Comment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.block_comment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"uncomment-selection","uncomment-selection",2316362135),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Uncomment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.uncomment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"toggle-comment-selection","toggle-comment-selection",4499822807),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Toggle comment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.toggle_comment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"indent-selection","indent-selection",4336275741),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Indent line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;var line = new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null,cur,"start"));if(cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null,cur)))
{return lt.objs.editor.indent_selection.call(null,cur,"add");
} else
{return lt.objs.editor.indent_line.call(null,cur,line,"add");
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"unindent-selection","unindent-selection",2183138742),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Unindent line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;var line = new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null,cur,"start"));if(cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null,cur)))
{return lt.objs.editor.indent_selection.call(null,cur,"subtract");
} else
{return lt.objs.editor.indent_line.call(null,cur,line,"subtract");
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"smart-indent-selection","smart-indent-selection",1741810849),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Smart indent line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;return lt.objs.editor.indent_selection.call(null,cur,"smart");
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.selection.clear","editor.selection.clear",1854878812),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Clear selection",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;return lt.objs.editor.move_cursor.call(null,cur,lt.objs.editor.__GT_cursor.call(null,cur));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.select-all","editor.select-all",2519334883),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select all",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.selectAll(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.kill-line","editor.kill-line",891766068),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Kill line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.killLine(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-line","editor.delete-line",3395628871),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.deleteLine(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-line-left","editor.delete-line-left",4635399793),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete line left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delLineLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.doc-start","editor.doc-start",1389615038),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to first line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goDocStart(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.doc-end","editor.doc-end",759533239),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to last line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goDocEnd(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-start","editor.line-start",2900917212),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to start of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineStart(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-start-smart","editor.line-start-smart",944287256),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to first non-whitespace char in the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineStartSmart(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-end","editor.line-end",2110825045),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to end of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineEnd(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-right","editor.line-right",2899671446),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Goto the right of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-left","editor.line-left",658910833),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Goto the left of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-up","editor.line-up",3404593925),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Previous line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineUp(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-down","editor.line-down",658682636),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Next line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineDown(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.page-up","editor.page-up",2424143498),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Page up",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goPageUp(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.page-down","editor.page-down",3338627409),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Page down",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goPageDown(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.char-left","editor.char-left",4017821775),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one character",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goCharLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.char-right","editor.char-right",3946695544),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one character",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goCharRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.column-left","editor.column-left",3682706575),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one column",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goColumnLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.column-right","editor.column-right",2148058936),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one column",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goColumnRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.word-left","editor.word-left",3345093915),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one word",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goWordLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.word-right","editor.word-right",4566968364),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one word",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goWordRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.group-left","editor.group-left",1117568296),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one group",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goGroupLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.group-right","editor.group-right",4233150911),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one group",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goGroupRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-char-left","editor.delete-char-left",3699343439),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete character to the left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delCharBefore(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-char-right","editor.delete-char-right",2663801720),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete character to the right",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delCharAfter(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-word-left","editor.delete-word-left",3026615579),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete word to the left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delWordBefore(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-word-right","editor.delete-word-right",3284074540),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete word to the right",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delWordAfter(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-group-left","editor.delete-group-left",4129641768),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete group to the left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delGroupBefore(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-group-right","editor.delete-group-right",3118148031),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete group to the right",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delGroupAfter(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.transpose-chars","editor.transpose-chars",4274081082),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Transpose characters",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.transposeChars(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.new-line-indent","editor.new-line-indent",3360183529),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Newline and indent",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.newlineAndIndent(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.toggle-overwrite","editor.toggle-overwrite",663200293),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Toggle overwrite",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.toggleOverwrite(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.cut","editor.cut",3751346611),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Cut",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.cut.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.copy","editor.copy",4270233288),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Copy",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.copy.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.paste","editor.paste",3187448388),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Paste",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.paste.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.select-all","editor.select-all",2519334883),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select all",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.select_all.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.select-line","editor.select-line",4732906134),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select line",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectLine");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.force.wrap","editor.force.wrap",4266087424),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Toggle line wrapping in current editor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;if(cljs.core.truth_(lt.objs.editor.option.call(null,ed,"lineWrapping")))
{lt.object.remove_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.wrap","editor.force.wrap",4266087424)], null));
lt.object.add_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.unwrap","editor.force.unwrap",3860426009)], null));
return lt.objs.notifos.set_msg_BANG_.call(null,"Wrapping off",new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"timeout","timeout",3994960083),2000], null));
} else
{lt.object.remove_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.unwrap","editor.force.unwrap",3860426009)], null));
lt.object.add_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.wrap","editor.force.wrap",4266087424)], null));
return lt.objs.notifos.set_msg_BANG_.call(null,"Wrapping on",new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"timeout","timeout",3994960083),2000], null));
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.undo","editor.undo",4270768183),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Undo",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.undo.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.redo","editor.redo",4270670161),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Redo",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.redo.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Execute a CodeMirror command",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function() { 
var G__11432__delegate = function (cmd,args){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var temp__4092__auto____$1 = (CodeMirror.commands[cmd]);if(cljs.core.truth_(temp__4092__auto____$1))
{var command = temp__4092__auto____$1;if(cljs.core._EQ_.call(null,CodeMirror.Pass,cljs.core.apply.call(null,command,lt.objs.editor.__GT_cm_ed.call(null,ed),args)))
{return lt.objs.keyboard.passthrough.call(null);
} else
{return null;
}
} else
{return null;
}
} else
{return null;
}
};
var G__11432 = function (cmd,var_args){
var args = null;if (arguments.length > 1) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return G__11432__delegate.call(this,cmd,args);};
G__11432.cljs$lang$maxFixedArity = 1;
G__11432.cljs$lang$applyTo = (function (arglist__11433){
var cmd = cljs.core.first(arglist__11433);
var args = cljs.core.rest(arglist__11433);
return G__11432__delegate(cmd,args);
});
G__11432.cljs$core$IFn$_invoke$arity$variadic = G__11432__delegate;
return G__11432;
})()
], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.fold-code","editor.fold-code",2976735338),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Fold code at cursor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.fold_code.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.singleSelectionTop","editor.sublime.singleSelectionTop",3543136669),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Set selection to top most cursor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"singleSelectionTop");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.singleSelectionTop","editor.sublime.singleSelectionTop",3543136669),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Clear multiple cursors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"singleSelectionTop");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.insertLineAfter","editor.sublime.insertLineAfter",935888807),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Insert line after",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"insertLineAfter");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.insertLineBefore","editor.sublime.insertLineBefore",2917691320),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Insert line before",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"insertLineBefore");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectNextOccurrence","editor.sublime.selectNextOccurrence",2958133196),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select next occurrence of word",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectNextOccurrence");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectBetweenBrackets","editor.sublime.selectBetweenBrackets",2949510127),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select between brackets",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectBetweenBrackets");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectScope","editor.sublime.selectScope",4149085648),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select scope",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectScope");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.goToBracket","editor.sublime.goToBracket",3682815165),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Go to bracket",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"goToBracket");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.swapLineUp","editor.sublime.swapLineUp",3809639470),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Swap line up",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"swapLineUp");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.swapLineDown","editor.sublime.swapLineDown",3360394741),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Swap line down",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"swapLineDown");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.joinLines","editor.sublime.joinLines",2158627981),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Join lines",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"joinLines");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.duplicateLine","editor.sublime.duplicateLine",3547844919),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Duplicate line",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"duplicateLine");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.sortLines","editor.sublime.sortLines",2640780441),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Sort lines",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"sortLines");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.sortLinesInsensitive","editor.sublime.sortLinesInsensitive",948322012),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Sort lines insensitive",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"sortLinesInsensitive");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectLinesUpward","editor.sublime.selectLinesUpward",3377312626),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select lines upward with multiple cursors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectLinesUpward");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectLinesDownward","editor.sublime.selectLinesDownward",4068276153),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select lines downward with multiple cursors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectLinesDownward");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.splitSelectionByLine","editor.sublime.splitSelectionByLine",1824418217),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Split selection into cursors per line",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"splitSelectionByLine");
})], null));
