// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.browser');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.objs.menu');
goog.require('lt.objs.files');
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.context');
goog.require('lt.objs.notifos');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('clojure.string');
goog.require('lt.objs.clients.devtools');
goog.require('lt.objs.command');
goog.require('lt.objs.platform');
goog.require('lt.objs.menu');
goog.require('lt.objs.files');
goog.require('lt.objs.sidebar.clients');
goog.require('lt.objs.eval');
goog.require('lt.objs.clients');
goog.require('clojure.string');
goog.require('lt.objs.clients.devtools');
goog.require('crate.binding');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.console');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('lt.objs.console');
goog.require('crate.core');
goog.require('lt.objs.eval');
goog.require('lt.objs.clients');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.sidebar.clients');
goog.require('lt.objs.command');
goog.require('lt.objs.keyboard');
lt.objs.browser.utils = (function (){var obj6952 = {};return obj6952;
})();
lttools = lt.objs.browser.utils;
lt.objs.browser.check_http = (function check_http(url){if((cljs.core._EQ_.call(null,url.indexOf("http"),-1)) && (cljs.core._EQ_.call(null,url.indexOf("file://"),-1)))
{return [cljs.core.str("http://"),cljs.core.str(url)].join('');
} else
{return url;
}
});
lt.objs.browser.add_util = (function add_util(nme,fn){return (lt.objs.browser.utils[cljs.core.name.call(null,nme)] = fn);
});
lt.objs.browser.browser_id = (function browser_id(this$){return [cljs.core.str("browser"),cljs.core.str(lt.object.__GT_id.call(null,this$))].join('');
});
lt.objs.browser.to_frame = (function to_frame(this$){return lt.util.dom.$.call(null,new cljs.core.Keyword(null,"webview","webview",2238328683),lt.object.__GT_content.call(null,this$));
});
lt.objs.browser.client__GT_devtools = (function client__GT_devtools(ed){return new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))));
});
lt.objs.browser.handle_cb = (function handle_cb(cbid,command,data){return lt.object.raise.call(null,lt.objs.clients.clients,new cljs.core.Keyword(null,"message","message",1968829305),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cbid,command,data], null));
});
lt.objs.browser.connect_client = (function connect_client(this$){return lt.objs.clients.handle_connection_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"name","name",1017277949),new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"frame","frame",1111596255),this$,new cljs.core.Keyword(null,"frame-id","frame-id",3663850733),lt.objs.browser.browser_id.call(null,this$),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,"frame.client","frame.client",2018369246)], null),new cljs.core.Keyword(null,"commands","commands",4706336250),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"editor.eval.cljs.exec","editor.eval.cljs.exec",866638030),null,new cljs.core.Keyword(null,"editor.eval.css","editor.eval.css",1083014276),null,new cljs.core.Keyword(null,"editor.eval.js","editor.eval.js",1847417804),null,new cljs.core.Keyword(null,"editor.eval.html","editor.eval.html",3156465134),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"frame","frame",1111596255)], null));
});
lt.objs.browser.add = (function add(){var browser = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.browser","browser","lt.objs.browser/browser",1401265285));lt.objs.tabs.add_BANG_.call(null,browser);
lt.objs.tabs.active_BANG_.call(null,browser);
return browser;
});
lt.objs.browser.url_bar = (function url_bar(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.url-bar","input.url-bar",4150417411),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"url",new cljs.core.Keyword(null,"value","value",1125876963),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"url","url",1014020321))], null)], null));var seq__6959_6965 = 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,"browser.url-bar","browser.url-bar",537128289),this$);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"browser.url-bar","browser.url-bar",537128289));
})], null)));var chunk__6960_6966 = null;var count__6961_6967 = 0;var i__6962_6968 = 0;while(true){
if((i__6962_6968 < count__6961_6967))
{var vec__6963_6969 = cljs.core._nth.call(null,chunk__6960_6966,i__6962_6968);var ev__3326__auto___6970 = cljs.core.nth.call(null,vec__6963_6969,0,null);var func__3327__auto___6971 = cljs.core.nth.call(null,vec__6963_6969,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6970,func__3327__auto___6971);
{
var G__6972 = seq__6959_6965;
var G__6973 = chunk__6960_6966;
var G__6974 = count__6961_6967;
var G__6975 = (i__6962_6968 + 1);
seq__6959_6965 = G__6972;
chunk__6960_6966 = G__6973;
count__6961_6967 = G__6974;
i__6962_6968 = G__6975;
continue;
}
} else
{var temp__4092__auto___6976 = cljs.core.seq.call(null,seq__6959_6965);if(temp__4092__auto___6976)
{var seq__6959_6977__$1 = temp__4092__auto___6976;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6959_6977__$1))
{var c__4262__auto___6978 = cljs.core.chunk_first.call(null,seq__6959_6977__$1);{
var G__6979 = cljs.core.chunk_rest.call(null,seq__6959_6977__$1);
var G__6980 = c__4262__auto___6978;
var G__6981 = cljs.core.count.call(null,c__4262__auto___6978);
var G__6982 = 0;
seq__6959_6965 = G__6979;
chunk__6960_6966 = G__6980;
count__6961_6967 = G__6981;
i__6962_6968 = G__6982;
continue;
}
} else
{var vec__6964_6983 = cljs.core.first.call(null,seq__6959_6977__$1);var ev__3326__auto___6984 = cljs.core.nth.call(null,vec__6964_6983,0,null);var func__3327__auto___6985 = cljs.core.nth.call(null,vec__6964_6983,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___6984,func__3327__auto___6985);
{
var G__6986 = cljs.core.next.call(null,seq__6959_6977__$1);
var G__6987 = null;
var G__6988 = 0;
var G__6989 = 0;
seq__6959_6965 = G__6986;
chunk__6960_6966 = G__6987;
count__6961_6967 = G__6988;
i__6962_6968 = G__6989;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.backward = (function backward(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,"button","button",3931183780),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),"<"], null),"<"], null));var seq__6996_7002 = 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,"back!","back!",1107397516));
})], null)));var chunk__6997_7003 = null;var count__6998_7004 = 0;var i__6999_7005 = 0;while(true){
if((i__6999_7005 < count__6998_7004))
{var vec__7000_7006 = cljs.core._nth.call(null,chunk__6997_7003,i__6999_7005);var ev__3326__auto___7007 = cljs.core.nth.call(null,vec__7000_7006,0,null);var func__3327__auto___7008 = cljs.core.nth.call(null,vec__7000_7006,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7007,func__3327__auto___7008);
{
var G__7009 = seq__6996_7002;
var G__7010 = chunk__6997_7003;
var G__7011 = count__6998_7004;
var G__7012 = (i__6999_7005 + 1);
seq__6996_7002 = G__7009;
chunk__6997_7003 = G__7010;
count__6998_7004 = G__7011;
i__6999_7005 = G__7012;
continue;
}
} else
{var temp__4092__auto___7013 = cljs.core.seq.call(null,seq__6996_7002);if(temp__4092__auto___7013)
{var seq__6996_7014__$1 = temp__4092__auto___7013;if(cljs.core.chunked_seq_QMARK_.call(null,seq__6996_7014__$1))
{var c__4262__auto___7015 = cljs.core.chunk_first.call(null,seq__6996_7014__$1);{
var G__7016 = cljs.core.chunk_rest.call(null,seq__6996_7014__$1);
var G__7017 = c__4262__auto___7015;
var G__7018 = cljs.core.count.call(null,c__4262__auto___7015);
var G__7019 = 0;
seq__6996_7002 = G__7016;
chunk__6997_7003 = G__7017;
count__6998_7004 = G__7018;
i__6999_7005 = G__7019;
continue;
}
} else
{var vec__7001_7020 = cljs.core.first.call(null,seq__6996_7014__$1);var ev__3326__auto___7021 = cljs.core.nth.call(null,vec__7001_7020,0,null);var func__3327__auto___7022 = cljs.core.nth.call(null,vec__7001_7020,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7021,func__3327__auto___7022);
{
var G__7023 = cljs.core.next.call(null,seq__6996_7014__$1);
var G__7024 = null;
var G__7025 = 0;
var G__7026 = 0;
seq__6996_7002 = G__7023;
chunk__6997_7003 = G__7024;
count__6998_7004 = G__7025;
i__6999_7005 = G__7026;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.forward = (function forward(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,"button","button",3931183780),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),">"], null),">"], null));var seq__7033_7039 = 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,"forward!","forward!",1497217390));
})], null)));var chunk__7034_7040 = null;var count__7035_7041 = 0;var i__7036_7042 = 0;while(true){
if((i__7036_7042 < count__7035_7041))
{var vec__7037_7043 = cljs.core._nth.call(null,chunk__7034_7040,i__7036_7042);var ev__3326__auto___7044 = cljs.core.nth.call(null,vec__7037_7043,0,null);var func__3327__auto___7045 = cljs.core.nth.call(null,vec__7037_7043,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7044,func__3327__auto___7045);
{
var G__7046 = seq__7033_7039;
var G__7047 = chunk__7034_7040;
var G__7048 = count__7035_7041;
var G__7049 = (i__7036_7042 + 1);
seq__7033_7039 = G__7046;
chunk__7034_7040 = G__7047;
count__7035_7041 = G__7048;
i__7036_7042 = G__7049;
continue;
}
} else
{var temp__4092__auto___7050 = cljs.core.seq.call(null,seq__7033_7039);if(temp__4092__auto___7050)
{var seq__7033_7051__$1 = temp__4092__auto___7050;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7033_7051__$1))
{var c__4262__auto___7052 = cljs.core.chunk_first.call(null,seq__7033_7051__$1);{
var G__7053 = cljs.core.chunk_rest.call(null,seq__7033_7051__$1);
var G__7054 = c__4262__auto___7052;
var G__7055 = cljs.core.count.call(null,c__4262__auto___7052);
var G__7056 = 0;
seq__7033_7039 = G__7053;
chunk__7034_7040 = G__7054;
count__7035_7041 = G__7055;
i__7036_7042 = G__7056;
continue;
}
} else
{var vec__7038_7057 = cljs.core.first.call(null,seq__7033_7051__$1);var ev__3326__auto___7058 = cljs.core.nth.call(null,vec__7038_7057,0,null);var func__3327__auto___7059 = cljs.core.nth.call(null,vec__7038_7057,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7058,func__3327__auto___7059);
{
var G__7060 = cljs.core.next.call(null,seq__7033_7051__$1);
var G__7061 = null;
var G__7062 = 0;
var G__7063 = 0;
seq__7033_7039 = G__7060;
chunk__7034_7040 = G__7061;
count__7035_7041 = G__7062;
i__7036_7042 = G__7063;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.refresh = (function refresh(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,"button","button",3931183780),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),"re"], null),"\u21BA"], null));var seq__7070_7076 = 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,"refresh!","refresh!",4597922840));
})], null)));var chunk__7071_7077 = null;var count__7072_7078 = 0;var i__7073_7079 = 0;while(true){
if((i__7073_7079 < count__7072_7078))
{var vec__7074_7080 = cljs.core._nth.call(null,chunk__7071_7077,i__7073_7079);var ev__3326__auto___7081 = cljs.core.nth.call(null,vec__7074_7080,0,null);var func__3327__auto___7082 = cljs.core.nth.call(null,vec__7074_7080,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7081,func__3327__auto___7082);
{
var G__7083 = seq__7070_7076;
var G__7084 = chunk__7071_7077;
var G__7085 = count__7072_7078;
var G__7086 = (i__7073_7079 + 1);
seq__7070_7076 = G__7083;
chunk__7071_7077 = G__7084;
count__7072_7078 = G__7085;
i__7073_7079 = G__7086;
continue;
}
} else
{var temp__4092__auto___7087 = cljs.core.seq.call(null,seq__7070_7076);if(temp__4092__auto___7087)
{var seq__7070_7088__$1 = temp__4092__auto___7087;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7070_7088__$1))
{var c__4262__auto___7089 = cljs.core.chunk_first.call(null,seq__7070_7088__$1);{
var G__7090 = cljs.core.chunk_rest.call(null,seq__7070_7088__$1);
var G__7091 = c__4262__auto___7089;
var G__7092 = cljs.core.count.call(null,c__4262__auto___7089);
var G__7093 = 0;
seq__7070_7076 = G__7090;
chunk__7071_7077 = G__7091;
count__7072_7078 = G__7092;
i__7073_7079 = G__7093;
continue;
}
} else
{var vec__7075_7094 = cljs.core.first.call(null,seq__7070_7088__$1);var ev__3326__auto___7095 = cljs.core.nth.call(null,vec__7075_7094,0,null);var func__3327__auto___7096 = cljs.core.nth.call(null,vec__7075_7094,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7095,func__3327__auto___7096);
{
var G__7097 = cljs.core.next.call(null,seq__7070_7088__$1);
var G__7098 = null;
var G__7099 = 0;
var G__7100 = 0;
seq__7070_7076 = G__7097;
chunk__7071_7077 = G__7098;
count__7072_7078 = G__7099;
i__7073_7079 = G__7100;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.webview = (function webview(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,"webview","webview",2238328683),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"src","src",1014018390),crate.binding.bound.call(null,crate.binding.subatom.call(null,this$,new cljs.core.Keyword(null,"url","url",1014020321))),new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.browser.browser_id.call(null,this$),new cljs.core.Keyword(null,"preload","preload",695427451),lt.objs.files.lt_home.call(null,"core/node_modules/lighttable/browserInjection.js")], null)], null));var seq__7107_7113 = 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.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
})], null)));var chunk__7108_7114 = null;var count__7109_7115 = 0;var i__7110_7116 = 0;while(true){
if((i__7110_7116 < count__7109_7115))
{var vec__7111_7117 = cljs.core._nth.call(null,chunk__7108_7114,i__7110_7116);var ev__3326__auto___7118 = cljs.core.nth.call(null,vec__7111_7117,0,null);var func__3327__auto___7119 = cljs.core.nth.call(null,vec__7111_7117,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7118,func__3327__auto___7119);
{
var G__7120 = seq__7107_7113;
var G__7121 = chunk__7108_7114;
var G__7122 = count__7109_7115;
var G__7123 = (i__7110_7116 + 1);
seq__7107_7113 = G__7120;
chunk__7108_7114 = G__7121;
count__7109_7115 = G__7122;
i__7110_7116 = G__7123;
continue;
}
} else
{var temp__4092__auto___7124 = cljs.core.seq.call(null,seq__7107_7113);if(temp__4092__auto___7124)
{var seq__7107_7125__$1 = temp__4092__auto___7124;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7107_7125__$1))
{var c__4262__auto___7126 = cljs.core.chunk_first.call(null,seq__7107_7125__$1);{
var G__7127 = cljs.core.chunk_rest.call(null,seq__7107_7125__$1);
var G__7128 = c__4262__auto___7126;
var G__7129 = cljs.core.count.call(null,c__4262__auto___7126);
var G__7130 = 0;
seq__7107_7113 = G__7127;
chunk__7108_7114 = G__7128;
count__7109_7115 = G__7129;
i__7110_7116 = G__7130;
continue;
}
} else
{var vec__7112_7131 = cljs.core.first.call(null,seq__7107_7125__$1);var ev__3326__auto___7132 = cljs.core.nth.call(null,vec__7112_7131,0,null);var func__3327__auto___7133 = cljs.core.nth.call(null,vec__7112_7131,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7132,func__3327__auto___7133);
{
var G__7134 = cljs.core.next.call(null,seq__7107_7125__$1);
var G__7135 = null;
var G__7136 = 0;
var G__7137 = 0;
seq__7107_7113 = G__7134;
chunk__7108_7114 = G__7135;
count__7109_7115 = G__7136;
i__7110_7116 = G__7137;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","browser","lt.objs.browser/browser",1401265285),new cljs.core.Keyword(null,"name","name",1017277949),"browser",new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"browser","browser",1164844698),null], null), null),new cljs.core.Keyword(null,"url","url",1014020321),"about:blank",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"client","client",3951159101),lt.objs.browser.connect_client.call(null,this$),new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228),lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","devtools-client","lt.objs.clients.devtools/devtools-client",2732459658),new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))], null));
lt.object.raise.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#browser","div#browser",741844136),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.frame-shade","div.frame-shade",4348666722)], null),lt.objs.browser.webview.call(null,this$),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"nav","nav",1014013077),lt.objs.browser.backward.call(null,this$),lt.objs.browser.forward.call(null,this$),lt.objs.browser.url_bar.call(null,this$),lt.objs.browser.refresh.call(null,this$)], null)], null);
}));
lt.objs.browser.__BEH__reconnect_on_move = (function __BEH__reconnect_on_move(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","reconnect-on-move","lt.objs.browser/reconnect-on-move",2151189542),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__reconnect_on_move,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"move","move",1017261891),null], null), null));
lt.objs.browser.__BEH__destroy_on_close = (function __BEH__destroy_on_close(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
lt.object.destroy_BANG_.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.destroy_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","destroy-on-close","lt.objs.browser/destroy-on-close",2232797874),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__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.objs.browser.__BEH__rem_client = (function __BEH__rem_client(this$){if(cljs.core._EQ_.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959)),this$))
{lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959));
} else
{}
var temp__4092__auto___7138 = cljs.core.first.call(null,cljs.core.remove.call(null,cljs.core.PersistentHashSet.fromArray([this$], true),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698))));if(cljs.core.truth_(temp__4092__auto___7138))
{var b_7139 = temp__4092__auto___7138;lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959),b_7139);
} else
{}
return lt.objs.clients.rem_BANG_.call(null,new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","rem-client","lt.objs.browser/rem-client",3433438675),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__rem_client,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"destroy","destroy",2571277164),null], null), null));
lt.objs.browser.__BEH__navigate_BANG_ = (function __BEH__navigate_BANG_(this$,n){var bar = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));var url = lt.objs.browser.check_http.call(null,(function (){var or__3520__auto__ = n;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.util.dom.val.call(null,bar);
}
})());lt.objs.notifos.working.call(null);
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"url","url",1014020321),url,new cljs.core.Keyword(null,"loading-counter","loading-counter",2714046941),(new cljs.core.Keyword(null,"loading-counter","loading-counter",2714046941).cljs$core$IFn$_invoke$arity$2(cljs.core.deref.call(null,this$),0) + 1)], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","navigate!","lt.objs.browser/navigate!",803576413),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__navigate_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,"navigate!","navigate!",1766726722),null], null), null));
lt.objs.browser.__BEH__url_focus_BANG_ = (function __BEH__url_focus_BANG_(this$){var url_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,url_input);
return url_input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","url-focus!","lt.objs.browser/url-focus!",3402432972),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__url_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,"url.focus!","url.focus!",4046450458),null], null), null));
lt.objs.browser.__BEH__focus_BANG_ = (function __BEH__focus_BANG_(this$){return lt.util.dom.focus.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"webview","webview",2238328683),lt.object.__GT_content.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","focus!","lt.objs.browser/focus!",3058401254),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__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.browser.__BEH__back_BANG_ = (function __BEH__back_BANG_(this$){var frame = lt.objs.browser.to_frame.call(null,this$);return frame.goBack();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","back!","lt.objs.browser/back!",1427460503),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__back_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,"back!","back!",1107397516),null], null), null));
lt.objs.browser.__BEH__forward_BANG_ = (function __BEH__forward_BANG_(this$){var frame = lt.objs.browser.to_frame.call(null,this$);return frame.goForward();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","forward!","lt.objs.browser/forward!",533790641),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__forward_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,"forward!","forward!",1497217390),null], null), null));
lt.objs.browser.__BEH__refresh_BANG_ = (function __BEH__refresh_BANG_(this$){var frame = lt.objs.browser.to_frame.call(null,this$);return frame.reload();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","refresh!","lt.objs.browser/refresh!",1696987659),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__refresh_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,"refresh!","refresh!",4597922840),null], null), null));
lt.objs.browser.__BEH__menu_BANG_ = (function __BEH__menu_BANG_(this$,e){var items_7140 = cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"order","order",1119910592),lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"menu+","menu+",1117686302),cljs.core.PersistentVector.EMPTY));lt.objs.menu.show_menu.call(null,lt.objs.menu.menu.call(null,items_7140));
lt.util.dom.prevent.call(null,e);
return lt.util.dom.stop_propagation.call(null,e);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","menu!","lt.objs.browser/menu!",1421234191),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__menu_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,"menu!","menu!",1117686292),null], null), null));
lt.objs.browser.__BEH__menu_PLUS_ = (function __BEH__menu_PLUS_(this$,menu){return cljs.core.conj.call(null,menu,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"forward",new cljs.core.Keyword(null,"order","order",1119910592),0,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"browser.forward","browser.forward",4326300017));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"back",new cljs.core.Keyword(null,"order","order",1119910592),1,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"browser.back","browser.back",2720710495));
})], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"separator",new cljs.core.Keyword(null,"order","order",1119910592),2], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"copy",new cljs.core.Keyword(null,"order","order",1119910592),3,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.browser.to_frame.call(null,this$).copy();
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"paste",new cljs.core.Keyword(null,"order","order",1119910592),4,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.browser.to_frame.call(null,this$).paste();
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","menu+","lt.objs.browser/menu+",1421234177),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__menu_PLUS_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu+","menu+",1117686302),null], null), null));
lt.objs.browser.__BEH__init_BANG_ = (function __BEH__init_BANG_(this$){var frame = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"webview","webview",2238328683),lt.object.__GT_content.call(null,this$));var bar = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));frame.addEventListener("ipc-message",(function (e,arg){var args = (e.args[0]);var pred__7144 = cljs.core._EQ_;var expr__7145 = e.channel;if(cljs.core.truth_(pred__7144.call(null,"browser-event",expr__7145)))
{return lt.object.raise.call(null,this$,cljs.core.keyword.call(null,(args[0])),(args[1]));
} else
{if(cljs.core.truth_(pred__7144.call(null,"browser-raise",expr__7145)))
{return lt.object.raise.call(null,lt.object.by_id.call(null,(args[0])),cljs.core.keyword.call(null,(args[1])),cljs.core.js__GT_clj.call(null,(args[2]),new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true));
} else
{throw (new Error([cljs.core.str("No matching clause: "),cljs.core.str(expr__7145)].join('')));
}
}
}));
frame.addEventListener("contextmenu",(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"menu!","menu!",1117686292),e);
}));
return frame.addEventListener("did-finish-load",(function (){var loc = frame.getUrl();lt.objs.clients.devtools.clear_scripts_BANG_.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
lt.util.dom.val.call(null,bar,loc);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"navigate","navigate",3116398819),loc);
}));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","init!","lt.objs.browser/init!",1417774750),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__init_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,"init","init",1017141378),null], null), null));
lt.objs.browser.__BEH__handle_hash_change = (function __BEH__handle_hash_change(this$,info){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)),info.href);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-hash-change","lt.objs.browser/handle-hash-change",1421561479),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_hash_change,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"hashchange","hashchange",2126071216),null], null), null));
lt.objs.browser.__BEH__set_client_name = (function __BEH__set_client_name(this$,loc){var title = lt.objs.browser.to_frame.call(null,this$).getTitle();var title__$1 = ((!(cljs.core.empty_QMARK_.call(null,title)))?title:"browser");lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"name","name",1017277949),title__$1], null));
lt.objs.tabs.refresh_BANG_.call(null,this$);
var n__4362__auto___7147 = new cljs.core.Keyword(null,"loading-counter","loading-counter",2714046941).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var x_7148 = 0;while(true){
if((x_7148 < n__4362__auto___7147))
{lt.objs.notifos.done_working.call(null);
{
var G__7149 = (x_7148 + 1);
x_7148 = G__7149;
continue;
}
} else
{}
break;
}
return lt.object.merge_BANG_.call(null,new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"name","name",1017277949),loc], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","set-client-name","lt.objs.browser/set-client-name",1645431759),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__set_client_name,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"navigate","navigate",3116398819),null], null), null));
lt.objs.browser.__BEH__update_devtools_client_url = (function __BEH__update_devtools_client_url(this$,loc){return lt.object.merge_BANG_.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"url","url",1014020321),loc], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","update-devtools-client-url","lt.objs.browser/update-devtools-client-url",3723278333),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__update_devtools_client_url,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"navigate","navigate",3116398819),null], null), null));
lt.objs.browser.__BEH__set_active = (function __BEH__set_active(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","set-active","lt.objs.browser/set-active",4650437726),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__set_active,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"active","active",3885920888),null,new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.browser.__BEH__active_context = (function __BEH__active_context(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","active-context","lt.objs.browser/active-context",1990046533),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__active_context,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"active","active",3885920888),null,new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.browser.__BEH__focus_on_show = (function __BEH__focus_on_show(this$){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","focus-on-show","lt.objs.browser/focus-on-show",650060667),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__focus_on_show,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.browser.__BEH__inactive_context = (function __BEH__inactive_context(this$){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","inactive-context","lt.objs.browser/inactive-context",1464142818),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__inactive_context,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"inactive","inactive",1038569437),null], null), null));
lt.objs.browser.__BEH__handle_send_BANG_ = (function __BEH__handle_send_BANG_(this$,msg){return lt.object.raise.call(null,this$,cljs.core.keyword.call(null,[cljs.core.str(new cljs.core.Keyword(null,"command","command",1964298941).cljs$core$IFn$_invoke$arity$1(msg)),cljs.core.str("!")].join('')),msg);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-send!","lt.objs.browser/handle-send!",4165361401),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_send_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,"send!","send!",1123226891),null], null), null));
lt.objs.browser.__BEH__handle_refresh_BANG_ = (function __BEH__handle_refresh_BANG_(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-refresh!","lt.objs.browser/handle-refresh!",2985065480),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_refresh_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,"client.refresh!","client.refresh!",1210437339),null], null), null));
lt.objs.browser.__BEH__handle_close_BANG_ = (function __BEH__handle_close_BANG_(this$){lt.object.raise.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"close","close",1108660586));
return lt.objs.clients.rem_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-close!","lt.objs.browser/handle-close!",2176426435),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_close_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,"client.close!","client.close!",582466590),null], null), null));
lt.objs.browser.__BEH__change_live = (function __BEH__change_live(this$,msg){var temp__4092__auto__ = lt.objs.clients.cb__GT_obj.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;if(cljs.core.truth_(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg))))
{return lt.objs.clients.devtools.changelive_BANG_.call(null,ed,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)),lt.plugins.watches.watched_range(ed,null,null,lt.objs.langs.js.src__GT_watch),(function (res){return lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"editor.eval.js.change-live.success","editor.eval.js.change-live.success",2994410460));
}),cljs.core.identity);
} else
{return null;
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","change-live","lt.objs.browser/change-live",2720093766),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__change_live,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.js.change-live!","editor.eval.js.change-live!",3424692446),null], null), null));
lt.objs.browser.__BEH__js_eval_file = (function __BEH__js_eval_file(this$,msg,cb){var temp__4092__auto__ = lt.objs.clients.cb__GT_obj.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var data = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var data__$1 = cljs.core.assoc.call(null,data,new cljs.core.Keyword(null,"code","code",1016963423),[cljs.core.str(new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(data)),cljs.core.str("\n\n//# sourceURL="),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(data))].join(''));return lt.objs.clients.devtools.eval_in_webview_client.call(null,lt.objs.browser.client__GT_devtools.call(null,this$),data__$1,(function (res){if(cljs.core.truth_(cb))
{cb.call(null);
} else
{}
return lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"editor.eval.js.file.success","editor.eval.js.file.success",4272529943));
}));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","js-eval-file","lt.objs.browser/js-eval-file",817287718),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__js_eval_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.js.file!","editor.eval.js.file!",1760417539),null], null), null));
lt.objs.browser.__BEH__html_eval = (function __BEH__html_eval(this$,msg){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"client.refresh!","client.refresh!",1210437339));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","html-eval","lt.objs.browser/html-eval",3721717555),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__html_eval,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.html!","editor.eval.html!",3008782487),null], null), null));
lt.objs.browser.__BEH__css_eval = (function __BEH__css_eval(this$,msg){var info = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var frame = lt.objs.browser.to_frame.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));return frame.send("editor.eval.css",{"code": new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(info), "name": new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(info)});
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","css-eval","lt.objs.browser/css-eval",2220805003),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__css_eval,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.css!","editor.eval.css!",3156315329),null], null), null));
lt.objs.browser.__BEH__cljs_exec = (function __BEH__cljs_exec(this$,msg){var frame = lt.objs.browser.to_frame.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var info = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);return frame.send("editor.eval.cljs.exec",{"client": new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg), "results": cljs.core.clj__GT_js.call(null,new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(info))});
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","cljs-exec","lt.objs.browser/cljs-exec",1664374689),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__cljs_exec,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.cljs.exec!","editor.eval.cljs.exec!",743618999),null], null), null));
lt.objs.browser.eval_js_form = (function eval_js_form(this$,msg){var data = cljs.core.assoc.call(null,new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"code","code",1016963423),lt.objs.eval.append_source_file.call(null,new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg))));var devtools_client = lt.objs.browser.client__GT_devtools.call(null,this$);lt.objs.clients.devtools.eval_in_webview_client.call(null,devtools_client,data,(function (res){var result = lt.objs.clients.devtools.inspector__GT_result.call(null,devtools_client,res);var req = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var result__$1 = cljs.core.assoc.call(null,result,new cljs.core.Keyword(null,"meta","meta",1017252215),new cljs.core.Keyword(null,"meta","meta",1017252215).cljs$core$IFn$_invoke$arity$1(req),new cljs.core.Keyword(null,"no-inspect","no-inspect",887813498),true);if(cljs.core.not.call(null,new cljs.core.Keyword(null,"ex","ex",1013907493).cljs$core$IFn$_invoke$arity$1(result__$1)))
{return lt.objs.browser.handle_cb.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"editor.eval.js.result","editor.eval.js.result",3021062051),result__$1);
} else
{return lt.objs.browser.handle_cb.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"editor.eval.js.exception","editor.eval.js.exception",723801901),result__$1);
}
}));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"editor.eval.js.change-live!","editor.eval.js.change-live!",3424692446),msg);
});
lt.objs.browser.must_eval_file_QMARK_ = (function must_eval_file_QMARK_(devtools,msg){if(cljs.core.truth_(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg))))
{return (cljs.core.not.call(null,new cljs.core.Keyword(null,"meta","meta",1017252215).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)))) || (cljs.core.not.call(null,lt.objs.clients.devtools.find_script.call(null,devtools,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)))));
} else
{return null;
}
});
lt.objs.browser.__BEH__js_eval = (function __BEH__js_eval(this$,msg){var devtools = lt.objs.browser.client__GT_devtools.call(null,this$);if(cljs.core.truth_(lt.objs.browser.must_eval_file_QMARK_.call(null,devtools,msg)))
{var temp__4092__auto__ = lt.object.by_id.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var data = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var data__$1 = cljs.core.assoc.call(null,data,new cljs.core.Keyword(null,"code","code",1016963423),[cljs.core.str(lt.objs.editor.__GT_val.call(null,ed)),cljs.core.str("\n\n//# sourceURL="),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(data))].join(''));return lt.objs.clients.devtools.eval_in_webview_client.call(null,lt.objs.browser.client__GT_devtools.call(null,this$),data__$1,(function (res){return lt.objs.browser.eval_js_form.call(null,this$,msg);
}));
} else
{return null;
}
} else
{return lt.objs.browser.eval_js_form.call(null,this$,msg);
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","js-eval","lt.objs.browser/js-eval",3158449165),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__js_eval,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.js!","editor.eval.js!",1083020921),null], null), null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.url-bar.navigate!","browser.url-bar.navigate!",1014303491),new cljs.core.Keyword(null,"desc","desc",1016984067),"BrowserUrlBar: navigate to location",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (loc){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser.url-bar","browser.url-bar",537128289));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),loc);
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.url-bar.focus","browser.url-bar.focus",3353788299),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: focus url",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (loc){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"url.focus!","url.focus!",4046450458));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.focus-content","browser.focus-content",1148241840),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: focus content",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.back","browser.back",2720710495),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: back",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"back!","back!",1107397516));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.forward","browser.forward",4326300017),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: forward",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"forward!","forward!",1497217390));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"add-browser-tab","add-browser-tab",3663273910),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: add browser tab",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (loc){var b = lt.objs.browser.add.call(null);if(cljs.core.not.call(null,loc))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),loc);
}
})], 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,"refresh-connected-browser","refresh-connected-browser",3935980900),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: refresh active browser tab",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.open-current-file-in-browser","editor.open-current-file-in-browser",1439718637),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Open current file in browser",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var b = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959));var ed = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_((function (){var and__3508__auto__ = ed;if(cljs.core.truth_(and__3508__auto__))
{return new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed)));
} else
{return and__3508__auto__;
}
})()))
{if(cljs.core.truth_(b))
{} else
{lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"add-browser-tab","add-browser-tab",3663273910));
}
return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959)),new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),[cljs.core.str("file://"),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))].join(''));
} else
{return null;
}
})], null));
lt.objs.sidebar.clients.add_connector.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1017277949),"Browser",new cljs.core.Keyword(null,"desc","desc",1016984067),"Open a browser tab to eval JavaScript, CSS, and HTML live.",new cljs.core.Keyword(null,"connect","connect",1965255772),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"add-browser-tab","add-browser-tab",3663273910));
})], null));
