// Compiled by ClojureScript 0.0-2138
goog.provide('lt.plugins.doc');
goog.require('cljs.core');
goog.require('lt.util.cljs');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('lt.objs.context');
goog.require('lt.objs.context');
goog.require('lt.objs.notifos');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('lt.objs.editor.pool');
goog.require('lt.util.cljs');
goog.require('lt.objs.command');
goog.require('clojure.set');
goog.require('lt.objs.clients');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('clojure.set');
goog.require('lt.objs.editor');
goog.require('lt.objs.clients');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.command');
lt.plugins.doc.doc_on_line_QMARK_ = (function doc_on_line_QMARK_(editor,line){var line__$1 = lt.objs.editor.line_handle.call(null,editor,line);return cljs.core.get_in.call(null,cljs.core.deref.call(null,editor),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"widgets","widgets",2354242081),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [line__$1,new cljs.core.Keyword(null,"underline","underline",4281907774)], null)], null));
});
lt.plugins.doc.remove_BANG_ = (function remove_BANG_(editor,cur){lt.object.update_BANG_.call(null,editor,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"widgets","widgets",2354242081)], null),cljs.core.dissoc,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur)),new cljs.core.Keyword(null,"underline","underline",4281907774)], null));
return lt.object.raise.call(null,cur,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
});
lt.plugins.doc.__BEH__clear = (function __BEH__clear(this$){return lt.object.update_BANG_.call(null,new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"widgets","widgets",2354242081)], null),cljs.core.dissoc,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"underline","underline",4281907774)], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","clear","lt.plugins.doc/clear",2712503260),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__clear,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",1108650431),null], null), null));
lt.plugins.doc.inline_doc = (function inline_doc(this$,res,opts,loc){var ed = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var type = new cljs.core.Keyword(null,"underline","underline",4281907774);var line = lt.objs.editor.line_handle.call(null,ed,new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(loc));var res_obj = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.eval","underline-result","lt.objs.eval/underline-result",1485297066),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"ed","ed",1013907473),this$,new cljs.core.Keyword(null,"class","class",1108647146),cljs.core.name.call(null,type),new cljs.core.Keyword(null,"opts","opts",1017322386),opts,new cljs.core.Keyword(null,"result","result",4374444943),res,new cljs.core.Keyword(null,"loc","loc",1014011570),loc,new cljs.core.Keyword(null,"line","line",1017226086),line], null));lt.object.add_tags.call(null,res_obj,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"inline.doc","inline.doc",1790840789)], null));
lt.object.update_BANG_.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"widgets","widgets",2354242081)], null),cljs.core.assoc,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [line,new cljs.core.Keyword(null,"underline","underline",4281907774)], null),res_obj);
return res_obj;
});
lt.plugins.doc.__BEH__doc_menu_PLUS_ = (function __BEH__doc_menu_PLUS_(this$,items){return cljs.core.conj.call(null,items,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"label","label",1116631654),"Toggle docs",new cljs.core.Keyword(null,"order","order",1119910592),0.1,new cljs.core.Keyword(null,"enabled","enabled",3699277491),cljs.core.not.call(null,lt.objs.editor.selection_QMARK_.call(null,this$)),new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.doc.toggle","editor.doc.toggle",687720285));
})], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"separator",new cljs.core.Keyword(null,"order","order",1119910592),0.2], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","doc-menu+","lt.plugins.doc/doc-menu+",4142609518),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__doc_menu_PLUS_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu+","menu+",1117686302),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,"editor.doc.toggle","editor.doc.toggle",687720285),new cljs.core.Keyword(null,"desc","desc",1016984067),"Docs: Toggle documentation at cursor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var loc = lt.objs.editor.__GT_cursor.call(null,ed);var temp__4090__auto__ = lt.plugins.doc.doc_on_line_QMARK_.call(null,ed,new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(loc));if(cljs.core.truth_(temp__4090__auto__))
{var cur = temp__4090__auto__;return lt.plugins.doc.remove_BANG_.call(null,ed,cur);
} else
{return lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"editor.doc","editor.doc",3751347369));
}
} else
{return null;
}
})], null));
lt.plugins.doc.doc_ui = (function doc_ui(doc){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.inline-doc","div.inline-doc",3323486451),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h1","h1",1013907515),new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(doc)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h2","h2",1013907516),new cljs.core.Keyword(null,"ns","ns",1013907767).cljs$core$IFn$_invoke$arity$1(doc)], null),(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"args","args",1016906831).cljs$core$IFn$_invoke$arity$1(doc);if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.not_EQ_.call(null,new cljs.core.Keyword(null,"args","args",1016906831).cljs$core$IFn$_invoke$arity$1(doc),"nil");
} else
{return and__3508__auto__;
}
})())?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h3","h3",1013907517),new cljs.core.Keyword(null,"args","args",1016906831).cljs$core$IFn$_invoke$arity$1(doc)], null):null),(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"doc","doc",1014003882).cljs$core$IFn$_invoke$arity$1(doc);if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.not_EQ_.call(null,new cljs.core.Keyword(null,"doc","doc",1014003882).cljs$core$IFn$_invoke$arity$1(doc),"nil");
} else
{return and__3508__auto__;
}
})())?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pre","pre",1014015509),new cljs.core.Keyword(null,"doc","doc",1014003882).cljs$core$IFn$_invoke$arity$1(doc)], null):null)], null));var seq__6819_6825 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__6820_6826 = null;var count__6821_6827 = 0;var i__6822_6828 = 0;while(true){
if((i__6822_6828 < count__6821_6827))
{var vec__6823_6829 = cljs.core._nth.call(null,chunk__6820_6826,i__6822_6828);var ev__3326__auto___6830 = cljs.core.nth.call(null,vec__6823_6829,0,null);var func__3327__auto___6831 = cljs.core.nth.call(null,vec__6823_6829,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6830,func__3327__auto___6831);
{
var G__6832 = seq__6819_6825;
var G__6833 = chunk__6820_6826;
var G__6834 = count__6821_6827;
var G__6835 = (i__6822_6828 + 1);
seq__6819_6825 = G__6832;
chunk__6820_6826 = G__6833;
count__6821_6827 = G__6834;
i__6822_6828 = G__6835;
continue;
}
} else
{var temp__4092__auto___6836 = cljs.core.seq.call(null,seq__6819_6825);if(temp__4092__auto___6836)
{var seq__6819_6837__$1 = temp__4092__auto___6836;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6819_6837__$1))
{var c__4262__auto___6838 = cljs.core.chunk_first.call(null,seq__6819_6837__$1);{
var G__6839 = cljs.core.chunk_rest.call(null,seq__6819_6837__$1);
var G__6840 = c__4262__auto___6838;
var G__6841 = cljs.core.count.call(null,c__4262__auto___6838);
var G__6842 = 0;
seq__6819_6825 = G__6839;
chunk__6820_6826 = G__6840;
count__6821_6827 = G__6841;
i__6822_6828 = G__6842;
continue;
}
} else
{var vec__6824_6843 = cljs.core.first.call(null,seq__6819_6837__$1);var ev__3326__auto___6844 = cljs.core.nth.call(null,vec__6824_6843,0,null);var func__3327__auto___6845 = cljs.core.nth.call(null,vec__6824_6843,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6844,func__3327__auto___6845);
{
var G__6846 = cljs.core.next.call(null,seq__6819_6837__$1);
var G__6847 = null;
var G__6848 = 0;
var G__6849 = 0;
seq__6819_6825 = G__6846;
chunk__6820_6826 = G__6847;
count__6821_6827 = G__6848;
i__6822_6828 = G__6849;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.__BEH__editor__DOT__doc__DOT__show_BANG_ = (function __BEH__editor__DOT__doc__DOT__show_BANG_(editor,doc){if(cljs.core.not_EQ_.call(null,new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(doc),""))
{return lt.plugins.doc.inline_doc.call(null,editor,lt.plugins.doc.doc_ui.call(null,doc),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"loc","loc",1014011570).cljs$core$IFn$_invoke$arity$1(doc));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","editor.doc.show!","lt.plugins.doc/editor.doc.show!",2617163484),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__editor__DOT__doc__DOT__show_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,"editor.doc.show!","editor.doc.show!",1417900223),null], null), null));
lt.plugins.doc.search_item = (function search_item(item){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h2","h2",1013907516),new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(item)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h3","h3",1013907517),new cljs.core.Keyword(null,"ns","ns",1013907767).cljs$core$IFn$_invoke$arity$1(item)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pre","pre",1014015509),[cljs.core.str(new cljs.core.Keyword(null,"args","args",1016906831).cljs$core$IFn$_invoke$arity$1(item))].join('')], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pre","pre",1014015509),new cljs.core.Keyword(null,"doc","doc",1014003882).cljs$core$IFn$_invoke$arity$1(item)], null)], null));var seq__6856_6862 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__6857_6863 = null;var count__6858_6864 = 0;var i__6859_6865 = 0;while(true){
if((i__6859_6865 < count__6858_6864))
{var vec__6860_6866 = cljs.core._nth.call(null,chunk__6857_6863,i__6859_6865);var ev__3326__auto___6867 = cljs.core.nth.call(null,vec__6860_6866,0,null);var func__3327__auto___6868 = cljs.core.nth.call(null,vec__6860_6866,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6867,func__3327__auto___6868);
{
var G__6869 = seq__6856_6862;
var G__6870 = chunk__6857_6863;
var G__6871 = count__6858_6864;
var G__6872 = (i__6859_6865 + 1);
seq__6856_6862 = G__6869;
chunk__6857_6863 = G__6870;
count__6858_6864 = G__6871;
i__6859_6865 = G__6872;
continue;
}
} else
{var temp__4092__auto___6873 = cljs.core.seq.call(null,seq__6856_6862);if(temp__4092__auto___6873)
{var seq__6856_6874__$1 = temp__4092__auto___6873;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6856_6874__$1))
{var c__4262__auto___6875 = cljs.core.chunk_first.call(null,seq__6856_6874__$1);{
var G__6876 = cljs.core.chunk_rest.call(null,seq__6856_6874__$1);
var G__6877 = c__4262__auto___6875;
var G__6878 = cljs.core.count.call(null,c__4262__auto___6875);
var G__6879 = 0;
seq__6856_6862 = G__6876;
chunk__6857_6863 = G__6877;
count__6858_6864 = G__6878;
i__6859_6865 = G__6879;
continue;
}
} else
{var vec__6861_6880 = cljs.core.first.call(null,seq__6856_6874__$1);var ev__3326__auto___6881 = cljs.core.nth.call(null,vec__6861_6880,0,null);var func__3327__auto___6882 = cljs.core.nth.call(null,vec__6861_6880,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6881,func__3327__auto___6882);
{
var G__6883 = cljs.core.next.call(null,seq__6856_6874__$1);
var G__6884 = null;
var G__6885 = 0;
var G__6886 = 0;
seq__6856_6862 = G__6883;
chunk__6857_6863 = G__6884;
count__6858_6864 = G__6885;
i__6859_6865 = G__6886;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.search_input = (function search_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, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"search docs"], null)], null));var seq__6893_6899 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"sidebar.doc.search.input","sidebar.doc.search.input",4629011646),this$);
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"sidebar.doc.search.input","sidebar.doc.search.input",4629011646));
})], null)));var chunk__6894_6900 = null;var count__6895_6901 = 0;var i__6896_6902 = 0;while(true){
if((i__6896_6902 < count__6895_6901))
{var vec__6897_6903 = cljs.core._nth.call(null,chunk__6894_6900,i__6896_6902);var ev__3326__auto___6904 = cljs.core.nth.call(null,vec__6897_6903,0,null);var func__3327__auto___6905 = cljs.core.nth.call(null,vec__6897_6903,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6904,func__3327__auto___6905);
{
var G__6906 = seq__6893_6899;
var G__6907 = chunk__6894_6900;
var G__6908 = count__6895_6901;
var G__6909 = (i__6896_6902 + 1);
seq__6893_6899 = G__6906;
chunk__6894_6900 = G__6907;
count__6895_6901 = G__6908;
i__6896_6902 = G__6909;
continue;
}
} else
{var temp__4092__auto___6910 = cljs.core.seq.call(null,seq__6893_6899);if(temp__4092__auto___6910)
{var seq__6893_6911__$1 = temp__4092__auto___6910;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6893_6911__$1))
{var c__4262__auto___6912 = cljs.core.chunk_first.call(null,seq__6893_6911__$1);{
var G__6913 = cljs.core.chunk_rest.call(null,seq__6893_6911__$1);
var G__6914 = c__4262__auto___6912;
var G__6915 = cljs.core.count.call(null,c__4262__auto___6912);
var G__6916 = 0;
seq__6893_6899 = G__6913;
chunk__6894_6900 = G__6914;
count__6895_6901 = G__6915;
i__6896_6902 = G__6916;
continue;
}
} else
{var vec__6898_6917 = cljs.core.first.call(null,seq__6893_6911__$1);var ev__3326__auto___6918 = cljs.core.nth.call(null,vec__6898_6917,0,null);var func__3327__auto___6919 = cljs.core.nth.call(null,vec__6898_6917,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6918,func__3327__auto___6919);
{
var G__6920 = cljs.core.next.call(null,seq__6893_6911__$1);
var G__6921 = null;
var G__6922 = 0;
var G__6923 = 0;
seq__6893_6899 = G__6920;
chunk__6894_6900 = G__6921;
count__6895_6901 = G__6922;
i__6896_6902 = G__6923;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.type_item = (function type_item(this$,i){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.Keyword(null,"label","label",1116631654).cljs$core$IFn$_invoke$arity$1(i)], null));var seq__6930_6936 = 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,"set-item!","set-item!",4800272821),i);
})], null)));var chunk__6931_6937 = null;var count__6932_6938 = 0;var i__6933_6939 = 0;while(true){
if((i__6933_6939 < count__6932_6938))
{var vec__6934_6940 = cljs.core._nth.call(null,chunk__6931_6937,i__6933_6939);var ev__3326__auto___6941 = cljs.core.nth.call(null,vec__6934_6940,0,null);var func__3327__auto___6942 = cljs.core.nth.call(null,vec__6934_6940,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6941,func__3327__auto___6942);
{
var G__6943 = seq__6930_6936;
var G__6944 = chunk__6931_6937;
var G__6945 = count__6932_6938;
var G__6946 = (i__6933_6939 + 1);
seq__6930_6936 = G__6943;
chunk__6931_6937 = G__6944;
count__6932_6938 = G__6945;
i__6933_6939 = G__6946;
continue;
}
} else
{var temp__4092__auto___6947 = cljs.core.seq.call(null,seq__6930_6936);if(temp__4092__auto___6947)
{var seq__6930_6948__$1 = temp__4092__auto___6947;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6930_6948__$1))
{var c__4262__auto___6949 = cljs.core.chunk_first.call(null,seq__6930_6948__$1);{
var G__6950 = cljs.core.chunk_rest.call(null,seq__6930_6948__$1);
var G__6951 = c__4262__auto___6949;
var G__6952 = cljs.core.count.call(null,c__4262__auto___6949);
var G__6953 = 0;
seq__6930_6936 = G__6950;
chunk__6931_6937 = G__6951;
count__6932_6938 = G__6952;
i__6933_6939 = G__6953;
continue;
}
} else
{var vec__6935_6954 = cljs.core.first.call(null,seq__6930_6948__$1);var ev__3326__auto___6955 = cljs.core.nth.call(null,vec__6935_6954,0,null);var func__3327__auto___6956 = cljs.core.nth.call(null,vec__6935_6954,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6955,func__3327__auto___6956);
{
var G__6957 = cljs.core.next.call(null,seq__6930_6948__$1);
var G__6958 = null;
var G__6959 = 0;
var G__6960 = 0;
seq__6930_6936 = G__6957;
chunk__6931_6937 = G__6958;
count__6932_6938 = G__6959;
i__6933_6939 = G__6960;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.type_list = (function type_list(this$){var e__3325__auto__ = crate.core.html.call(null,(function (){var types = lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"types+","types+",4450069060),cljs.core.PersistentVector.EMPTY);var cur = (function (){var or__3520__auto__ = new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.first.call(null,types);
}
})();return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.types","div.types",2042580046),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),new cljs.core.Keyword(null,"label","label",1116631654).cljs$core$IFn$_invoke$arity$1(cur)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.types","ul.types",1553185236),cljs.core.map.call(null,cljs.core.partial.call(null,lt.plugins.doc.type_item,this$),types)], null)], null);
})());var seq__6967_6973 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__6968_6974 = null;var count__6969_6975 = 0;var i__6970_6976 = 0;while(true){
if((i__6970_6976 < count__6969_6975))
{var vec__6971_6977 = cljs.core._nth.call(null,chunk__6968_6974,i__6970_6976);var ev__3326__auto___6978 = cljs.core.nth.call(null,vec__6971_6977,0,null);var func__3327__auto___6979 = cljs.core.nth.call(null,vec__6971_6977,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6978,func__3327__auto___6979);
{
var G__6980 = seq__6967_6973;
var G__6981 = chunk__6968_6974;
var G__6982 = count__6969_6975;
var G__6983 = (i__6970_6976 + 1);
seq__6967_6973 = G__6980;
chunk__6968_6974 = G__6981;
count__6969_6975 = G__6982;
i__6970_6976 = G__6983;
continue;
}
} else
{var temp__4092__auto___6984 = cljs.core.seq.call(null,seq__6967_6973);if(temp__4092__auto___6984)
{var seq__6967_6985__$1 = temp__4092__auto___6984;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6967_6985__$1))
{var c__4262__auto___6986 = cljs.core.chunk_first.call(null,seq__6967_6985__$1);{
var G__6987 = cljs.core.chunk_rest.call(null,seq__6967_6985__$1);
var G__6988 = c__4262__auto___6986;
var G__6989 = cljs.core.count.call(null,c__4262__auto___6986);
var G__6990 = 0;
seq__6967_6973 = G__6987;
chunk__6968_6974 = G__6988;
count__6969_6975 = G__6989;
i__6970_6976 = G__6990;
continue;
}
} else
{var vec__6972_6991 = cljs.core.first.call(null,seq__6967_6985__$1);var ev__3326__auto___6992 = cljs.core.nth.call(null,vec__6972_6991,0,null);var func__3327__auto___6993 = cljs.core.nth.call(null,vec__6972_6991,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6992,func__3327__auto___6993);
{
var G__6994 = cljs.core.next.call(null,seq__6967_6985__$1);
var G__6995 = null;
var G__6996 = 0;
var G__6997 = 0;
seq__6967_6973 = G__6994;
chunk__6968_6974 = G__6995;
count__6969_6975 = G__6996;
i__6970_6976 = G__6997;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.connect_button = (function connect_button(){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,"button","button",3931183780),"Connect"], null));var seq__7004_7010 = 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.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"show-add-connection","show-add-connection",3671605196));
})], null)));var chunk__7005_7011 = null;var count__7006_7012 = 0;var i__7007_7013 = 0;while(true){
if((i__7007_7013 < count__7006_7012))
{var vec__7008_7014 = cljs.core._nth.call(null,chunk__7005_7011,i__7007_7013);var ev__3326__auto___7015 = cljs.core.nth.call(null,vec__7008_7014,0,null);var func__3327__auto___7016 = cljs.core.nth.call(null,vec__7008_7014,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7015,func__3327__auto___7016);
{
var G__7017 = seq__7004_7010;
var G__7018 = chunk__7005_7011;
var G__7019 = count__7006_7012;
var G__7020 = (i__7007_7013 + 1);
seq__7004_7010 = G__7017;
chunk__7005_7011 = G__7018;
count__7006_7012 = G__7019;
i__7007_7013 = G__7020;
continue;
}
} else
{var temp__4092__auto___7021 = cljs.core.seq.call(null,seq__7004_7010);if(temp__4092__auto___7021)
{var seq__7004_7022__$1 = temp__4092__auto___7021;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7004_7022__$1))
{var c__4262__auto___7023 = cljs.core.chunk_first.call(null,seq__7004_7022__$1);{
var G__7024 = cljs.core.chunk_rest.call(null,seq__7004_7022__$1);
var G__7025 = c__4262__auto___7023;
var G__7026 = cljs.core.count.call(null,c__4262__auto___7023);
var G__7027 = 0;
seq__7004_7010 = G__7024;
chunk__7005_7011 = G__7025;
count__7006_7012 = G__7026;
i__7007_7013 = G__7027;
continue;
}
} else
{var vec__7009_7028 = cljs.core.first.call(null,seq__7004_7022__$1);var ev__3326__auto___7029 = cljs.core.nth.call(null,vec__7009_7028,0,null);var func__3327__auto___7030 = cljs.core.nth.call(null,vec__7009_7028,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7029,func__3327__auto___7030);
{
var G__7031 = cljs.core.next.call(null,seq__7004_7022__$1);
var G__7032 = null;
var G__7033 = 0;
var G__7034 = 0;
seq__7004_7010 = G__7031;
chunk__7005_7011 = G__7032;
count__7006_7012 = G__7033;
i__7007_7013 = G__7034;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.no_client_ui = (function no_client_ui(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.no-client","div.no-client",3517747116),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p","p",1013904354),"There's no client for us to use to search for these kinds of docs. "], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p","p",1013904354),lt.plugins.doc.connect_button.call(null)," to one."], null)], null));var seq__7041_7047 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__7042_7048 = null;var count__7043_7049 = 0;var i__7044_7050 = 0;while(true){
if((i__7044_7050 < count__7043_7049))
{var vec__7045_7051 = cljs.core._nth.call(null,chunk__7042_7048,i__7044_7050);var ev__3326__auto___7052 = cljs.core.nth.call(null,vec__7045_7051,0,null);var func__3327__auto___7053 = cljs.core.nth.call(null,vec__7045_7051,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7052,func__3327__auto___7053);
{
var G__7054 = seq__7041_7047;
var G__7055 = chunk__7042_7048;
var G__7056 = count__7043_7049;
var G__7057 = (i__7044_7050 + 1);
seq__7041_7047 = G__7054;
chunk__7042_7048 = G__7055;
count__7043_7049 = G__7056;
i__7044_7050 = G__7057;
continue;
}
} else
{var temp__4092__auto___7058 = cljs.core.seq.call(null,seq__7041_7047);if(temp__4092__auto___7058)
{var seq__7041_7059__$1 = temp__4092__auto___7058;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7041_7059__$1))
{var c__4262__auto___7060 = cljs.core.chunk_first.call(null,seq__7041_7059__$1);{
var G__7061 = cljs.core.chunk_rest.call(null,seq__7041_7059__$1);
var G__7062 = c__4262__auto___7060;
var G__7063 = cljs.core.count.call(null,c__4262__auto___7060);
var G__7064 = 0;
seq__7041_7047 = G__7061;
chunk__7042_7048 = G__7062;
count__7043_7049 = G__7063;
i__7044_7050 = G__7064;
continue;
}
} else
{var vec__7046_7065 = cljs.core.first.call(null,seq__7041_7059__$1);var ev__3326__auto___7066 = cljs.core.nth.call(null,vec__7046_7065,0,null);var func__3327__auto___7067 = cljs.core.nth.call(null,vec__7046_7065,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7066,func__3327__auto___7067);
{
var G__7068 = cljs.core.next.call(null,seq__7041_7059__$1);
var G__7069 = null;
var G__7070 = 0;
var G__7071 = 0;
seq__7041_7047 = G__7068;
chunk__7042_7048 = G__7069;
count__7043_7049 = G__7070;
i__7044_7050 = G__7071;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.plugins.doc.try_trigger = (function try_trigger(this$,cur,v){var cs = lt.objs.clients.discover_STAR_.call(null,new cljs.core.Keyword(null,"trigger","trigger",4248979754).cljs$core$IFn$_invoke$arity$1(cur));if(cljs.core.not.call(null,cljs.core.seq.call(null,cs)))
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"no-client","no-client",4161042633));
} else
{var temp__4092__auto___7080 = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".no-client",".no-client",3711355995),lt.object.__GT_content.call(null,this$));if(cljs.core.truth_(temp__4092__auto___7080))
{var nc_7081 = temp__4092__auto___7080;lt.util.dom.remove.call(null,nc_7081);
} else
{}
lt.objs.notifos.set_msg_BANG_.call(null,"Searching for docs...");
var seq__7076 = cljs.core.seq.call(null,cs);var chunk__7077 = null;var count__7078 = 0;var i__7079 = 0;while(true){
if((i__7079 < count__7078))
{var c = cljs.core._nth.call(null,chunk__7077,i__7079);lt.objs.notifos.working.call(null);
lt.objs.clients.send.call(null,c,new cljs.core.Keyword(null,"trigger","trigger",4248979754).cljs$core$IFn$_invoke$arity$1(cur),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"search","search",4402534682),v], null),new cljs.core.Keyword(null,"only","only",1017320222),this$);
{
var G__7082 = seq__7076;
var G__7083 = chunk__7077;
var G__7084 = count__7078;
var G__7085 = (i__7079 + 1);
seq__7076 = G__7082;
chunk__7077 = G__7083;
count__7078 = G__7084;
i__7079 = G__7085;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__7076);if(temp__4092__auto__)
{var seq__7076__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7076__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__7076__$1);{
var G__7086 = cljs.core.chunk_rest.call(null,seq__7076__$1);
var G__7087 = c__4262__auto__;
var G__7088 = cljs.core.count.call(null,c__4262__auto__);
var G__7089 = 0;
seq__7076 = G__7086;
chunk__7077 = G__7087;
count__7078 = G__7088;
i__7079 = G__7089;
continue;
}
} else
{var c = cljs.core.first.call(null,seq__7076__$1);lt.objs.notifos.working.call(null);
lt.objs.clients.send.call(null,c,new cljs.core.Keyword(null,"trigger","trigger",4248979754).cljs$core$IFn$_invoke$arity$1(cur),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"search","search",4402534682),v], null),new cljs.core.Keyword(null,"only","only",1017320222),this$);
{
var G__7090 = cljs.core.next.call(null,seq__7076__$1);
var G__7091 = null;
var G__7092 = 0;
var G__7093 = 0;
seq__7076 = G__7090;
chunk__7077 = G__7091;
count__7078 = G__7092;
i__7079 = G__7093;
continue;
}
}
} else
{return null;
}
}
break;
}
}
});
lt.plugins.doc.__GT_val = (function __GT_val(this$){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,this$)));
});
lt.plugins.doc.grouped_items = (function grouped_items(results,v,prev){var normal = lt.util.dom.fragment.call(null,cljs.core.PersistentVector.EMPTY);var exact = lt.util.dom.fragment.call(null,cljs.core.PersistentVector.EMPTY);var seq__7100_7106 = cljs.core.seq.call(null,results);var chunk__7102_7107 = null;var count__7103_7108 = 0;var i__7104_7109 = 0;while(true){
if((i__7104_7109 < count__7103_7108))
{var r_7110 = cljs.core._nth.call(null,chunk__7102_7107,i__7104_7109);if(cljs.core.not.call(null,prev.call(null,r_7110)))
{if(lt.util.cljs.str_contains_QMARK_.call(null,[cljs.core.str(new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(r_7110))].join(''),v))
{lt.util.dom.append.call(null,exact,lt.plugins.doc.search_item.call(null,r_7110));
} else
{lt.util.dom.append.call(null,normal,lt.plugins.doc.search_item.call(null,r_7110));
}
{
var G__7111 = seq__7100_7106;
var G__7112 = chunk__7102_7107;
var G__7113 = count__7103_7108;
var G__7114 = (i__7104_7109 + 1);
seq__7100_7106 = G__7111;
chunk__7102_7107 = G__7112;
count__7103_7108 = G__7113;
i__7104_7109 = G__7114;
continue;
}
} else
{{
var G__7115 = seq__7100_7106;
var G__7116 = chunk__7102_7107;
var G__7117 = count__7103_7108;
var G__7118 = (i__7104_7109 + 1);
seq__7100_7106 = G__7115;
chunk__7102_7107 = G__7116;
count__7103_7108 = G__7117;
i__7104_7109 = G__7118;
continue;
}
}
} else
{var temp__4092__auto___7119 = cljs.core.seq.call(null,seq__7100_7106);if(temp__4092__auto___7119)
{var seq__7100_7120__$1 = temp__4092__auto___7119;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7100_7120__$1))
{var c__4262__auto___7121 = cljs.core.chunk_first.call(null,seq__7100_7120__$1);{
var G__7122 = cljs.core.chunk_rest.call(null,seq__7100_7120__$1);
var G__7123 = c__4262__auto___7121;
var G__7124 = cljs.core.count.call(null,c__4262__auto___7121);
var G__7125 = 0;
seq__7100_7106 = G__7122;
chunk__7102_7107 = G__7123;
count__7103_7108 = G__7124;
i__7104_7109 = G__7125;
continue;
}
} else
{var r_7126 = cljs.core.first.call(null,seq__7100_7120__$1);if(cljs.core.not.call(null,prev.call(null,r_7126)))
{if(lt.util.cljs.str_contains_QMARK_.call(null,[cljs.core.str(new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(r_7126))].join(''),v))
{lt.util.dom.append.call(null,exact,lt.plugins.doc.search_item.call(null,r_7126));
} else
{lt.util.dom.append.call(null,normal,lt.plugins.doc.search_item.call(null,r_7126));
}
{
var G__7127 = cljs.core.next.call(null,seq__7100_7120__$1);
var G__7128 = null;
var G__7129 = 0;
var G__7130 = 0;
seq__7100_7106 = G__7127;
chunk__7102_7107 = G__7128;
count__7103_7108 = G__7129;
i__7104_7109 = G__7130;
continue;
}
} else
{{
var G__7131 = cljs.core.next.call(null,seq__7100_7120__$1);
var G__7132 = null;
var G__7133 = 0;
var G__7134 = 0;
seq__7100_7106 = G__7131;
chunk__7102_7107 = G__7132;
count__7103_7108 = G__7133;
i__7104_7109 = G__7134;
continue;
}
}
}
} else
{}
}
break;
}
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"normal","normal",4269125721),normal,new cljs.core.Keyword(null,"exact","exact",1110851185),exact], null);
});
lt.plugins.doc.__BEH__set_item = (function __BEH__set_item(this$,i){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cur","cur",1014003122),i], null));
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
lt.util.dom.replace_with.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,".types",".types",2441689213),lt.object.__GT_content.call(null,this$)),lt.plugins.doc.type_list.call(null,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.plugins.doc","set-item","lt.plugins.doc/set-item",1434521397),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__set_item,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-item!","set-item!",4800272821),null], null), null));
lt.plugins.doc.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){lt.util.dom.empty.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,".results",".results",676347770),lt.object.__GT_content.call(null,this$)));
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"results","results",2111450984),cljs.core.PersistentHashSet.EMPTY], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","clear!","lt.plugins.doc/clear!",4445595907),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__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.plugins.doc.__BEH__no_client = (function __BEH__no_client(this$){if(cljs.core.truth_(lt.util.dom.$.call(null,new cljs.core.Keyword(null,".no-client",".no-client",3711355995),lt.object.__GT_content.call(null,this$))))
{return null;
} else
{return lt.util.dom.before.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,".results",".results",676347770),lt.object.__GT_content.call(null,this$)),lt.plugins.doc.no_client_ui.call(null,this$));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","no-client","lt.plugins.doc/no-client",4152219374),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__no_client,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"no-client","no-client",4161042633),null], null), null));
lt.plugins.doc.__BEH__cur_from_last_editor = (function __BEH__cur_from_last_editor(this$){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var ed_type = new cljs.core.Keyword(null,"type-name","type-name",1486910640).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed)));if(cljs.core.truth_(cljs.core.get.call(null,new cljs.core.Keyword(null,"file-types","file-types",1727875162).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),ed_type)))
{return null;
} else
{var temp__4092__auto____$1 = cljs.core.first.call(null,cljs.core.filter.call(null,(function (p1__7135_SHARP_){return cljs.core.get.call(null,new cljs.core.Keyword(null,"file-types","file-types",1727875162).cljs$core$IFn$_invoke$arity$1(p1__7135_SHARP_),ed_type);
}),lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"types+","types+",4450069060),cljs.core.PersistentVector.EMPTY)));if(cljs.core.truth_(temp__4092__auto____$1))
{var neue = temp__4092__auto____$1;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"set-item!","set-item!",4800272821),neue);
} else
{return null;
}
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","cur-from-last-editor","lt.plugins.doc/cur-from-last-editor",2473070949),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__cur_from_last_editor,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.plugins.doc.__BEH__sidebar__DOT__doc__DOT__search__DOT__exec = (function __BEH__sidebar__DOT__doc__DOT__search__DOT__exec(this$){var v = lt.plugins.doc.__GT_val.call(null,this$);var trigger = new cljs.core.Keyword(null,"trigger","trigger",4248979754).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
if(cljs.core.empty_QMARK_.call(null,v))
{return null;
} else
{if(cljs.core.fn_QMARK_.call(null,trigger))
{return trigger.call(null,v);
} else
{return lt.plugins.doc.try_trigger.call(null,this$,new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),v);
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","sidebar.doc.search.exec","lt.plugins.doc/sidebar.doc.search.exec",3098799462),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__sidebar__DOT__doc__DOT__search__DOT__exec,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"sidebar.doc.search.exec","sidebar.doc.search.exec",991863361),null], null), null));
lt.plugins.doc.__BEH__doc__DOT__search__DOT__results = (function __BEH__doc__DOT__search__DOT__results(this$,results){var v = lt.plugins.doc.__GT_val.call(null,this$);var map__7137 = lt.plugins.doc.grouped_items.call(null,results,v,new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var map__7137__$1 = ((cljs.core.seq_QMARK_.call(null,map__7137))?cljs.core.apply.call(null,cljs.core.hash_map,map__7137):map__7137);var exact = cljs.core.get.call(null,map__7137__$1,new cljs.core.Keyword(null,"exact","exact",1110851185));var normal = cljs.core.get.call(null,map__7137__$1,new cljs.core.Keyword(null,"normal","normal",4269125721));var old = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".results",".results",676347770),lt.object.__GT_content.call(null,this$));lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"results","results",2111450984),cljs.core.into.call(null,new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),results)], null));
lt.objs.notifos.done_working.call(null,[cljs.core.str("Found "),cljs.core.str(cljs.core.count.call(null,new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))),cljs.core.str(" doc results.")].join(''));
lt.util.dom.prepend.call(null,old,exact);
return lt.util.dom.append.call(null,old,normal);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","doc.search.results","lt.plugins.doc/doc.search.results",672290493),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__doc__DOT__search__DOT__results,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"doc.search.results","doc.search.results",3363305624),null], null), null));
lt.plugins.doc.__BEH__focus_BANG_ = (function __BEH__focus_BANG_(this$){return lt.util.dom.focus.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","focus!","lt.plugins.doc/focus!",4022473696),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__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.object.object_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","sidebar.doc.search","lt.plugins.doc/sidebar.doc.search",2177966983),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.docs.search","sidebar.docs.search",3039267995),null], null), null),new cljs.core.Keyword(null,"label","label",1116631654),"Doc search",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cur","cur",1014003122),cljs.core.first.call(null,lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"types+","types+",4450069060),cljs.core.PersistentVector.EMPTY))], null));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.docs-search.filter-list","div.docs-search.filter-list",4304685172),lt.plugins.doc.search_input.call(null,this$),lt.plugins.doc.type_list.call(null,this$),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.results","ul.results",1522517777)], null)], null);
}));
lt.plugins.doc.doc_search = null;
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"docs.search.exec","docs.search.exec",4500234582),new cljs.core.Keyword(null,"desc","desc",1016984067),"Docs: Execute sidebar search",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){if(cljs.core.truth_(lt.plugins.doc.doc_search))
{return lt.object.raise.call(null,lt.plugins.doc.doc_search,new cljs.core.Keyword(null,"sidebar.doc.search.exec","sidebar.doc.search.exec",991863361));
} else
{return 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,"docs.search.show","docs.search.show",4500636610),new cljs.core.Keyword(null,"desc","desc",1016984067),"Docs: Search language docs",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (force_QMARK_){if(cljs.core.truth_(lt.plugins.doc.doc_search))
{lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"toggle","toggle",4440567494),lt.plugins.doc.doc_search,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"force?","force?",4040082982),force_QMARK_], null));
return lt.object.raise.call(null,lt.plugins.doc.doc_search,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"docs.search.hide","docs.search.hide",4500309511),new cljs.core.Keyword(null,"desc","desc",1016984067),"Docs: hide language docs",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (force_QMARK_){if(cljs.core.truth_(lt.plugins.doc.doc_search))
{return lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"close!","close!",3951350939),lt.plugins.doc.doc_search);
} else
{return null;
}
})], null));
lt.plugins.doc.__BEH__init_doc_search = (function __BEH__init_doc_search(this$){lt.plugins.doc.doc_search = lt.object.create.call(null,new cljs.core.Keyword("lt.plugins.doc","sidebar.doc.search","lt.plugins.doc/sidebar.doc.search",2177966983));
return lt.objs.sidebar.add_item.call(null,lt.objs.sidebar.rightbar,lt.plugins.doc.doc_search);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.plugins.doc","init-doc-search","lt.plugins.doc/init-doc-search",1501856585),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.plugins.doc.__BEH__init_doc_search,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null));
