// 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__14155_14161 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__14156_14162 = null;var count__14157_14163 = 0;var i__14158_14164 = 0;while(true){
if((i__14158_14164 < count__14157_14163))
{var vec__14159_14165 = cljs.core._nth.call(null,chunk__14156_14162,i__14158_14164);var ev__3326__auto___14166 = cljs.core.nth.call(null,vec__14159_14165,0,null);var func__3327__auto___14167 = cljs.core.nth.call(null,vec__14159_14165,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14166,func__3327__auto___14167);
{
var G__14168 = seq__14155_14161;
var G__14169 = chunk__14156_14162;
var G__14170 = count__14157_14163;
var G__14171 = (i__14158_14164 + 1);
seq__14155_14161 = G__14168;
chunk__14156_14162 = G__14169;
count__14157_14163 = G__14170;
i__14158_14164 = G__14171;
continue;
}
} else
{var temp__4092__auto___14172 = cljs.core.seq.call(null,seq__14155_14161);if(temp__4092__auto___14172)
{var seq__14155_14173__$1 = temp__4092__auto___14172;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14155_14173__$1))
{var c__4262__auto___14174 = cljs.core.chunk_first.call(null,seq__14155_14173__$1);{
var G__14175 = cljs.core.chunk_rest.call(null,seq__14155_14173__$1);
var G__14176 = c__4262__auto___14174;
var G__14177 = cljs.core.count.call(null,c__4262__auto___14174);
var G__14178 = 0;
seq__14155_14161 = G__14175;
chunk__14156_14162 = G__14176;
count__14157_14163 = G__14177;
i__14158_14164 = G__14178;
continue;
}
} else
{var vec__14160_14179 = cljs.core.first.call(null,seq__14155_14173__$1);var ev__3326__auto___14180 = cljs.core.nth.call(null,vec__14160_14179,0,null);var func__3327__auto___14181 = cljs.core.nth.call(null,vec__14160_14179,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14180,func__3327__auto___14181);
{
var G__14182 = cljs.core.next.call(null,seq__14155_14173__$1);
var G__14183 = null;
var G__14184 = 0;
var G__14185 = 0;
seq__14155_14161 = G__14182;
chunk__14156_14162 = G__14183;
count__14157_14163 = G__14184;
i__14158_14164 = G__14185;
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__14192_14198 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__14193_14199 = null;var count__14194_14200 = 0;var i__14195_14201 = 0;while(true){
if((i__14195_14201 < count__14194_14200))
{var vec__14196_14202 = cljs.core._nth.call(null,chunk__14193_14199,i__14195_14201);var ev__3326__auto___14203 = cljs.core.nth.call(null,vec__14196_14202,0,null);var func__3327__auto___14204 = cljs.core.nth.call(null,vec__14196_14202,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14203,func__3327__auto___14204);
{
var G__14205 = seq__14192_14198;
var G__14206 = chunk__14193_14199;
var G__14207 = count__14194_14200;
var G__14208 = (i__14195_14201 + 1);
seq__14192_14198 = G__14205;
chunk__14193_14199 = G__14206;
count__14194_14200 = G__14207;
i__14195_14201 = G__14208;
continue;
}
} else
{var temp__4092__auto___14209 = cljs.core.seq.call(null,seq__14192_14198);if(temp__4092__auto___14209)
{var seq__14192_14210__$1 = temp__4092__auto___14209;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14192_14210__$1))
{var c__4262__auto___14211 = cljs.core.chunk_first.call(null,seq__14192_14210__$1);{
var G__14212 = cljs.core.chunk_rest.call(null,seq__14192_14210__$1);
var G__14213 = c__4262__auto___14211;
var G__14214 = cljs.core.count.call(null,c__4262__auto___14211);
var G__14215 = 0;
seq__14192_14198 = G__14212;
chunk__14193_14199 = G__14213;
count__14194_14200 = G__14214;
i__14195_14201 = G__14215;
continue;
}
} else
{var vec__14197_14216 = cljs.core.first.call(null,seq__14192_14210__$1);var ev__3326__auto___14217 = cljs.core.nth.call(null,vec__14197_14216,0,null);var func__3327__auto___14218 = cljs.core.nth.call(null,vec__14197_14216,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14217,func__3327__auto___14218);
{
var G__14219 = cljs.core.next.call(null,seq__14192_14210__$1);
var G__14220 = null;
var G__14221 = 0;
var G__14222 = 0;
seq__14192_14198 = G__14219;
chunk__14193_14199 = G__14220;
count__14194_14200 = G__14221;
i__14195_14201 = G__14222;
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__14229_14235 = 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__14230_14236 = null;var count__14231_14237 = 0;var i__14232_14238 = 0;while(true){
if((i__14232_14238 < count__14231_14237))
{var vec__14233_14239 = cljs.core._nth.call(null,chunk__14230_14236,i__14232_14238);var ev__3326__auto___14240 = cljs.core.nth.call(null,vec__14233_14239,0,null);var func__3327__auto___14241 = cljs.core.nth.call(null,vec__14233_14239,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14240,func__3327__auto___14241);
{
var G__14242 = seq__14229_14235;
var G__14243 = chunk__14230_14236;
var G__14244 = count__14231_14237;
var G__14245 = (i__14232_14238 + 1);
seq__14229_14235 = G__14242;
chunk__14230_14236 = G__14243;
count__14231_14237 = G__14244;
i__14232_14238 = G__14245;
continue;
}
} else
{var temp__4092__auto___14246 = cljs.core.seq.call(null,seq__14229_14235);if(temp__4092__auto___14246)
{var seq__14229_14247__$1 = temp__4092__auto___14246;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14229_14247__$1))
{var c__4262__auto___14248 = cljs.core.chunk_first.call(null,seq__14229_14247__$1);{
var G__14249 = cljs.core.chunk_rest.call(null,seq__14229_14247__$1);
var G__14250 = c__4262__auto___14248;
var G__14251 = cljs.core.count.call(null,c__4262__auto___14248);
var G__14252 = 0;
seq__14229_14235 = G__14249;
chunk__14230_14236 = G__14250;
count__14231_14237 = G__14251;
i__14232_14238 = G__14252;
continue;
}
} else
{var vec__14234_14253 = cljs.core.first.call(null,seq__14229_14247__$1);var ev__3326__auto___14254 = cljs.core.nth.call(null,vec__14234_14253,0,null);var func__3327__auto___14255 = cljs.core.nth.call(null,vec__14234_14253,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14254,func__3327__auto___14255);
{
var G__14256 = cljs.core.next.call(null,seq__14229_14247__$1);
var G__14257 = null;
var G__14258 = 0;
var G__14259 = 0;
seq__14229_14235 = G__14256;
chunk__14230_14236 = G__14257;
count__14231_14237 = G__14258;
i__14232_14238 = G__14259;
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__14266_14272 = 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__14267_14273 = null;var count__14268_14274 = 0;var i__14269_14275 = 0;while(true){
if((i__14269_14275 < count__14268_14274))
{var vec__14270_14276 = cljs.core._nth.call(null,chunk__14267_14273,i__14269_14275);var ev__3326__auto___14277 = cljs.core.nth.call(null,vec__14270_14276,0,null);var func__3327__auto___14278 = cljs.core.nth.call(null,vec__14270_14276,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14277,func__3327__auto___14278);
{
var G__14279 = seq__14266_14272;
var G__14280 = chunk__14267_14273;
var G__14281 = count__14268_14274;
var G__14282 = (i__14269_14275 + 1);
seq__14266_14272 = G__14279;
chunk__14267_14273 = G__14280;
count__14268_14274 = G__14281;
i__14269_14275 = G__14282;
continue;
}
} else
{var temp__4092__auto___14283 = cljs.core.seq.call(null,seq__14266_14272);if(temp__4092__auto___14283)
{var seq__14266_14284__$1 = temp__4092__auto___14283;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14266_14284__$1))
{var c__4262__auto___14285 = cljs.core.chunk_first.call(null,seq__14266_14284__$1);{
var G__14286 = cljs.core.chunk_rest.call(null,seq__14266_14284__$1);
var G__14287 = c__4262__auto___14285;
var G__14288 = cljs.core.count.call(null,c__4262__auto___14285);
var G__14289 = 0;
seq__14266_14272 = G__14286;
chunk__14267_14273 = G__14287;
count__14268_14274 = G__14288;
i__14269_14275 = G__14289;
continue;
}
} else
{var vec__14271_14290 = cljs.core.first.call(null,seq__14266_14284__$1);var ev__3326__auto___14291 = cljs.core.nth.call(null,vec__14271_14290,0,null);var func__3327__auto___14292 = cljs.core.nth.call(null,vec__14271_14290,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14291,func__3327__auto___14292);
{
var G__14293 = cljs.core.next.call(null,seq__14266_14284__$1);
var G__14294 = null;
var G__14295 = 0;
var G__14296 = 0;
seq__14266_14272 = G__14293;
chunk__14267_14273 = G__14294;
count__14268_14274 = G__14295;
i__14269_14275 = G__14296;
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__14303_14309 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__14304_14310 = null;var count__14305_14311 = 0;var i__14306_14312 = 0;while(true){
if((i__14306_14312 < count__14305_14311))
{var vec__14307_14313 = cljs.core._nth.call(null,chunk__14304_14310,i__14306_14312);var ev__3326__auto___14314 = cljs.core.nth.call(null,vec__14307_14313,0,null);var func__3327__auto___14315 = cljs.core.nth.call(null,vec__14307_14313,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14314,func__3327__auto___14315);
{
var G__14316 = seq__14303_14309;
var G__14317 = chunk__14304_14310;
var G__14318 = count__14305_14311;
var G__14319 = (i__14306_14312 + 1);
seq__14303_14309 = G__14316;
chunk__14304_14310 = G__14317;
count__14305_14311 = G__14318;
i__14306_14312 = G__14319;
continue;
}
} else
{var temp__4092__auto___14320 = cljs.core.seq.call(null,seq__14303_14309);if(temp__4092__auto___14320)
{var seq__14303_14321__$1 = temp__4092__auto___14320;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14303_14321__$1))
{var c__4262__auto___14322 = cljs.core.chunk_first.call(null,seq__14303_14321__$1);{
var G__14323 = cljs.core.chunk_rest.call(null,seq__14303_14321__$1);
var G__14324 = c__4262__auto___14322;
var G__14325 = cljs.core.count.call(null,c__4262__auto___14322);
var G__14326 = 0;
seq__14303_14309 = G__14323;
chunk__14304_14310 = G__14324;
count__14305_14311 = G__14325;
i__14306_14312 = G__14326;
continue;
}
} else
{var vec__14308_14327 = cljs.core.first.call(null,seq__14303_14321__$1);var ev__3326__auto___14328 = cljs.core.nth.call(null,vec__14308_14327,0,null);var func__3327__auto___14329 = cljs.core.nth.call(null,vec__14308_14327,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14328,func__3327__auto___14329);
{
var G__14330 = cljs.core.next.call(null,seq__14303_14321__$1);
var G__14331 = null;
var G__14332 = 0;
var G__14333 = 0;
seq__14303_14309 = G__14330;
chunk__14304_14310 = G__14331;
count__14305_14311 = G__14332;
i__14306_14312 = G__14333;
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__14340_14346 = 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__14341_14347 = null;var count__14342_14348 = 0;var i__14343_14349 = 0;while(true){
if((i__14343_14349 < count__14342_14348))
{var vec__14344_14350 = cljs.core._nth.call(null,chunk__14341_14347,i__14343_14349);var ev__3326__auto___14351 = cljs.core.nth.call(null,vec__14344_14350,0,null);var func__3327__auto___14352 = cljs.core.nth.call(null,vec__14344_14350,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14351,func__3327__auto___14352);
{
var G__14353 = seq__14340_14346;
var G__14354 = chunk__14341_14347;
var G__14355 = count__14342_14348;
var G__14356 = (i__14343_14349 + 1);
seq__14340_14346 = G__14353;
chunk__14341_14347 = G__14354;
count__14342_14348 = G__14355;
i__14343_14349 = G__14356;
continue;
}
} else
{var temp__4092__auto___14357 = cljs.core.seq.call(null,seq__14340_14346);if(temp__4092__auto___14357)
{var seq__14340_14358__$1 = temp__4092__auto___14357;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14340_14358__$1))
{var c__4262__auto___14359 = cljs.core.chunk_first.call(null,seq__14340_14358__$1);{
var G__14360 = cljs.core.chunk_rest.call(null,seq__14340_14358__$1);
var G__14361 = c__4262__auto___14359;
var G__14362 = cljs.core.count.call(null,c__4262__auto___14359);
var G__14363 = 0;
seq__14340_14346 = G__14360;
chunk__14341_14347 = G__14361;
count__14342_14348 = G__14362;
i__14343_14349 = G__14363;
continue;
}
} else
{var vec__14345_14364 = cljs.core.first.call(null,seq__14340_14358__$1);var ev__3326__auto___14365 = cljs.core.nth.call(null,vec__14345_14364,0,null);var func__3327__auto___14366 = cljs.core.nth.call(null,vec__14345_14364,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14365,func__3327__auto___14366);
{
var G__14367 = cljs.core.next.call(null,seq__14340_14358__$1);
var G__14368 = null;
var G__14369 = 0;
var G__14370 = 0;
seq__14340_14346 = G__14367;
chunk__14341_14347 = G__14368;
count__14342_14348 = G__14369;
i__14343_14349 = G__14370;
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__14377_14383 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__14378_14384 = null;var count__14379_14385 = 0;var i__14380_14386 = 0;while(true){
if((i__14380_14386 < count__14379_14385))
{var vec__14381_14387 = cljs.core._nth.call(null,chunk__14378_14384,i__14380_14386);var ev__3326__auto___14388 = cljs.core.nth.call(null,vec__14381_14387,0,null);var func__3327__auto___14389 = cljs.core.nth.call(null,vec__14381_14387,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14388,func__3327__auto___14389);
{
var G__14390 = seq__14377_14383;
var G__14391 = chunk__14378_14384;
var G__14392 = count__14379_14385;
var G__14393 = (i__14380_14386 + 1);
seq__14377_14383 = G__14390;
chunk__14378_14384 = G__14391;
count__14379_14385 = G__14392;
i__14380_14386 = G__14393;
continue;
}
} else
{var temp__4092__auto___14394 = cljs.core.seq.call(null,seq__14377_14383);if(temp__4092__auto___14394)
{var seq__14377_14395__$1 = temp__4092__auto___14394;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14377_14395__$1))
{var c__4262__auto___14396 = cljs.core.chunk_first.call(null,seq__14377_14395__$1);{
var G__14397 = cljs.core.chunk_rest.call(null,seq__14377_14395__$1);
var G__14398 = c__4262__auto___14396;
var G__14399 = cljs.core.count.call(null,c__4262__auto___14396);
var G__14400 = 0;
seq__14377_14383 = G__14397;
chunk__14378_14384 = G__14398;
count__14379_14385 = G__14399;
i__14380_14386 = G__14400;
continue;
}
} else
{var vec__14382_14401 = cljs.core.first.call(null,seq__14377_14395__$1);var ev__3326__auto___14402 = cljs.core.nth.call(null,vec__14382_14401,0,null);var func__3327__auto___14403 = cljs.core.nth.call(null,vec__14382_14401,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14402,func__3327__auto___14403);
{
var G__14404 = cljs.core.next.call(null,seq__14377_14395__$1);
var G__14405 = null;
var G__14406 = 0;
var G__14407 = 0;
seq__14377_14383 = G__14404;
chunk__14378_14384 = G__14405;
count__14379_14385 = G__14406;
i__14380_14386 = G__14407;
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___14416 = 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___14416))
{var nc_14417 = temp__4092__auto___14416;lt.util.dom.remove.call(null,nc_14417);
} else
{}
lt.objs.notifos.set_msg_BANG_.call(null,"Searching for docs...");
var seq__14412 = cljs.core.seq.call(null,cs);var chunk__14413 = null;var count__14414 = 0;var i__14415 = 0;while(true){
if((i__14415 < count__14414))
{var c = cljs.core._nth.call(null,chunk__14413,i__14415);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__14418 = seq__14412;
var G__14419 = chunk__14413;
var G__14420 = count__14414;
var G__14421 = (i__14415 + 1);
seq__14412 = G__14418;
chunk__14413 = G__14419;
count__14414 = G__14420;
i__14415 = G__14421;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__14412);if(temp__4092__auto__)
{var seq__14412__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14412__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__14412__$1);{
var G__14422 = cljs.core.chunk_rest.call(null,seq__14412__$1);
var G__14423 = c__4262__auto__;
var G__14424 = cljs.core.count.call(null,c__4262__auto__);
var G__14425 = 0;
seq__14412 = G__14422;
chunk__14413 = G__14423;
count__14414 = G__14424;
i__14415 = G__14425;
continue;
}
} else
{var c = cljs.core.first.call(null,seq__14412__$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__14426 = cljs.core.next.call(null,seq__14412__$1);
var G__14427 = null;
var G__14428 = 0;
var G__14429 = 0;
seq__14412 = G__14426;
chunk__14413 = G__14427;
count__14414 = G__14428;
i__14415 = G__14429;
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__14436_14442 = cljs.core.seq.call(null,results);var chunk__14438_14443 = null;var count__14439_14444 = 0;var i__14440_14445 = 0;while(true){
if((i__14440_14445 < count__14439_14444))
{var r_14446 = cljs.core._nth.call(null,chunk__14438_14443,i__14440_14445);if(cljs.core.not.call(null,prev.call(null,r_14446)))
{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_14446))].join(''),v))
{lt.util.dom.append.call(null,exact,lt.plugins.doc.search_item.call(null,r_14446));
} else
{lt.util.dom.append.call(null,normal,lt.plugins.doc.search_item.call(null,r_14446));
}
{
var G__14447 = seq__14436_14442;
var G__14448 = chunk__14438_14443;
var G__14449 = count__14439_14444;
var G__14450 = (i__14440_14445 + 1);
seq__14436_14442 = G__14447;
chunk__14438_14443 = G__14448;
count__14439_14444 = G__14449;
i__14440_14445 = G__14450;
continue;
}
} else
{{
var G__14451 = seq__14436_14442;
var G__14452 = chunk__14438_14443;
var G__14453 = count__14439_14444;
var G__14454 = (i__14440_14445 + 1);
seq__14436_14442 = G__14451;
chunk__14438_14443 = G__14452;
count__14439_14444 = G__14453;
i__14440_14445 = G__14454;
continue;
}
}
} else
{var temp__4092__auto___14455 = cljs.core.seq.call(null,seq__14436_14442);if(temp__4092__auto___14455)
{var seq__14436_14456__$1 = temp__4092__auto___14455;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14436_14456__$1))
{var c__4262__auto___14457 = cljs.core.chunk_first.call(null,seq__14436_14456__$1);{
var G__14458 = cljs.core.chunk_rest.call(null,seq__14436_14456__$1);
var G__14459 = c__4262__auto___14457;
var G__14460 = cljs.core.count.call(null,c__4262__auto___14457);
var G__14461 = 0;
seq__14436_14442 = G__14458;
chunk__14438_14443 = G__14459;
count__14439_14444 = G__14460;
i__14440_14445 = G__14461;
continue;
}
} else
{var r_14462 = cljs.core.first.call(null,seq__14436_14456__$1);if(cljs.core.not.call(null,prev.call(null,r_14462)))
{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_14462))].join(''),v))
{lt.util.dom.append.call(null,exact,lt.plugins.doc.search_item.call(null,r_14462));
} else
{lt.util.dom.append.call(null,normal,lt.plugins.doc.search_item.call(null,r_14462));
}
{
var G__14463 = cljs.core.next.call(null,seq__14436_14456__$1);
var G__14464 = null;
var G__14465 = 0;
var G__14466 = 0;
seq__14436_14442 = G__14463;
chunk__14438_14443 = G__14464;
count__14439_14444 = G__14465;
i__14440_14445 = G__14466;
continue;
}
} else
{{
var G__14467 = cljs.core.next.call(null,seq__14436_14456__$1);
var G__14468 = null;
var G__14469 = 0;
var G__14470 = 0;
seq__14436_14442 = G__14467;
chunk__14438_14443 = G__14468;
count__14439_14444 = G__14469;
i__14440_14445 = G__14470;
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__14471_SHARP_){return cljs.core.get.call(null,new cljs.core.Keyword(null,"file-types","file-types",1727875162).cljs$core$IFn$_invoke$arity$1(p1__14471_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__14473 = 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__14473__$1 = ((cljs.core.seq_QMARK_.call(null,map__14473))?cljs.core.apply.call(null,cljs.core.hash_map,map__14473):map__14473);var exact = cljs.core.get.call(null,map__14473__$1,new cljs.core.Keyword(null,"exact","exact",1110851185));var normal = cljs.core.get.call(null,map__14473__$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));
