// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.version');
goog.require('cljs.core');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.files');
goog.require('lt.objs.opener');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.files');
goog.require('lt.objs.opener');
goog.require('lt.objs.deploy');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.deploy');
lt.objs.version.check_button = (function check_button(){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.button","div.button",2319197857),"Check for updates"], null));var seq__13962_13968 = 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.deploy.check_version.call(null,true);
})], null)));var chunk__13963_13969 = null;var count__13964_13970 = 0;var i__13965_13971 = 0;while(true){
if((i__13965_13971 < count__13964_13970))
{var vec__13966_13972 = cljs.core._nth.call(null,chunk__13963_13969,i__13965_13971);var ev__3326__auto___13973 = cljs.core.nth.call(null,vec__13966_13972,0,null);var func__3327__auto___13974 = cljs.core.nth.call(null,vec__13966_13972,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13973,func__3327__auto___13974);
{
var G__13975 = seq__13962_13968;
var G__13976 = chunk__13963_13969;
var G__13977 = count__13964_13970;
var G__13978 = (i__13965_13971 + 1);
seq__13962_13968 = G__13975;
chunk__13963_13969 = G__13976;
count__13964_13970 = G__13977;
i__13965_13971 = G__13978;
continue;
}
} else
{var temp__4092__auto___13979 = cljs.core.seq.call(null,seq__13962_13968);if(temp__4092__auto___13979)
{var seq__13962_13980__$1 = temp__4092__auto___13979;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13962_13980__$1))
{var c__4262__auto___13981 = cljs.core.chunk_first.call(null,seq__13962_13980__$1);{
var G__13982 = cljs.core.chunk_rest.call(null,seq__13962_13980__$1);
var G__13983 = c__4262__auto___13981;
var G__13984 = cljs.core.count.call(null,c__4262__auto___13981);
var G__13985 = 0;
seq__13962_13968 = G__13982;
chunk__13963_13969 = G__13983;
count__13964_13970 = G__13984;
i__13965_13971 = G__13985;
continue;
}
} else
{var vec__13967_13986 = cljs.core.first.call(null,seq__13962_13980__$1);var ev__3326__auto___13987 = cljs.core.nth.call(null,vec__13967_13986,0,null);var func__3327__auto___13988 = cljs.core.nth.call(null,vec__13967_13986,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13987,func__3327__auto___13988);
{
var G__13989 = cljs.core.next.call(null,seq__13962_13980__$1);
var G__13990 = null;
var G__13991 = 0;
var G__13992 = 0;
seq__13962_13968 = G__13989;
chunk__13963_13969 = G__13990;
count__13964_13970 = G__13991;
i__13965_13971 = G__13992;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.version.__BEH__on_show_refresh_eds = (function __BEH__on_show_refresh_eds(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"show","show",1017433711));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.version","on-show-refresh-eds","lt.objs.version/on-show-refresh-eds",3549853297),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.version.__BEH__on_show_refresh_eds,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.version.__BEH__destroy_on_close = (function __BEH__destroy_on_close(this$){return lt.object.destroy_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.version","destroy-on-close","lt.objs.version/destroy-on-close",2424697494),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.version.__BEH__destroy_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.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.version","version-pane","lt.objs.version/version-pane",1326997590),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"version","version",1365512266),null], null), null),new cljs.core.Keyword(null,"name","name",1017277949),"Version",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){var main = lt.objs.editor.pool.create.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"mime","mime",1017255846),"markdown",new cljs.core.Keyword(null,"content","content",1965434859),new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,lt.objs.files.lt_home.call(null,"/core/changelog.md")))], null));lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"ed","ed",1013907473),main], null));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#version-info","div#version-info",3819681447),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.info","div.info",1323843421),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dl","dl",1013907450),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dt","dt",1013907458),"Light Table version"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dd","dd",1013907442),new cljs.core.Keyword(null,"version","version",1365512266).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dt","dt",1013907458),"Binary version"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dd","dd",1013907442),lt.objs.deploy.binary_version.call(null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dt","dt",1013907458),"Plugins directory",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dd","dd",1013907442),lt.objs.files.lt_user_dir.call(null,"plugins")], null)], null)], null),lt.objs.version.check_button.call(null)], null),lt.objs.editor.__GT_elem.call(null,main)], null);
}));
lt.objs.version.add = (function add(){var v = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.version","version-pane","lt.objs.version/version-pane",1326997590));lt.objs.tabs.add_BANG_.call(null,v);
return lt.objs.tabs.active_BANG_.call(null,v);
});
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,"version","version",1365512266),new cljs.core.Keyword(null,"desc","desc",1016984067),"App: Light Table version",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (_){return lt.objs.version.add.call(null);
})], null));
