// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.find');
goog.require('cljs.core');
goog.require('lt.util.style');
goog.require('crate.binding');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.statusbar');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.context');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.canvas');
goog.require('lt.objs.statusbar');
goog.require('lt.util.load');
goog.require('crate.binding');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.editor');
goog.require('lt.objs.canvas');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.util.load');
goog.require('lt.util.style');
goog.require('lt.objs.editor');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.keyboard');
lt.objs.find.find_height = 30;
lt.objs.find.input = (function input(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.find","input.find",2354911439),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"find"], null)], null));var seq__8988_8994 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",1114262332),(function (){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.util.dom.val.call(null,me));
}),new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"find-bar","find-bar",4628501873),this$);
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"find-bar","find-bar",4628501873));
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
})], null)));var chunk__8989_8995 = null;var count__8990_8996 = 0;var i__8991_8997 = 0;while(true){
if((i__8991_8997 < count__8990_8996))
{var vec__8992_8998 = cljs.core._nth.call(null,chunk__8989_8995,i__8991_8997);var ev__3326__auto___8999 = cljs.core.nth.call(null,vec__8992_8998,0,null);var func__3327__auto___9000 = cljs.core.nth.call(null,vec__8992_8998,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___8999,func__3327__auto___9000);
{
var G__9001 = seq__8988_8994;
var G__9002 = chunk__8989_8995;
var G__9003 = count__8990_8996;
var G__9004 = (i__8991_8997 + 1);
seq__8988_8994 = G__9001;
chunk__8989_8995 = G__9002;
count__8990_8996 = G__9003;
i__8991_8997 = G__9004;
continue;
}
} else
{var temp__4092__auto___9005 = cljs.core.seq.call(null,seq__8988_8994);if(temp__4092__auto___9005)
{var seq__8988_9006__$1 = temp__4092__auto___9005;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8988_9006__$1))
{var c__4262__auto___9007 = cljs.core.chunk_first.call(null,seq__8988_9006__$1);{
var G__9008 = cljs.core.chunk_rest.call(null,seq__8988_9006__$1);
var G__9009 = c__4262__auto___9007;
var G__9010 = cljs.core.count.call(null,c__4262__auto___9007);
var G__9011 = 0;
seq__8988_8994 = G__9008;
chunk__8989_8995 = G__9009;
count__8990_8996 = G__9010;
i__8991_8997 = G__9011;
continue;
}
} else
{var vec__8993_9012 = cljs.core.first.call(null,seq__8988_9006__$1);var ev__3326__auto___9013 = cljs.core.nth.call(null,vec__8993_9012,0,null);var func__3327__auto___9014 = cljs.core.nth.call(null,vec__8993_9012,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9013,func__3327__auto___9014);
{
var G__9015 = cljs.core.next.call(null,seq__8988_9006__$1);
var G__9016 = null;
var G__9017 = 0;
var G__9018 = 0;
seq__8988_8994 = G__9015;
chunk__8989_8995 = G__9016;
count__8990_8996 = G__9017;
i__8991_8997 = G__9018;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.find.replace_input = (function replace_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.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__9025_9031 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",1114262332),(function (){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"replace.changed","replace.changed",762914028),lt.util.dom.val.call(null,me));
}),new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"find-bar.replace","find-bar.replace",4492994871),this$);
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"find-bar.replace","find-bar.replace",4492994871));
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
})], null)));var chunk__9026_9032 = null;var count__9027_9033 = 0;var i__9028_9034 = 0;while(true){
if((i__9028_9034 < count__9027_9033))
{var vec__9029_9035 = cljs.core._nth.call(null,chunk__9026_9032,i__9028_9034);var ev__3326__auto___9036 = cljs.core.nth.call(null,vec__9029_9035,0,null);var func__3327__auto___9037 = cljs.core.nth.call(null,vec__9029_9035,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9036,func__3327__auto___9037);
{
var G__9038 = seq__9025_9031;
var G__9039 = chunk__9026_9032;
var G__9040 = count__9027_9033;
var G__9041 = (i__9028_9034 + 1);
seq__9025_9031 = G__9038;
chunk__9026_9032 = G__9039;
count__9027_9033 = G__9040;
i__9028_9034 = G__9041;
continue;
}
} else
{var temp__4092__auto___9042 = cljs.core.seq.call(null,seq__9025_9031);if(temp__4092__auto___9042)
{var seq__9025_9043__$1 = temp__4092__auto___9042;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9025_9043__$1))
{var c__4262__auto___9044 = cljs.core.chunk_first.call(null,seq__9025_9043__$1);{
var G__9045 = cljs.core.chunk_rest.call(null,seq__9025_9043__$1);
var G__9046 = c__4262__auto___9044;
var G__9047 = cljs.core.count.call(null,c__4262__auto___9044);
var G__9048 = 0;
seq__9025_9031 = G__9045;
chunk__9026_9032 = G__9046;
count__9027_9033 = G__9047;
i__9028_9034 = G__9048;
continue;
}
} else
{var vec__9030_9049 = cljs.core.first.call(null,seq__9025_9043__$1);var ev__3326__auto___9050 = cljs.core.nth.call(null,vec__9030_9049,0,null);var func__3327__auto___9051 = cljs.core.nth.call(null,vec__9030_9049,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9050,func__3327__auto___9051);
{
var G__9052 = cljs.core.next.call(null,seq__9025_9043__$1);
var G__9053 = null;
var G__9054 = 0;
var G__9055 = 0;
seq__9025_9031 = G__9052;
chunk__9026_9032 = G__9053;
count__9027_9033 = G__9054;
i__9028_9034 = G__9055;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.find.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","button",3931183780),"all"], null));var seq__9062_9068 = 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.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"find.replace-all","find.replace-all",2877618629));
})], null)));var chunk__9063_9069 = null;var count__9064_9070 = 0;var i__9065_9071 = 0;while(true){
if((i__9065_9071 < count__9064_9070))
{var vec__9066_9072 = cljs.core._nth.call(null,chunk__9063_9069,i__9065_9071);var ev__3326__auto___9073 = cljs.core.nth.call(null,vec__9066_9072,0,null);var func__3327__auto___9074 = cljs.core.nth.call(null,vec__9066_9072,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9073,func__3327__auto___9074);
{
var G__9075 = seq__9062_9068;
var G__9076 = chunk__9063_9069;
var G__9077 = count__9064_9070;
var G__9078 = (i__9065_9071 + 1);
seq__9062_9068 = G__9075;
chunk__9063_9069 = G__9076;
count__9064_9070 = G__9077;
i__9065_9071 = G__9078;
continue;
}
} else
{var temp__4092__auto___9079 = cljs.core.seq.call(null,seq__9062_9068);if(temp__4092__auto___9079)
{var seq__9062_9080__$1 = temp__4092__auto___9079;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9062_9080__$1))
{var c__4262__auto___9081 = cljs.core.chunk_first.call(null,seq__9062_9080__$1);{
var G__9082 = cljs.core.chunk_rest.call(null,seq__9062_9080__$1);
var G__9083 = c__4262__auto___9081;
var G__9084 = cljs.core.count.call(null,c__4262__auto___9081);
var G__9085 = 0;
seq__9062_9068 = G__9082;
chunk__9063_9069 = G__9083;
count__9064_9070 = G__9084;
i__9065_9071 = G__9085;
continue;
}
} else
{var vec__9067_9086 = cljs.core.first.call(null,seq__9062_9080__$1);var ev__3326__auto___9087 = cljs.core.nth.call(null,vec__9067_9086,0,null);var func__3327__auto___9088 = cljs.core.nth.call(null,vec__9067_9086,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9087,func__3327__auto___9088);
{
var G__9089 = cljs.core.next.call(null,seq__9062_9080__$1);
var G__9090 = null;
var G__9091 = 0;
var G__9092 = 0;
seq__9062_9068 = G__9089;
chunk__9063_9069 = G__9090;
count__9064_9070 = G__9091;
i__9065_9071 = G__9092;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.find.current_ed = (function current_ed(){return lt.objs.editor.__GT_cm_ed.call(null,lt.objs.editor.pool.last_active.call(null));
});
lt.objs.find.__GT_shown_width = (function __GT_shown_width(shown_QMARK_){if(cljs.core.truth_(shown_QMARK_))
{return "";
} else
{return "0";
}
});
lt.objs.find.__GT_val = (function __GT_val(this$){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.find","input.find",2354911439),lt.object.__GT_content.call(null,this$)));
});
lt.objs.find.__GT_replacement = (function __GT_replacement(this$){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.replace","input.replace",1121297410),lt.object.__GT_content.call(null,this$)));
});
lt.objs.find.set_val = (function set_val(this$,v){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.find","input.find",2354911439),lt.object.__GT_content.call(null,this$)),v);
});
lt.objs.find.__BEH__show_BANG_ = (function __BEH__show_BANG_(this$){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"pos","pos",1014015430),(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__;return lt.objs.editor.__GT_cursor.call(null,ed);
} else
{return null;
}
})()], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","show!","lt.objs.find/show!",2146764764),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__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,"show!","show!",1123317814),null], null), null));
lt.objs.find.__BEH__hide_BANG_ = (function __BEH__hide_BANG_(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__;return lt.objs.editor.focus.call(null,ed);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","hide!","lt.objs.find/hide!",2156838397),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__hide_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,"hide!","hide!",1113177745),null], null), null));
lt.objs.find.__BEH__next_BANG_ = (function __BEH__next_BANG_(this$){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;if(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"searching?","searching?",4599032247).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(and__3508__auto__))
{return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"searching.for","searching.for",2610146695).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur)),lt.objs.find.__GT_val.call(null,this$));
} else
{return and__3508__auto__;
}
})()))
{return CodeMirror.commands.findNext(lt.objs.find.current_ed.call(null),new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.objs.find.__GT_val.call(null,this$));
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","next!","lt.objs.find/next!",2149177006),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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.find.__BEH__prev_BANG_ = (function __BEH__prev_BANG_(this$){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;if(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"searching?","searching?",4599032247).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(and__3508__auto__))
{return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"searching.for","searching.for",2610146695).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur)),lt.objs.find.__GT_val.call(null,this$));
} else
{return and__3508__auto__;
}
})()))
{return CodeMirror.commands.findPrev(lt.objs.find.current_ed.call(null),new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.objs.find.__GT_val.call(null,this$));
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","prev!","lt.objs.find/prev!",2146953582),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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.find.__BEH__focus_BANG_ = (function __BEH__focus_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));lt.util.dom.focus.call(null,input);
return input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","focus!","lt.objs.find/focus!",3523298151),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.find.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searching?","searching?",4599032247),false], null));
var temp__4092__auto___9093 = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto___9093))
{var ed_9094 = temp__4092__auto___9093;CodeMirror.commands.clearSearch(lt.objs.editor.__GT_cm_ed.call(null,ed_9094));
} else
{}
var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));if(cljs.core._EQ_.call(null,"",lt.util.dom.val.call(null,input)))
{return lt.util.dom.val.call(null,input,"");
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","clear!","lt.objs.find/clear!",2808649292),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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.find.__BEH__replace_BANG_ = (function __BEH__replace_BANG_(this$,all_QMARK_){if(cljs.core.truth_(new cljs.core.Keyword(null,"searching?","searching?",4599032247).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{} else
{lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.objs.find.__GT_val.call(null,this$));
}
CodeMirror.commands.replace(lt.objs.editor.__GT_cm_ed.call(null,lt.objs.editor.pool.last_active.call(null)),lt.objs.find.__GT_replacement.call(null,this$),new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),cljs.core.boolean$.call(null,all_QMARK_));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"next!","next!",1118619392));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","replace!","lt.objs.find/replace!",1610475715),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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.find.__BEH__search_BANG_ = (function __BEH__search_BANG_(this$,v){if(cljs.core.empty_QMARK_.call(null,v))
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
} else
{var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var e = temp__4092__auto__;var temp__4092__auto___9095__$1 = new cljs.core.Keyword(null,"pos","pos",1014015430).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(temp__4092__auto___9095__$1))
{var pos_9096 = temp__4092__auto___9095__$1;lt.objs.editor.move_cursor.call(null,e,pos_9096);
} else
{}
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searching?","searching?",4599032247),true], null));
lt.object.merge_BANG_.call(null,e,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searching.for","searching.for",2610146695),v], null));
var ed = lt.objs.editor.__GT_cm_ed.call(null,e);return CodeMirror.commands.find(ed,v,new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
} else
{return null;
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","search!","lt.objs.find/search!",4580588119),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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),new cljs.core.Keyword(null,"debounce","debounce",1556599227),50);
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","find-bar","lt.objs.find/find-bar",1860577053),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"find-bar","find-bar",4628501873),null], null), null),new cljs.core.Keyword(null,"height","height",4087841945),30,new cljs.core.Keyword(null,"order","order",1119910592),-1,new cljs.core.Keyword(null,"searching?","searching?",4599032247),false,new cljs.core.Keyword(null,"reverse?","reverse?",749403407),false,new cljs.core.Keyword(null,"shown","shown",1123317891),false,new cljs.core.Keyword(null,"pos","pos",1014015430),null,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#find-bar","div#find-bar",4400386339),lt.objs.find.input.call(null,this$),lt.objs.find.replace_input.call(null,this$),lt.objs.find.replace_all_button.call(null,this$)], null);
}));
lt.objs.find.__BEH__init = (function __BEH__init(this$){lt.util.load.js.call(null,"core/node_modules/codemirror_addons/search.js",new cljs.core.Keyword(null,"sync","sync",1017449997));
return lt.util.load.js.call(null,"core/node_modules/codemirror/addon/search/searchcursor.js",new cljs.core.Keyword(null,"sync","sync",1017449997));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","init","lt.objs.find/init",2521376816),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__init,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));
lt.objs.find.bar = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.find","find-bar","lt.objs.find/find-bar",1860577053));
lt.objs.statusbar.add_container.call(null,lt.objs.find.bar);
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.show","find.show",1398717828),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: In current editor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (rev_QMARK_){lt.object.merge_BANG_.call(null,lt.objs.find.bar,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"reverse?","reverse?",749403407),rev_QMARK_], null));
lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"show!","show!",1123317814));
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.fill-selection","find.fill-selection",632770057),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Fill with selection",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 e = temp__4092__auto__;var temp__4092__auto____$1 = lt.objs.editor.selection.call(null,e);if(cljs.core.truth_(temp__4092__auto____$1))
{var sel = temp__4092__auto____$1;if(cljs.core.empty_QMARK_.call(null,sel))
{return null;
} else
{return lt.objs.find.set_val.call(null,lt.objs.find.bar,sel);
}
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.clear","find.clear",4338523466),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Clear the find bar",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.find.bar,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.hide","find.hide",1398390729),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Hide the find bar",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"hide!","hide!",1113177745));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.next","find.next",1398566266),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Next find result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"next!","next!",1118619392));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.prev","find.prev",1398637754),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Previous find result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"prev!","prev!",1120835520));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.replace","find.replace",755032817),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Replace current",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"replace!","replace!",583571295));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"find.replace-all","find.replace-all",2877618629),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Replace all occurrences",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"replace!","replace!",583571295),new cljs.core.Keyword(null,"all","all",1014000915));
})], null));
lt.objs.find.line_input = lt.objs.sidebar.command.options_input.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"line number"], null));
lt.objs.find.__BEH__exec_active_BANG_ = (function __BEH__exec_active_BANG_(this$,l){return lt.objs.sidebar.command.exec_active_BANG_.call(null,l);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","exec-active!","lt.objs.find/exec-active!",4519874941),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__exec_active_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.object.add_behavior_BANG_.call(null,lt.objs.find.line_input,new cljs.core.Keyword("lt.objs.find","exec-active!","lt.objs.find/exec-active!",4519874941));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Goto line",new cljs.core.Keyword(null,"options","options",4059396624),lt.objs.find.line_input,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (l){if((typeof l === 'number') || (!(cljs.core.empty_QMARK_.call(null,l))))
{var cur = lt.objs.editor.pool.last_active.call(null);lt.objs.editor.move_cursor.call(null,cur,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"ch","ch",1013907415),0,new cljs.core.Keyword(null,"line","line",1017226086),(((!(typeof l === 'number'))?parseInt(l):l) - 1)], null));
return lt.objs.editor.center_cursor.call(null,cur);
} else
{return null;
}
})], null));
