// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.sidebar.command');
goog.require('cljs.core');
goog.require('lt.util.cljs');
goog.require('crate.binding');
goog.require('lt.objs.app');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('lt.objs.context');
goog.require('crate.core');
goog.require('lt.objs.context');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('clojure.string');
goog.require('lt.util.cljs');
goog.require('lt.objs.command');
goog.require('lt.objs.app');
goog.require('lt.util.load');
goog.require('clojure.string');
goog.require('crate.binding');
goog.require('lt.objs.keyboard');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.util.load');
goog.require('crate.core');
goog.require('lt.objs.command');
goog.require('lt.objs.keyboard');
lt.util.load.js.call(null,"core/node_modules/lighttable/util/fuzzy.js",new cljs.core.Keyword(null,"sync","sync",1017449997));
lt.objs.sidebar.command.__BEH__op_select_BANG_ = (function __BEH__op_select_BANG_(this$,idx){var input = lt.object.__GT_content.call(null,this$);lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select","select",4402849902),lt.util.dom.val.call(null,input));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"selected","selected",2205476365));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","op-select!","lt.objs.sidebar.command/op-select!",3738729249),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__op_select_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select!","select!",2992004631),null], null), null));
lt.objs.sidebar.command.__BEH__op_clear_BANG_ = (function __BEH__op_clear_BANG_(this$){var input = lt.object.__GT_content.call(null,this$);lt.util.dom.val.call(null,input,"");
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),"");
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","op-clear!","lt.objs.sidebar.command/op-clear!",4705248442),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__op_clear_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"clear!","clear!",3951036134),null], null), null));
lt.objs.sidebar.command.__BEH__op_focus_BANG_ = (function __BEH__op_focus_BANG_(this$){var input = lt.object.__GT_content.call(null,this$);lt.util.dom.focus.call(null,input);
return input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","op-focus!","lt.objs.sidebar.command/op-focus!",597430821),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__op_focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.sidebar.command.__GT_value = (function __GT_value(p__9561){var map__9563 = p__9561;var map__9563__$1 = ((cljs.core.seq_QMARK_.call(null,map__9563))?cljs.core.apply.call(null,cljs.core.hash_map,map__9563):map__9563);var value = cljs.core.get.call(null,map__9563__$1,new cljs.core.Keyword(null,"value","value",1125876963));if(cljs.core.not.call(null,value))
{return "";
} else
{return value;
}
});
lt.objs.sidebar.command.input__GT_value = (function input__GT_value(this$){return lt.util.dom.val.call(null,lt.object.__GT_content.call(null,this$));
});
lt.objs.sidebar.command.op_input = (function op_input(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.option","input.option",1495945867),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"placeholder","placeholder",1612151013)),new cljs.core.Keyword(null,"value","value",1125876963),crate.binding.bound.call(null,this$,lt.objs.sidebar.command.__GT_value)], null)], null));var seq__9570_9576 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (e){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637),this$);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (e){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637),this$);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
}),new cljs.core.Keyword(null,"keyup","keyup",1115849900),(function (e){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),lt.util.dom.val.call(null,me));
})], null)));var chunk__9571_9577 = null;var count__9572_9578 = 0;var i__9573_9579 = 0;while(true){
if((i__9573_9579 < count__9572_9578))
{var vec__9574_9580 = cljs.core._nth.call(null,chunk__9571_9577,i__9573_9579);var ev__3326__auto___9581 = cljs.core.nth.call(null,vec__9574_9580,0,null);var func__3327__auto___9582 = cljs.core.nth.call(null,vec__9574_9580,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9581,func__3327__auto___9582);
{
var G__9583 = seq__9570_9576;
var G__9584 = chunk__9571_9577;
var G__9585 = count__9572_9578;
var G__9586 = (i__9573_9579 + 1);
seq__9570_9576 = G__9583;
chunk__9571_9577 = G__9584;
count__9572_9578 = G__9585;
i__9573_9579 = G__9586;
continue;
}
} else
{var temp__4092__auto___9587 = cljs.core.seq.call(null,seq__9570_9576);if(temp__4092__auto___9587)
{var seq__9570_9588__$1 = temp__4092__auto___9587;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9570_9588__$1))
{var c__4262__auto___9589 = cljs.core.chunk_first.call(null,seq__9570_9588__$1);{
var G__9590 = cljs.core.chunk_rest.call(null,seq__9570_9588__$1);
var G__9591 = c__4262__auto___9589;
var G__9592 = cljs.core.count.call(null,c__4262__auto___9589);
var G__9593 = 0;
seq__9570_9576 = G__9590;
chunk__9571_9577 = G__9591;
count__9572_9578 = G__9592;
i__9573_9579 = G__9593;
continue;
}
} else
{var vec__9575_9594 = cljs.core.first.call(null,seq__9570_9588__$1);var ev__3326__auto___9595 = cljs.core.nth.call(null,vec__9575_9594,0,null);var func__3327__auto___9596 = cljs.core.nth.call(null,vec__9575_9594,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9595,func__3327__auto___9596);
{
var G__9597 = cljs.core.next.call(null,seq__9570_9588__$1);
var G__9598 = null;
var G__9599 = 0;
var G__9600 = 0;
seq__9570_9576 = G__9597;
chunk__9571_9577 = G__9598;
count__9572_9578 = G__9599;
i__9573_9579 = G__9600;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","options-input","lt.objs.sidebar.command/options-input",3682181571),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"options-input","options-input",2975266637),null], null), null),new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"search",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,opts){lt.object.merge_BANG_.call(null,this$,opts);
return lt.objs.sidebar.command.op_input.call(null,this$);
}));
lt.objs.sidebar.command.options_input = (function options_input(opts){var lst = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","options-input","lt.objs.sidebar.command/options-input",3682181571),opts);lt.object.raise.call(null,lst,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
return lst;
});
lt.objs.sidebar.command.input_val = (function input_val(this$){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)));
});
lt.objs.sidebar.command.set_val = (function set_val(this$,v){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)),v);
});
lt.objs.sidebar.command.set_and_select = (function set_and_select(this$,v){lt.objs.sidebar.command.set_val.call(null,this$,v);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),v);
});
lt.objs.sidebar.command.ensure_visible = (function ensure_visible(this$){var list = lt.util.dom.$.call(null,"ul",lt.object.__GT_content.call(null,this$));var elem = lt.util.dom.$.call(null,".selected",list);if((elem.offsetTop < list.scrollTop))
{return list.scrollTop = (elem.offsetTop - 15);
} else
{if(((elem.offsetTop + elem.offsetHeight) > (list.scrollTop + list.clientHeight)))
{return list.scrollTop = (((elem.offsetTop + elem.offsetHeight) + 15) - list.clientHeight);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return null;
} else
{return null;
}
}
}
});
lt.objs.sidebar.command.fill_lis = (function fill_lis(p__9604,results){var map__9618 = p__9604;var map__9618__$1 = ((cljs.core.seq_QMARK_.call(null,map__9618))?cljs.core.apply.call(null,cljs.core.hash_map,map__9618):map__9618);var this$ = map__9618__$1;var transform = cljs.core.get.call(null,map__9618__$1,new cljs.core.Keyword(null,"transform","transform",2066570974));var key = cljs.core.get.call(null,map__9618__$1,new cljs.core.Keyword(null,"key","key",1014010321));var selected = cljs.core.get.call(null,map__9618__$1,new cljs.core.Keyword(null,"selected","selected",2205476365));var search = cljs.core.get.call(null,map__9618__$1,new cljs.core.Keyword(null,"search","search",4402534682));var size = cljs.core.get.call(null,map__9618__$1,new cljs.core.Keyword(null,"size","size",1017434995));var lis = cljs.core.get.call(null,map__9618__$1,new cljs.core.Keyword(null,"lis","lis",1014011400));var cnt = cljs.core.count.call(null,results);var cur = cljs.core.mod.call(null,selected,(((cnt > size))?size:cnt));var transform__$1 = (cljs.core.truth_(transform)?transform:((function (cnt,cur){
return (function (p1__9602_SHARP_,p2__9603_SHARP_,p3__9601_SHARP_){return p3__9601_SHARP_;
});})(cnt,cur))
);if(cljs.core._EQ_.call(null,cnt,0))
{lt.util.dom.add_class.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(this$),new cljs.core.Keyword(null,"empty","empty",1110538431));
} else
{lt.util.dom.remove_class.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(this$),new cljs.core.Keyword(null,"empty","empty",1110538431));
}
var seq__9619_9631 = cljs.core.seq.call(null,cljs.core.map.call(null,cljs.core.vector,cljs.core.range.call(null),lis,results));var chunk__9621_9632 = null;var count__9622_9633 = 0;var i__9623_9634 = 0;while(true){
if((i__9623_9634 < count__9622_9633))
{var vec__9625_9635 = cljs.core._nth.call(null,chunk__9621_9632,i__9623_9634);var i_9636 = cljs.core.nth.call(null,vec__9625_9635,0,null);var li_9637 = cljs.core.nth.call(null,vec__9625_9635,1,null);var res_9638 = cljs.core.nth.call(null,vec__9625_9635,2,null);if(cljs.core.truth_(res_9638))
{lt.util.dom.html.call(null,li_9637,transform__$1.call(null,(res_9638[1]),(res_9638[4]),((!(cljs.core.empty_QMARK_.call(null,search)))?wrapMatch((res_9638[1]),(res_9638[4])):(res_9638[1])),(res_9638[0])));
lt.util.dom.css.call(null,li_9637,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"block"], null));
if(cljs.core._EQ_.call(null,i_9636,cur))
{lt.util.dom.add_class.call(null,li_9637,new cljs.core.Keyword(null,"selected","selected",2205476365));
} else
{lt.util.dom.remove_class.call(null,li_9637,new cljs.core.Keyword(null,"selected","selected",2205476365));
}
{
var G__9639 = seq__9619_9631;
var G__9640 = chunk__9621_9632;
var G__9641 = count__9622_9633;
var G__9642 = (i__9623_9634 + 1);
seq__9619_9631 = G__9639;
chunk__9621_9632 = G__9640;
count__9622_9633 = G__9641;
i__9623_9634 = G__9642;
continue;
}
} else
{{
var G__9643 = seq__9619_9631;
var G__9644 = chunk__9621_9632;
var G__9645 = count__9622_9633;
var G__9646 = (i__9623_9634 + 1);
seq__9619_9631 = G__9643;
chunk__9621_9632 = G__9644;
count__9622_9633 = G__9645;
i__9623_9634 = G__9646;
continue;
}
}
} else
{var temp__4092__auto___9647 = cljs.core.seq.call(null,seq__9619_9631);if(temp__4092__auto___9647)
{var seq__9619_9648__$1 = temp__4092__auto___9647;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9619_9648__$1))
{var c__4262__auto___9649 = cljs.core.chunk_first.call(null,seq__9619_9648__$1);{
var G__9650 = cljs.core.chunk_rest.call(null,seq__9619_9648__$1);
var G__9651 = c__4262__auto___9649;
var G__9652 = cljs.core.count.call(null,c__4262__auto___9649);
var G__9653 = 0;
seq__9619_9631 = G__9650;
chunk__9621_9632 = G__9651;
count__9622_9633 = G__9652;
i__9623_9634 = G__9653;
continue;
}
} else
{var vec__9626_9654 = cljs.core.first.call(null,seq__9619_9648__$1);var i_9655 = cljs.core.nth.call(null,vec__9626_9654,0,null);var li_9656 = cljs.core.nth.call(null,vec__9626_9654,1,null);var res_9657 = cljs.core.nth.call(null,vec__9626_9654,2,null);if(cljs.core.truth_(res_9657))
{lt.util.dom.html.call(null,li_9656,transform__$1.call(null,(res_9657[1]),(res_9657[4]),((!(cljs.core.empty_QMARK_.call(null,search)))?wrapMatch((res_9657[1]),(res_9657[4])):(res_9657[1])),(res_9657[0])));
lt.util.dom.css.call(null,li_9656,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"block"], null));
if(cljs.core._EQ_.call(null,i_9655,cur))
{lt.util.dom.add_class.call(null,li_9656,new cljs.core.Keyword(null,"selected","selected",2205476365));
} else
{lt.util.dom.remove_class.call(null,li_9656,new cljs.core.Keyword(null,"selected","selected",2205476365));
}
{
var G__9658 = cljs.core.next.call(null,seq__9619_9648__$1);
var G__9659 = null;
var G__9660 = 0;
var G__9661 = 0;
seq__9619_9631 = G__9658;
chunk__9621_9632 = G__9659;
count__9622_9633 = G__9660;
i__9623_9634 = G__9661;
continue;
}
} else
{{
var G__9662 = cljs.core.next.call(null,seq__9619_9648__$1);
var G__9663 = null;
var G__9664 = 0;
var G__9665 = 0;
seq__9619_9631 = G__9662;
chunk__9621_9632 = G__9663;
count__9622_9633 = G__9664;
i__9623_9634 = G__9665;
continue;
}
}
}
} else
{}
}
break;
}
var seq__9627 = cljs.core.seq.call(null,cljs.core.drop.call(null,cnt,lis));var chunk__9628 = null;var count__9629 = 0;var i__9630 = 0;while(true){
if((i__9630 < count__9629))
{var li = cljs.core._nth.call(null,chunk__9628,i__9630);lt.util.dom.css.call(null,li,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"none"], null));
{
var G__9666 = seq__9627;
var G__9667 = chunk__9628;
var G__9668 = count__9629;
var G__9669 = (i__9630 + 1);
seq__9627 = G__9666;
chunk__9628 = G__9667;
count__9629 = G__9668;
i__9630 = G__9669;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__9627);if(temp__4092__auto__)
{var seq__9627__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9627__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__9627__$1);{
var G__9670 = cljs.core.chunk_rest.call(null,seq__9627__$1);
var G__9671 = c__4262__auto__;
var G__9672 = cljs.core.count.call(null,c__4262__auto__);
var G__9673 = 0;
seq__9627 = G__9670;
chunk__9628 = G__9671;
count__9629 = G__9672;
i__9630 = G__9673;
continue;
}
} else
{var li = cljs.core.first.call(null,seq__9627__$1);lt.util.dom.css.call(null,li,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"none"], null));
{
var G__9674 = cljs.core.next.call(null,seq__9627__$1);
var G__9675 = null;
var G__9676 = 0;
var G__9677 = 0;
seq__9627 = G__9674;
chunk__9628 = G__9675;
count__9629 = G__9676;
i__9630 = G__9677;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.objs.sidebar.command.__BEH__move_selection = (function __BEH__move_selection(this$,dir){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"set-selection!","set-selection!",4610208210),(dir + new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));
return lt.objs.sidebar.command.ensure_visible.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","move-selection","lt.objs.sidebar.command/move-selection",3585134442),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__move_selection,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"move-selection","move-selection",2808852994),null], null), null));
lt.objs.sidebar.command.__BEH__set_selection_BANG_ = (function __BEH__set_selection_BANG_(this$,idx){var cnt = cljs.core.count.call(null,new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var neue_idx = (((cnt > 0))?cljs.core.mod.call(null,idx,(((cnt > new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))?new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)):cnt)):null);if(cljs.core.truth_(neue_idx))
{var old = cljs.core.nth.call(null,new cljs.core.Keyword(null,"lis","lis",1014011400).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var neue = cljs.core.nth.call(null,new cljs.core.Keyword(null,"lis","lis",1014011400).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),neue_idx);if(cljs.core.truth_(neue))
{lt.util.dom.remove_class.call(null,old,new cljs.core.Keyword(null,"selected","selected",2205476365));
lt.util.dom.add_class.call(null,neue,new cljs.core.Keyword(null,"selected","selected",2205476365));
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"selected","selected",2205476365),neue_idx], null));
} else
{return null;
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","set-selection!","lt.objs.sidebar.command/set-selection!",991317818),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__set_selection_BANG_,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-selection!","set-selection!",4610208210),null], null), null));
lt.objs.sidebar.command.__BEH__change_BANG_ = (function __BEH__change_BANG_(this$,v){var v__$1 = lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"change+","change+",1752847853),v);if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),v__$1))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"selected","selected",2205476365),0,new cljs.core.Keyword(null,"search","search",4402534682),v__$1], null));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","change!","lt.objs.sidebar.command/change!",2493907785),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__change_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"change!","change!",1752847843),null], null), null));
lt.objs.sidebar.command.__BEH__escape_BANG_ = (function __BEH__escape_BANG_(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"close-sidebar","close-sidebar",1108494329));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","escape!","lt.objs.sidebar.command/escape!",4419624474),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__escape_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"escape!","escape!",3844244274),null], null), null));
lt.objs.sidebar.command.__BEH__options_escape_BANG_ = (function __BEH__options_escape_BANG_(this$){lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"cancel!","cancel!",1564120153));
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"close-sidebar","close-sidebar",1108494329));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","options-escape!","lt.objs.sidebar.command/options-escape!",1907886697),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__options_escape_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"escape!","escape!",3844244274),null], null), null));
lt.objs.sidebar.command.__BEH__set_on_select = (function __BEH__set_on_select(this$,thing){if(cljs.core.truth_(new cljs.core.Keyword(null,"set-on-select","set-on-select",3587180657).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.objs.sidebar.command.set_val.call(null,this$,new cljs.core.Keyword(null,"key","key",1014010321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).call(null,thing));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","set-on-select","lt.objs.sidebar.command/set-on-select",4160534751),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__set_on_select,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.objs.sidebar.command.__BEH__select_BANG_ = (function __BEH__select_BANG_(this$,idx){var cur = lt.objs.sidebar.command.indexed_results.call(null,cljs.core.deref.call(null,this$));var cnt = cljs.core.count.call(null,cur);var idx__$1 = (function (){var or__3520__auto__ = idx;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));
}
})();var i = cljs.core.mod.call(null,idx__$1,(((cnt > new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))?new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)):cnt));if((cnt > 0))
{lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select","select",4402849902),((cur[i])[0]));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"selected","selected",2205476365));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select-unknown","select-unknown",2733767659),lt.objs.sidebar.command.input_val.call(null,this$));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","select!","lt.objs.sidebar.command/select!",3665427221),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__select_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select!","select!",2992004631),null], null), null));
lt.objs.sidebar.command.__BEH__filter_active = (function __BEH__filter_active(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-active","lt.objs.sidebar.command/filter-active",3579569891),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__filter_active,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null), null));
lt.objs.sidebar.command.__BEH__filter_inactive = (function __BEH__filter_inactive(this$){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-inactive","lt.objs.sidebar.command/filter-inactive",2320829050),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__filter_inactive,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"inactive","inactive",1038569437),null], null), null));
lt.objs.sidebar.command.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));lt.util.dom.val.call(null,input,"");
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),"");
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","clear!","lt.objs.sidebar.command/clear!",4593594982),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__clear_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"clear!","clear!",3951036134),null], null), null));
lt.objs.sidebar.command.__BEH__filter_list__DOT__focus_BANG_ = (function __BEH__filter_list__DOT__focus_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));lt.util.dom.focus.call(null,input);
return input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-list.focus!","lt.objs.sidebar.command/filter-list.focus!",1166243638),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__filter_list__DOT__focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.sidebar.command.__BEH__update_lis = (function __BEH__update_lis(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cur","cur",1014003122),lt.objs.sidebar.command.indexed_results.call(null,cljs.core.deref.call(null,this$))], null));
return lt.objs.sidebar.command.fill_lis.call(null,cljs.core.deref.call(null,this$),new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","update-lis","lt.objs.sidebar.command/update-lis",1390862956),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__update_lis,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"refresh!","refresh!",4597922840),null], null), null));
lt.objs.sidebar.command.input = (function input(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.search","input.search",1599745982),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"placeholder","placeholder",1612151013)),new cljs.core.Keyword(null,"tabindex","tabindex",4410954191),"0"], null)], null));var seq__9684_9690 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
}),new cljs.core.Keyword(null,"keyup","keyup",1115849900),(function (e){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),lt.util.dom.val.call(null,me));
})], null)));var chunk__9685_9691 = null;var count__9686_9692 = 0;var i__9687_9693 = 0;while(true){
if((i__9687_9693 < count__9686_9692))
{var vec__9688_9694 = cljs.core._nth.call(null,chunk__9685_9691,i__9687_9693);var ev__3326__auto___9695 = cljs.core.nth.call(null,vec__9688_9694,0,null);var func__3327__auto___9696 = cljs.core.nth.call(null,vec__9688_9694,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9695,func__3327__auto___9696);
{
var G__9697 = seq__9684_9690;
var G__9698 = chunk__9685_9691;
var G__9699 = count__9686_9692;
var G__9700 = (i__9687_9693 + 1);
seq__9684_9690 = G__9697;
chunk__9685_9691 = G__9698;
count__9686_9692 = G__9699;
i__9687_9693 = G__9700;
continue;
}
} else
{var temp__4092__auto___9701 = cljs.core.seq.call(null,seq__9684_9690);if(temp__4092__auto___9701)
{var seq__9684_9702__$1 = temp__4092__auto___9701;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9684_9702__$1))
{var c__4262__auto___9703 = cljs.core.chunk_first.call(null,seq__9684_9702__$1);{
var G__9704 = cljs.core.chunk_rest.call(null,seq__9684_9702__$1);
var G__9705 = c__4262__auto___9703;
var G__9706 = cljs.core.count.call(null,c__4262__auto___9703);
var G__9707 = 0;
seq__9684_9690 = G__9704;
chunk__9685_9691 = G__9705;
count__9686_9692 = G__9706;
i__9687_9693 = G__9707;
continue;
}
} else
{var vec__9689_9708 = cljs.core.first.call(null,seq__9684_9702__$1);var ev__3326__auto___9709 = cljs.core.nth.call(null,vec__9689_9708,0,null);var func__3327__auto___9710 = cljs.core.nth.call(null,vec__9689_9708,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9709,func__3327__auto___9710);
{
var G__9711 = cljs.core.next.call(null,seq__9684_9702__$1);
var G__9712 = null;
var G__9713 = 0;
var G__9714 = 0;
seq__9684_9690 = G__9711;
chunk__9685_9691 = G__9712;
count__9686_9692 = G__9713;
i__9687_9693 = G__9714;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.command.__GT_items = (function __GT_items(items){if((function (){var G__9716 = items;if(G__9716)
{var bit__4164__auto__ = (G__9716.cljs$lang$protocol_mask$partition0$ & 32768);if((bit__4164__auto__) || (G__9716.cljs$core$IDeref$))
{return true;
} else
{if((!G__9716.cljs$lang$protocol_mask$partition0$))
{return cljs.core.native_satisfies_QMARK_.call(null,cljs.core.IDeref,G__9716);
} else
{return false;
}
}
} else
{return cljs.core.native_satisfies_QMARK_.call(null,cljs.core.IDeref,G__9716);
}
})())
{return cljs.core.deref.call(null,items);
} else
{if(cljs.core.fn_QMARK_.call(null,items))
{return items.call(null);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return items;
} else
{return null;
}
}
}
});
lt.objs.sidebar.command.score_sort = (function score_sort(x,y){return ((y[3]) - (x[3]));
});
lt.objs.sidebar.command.score_sort2 = (function score_sort2(x,y){return ((y[4]).score - (x[4]).score);
});
lt.objs.sidebar.command.indexed_results = (function indexed_results(p__9723){var map__9725 = p__9723;var map__9725__$1 = ((cljs.core.seq_QMARK_.call(null,map__9725))?cljs.core.apply.call(null,cljs.core.hash_map,map__9725):map__9725);var key = cljs.core.get.call(null,map__9725__$1,new cljs.core.Keyword(null,"key","key",1014010321));var items = cljs.core.get.call(null,map__9725__$1,new cljs.core.Keyword(null,"items","items",1114430258));var size = cljs.core.get.call(null,map__9725__$1,new cljs.core.Keyword(null,"size","size",1017434995));var search = cljs.core.get.call(null,map__9725__$1,new cljs.core.Keyword(null,"search","search",4402534682));var items__$1 = cljs.core.apply.call(null,cljs.core.array,lt.objs.sidebar.command.__GT_items.call(null,items));var map_func3 = ((function (items__$1){
return (function (p1__9717_SHARP_){return [p1__9717_SHARP_,key.call(null,p1__9717_SHARP_),fastScore(key.call(null,p1__9717_SHARP_),search),null,null];
});})(items__$1))
;var map_func = ((function (items__$1,map_func3){
return (function (p1__9718_SHARP_){(p1__9718_SHARP_[3] = (p1__9718_SHARP_[1]).score(search));
return p1__9718_SHARP_;
});})(items__$1,map_func3))
;var map_func2 = ((function (items__$1,map_func3,map_func){
return (function (p1__9719_SHARP_){(p1__9719_SHARP_[4] = score((p1__9719_SHARP_[1]),search));
return p1__9719_SHARP_;
});})(items__$1,map_func3,map_func))
;var has_score = ((function (items__$1,map_func3,map_func,map_func2){
return (function (p1__9720_SHARP_){return ((p1__9720_SHARP_[4]).score > 0);
});})(items__$1,map_func3,map_func,map_func2))
;if(!(cljs.core.empty_QMARK_.call(null,search)))
{var score0 = items__$1.map(map_func3).filter((function (p1__9721_SHARP_){return (p1__9721_SHARP_[2]);
}));var score1 = score0.map(map_func).sort(lt.objs.sidebar.command.score_sort);var score2 = score1.slice(0,50).map(map_func2).filter(has_score).sort(lt.objs.sidebar.command.score_sort2);return score2;
} else
{return items__$1.map((function (p1__9722_SHARP_){return [p1__9722_SHARP_,key.call(null,p1__9722_SHARP_),null,null];
}));
}
});
lt.objs.sidebar.command.current_selected = (function current_selected(this$){var cur = lt.objs.sidebar.command.indexed_results.call(null,cljs.core.deref.call(null,this$));var cnt = cljs.core.count.call(null,cur);var idx = new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var i = cljs.core.mod.call(null,idx,(((cnt > new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))?new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)):cnt));if((cnt > 0))
{return ((cur[i])[0]);
} else
{return null;
}
});
lt.objs.sidebar.command.item = (function item(this$,x){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"index","index",1114250308),x], null)], null));var seq__9732_9738 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"mousedown","mousedown",1600748089),(function (e){lt.util.dom.prevent.call(null,e);
lt.util.dom.stop_propagation.call(null,e);
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"set-selection!","set-selection!",4610208210),x);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select!","select!",2992004631),x);
})], null)));var chunk__9733_9739 = null;var count__9734_9740 = 0;var i__9735_9741 = 0;while(true){
if((i__9735_9741 < count__9734_9740))
{var vec__9736_9742 = cljs.core._nth.call(null,chunk__9733_9739,i__9735_9741);var ev__3326__auto___9743 = cljs.core.nth.call(null,vec__9736_9742,0,null);var func__3327__auto___9744 = cljs.core.nth.call(null,vec__9736_9742,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9743,func__3327__auto___9744);
{
var G__9745 = seq__9732_9738;
var G__9746 = chunk__9733_9739;
var G__9747 = count__9734_9740;
var G__9748 = (i__9735_9741 + 1);
seq__9732_9738 = G__9745;
chunk__9733_9739 = G__9746;
count__9734_9740 = G__9747;
i__9735_9741 = G__9748;
continue;
}
} else
{var temp__4092__auto___9749 = cljs.core.seq.call(null,seq__9732_9738);if(temp__4092__auto___9749)
{var seq__9732_9750__$1 = temp__4092__auto___9749;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9732_9750__$1))
{var c__4262__auto___9751 = cljs.core.chunk_first.call(null,seq__9732_9750__$1);{
var G__9752 = cljs.core.chunk_rest.call(null,seq__9732_9750__$1);
var G__9753 = c__4262__auto___9751;
var G__9754 = cljs.core.count.call(null,c__4262__auto___9751);
var G__9755 = 0;
seq__9732_9738 = G__9752;
chunk__9733_9739 = G__9753;
count__9734_9740 = G__9754;
i__9735_9741 = G__9755;
continue;
}
} else
{var vec__9737_9756 = cljs.core.first.call(null,seq__9732_9750__$1);var ev__3326__auto___9757 = cljs.core.nth.call(null,vec__9737_9756,0,null);var func__3327__auto___9758 = cljs.core.nth.call(null,vec__9737_9756,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9757,func__3327__auto___9758);
{
var G__9759 = cljs.core.next.call(null,seq__9732_9750__$1);
var G__9760 = null;
var G__9761 = 0;
var G__9762 = 0;
seq__9732_9738 = G__9759;
chunk__9733_9739 = G__9760;
count__9734_9740 = G__9761;
i__9735_9741 = G__9762;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-list","lt.objs.sidebar.command/filter-list",686625835),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"filter-list","filter-list",4372522309),null], null), null),new cljs.core.Keyword(null,"selected","selected",2205476365),0,new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"search",new cljs.core.Keyword(null,"items","items",1114430258),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"search","search",4402534682),"",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,opts){var opts__$1 = cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"size","size",1017434995),100], null),opts);var lis = (function (){var iter__4231__auto__ = ((function (opts__$1){
return (function iter__9763(s__9764){return (new cljs.core.LazySeq(null,((function (opts__$1){
return (function (){var s__9764__$1 = s__9764;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__9764__$1);if(temp__4092__auto__)
{var s__9764__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__9764__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__9764__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__9766 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__9765 = 0;while(true){
if((i__9765 < size__4230__auto__))
{var x = cljs.core._nth.call(null,c__4229__auto__,i__9765);cljs.core.chunk_append.call(null,b__9766,lt.objs.sidebar.command.item.call(null,this$,x));
{
var G__9767 = (i__9765 + 1);
i__9765 = G__9767;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__9766),iter__9763.call(null,cljs.core.chunk_rest.call(null,s__9764__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__9766),null);
}
} else
{var x = cljs.core.first.call(null,s__9764__$2);return cljs.core.cons.call(null,lt.objs.sidebar.command.item.call(null,this$,x),iter__9763.call(null,cljs.core.rest.call(null,s__9764__$2)));
}
} else
{return null;
}
break;
}
});})(opts__$1))
,null,null));
});})(opts__$1))
;return iter__4231__auto__.call(null,cljs.core.range.call(null,new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(opts__$1)));
})();lt.object.merge_BANG_.call(null,this$,cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"lis","lis",1014011400),cljs.core.vec.call(null,lis)], null),opts__$1));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.filter-list.empty","div.filter-list.empty",3131797703),lt.objs.sidebar.command.input.call(null,this$),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul","ul",1013907977),lis], null)], null);
}));
lt.objs.sidebar.command.filter_list = (function filter_list(opts){var lst = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-list","lt.objs.sidebar.command/filter-list",686625835),opts);lt.object.raise.call(null,lst,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
return lst;
});
lt.objs.sidebar.command.__BEH__select_command = (function __BEH__select_command(this$,sel){var temp__4092__auto__ = lt.objs.command.by_id.call(null,sel);if(cljs.core.truth_(temp__4092__auto__))
{var cmd = temp__4092__auto__;if(cljs.core.truth_(new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd)))
{lt.object.merge_BANG_.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),cmd], null));
return lt.object.raise.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd),new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"exec!","exec!",1110854946),cmd);
lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"selected-exec","selected-exec",2423866357),cmd);
return lt.object.merge_BANG_.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null));
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","select-command","lt.objs.sidebar.command/select-command",4575873636),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__select_command,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.objs.sidebar.command.__BEH__select_hidden = (function __BEH__select_hidden(this$,v){var temp__4092__auto__ = lt.objs.command.by_id.call(null,cljs.core.keyword.call(null,v));if(cljs.core.truth_(temp__4092__auto__))
{var cmd = temp__4092__auto__;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select","select",4402849902),cmd);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","select-hidden","lt.objs.sidebar.command/select-hidden",878710275),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__select_hidden,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select-unknown","select-unknown",2733767659),null], null), null));
lt.objs.sidebar.command.__BEH__post_select_pop = (function __BEH__post_select_pop(this$){if(cljs.core._EQ_.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.sidebar.rightbar))))
{return lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"close!","close!",3951350939),cljs.core.not.call(null,(function (){var or__3520__auto__ = lt.objs.context.in_QMARK_.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.objs.context.in_QMARK_.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637));
}
})()));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","post-select-pop","lt.objs.sidebar.command/post-select-pop",4406886573),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__post_select_pop,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"selected-exec","selected-exec",2423866357),null], null), null));
/**
* @param {...*} var_args
*/
lt.objs.sidebar.command.__BEH__exec_command = (function() { 
var __BEH__exec_command__delegate = function (this$,sel,args){var cmd = lt.objs.command.by_id.call(null,sel);if(cljs.core.not.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd)))
{return cljs.core.apply.call(null,lt.objs.command.exec_BANG_,cmd,args);
} else
{if(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd);if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.seq.call(null,args);
} else
{return and__3508__auto__;
}
})()))
{return cljs.core.apply.call(null,new cljs.core.Keyword(null,"exec","exec",1017031683).cljs$core$IFn$_invoke$arity$1(cmd),args);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"show-commandbar-transient","show-commandbar-transient",3110127655));
return lt.object.raise.call(null,new cljs.core.Keyword(null,"selector","selector",2205476689).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"select","select",4402849902),cmd);
} else
{return null;
}
}
}
};
var __BEH__exec_command = function (this$,sel,var_args){
var args = null;if (arguments.length > 2) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2),0);} 
return __BEH__exec_command__delegate.call(this,this$,sel,args);};
__BEH__exec_command.cljs$lang$maxFixedArity = 2;
__BEH__exec_command.cljs$lang$applyTo = (function (arglist__9768){
var this$ = cljs.core.first(arglist__9768);
arglist__9768 = cljs.core.next(arglist__9768);
var sel = cljs.core.first(arglist__9768);
var args = cljs.core.rest(arglist__9768);
return __BEH__exec_command__delegate(this$,sel,args);
});
__BEH__exec_command.cljs$core$IFn$_invoke$arity$variadic = __BEH__exec_command__delegate;
return __BEH__exec_command;
})()
;
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","exec-command","lt.objs.sidebar.command/exec-command",1772645359),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__exec_command,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"exec!","exec!",1110854946),null], null), null));
lt.objs.sidebar.command.__BEH__exec_active_BANG_ = (function __BEH__exec_active_BANG_(this$,args){var cmd = new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));cljs.core.apply.call(null,new cljs.core.Keyword(null,"exec","exec",1017031683).cljs$core$IFn$_invoke$arity$1(cmd),args);
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"selected-exec","selected-exec",2423866357),cmd);
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","exec-active!","lt.objs.sidebar.command/exec-active!",3886149887),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__exec_active_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"exec-active!","exec-active!",3313422353),null], null), null));
lt.objs.sidebar.command.__BEH__focus_on_show = (function __BEH__focus_on_show(this$){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","focus-on-show","lt.objs.sidebar.command/focus-on-show",2355413928),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__focus_on_show,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.sidebar.command.__BEH__focus_BANG_ = (function __BEH__focus_BANG_(this$){if(cljs.core.not.call(null,new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));lt.util.dom.focus.call(null,input);
return input.select();
} else
{return lt.object.raise.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),new cljs.core.Keyword(null,"focus!","focus!",4039653819));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","focus!","lt.objs.sidebar.command/focus!",4782843825),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.sidebar.command.__BEH__soft_focus_BANG_ = (function __BEH__soft_focus_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));return lt.util.dom.focus.call(null,input);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","soft-focus!","lt.objs.sidebar.command/soft-focus!",1534012590),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__soft_focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"soft-focus!","soft-focus!",824282302),null], null), null));
lt.objs.sidebar.command.__BEH__refresh_BANG_ = (function __BEH__refresh_BANG_(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"selector","selector",2205476689).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","refresh!","lt.objs.sidebar.command/refresh!",978443544),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__refresh_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"refresh!","refresh!",4597922840),null], null), null));
lt.objs.sidebar.command.__BEH__cancel_BANG_ = (function __BEH__cancel_BANG_(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","cancel!","lt.objs.sidebar.command/cancel!",2137375959),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__cancel_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cancel!","cancel!",1564120153),null], null), null));
lt.objs.sidebar.command.header_button = (function header_button(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h2","h2",1013907516),crate.binding.bound.call(null,this$,(function (p1__9769_SHARP_){return new cljs.core.Keyword(null,"desc","desc",1016984067).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(p1__9769_SHARP_));
}))], null));var seq__9776_9782 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"cancel!","cancel!",1564120153));
})], null)));var chunk__9777_9783 = null;var count__9778_9784 = 0;var i__9779_9785 = 0;while(true){
if((i__9779_9785 < count__9778_9784))
{var vec__9780_9786 = cljs.core._nth.call(null,chunk__9777_9783,i__9779_9785);var ev__3326__auto___9787 = cljs.core.nth.call(null,vec__9780_9786,0,null);var func__3327__auto___9788 = cljs.core.nth.call(null,vec__9780_9786,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9787,func__3327__auto___9788);
{
var G__9789 = seq__9776_9782;
var G__9790 = chunk__9777_9783;
var G__9791 = count__9778_9784;
var G__9792 = (i__9779_9785 + 1);
seq__9776_9782 = G__9789;
chunk__9777_9783 = G__9790;
count__9778_9784 = G__9791;
i__9779_9785 = G__9792;
continue;
}
} else
{var temp__4092__auto___9793 = cljs.core.seq.call(null,seq__9776_9782);if(temp__4092__auto___9793)
{var seq__9776_9794__$1 = temp__4092__auto___9793;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9776_9794__$1))
{var c__4262__auto___9795 = cljs.core.chunk_first.call(null,seq__9776_9794__$1);{
var G__9796 = cljs.core.chunk_rest.call(null,seq__9776_9794__$1);
var G__9797 = c__4262__auto___9795;
var G__9798 = cljs.core.count.call(null,c__4262__auto___9795);
var G__9799 = 0;
seq__9776_9782 = G__9796;
chunk__9777_9783 = G__9797;
count__9778_9784 = G__9798;
i__9779_9785 = G__9799;
continue;
}
} else
{var vec__9781_9800 = cljs.core.first.call(null,seq__9776_9794__$1);var ev__3326__auto___9801 = cljs.core.nth.call(null,vec__9781_9800,0,null);var func__3327__auto___9802 = cljs.core.nth.call(null,vec__9781_9800,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9801,func__3327__auto___9802);
{
var G__9803 = cljs.core.next.call(null,seq__9776_9794__$1);
var G__9804 = null;
var G__9805 = 0;
var G__9806 = 0;
seq__9776_9782 = G__9803;
chunk__9777_9783 = G__9804;
count__9778_9784 = G__9805;
i__9779_9785 = G__9806;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.command.__GT_options = (function __GT_options(this$,active){if(cljs.core.truth_(new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(active)))
{return lt.object.__GT_content.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(active));
} else
{return null;
}
});
lt.objs.sidebar.command.__GT_command_class = (function __GT_command_class(this$){return [cljs.core.str("command "),cljs.core.str((cljs.core.truth_(new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(this$))?"options":"selector")),cljs.core.str((cljs.core.truth_(lt.util.dom.has_class_QMARK_.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(this$),new cljs.core.Keyword(null,"active","active",3885920888)))?" active":null))].join('');
});
lt.objs.sidebar.command.__GT_binding = (function __GT_binding(p__9807){var vec__9809 = p__9807;var k = cljs.core.nth.call(null,vec__9809,0,null);var v = cljs.core.nth.call(null,vec__9809,1,null);return [cljs.core.str(v),cljs.core.str(((([cljs.core.str(k)].join('').indexOf("emacs") > -1))?" (Emacs)":null)),cljs.core.str(((([cljs.core.str(k)].join('').indexOf("vim") > -1))?" (Vim)":null))].join('');
});
lt.objs.sidebar.command.command__GT_display = (function command__GT_display(orig,scored,highlighted,item){return [cljs.core.str("<p>"),cljs.core.str(highlighted),cljs.core.str("<p>"),cljs.core.str((function (){var temp__4092__auto__ = cljs.core.seq.call(null,lt.objs.keyboard.cmd__GT_bindings.call(null,item.call(null,new cljs.core.Keyword(null,"command","command",1964298941))));if(temp__4092__auto__)
{var binding = temp__4092__auto__;return [cljs.core.str("<p class='binding'>"),cljs.core.str(clojure.string.join.call(null," | ",cljs.core.map.call(null,lt.objs.sidebar.command.__GT_binding,cljs.core.reverse.call(null,binding)))),cljs.core.str("</p>")].join('');
} else
{return null;
}
})())].join('');
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","sidebar.command","lt.objs.sidebar.command/sidebar.command",4586401569),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"sidebar.command","sidebar.command",3945910827),null], null), null),new cljs.core.Keyword(null,"label","label",1116631654),"command",new cljs.core.Keyword(null,"active","active",3885920888),null,new cljs.core.Keyword(null,"order","order",1119910592),3,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){var commands = crate.binding.subatom.call(null,lt.objs.command.manager,new cljs.core.Keyword(null,"commands","commands",4706336250));var f2 = crate.binding.computed.call(null,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [commands], null),((function (commands){
return (function (cmds){return cljs.core.filter.call(null,((function (commands){
return (function (p1__9810_SHARP_){return cljs.core.not.call(null,new cljs.core.Keyword(null,"hidden","hidden",4091384092).cljs$core$IFn$_invoke$arity$1(p1__9810_SHARP_));
});})(commands))
,cljs.core.vals.call(null,cmds));
});})(commands))
);var s2 = lt.objs.sidebar.command.filter_list.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"items","items",1114430258),f2,new cljs.core.Keyword(null,"transform","transform",2066570974),((function (commands,f2){
return (function (p1__9811_SHARP_,p2__9812_SHARP_,p3__9813_SHARP_,p4__9814_SHARP_){return lt.objs.sidebar.command.command__GT_display.call(null,p1__9811_SHARP_,p2__9812_SHARP_,p3__9813_SHARP_,p4__9814_SHARP_);
});})(commands,f2))
,new cljs.core.Keyword(null,"key","key",1014010321),new cljs.core.Keyword(null,"desc","desc",1016984067)], null));lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"selector","selector",2205476689),s2], null));
lt.object.add_tags.call(null,s2,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"command.selector","command.selector",1674182292)], null));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,lt.objs.sidebar.command.__GT_command_class)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.selector","div.selector",3570198542),lt.object.__GT_content.call(null,s2)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.options","div.options",1332473267),lt.objs.sidebar.command.header_button.call(null,this$),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),crate.binding.bound.call(null,crate.binding.subatom.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888)),(function (p1__9815_SHARP_){return lt.objs.sidebar.command.__GT_options.call(null,this$,p1__9815_SHARP_);
}))], null)], null)], null);
}));
lt.objs.sidebar.command.__BEH__init_commands = (function __BEH__init_commands(app){return lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","init-commands","lt.objs.sidebar.command/init-commands",802745109),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__init_commands,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"post-init","post-init",2970371471),null], null), null));
lt.objs.sidebar.command.sidebar_command = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","sidebar.command","lt.objs.sidebar.command/sidebar.command",4586401569));
lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"commandbar","commandbar",1798064218),lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.add_item.call(null,lt.objs.sidebar.rightbar,lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.command.command = lt.objs.command.command;
lt.objs.sidebar.command.show_and_focus = (function show_and_focus(opts){return lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"toggle","toggle",4440567494),lt.objs.sidebar.command.sidebar_command,opts);
});
lt.objs.sidebar.command.pre_fill = (function pre_fill(v){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,lt.objs.sidebar.command.sidebar_command)),v);
});
lt.objs.sidebar.command.show_filled = (function show_filled(fill,opts){lt.objs.sidebar.command.pre_fill.call(null,fill);
lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"toggle","toggle",4440567494),lt.objs.sidebar.command.sidebar_command,cljs.core.assoc.call(null,opts,new cljs.core.Keyword(null,"soft?","soft?",1123517639),true));
return lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"soft-focus!","soft-focus!",824282302));
});
lt.objs.sidebar.command.exec_BANG_ = lt.objs.command.exec_BANG_;
/**
* @param {...*} var_args
*/
lt.objs.sidebar.command.exec_active_BANG_ = (function() { 
var exec_active_BANG___delegate = function (args){return lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"exec-active!","exec-active!",3313422353),args);
};
var exec_active_BANG_ = function (var_args){
var args = null;if (arguments.length > 0) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);} 
return exec_active_BANG___delegate.call(this,args);};
exec_active_BANG_.cljs$lang$maxFixedArity = 0;
exec_active_BANG_.cljs$lang$applyTo = (function (arglist__9816){
var args = cljs.core.seq(arglist__9816);
return exec_active_BANG___delegate(args);
});
exec_active_BANG_.cljs$core$IFn$_invoke$arity$variadic = exec_active_BANG___delegate;
return exec_active_BANG_;
})()
;
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"show-commandbar","show-commandbar",3043887402),new cljs.core.Keyword(null,"desc","desc",1016984067),"Command: Show command bar",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.show_and_focus.call(null,cljs.core.PersistentArrayMap.EMPTY);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"show-commandbar-transient","show-commandbar-transient",3110127655),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"Command: Show command bar transiently",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.show_and_focus.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"transient?","transient?",3584270951),true], null));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"quit","quit",1017386433),new cljs.core.Keyword(null,"desc","desc",1016984067),"Window: Quit Light Table",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.app.close.call(null);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"passthrough","passthrough",3850081542),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"No-op key passthrough",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.keyboard.passthrough.call(null);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"filter-list.input.move-selection","filter-list.input.move-selection",2715992545),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"FilterList: move selection",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (dir){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401)),new cljs.core.Keyword(null,"move-selection","move-selection",2808852994),dir);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"filter-list.input.select!","filter-list.input.select!",2873744152),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"FilterList: select",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401)),new cljs.core.Keyword(null,"select!","select!",2992004631));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"filter-list.input.escape!","filter-list.input.escape!",3725983795),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"FilterList: escape",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (force_QMARK_){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401)),new cljs.core.Keyword(null,"escape!","escape!",3844244274),force_QMARK_);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"options-input.select!","options-input.select!",4522272516),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"OptionsInput: select",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637)),new cljs.core.Keyword(null,"select!","select!",2992004631));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"options-input.escape!","options-input.escape!",1079544863),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"OptionsInput: escape",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637)),new cljs.core.Keyword(null,"escape!","escape!",3844244274));
})], null));
