// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.settings');
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.tabs');
goog.require('cljs.reader');
goog.require('lt.objs.workspace');
goog.require('lt.objs.notifos');
goog.require('lt.objs.notifos');
goog.require('lt.objs.workspace');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('clojure.string');
goog.require('lt.util.cljs');
goog.require('lt.objs.command');
goog.require('lt.objs.files');
goog.require('lt.objs.app');
goog.require('clojure.string');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('cljs.reader');
goog.require('lt.object');
goog.require('lt.objs.console');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('lt.objs.console');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.command');
goog.require('lt.objs.keyboard');
lt.objs.settings.safe_read = (function safe_read(s,file){if(cljs.core.truth_(s))
{try{return cljs.reader.read_string.call(null,s);
}catch (e11398){var e = e11398;lt.objs.console.error.call(null,[cljs.core.str("Invalid settings file: "),cljs.core.str(file),cljs.core.str("\n"),cljs.core.str(e)].join(''));
return null;
}} else
{return null;
}
});
lt.objs.settings._PLUS_behaviors = (function _PLUS_behaviors(cur,m){return cljs.core.assoc.call(null,cur,new cljs.core.Keyword(null,"+","+",1013904285),cljs.core.reduce.call(null,(function (res,p__11402){var vec__11403 = p__11402;var k = cljs.core.nth.call(null,vec__11403,0,null);var v = cljs.core.nth.call(null,vec__11403,1,null);return cljs.core.update_in.call(null,res,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null),(function (p1__11399_SHARP_){return cljs.core.apply.call(null,cljs.core.conj,(function (){var or__3520__auto__ = p1__11399_SHARP_;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.List.EMPTY;
}
})(),v);
}));
}),new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(cur),m));
});
lt.objs.settings._behaviors = (function _behaviors(cur,m){return cljs.core.assoc.call(null,cur,new cljs.core.Keyword(null,"+","+",1013904285),cljs.core.reduce.call(null,(function (res,p__11410){var vec__11411 = p__11410;var k = cljs.core.nth.call(null,vec__11411,0,null);var v = cljs.core.nth.call(null,vec__11411,1,null);return cljs.core.update_in.call(null,res,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null),(function (p1__11404_SHARP_){return cljs.core.remove.call(null,cljs.core.set.call(null,v),p1__11404_SHARP_);
}));
}),new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(cur),m),new cljs.core.Keyword(null,"-","-",1013904287),cljs.core.reduce.call(null,(function (res,p__11412){var vec__11413 = p__11412;var k = cljs.core.nth.call(null,vec__11413,0,null);var v = cljs.core.nth.call(null,vec__11413,1,null);return cljs.core.update_in.call(null,res,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null),(function (p1__11405_SHARP_){return cljs.core.apply.call(null,cljs.core.conj,(function (){var or__3520__auto__ = p1__11405_SHARP_;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.List.EMPTY;
}
})(),v);
}));
}),new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(cur),m));
});
lt.objs.settings.behavior_diff = (function behavior_diff(p__11414,final$){var map__11416 = p__11414;var map__11416__$1 = ((cljs.core.seq_QMARK_.call(null,map__11416))?cljs.core.apply.call(null,cljs.core.hash_map,map__11416):map__11416);var diff = map__11416__$1;var add = cljs.core.get.call(null,map__11416__$1,new cljs.core.Keyword(null,"+","+",1013904285));var rem = cljs.core.get.call(null,map__11416__$1,new cljs.core.Keyword(null,"-","-",1013904287));if(cljs.core.not.call(null,diff))
{return final$;
} else
{return lt.objs.settings._behaviors.call(null,lt.objs.settings._PLUS_behaviors.call(null,final$,add),rem);
}
});
lt.objs.settings.reverse_diff = (function reverse_diff(p__11417){var map__11419 = p__11417;var map__11419__$1 = ((cljs.core.seq_QMARK_.call(null,map__11419))?cljs.core.apply.call(null,cljs.core.hash_map,map__11419):map__11419);var add = cljs.core.get.call(null,map__11419__$1,new cljs.core.Keyword(null,"+","+",1013904285));var rem = cljs.core.get.call(null,map__11419__$1,new cljs.core.Keyword(null,"-","-",1013904287));return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"+","+",1013904285),rem,new cljs.core.Keyword(null,"-","-",1013904287),add], null);
});
lt.objs.settings.apply_diff = (function apply_diff(diff){var final$ = lt.objs.settings.behavior_diff.call(null,diff,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"+","+",1013904285),cljs.core.deref.call(null,lt.object.tags)], null));return cljs.core.reset_BANG_.call(null,lt.object.tags,new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(final$));
});
lt.objs.settings.keyword__GT_str = (function keyword__GT_str(kw){if((kw instanceof cljs.core.Keyword))
{return cljs.core.subs.call(null,[cljs.core.str(kw)].join(''),1);
} else
{return kw;
}
});
lt.objs.settings.flat_behaviors__GT_map = (function flat_behaviors__GT_map(flat){var adds = (function (){var obj11435 = {};return obj11435;
})();var removes = (function (){var obj11437 = {};return obj11437;
})();var seq__11438_11448 = cljs.core.seq.call(null,flat);var chunk__11440_11449 = null;var count__11441_11450 = 0;var i__11442_11451 = 0;while(true){
if((i__11442_11451 < count__11441_11450))
{var vec__11444_11452 = cljs.core._nth.call(null,chunk__11440_11449,i__11442_11451);var tag_11453 = cljs.core.nth.call(null,vec__11444_11452,0,null);var behavior_11454 = cljs.core.nth.call(null,vec__11444_11452,1,null);var all_11455 = vec__11444_11452;var vec__11445_11456 = ((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,behavior_11454)[0]),"-"))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [removes,cljs.core.subs.call(null,lt.objs.settings.keyword__GT_str.call(null,behavior_11454),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,behavior_11454)], null));var coll_11457 = cljs.core.nth.call(null,vec__11445_11456,0,null);var behavior_11458__$1 = cljs.core.nth.call(null,vec__11445_11456,1,null);var tag_11459__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_11453);if(cljs.core.truth_((coll_11457[tag_11459__$1])))
{} else
{(coll_11457[tag_11459__$1] = []);
}
(coll_11457[tag_11459__$1]).push((((cljs.core.count.call(null,all_11455) > 2))?cljs.core.conj.call(null,cljs.core.seq.call(null,cljs.core.subvec.call(null,all_11455,2)),cljs.core.keyword.call(null,behavior_11458__$1)):cljs.core.keyword.call(null,behavior_11458__$1)));
{
var G__11460 = seq__11438_11448;
var G__11461 = chunk__11440_11449;
var G__11462 = count__11441_11450;
var G__11463 = (i__11442_11451 + 1);
seq__11438_11448 = G__11460;
chunk__11440_11449 = G__11461;
count__11441_11450 = G__11462;
i__11442_11451 = G__11463;
continue;
}
} else
{var temp__4092__auto___11464 = cljs.core.seq.call(null,seq__11438_11448);if(temp__4092__auto___11464)
{var seq__11438_11465__$1 = temp__4092__auto___11464;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11438_11465__$1))
{var c__4262__auto___11466 = cljs.core.chunk_first.call(null,seq__11438_11465__$1);{
var G__11467 = cljs.core.chunk_rest.call(null,seq__11438_11465__$1);
var G__11468 = c__4262__auto___11466;
var G__11469 = cljs.core.count.call(null,c__4262__auto___11466);
var G__11470 = 0;
seq__11438_11448 = G__11467;
chunk__11440_11449 = G__11468;
count__11441_11450 = G__11469;
i__11442_11451 = G__11470;
continue;
}
} else
{var vec__11446_11471 = cljs.core.first.call(null,seq__11438_11465__$1);var tag_11472 = cljs.core.nth.call(null,vec__11446_11471,0,null);var behavior_11473 = cljs.core.nth.call(null,vec__11446_11471,1,null);var all_11474 = vec__11446_11471;var vec__11447_11475 = ((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,behavior_11473)[0]),"-"))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [removes,cljs.core.subs.call(null,lt.objs.settings.keyword__GT_str.call(null,behavior_11473),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,behavior_11473)], null));var coll_11476 = cljs.core.nth.call(null,vec__11447_11475,0,null);var behavior_11477__$1 = cljs.core.nth.call(null,vec__11447_11475,1,null);var tag_11478__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_11472);if(cljs.core.truth_((coll_11476[tag_11478__$1])))
{} else
{(coll_11476[tag_11478__$1] = []);
}
(coll_11476[tag_11478__$1]).push((((cljs.core.count.call(null,all_11474) > 2))?cljs.core.conj.call(null,cljs.core.seq.call(null,cljs.core.subvec.call(null,all_11474,2)),cljs.core.keyword.call(null,behavior_11477__$1)):cljs.core.keyword.call(null,behavior_11477__$1)));
{
var G__11479 = cljs.core.next.call(null,seq__11438_11465__$1);
var G__11480 = null;
var G__11481 = 0;
var G__11482 = 0;
seq__11438_11448 = G__11479;
chunk__11440_11449 = G__11480;
count__11441_11450 = G__11481;
i__11442_11451 = G__11482;
continue;
}
}
} else
{}
}
break;
}
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"+","+",1013904285),cljs.core.js__GT_clj.call(null,adds,new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true),new cljs.core.Keyword(null,"-","-",1013904287),cljs.core.js__GT_clj.call(null,removes,new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true)], null);
});
lt.objs.settings.map__GT_flat_behaviors = (function map__GT_flat_behaviors(behaviors_map){var flat = [];var seq__11521_11559 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(behaviors_map));var chunk__11529_11560 = null;var count__11530_11561 = 0;var i__11531_11562 = 0;while(true){
if((i__11531_11562 < count__11530_11561))
{var vec__11539_11563 = cljs.core._nth.call(null,chunk__11529_11560,i__11531_11562);var tag_11564 = cljs.core.nth.call(null,vec__11539_11563,0,null);var behs_11565 = cljs.core.nth.call(null,vec__11539_11563,1,null);var tag_vec_11566 = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_11564], null);var seq__11533_11567 = cljs.core.seq.call(null,behs_11565);var chunk__11535_11568 = null;var count__11536_11569 = 0;var i__11537_11570 = 0;while(true){
if((i__11537_11570 < count__11536_11569))
{var beh_11571 = cljs.core._nth.call(null,chunk__11535_11568,i__11537_11570);var beh_11572__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11571))?beh_11571:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11571], null));flat.push(cljs.core.into.call(null,tag_vec_11566,beh_11572__$1));
{
var G__11573 = seq__11533_11567;
var G__11574 = chunk__11535_11568;
var G__11575 = count__11536_11569;
var G__11576 = (i__11537_11570 + 1);
seq__11533_11567 = G__11573;
chunk__11535_11568 = G__11574;
count__11536_11569 = G__11575;
i__11537_11570 = G__11576;
continue;
}
} else
{var temp__4092__auto___11577 = cljs.core.seq.call(null,seq__11533_11567);if(temp__4092__auto___11577)
{var seq__11533_11578__$1 = temp__4092__auto___11577;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11533_11578__$1))
{var c__4262__auto___11579 = cljs.core.chunk_first.call(null,seq__11533_11578__$1);{
var G__11580 = cljs.core.chunk_rest.call(null,seq__11533_11578__$1);
var G__11581 = c__4262__auto___11579;
var G__11582 = cljs.core.count.call(null,c__4262__auto___11579);
var G__11583 = 0;
seq__11533_11567 = G__11580;
chunk__11535_11568 = G__11581;
count__11536_11569 = G__11582;
i__11537_11570 = G__11583;
continue;
}
} else
{var beh_11584 = cljs.core.first.call(null,seq__11533_11578__$1);var beh_11585__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11584))?beh_11584:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11584], null));flat.push(cljs.core.into.call(null,tag_vec_11566,beh_11585__$1));
{
var G__11586 = cljs.core.next.call(null,seq__11533_11578__$1);
var G__11587 = null;
var G__11588 = 0;
var G__11589 = 0;
seq__11533_11567 = G__11586;
chunk__11535_11568 = G__11587;
count__11536_11569 = G__11588;
i__11537_11570 = G__11589;
continue;
}
}
} else
{}
}
break;
}
{
var G__11590 = seq__11521_11559;
var G__11591 = chunk__11529_11560;
var G__11592 = count__11530_11561;
var G__11593 = (i__11531_11562 + 1);
seq__11521_11559 = G__11590;
chunk__11529_11560 = G__11591;
count__11530_11561 = G__11592;
i__11531_11562 = G__11593;
continue;
}
} else
{var temp__4092__auto___11594 = cljs.core.seq.call(null,seq__11521_11559);if(temp__4092__auto___11594)
{var seq__11521_11595__$1 = temp__4092__auto___11594;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11521_11595__$1))
{var c__4262__auto___11596 = cljs.core.chunk_first.call(null,seq__11521_11595__$1);{
var G__11597 = cljs.core.chunk_rest.call(null,seq__11521_11595__$1);
var G__11598 = c__4262__auto___11596;
var G__11599 = cljs.core.count.call(null,c__4262__auto___11596);
var G__11600 = 0;
seq__11521_11559 = G__11597;
chunk__11529_11560 = G__11598;
count__11530_11561 = G__11599;
i__11531_11562 = G__11600;
continue;
}
} else
{var vec__11540_11601 = cljs.core.first.call(null,seq__11521_11595__$1);var tag_11602 = cljs.core.nth.call(null,vec__11540_11601,0,null);var behs_11603 = cljs.core.nth.call(null,vec__11540_11601,1,null);var tag_vec_11604 = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_11602], null);var seq__11523_11605 = cljs.core.seq.call(null,behs_11603);var chunk__11525_11606 = null;var count__11526_11607 = 0;var i__11527_11608 = 0;while(true){
if((i__11527_11608 < count__11526_11607))
{var beh_11609 = cljs.core._nth.call(null,chunk__11525_11606,i__11527_11608);var beh_11610__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11609))?beh_11609:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11609], null));flat.push(cljs.core.into.call(null,tag_vec_11604,beh_11610__$1));
{
var G__11611 = seq__11523_11605;
var G__11612 = chunk__11525_11606;
var G__11613 = count__11526_11607;
var G__11614 = (i__11527_11608 + 1);
seq__11523_11605 = G__11611;
chunk__11525_11606 = G__11612;
count__11526_11607 = G__11613;
i__11527_11608 = G__11614;
continue;
}
} else
{var temp__4092__auto___11615__$1 = cljs.core.seq.call(null,seq__11523_11605);if(temp__4092__auto___11615__$1)
{var seq__11523_11616__$1 = temp__4092__auto___11615__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11523_11616__$1))
{var c__4262__auto___11617 = cljs.core.chunk_first.call(null,seq__11523_11616__$1);{
var G__11618 = cljs.core.chunk_rest.call(null,seq__11523_11616__$1);
var G__11619 = c__4262__auto___11617;
var G__11620 = cljs.core.count.call(null,c__4262__auto___11617);
var G__11621 = 0;
seq__11523_11605 = G__11618;
chunk__11525_11606 = G__11619;
count__11526_11607 = G__11620;
i__11527_11608 = G__11621;
continue;
}
} else
{var beh_11622 = cljs.core.first.call(null,seq__11523_11616__$1);var beh_11623__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11622))?beh_11622:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11622], null));flat.push(cljs.core.into.call(null,tag_vec_11604,beh_11623__$1));
{
var G__11624 = cljs.core.next.call(null,seq__11523_11616__$1);
var G__11625 = null;
var G__11626 = 0;
var G__11627 = 0;
seq__11523_11605 = G__11624;
chunk__11525_11606 = G__11625;
count__11526_11607 = G__11626;
i__11527_11608 = G__11627;
continue;
}
}
} else
{}
}
break;
}
{
var G__11628 = cljs.core.next.call(null,seq__11521_11595__$1);
var G__11629 = null;
var G__11630 = 0;
var G__11631 = 0;
seq__11521_11559 = G__11628;
chunk__11529_11560 = G__11629;
count__11530_11561 = G__11630;
i__11531_11562 = G__11631;
continue;
}
}
} else
{}
}
break;
}
var seq__11541_11632 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(behaviors_map));var chunk__11548_11633 = null;var count__11549_11634 = 0;var i__11550_11635 = 0;while(true){
if((i__11550_11635 < count__11549_11634))
{var vec__11557_11636 = cljs.core._nth.call(null,chunk__11548_11633,i__11550_11635);var tag_11637 = cljs.core.nth.call(null,vec__11557_11636,0,null);var behs_11638 = cljs.core.nth.call(null,vec__11557_11636,1,null);var seq__11551_11639 = cljs.core.seq.call(null,behs_11638);var chunk__11553_11640 = null;var count__11554_11641 = 0;var i__11555_11642 = 0;while(true){
if((i__11555_11642 < count__11554_11641))
{var beh_11643 = cljs.core._nth.call(null,chunk__11553_11640,i__11555_11642);var beh_11644__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11643))?beh_11643:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11643], null));var tag_vec_11645 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_11637,cljs.core.keyword.call(null,[cljs.core.str("-"),cljs.core.str(lt.objs.settings.keyword__GT_str.call(null,cljs.core.first.call(null,beh_11644__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_11645,cljs.core.rest.call(null,beh_11644__$1)));
{
var G__11646 = seq__11551_11639;
var G__11647 = chunk__11553_11640;
var G__11648 = count__11554_11641;
var G__11649 = (i__11555_11642 + 1);
seq__11551_11639 = G__11646;
chunk__11553_11640 = G__11647;
count__11554_11641 = G__11648;
i__11555_11642 = G__11649;
continue;
}
} else
{var temp__4092__auto___11650 = cljs.core.seq.call(null,seq__11551_11639);if(temp__4092__auto___11650)
{var seq__11551_11651__$1 = temp__4092__auto___11650;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11551_11651__$1))
{var c__4262__auto___11652 = cljs.core.chunk_first.call(null,seq__11551_11651__$1);{
var G__11653 = cljs.core.chunk_rest.call(null,seq__11551_11651__$1);
var G__11654 = c__4262__auto___11652;
var G__11655 = cljs.core.count.call(null,c__4262__auto___11652);
var G__11656 = 0;
seq__11551_11639 = G__11653;
chunk__11553_11640 = G__11654;
count__11554_11641 = G__11655;
i__11555_11642 = G__11656;
continue;
}
} else
{var beh_11657 = cljs.core.first.call(null,seq__11551_11651__$1);var beh_11658__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11657))?beh_11657:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11657], null));var tag_vec_11659 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_11637,cljs.core.keyword.call(null,[cljs.core.str("-"),cljs.core.str(lt.objs.settings.keyword__GT_str.call(null,cljs.core.first.call(null,beh_11658__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_11659,cljs.core.rest.call(null,beh_11658__$1)));
{
var G__11660 = cljs.core.next.call(null,seq__11551_11651__$1);
var G__11661 = null;
var G__11662 = 0;
var G__11663 = 0;
seq__11551_11639 = G__11660;
chunk__11553_11640 = G__11661;
count__11554_11641 = G__11662;
i__11555_11642 = G__11663;
continue;
}
}
} else
{}
}
break;
}
{
var G__11664 = seq__11541_11632;
var G__11665 = chunk__11548_11633;
var G__11666 = count__11549_11634;
var G__11667 = (i__11550_11635 + 1);
seq__11541_11632 = G__11664;
chunk__11548_11633 = G__11665;
count__11549_11634 = G__11666;
i__11550_11635 = G__11667;
continue;
}
} else
{var temp__4092__auto___11668 = cljs.core.seq.call(null,seq__11541_11632);if(temp__4092__auto___11668)
{var seq__11541_11669__$1 = temp__4092__auto___11668;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11541_11669__$1))
{var c__4262__auto___11670 = cljs.core.chunk_first.call(null,seq__11541_11669__$1);{
var G__11671 = cljs.core.chunk_rest.call(null,seq__11541_11669__$1);
var G__11672 = c__4262__auto___11670;
var G__11673 = cljs.core.count.call(null,c__4262__auto___11670);
var G__11674 = 0;
seq__11541_11632 = G__11671;
chunk__11548_11633 = G__11672;
count__11549_11634 = G__11673;
i__11550_11635 = G__11674;
continue;
}
} else
{var vec__11558_11675 = cljs.core.first.call(null,seq__11541_11669__$1);var tag_11676 = cljs.core.nth.call(null,vec__11558_11675,0,null);var behs_11677 = cljs.core.nth.call(null,vec__11558_11675,1,null);var seq__11542_11678 = cljs.core.seq.call(null,behs_11677);var chunk__11544_11679 = null;var count__11545_11680 = 0;var i__11546_11681 = 0;while(true){
if((i__11546_11681 < count__11545_11680))
{var beh_11682 = cljs.core._nth.call(null,chunk__11544_11679,i__11546_11681);var beh_11683__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11682))?beh_11682:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11682], null));var tag_vec_11684 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_11676,cljs.core.keyword.call(null,[cljs.core.str("-"),cljs.core.str(lt.objs.settings.keyword__GT_str.call(null,cljs.core.first.call(null,beh_11683__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_11684,cljs.core.rest.call(null,beh_11683__$1)));
{
var G__11685 = seq__11542_11678;
var G__11686 = chunk__11544_11679;
var G__11687 = count__11545_11680;
var G__11688 = (i__11546_11681 + 1);
seq__11542_11678 = G__11685;
chunk__11544_11679 = G__11686;
count__11545_11680 = G__11687;
i__11546_11681 = G__11688;
continue;
}
} else
{var temp__4092__auto___11689__$1 = cljs.core.seq.call(null,seq__11542_11678);if(temp__4092__auto___11689__$1)
{var seq__11542_11690__$1 = temp__4092__auto___11689__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11542_11690__$1))
{var c__4262__auto___11691 = cljs.core.chunk_first.call(null,seq__11542_11690__$1);{
var G__11692 = cljs.core.chunk_rest.call(null,seq__11542_11690__$1);
var G__11693 = c__4262__auto___11691;
var G__11694 = cljs.core.count.call(null,c__4262__auto___11691);
var G__11695 = 0;
seq__11542_11678 = G__11692;
chunk__11544_11679 = G__11693;
count__11545_11680 = G__11694;
i__11546_11681 = G__11695;
continue;
}
} else
{var beh_11696 = cljs.core.first.call(null,seq__11542_11690__$1);var beh_11697__$1 = ((cljs.core.coll_QMARK_.call(null,beh_11696))?beh_11696:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_11696], null));var tag_vec_11698 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_11676,cljs.core.keyword.call(null,[cljs.core.str("-"),cljs.core.str(lt.objs.settings.keyword__GT_str.call(null,cljs.core.first.call(null,beh_11697__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_11698,cljs.core.rest.call(null,beh_11697__$1)));
{
var G__11699 = cljs.core.next.call(null,seq__11542_11690__$1);
var G__11700 = null;
var G__11701 = 0;
var G__11702 = 0;
seq__11542_11678 = G__11699;
chunk__11544_11679 = G__11700;
count__11545_11680 = G__11701;
i__11546_11681 = G__11702;
continue;
}
}
} else
{}
}
break;
}
{
var G__11703 = cljs.core.next.call(null,seq__11541_11669__$1);
var G__11704 = null;
var G__11705 = 0;
var G__11706 = 0;
seq__11541_11632 = G__11703;
chunk__11548_11633 = G__11704;
count__11549_11634 = G__11705;
i__11550_11635 = G__11706;
continue;
}
}
} else
{}
}
break;
}
return cljs.core.vec.call(null,cljs.core.sort_by.call(null,cljs.core.first,cljs.core.js__GT_clj.call(null,flat)));
});
lt.objs.settings.parse_behaviors = (function parse_behaviors(behs,file){if(cljs.core.map_QMARK_.call(null,behs))
{return behs;
} else
{if(cljs.core.vector_QMARK_.call(null,behs))
{return lt.objs.settings.flat_behaviors__GT_map.call(null,behs);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return lt.objs.console.error.call(null,[cljs.core.str("Invalid behaviors file: "),cljs.core.str(file),cljs.core.str(". Behaviors must be either a vector or a map.")].join(''));
} else
{return null;
}
}
}
});
lt.objs.settings.parse_file = (function parse_file(file){return lt.objs.settings.parse_behaviors.call(null,lt.objs.settings.safe_read.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,file)),file),file);
});
lt.objs.settings.pprint_flat_behaviors = (function pprint_flat_behaviors(flat){return [cljs.core.str(new cljs.core.Keyword(null,"str","str",1014018467).cljs$core$IFn$_invoke$arity$1(cljs.core.reduce.call(null,(function (result,cur){var new_tag = cljs.core.first.call(null,cur);return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"str","str",1014018467),[cljs.core.str(new cljs.core.Keyword(null,"str","str",1014018467).cljs$core$IFn$_invoke$arity$1(result)),cljs.core.str(((!(cljs.core._EQ_.call(null,new_tag,new cljs.core.Keyword(null,"tag","tag",1014018828).cljs$core$IFn$_invoke$arity$1(result))))?"\n":null)),cljs.core.str("\n "),cljs.core.str(cljs.core.pr_str.call(null,cur))].join(''),new cljs.core.Keyword(null,"tag","tag",1014018828),new_tag], null);
}),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"tag","tag",1014018828),cljs.core.first.call(null,cljs.core.first.call(null,flat)),new cljs.core.Keyword(null,"str","str",1014018467),"["], null),flat))),cljs.core.str("\n]")].join('');
});
lt.objs.settings.behavior_diffs_in = (function behavior_diffs_in(path){if(cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null,path)))
{return cljs.core.mapv.call(null,lt.objs.settings.parse_file,cljs.core.filter.call(null,(function (p1__11707_SHARP_){return cljs.core._EQ_.call(null,lt.objs.files.ext.call(null,p1__11707_SHARP_),"behaviors");
}),lt.objs.files.full_path_ls.call(null,path)));
} else
{return null;
}
});
lt.objs.settings.load_all = (function load_all(){var final$ = cljs.core.reduce.call(null,(function (fin,cur){return lt.objs.settings.behavior_diff.call(null,cur,fin);
}),cljs.core.PersistentArrayMap.EMPTY,cljs.core.concat.call(null,lt.object.raise_reduce.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"behaviors.diffs.default+","behaviors.diffs.default+",556712841),cljs.core.PersistentVector.EMPTY),lt.object.raise_reduce.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"behaviors.diffs.plugin+","behaviors.diffs.plugin+",2303858461),cljs.core.PersistentVector.EMPTY),lt.object.raise_reduce.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"behaviors.diffs.user+","behaviors.diffs.user+",707208773),cljs.core.PersistentVector.EMPTY)));var ws_diff = new cljs.core.Keyword(null,"ws-behaviors","ws-behaviors",2339346978).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.workspace.current_ws));var final$__$1 = (cljs.core.truth_((function (){var and__3508__auto__ = ws_diff;if(cljs.core.truth_(and__3508__auto__))
{return !(cljs.core.empty_QMARK_.call(null,ws_diff));
} else
{return and__3508__auto__;
}
})())?lt.objs.settings.behavior_diff.call(null,lt.objs.settings.parse_behaviors.call(null,lt.objs.settings.safe_read.call(null,ws_diff,"workspace.behaviors"),"workspace.behaviors"),final$):final$);cljs.core.reset_BANG_.call(null,lt.object.negated_tags,(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(final$__$1);if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.PersistentArrayMap.EMPTY;
}
})());
return cljs.core.reset_BANG_.call(null,lt.object.tags,(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(final$__$1);if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.PersistentArrayMap.EMPTY;
}
})());
});
lt.objs.settings.refresh_all = (function refresh_all(objs){if(cljs.core.not.call(null,cljs.core.seq.call(null,objs)))
{lt.object.raise.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"behaviors.refreshed","behaviors.refreshed",1338765023));
return lt.objs.notifos.done_working.call(null,"Behaviors loaded");
} else
{try{lt.object.refresh_BANG_.call(null,cljs.core.first.call(null,objs));
}catch (e11709){var e_11710 = e11709;lt.objs.console.error.call(null,e_11710);
}return process.nextTick((function (){return refresh_all.call(null,cljs.core.next.call(null,objs));
}));
}
});
lt.objs.settings.refresh_diffed = (function refresh_diffed(diff){return lt.objs.settings.refresh_all.call(null,cljs.core.mapcat.call(null,lt.object.by_tag,cljs.core.concat.call(null,cljs.core.keys.call(null,new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(diff)),cljs.core.keys.call(null,new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(diff)))));
});
lt.objs.settings.__GT_ordered_keystr = (function __GT_ordered_keystr(k){var char$ = ((cljs.core._EQ_.call(null,cljs.core.last.call(null,k),"-"))?"-":cljs.core.last.call(null,clojure.string.split.call(null,k,"-")));return [cljs.core.str(((lt.util.cljs.str_contains_QMARK_.call(null,k,"ctrl"))?"ctrl-":null)),cljs.core.str(((lt.util.cljs.str_contains_QMARK_.call(null,k,"cmd"))?"cmd-":null)),cljs.core.str(((lt.util.cljs.str_contains_QMARK_.call(null,k,"meta"))?"meta-":null)),cljs.core.str(((lt.util.cljs.str_contains_QMARK_.call(null,k,"altgr"))?"altgr-":null)),cljs.core.str(((lt.util.cljs.str_contains_QMARK_.call(null,k,"alt"))?"alt-":null)),cljs.core.str(((lt.util.cljs.str_contains_QMARK_.call(null,k,"shift"))?"shift-":null)),cljs.core.str(char$)].join('');
});
lt.objs.settings.fix_key = (function fix_key(k){var k__$1 = clojure.string.replace.call(null,k,"pmeta",lt.objs.keyboard.meta);var keys = clojure.string.split.call(null,k__$1," ");return cljs.core.reduce.call(null,(function (p1__11711_SHARP_,p2__11712_SHARP_){return [cljs.core.str(p1__11711_SHARP_),cljs.core.str(" "),cljs.core.str(p2__11712_SHARP_)].join('');
}),cljs.core.map.call(null,lt.objs.settings.__GT_ordered_keystr,keys));
});
lt.objs.settings.fix_key_entry = (function fix_key_entry(p__11713){var vec__11715 = p__11713;var k = cljs.core.nth.call(null,vec__11715,0,null);var v = cljs.core.nth.call(null,vec__11715,1,null);return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.settings.fix_key.call(null,k),v], null);
});
lt.objs.settings._PLUS_keys = (function _PLUS_keys(cur,m){return cljs.core.reduce.call(null,(function (res,p__11719){var vec__11720 = p__11719;var k = cljs.core.nth.call(null,vec__11720,0,null);var v = cljs.core.nth.call(null,vec__11720,1,null);return cljs.core.update_in.call(null,res,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null),(function (p1__11716_SHARP_){return cljs.core.into.call(null,(function (){var or__3520__auto__ = p1__11716_SHARP_;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.PersistentArrayMap.EMPTY;
}
})(),cljs.core.map.call(null,lt.objs.settings.fix_key_entry,v));
}));
}),cur,m);
});
lt.objs.settings._keys = (function _keys(cur,m){return cljs.core.reduce.call(null,(function (res,p__11724){var vec__11725 = p__11724;var k = cljs.core.nth.call(null,vec__11725,0,null);var v = cljs.core.nth.call(null,vec__11725,1,null);return cljs.core.update_in.call(null,res,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null),(function (p1__11721_SHARP_){return cljs.core.apply.call(null,cljs.core.dissoc,p1__11721_SHARP_,cljs.core.map.call(null,lt.objs.settings.fix_key,((cljs.core.map_QMARK_.call(null,v))?cljs.core.keys.call(null,v):v)));
}));
}),cur,m);
});
lt.objs.settings.key_diff = (function key_diff(p__11726,final$){var map__11728 = p__11726;var map__11728__$1 = ((cljs.core.seq_QMARK_.call(null,map__11728))?cljs.core.apply.call(null,cljs.core.hash_map,map__11728):map__11728);var add = cljs.core.get.call(null,map__11728__$1,new cljs.core.Keyword(null,"+","+",1013904285));var rem = cljs.core.get.call(null,map__11728__$1,new cljs.core.Keyword(null,"-","-",1013904287));return lt.objs.settings._PLUS_keys.call(null,lt.objs.settings._keys.call(null,final$,rem),add);
});
lt.objs.settings.load_all_keys = (function load_all_keys(){var final$ = cljs.core.reduce.call(null,(function (fin,cur){return lt.objs.settings.key_diff.call(null,cur,fin);
}),cljs.core.PersistentArrayMap.EMPTY,cljs.core.concat.call(null,lt.object.raise_reduce.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"keymap.diffs.default+","keymap.diffs.default+",711992781),cljs.core.PersistentVector.EMPTY),lt.object.raise_reduce.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"keymap.diffs.plugin+","keymap.diffs.plugin+",4109982809),cljs.core.PersistentVector.EMPTY),lt.object.raise_reduce.call(null,lt.objs.app.app,new cljs.core.Keyword(null,"keymap.diffs.user+","keymap.diffs.user+",1410763393),cljs.core.PersistentVector.EMPTY)));return cljs.core.reset_BANG_.call(null,lt.objs.keyboard.keys,final$);
});
lt.objs.settings.__BEH__default_behavior_diffs = (function __BEH__default_behavior_diffs(this$,diffs){return cljs.core.concat.call(null,diffs,lt.objs.settings.behavior_diffs_in.call(null,lt.objs.files.lt_home.call(null,"settings/default/")));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","default-behavior-diffs","lt.objs.settings/default-behavior-diffs",3478385645),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__default_behavior_diffs,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"behaviors.diffs.default+","behaviors.diffs.default+",556712841),null], null), null));
lt.objs.settings.user_plugin_dir = lt.objs.files.lt_user_dir.call(null,"User");
lt.objs.settings.__BEH__user_behavior_diffs = (function __BEH__user_behavior_diffs(this$,diffs){return cljs.core.concat.call(null,diffs,lt.objs.settings.behavior_diffs_in.call(null,lt.objs.settings.user_plugin_dir));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","user-behavior-diffs","lt.objs.settings/user-behavior-diffs",2390870839),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__user_behavior_diffs,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"behaviors.diffs.user+","behaviors.diffs.user+",707208773),null], null), null));
lt.objs.settings.__BEH__initial_behaviors = (function __BEH__initial_behaviors(this$){if(cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null,lt.objs.settings.user_plugin_dir)))
{} else
{lt.objs.files.mkdir.call(null,lt.objs.settings.user_plugin_dir);
}
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"pre-load","pre-load",3967767874));
lt.objs.settings.load_all.call(null);
var seq__11733_11737 = cljs.core.seq.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,lt.object.instances)));var chunk__11734_11738 = null;var count__11735_11739 = 0;var i__11736_11740 = 0;while(true){
if((i__11736_11740 < count__11735_11739))
{var inst_11741 = cljs.core._nth.call(null,chunk__11734_11738,i__11736_11740);lt.object.refresh_BANG_.call(null,inst_11741);
{
var G__11742 = seq__11733_11737;
var G__11743 = chunk__11734_11738;
var G__11744 = count__11735_11739;
var G__11745 = (i__11736_11740 + 1);
seq__11733_11737 = G__11742;
chunk__11734_11738 = G__11743;
count__11735_11739 = G__11744;
i__11736_11740 = G__11745;
continue;
}
} else
{var temp__4092__auto___11746 = cljs.core.seq.call(null,seq__11733_11737);if(temp__4092__auto___11746)
{var seq__11733_11747__$1 = temp__4092__auto___11746;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11733_11747__$1))
{var c__4262__auto___11748 = cljs.core.chunk_first.call(null,seq__11733_11747__$1);{
var G__11749 = cljs.core.chunk_rest.call(null,seq__11733_11747__$1);
var G__11750 = c__4262__auto___11748;
var G__11751 = cljs.core.count.call(null,c__4262__auto___11748);
var G__11752 = 0;
seq__11733_11737 = G__11749;
chunk__11734_11738 = G__11750;
count__11735_11739 = G__11751;
i__11736_11740 = G__11752;
continue;
}
} else
{var inst_11753 = cljs.core.first.call(null,seq__11733_11747__$1);lt.object.refresh_BANG_.call(null,inst_11753);
{
var G__11754 = cljs.core.next.call(null,seq__11733_11747__$1);
var G__11755 = null;
var G__11756 = 0;
var G__11757 = 0;
seq__11733_11737 = G__11754;
chunk__11734_11738 = G__11755;
count__11735_11739 = G__11756;
i__11736_11740 = G__11757;
continue;
}
}
} else
{}
}
break;
}
lt.objs.settings.load_all_keys.call(null);
return lt.objs.keyboard.refresh.call(null);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","initial-behaviors","lt.objs.settings/initial-behaviors",1554007604),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__initial_behaviors,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"pre-init","pre-init",3967677804),null], null), null));
lt.objs.settings.__BEH__load_behaviors = (function __BEH__load_behaviors(this$){lt.objs.notifos.working.call(null,"loading behaviors...");
lt.objs.settings.load_all.call(null);
return lt.objs.settings.refresh_all.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,lt.object.instances)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","load-behaviors","lt.objs.settings/load-behaviors",1077508690),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__load_behaviors,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"behaviors.reload","behaviors.reload",2942796600),null], null), null));
lt.objs.settings.__BEH__eval_settings = (function __BEH__eval_settings(ed){return lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"save","save",1017427183));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","eval-settings","lt.objs.settings/eval-settings",3832502360),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__eval_settings,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"eval.one","eval.one",1173589382),null,new cljs.core.Keyword(null,"eval","eval",1017029646),null], null), null));
lt.objs.settings.__BEH__grab_workspace_behaviors = (function __BEH__grab_workspace_behaviors(workspace,old){var old__$1 = new cljs.core.Keyword(null,"ws-behaviors","ws-behaviors",2339346978).cljs$core$IFn$_invoke$arity$1(old);var old__$2 = ((cljs.core.empty_QMARK_.call(null,old__$1))?null:lt.objs.settings.parse_behaviors.call(null,cljs.reader.read_string.call(null,old__$1),"workspace.behaviors"));var neue = new cljs.core.Keyword(null,"ws-behaviors","ws-behaviors",2339346978).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,workspace));var neue__$1 = ((cljs.core.empty_QMARK_.call(null,neue))?null:lt.objs.settings.parse_behaviors.call(null,cljs.reader.read_string.call(null,neue),"workspace.behaviors"));if(cljs.core.truth_(old__$2))
{lt.objs.settings.apply_diff.call(null,lt.objs.settings.reverse_diff.call(null,old__$2));
lt.objs.settings.refresh_diffed.call(null,old__$2);
} else
{}
if(cljs.core.truth_(neue__$1))
{lt.objs.settings.apply_diff.call(null,neue__$1);
return lt.objs.settings.refresh_diffed.call(null,neue__$1);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","grab-workspace-behaviors","lt.objs.settings/grab-workspace-behaviors",3638576708),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__grab_workspace_behaviors,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"set","set",1014018004),null], null), null));
lt.objs.settings.__BEH__workspace_save = (function __BEH__workspace_save(editor){var map__11759 = cljs.core.deref.call(null,editor).call(null,new cljs.core.Keyword(null,"info","info",1017141280));var map__11759__$1 = ((cljs.core.seq_QMARK_.call(null,map__11759))?cljs.core.apply.call(null,cljs.core.hash_map,map__11759):map__11759);var path = cljs.core.get.call(null,map__11759__$1,new cljs.core.Keyword(null,"path","path",1017337751));var final$ = lt.object.raise_reduce.call(null,editor,new cljs.core.Keyword(null,"save+","save+",1123115456),lt.objs.editor.__GT_val.call(null,editor));lt.object.merge_BANG_.call(null,lt.objs.workspace.current_ws,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"ws-behaviors","ws-behaviors",2339346978),final$], null));
lt.object.merge_BANG_.call(null,editor,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"dirty","dirty",1109497668),false], null));
lt.object.raise.call(null,editor,new cljs.core.Keyword(null,"saved","saved",1123115513));
lt.object.raise.call(null,editor,new cljs.core.Keyword(null,"clean","clean",1108650427));
return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"serialize!","serialize!",4710885555));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","workspace-save","lt.objs.settings/workspace-save",3431155415),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__workspace_save,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"save","save",1017427183),null], null), null));
lt.objs.settings.user_behaviors_path = lt.objs.files.join.call(null,lt.objs.settings.user_plugin_dir,"user.behaviors");
lt.objs.settings.user_keymap_path = lt.objs.files.join.call(null,lt.objs.settings.user_plugin_dir,"user.keymap");
lt.objs.settings.user_cljs_path = lt.objs.files.join.call(null,lt.objs.settings.user_plugin_dir,"src","lt","plugins","user.cljs");
lt.objs.settings.user_plugin_paths = new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, ["user.behaviors","user.keymap","src","project.clj","plugin.edn","user_compiled.js"], null);
lt.objs.settings.__BEH__create_user_plugin = (function __BEH__create_user_plugin(app){var seq__11764 = cljs.core.seq.call(null,lt.objs.settings.user_plugin_paths);var chunk__11765 = null;var count__11766 = 0;var i__11767 = 0;while(true){
if((i__11767 < count__11766))
{var path = cljs.core._nth.call(null,chunk__11765,i__11767);var full_path_11768 = lt.objs.files.join.call(null,lt.objs.settings.user_plugin_dir,path);if(cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null,full_path_11768)))
{} else
{if(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core.contains_QMARK_.call(null,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["user.keymap",null,"user.behaviors",null], null), null),path);if(and__3508__auto__)
{return lt.objs.files.exists_QMARK_.call(null,lt.objs.files.lt_user_dir.call(null,[cljs.core.str("/settings/"),cljs.core.str(path)].join('')));
} else
{return and__3508__auto__;
}
})()))
{lt.objs.files.copy.call(null,lt.objs.files.lt_user_dir.call(null,[cljs.core.str("/settings/"),cljs.core.str(path)].join('')),full_path_11768);
} else
{lt.objs.files.copy.call(null,lt.objs.files.lt_home.call(null,lt.objs.files.join.call(null,"core","User",path)),full_path_11768);
}
}
{
var G__11769 = seq__11764;
var G__11770 = chunk__11765;
var G__11771 = count__11766;
var G__11772 = (i__11767 + 1);
seq__11764 = G__11769;
chunk__11765 = G__11770;
count__11766 = G__11771;
i__11767 = G__11772;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11764);if(temp__4092__auto__)
{var seq__11764__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11764__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11764__$1);{
var G__11773 = cljs.core.chunk_rest.call(null,seq__11764__$1);
var G__11774 = c__4262__auto__;
var G__11775 = cljs.core.count.call(null,c__4262__auto__);
var G__11776 = 0;
seq__11764 = G__11773;
chunk__11765 = G__11774;
count__11766 = G__11775;
i__11767 = G__11776;
continue;
}
} else
{var path = cljs.core.first.call(null,seq__11764__$1);var full_path_11777 = lt.objs.files.join.call(null,lt.objs.settings.user_plugin_dir,path);if(cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null,full_path_11777)))
{} else
{if(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core.contains_QMARK_.call(null,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["user.keymap",null,"user.behaviors",null], null), null),path);if(and__3508__auto__)
{return lt.objs.files.exists_QMARK_.call(null,lt.objs.files.lt_user_dir.call(null,[cljs.core.str("/settings/"),cljs.core.str(path)].join('')));
} else
{return and__3508__auto__;
}
})()))
{lt.objs.files.copy.call(null,lt.objs.files.lt_user_dir.call(null,[cljs.core.str("/settings/"),cljs.core.str(path)].join('')),full_path_11777);
} else
{lt.objs.files.copy.call(null,lt.objs.files.lt_home.call(null,lt.objs.files.join.call(null,"core","User",path)),full_path_11777);
}
}
{
var G__11778 = cljs.core.next.call(null,seq__11764__$1);
var G__11779 = null;
var G__11780 = 0;
var G__11781 = 0;
seq__11764 = G__11778;
chunk__11765 = G__11779;
count__11766 = G__11780;
i__11767 = G__11781;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","create-user-plugin","lt.objs.settings/create-user-plugin",4382856776),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__create_user_plugin,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"create-user-plugin","create-user-plugin",2686594966),null], null), null));
/**
* If the given keymap or behaviors file is in the old map format,
* backs it up and converts it to the flattened vec format.
*/
lt.objs.settings.convert_file = (function convert_file(file){var config = lt.objs.settings.safe_read.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,file)),file);if(cljs.core.map_QMARK_.call(null,config))
{var backup_file = [cljs.core.str(file),cljs.core.str(".bak")].join('');var _ = lt.objs.files.copy.call(null,file,backup_file);var convert_fn = (function (){var G__11783 = lt.objs.files.ext.call(null,file);if(cljs.core._EQ_.call(null,"behaviors",G__11783))
{return lt.objs.settings.map__GT_flat_behaviors;
} else
{if(cljs.core._EQ_.call(null,"keymap",G__11783))
{return lt.objs.settings.map__GT_flat_keymap;
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return cljs.core.identity;
} else
{return null;
}
}
}
})();var body = [cljs.core.str(";; Your file has been converted to the new flat format.\n"),cljs.core.str(";; Conversion does not preserve comments or indentation.\n"),cljs.core.str(";; File is backed up at "),cljs.core.str(backup_file),cljs.core.str("\n"),cljs.core.str(lt.objs.settings.pprint_flat_behaviors.call(null,convert_fn.call(null,config)))].join('');return lt.objs.files.save.call(null,file,body);
} else
{return null;
}
});
lt.objs.settings.__BEH__flatten_map_settings = (function __BEH__flatten_map_settings(app){var seq__11789 = cljs.core.seq.call(null,cljs.core.filter.call(null,(function (p1__11784_SHARP_){return cljs.core.contains_QMARK_.call(null,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["behaviors",null,"keymap",null], null), null),lt.objs.files.ext.call(null,p1__11784_SHARP_));
}),lt.objs.files.full_path_ls.call(null,lt.objs.settings.user_plugin_dir)));var chunk__11790 = null;var count__11791 = 0;var i__11792 = 0;while(true){
if((i__11792 < count__11791))
{var file = cljs.core._nth.call(null,chunk__11790,i__11792);lt.objs.settings.convert_file.call(null,file);
{
var G__11793 = seq__11789;
var G__11794 = chunk__11790;
var G__11795 = count__11791;
var G__11796 = (i__11792 + 1);
seq__11789 = G__11793;
chunk__11790 = G__11794;
count__11791 = G__11795;
i__11792 = G__11796;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__11789);if(temp__4092__auto__)
{var seq__11789__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11789__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__11789__$1);{
var G__11797 = cljs.core.chunk_rest.call(null,seq__11789__$1);
var G__11798 = c__4262__auto__;
var G__11799 = cljs.core.count.call(null,c__4262__auto__);
var G__11800 = 0;
seq__11789 = G__11797;
chunk__11790 = G__11798;
count__11791 = G__11799;
i__11792 = G__11800;
continue;
}
} else
{var file = cljs.core.first.call(null,seq__11789__$1);lt.objs.settings.convert_file.call(null,file);
{
var G__11801 = cljs.core.next.call(null,seq__11789__$1);
var G__11802 = null;
var G__11803 = 0;
var G__11804 = 0;
seq__11789 = G__11801;
chunk__11790 = G__11802;
count__11791 = G__11803;
i__11792 = G__11804;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","flatten-map-settings","lt.objs.settings/flatten-map-settings",824167599),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__flatten_map_settings,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"flatten-map-settings","flatten-map-settings",3992976911),null], null), null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"behaviors.reload","behaviors.reload",2942796600),new cljs.core.Keyword(null,"desc","desc",1016984067),"App: Reload behaviors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,cljs.core.first.call(null,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"app","app",1014001043))),new cljs.core.Keyword(null,"behaviors.reload","behaviors.reload",2942796600));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"keymaps.reload","keymaps.reload",666881155),new cljs.core.Keyword(null,"desc","desc",1016984067),"App: Reload keymaps",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){lt.objs.settings.load_all_keys.call(null);
lt.objs.keyboard.refresh.call(null);
lt.object.raise.call(null,cljs.core.first.call(null,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"app","app",1014001043))),new cljs.core.Keyword(null,"app.keys.load","app.keys.load",3209213061));
return lt.objs.notifos.set_msg_BANG_.call(null,"keys loaded");
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"behaviors.modify-user","behaviors.modify-user",4216959587),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: User behaviors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),lt.objs.settings.user_behaviors_path);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"behaviors.view-default","behaviors.view-default",4722027256),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: Default behaviors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),lt.objs.files.lt_home.call(null,"/settings/default/default.behaviors"));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"behaviors.modify-workspace","behaviors.modify-workspace",1192694945),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: Workspace behaviors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"opener.open-info","opener.open-info",2298471692),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"mime","mime",1017255846),"text/x-clojure",new cljs.core.Keyword(null,"name","name",1017277949),"workspace.behaviors",new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.behaviors","editor.behaviors",2095045778),new cljs.core.Keyword(null,"editor.behaviors.workspace","editor.behaviors.workspace",2607887545)], null),new cljs.core.Keyword(null,"content","content",1965434859),new cljs.core.Keyword(null,"ws-behaviors","ws-behaviors",2339346978).cljs$core$IFn$_invoke$arity$2(cljs.core.deref.call(null,lt.objs.workspace.current_ws),"")], null));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"keymap.modify-user","keymap.modify-user",625546911),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: User keymap",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),lt.objs.settings.user_keymap_path);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"keymap.view-default","keymap.view-default",762416700),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: Default keymap",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),lt.objs.files.lt_home.call(null,"/settings/default/default.keymap"));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"user.modify-user","user.modify-user",581252813),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: User script",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),lt.objs.settings.user_cljs_path);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"user.add-user-plugin-to-workspace","user.add-user-plugin-to-workspace",4324437372),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: Add User plugin to workspace",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"add.folder!","add.folder!",2151595160),lt.objs.settings.user_plugin_dir);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"convert-to-flat-format","convert-to-flat-format",1205600069),new cljs.core.Keyword(null,"desc","desc",1016984067),"Settings: Convert current file to flat format",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.settings.convert_file.call(null,cljs.core.get_in.call(null,cljs.core.deref.call(null,lt.objs.editor.pool.last_active.call(null)),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280),new cljs.core.Keyword(null,"path","path",1017337751)], null)));
})], null));
lt.objs.settings.__BEH__on_close_remove = (function __BEH__on_close_remove(this$){return lt.objs.tabs.rem_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","on-close-remove","lt.objs.settings/on-close-remove",4619688773),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__on_close_remove,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.settings.flat_keymap__GT_map = (function flat_keymap__GT_map(flat){var adds = (function (){var obj11840 = {};return obj11840;
})();var removes = (function (){var obj11842 = {};return obj11842;
})();var seq__11843_11873 = cljs.core.seq.call(null,flat);var chunk__11845_11874 = null;var count__11846_11875 = 0;var i__11847_11876 = 0;while(true){
if((i__11847_11876 < count__11846_11875))
{var vec__11849_11877 = cljs.core._nth.call(null,chunk__11845_11874,i__11847_11876);var tag_11878 = cljs.core.nth.call(null,vec__11849_11877,0,null);var key_11879 = cljs.core.nth.call(null,vec__11849_11877,1,null);var all_11880 = vec__11849_11877;var vec__11850_11881 = (((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,key_11879)[0]),"-")) && ((cljs.core.count.call(null,lt.objs.settings.keyword__GT_str.call(null,key_11879)) > 1)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [removes,cljs.core.subs.call(null,lt.objs.settings.keyword__GT_str.call(null,key_11879),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,key_11879)], null));var coll_11882 = cljs.core.nth.call(null,vec__11850_11881,0,null);var key_11883__$1 = cljs.core.nth.call(null,vec__11850_11881,1,null);var remove_QMARK__11884 = (coll_11882 === removes);var tag_11885__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_11878);if(cljs.core.truth_((coll_11882[tag_11885__$1])))
{} else
{(coll_11882[tag_11885__$1] = ((remove_QMARK__11884)?[]:(function (){var obj11852 = {};return obj11852;
})()));
}
if(remove_QMARK__11884)
{(coll_11882[tag_11885__$1]).push(key_11883__$1);
} else
{((coll_11882[tag_11885__$1])[key_11883__$1] = cljs.core.subvec.call(null,all_11880,2));
}
{
var G__11886 = seq__11843_11873;
var G__11887 = chunk__11845_11874;
var G__11888 = count__11846_11875;
var G__11889 = (i__11847_11876 + 1);
seq__11843_11873 = G__11886;
chunk__11845_11874 = G__11887;
count__11846_11875 = G__11888;
i__11847_11876 = G__11889;
continue;
}
} else
{var temp__4092__auto___11890 = cljs.core.seq.call(null,seq__11843_11873);if(temp__4092__auto___11890)
{var seq__11843_11891__$1 = temp__4092__auto___11890;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11843_11891__$1))
{var c__4262__auto___11892 = cljs.core.chunk_first.call(null,seq__11843_11891__$1);{
var G__11893 = cljs.core.chunk_rest.call(null,seq__11843_11891__$1);
var G__11894 = c__4262__auto___11892;
var G__11895 = cljs.core.count.call(null,c__4262__auto___11892);
var G__11896 = 0;
seq__11843_11873 = G__11893;
chunk__11845_11874 = G__11894;
count__11846_11875 = G__11895;
i__11847_11876 = G__11896;
continue;
}
} else
{var vec__11853_11897 = cljs.core.first.call(null,seq__11843_11891__$1);var tag_11898 = cljs.core.nth.call(null,vec__11853_11897,0,null);var key_11899 = cljs.core.nth.call(null,vec__11853_11897,1,null);var all_11900 = vec__11853_11897;var vec__11854_11901 = (((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,key_11899)[0]),"-")) && ((cljs.core.count.call(null,lt.objs.settings.keyword__GT_str.call(null,key_11899)) > 1)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [removes,cljs.core.subs.call(null,lt.objs.settings.keyword__GT_str.call(null,key_11899),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,key_11899)], null));var coll_11902 = cljs.core.nth.call(null,vec__11854_11901,0,null);var key_11903__$1 = cljs.core.nth.call(null,vec__11854_11901,1,null);var remove_QMARK__11904 = (coll_11902 === removes);var tag_11905__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_11898);if(cljs.core.truth_((coll_11902[tag_11905__$1])))
{} else
{(coll_11902[tag_11905__$1] = ((remove_QMARK__11904)?[]:(function (){var obj11856 = {};return obj11856;
})()));
}
if(remove_QMARK__11904)
{(coll_11902[tag_11905__$1]).push(key_11903__$1);
} else
{((coll_11902[tag_11905__$1])[key_11903__$1] = cljs.core.subvec.call(null,all_11900,2));
}
{
var G__11906 = cljs.core.next.call(null,seq__11843_11891__$1);
var G__11907 = null;
var G__11908 = 0;
var G__11909 = 0;
seq__11843_11873 = G__11906;
chunk__11845_11874 = G__11907;
count__11846_11875 = G__11908;
i__11847_11876 = G__11909;
continue;
}
}
} else
{}
}
break;
}
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"+","+",1013904285),cljs.core.into.call(null,cljs.core.PersistentArrayMap.EMPTY,(function (){var iter__4231__auto__ = (function iter__11857(s__11858){return (new cljs.core.LazySeq(null,(function (){var s__11858__$1 = s__11858;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__11858__$1);if(temp__4092__auto__)
{var s__11858__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__11858__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__11858__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__11860 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__11859 = 0;while(true){
if((i__11859 < size__4230__auto__))
{var vec__11863 = cljs.core._nth.call(null,c__4229__auto__,i__11859);var tag = cljs.core.nth.call(null,vec__11863,0,null);var keys = cljs.core.nth.call(null,vec__11863,1,null);cljs.core.chunk_append.call(null,b__11860,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null,tag),keys], null));
{
var G__11910 = (i__11859 + 1);
i__11859 = G__11910;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__11860),iter__11857.call(null,cljs.core.chunk_rest.call(null,s__11858__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__11860),null);
}
} else
{var vec__11864 = cljs.core.first.call(null,s__11858__$2);var tag = cljs.core.nth.call(null,vec__11864,0,null);var keys = cljs.core.nth.call(null,vec__11864,1,null);return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null,tag),keys], null),iter__11857.call(null,cljs.core.rest.call(null,s__11858__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,cljs.core.js__GT_clj.call(null,adds));
})()),new cljs.core.Keyword(null,"-","-",1013904287),cljs.core.into.call(null,cljs.core.PersistentArrayMap.EMPTY,(function (){var iter__4231__auto__ = (function iter__11865(s__11866){return (new cljs.core.LazySeq(null,(function (){var s__11866__$1 = s__11866;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__11866__$1);if(temp__4092__auto__)
{var s__11866__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__11866__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__11866__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__11868 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__11867 = 0;while(true){
if((i__11867 < size__4230__auto__))
{var vec__11871 = cljs.core._nth.call(null,c__4229__auto__,i__11867);var tag = cljs.core.nth.call(null,vec__11871,0,null);var keys = cljs.core.nth.call(null,vec__11871,1,null);cljs.core.chunk_append.call(null,b__11868,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null,tag),keys], null));
{
var G__11911 = (i__11867 + 1);
i__11867 = G__11911;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__11868),iter__11865.call(null,cljs.core.chunk_rest.call(null,s__11866__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__11868),null);
}
} else
{var vec__11872 = cljs.core.first.call(null,s__11866__$2);var tag = cljs.core.nth.call(null,vec__11872,0,null);var keys = cljs.core.nth.call(null,vec__11872,1,null);return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null,tag),keys], null),iter__11865.call(null,cljs.core.rest.call(null,s__11866__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,cljs.core.js__GT_clj.call(null,removes));
})())], null);
});
lt.objs.settings.map__GT_flat_keymap = (function map__GT_flat_keymap(keymap){var flat = [];var seq__11956_12000 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(keymap));var chunk__11963_12001 = null;var count__11964_12002 = 0;var i__11965_12003 = 0;while(true){
if((i__11965_12003 < count__11964_12002))
{var vec__11972_12004 = cljs.core._nth.call(null,chunk__11963_12001,i__11965_12003);var tag_12005 = cljs.core.nth.call(null,vec__11972_12004,0,null);var keys_12006 = cljs.core.nth.call(null,vec__11972_12004,1,null);var seq__11966_12007 = cljs.core.seq.call(null,keys_12006);var chunk__11968_12008 = null;var count__11969_12009 = 0;var i__11970_12010 = 0;while(true){
if((i__11970_12010 < count__11969_12009))
{var vec__11973_12011 = cljs.core._nth.call(null,chunk__11968_12008,i__11970_12010);var key_12012 = cljs.core.nth.call(null,vec__11973_12011,0,null);var commands_12013 = cljs.core.nth.call(null,vec__11973_12011,1,null);var tag_vec_12014 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12005,key_12012], null);flat.push(cljs.core.into.call(null,tag_vec_12014,commands_12013));
{
var G__12015 = seq__11966_12007;
var G__12016 = chunk__11968_12008;
var G__12017 = count__11969_12009;
var G__12018 = (i__11970_12010 + 1);
seq__11966_12007 = G__12015;
chunk__11968_12008 = G__12016;
count__11969_12009 = G__12017;
i__11970_12010 = G__12018;
continue;
}
} else
{var temp__4092__auto___12019 = cljs.core.seq.call(null,seq__11966_12007);if(temp__4092__auto___12019)
{var seq__11966_12020__$1 = temp__4092__auto___12019;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11966_12020__$1))
{var c__4262__auto___12021 = cljs.core.chunk_first.call(null,seq__11966_12020__$1);{
var G__12022 = cljs.core.chunk_rest.call(null,seq__11966_12020__$1);
var G__12023 = c__4262__auto___12021;
var G__12024 = cljs.core.count.call(null,c__4262__auto___12021);
var G__12025 = 0;
seq__11966_12007 = G__12022;
chunk__11968_12008 = G__12023;
count__11969_12009 = G__12024;
i__11970_12010 = G__12025;
continue;
}
} else
{var vec__11974_12026 = cljs.core.first.call(null,seq__11966_12020__$1);var key_12027 = cljs.core.nth.call(null,vec__11974_12026,0,null);var commands_12028 = cljs.core.nth.call(null,vec__11974_12026,1,null);var tag_vec_12029 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12005,key_12027], null);flat.push(cljs.core.into.call(null,tag_vec_12029,commands_12028));
{
var G__12030 = cljs.core.next.call(null,seq__11966_12020__$1);
var G__12031 = null;
var G__12032 = 0;
var G__12033 = 0;
seq__11966_12007 = G__12030;
chunk__11968_12008 = G__12031;
count__11969_12009 = G__12032;
i__11970_12010 = G__12033;
continue;
}
}
} else
{}
}
break;
}
{
var G__12034 = seq__11956_12000;
var G__12035 = chunk__11963_12001;
var G__12036 = count__11964_12002;
var G__12037 = (i__11965_12003 + 1);
seq__11956_12000 = G__12034;
chunk__11963_12001 = G__12035;
count__11964_12002 = G__12036;
i__11965_12003 = G__12037;
continue;
}
} else
{var temp__4092__auto___12038 = cljs.core.seq.call(null,seq__11956_12000);if(temp__4092__auto___12038)
{var seq__11956_12039__$1 = temp__4092__auto___12038;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11956_12039__$1))
{var c__4262__auto___12040 = cljs.core.chunk_first.call(null,seq__11956_12039__$1);{
var G__12041 = cljs.core.chunk_rest.call(null,seq__11956_12039__$1);
var G__12042 = c__4262__auto___12040;
var G__12043 = cljs.core.count.call(null,c__4262__auto___12040);
var G__12044 = 0;
seq__11956_12000 = G__12041;
chunk__11963_12001 = G__12042;
count__11964_12002 = G__12043;
i__11965_12003 = G__12044;
continue;
}
} else
{var vec__11975_12045 = cljs.core.first.call(null,seq__11956_12039__$1);var tag_12046 = cljs.core.nth.call(null,vec__11975_12045,0,null);var keys_12047 = cljs.core.nth.call(null,vec__11975_12045,1,null);var seq__11957_12048 = cljs.core.seq.call(null,keys_12047);var chunk__11959_12049 = null;var count__11960_12050 = 0;var i__11961_12051 = 0;while(true){
if((i__11961_12051 < count__11960_12050))
{var vec__11976_12052 = cljs.core._nth.call(null,chunk__11959_12049,i__11961_12051);var key_12053 = cljs.core.nth.call(null,vec__11976_12052,0,null);var commands_12054 = cljs.core.nth.call(null,vec__11976_12052,1,null);var tag_vec_12055 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12046,key_12053], null);flat.push(cljs.core.into.call(null,tag_vec_12055,commands_12054));
{
var G__12056 = seq__11957_12048;
var G__12057 = chunk__11959_12049;
var G__12058 = count__11960_12050;
var G__12059 = (i__11961_12051 + 1);
seq__11957_12048 = G__12056;
chunk__11959_12049 = G__12057;
count__11960_12050 = G__12058;
i__11961_12051 = G__12059;
continue;
}
} else
{var temp__4092__auto___12060__$1 = cljs.core.seq.call(null,seq__11957_12048);if(temp__4092__auto___12060__$1)
{var seq__11957_12061__$1 = temp__4092__auto___12060__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11957_12061__$1))
{var c__4262__auto___12062 = cljs.core.chunk_first.call(null,seq__11957_12061__$1);{
var G__12063 = cljs.core.chunk_rest.call(null,seq__11957_12061__$1);
var G__12064 = c__4262__auto___12062;
var G__12065 = cljs.core.count.call(null,c__4262__auto___12062);
var G__12066 = 0;
seq__11957_12048 = G__12063;
chunk__11959_12049 = G__12064;
count__11960_12050 = G__12065;
i__11961_12051 = G__12066;
continue;
}
} else
{var vec__11977_12067 = cljs.core.first.call(null,seq__11957_12061__$1);var key_12068 = cljs.core.nth.call(null,vec__11977_12067,0,null);var commands_12069 = cljs.core.nth.call(null,vec__11977_12067,1,null);var tag_vec_12070 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12046,key_12068], null);flat.push(cljs.core.into.call(null,tag_vec_12070,commands_12069));
{
var G__12071 = cljs.core.next.call(null,seq__11957_12061__$1);
var G__12072 = null;
var G__12073 = 0;
var G__12074 = 0;
seq__11957_12048 = G__12071;
chunk__11959_12049 = G__12072;
count__11960_12050 = G__12073;
i__11961_12051 = G__12074;
continue;
}
}
} else
{}
}
break;
}
{
var G__12075 = cljs.core.next.call(null,seq__11956_12039__$1);
var G__12076 = null;
var G__12077 = 0;
var G__12078 = 0;
seq__11956_12000 = G__12075;
chunk__11963_12001 = G__12076;
count__11964_12002 = G__12077;
i__11965_12003 = G__12078;
continue;
}
}
} else
{}
}
break;
}
var seq__11978_12079 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(keymap));var chunk__11985_12080 = null;var count__11986_12081 = 0;var i__11987_12082 = 0;while(true){
if((i__11987_12082 < count__11986_12081))
{var vec__11994_12083 = cljs.core._nth.call(null,chunk__11985_12080,i__11987_12082);var tag_12084 = cljs.core.nth.call(null,vec__11994_12083,0,null);var keys_12085 = cljs.core.nth.call(null,vec__11994_12083,1,null);var seq__11988_12086 = cljs.core.seq.call(null,keys_12085);var chunk__11990_12087 = null;var count__11991_12088 = 0;var i__11992_12089 = 0;while(true){
if((i__11992_12089 < count__11991_12088))
{var key_12090 = cljs.core._nth.call(null,chunk__11990_12087,i__11992_12089);var vec__11995_12091 = ((cljs.core.map_QMARK_.call(null,keys_12085))?key_12090:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_12090,cljs.core.PersistentVector.EMPTY], null));var key_12092__$1 = cljs.core.nth.call(null,vec__11995_12091,0,null);var command_12093 = cljs.core.nth.call(null,vec__11995_12091,1,null);var tag_vec_12094 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12084,[cljs.core.str("-"),cljs.core.str(key_12092__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_12094,command_12093));
{
var G__12095 = seq__11988_12086;
var G__12096 = chunk__11990_12087;
var G__12097 = count__11991_12088;
var G__12098 = (i__11992_12089 + 1);
seq__11988_12086 = G__12095;
chunk__11990_12087 = G__12096;
count__11991_12088 = G__12097;
i__11992_12089 = G__12098;
continue;
}
} else
{var temp__4092__auto___12099 = cljs.core.seq.call(null,seq__11988_12086);if(temp__4092__auto___12099)
{var seq__11988_12100__$1 = temp__4092__auto___12099;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11988_12100__$1))
{var c__4262__auto___12101 = cljs.core.chunk_first.call(null,seq__11988_12100__$1);{
var G__12102 = cljs.core.chunk_rest.call(null,seq__11988_12100__$1);
var G__12103 = c__4262__auto___12101;
var G__12104 = cljs.core.count.call(null,c__4262__auto___12101);
var G__12105 = 0;
seq__11988_12086 = G__12102;
chunk__11990_12087 = G__12103;
count__11991_12088 = G__12104;
i__11992_12089 = G__12105;
continue;
}
} else
{var key_12106 = cljs.core.first.call(null,seq__11988_12100__$1);var vec__11996_12107 = ((cljs.core.map_QMARK_.call(null,keys_12085))?key_12106:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_12106,cljs.core.PersistentVector.EMPTY], null));var key_12108__$1 = cljs.core.nth.call(null,vec__11996_12107,0,null);var command_12109 = cljs.core.nth.call(null,vec__11996_12107,1,null);var tag_vec_12110 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12084,[cljs.core.str("-"),cljs.core.str(key_12108__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_12110,command_12109));
{
var G__12111 = cljs.core.next.call(null,seq__11988_12100__$1);
var G__12112 = null;
var G__12113 = 0;
var G__12114 = 0;
seq__11988_12086 = G__12111;
chunk__11990_12087 = G__12112;
count__11991_12088 = G__12113;
i__11992_12089 = G__12114;
continue;
}
}
} else
{}
}
break;
}
{
var G__12115 = seq__11978_12079;
var G__12116 = chunk__11985_12080;
var G__12117 = count__11986_12081;
var G__12118 = (i__11987_12082 + 1);
seq__11978_12079 = G__12115;
chunk__11985_12080 = G__12116;
count__11986_12081 = G__12117;
i__11987_12082 = G__12118;
continue;
}
} else
{var temp__4092__auto___12119 = cljs.core.seq.call(null,seq__11978_12079);if(temp__4092__auto___12119)
{var seq__11978_12120__$1 = temp__4092__auto___12119;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11978_12120__$1))
{var c__4262__auto___12121 = cljs.core.chunk_first.call(null,seq__11978_12120__$1);{
var G__12122 = cljs.core.chunk_rest.call(null,seq__11978_12120__$1);
var G__12123 = c__4262__auto___12121;
var G__12124 = cljs.core.count.call(null,c__4262__auto___12121);
var G__12125 = 0;
seq__11978_12079 = G__12122;
chunk__11985_12080 = G__12123;
count__11986_12081 = G__12124;
i__11987_12082 = G__12125;
continue;
}
} else
{var vec__11997_12126 = cljs.core.first.call(null,seq__11978_12120__$1);var tag_12127 = cljs.core.nth.call(null,vec__11997_12126,0,null);var keys_12128 = cljs.core.nth.call(null,vec__11997_12126,1,null);var seq__11979_12129 = cljs.core.seq.call(null,keys_12128);var chunk__11981_12130 = null;var count__11982_12131 = 0;var i__11983_12132 = 0;while(true){
if((i__11983_12132 < count__11982_12131))
{var key_12133 = cljs.core._nth.call(null,chunk__11981_12130,i__11983_12132);var vec__11998_12134 = ((cljs.core.map_QMARK_.call(null,keys_12128))?key_12133:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_12133,cljs.core.PersistentVector.EMPTY], null));var key_12135__$1 = cljs.core.nth.call(null,vec__11998_12134,0,null);var command_12136 = cljs.core.nth.call(null,vec__11998_12134,1,null);var tag_vec_12137 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12127,[cljs.core.str("-"),cljs.core.str(key_12135__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_12137,command_12136));
{
var G__12138 = seq__11979_12129;
var G__12139 = chunk__11981_12130;
var G__12140 = count__11982_12131;
var G__12141 = (i__11983_12132 + 1);
seq__11979_12129 = G__12138;
chunk__11981_12130 = G__12139;
count__11982_12131 = G__12140;
i__11983_12132 = G__12141;
continue;
}
} else
{var temp__4092__auto___12142__$1 = cljs.core.seq.call(null,seq__11979_12129);if(temp__4092__auto___12142__$1)
{var seq__11979_12143__$1 = temp__4092__auto___12142__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11979_12143__$1))
{var c__4262__auto___12144 = cljs.core.chunk_first.call(null,seq__11979_12143__$1);{
var G__12145 = cljs.core.chunk_rest.call(null,seq__11979_12143__$1);
var G__12146 = c__4262__auto___12144;
var G__12147 = cljs.core.count.call(null,c__4262__auto___12144);
var G__12148 = 0;
seq__11979_12129 = G__12145;
chunk__11981_12130 = G__12146;
count__11982_12131 = G__12147;
i__11983_12132 = G__12148;
continue;
}
} else
{var key_12149 = cljs.core.first.call(null,seq__11979_12143__$1);var vec__11999_12150 = ((cljs.core.map_QMARK_.call(null,keys_12128))?key_12149:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_12149,cljs.core.PersistentVector.EMPTY], null));var key_12151__$1 = cljs.core.nth.call(null,vec__11999_12150,0,null);var command_12152 = cljs.core.nth.call(null,vec__11999_12150,1,null);var tag_vec_12153 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_12127,[cljs.core.str("-"),cljs.core.str(key_12151__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_12153,command_12152));
{
var G__12154 = cljs.core.next.call(null,seq__11979_12143__$1);
var G__12155 = null;
var G__12156 = 0;
var G__12157 = 0;
seq__11979_12129 = G__12154;
chunk__11981_12130 = G__12155;
count__11982_12131 = G__12156;
i__11983_12132 = G__12157;
continue;
}
}
} else
{}
}
break;
}
{
var G__12158 = cljs.core.next.call(null,seq__11978_12120__$1);
var G__12159 = null;
var G__12160 = 0;
var G__12161 = 0;
seq__11978_12079 = G__12158;
chunk__11985_12080 = G__12159;
count__11986_12081 = G__12160;
i__11987_12082 = G__12161;
continue;
}
}
} else
{}
}
break;
}
return cljs.core.vec.call(null,cljs.core.sort_by.call(null,cljs.core.first,cljs.core.js__GT_clj.call(null,flat)));
});
lt.objs.settings.parse_key_file = (function parse_key_file(file){var keys = lt.objs.settings.safe_read.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,file)),file);if(cljs.core.map_QMARK_.call(null,keys))
{return keys;
} else
{if(cljs.core.vector_QMARK_.call(null,keys))
{return lt.objs.settings.flat_keymap__GT_map.call(null,keys);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return lt.objs.console.error.call(null,[cljs.core.str("Invalid keymap file: "),cljs.core.str(file),cljs.core.str(". Keymaps must be either a vector or a map.")].join(''));
} else
{return null;
}
}
}
});
lt.objs.settings.keymap_diffs_in = (function keymap_diffs_in(path){if(cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null,path)))
{return cljs.core.map.call(null,lt.objs.settings.parse_key_file,cljs.core.filter.call(null,(function (p1__12162_SHARP_){return cljs.core._EQ_.call(null,lt.objs.files.ext.call(null,p1__12162_SHARP_),"keymap");
}),lt.objs.files.full_path_ls.call(null,path)));
} else
{return null;
}
});
lt.objs.settings.__BEH__default_keymap_diffs = (function __BEH__default_keymap_diffs(this$,diffs){return cljs.core.concat.call(null,diffs,lt.objs.settings.keymap_diffs_in.call(null,lt.objs.files.lt_home.call(null,"/settings/default/")));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","default-keymap-diffs","lt.objs.settings/default-keymap-diffs",3391340802),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__default_keymap_diffs,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"keymap.diffs.default+","keymap.diffs.default+",711992781),null], null), null));
lt.objs.settings.__BEH__user_keymap_diffs = (function __BEH__user_keymap_diffs(this$,diffs){return cljs.core.concat.call(null,diffs,lt.objs.settings.keymap_diffs_in.call(null,lt.objs.settings.user_plugin_dir));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","user-keymap-diffs","lt.objs.settings/user-keymap-diffs",3926753964),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__user_keymap_diffs,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"keymap.diffs.user+","keymap.diffs.user+",1410763393),null], null), null));
lt.objs.settings.pair_keybindings = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.keys.normal","editor.keys.normal",2927389330),new cljs.core.PersistentArrayMap(null, 7, ["\"",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.repeat-pair","editor.repeat-pair",1820110909),"\"")], null),"(",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.open-pair","editor.open-pair",4001431726),"(")], null),")",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.close-pair","editor.close-pair",2068601890),")")], null),"[",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.open-pair","editor.open-pair",4001431726),"[")], null),"{",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.open-pair","editor.open-pair",4001431726),"{")], null),"]",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.close-pair","editor.close-pair",2068601890),"]")], null),"}",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null,"editor.close-pair","editor.close-pair",2068601890),"}")], null)], null)], null);
lt.objs.settings.__BEH__pair_keymap_diffs = (function __BEH__pair_keymap_diffs(this$,diffs){lt.objs.console.error.call(null,[cljs.core.str("[:app "),cljs.core.str(new cljs.core.Keyword("lt.objs.settings","pair-keymap-diffs","lt.objs.settings/pair-keymap-diffs",3790818555)),cljs.core.str("] is deprecated and will be removed in 0.9.0. Use [:editor :lt.objs.editor/autoclose-brackets] instead")].join(''));
return cljs.core.concat.call(null,diffs,cljs.core._conj.call(null,cljs.core.List.EMPTY,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"+","+",1013904285),lt.objs.settings.pair_keybindings], null)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","pair-keymap-diffs","lt.objs.settings/pair-keymap-diffs",3790818555),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__pair_keymap_diffs,new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: auto-close parens/brackets/quotes/pairs",new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"keymap.diffs.user+","keymap.diffs.user+",1410763393),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"user","user",1017503549));
lt.objs.settings.__BEH__on_behaviors_editor_save = (function __BEH__on_behaviors_editor_save(editor){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"behaviors.reload","behaviors.reload",2942796600));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","on-behaviors-editor-save","lt.objs.settings/on-behaviors-editor-save",3927833097),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__on_behaviors_editor_save,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"saved","saved",1123115513),null], null), null));
lt.objs.settings.__BEH__on_keymap_editor_save = (function __BEH__on_keymap_editor_save(editor){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"keymaps.reload","keymaps.reload",666881155));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.settings","on-keymap-editor-save","lt.objs.settings/on-keymap-editor-save",1834857841),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.settings.__BEH__on_keymap_editor_save,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"saved","saved",1123115513),null], null), null));
lt.object.tag_behaviors.call(null,new cljs.core.Keyword(null,"app","app",1014001043),new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.settings","initial-behaviors","lt.objs.settings/initial-behaviors",1554007604),new cljs.core.Keyword("lt.objs.settings","create-user-plugin","lt.objs.settings/create-user-plugin",4382856776),new cljs.core.Keyword("lt.objs.settings","flatten-map-settings","lt.objs.settings/flatten-map-settings",824167599),new cljs.core.Keyword("lt.objs.settings","load-behaviors","lt.objs.settings/load-behaviors",1077508690),new cljs.core.Keyword("lt.objs.settings","default-behavior-diffs","lt.objs.settings/default-behavior-diffs",3478385645),new cljs.core.Keyword("lt.objs.settings","user-behavior-diffs","lt.objs.settings/user-behavior-diffs",2390870839),new cljs.core.Keyword("lt.objs.settings","default-keymap-diffs","lt.objs.settings/default-keymap-diffs",3391340802),new cljs.core.Keyword("lt.objs.settings","user-keymap-diffs","lt.objs.settings/user-keymap-diffs",3926753964)], null));
