// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.search');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.util.js');
goog.require('lt.objs.thread');
goog.require('lt.objs.files');
goog.require('lt.util.js');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.platform');
goog.require('lt.objs.tabs');
goog.require('crate.core');
goog.require('lt.objs.workspace');
goog.require('lt.objs.context');
goog.require('lt.objs.notifos');
goog.require('lt.objs.proc');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('clojure.string');
goog.require('lt.objs.command');
goog.require('lt.objs.platform');
goog.require('lt.objs.files');
goog.require('lt.objs.thread');
goog.require('lt.util.load');
goog.require('clojure.string');
goog.require('lt.objs.workspace');
goog.require('crate.binding');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.util.load');
goog.require('lt.objs.proc');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('crate.core');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.command');
lt.objs.search.search_BANG_ = lt.objs.thread.thread_STAR_.call(null,(function tfun11148(){var orig__3398__auto__ = argsArray(arguments);var msg__3399__auto__ = orig__3398__auto__.shift();var args__3400__auto__ = orig__3398__auto__.map(cljs.reader.read_string);var raise = ((function (orig__3398__auto__,msg__3399__auto__,args__3400__auto__){
return (function (obj__3401__auto__,k__3402__auto__,v__3403__auto__){return _send(obj__3401__auto__,k__3402__auto__,cljs.core.pr_str.call(null,v__3403__auto__),"clj");
});})(orig__3398__auto__,msg__3399__auto__,args__3400__auto__))
;args__3400__auto__.unshift(msg__3399__auto__.obj);
return (function (obj_id,opts){var replacer = require([cljs.core.str(ltpath),cljs.core.str("/core/node_modules/replace")].join(''));var search = (function (){var temp__4090__auto__ = cljs.core.re_seq.call(null,/^\/(.+)\/$/,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(opts));if(cljs.core.truth_(temp__4090__auto__))
{var pattern = temp__4090__auto__;return (new RegExp(cljs.core.second.call(null,cljs.core.first.call(null,pattern))));
} else
{return new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(opts);
}
})();var final$ = replacer.call(null,cljs.core.clj__GT_js.call(null,new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null,"regex","regex",1122296761),search,new cljs.core.Keyword(null,"exclude","exclude",3987722572),(cljs.core.truth_(new cljs.core.Keyword(null,"exclude","exclude",3987722572).cljs$core$IFn$_invoke$arity$1(opts))?(new RegExp(new cljs.core.Keyword(null,"exclude","exclude",3987722572).cljs$core$IFn$_invoke$arity$1(opts))):null),new cljs.core.Keyword(null,"recursive","recursive",2179684260),true,new cljs.core.Keyword(null,"ignoreCase","ignoreCase",1893967764),!(cljs.core.boolean$.call(null,cljs.core.re_seq.call(null,/[A-Z]/,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(opts)))),new cljs.core.Keyword(null,"replacement","replacement",1444823428),new cljs.core.Keyword(null,"replacement","replacement",1444823428).cljs$core$IFn$_invoke$arity$1(opts),new cljs.core.Keyword(null,"paths","paths",1120343136),new cljs.core.Keyword(null,"paths","paths",1120343136).cljs$core$IFn$_invoke$arity$1(opts),new cljs.core.Keyword(null,"result","result",4374444943),((function (replacer,search){
return (function (r){return _send(obj_id,new cljs.core.Keyword(null,"result","result",4374444943),r);
});})(replacer,search))
], null)));return raise.call(null,obj_id,new cljs.core.Keyword(null,"done-searching","done-searching",1230467105),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"total","total",1124454070),final$.totalFiles,new cljs.core.Keyword(null,"time","time",1017464383),final$.time,new cljs.core.Keyword(null,"replace?","replace?",583571325),cljs.core.boolean$.call(null,new cljs.core.Keyword(null,"replacement","replacement",1444823428).cljs$core$IFn$_invoke$arity$1(opts))], null));
}).apply(null,args__3400__auto__);
}));
lt.objs.search.result_threshold = 500;
lt.objs.search.location = (function (){var method_table__4372__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var prefer_table__4373__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var method_cache__4374__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var cached_hierarchy__4375__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var hierarchy__4376__auto__ = cljs.core.get.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"hierarchy","hierarchy",3129050535),cljs.core.get_global_hierarchy.call(null));return (new cljs.core.MultiFn("location",cljs.core.identity,new cljs.core.Keyword(null,"default","default",2558708147),hierarchy__4376__auto__,method_table__4372__auto__,prefer_table__4373__auto__,method_cache__4374__auto__,cached_hierarchy__4375__auto__));
})();
cljs.core._add_method.call(null,lt.objs.search.location,"<workspace>",(function (_){return cljs.core.apply.call(null,cljs.core.concat,cljs.core.juxt.call(null,new cljs.core.Keyword(null,"folders","folders",4625622327),new cljs.core.Keyword(null,"files","files",1111338473)).call(null,lt.objs.workspace.serialize.call(null,cljs.core.deref.call(null,lt.objs.workspace.current_ws))));
}));
cljs.core._add_method.call(null,lt.objs.search.location,new cljs.core.Keyword(null,"default","default",2558708147),(function (loc){return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [loc], null);
}));
lt.objs.search.string__GT_loc = (function string__GT_loc(loc_str){return cljs.core.mapcat.call(null,cljs.core.comp.call(null,lt.objs.search.location,clojure.string.trim),cljs.core.remove.call(null,cljs.core.empty_QMARK_,clojure.string.split.call(null,loc_str,",")));
});
lt.objs.search.__GT_res = (function __GT_res(this$){return lt.util.dom.$.call(null,new cljs.core.Keyword(null,".res",".res",1015387428),lt.object.__GT_content.call(null,this$));
});
lt.objs.search.__GT_entry = (function __GT_entry(r,file){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,"p.entry","p.entry",3043677414),crate.core.raw.call(null,[cljs.core.str("<span class='line'>"),cljs.core.str(r.line),cljs.core.str("</span><pre>"),cljs.core.str(r.text),cljs.core.str("</pre>")].join(''))], null));var seq__11155_11161 = 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 (){lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),file);
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),r.line);
})], null)));var chunk__11156_11162 = null;var count__11157_11163 = 0;var i__11158_11164 = 0;while(true){
if((i__11158_11164 < count__11157_11163))
{var vec__11159_11165 = cljs.core._nth.call(null,chunk__11156_11162,i__11158_11164);var ev__3326__auto___11166 = cljs.core.nth.call(null,vec__11159_11165,0,null);var func__3327__auto___11167 = cljs.core.nth.call(null,vec__11159_11165,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11166,func__3327__auto___11167);
{
var G__11168 = seq__11155_11161;
var G__11169 = chunk__11156_11162;
var G__11170 = count__11157_11163;
var G__11171 = (i__11158_11164 + 1);
seq__11155_11161 = G__11168;
chunk__11156_11162 = G__11169;
count__11157_11163 = G__11170;
i__11158_11164 = G__11171;
continue;
}
} else
{var temp__4092__auto___11172 = cljs.core.seq.call(null,seq__11155_11161);if(temp__4092__auto___11172)
{var seq__11155_11173__$1 = temp__4092__auto___11172;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11155_11173__$1))
{var c__4262__auto___11174 = cljs.core.chunk_first.call(null,seq__11155_11173__$1);{
var G__11175 = cljs.core.chunk_rest.call(null,seq__11155_11173__$1);
var G__11176 = c__4262__auto___11174;
var G__11177 = cljs.core.count.call(null,c__4262__auto___11174);
var G__11178 = 0;
seq__11155_11161 = G__11175;
chunk__11156_11162 = G__11176;
count__11157_11163 = G__11177;
i__11158_11164 = G__11178;
continue;
}
} else
{var vec__11160_11179 = cljs.core.first.call(null,seq__11155_11173__$1);var ev__3326__auto___11180 = cljs.core.nth.call(null,vec__11160_11179,0,null);var func__3327__auto___11181 = cljs.core.nth.call(null,vec__11160_11179,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11180,func__3327__auto___11181);
{
var G__11182 = cljs.core.next.call(null,seq__11155_11173__$1);
var G__11183 = null;
var G__11184 = 0;
var G__11185 = 0;
seq__11155_11161 = G__11182;
chunk__11156_11162 = G__11183;
count__11157_11163 = G__11184;
i__11158_11164 = G__11185;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.__GT_result_item = (function __GT_result_item(r){var e__3325__auto__ = crate.core.html.call(null,(function (){var file = r.file;return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p.path","p.path",4266284629),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.file","span.file",4619643154),lt.objs.files.basename.call(null,file)], null),"(",lt.objs.files.parent.call(null,file),")"], null),(function (){var iter__4231__auto__ = ((function (file){
return (function iter__11196(s__11197){return (new cljs.core.LazySeq(null,((function (file){
return (function (){var s__11197__$1 = s__11197;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__11197__$1);if(temp__4092__auto__)
{var s__11197__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__11197__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__11197__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__11199 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__11198 = 0;while(true){
if((i__11198 < size__4230__auto__))
{var r__$1 = cljs.core._nth.call(null,c__4229__auto__,i__11198);cljs.core.chunk_append.call(null,b__11199,lt.objs.search.__GT_entry.call(null,r__$1,file));
{
var G__11206 = (i__11198 + 1);
i__11198 = G__11206;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__11199),iter__11196.call(null,cljs.core.chunk_rest.call(null,s__11197__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__11199),null);
}
} else
{var r__$1 = cljs.core.first.call(null,s__11197__$2);return cljs.core.cons.call(null,lt.objs.search.__GT_entry.call(null,r__$1,file),iter__11196.call(null,cljs.core.rest.call(null,s__11197__$2)));
}
} else
{return null;
}
break;
}
});})(file))
,null,null));
});})(file))
;return iter__4231__auto__.call(null,r.results);
})()], null);
})());var seq__11200_11207 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__11201_11208 = null;var count__11202_11209 = 0;var i__11203_11210 = 0;while(true){
if((i__11203_11210 < count__11202_11209))
{var vec__11204_11211 = cljs.core._nth.call(null,chunk__11201_11208,i__11203_11210);var ev__3326__auto___11212 = cljs.core.nth.call(null,vec__11204_11211,0,null);var func__3327__auto___11213 = cljs.core.nth.call(null,vec__11204_11211,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11212,func__3327__auto___11213);
{
var G__11214 = seq__11200_11207;
var G__11215 = chunk__11201_11208;
var G__11216 = count__11202_11209;
var G__11217 = (i__11203_11210 + 1);
seq__11200_11207 = G__11214;
chunk__11201_11208 = G__11215;
count__11202_11209 = G__11216;
i__11203_11210 = G__11217;
continue;
}
} else
{var temp__4092__auto___11218 = cljs.core.seq.call(null,seq__11200_11207);if(temp__4092__auto___11218)
{var seq__11200_11219__$1 = temp__4092__auto___11218;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11200_11219__$1))
{var c__4262__auto___11220 = cljs.core.chunk_first.call(null,seq__11200_11219__$1);{
var G__11221 = cljs.core.chunk_rest.call(null,seq__11200_11219__$1);
var G__11222 = c__4262__auto___11220;
var G__11223 = cljs.core.count.call(null,c__4262__auto___11220);
var G__11224 = 0;
seq__11200_11207 = G__11221;
chunk__11201_11208 = G__11222;
count__11202_11209 = G__11223;
i__11203_11210 = G__11224;
continue;
}
} else
{var vec__11205_11225 = cljs.core.first.call(null,seq__11200_11219__$1);var ev__3326__auto___11226 = cljs.core.nth.call(null,vec__11205_11225,0,null);var func__3327__auto___11227 = cljs.core.nth.call(null,vec__11205_11225,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11226,func__3327__auto___11227);
{
var G__11228 = cljs.core.next.call(null,seq__11200_11219__$1);
var G__11229 = null;
var G__11230 = 0;
var G__11231 = 0;
seq__11200_11207 = G__11228;
chunk__11201_11208 = G__11229;
count__11202_11209 = G__11230;
i__11203_11210 = G__11231;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.search_box = (function search_box(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"], null)], null));var seq__11238_11244 = 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 (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"searcher.search","searcher.search",1646738643),this$);
return lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.search","input.search",1599745982),lt.object.__GT_content.call(null,this$)).select();
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"searcher.search","searcher.search",1646738643));
})], null)));var chunk__11239_11245 = null;var count__11240_11246 = 0;var i__11241_11247 = 0;while(true){
if((i__11241_11247 < count__11240_11246))
{var vec__11242_11248 = cljs.core._nth.call(null,chunk__11239_11245,i__11241_11247);var ev__3326__auto___11249 = cljs.core.nth.call(null,vec__11242_11248,0,null);var func__3327__auto___11250 = cljs.core.nth.call(null,vec__11242_11248,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11249,func__3327__auto___11250);
{
var G__11251 = seq__11238_11244;
var G__11252 = chunk__11239_11245;
var G__11253 = count__11240_11246;
var G__11254 = (i__11241_11247 + 1);
seq__11238_11244 = G__11251;
chunk__11239_11245 = G__11252;
count__11240_11246 = G__11253;
i__11241_11247 = G__11254;
continue;
}
} else
{var temp__4092__auto___11255 = cljs.core.seq.call(null,seq__11238_11244);if(temp__4092__auto___11255)
{var seq__11238_11256__$1 = temp__4092__auto___11255;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11238_11256__$1))
{var c__4262__auto___11257 = cljs.core.chunk_first.call(null,seq__11238_11256__$1);{
var G__11258 = cljs.core.chunk_rest.call(null,seq__11238_11256__$1);
var G__11259 = c__4262__auto___11257;
var G__11260 = cljs.core.count.call(null,c__4262__auto___11257);
var G__11261 = 0;
seq__11238_11244 = G__11258;
chunk__11239_11245 = G__11259;
count__11240_11246 = G__11260;
i__11241_11247 = G__11261;
continue;
}
} else
{var vec__11243_11262 = cljs.core.first.call(null,seq__11238_11256__$1);var ev__3326__auto___11263 = cljs.core.nth.call(null,vec__11243_11262,0,null);var func__3327__auto___11264 = cljs.core.nth.call(null,vec__11243_11262,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11263,func__3327__auto___11264);
{
var G__11265 = cljs.core.next.call(null,seq__11238_11256__$1);
var G__11266 = null;
var G__11267 = 0;
var G__11268 = 0;
seq__11238_11244 = G__11265;
chunk__11239_11245 = G__11266;
count__11240_11246 = G__11267;
i__11241_11247 = G__11268;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.replace_box = (function replace_box(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.replace","input.replace",1121297410),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Replace"], null)], null));var seq__11275_11281 = 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,"searcher.replace","searcher.replace",2578069901),this$);
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"searcher.replace","searcher.replace",2578069901));
})], null)));var chunk__11276_11282 = null;var count__11277_11283 = 0;var i__11278_11284 = 0;while(true){
if((i__11278_11284 < count__11277_11283))
{var vec__11279_11285 = cljs.core._nth.call(null,chunk__11276_11282,i__11278_11284);var ev__3326__auto___11286 = cljs.core.nth.call(null,vec__11279_11285,0,null);var func__3327__auto___11287 = cljs.core.nth.call(null,vec__11279_11285,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11286,func__3327__auto___11287);
{
var G__11288 = seq__11275_11281;
var G__11289 = chunk__11276_11282;
var G__11290 = count__11277_11283;
var G__11291 = (i__11278_11284 + 1);
seq__11275_11281 = G__11288;
chunk__11276_11282 = G__11289;
count__11277_11283 = G__11290;
i__11278_11284 = G__11291;
continue;
}
} else
{var temp__4092__auto___11292 = cljs.core.seq.call(null,seq__11275_11281);if(temp__4092__auto___11292)
{var seq__11275_11293__$1 = temp__4092__auto___11292;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11275_11293__$1))
{var c__4262__auto___11294 = cljs.core.chunk_first.call(null,seq__11275_11293__$1);{
var G__11295 = cljs.core.chunk_rest.call(null,seq__11275_11293__$1);
var G__11296 = c__4262__auto___11294;
var G__11297 = cljs.core.count.call(null,c__4262__auto___11294);
var G__11298 = 0;
seq__11275_11281 = G__11295;
chunk__11276_11282 = G__11296;
count__11277_11283 = G__11297;
i__11278_11284 = G__11298;
continue;
}
} else
{var vec__11280_11299 = cljs.core.first.call(null,seq__11275_11293__$1);var ev__3326__auto___11300 = cljs.core.nth.call(null,vec__11280_11299,0,null);var func__3327__auto___11301 = cljs.core.nth.call(null,vec__11280_11299,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11300,func__3327__auto___11301);
{
var G__11302 = cljs.core.next.call(null,seq__11275_11293__$1);
var G__11303 = null;
var G__11304 = 0;
var G__11305 = 0;
seq__11275_11281 = G__11302;
chunk__11276_11282 = G__11303;
count__11277_11283 = G__11304;
i__11278_11284 = G__11305;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.replace_all_button = (function replace_all_button(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"button.replace","button.replace",910855018),"Replace All"], null));var seq__11312_11318 = 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 (e){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"searcher.replace-all","searcher.replace-all",1613341281));
})], null)));var chunk__11313_11319 = null;var count__11314_11320 = 0;var i__11315_11321 = 0;while(true){
if((i__11315_11321 < count__11314_11320))
{var vec__11316_11322 = cljs.core._nth.call(null,chunk__11313_11319,i__11315_11321);var ev__3326__auto___11323 = cljs.core.nth.call(null,vec__11316_11322,0,null);var func__3327__auto___11324 = cljs.core.nth.call(null,vec__11316_11322,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11323,func__3327__auto___11324);
{
var G__11325 = seq__11312_11318;
var G__11326 = chunk__11313_11319;
var G__11327 = count__11314_11320;
var G__11328 = (i__11315_11321 + 1);
seq__11312_11318 = G__11325;
chunk__11313_11319 = G__11326;
count__11314_11320 = G__11327;
i__11315_11321 = G__11328;
continue;
}
} else
{var temp__4092__auto___11329 = cljs.core.seq.call(null,seq__11312_11318);if(temp__4092__auto___11329)
{var seq__11312_11330__$1 = temp__4092__auto___11329;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11312_11330__$1))
{var c__4262__auto___11331 = cljs.core.chunk_first.call(null,seq__11312_11330__$1);{
var G__11332 = cljs.core.chunk_rest.call(null,seq__11312_11330__$1);
var G__11333 = c__4262__auto___11331;
var G__11334 = cljs.core.count.call(null,c__4262__auto___11331);
var G__11335 = 0;
seq__11312_11318 = G__11332;
chunk__11313_11319 = G__11333;
count__11314_11320 = G__11334;
i__11315_11321 = G__11335;
continue;
}
} else
{var vec__11317_11336 = cljs.core.first.call(null,seq__11312_11330__$1);var ev__3326__auto___11337 = cljs.core.nth.call(null,vec__11317_11336,0,null);var func__3327__auto___11338 = cljs.core.nth.call(null,vec__11317_11336,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11337,func__3327__auto___11338);
{
var G__11339 = cljs.core.next.call(null,seq__11312_11330__$1);
var G__11340 = null;
var G__11341 = 0;
var G__11342 = 0;
seq__11312_11318 = G__11339;
chunk__11313_11319 = G__11340;
count__11314_11320 = G__11341;
i__11315_11321 = G__11342;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.location_box = (function location_box(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.loc","input.loc",2719736462),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Locations",new cljs.core.Keyword(null,"value","value",1125876963),"<workspace>"], null)], null));var seq__11349_11355 = 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,"searcher.location","searcher.location",4589776032),this$);
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"searcher.location","searcher.location",4589776032));
})], null)));var chunk__11350_11356 = null;var count__11351_11357 = 0;var i__11352_11358 = 0;while(true){
if((i__11352_11358 < count__11351_11357))
{var vec__11353_11359 = cljs.core._nth.call(null,chunk__11350_11356,i__11352_11358);var ev__3326__auto___11360 = cljs.core.nth.call(null,vec__11353_11359,0,null);var func__3327__auto___11361 = cljs.core.nth.call(null,vec__11353_11359,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11360,func__3327__auto___11361);
{
var G__11362 = seq__11349_11355;
var G__11363 = chunk__11350_11356;
var G__11364 = count__11351_11357;
var G__11365 = (i__11352_11358 + 1);
seq__11349_11355 = G__11362;
chunk__11350_11356 = G__11363;
count__11351_11357 = G__11364;
i__11352_11358 = G__11365;
continue;
}
} else
{var temp__4092__auto___11366 = cljs.core.seq.call(null,seq__11349_11355);if(temp__4092__auto___11366)
{var seq__11349_11367__$1 = temp__4092__auto___11366;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11349_11367__$1))
{var c__4262__auto___11368 = cljs.core.chunk_first.call(null,seq__11349_11367__$1);{
var G__11369 = cljs.core.chunk_rest.call(null,seq__11349_11367__$1);
var G__11370 = c__4262__auto___11368;
var G__11371 = cljs.core.count.call(null,c__4262__auto___11368);
var G__11372 = 0;
seq__11349_11355 = G__11369;
chunk__11350_11356 = G__11370;
count__11351_11357 = G__11371;
i__11352_11358 = G__11372;
continue;
}
} else
{var vec__11354_11373 = cljs.core.first.call(null,seq__11349_11367__$1);var ev__3326__auto___11374 = cljs.core.nth.call(null,vec__11354_11373,0,null);var func__3327__auto___11375 = cljs.core.nth.call(null,vec__11354_11373,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11374,func__3327__auto___11375);
{
var G__11376 = cljs.core.next.call(null,seq__11349_11367__$1);
var G__11377 = null;
var G__11378 = 0;
var G__11379 = 0;
seq__11349_11355 = G__11376;
chunk__11350_11356 = G__11377;
count__11351_11357 = G__11378;
i__11352_11358 = G__11379;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.__GT_search_info = (function __GT_search_info(this$){var search = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));var replace = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".replace",".replace",673297976),lt.object.__GT_content.call(null,this$));var loc = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".loc",".loc",1015381956),lt.object.__GT_content.call(null,this$));return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"search","search",4402534682),lt.util.dom.val.call(null,search),new cljs.core.Keyword(null,"replace","replace",2108401190),lt.util.dom.val.call(null,replace),new cljs.core.Keyword(null,"loc","loc",1014011570),lt.util.dom.val.call(null,loc)], null);
});
lt.objs.search.__BEH__on_close = (function __BEH__on_close(this$){return lt.objs.tabs.rem_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","on-close","lt.objs.search/on-close",852635541),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__on_close,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close","close",1108660586),null], null), null));
lt.objs.search.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"timeout","timeout",3994960083),null,new cljs.core.Keyword(null,"results","results",2111450984),[],new cljs.core.Keyword(null,"result-count","result-count",4392277713),0,new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424),null,new cljs.core.Keyword("lt.objs.search","filesSearched","lt.objs.search/filesSearched",2511844033),null,new cljs.core.Keyword(null,"position","position",1761709211),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [0,-1], null)], null));
return lt.util.dom.empty.call(null,lt.objs.search.__GT_res.call(null,this$));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","clear!","lt.objs.search/clear!",4760733279),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__clear_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"clear!","clear!",3951036134),null], null), null));
lt.objs.search.__BEH__search_BANG_ = (function __BEH__search_BANG_(this$,search_info){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
var info = (function (){var or__3520__auto__ = search_info;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.objs.search.__GT_search_info.call(null,this$);
}
})();if(cljs.core.empty_QMARK_.call(null,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(info)))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,info);
lt.objs.notifos.working.call(null,"Searching workspace...");
return lt.objs.search.search_BANG_.call(null,this$,cljs.core.assoc.call(null,info,new cljs.core.Keyword(null,"exclude","exclude",3987722572),lt.objs.files.ignore_pattern.source,new cljs.core.Keyword(null,"paths","paths",1120343136),lt.objs.search.string__GT_loc.call(null,new cljs.core.Keyword(null,"loc","loc",1014011570).cljs$core$IFn$_invoke$arity$1(info))));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","search!","lt.objs.search/search!",3582214748),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__search_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,"search!","search!",2982232811),null], null), null));
lt.objs.search.__BEH__replace_BANG_ = (function __BEH__replace_BANG_(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
var info = lt.objs.search.__GT_search_info.call(null,this$);if(cljs.core.empty_QMARK_.call(null,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(info)))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,info);
lt.objs.notifos.working.call(null,"Replacing all in workspace...");
return lt.objs.search.search_BANG_.call(null,this$,cljs.core.assoc.call(null,info,new cljs.core.Keyword(null,"replacement","replacement",1444823428),new cljs.core.Keyword(null,"replace","replace",2108401190).cljs$core$IFn$_invoke$arity$1(info),new cljs.core.Keyword(null,"exclude","exclude",3987722572),lt.objs.files.ignore_pattern.source,new cljs.core.Keyword(null,"paths","paths",1120343136),lt.objs.search.string__GT_loc.call(null,new cljs.core.Keyword(null,"loc","loc",1014011570).cljs$core$IFn$_invoke$arity$1(info))));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","replace!","lt.objs.search/replace!",1148909304),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__replace_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,"replace!","replace!",583571295),null], null), null));
lt.objs.search.__BEH__done_searching = (function __BEH__done_searching(this$,info){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424),(new cljs.core.Keyword(null,"time","time",1017464383).cljs$core$IFn$_invoke$arity$1(info) / 1000),new cljs.core.Keyword("lt.objs.search","filesSearched","lt.objs.search/filesSearched",2511844033),new cljs.core.Keyword(null,"total","total",1124454070).cljs$core$IFn$_invoke$arity$1(info)], null));
if(cljs.core.truth_(new cljs.core.Keyword(null,"replace?","replace?",583571325).cljs$core$IFn$_invoke$arity$1(info)))
{lt.objs.notifos.done_working.call(null,[cljs.core.str("Replaced "),cljs.core.str(new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),cljs.core.str(" results in "),cljs.core.str((new cljs.core.Keyword(null,"time","time",1017464383).cljs$core$IFn$_invoke$arity$1(info) / 1000)),cljs.core.str("s.")].join(''));
return lt.util.dom.empty.call(null,lt.objs.search.__GT_res.call(null,this$));
} else
{return lt.objs.notifos.done_working.call(null,[cljs.core.str("Found "),cljs.core.str(new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),cljs.core.str(" results searching "),cljs.core.str(new cljs.core.Keyword(null,"total","total",1124454070).cljs$core$IFn$_invoke$arity$1(info)),cljs.core.str(" files in "),cljs.core.str((new cljs.core.Keyword(null,"time","time",1017464383).cljs$core$IFn$_invoke$arity$1(info) / 1000)),cljs.core.str("s.")].join(''));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","done-searching","lt.objs.search/done-searching",1038716850),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__done_searching,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"done-searching","done-searching",1230467105),null], null), null));
lt.objs.search.__BEH__next_BANG_ = (function __BEH__next_BANG_(this$){if((new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).length > 0))
{var all = new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var vec__11382 = new cljs.core.Keyword(null,"position","position",1761709211).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var file = cljs.core.nth.call(null,vec__11382,0,null);var result = cljs.core.nth.call(null,vec__11382,1,null);var cur = (all[file]);var vec__11383 = ((((result + 1) >= cur.results.length))?((((file + 1) >= all.length))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [0,0], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(file + 1),0], null)):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file,(result + 1)], null));var file__$1 = cljs.core.nth.call(null,vec__11383,0,null);var result__$1 = cljs.core.nth.call(null,vec__11383,1,null);var neue = (all[file__$1]);lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"position","position",1761709211),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file__$1,result__$1], null)], null));
lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),neue.file);
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),(neue.results[result__$1]).line);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","next!","lt.objs.search/next!",614385297),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__next_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,"next!","next!",1118619392),null], null), null));
lt.objs.search.__BEH__prev_BANG_ = (function __BEH__prev_BANG_(this$){if((new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).length > 0))
{var all = new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var vec__11386 = new cljs.core.Keyword(null,"position","position",1761709211).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var file = cljs.core.nth.call(null,vec__11386,0,null);var result = cljs.core.nth.call(null,vec__11386,1,null);var cur = (all[file]);var vec__11387 = ((((result - 1) < 0))?((((file - 1) < 0))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(all.length - 1),((all[(all.length - 1)]).results.length - 1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(file - 1),((all[(file - 1)]).results.length - 1)], null)):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file,(result - 1)], null));var file__$1 = cljs.core.nth.call(null,vec__11387,0,null);var result__$1 = cljs.core.nth.call(null,vec__11387,1,null);var neue = (new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))[file__$1]);lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"position","position",1761709211),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file__$1,result__$1], null)], null));
lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),neue.file);
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),(neue.results[result__$1]).line);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","prev!","lt.objs.search/prev!",611383121),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__prev_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,"prev!","prev!",1120835520),null], null), null));
lt.objs.search.__BEH__on_result = (function __BEH__on_result(this$,result){var total = cljs.core.count.call(null,result.results);var result__$1 = ((true)?(function (){var obj11391 = {"file":result.file,"results":result.results.slice(0,(lt.objs.search.result_threshold - new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))};return obj11391;
})():result);if((new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)) < lt.objs.search.result_threshold))
{lt.util.dom.append.call(null,lt.objs.search.__GT_res.call(null,this$),lt.objs.search.__GT_result_item.call(null,result__$1));
} else
{}
new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).push(result__$1);
return lt.object.update_BANG_.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"result-count","result-count",4392277713)], null),cljs.core._PLUS_,total);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","on-result","lt.objs.search/on-result",564457174),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__on_result,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"result","result",4374444943),null], null), null));
lt.objs.search.__BEH__focus = (function __BEH__focus(this$){return lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$)).focus();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","focus","lt.objs.search/focus",620932027),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__focus,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null,new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.search.result_count = (function result_count(this$){return cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core.List.EMPTY,(cljs.core.truth_(new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424).cljs$core$IFn$_invoke$arity$1(this$))?cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core.List.EMPTY,"s"),new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424).cljs$core$IFn$_invoke$arity$1(this$))," in "):null)),(((new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(this$) > lt.objs.search.result_threshold))?cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core.List.EMPTY,")"),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),lt.objs.search.result_threshold], null))," (showing "):null)),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(this$)," results"], null)),"Found  ");
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","workspace-search","lt.objs.search/workspace-search",4343830723),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searcher","searcher",1902549959),null], null), null),new cljs.core.Keyword(null,"results","results",2111450984),[],new cljs.core.Keyword(null,"name","name",1017277949),"Search results",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){lt.object.add_tags.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [((lt.objs.platform.win_QMARK_.call(null))?new cljs.core.Keyword(null,"searcher.win","searcher.win",1645682229):new cljs.core.Keyword(null,"searcher.unix","searcher.unix",3419097843))], null));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.search-results","div.search-results",980356928),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.res","ul.res",4464738363)], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.searcher","div.searcher",3267271812),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p","p",1013904354),crate.binding.bound.call(null,this$,lt.objs.search.result_count)], null),lt.objs.search.search_box.call(null,this$),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),lt.objs.search.replace_box.call(null,this$),lt.objs.search.replace_all_button.call(null,this$)], null),lt.objs.search.location_box.call(null,this$)], null)], null);
}));
lt.objs.search.searcher = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.search","workspace-search","lt.objs.search/workspace-search",4343830723));
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,"searcher.search","searcher.search",1646738643),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Execute search",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (info){var info__$1 = (function (){var or__3520__auto__ = info;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.objs.search.__GT_search_info.call(null,lt.objs.search.searcher);
}
})();return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"search!","search!",2982232811),info__$1);
})], 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,"searcher.show","searcher.show",3419032680),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Show",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto___11392 = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto___11392))
{var e_11393 = temp__4092__auto___11392;var temp__4092__auto___11394__$1 = lt.objs.editor.selection.call(null,e_11393);if(cljs.core.truth_(temp__4092__auto___11394__$1))
{var sel_11395 = temp__4092__auto___11394__$1;if(cljs.core.truth_(clojure.string.blank_QMARK_.call(null,sel_11395)))
{} else
{var search_11396 = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,lt.objs.search.searcher));lt.util.dom.val.call(null,search_11396,sel_11395);
}
} else
{}
} else
{}
return lt.objs.tabs.add_or_focus_BANG_.call(null,lt.objs.search.searcher);
})], 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,"searcher.next","searcher.next",3418881118),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Next result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"next!","next!",1118619392));
})], 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,"searcher.prev","searcher.prev",3418952606),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Prev result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"prev!","prev!",1120835520));
})], 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,"searcher.replace-all","searcher.replace-all",1613341281),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Replace all",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"replace!","replace!",583571295));
})], null));
