// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.statusbar');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.util.dom');
goog.require('lt.objs.tabs');
goog.require('lt.util.cljs');
goog.require('lt.util.dom');
goog.require('lt.objs.canvas');
goog.require('lt.util.cljs');
goog.require('lt.objs.command');
goog.require('lt.objs.bottombar');
goog.require('crate.binding');
goog.require('lt.objs.editor');
goog.require('lt.objs.canvas');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.tabs');
goog.require('lt.objs.bottombar');
goog.require('lt.objs.command');
goog.require('lt.objs.editor');
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar-container","lt.objs.statusbar/statusbar-container",2425546359),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"statusbar","statusbar",3238675027),null], null), null),new cljs.core.Keyword(null,"items","items",1114430258),cljs.core.sorted_set_by.call(null,(function (p1__13330_SHARP_){return new cljs.core.Keyword(null,"order","order",1119910592).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__13330_SHARP_));
})),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#statusbar-container","div#statusbar-container",4312198421)], null);
}));
lt.objs.statusbar.container = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar-container","lt.objs.statusbar/statusbar-container",2425546359));
/**
* Add an object to the statusbar container. When you wish the object to be displayed or hidden,
* raise :show! or :hide! respectively. Objects must have :order and :height keys in order to determine
* the space required for the object.
*/
lt.objs.statusbar.add_container = (function add_container(obj){lt.object.add_tags.call(null,obj,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"statusbar-item","statusbar-item",4250035697)], null));
lt.object.update_BANG_.call(null,lt.objs.statusbar.container,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"items","items",1114430258)], null),cljs.core.conj,obj);
var i = lt.util.cljs.index_of.call(null,obj,new cljs.core.Keyword(null,"items","items",1114430258).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.statusbar.container)));if(cljs.core._EQ_.call(null,i,0))
{return lt.util.dom.prepend.call(null,lt.object.__GT_content.call(null,lt.objs.statusbar.container),lt.object.__GT_content.call(null,obj));
} else
{return lt.util.dom.after.call(null,lt.object.__GT_content.call(null,cljs.core.get.call(null,new cljs.core.Keyword(null,"items","items",1114430258).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.statusbar.container)),i)),lt.object.__GT_content.call(null,obj));
}
});
lt.objs.statusbar.__BEH__on_show_BANG_ = (function __BEH__on_show_BANG_(this$){if(cljs.core.truth_(new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return null;
} else
{lt.util.dom.css.call(null,lt.object.__GT_content.call(null,this$),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"height","height",4087841945),new cljs.core.Keyword(null,"height","height",4087841945).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))], null));
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083),true], null));
return lt.object.raise.call(null,lt.objs.tabs.multi,new cljs.core.Keyword(null,"tabset-bottom!","tabset-bottom!",2684870056),new cljs.core.Keyword(null,"height","height",4087841945).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","on-show!","lt.objs.statusbar/on-show!",2528540082),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__on_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.statusbar.__BEH__on_hide_BANG_ = (function __BEH__on_hide_BANG_(this$){if(cljs.core.truth_(new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{lt.util.dom.css.call(null,lt.object.__GT_content.call(null,this$),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"height","height",4087841945),0], null));
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083),false], null));
return lt.object.raise.call(null,lt.objs.tabs.multi,new cljs.core.Keyword(null,"tabset-bottom!","tabset-bottom!",2684870056),(- new cljs.core.Keyword(null,"height","height",4087841945).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.statusbar","on-hide!","lt.objs.statusbar/on-hide!",2534061899),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__on_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.statusbar.__BEH__init_statusbar = (function __BEH__init_statusbar(app){return lt.util.dom.append.call(null,lt.object.__GT_content.call(null,lt.objs.tabs.multi),lt.object.__GT_content.call(null,lt.objs.statusbar.container));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","init-statusbar","lt.objs.statusbar/init-statusbar",3154736296),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__init_statusbar,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.statusbar.statusbar_item = (function statusbar_item(content,class$){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,"li","li",1013907695),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),class$], null),content], null));var seq__13337_13343 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__13338_13344 = null;var count__13339_13345 = 0;var i__13340_13346 = 0;while(true){
if((i__13340_13346 < count__13339_13345))
{var vec__13341_13347 = cljs.core._nth.call(null,chunk__13338_13344,i__13340_13346);var ev__3326__auto___13348 = cljs.core.nth.call(null,vec__13341_13347,0,null);var func__3327__auto___13349 = cljs.core.nth.call(null,vec__13341_13347,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13348,func__3327__auto___13349);
{
var G__13350 = seq__13337_13343;
var G__13351 = chunk__13338_13344;
var G__13352 = count__13339_13345;
var G__13353 = (i__13340_13346 + 1);
seq__13337_13343 = G__13350;
chunk__13338_13344 = G__13351;
count__13339_13345 = G__13352;
i__13340_13346 = G__13353;
continue;
}
} else
{var temp__4092__auto___13354 = cljs.core.seq.call(null,seq__13337_13343);if(temp__4092__auto___13354)
{var seq__13337_13355__$1 = temp__4092__auto___13354;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13337_13355__$1))
{var c__4262__auto___13356 = cljs.core.chunk_first.call(null,seq__13337_13355__$1);{
var G__13357 = cljs.core.chunk_rest.call(null,seq__13337_13355__$1);
var G__13358 = c__4262__auto___13356;
var G__13359 = cljs.core.count.call(null,c__4262__auto___13356);
var G__13360 = 0;
seq__13337_13343 = G__13357;
chunk__13338_13344 = G__13358;
count__13339_13345 = G__13359;
i__13340_13346 = G__13360;
continue;
}
} else
{var vec__13342_13361 = cljs.core.first.call(null,seq__13337_13355__$1);var ev__3326__auto___13362 = cljs.core.nth.call(null,vec__13342_13361,0,null);var func__3327__auto___13363 = cljs.core.nth.call(null,vec__13342_13361,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13362,func__3327__auto___13363);
{
var G__13364 = cljs.core.next.call(null,seq__13337_13355__$1);
var G__13365 = null;
var G__13366 = 0;
var G__13367 = 0;
seq__13337_13343 = G__13364;
chunk__13338_13344 = G__13365;
count__13339_13345 = G__13366;
i__13340_13346 = G__13367;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar","lt.objs.statusbar/statusbar",3933351963),new cljs.core.Keyword(null,"items","items",1114430258),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"height","height",4087841945),34,new cljs.core.Keyword(null,"order","order",1119910592),0,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul#statusbar","ul#statusbar",2076227431),crate.binding.map_bound.call(null,(function (p1__13368_SHARP_){return lt.object.__GT_content.call(null,cljs.core.deref.call(null,p1__13368_SHARP_));
}),this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"path","path",1017337751),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"items","items",1114430258)], null)], null))], null);
}));
lt.objs.statusbar.statusbar = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar","lt.objs.statusbar/statusbar",3933351963));
lt.objs.statusbar.add_container.call(null,lt.objs.statusbar.statusbar);
lt.objs.statusbar.__BEH__show_statusbar = (function __BEH__show_statusbar(this$){return lt.object.raise.call(null,lt.objs.statusbar.statusbar,new cljs.core.Keyword(null,"show!","show!",1123317814));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","show-statusbar","lt.objs.statusbar/show-statusbar",3545826539),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__show_statusbar,new cljs.core.Keyword(null,"desc","desc",1016984067),"App: Show statusbar at the bottom of the 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,"init","init",1017141378),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"user","user",1017503549));
lt.objs.statusbar.add_statusbar_item = (function add_statusbar_item(item){return lt.object.update_BANG_.call(null,lt.objs.statusbar.statusbar,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"items","items",1114430258)], null),cljs.core.conj,item);
});
lt.objs.statusbar.__GT_cursor_str = (function __GT_cursor_str(p__13369){var map__13371 = p__13369;var map__13371__$1 = ((cljs.core.seq_QMARK_.call(null,map__13371))?cljs.core.apply.call(null,cljs.core.hash_map,map__13371):map__13371);var pos = cljs.core.get.call(null,map__13371__$1,new cljs.core.Keyword(null,"pos","pos",1014015430));return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.pos","span.pos",3069890850),[cljs.core.str(""),cljs.core.str((new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(pos) + 1)),cljs.core.str(" / "),cljs.core.str((new cljs.core.Keyword(null,"ch","ch",1013907415).cljs$core$IFn$_invoke$arity$1(pos) + 1))].join('')], null);
});
lt.objs.statusbar.__BEH__update_cursor_location = (function __BEH__update_cursor_location(this$,pos){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"pos","pos",1014015430),pos], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","update-cursor-location","lt.objs.statusbar/update-cursor-location",3219638212),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__update_cursor_location,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"update!","update!",779473898),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.cursor","lt.objs.statusbar/statusbar.cursor",2923420677),new cljs.core.Keyword(null,"triggers","triggers",2516997421),cljs.core.PersistentHashSet.EMPTY,new cljs.core.Keyword(null,"behaviors","behaviors",607554515),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar","update-cursor-location","lt.objs.statusbar/update-cursor-location",3219638212),null], null), null),new cljs.core.Keyword(null,"pos","pos",1014015430),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"line","line",1017226086),0,new cljs.core.Keyword(null,"ch","ch",1013907415),0], null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.statusbar.statusbar_item.call(null,crate.binding.bound.call(null,this$,lt.objs.statusbar.__GT_cursor_str),"");
}));
lt.objs.statusbar.statusbar_cursor = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.cursor","lt.objs.statusbar/statusbar.cursor",2923420677));
lt.objs.statusbar.add_statusbar_item.call(null,lt.objs.statusbar.statusbar_cursor);
lt.objs.statusbar.__BEH__report_cursor_location = (function __BEH__report_cursor_location(this$){return lt.object.raise.call(null,lt.objs.statusbar.statusbar_cursor,new cljs.core.Keyword(null,"update!","update!",779473898),lt.objs.editor.__GT_cursor.call(null,this$));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","report-cursor-location","lt.objs.statusbar/report-cursor-location",4636515157),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__report_cursor_location,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"move","move",1017261891),null,new cljs.core.Keyword(null,"active","active",3885920888),null], null), null));
lt.objs.statusbar.loader_disp = (function loader_disp(this$){if((new cljs.core.Keyword(null,"loaders","loaders",1350551090).cljs$core$IFn$_invoke$arity$1(this$) > 0))
{return "";
} else
{return "none";
}
});
lt.objs.statusbar.arrow_disp = (function arrow_disp(this$){if((new cljs.core.Keyword(null,"loaders","loaders",1350551090).cljs$core$IFn$_invoke$arity$1(this$) > 0))
{return "none";
} else
{return "";
}
});
lt.objs.statusbar.loader = (function loader(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,"span.load-wrapper","span.load-wrapper",4427265602),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",1123684643),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),crate.binding.bound.call(null,this$,lt.objs.statusbar.loader_disp)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.img","span.img",3069884049)], null)], null));var seq__13378_13384 = 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,"toggle","toggle",4440567494));
})], null)));var chunk__13379_13385 = null;var count__13380_13386 = 0;var i__13381_13387 = 0;while(true){
if((i__13381_13387 < count__13380_13386))
{var vec__13382_13388 = cljs.core._nth.call(null,chunk__13379_13385,i__13381_13387);var ev__3326__auto___13389 = cljs.core.nth.call(null,vec__13382_13388,0,null);var func__3327__auto___13390 = cljs.core.nth.call(null,vec__13382_13388,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13389,func__3327__auto___13390);
{
var G__13391 = seq__13378_13384;
var G__13392 = chunk__13379_13385;
var G__13393 = count__13380_13386;
var G__13394 = (i__13381_13387 + 1);
seq__13378_13384 = G__13391;
chunk__13379_13385 = G__13392;
count__13380_13386 = G__13393;
i__13381_13387 = G__13394;
continue;
}
} else
{var temp__4092__auto___13395 = cljs.core.seq.call(null,seq__13378_13384);if(temp__4092__auto___13395)
{var seq__13378_13396__$1 = temp__4092__auto___13395;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13378_13396__$1))
{var c__4262__auto___13397 = cljs.core.chunk_first.call(null,seq__13378_13396__$1);{
var G__13398 = cljs.core.chunk_rest.call(null,seq__13378_13396__$1);
var G__13399 = c__4262__auto___13397;
var G__13400 = cljs.core.count.call(null,c__4262__auto___13397);
var G__13401 = 0;
seq__13378_13384 = G__13398;
chunk__13379_13385 = G__13399;
count__13380_13386 = G__13400;
i__13381_13387 = G__13401;
continue;
}
} else
{var vec__13383_13402 = cljs.core.first.call(null,seq__13378_13396__$1);var ev__3326__auto___13403 = cljs.core.nth.call(null,vec__13383_13402,0,null);var func__3327__auto___13404 = cljs.core.nth.call(null,vec__13383_13402,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13403,func__3327__auto___13404);
{
var G__13405 = cljs.core.next.call(null,seq__13378_13396__$1);
var G__13406 = null;
var G__13407 = 0;
var G__13408 = 0;
seq__13378_13384 = G__13405;
chunk__13379_13385 = G__13406;
count__13380_13386 = G__13407;
i__13381_13387 = G__13408;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.statusbar.log_item = (function log_item(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),crate.binding.bound.call(null,i,new cljs.core.Keyword(null,"text","text",1017460895))], null));var seq__13415_13421 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__13416_13422 = null;var count__13417_13423 = 0;var i__13418_13424 = 0;while(true){
if((i__13418_13424 < count__13417_13423))
{var vec__13419_13425 = cljs.core._nth.call(null,chunk__13416_13422,i__13418_13424);var ev__3326__auto___13426 = cljs.core.nth.call(null,vec__13419_13425,0,null);var func__3327__auto___13427 = cljs.core.nth.call(null,vec__13419_13425,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13426,func__3327__auto___13427);
{
var G__13428 = seq__13415_13421;
var G__13429 = chunk__13416_13422;
var G__13430 = count__13417_13423;
var G__13431 = (i__13418_13424 + 1);
seq__13415_13421 = G__13428;
chunk__13416_13422 = G__13429;
count__13417_13423 = G__13430;
i__13418_13424 = G__13431;
continue;
}
} else
{var temp__4092__auto___13432 = cljs.core.seq.call(null,seq__13415_13421);if(temp__4092__auto___13432)
{var seq__13415_13433__$1 = temp__4092__auto___13432;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13415_13433__$1))
{var c__4262__auto___13434 = cljs.core.chunk_first.call(null,seq__13415_13433__$1);{
var G__13435 = cljs.core.chunk_rest.call(null,seq__13415_13433__$1);
var G__13436 = c__4262__auto___13434;
var G__13437 = cljs.core.count.call(null,c__4262__auto___13434);
var G__13438 = 0;
seq__13415_13421 = G__13435;
chunk__13416_13422 = G__13436;
count__13417_13423 = G__13437;
i__13418_13424 = G__13438;
continue;
}
} else
{var vec__13420_13439 = cljs.core.first.call(null,seq__13415_13433__$1);var ev__3326__auto___13440 = cljs.core.nth.call(null,vec__13420_13439,0,null);var func__3327__auto___13441 = cljs.core.nth.call(null,vec__13420_13439,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13440,func__3327__auto___13441);
{
var G__13442 = cljs.core.next.call(null,seq__13415_13433__$1);
var G__13443 = null;
var G__13444 = 0;
var G__13445 = 0;
seq__13415_13421 = G__13442;
chunk__13416_13422 = G__13443;
count__13417_13423 = G__13444;
i__13418_13424 = G__13445;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.statusbar.__GT_message_class = (function __GT_message_class(m){return [cljs.core.str("message "),cljs.core.str((function (){var or__3520__auto__ = m;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})())].join('');
});
lt.objs.statusbar.log = (function log(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.log","div.log",2686473177),lt.objs.statusbar.loader.call(null,this$),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,(function (p1__13446_SHARP_){return lt.objs.statusbar.__GT_message_class.call(null,new cljs.core.Keyword(null,"class","class",1108647146).cljs$core$IFn$_invoke$arity$1(p1__13446_SHARP_));
}))], null),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"message","message",1968829305))], null)], null));var seq__13453_13459 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__13454_13460 = null;var count__13455_13461 = 0;var i__13456_13462 = 0;while(true){
if((i__13456_13462 < count__13455_13461))
{var vec__13457_13463 = cljs.core._nth.call(null,chunk__13454_13460,i__13456_13462);var ev__3326__auto___13464 = cljs.core.nth.call(null,vec__13457_13463,0,null);var func__3327__auto___13465 = cljs.core.nth.call(null,vec__13457_13463,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13464,func__3327__auto___13465);
{
var G__13466 = seq__13453_13459;
var G__13467 = chunk__13454_13460;
var G__13468 = count__13455_13461;
var G__13469 = (i__13456_13462 + 1);
seq__13453_13459 = G__13466;
chunk__13454_13460 = G__13467;
count__13455_13461 = G__13468;
i__13456_13462 = G__13469;
continue;
}
} else
{var temp__4092__auto___13470 = cljs.core.seq.call(null,seq__13453_13459);if(temp__4092__auto___13470)
{var seq__13453_13471__$1 = temp__4092__auto___13470;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13453_13471__$1))
{var c__4262__auto___13472 = cljs.core.chunk_first.call(null,seq__13453_13471__$1);{
var G__13473 = cljs.core.chunk_rest.call(null,seq__13453_13471__$1);
var G__13474 = c__4262__auto___13472;
var G__13475 = cljs.core.count.call(null,c__4262__auto___13472);
var G__13476 = 0;
seq__13453_13459 = G__13473;
chunk__13454_13460 = G__13474;
count__13455_13461 = G__13475;
i__13456_13462 = G__13476;
continue;
}
} else
{var vec__13458_13477 = cljs.core.first.call(null,seq__13453_13471__$1);var ev__3326__auto___13478 = cljs.core.nth.call(null,vec__13458_13477,0,null);var func__3327__auto___13479 = cljs.core.nth.call(null,vec__13458_13477,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13478,func__3327__auto___13479);
{
var G__13480 = cljs.core.next.call(null,seq__13453_13471__$1);
var G__13481 = null;
var G__13482 = 0;
var G__13483 = 0;
seq__13453_13459 = G__13480;
chunk__13454_13460 = G__13481;
count__13455_13461 = G__13482;
i__13456_13462 = G__13483;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.loader","lt.objs.statusbar/statusbar.loader",2772437308),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"statusbar.console","statusbar.console",4348364476),null], null), null),new cljs.core.Keyword(null,"loaders","loaders",1350551090),0,new cljs.core.Keyword(null,"message","message",1968829305),"",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.statusbar.statusbar_item.call(null,lt.objs.statusbar.log.call(null,this$),"left");
}));
lt.objs.statusbar.statusbar_loader = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.loader","lt.objs.statusbar/statusbar.loader",2772437308));
lt.objs.statusbar.add_statusbar_item.call(null,lt.objs.statusbar.statusbar_loader);
lt.objs.statusbar.loader_set = (function loader_set(){return lt.object.merge_BANG_.call(null,lt.objs.statusbar.statusbar_loader,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"loaders","loaders",1350551090),0], null));
});
lt.objs.statusbar.loader_inc = (function loader_inc(){return lt.object.update_BANG_.call(null,lt.objs.statusbar.statusbar_loader,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaders","loaders",1350551090)], null),cljs.core.inc);
});
lt.objs.statusbar.loader_dec = (function loader_dec(){if((new cljs.core.Keyword(null,"loaders","loaders",1350551090).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.statusbar.statusbar_loader)) > 0))
{return lt.object.update_BANG_.call(null,lt.objs.statusbar.statusbar_loader,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaders","loaders",1350551090)], null),cljs.core.dec);
} else
{return null;
}
});
lt.objs.statusbar.toggle_class = (function toggle_class(p__13484){var map__13486 = p__13484;var map__13486__$1 = ((cljs.core.seq_QMARK_.call(null,map__13486))?cljs.core.apply.call(null,cljs.core.hash_map,map__13486):map__13486);var class$ = cljs.core.get.call(null,map__13486__$1,new cljs.core.Keyword(null,"class","class",1108647146));var dirty = cljs.core.get.call(null,map__13486__$1,new cljs.core.Keyword(null,"dirty","dirty",1109497668));return [cljs.core.str("console-toggle "),cljs.core.str((cljs.core.truth_(class$)?[cljs.core.str(class$),cljs.core.str(" ")].join(''):null)),cljs.core.str((((dirty > 0))?"dirty":null))].join('');
});
lt.objs.statusbar.toggle_span = (function toggle_span(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,"span","span",1017440956),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,lt.objs.statusbar.toggle_class)], null),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"dirty","dirty",1109497668))], null));var seq__13493_13499 = 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,"toggle-console","toggle-console",4454540112));
})], null)));var chunk__13494_13500 = null;var count__13495_13501 = 0;var i__13496_13502 = 0;while(true){
if((i__13496_13502 < count__13495_13501))
{var vec__13497_13503 = cljs.core._nth.call(null,chunk__13494_13500,i__13496_13502);var ev__3326__auto___13504 = cljs.core.nth.call(null,vec__13497_13503,0,null);var func__3327__auto___13505 = cljs.core.nth.call(null,vec__13497_13503,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13504,func__3327__auto___13505);
{
var G__13506 = seq__13493_13499;
var G__13507 = chunk__13494_13500;
var G__13508 = count__13495_13501;
var G__13509 = (i__13496_13502 + 1);
seq__13493_13499 = G__13506;
chunk__13494_13500 = G__13507;
count__13495_13501 = G__13508;
i__13496_13502 = G__13509;
continue;
}
} else
{var temp__4092__auto___13510 = cljs.core.seq.call(null,seq__13493_13499);if(temp__4092__auto___13510)
{var seq__13493_13511__$1 = temp__4092__auto___13510;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13493_13511__$1))
{var c__4262__auto___13512 = cljs.core.chunk_first.call(null,seq__13493_13511__$1);{
var G__13513 = cljs.core.chunk_rest.call(null,seq__13493_13511__$1);
var G__13514 = c__4262__auto___13512;
var G__13515 = cljs.core.count.call(null,c__4262__auto___13512);
var G__13516 = 0;
seq__13493_13499 = G__13513;
chunk__13494_13500 = G__13514;
count__13495_13501 = G__13515;
i__13496_13502 = G__13516;
continue;
}
} else
{var vec__13498_13517 = cljs.core.first.call(null,seq__13493_13511__$1);var ev__3326__auto___13518 = cljs.core.nth.call(null,vec__13498_13517,0,null);var func__3327__auto___13519 = cljs.core.nth.call(null,vec__13498_13517,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13518,func__3327__auto___13519);
{
var G__13520 = cljs.core.next.call(null,seq__13493_13511__$1);
var G__13521 = null;
var G__13522 = 0;
var G__13523 = 0;
seq__13493_13499 = G__13520;
chunk__13494_13500 = G__13521;
count__13495_13501 = G__13522;
i__13496_13502 = G__13523;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.console-toggle","lt.objs.statusbar/statusbar.console-toggle",4344040401),new cljs.core.Keyword(null,"dirty","dirty",1109497668),0,new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"statusbar.console-toggle","statusbar.console-toggle",3902398121)], null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.statusbar.statusbar_item.call(null,lt.objs.statusbar.toggle_span.call(null,this$),"");
}));
lt.objs.statusbar.console_toggle = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.console-toggle","lt.objs.statusbar/statusbar.console-toggle",4344040401));
lt.objs.statusbar.add_statusbar_item.call(null,lt.objs.statusbar.console_toggle);
lt.objs.statusbar.dirty = (function dirty(){return lt.object.update_BANG_.call(null,lt.objs.statusbar.console_toggle,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dirty","dirty",1109497668)], null),cljs.core.inc);
});
lt.objs.statusbar.clean = (function clean(){return lt.object.merge_BANG_.call(null,lt.objs.statusbar.console_toggle,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"dirty","dirty",1109497668),0,new cljs.core.Keyword(null,"class","class",1108647146),null], null));
});
lt.objs.statusbar.console_class = (function console_class(class$){return lt.object.merge_BANG_.call(null,lt.objs.statusbar.console_toggle,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),class$], null));
});
