// 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 (e13480){var e = e13480;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__13484){var vec__13485 = p__13484;var k = cljs.core.nth.call(null,vec__13485,0,null);var v = cljs.core.nth.call(null,vec__13485,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__13481_SHARP_){return cljs.core.apply.call(null,cljs.core.conj,(function (){var or__3520__auto__ = p1__13481_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__13492){var vec__13493 = p__13492;var k = cljs.core.nth.call(null,vec__13493,0,null);var v = cljs.core.nth.call(null,vec__13493,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__13486_SHARP_){return cljs.core.remove.call(null,cljs.core.set.call(null,v),p1__13486_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__13494){var vec__13495 = p__13494;var k = cljs.core.nth.call(null,vec__13495,0,null);var v = cljs.core.nth.call(null,vec__13495,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__13487_SHARP_){return cljs.core.apply.call(null,cljs.core.conj,(function (){var or__3520__auto__ = p1__13487_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__13496,final$){var map__13498 = p__13496;var map__13498__$1 = ((cljs.core.seq_QMARK_.call(null,map__13498))?cljs.core.apply.call(null,cljs.core.hash_map,map__13498):map__13498);var diff = map__13498__$1;var add = cljs.core.get.call(null,map__13498__$1,new cljs.core.Keyword(null,"+","+",1013904285));var rem = cljs.core.get.call(null,map__13498__$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__13499){var map__13501 = p__13499;var map__13501__$1 = ((cljs.core.seq_QMARK_.call(null,map__13501))?cljs.core.apply.call(null,cljs.core.hash_map,map__13501):map__13501);var add = cljs.core.get.call(null,map__13501__$1,new cljs.core.Keyword(null,"+","+",1013904285));var rem = cljs.core.get.call(null,map__13501__$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 obj13517 = {};return obj13517;
})();var removes = (function (){var obj13519 = {};return obj13519;
})();var seq__13520_13530 = cljs.core.seq.call(null,flat);var chunk__13522_13531 = null;var count__13523_13532 = 0;var i__13524_13533 = 0;while(true){
if((i__13524_13533 < count__13523_13532))
{var vec__13526_13534 = cljs.core._nth.call(null,chunk__13522_13531,i__13524_13533);var tag_13535 = cljs.core.nth.call(null,vec__13526_13534,0,null);var behavior_13536 = cljs.core.nth.call(null,vec__13526_13534,1,null);var all_13537 = vec__13526_13534;var vec__13527_13538 = ((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,behavior_13536)[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_13536),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,behavior_13536)], null));var coll_13539 = cljs.core.nth.call(null,vec__13527_13538,0,null);var behavior_13540__$1 = cljs.core.nth.call(null,vec__13527_13538,1,null);var tag_13541__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_13535);if(cljs.core.truth_((coll_13539[tag_13541__$1])))
{} else
{(coll_13539[tag_13541__$1] = []);
}
(coll_13539[tag_13541__$1]).push((((cljs.core.count.call(null,all_13537) > 2))?cljs.core.conj.call(null,cljs.core.seq.call(null,cljs.core.subvec.call(null,all_13537,2)),cljs.core.keyword.call(null,behavior_13540__$1)):cljs.core.keyword.call(null,behavior_13540__$1)));
{
var G__13542 = seq__13520_13530;
var G__13543 = chunk__13522_13531;
var G__13544 = count__13523_13532;
var G__13545 = (i__13524_13533 + 1);
seq__13520_13530 = G__13542;
chunk__13522_13531 = G__13543;
count__13523_13532 = G__13544;
i__13524_13533 = G__13545;
continue;
}
} else
{var temp__4092__auto___13546 = cljs.core.seq.call(null,seq__13520_13530);if(temp__4092__auto___13546)
{var seq__13520_13547__$1 = temp__4092__auto___13546;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13520_13547__$1))
{var c__4262__auto___13548 = cljs.core.chunk_first.call(null,seq__13520_13547__$1);{
var G__13549 = cljs.core.chunk_rest.call(null,seq__13520_13547__$1);
var G__13550 = c__4262__auto___13548;
var G__13551 = cljs.core.count.call(null,c__4262__auto___13548);
var G__13552 = 0;
seq__13520_13530 = G__13549;
chunk__13522_13531 = G__13550;
count__13523_13532 = G__13551;
i__13524_13533 = G__13552;
continue;
}
} else
{var vec__13528_13553 = cljs.core.first.call(null,seq__13520_13547__$1);var tag_13554 = cljs.core.nth.call(null,vec__13528_13553,0,null);var behavior_13555 = cljs.core.nth.call(null,vec__13528_13553,1,null);var all_13556 = vec__13528_13553;var vec__13529_13557 = ((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,behavior_13555)[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_13555),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,behavior_13555)], null));var coll_13558 = cljs.core.nth.call(null,vec__13529_13557,0,null);var behavior_13559__$1 = cljs.core.nth.call(null,vec__13529_13557,1,null);var tag_13560__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_13554);if(cljs.core.truth_((coll_13558[tag_13560__$1])))
{} else
{(coll_13558[tag_13560__$1] = []);
}
(coll_13558[tag_13560__$1]).push((((cljs.core.count.call(null,all_13556) > 2))?cljs.core.conj.call(null,cljs.core.seq.call(null,cljs.core.subvec.call(null,all_13556,2)),cljs.core.keyword.call(null,behavior_13559__$1)):cljs.core.keyword.call(null,behavior_13559__$1)));
{
var G__13561 = cljs.core.next.call(null,seq__13520_13547__$1);
var G__13562 = null;
var G__13563 = 0;
var G__13564 = 0;
seq__13520_13530 = G__13561;
chunk__13522_13531 = G__13562;
count__13523_13532 = G__13563;
i__13524_13533 = G__13564;
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__13603_13641 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(behaviors_map));var chunk__13611_13642 = null;var count__13612_13643 = 0;var i__13613_13644 = 0;while(true){
if((i__13613_13644 < count__13612_13643))
{var vec__13621_13645 = cljs.core._nth.call(null,chunk__13611_13642,i__13613_13644);var tag_13646 = cljs.core.nth.call(null,vec__13621_13645,0,null);var behs_13647 = cljs.core.nth.call(null,vec__13621_13645,1,null);var tag_vec_13648 = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_13646], null);var seq__13615_13649 = cljs.core.seq.call(null,behs_13647);var chunk__13617_13650 = null;var count__13618_13651 = 0;var i__13619_13652 = 0;while(true){
if((i__13619_13652 < count__13618_13651))
{var beh_13653 = cljs.core._nth.call(null,chunk__13617_13650,i__13619_13652);var beh_13654__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13653))?beh_13653:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13653], null));flat.push(cljs.core.into.call(null,tag_vec_13648,beh_13654__$1));
{
var G__13655 = seq__13615_13649;
var G__13656 = chunk__13617_13650;
var G__13657 = count__13618_13651;
var G__13658 = (i__13619_13652 + 1);
seq__13615_13649 = G__13655;
chunk__13617_13650 = G__13656;
count__13618_13651 = G__13657;
i__13619_13652 = G__13658;
continue;
}
} else
{var temp__4092__auto___13659 = cljs.core.seq.call(null,seq__13615_13649);if(temp__4092__auto___13659)
{var seq__13615_13660__$1 = temp__4092__auto___13659;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13615_13660__$1))
{var c__4262__auto___13661 = cljs.core.chunk_first.call(null,seq__13615_13660__$1);{
var G__13662 = cljs.core.chunk_rest.call(null,seq__13615_13660__$1);
var G__13663 = c__4262__auto___13661;
var G__13664 = cljs.core.count.call(null,c__4262__auto___13661);
var G__13665 = 0;
seq__13615_13649 = G__13662;
chunk__13617_13650 = G__13663;
count__13618_13651 = G__13664;
i__13619_13652 = G__13665;
continue;
}
} else
{var beh_13666 = cljs.core.first.call(null,seq__13615_13660__$1);var beh_13667__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13666))?beh_13666:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13666], null));flat.push(cljs.core.into.call(null,tag_vec_13648,beh_13667__$1));
{
var G__13668 = cljs.core.next.call(null,seq__13615_13660__$1);
var G__13669 = null;
var G__13670 = 0;
var G__13671 = 0;
seq__13615_13649 = G__13668;
chunk__13617_13650 = G__13669;
count__13618_13651 = G__13670;
i__13619_13652 = G__13671;
continue;
}
}
} else
{}
}
break;
}
{
var G__13672 = seq__13603_13641;
var G__13673 = chunk__13611_13642;
var G__13674 = count__13612_13643;
var G__13675 = (i__13613_13644 + 1);
seq__13603_13641 = G__13672;
chunk__13611_13642 = G__13673;
count__13612_13643 = G__13674;
i__13613_13644 = G__13675;
continue;
}
} else
{var temp__4092__auto___13676 = cljs.core.seq.call(null,seq__13603_13641);if(temp__4092__auto___13676)
{var seq__13603_13677__$1 = temp__4092__auto___13676;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13603_13677__$1))
{var c__4262__auto___13678 = cljs.core.chunk_first.call(null,seq__13603_13677__$1);{
var G__13679 = cljs.core.chunk_rest.call(null,seq__13603_13677__$1);
var G__13680 = c__4262__auto___13678;
var G__13681 = cljs.core.count.call(null,c__4262__auto___13678);
var G__13682 = 0;
seq__13603_13641 = G__13679;
chunk__13611_13642 = G__13680;
count__13612_13643 = G__13681;
i__13613_13644 = G__13682;
continue;
}
} else
{var vec__13622_13683 = cljs.core.first.call(null,seq__13603_13677__$1);var tag_13684 = cljs.core.nth.call(null,vec__13622_13683,0,null);var behs_13685 = cljs.core.nth.call(null,vec__13622_13683,1,null);var tag_vec_13686 = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_13684], null);var seq__13605_13687 = cljs.core.seq.call(null,behs_13685);var chunk__13607_13688 = null;var count__13608_13689 = 0;var i__13609_13690 = 0;while(true){
if((i__13609_13690 < count__13608_13689))
{var beh_13691 = cljs.core._nth.call(null,chunk__13607_13688,i__13609_13690);var beh_13692__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13691))?beh_13691:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13691], null));flat.push(cljs.core.into.call(null,tag_vec_13686,beh_13692__$1));
{
var G__13693 = seq__13605_13687;
var G__13694 = chunk__13607_13688;
var G__13695 = count__13608_13689;
var G__13696 = (i__13609_13690 + 1);
seq__13605_13687 = G__13693;
chunk__13607_13688 = G__13694;
count__13608_13689 = G__13695;
i__13609_13690 = G__13696;
continue;
}
} else
{var temp__4092__auto___13697__$1 = cljs.core.seq.call(null,seq__13605_13687);if(temp__4092__auto___13697__$1)
{var seq__13605_13698__$1 = temp__4092__auto___13697__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13605_13698__$1))
{var c__4262__auto___13699 = cljs.core.chunk_first.call(null,seq__13605_13698__$1);{
var G__13700 = cljs.core.chunk_rest.call(null,seq__13605_13698__$1);
var G__13701 = c__4262__auto___13699;
var G__13702 = cljs.core.count.call(null,c__4262__auto___13699);
var G__13703 = 0;
seq__13605_13687 = G__13700;
chunk__13607_13688 = G__13701;
count__13608_13689 = G__13702;
i__13609_13690 = G__13703;
continue;
}
} else
{var beh_13704 = cljs.core.first.call(null,seq__13605_13698__$1);var beh_13705__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13704))?beh_13704:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13704], null));flat.push(cljs.core.into.call(null,tag_vec_13686,beh_13705__$1));
{
var G__13706 = cljs.core.next.call(null,seq__13605_13698__$1);
var G__13707 = null;
var G__13708 = 0;
var G__13709 = 0;
seq__13605_13687 = G__13706;
chunk__13607_13688 = G__13707;
count__13608_13689 = G__13708;
i__13609_13690 = G__13709;
continue;
}
}
} else
{}
}
break;
}
{
var G__13710 = cljs.core.next.call(null,seq__13603_13677__$1);
var G__13711 = null;
var G__13712 = 0;
var G__13713 = 0;
seq__13603_13641 = G__13710;
chunk__13611_13642 = G__13711;
count__13612_13643 = G__13712;
i__13613_13644 = G__13713;
continue;
}
}
} else
{}
}
break;
}
var seq__13623_13714 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(behaviors_map));var chunk__13630_13715 = null;var count__13631_13716 = 0;var i__13632_13717 = 0;while(true){
if((i__13632_13717 < count__13631_13716))
{var vec__13639_13718 = cljs.core._nth.call(null,chunk__13630_13715,i__13632_13717);var tag_13719 = cljs.core.nth.call(null,vec__13639_13718,0,null);var behs_13720 = cljs.core.nth.call(null,vec__13639_13718,1,null);var seq__13633_13721 = cljs.core.seq.call(null,behs_13720);var chunk__13635_13722 = null;var count__13636_13723 = 0;var i__13637_13724 = 0;while(true){
if((i__13637_13724 < count__13636_13723))
{var beh_13725 = cljs.core._nth.call(null,chunk__13635_13722,i__13637_13724);var beh_13726__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13725))?beh_13725:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13725], null));var tag_vec_13727 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_13719,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_13726__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_13727,cljs.core.rest.call(null,beh_13726__$1)));
{
var G__13728 = seq__13633_13721;
var G__13729 = chunk__13635_13722;
var G__13730 = count__13636_13723;
var G__13731 = (i__13637_13724 + 1);
seq__13633_13721 = G__13728;
chunk__13635_13722 = G__13729;
count__13636_13723 = G__13730;
i__13637_13724 = G__13731;
continue;
}
} else
{var temp__4092__auto___13732 = cljs.core.seq.call(null,seq__13633_13721);if(temp__4092__auto___13732)
{var seq__13633_13733__$1 = temp__4092__auto___13732;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13633_13733__$1))
{var c__4262__auto___13734 = cljs.core.chunk_first.call(null,seq__13633_13733__$1);{
var G__13735 = cljs.core.chunk_rest.call(null,seq__13633_13733__$1);
var G__13736 = c__4262__auto___13734;
var G__13737 = cljs.core.count.call(null,c__4262__auto___13734);
var G__13738 = 0;
seq__13633_13721 = G__13735;
chunk__13635_13722 = G__13736;
count__13636_13723 = G__13737;
i__13637_13724 = G__13738;
continue;
}
} else
{var beh_13739 = cljs.core.first.call(null,seq__13633_13733__$1);var beh_13740__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13739))?beh_13739:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13739], null));var tag_vec_13741 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_13719,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_13740__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_13741,cljs.core.rest.call(null,beh_13740__$1)));
{
var G__13742 = cljs.core.next.call(null,seq__13633_13733__$1);
var G__13743 = null;
var G__13744 = 0;
var G__13745 = 0;
seq__13633_13721 = G__13742;
chunk__13635_13722 = G__13743;
count__13636_13723 = G__13744;
i__13637_13724 = G__13745;
continue;
}
}
} else
{}
}
break;
}
{
var G__13746 = seq__13623_13714;
var G__13747 = chunk__13630_13715;
var G__13748 = count__13631_13716;
var G__13749 = (i__13632_13717 + 1);
seq__13623_13714 = G__13746;
chunk__13630_13715 = G__13747;
count__13631_13716 = G__13748;
i__13632_13717 = G__13749;
continue;
}
} else
{var temp__4092__auto___13750 = cljs.core.seq.call(null,seq__13623_13714);if(temp__4092__auto___13750)
{var seq__13623_13751__$1 = temp__4092__auto___13750;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13623_13751__$1))
{var c__4262__auto___13752 = cljs.core.chunk_first.call(null,seq__13623_13751__$1);{
var G__13753 = cljs.core.chunk_rest.call(null,seq__13623_13751__$1);
var G__13754 = c__4262__auto___13752;
var G__13755 = cljs.core.count.call(null,c__4262__auto___13752);
var G__13756 = 0;
seq__13623_13714 = G__13753;
chunk__13630_13715 = G__13754;
count__13631_13716 = G__13755;
i__13632_13717 = G__13756;
continue;
}
} else
{var vec__13640_13757 = cljs.core.first.call(null,seq__13623_13751__$1);var tag_13758 = cljs.core.nth.call(null,vec__13640_13757,0,null);var behs_13759 = cljs.core.nth.call(null,vec__13640_13757,1,null);var seq__13624_13760 = cljs.core.seq.call(null,behs_13759);var chunk__13626_13761 = null;var count__13627_13762 = 0;var i__13628_13763 = 0;while(true){
if((i__13628_13763 < count__13627_13762))
{var beh_13764 = cljs.core._nth.call(null,chunk__13626_13761,i__13628_13763);var beh_13765__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13764))?beh_13764:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13764], null));var tag_vec_13766 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_13758,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_13765__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_13766,cljs.core.rest.call(null,beh_13765__$1)));
{
var G__13767 = seq__13624_13760;
var G__13768 = chunk__13626_13761;
var G__13769 = count__13627_13762;
var G__13770 = (i__13628_13763 + 1);
seq__13624_13760 = G__13767;
chunk__13626_13761 = G__13768;
count__13627_13762 = G__13769;
i__13628_13763 = G__13770;
continue;
}
} else
{var temp__4092__auto___13771__$1 = cljs.core.seq.call(null,seq__13624_13760);if(temp__4092__auto___13771__$1)
{var seq__13624_13772__$1 = temp__4092__auto___13771__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13624_13772__$1))
{var c__4262__auto___13773 = cljs.core.chunk_first.call(null,seq__13624_13772__$1);{
var G__13774 = cljs.core.chunk_rest.call(null,seq__13624_13772__$1);
var G__13775 = c__4262__auto___13773;
var G__13776 = cljs.core.count.call(null,c__4262__auto___13773);
var G__13777 = 0;
seq__13624_13760 = G__13774;
chunk__13626_13761 = G__13775;
count__13627_13762 = G__13776;
i__13628_13763 = G__13777;
continue;
}
} else
{var beh_13778 = cljs.core.first.call(null,seq__13624_13772__$1);var beh_13779__$1 = ((cljs.core.coll_QMARK_.call(null,beh_13778))?beh_13778:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [beh_13778], null));var tag_vec_13780 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_13758,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_13779__$1)))].join(''))], null);flat.push(cljs.core.into.call(null,tag_vec_13780,cljs.core.rest.call(null,beh_13779__$1)));
{
var G__13781 = cljs.core.next.call(null,seq__13624_13772__$1);
var G__13782 = null;
var G__13783 = 0;
var G__13784 = 0;
seq__13624_13760 = G__13781;
chunk__13626_13761 = G__13782;
count__13627_13762 = G__13783;
i__13628_13763 = G__13784;
continue;
}
}
} else
{}
}
break;
}
{
var G__13785 = cljs.core.next.call(null,seq__13623_13751__$1);
var G__13786 = null;
var G__13787 = 0;
var G__13788 = 0;
seq__13623_13714 = G__13785;
chunk__13630_13715 = G__13786;
count__13631_13716 = G__13787;
i__13632_13717 = G__13788;
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__13789_SHARP_){return cljs.core._EQ_.call(null,lt.objs.files.ext.call(null,p1__13789_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 (e13791){var e_13792 = e13791;lt.objs.console.error.call(null,e_13792);
}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__13793_SHARP_,p2__13794_SHARP_){return [cljs.core.str(p1__13793_SHARP_),cljs.core.str(" "),cljs.core.str(p2__13794_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__13795){var vec__13797 = p__13795;var k = cljs.core.nth.call(null,vec__13797,0,null);var v = cljs.core.nth.call(null,vec__13797,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__13801){var vec__13802 = p__13801;var k = cljs.core.nth.call(null,vec__13802,0,null);var v = cljs.core.nth.call(null,vec__13802,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__13798_SHARP_){return cljs.core.into.call(null,(function (){var or__3520__auto__ = p1__13798_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__13806){var vec__13807 = p__13806;var k = cljs.core.nth.call(null,vec__13807,0,null);var v = cljs.core.nth.call(null,vec__13807,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__13803_SHARP_){return cljs.core.apply.call(null,cljs.core.dissoc,p1__13803_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__13808,final$){var map__13810 = p__13808;var map__13810__$1 = ((cljs.core.seq_QMARK_.call(null,map__13810))?cljs.core.apply.call(null,cljs.core.hash_map,map__13810):map__13810);var add = cljs.core.get.call(null,map__13810__$1,new cljs.core.Keyword(null,"+","+",1013904285));var rem = cljs.core.get.call(null,map__13810__$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__13815_13819 = cljs.core.seq.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,lt.object.instances)));var chunk__13816_13820 = null;var count__13817_13821 = 0;var i__13818_13822 = 0;while(true){
if((i__13818_13822 < count__13817_13821))
{var inst_13823 = cljs.core._nth.call(null,chunk__13816_13820,i__13818_13822);lt.object.refresh_BANG_.call(null,inst_13823);
{
var G__13824 = seq__13815_13819;
var G__13825 = chunk__13816_13820;
var G__13826 = count__13817_13821;
var G__13827 = (i__13818_13822 + 1);
seq__13815_13819 = G__13824;
chunk__13816_13820 = G__13825;
count__13817_13821 = G__13826;
i__13818_13822 = G__13827;
continue;
}
} else
{var temp__4092__auto___13828 = cljs.core.seq.call(null,seq__13815_13819);if(temp__4092__auto___13828)
{var seq__13815_13829__$1 = temp__4092__auto___13828;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13815_13829__$1))
{var c__4262__auto___13830 = cljs.core.chunk_first.call(null,seq__13815_13829__$1);{
var G__13831 = cljs.core.chunk_rest.call(null,seq__13815_13829__$1);
var G__13832 = c__4262__auto___13830;
var G__13833 = cljs.core.count.call(null,c__4262__auto___13830);
var G__13834 = 0;
seq__13815_13819 = G__13831;
chunk__13816_13820 = G__13832;
count__13817_13821 = G__13833;
i__13818_13822 = G__13834;
continue;
}
} else
{var inst_13835 = cljs.core.first.call(null,seq__13815_13829__$1);lt.object.refresh_BANG_.call(null,inst_13835);
{
var G__13836 = cljs.core.next.call(null,seq__13815_13829__$1);
var G__13837 = null;
var G__13838 = 0;
var G__13839 = 0;
seq__13815_13819 = G__13836;
chunk__13816_13820 = G__13837;
count__13817_13821 = G__13838;
i__13818_13822 = G__13839;
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__13841 = cljs.core.deref.call(null,editor).call(null,new cljs.core.Keyword(null,"info","info",1017141280));var map__13841__$1 = ((cljs.core.seq_QMARK_.call(null,map__13841))?cljs.core.apply.call(null,cljs.core.hash_map,map__13841):map__13841);var path = cljs.core.get.call(null,map__13841__$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__13846 = cljs.core.seq.call(null,lt.objs.settings.user_plugin_paths);var chunk__13847 = null;var count__13848 = 0;var i__13849 = 0;while(true){
if((i__13849 < count__13848))
{var path = cljs.core._nth.call(null,chunk__13847,i__13849);var full_path_13850 = 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_13850)))
{} 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_13850);
} 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_13850);
}
}
{
var G__13851 = seq__13846;
var G__13852 = chunk__13847;
var G__13853 = count__13848;
var G__13854 = (i__13849 + 1);
seq__13846 = G__13851;
chunk__13847 = G__13852;
count__13848 = G__13853;
i__13849 = G__13854;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__13846);if(temp__4092__auto__)
{var seq__13846__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13846__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__13846__$1);{
var G__13855 = cljs.core.chunk_rest.call(null,seq__13846__$1);
var G__13856 = c__4262__auto__;
var G__13857 = cljs.core.count.call(null,c__4262__auto__);
var G__13858 = 0;
seq__13846 = G__13855;
chunk__13847 = G__13856;
count__13848 = G__13857;
i__13849 = G__13858;
continue;
}
} else
{var path = cljs.core.first.call(null,seq__13846__$1);var full_path_13859 = 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_13859)))
{} 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_13859);
} 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_13859);
}
}
{
var G__13860 = cljs.core.next.call(null,seq__13846__$1);
var G__13861 = null;
var G__13862 = 0;
var G__13863 = 0;
seq__13846 = G__13860;
chunk__13847 = G__13861;
count__13848 = G__13862;
i__13849 = G__13863;
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__13865 = lt.objs.files.ext.call(null,file);if(cljs.core._EQ_.call(null,"behaviors",G__13865))
{return lt.objs.settings.map__GT_flat_behaviors;
} else
{if(cljs.core._EQ_.call(null,"keymap",G__13865))
{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__13871 = cljs.core.seq.call(null,cljs.core.filter.call(null,(function (p1__13866_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__13866_SHARP_));
}),lt.objs.files.full_path_ls.call(null,lt.objs.settings.user_plugin_dir)));var chunk__13872 = null;var count__13873 = 0;var i__13874 = 0;while(true){
if((i__13874 < count__13873))
{var file = cljs.core._nth.call(null,chunk__13872,i__13874);lt.objs.settings.convert_file.call(null,file);
{
var G__13875 = seq__13871;
var G__13876 = chunk__13872;
var G__13877 = count__13873;
var G__13878 = (i__13874 + 1);
seq__13871 = G__13875;
chunk__13872 = G__13876;
count__13873 = G__13877;
i__13874 = G__13878;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__13871);if(temp__4092__auto__)
{var seq__13871__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13871__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__13871__$1);{
var G__13879 = cljs.core.chunk_rest.call(null,seq__13871__$1);
var G__13880 = c__4262__auto__;
var G__13881 = cljs.core.count.call(null,c__4262__auto__);
var G__13882 = 0;
seq__13871 = G__13879;
chunk__13872 = G__13880;
count__13873 = G__13881;
i__13874 = G__13882;
continue;
}
} else
{var file = cljs.core.first.call(null,seq__13871__$1);lt.objs.settings.convert_file.call(null,file);
{
var G__13883 = cljs.core.next.call(null,seq__13871__$1);
var G__13884 = null;
var G__13885 = 0;
var G__13886 = 0;
seq__13871 = G__13883;
chunk__13872 = G__13884;
count__13873 = G__13885;
i__13874 = G__13886;
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 obj13922 = {};return obj13922;
})();var removes = (function (){var obj13924 = {};return obj13924;
})();var seq__13925_13955 = cljs.core.seq.call(null,flat);var chunk__13927_13956 = null;var count__13928_13957 = 0;var i__13929_13958 = 0;while(true){
if((i__13929_13958 < count__13928_13957))
{var vec__13931_13959 = cljs.core._nth.call(null,chunk__13927_13956,i__13929_13958);var tag_13960 = cljs.core.nth.call(null,vec__13931_13959,0,null);var key_13961 = cljs.core.nth.call(null,vec__13931_13959,1,null);var all_13962 = vec__13931_13959;var vec__13932_13963 = (((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,key_13961)[0]),"-")) && ((cljs.core.count.call(null,lt.objs.settings.keyword__GT_str.call(null,key_13961)) > 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_13961),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,key_13961)], null));var coll_13964 = cljs.core.nth.call(null,vec__13932_13963,0,null);var key_13965__$1 = cljs.core.nth.call(null,vec__13932_13963,1,null);var remove_QMARK__13966 = (coll_13964 === removes);var tag_13967__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_13960);if(cljs.core.truth_((coll_13964[tag_13967__$1])))
{} else
{(coll_13964[tag_13967__$1] = ((remove_QMARK__13966)?[]:(function (){var obj13934 = {};return obj13934;
})()));
}
if(remove_QMARK__13966)
{(coll_13964[tag_13967__$1]).push(key_13965__$1);
} else
{((coll_13964[tag_13967__$1])[key_13965__$1] = cljs.core.subvec.call(null,all_13962,2));
}
{
var G__13968 = seq__13925_13955;
var G__13969 = chunk__13927_13956;
var G__13970 = count__13928_13957;
var G__13971 = (i__13929_13958 + 1);
seq__13925_13955 = G__13968;
chunk__13927_13956 = G__13969;
count__13928_13957 = G__13970;
i__13929_13958 = G__13971;
continue;
}
} else
{var temp__4092__auto___13972 = cljs.core.seq.call(null,seq__13925_13955);if(temp__4092__auto___13972)
{var seq__13925_13973__$1 = temp__4092__auto___13972;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13925_13973__$1))
{var c__4262__auto___13974 = cljs.core.chunk_first.call(null,seq__13925_13973__$1);{
var G__13975 = cljs.core.chunk_rest.call(null,seq__13925_13973__$1);
var G__13976 = c__4262__auto___13974;
var G__13977 = cljs.core.count.call(null,c__4262__auto___13974);
var G__13978 = 0;
seq__13925_13955 = G__13975;
chunk__13927_13956 = G__13976;
count__13928_13957 = G__13977;
i__13929_13958 = G__13978;
continue;
}
} else
{var vec__13935_13979 = cljs.core.first.call(null,seq__13925_13973__$1);var tag_13980 = cljs.core.nth.call(null,vec__13935_13979,0,null);var key_13981 = cljs.core.nth.call(null,vec__13935_13979,1,null);var all_13982 = vec__13935_13979;var vec__13936_13983 = (((cljs.core._EQ_.call(null,(lt.objs.settings.keyword__GT_str.call(null,key_13981)[0]),"-")) && ((cljs.core.count.call(null,lt.objs.settings.keyword__GT_str.call(null,key_13981)) > 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_13981),1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [adds,lt.objs.settings.keyword__GT_str.call(null,key_13981)], null));var coll_13984 = cljs.core.nth.call(null,vec__13936_13983,0,null);var key_13985__$1 = cljs.core.nth.call(null,vec__13936_13983,1,null);var remove_QMARK__13986 = (coll_13984 === removes);var tag_13987__$1 = lt.objs.settings.keyword__GT_str.call(null,tag_13980);if(cljs.core.truth_((coll_13984[tag_13987__$1])))
{} else
{(coll_13984[tag_13987__$1] = ((remove_QMARK__13986)?[]:(function (){var obj13938 = {};return obj13938;
})()));
}
if(remove_QMARK__13986)
{(coll_13984[tag_13987__$1]).push(key_13985__$1);
} else
{((coll_13984[tag_13987__$1])[key_13985__$1] = cljs.core.subvec.call(null,all_13982,2));
}
{
var G__13988 = cljs.core.next.call(null,seq__13925_13973__$1);
var G__13989 = null;
var G__13990 = 0;
var G__13991 = 0;
seq__13925_13955 = G__13988;
chunk__13927_13956 = G__13989;
count__13928_13957 = G__13990;
i__13929_13958 = G__13991;
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__13939(s__13940){return (new cljs.core.LazySeq(null,(function (){var s__13940__$1 = s__13940;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__13940__$1);if(temp__4092__auto__)
{var s__13940__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__13940__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__13940__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__13942 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__13941 = 0;while(true){
if((i__13941 < size__4230__auto__))
{var vec__13945 = cljs.core._nth.call(null,c__4229__auto__,i__13941);var tag = cljs.core.nth.call(null,vec__13945,0,null);var keys = cljs.core.nth.call(null,vec__13945,1,null);cljs.core.chunk_append.call(null,b__13942,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null,tag),keys], null));
{
var G__13992 = (i__13941 + 1);
i__13941 = G__13992;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13942),iter__13939.call(null,cljs.core.chunk_rest.call(null,s__13940__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13942),null);
}
} else
{var vec__13946 = cljs.core.first.call(null,s__13940__$2);var tag = cljs.core.nth.call(null,vec__13946,0,null);var keys = cljs.core.nth.call(null,vec__13946,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__13939.call(null,cljs.core.rest.call(null,s__13940__$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__13947(s__13948){return (new cljs.core.LazySeq(null,(function (){var s__13948__$1 = s__13948;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__13948__$1);if(temp__4092__auto__)
{var s__13948__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__13948__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__13948__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__13950 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__13949 = 0;while(true){
if((i__13949 < size__4230__auto__))
{var vec__13953 = cljs.core._nth.call(null,c__4229__auto__,i__13949);var tag = cljs.core.nth.call(null,vec__13953,0,null);var keys = cljs.core.nth.call(null,vec__13953,1,null);cljs.core.chunk_append.call(null,b__13950,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null,tag),keys], null));
{
var G__13993 = (i__13949 + 1);
i__13949 = G__13993;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13950),iter__13947.call(null,cljs.core.chunk_rest.call(null,s__13948__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13950),null);
}
} else
{var vec__13954 = cljs.core.first.call(null,s__13948__$2);var tag = cljs.core.nth.call(null,vec__13954,0,null);var keys = cljs.core.nth.call(null,vec__13954,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__13947.call(null,cljs.core.rest.call(null,s__13948__$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__14038_14082 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"+","+",1013904285).cljs$core$IFn$_invoke$arity$1(keymap));var chunk__14045_14083 = null;var count__14046_14084 = 0;var i__14047_14085 = 0;while(true){
if((i__14047_14085 < count__14046_14084))
{var vec__14054_14086 = cljs.core._nth.call(null,chunk__14045_14083,i__14047_14085);var tag_14087 = cljs.core.nth.call(null,vec__14054_14086,0,null);var keys_14088 = cljs.core.nth.call(null,vec__14054_14086,1,null);var seq__14048_14089 = cljs.core.seq.call(null,keys_14088);var chunk__14050_14090 = null;var count__14051_14091 = 0;var i__14052_14092 = 0;while(true){
if((i__14052_14092 < count__14051_14091))
{var vec__14055_14093 = cljs.core._nth.call(null,chunk__14050_14090,i__14052_14092);var key_14094 = cljs.core.nth.call(null,vec__14055_14093,0,null);var commands_14095 = cljs.core.nth.call(null,vec__14055_14093,1,null);var tag_vec_14096 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14087,key_14094], null);flat.push(cljs.core.into.call(null,tag_vec_14096,commands_14095));
{
var G__14097 = seq__14048_14089;
var G__14098 = chunk__14050_14090;
var G__14099 = count__14051_14091;
var G__14100 = (i__14052_14092 + 1);
seq__14048_14089 = G__14097;
chunk__14050_14090 = G__14098;
count__14051_14091 = G__14099;
i__14052_14092 = G__14100;
continue;
}
} else
{var temp__4092__auto___14101 = cljs.core.seq.call(null,seq__14048_14089);if(temp__4092__auto___14101)
{var seq__14048_14102__$1 = temp__4092__auto___14101;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14048_14102__$1))
{var c__4262__auto___14103 = cljs.core.chunk_first.call(null,seq__14048_14102__$1);{
var G__14104 = cljs.core.chunk_rest.call(null,seq__14048_14102__$1);
var G__14105 = c__4262__auto___14103;
var G__14106 = cljs.core.count.call(null,c__4262__auto___14103);
var G__14107 = 0;
seq__14048_14089 = G__14104;
chunk__14050_14090 = G__14105;
count__14051_14091 = G__14106;
i__14052_14092 = G__14107;
continue;
}
} else
{var vec__14056_14108 = cljs.core.first.call(null,seq__14048_14102__$1);var key_14109 = cljs.core.nth.call(null,vec__14056_14108,0,null);var commands_14110 = cljs.core.nth.call(null,vec__14056_14108,1,null);var tag_vec_14111 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14087,key_14109], null);flat.push(cljs.core.into.call(null,tag_vec_14111,commands_14110));
{
var G__14112 = cljs.core.next.call(null,seq__14048_14102__$1);
var G__14113 = null;
var G__14114 = 0;
var G__14115 = 0;
seq__14048_14089 = G__14112;
chunk__14050_14090 = G__14113;
count__14051_14091 = G__14114;
i__14052_14092 = G__14115;
continue;
}
}
} else
{}
}
break;
}
{
var G__14116 = seq__14038_14082;
var G__14117 = chunk__14045_14083;
var G__14118 = count__14046_14084;
var G__14119 = (i__14047_14085 + 1);
seq__14038_14082 = G__14116;
chunk__14045_14083 = G__14117;
count__14046_14084 = G__14118;
i__14047_14085 = G__14119;
continue;
}
} else
{var temp__4092__auto___14120 = cljs.core.seq.call(null,seq__14038_14082);if(temp__4092__auto___14120)
{var seq__14038_14121__$1 = temp__4092__auto___14120;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14038_14121__$1))
{var c__4262__auto___14122 = cljs.core.chunk_first.call(null,seq__14038_14121__$1);{
var G__14123 = cljs.core.chunk_rest.call(null,seq__14038_14121__$1);
var G__14124 = c__4262__auto___14122;
var G__14125 = cljs.core.count.call(null,c__4262__auto___14122);
var G__14126 = 0;
seq__14038_14082 = G__14123;
chunk__14045_14083 = G__14124;
count__14046_14084 = G__14125;
i__14047_14085 = G__14126;
continue;
}
} else
{var vec__14057_14127 = cljs.core.first.call(null,seq__14038_14121__$1);var tag_14128 = cljs.core.nth.call(null,vec__14057_14127,0,null);var keys_14129 = cljs.core.nth.call(null,vec__14057_14127,1,null);var seq__14039_14130 = cljs.core.seq.call(null,keys_14129);var chunk__14041_14131 = null;var count__14042_14132 = 0;var i__14043_14133 = 0;while(true){
if((i__14043_14133 < count__14042_14132))
{var vec__14058_14134 = cljs.core._nth.call(null,chunk__14041_14131,i__14043_14133);var key_14135 = cljs.core.nth.call(null,vec__14058_14134,0,null);var commands_14136 = cljs.core.nth.call(null,vec__14058_14134,1,null);var tag_vec_14137 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14128,key_14135], null);flat.push(cljs.core.into.call(null,tag_vec_14137,commands_14136));
{
var G__14138 = seq__14039_14130;
var G__14139 = chunk__14041_14131;
var G__14140 = count__14042_14132;
var G__14141 = (i__14043_14133 + 1);
seq__14039_14130 = G__14138;
chunk__14041_14131 = G__14139;
count__14042_14132 = G__14140;
i__14043_14133 = G__14141;
continue;
}
} else
{var temp__4092__auto___14142__$1 = cljs.core.seq.call(null,seq__14039_14130);if(temp__4092__auto___14142__$1)
{var seq__14039_14143__$1 = temp__4092__auto___14142__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14039_14143__$1))
{var c__4262__auto___14144 = cljs.core.chunk_first.call(null,seq__14039_14143__$1);{
var G__14145 = cljs.core.chunk_rest.call(null,seq__14039_14143__$1);
var G__14146 = c__4262__auto___14144;
var G__14147 = cljs.core.count.call(null,c__4262__auto___14144);
var G__14148 = 0;
seq__14039_14130 = G__14145;
chunk__14041_14131 = G__14146;
count__14042_14132 = G__14147;
i__14043_14133 = G__14148;
continue;
}
} else
{var vec__14059_14149 = cljs.core.first.call(null,seq__14039_14143__$1);var key_14150 = cljs.core.nth.call(null,vec__14059_14149,0,null);var commands_14151 = cljs.core.nth.call(null,vec__14059_14149,1,null);var tag_vec_14152 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14128,key_14150], null);flat.push(cljs.core.into.call(null,tag_vec_14152,commands_14151));
{
var G__14153 = cljs.core.next.call(null,seq__14039_14143__$1);
var G__14154 = null;
var G__14155 = 0;
var G__14156 = 0;
seq__14039_14130 = G__14153;
chunk__14041_14131 = G__14154;
count__14042_14132 = G__14155;
i__14043_14133 = G__14156;
continue;
}
}
} else
{}
}
break;
}
{
var G__14157 = cljs.core.next.call(null,seq__14038_14121__$1);
var G__14158 = null;
var G__14159 = 0;
var G__14160 = 0;
seq__14038_14082 = G__14157;
chunk__14045_14083 = G__14158;
count__14046_14084 = G__14159;
i__14047_14085 = G__14160;
continue;
}
}
} else
{}
}
break;
}
var seq__14060_14161 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"-","-",1013904287).cljs$core$IFn$_invoke$arity$1(keymap));var chunk__14067_14162 = null;var count__14068_14163 = 0;var i__14069_14164 = 0;while(true){
if((i__14069_14164 < count__14068_14163))
{var vec__14076_14165 = cljs.core._nth.call(null,chunk__14067_14162,i__14069_14164);var tag_14166 = cljs.core.nth.call(null,vec__14076_14165,0,null);var keys_14167 = cljs.core.nth.call(null,vec__14076_14165,1,null);var seq__14070_14168 = cljs.core.seq.call(null,keys_14167);var chunk__14072_14169 = null;var count__14073_14170 = 0;var i__14074_14171 = 0;while(true){
if((i__14074_14171 < count__14073_14170))
{var key_14172 = cljs.core._nth.call(null,chunk__14072_14169,i__14074_14171);var vec__14077_14173 = ((cljs.core.map_QMARK_.call(null,keys_14167))?key_14172:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_14172,cljs.core.PersistentVector.EMPTY], null));var key_14174__$1 = cljs.core.nth.call(null,vec__14077_14173,0,null);var command_14175 = cljs.core.nth.call(null,vec__14077_14173,1,null);var tag_vec_14176 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14166,[cljs.core.str("-"),cljs.core.str(key_14174__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_14176,command_14175));
{
var G__14177 = seq__14070_14168;
var G__14178 = chunk__14072_14169;
var G__14179 = count__14073_14170;
var G__14180 = (i__14074_14171 + 1);
seq__14070_14168 = G__14177;
chunk__14072_14169 = G__14178;
count__14073_14170 = G__14179;
i__14074_14171 = G__14180;
continue;
}
} else
{var temp__4092__auto___14181 = cljs.core.seq.call(null,seq__14070_14168);if(temp__4092__auto___14181)
{var seq__14070_14182__$1 = temp__4092__auto___14181;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14070_14182__$1))
{var c__4262__auto___14183 = cljs.core.chunk_first.call(null,seq__14070_14182__$1);{
var G__14184 = cljs.core.chunk_rest.call(null,seq__14070_14182__$1);
var G__14185 = c__4262__auto___14183;
var G__14186 = cljs.core.count.call(null,c__4262__auto___14183);
var G__14187 = 0;
seq__14070_14168 = G__14184;
chunk__14072_14169 = G__14185;
count__14073_14170 = G__14186;
i__14074_14171 = G__14187;
continue;
}
} else
{var key_14188 = cljs.core.first.call(null,seq__14070_14182__$1);var vec__14078_14189 = ((cljs.core.map_QMARK_.call(null,keys_14167))?key_14188:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_14188,cljs.core.PersistentVector.EMPTY], null));var key_14190__$1 = cljs.core.nth.call(null,vec__14078_14189,0,null);var command_14191 = cljs.core.nth.call(null,vec__14078_14189,1,null);var tag_vec_14192 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14166,[cljs.core.str("-"),cljs.core.str(key_14190__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_14192,command_14191));
{
var G__14193 = cljs.core.next.call(null,seq__14070_14182__$1);
var G__14194 = null;
var G__14195 = 0;
var G__14196 = 0;
seq__14070_14168 = G__14193;
chunk__14072_14169 = G__14194;
count__14073_14170 = G__14195;
i__14074_14171 = G__14196;
continue;
}
}
} else
{}
}
break;
}
{
var G__14197 = seq__14060_14161;
var G__14198 = chunk__14067_14162;
var G__14199 = count__14068_14163;
var G__14200 = (i__14069_14164 + 1);
seq__14060_14161 = G__14197;
chunk__14067_14162 = G__14198;
count__14068_14163 = G__14199;
i__14069_14164 = G__14200;
continue;
}
} else
{var temp__4092__auto___14201 = cljs.core.seq.call(null,seq__14060_14161);if(temp__4092__auto___14201)
{var seq__14060_14202__$1 = temp__4092__auto___14201;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14060_14202__$1))
{var c__4262__auto___14203 = cljs.core.chunk_first.call(null,seq__14060_14202__$1);{
var G__14204 = cljs.core.chunk_rest.call(null,seq__14060_14202__$1);
var G__14205 = c__4262__auto___14203;
var G__14206 = cljs.core.count.call(null,c__4262__auto___14203);
var G__14207 = 0;
seq__14060_14161 = G__14204;
chunk__14067_14162 = G__14205;
count__14068_14163 = G__14206;
i__14069_14164 = G__14207;
continue;
}
} else
{var vec__14079_14208 = cljs.core.first.call(null,seq__14060_14202__$1);var tag_14209 = cljs.core.nth.call(null,vec__14079_14208,0,null);var keys_14210 = cljs.core.nth.call(null,vec__14079_14208,1,null);var seq__14061_14211 = cljs.core.seq.call(null,keys_14210);var chunk__14063_14212 = null;var count__14064_14213 = 0;var i__14065_14214 = 0;while(true){
if((i__14065_14214 < count__14064_14213))
{var key_14215 = cljs.core._nth.call(null,chunk__14063_14212,i__14065_14214);var vec__14080_14216 = ((cljs.core.map_QMARK_.call(null,keys_14210))?key_14215:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_14215,cljs.core.PersistentVector.EMPTY], null));var key_14217__$1 = cljs.core.nth.call(null,vec__14080_14216,0,null);var command_14218 = cljs.core.nth.call(null,vec__14080_14216,1,null);var tag_vec_14219 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14209,[cljs.core.str("-"),cljs.core.str(key_14217__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_14219,command_14218));
{
var G__14220 = seq__14061_14211;
var G__14221 = chunk__14063_14212;
var G__14222 = count__14064_14213;
var G__14223 = (i__14065_14214 + 1);
seq__14061_14211 = G__14220;
chunk__14063_14212 = G__14221;
count__14064_14213 = G__14222;
i__14065_14214 = G__14223;
continue;
}
} else
{var temp__4092__auto___14224__$1 = cljs.core.seq.call(null,seq__14061_14211);if(temp__4092__auto___14224__$1)
{var seq__14061_14225__$1 = temp__4092__auto___14224__$1;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14061_14225__$1))
{var c__4262__auto___14226 = cljs.core.chunk_first.call(null,seq__14061_14225__$1);{
var G__14227 = cljs.core.chunk_rest.call(null,seq__14061_14225__$1);
var G__14228 = c__4262__auto___14226;
var G__14229 = cljs.core.count.call(null,c__4262__auto___14226);
var G__14230 = 0;
seq__14061_14211 = G__14227;
chunk__14063_14212 = G__14228;
count__14064_14213 = G__14229;
i__14065_14214 = G__14230;
continue;
}
} else
{var key_14231 = cljs.core.first.call(null,seq__14061_14225__$1);var vec__14081_14232 = ((cljs.core.map_QMARK_.call(null,keys_14210))?key_14231:new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_14231,cljs.core.PersistentVector.EMPTY], null));var key_14233__$1 = cljs.core.nth.call(null,vec__14081_14232,0,null);var command_14234 = cljs.core.nth.call(null,vec__14081_14232,1,null);var tag_vec_14235 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_14209,[cljs.core.str("-"),cljs.core.str(key_14233__$1)].join('')], null);flat.push(cljs.core.into.call(null,tag_vec_14235,command_14234));
{
var G__14236 = cljs.core.next.call(null,seq__14061_14225__$1);
var G__14237 = null;
var G__14238 = 0;
var G__14239 = 0;
seq__14061_14211 = G__14236;
chunk__14063_14212 = G__14237;
count__14064_14213 = G__14238;
i__14065_14214 = G__14239;
continue;
}
}
} else
{}
}
break;
}
{
var G__14240 = cljs.core.next.call(null,seq__14060_14202__$1);
var G__14241 = null;
var G__14242 = 0;
var G__14243 = 0;
seq__14060_14161 = G__14240;
chunk__14067_14162 = G__14241;
count__14068_14163 = G__14242;
i__14069_14164 = G__14243;
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__14244_SHARP_){return cljs.core._EQ_.call(null,lt.objs.files.ext.call(null,p1__14244_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));
