goog.provide('cljs.repl');
cljs.repl.print_doc = (function cljs$repl$print_doc(p__26307){
var map__26308 = p__26307;
var map__26308__$1 = cljs.core.__destructure_map(map__26308);
var m = map__26308__$1;
var n = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26308__$1,new cljs.core.Keyword(null,"ns","ns",441598760));
var nm = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26308__$1,new cljs.core.Keyword(null,"name","name",1843675177));
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["-------------------------"], 0));

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var or__5002__auto__ = new cljs.core.Keyword(null,"spec","spec",347520401).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return [(function (){var temp__5804__auto__ = new cljs.core.Keyword(null,"ns","ns",441598760).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_(temp__5804__auto__)){
var ns = temp__5804__auto__;
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns),"/"].join('');
} else {
return null;
}
})(),cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(m))].join('');
}
})()], 0));

if(cljs.core.truth_(new cljs.core.Keyword(null,"protocol","protocol",652470118).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["Protocol"], 0));
} else {
}

if(cljs.core.truth_(new cljs.core.Keyword(null,"forms","forms",2045992350).cljs$core$IFn$_invoke$arity$1(m))){
var seq__26321_26812 = cljs.core.seq(new cljs.core.Keyword(null,"forms","forms",2045992350).cljs$core$IFn$_invoke$arity$1(m));
var chunk__26322_26813 = null;
var count__26323_26814 = (0);
var i__26324_26815 = (0);
while(true){
if((i__26324_26815 < count__26323_26814)){
var f_26816 = chunk__26322_26813.cljs$core$IIndexed$_nth$arity$2(null, i__26324_26815);
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["  ",f_26816], 0));


var G__26817 = seq__26321_26812;
var G__26818 = chunk__26322_26813;
var G__26819 = count__26323_26814;
var G__26820 = (i__26324_26815 + (1));
seq__26321_26812 = G__26817;
chunk__26322_26813 = G__26818;
count__26323_26814 = G__26819;
i__26324_26815 = G__26820;
continue;
} else {
var temp__5804__auto___26823 = cljs.core.seq(seq__26321_26812);
if(temp__5804__auto___26823){
var seq__26321_26824__$1 = temp__5804__auto___26823;
if(cljs.core.chunked_seq_QMARK_(seq__26321_26824__$1)){
var c__5525__auto___26825 = cljs.core.chunk_first(seq__26321_26824__$1);
var G__26826 = cljs.core.chunk_rest(seq__26321_26824__$1);
var G__26827 = c__5525__auto___26825;
var G__26828 = cljs.core.count(c__5525__auto___26825);
var G__26829 = (0);
seq__26321_26812 = G__26826;
chunk__26322_26813 = G__26827;
count__26323_26814 = G__26828;
i__26324_26815 = G__26829;
continue;
} else {
var f_26834 = cljs.core.first(seq__26321_26824__$1);
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["  ",f_26834], 0));


var G__26835 = cljs.core.next(seq__26321_26824__$1);
var G__26836 = null;
var G__26837 = (0);
var G__26838 = (0);
seq__26321_26812 = G__26835;
chunk__26322_26813 = G__26836;
count__26323_26814 = G__26837;
i__26324_26815 = G__26838;
continue;
}
} else {
}
}
break;
}
} else {
if(cljs.core.truth_(new cljs.core.Keyword(null,"arglists","arglists",1661989754).cljs$core$IFn$_invoke$arity$1(m))){
var arglists_26839 = new cljs.core.Keyword(null,"arglists","arglists",1661989754).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_((function (){var or__5002__auto__ = new cljs.core.Keyword(null,"macro","macro",-867863404).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return new cljs.core.Keyword(null,"repl-special-function","repl-special-function",1262603725).cljs$core$IFn$_invoke$arity$1(m);
}
})())){
cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([arglists_26839], 0));
} else {
cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.first(arglists_26839)))?cljs.core.second(arglists_26839):arglists_26839)], 0));
}
} else {
}
}

if(cljs.core.truth_(new cljs.core.Keyword(null,"special-form","special-form",-1326536374).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["Special Form"], 0));

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",new cljs.core.Keyword(null,"doc","doc",1913296891).cljs$core$IFn$_invoke$arity$1(m)], 0));

if(cljs.core.contains_QMARK_(m,new cljs.core.Keyword(null,"url","url",276297046))){
if(cljs.core.truth_(new cljs.core.Keyword(null,"url","url",276297046).cljs$core$IFn$_invoke$arity$1(m))){
return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([["\n  Please see http://clojure.org/",cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"url","url",276297046).cljs$core$IFn$_invoke$arity$1(m))].join('')], 0));
} else {
return null;
}
} else {
return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([["\n  Please see http://clojure.org/special_forms#",cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(m))].join('')], 0));
}
} else {
if(cljs.core.truth_(new cljs.core.Keyword(null,"macro","macro",-867863404).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["Macro"], 0));
} else {
}

if(cljs.core.truth_(new cljs.core.Keyword(null,"spec","spec",347520401).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["Spec"], 0));
} else {
}

if(cljs.core.truth_(new cljs.core.Keyword(null,"repl-special-function","repl-special-function",1262603725).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["REPL Special Function"], 0));
} else {
}

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",new cljs.core.Keyword(null,"doc","doc",1913296891).cljs$core$IFn$_invoke$arity$1(m)], 0));

if(cljs.core.truth_(new cljs.core.Keyword(null,"protocol","protocol",652470118).cljs$core$IFn$_invoke$arity$1(m))){
var seq__26353_26844 = cljs.core.seq(new cljs.core.Keyword(null,"methods","methods",453930866).cljs$core$IFn$_invoke$arity$1(m));
var chunk__26354_26845 = null;
var count__26355_26846 = (0);
var i__26356_26847 = (0);
while(true){
if((i__26356_26847 < count__26355_26846)){
var vec__26441_26848 = chunk__26354_26845.cljs$core$IIndexed$_nth$arity$2(null, i__26356_26847);
var name_26849 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26441_26848,(0),null);
var map__26444_26850 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26441_26848,(1),null);
var map__26444_26851__$1 = cljs.core.__destructure_map(map__26444_26850);
var doc_26852 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26444_26851__$1,new cljs.core.Keyword(null,"doc","doc",1913296891));
var arglists_26853 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26444_26851__$1,new cljs.core.Keyword(null,"arglists","arglists",1661989754));
cljs.core.println();

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",name_26849], 0));

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",arglists_26853], 0));

if(cljs.core.truth_(doc_26852)){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",doc_26852], 0));
} else {
}


var G__26857 = seq__26353_26844;
var G__26858 = chunk__26354_26845;
var G__26859 = count__26355_26846;
var G__26860 = (i__26356_26847 + (1));
seq__26353_26844 = G__26857;
chunk__26354_26845 = G__26858;
count__26355_26846 = G__26859;
i__26356_26847 = G__26860;
continue;
} else {
var temp__5804__auto___26861 = cljs.core.seq(seq__26353_26844);
if(temp__5804__auto___26861){
var seq__26353_26862__$1 = temp__5804__auto___26861;
if(cljs.core.chunked_seq_QMARK_(seq__26353_26862__$1)){
var c__5525__auto___26863 = cljs.core.chunk_first(seq__26353_26862__$1);
var G__26864 = cljs.core.chunk_rest(seq__26353_26862__$1);
var G__26865 = c__5525__auto___26863;
var G__26866 = cljs.core.count(c__5525__auto___26863);
var G__26867 = (0);
seq__26353_26844 = G__26864;
chunk__26354_26845 = G__26865;
count__26355_26846 = G__26866;
i__26356_26847 = G__26867;
continue;
} else {
var vec__26480_26868 = cljs.core.first(seq__26353_26862__$1);
var name_26869 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26480_26868,(0),null);
var map__26484_26870 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26480_26868,(1),null);
var map__26484_26871__$1 = cljs.core.__destructure_map(map__26484_26870);
var doc_26872 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26484_26871__$1,new cljs.core.Keyword(null,"doc","doc",1913296891));
var arglists_26873 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26484_26871__$1,new cljs.core.Keyword(null,"arglists","arglists",1661989754));
cljs.core.println();

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",name_26869], 0));

cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",arglists_26873], 0));

if(cljs.core.truth_(doc_26872)){
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([" ",doc_26872], 0));
} else {
}


var G__26876 = cljs.core.next(seq__26353_26862__$1);
var G__26877 = null;
var G__26878 = (0);
var G__26879 = (0);
seq__26353_26844 = G__26876;
chunk__26354_26845 = G__26877;
count__26355_26846 = G__26878;
i__26356_26847 = G__26879;
continue;
}
} else {
}
}
break;
}
} else {
}

if(cljs.core.truth_(n)){
var temp__5804__auto__ = cljs.spec.alpha.get_spec(cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.ns_name(n)),cljs.core.name(nm)));
if(cljs.core.truth_(temp__5804__auto__)){
var fnspec = temp__5804__auto__;
cljs.core.print.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["Spec"], 0));

var seq__26537 = cljs.core.seq(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"args","args",1315556576),new cljs.core.Keyword(null,"ret","ret",-468222814),new cljs.core.Keyword(null,"fn","fn",-1175266204)], null));
var chunk__26538 = null;
var count__26539 = (0);
var i__26540 = (0);
while(true){
if((i__26540 < count__26539)){
var role = chunk__26538.cljs$core$IIndexed$_nth$arity$2(null, i__26540);
var temp__5804__auto___26887__$1 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(fnspec,role);
if(cljs.core.truth_(temp__5804__auto___26887__$1)){
var spec_26888 = temp__5804__auto___26887__$1;
cljs.core.print.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([["\n ",cljs.core.name(role),":"].join(''),cljs.spec.alpha.describe(spec_26888)], 0));
} else {
}


var G__26892 = seq__26537;
var G__26893 = chunk__26538;
var G__26894 = count__26539;
var G__26895 = (i__26540 + (1));
seq__26537 = G__26892;
chunk__26538 = G__26893;
count__26539 = G__26894;
i__26540 = G__26895;
continue;
} else {
var temp__5804__auto____$1 = cljs.core.seq(seq__26537);
if(temp__5804__auto____$1){
var seq__26537__$1 = temp__5804__auto____$1;
if(cljs.core.chunked_seq_QMARK_(seq__26537__$1)){
var c__5525__auto__ = cljs.core.chunk_first(seq__26537__$1);
var G__26896 = cljs.core.chunk_rest(seq__26537__$1);
var G__26897 = c__5525__auto__;
var G__26898 = cljs.core.count(c__5525__auto__);
var G__26899 = (0);
seq__26537 = G__26896;
chunk__26538 = G__26897;
count__26539 = G__26898;
i__26540 = G__26899;
continue;
} else {
var role = cljs.core.first(seq__26537__$1);
var temp__5804__auto___26900__$2 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(fnspec,role);
if(cljs.core.truth_(temp__5804__auto___26900__$2)){
var spec_26901 = temp__5804__auto___26900__$2;
cljs.core.print.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([["\n ",cljs.core.name(role),":"].join(''),cljs.spec.alpha.describe(spec_26901)], 0));
} else {
}


var G__26902 = cljs.core.next(seq__26537__$1);
var G__26903 = null;
var G__26904 = (0);
var G__26905 = (0);
seq__26537 = G__26902;
chunk__26538 = G__26903;
count__26539 = G__26904;
i__26540 = G__26905;
continue;
}
} else {
return null;
}
}
break;
}
} else {
return null;
}
} else {
return null;
}
}
});
/**
 * Constructs a data representation for a Error with keys:
 *  :cause - root cause message
 *  :phase - error phase
 *  :via - cause chain, with cause keys:
 *           :type - exception class symbol
 *           :message - exception message
 *           :data - ex-data
 *           :at - top stack element
 *  :trace - root cause stack elements
 */
cljs.repl.Error__GT_map = (function cljs$repl$Error__GT_map(o){
return cljs.core.Throwable__GT_map(o);
});
/**
 * Returns an analysis of the phase, error, cause, and location of an error that occurred
 *   based on Throwable data, as returned by Throwable->map. All attributes other than phase
 *   are optional:
 *  :clojure.error/phase - keyword phase indicator, one of:
 *    :read-source :compile-syntax-check :compilation :macro-syntax-check :macroexpansion
 *    :execution :read-eval-result :print-eval-result
 *  :clojure.error/source - file name (no path)
 *  :clojure.error/line - integer line number
 *  :clojure.error/column - integer column number
 *  :clojure.error/symbol - symbol being expanded/compiled/invoked
 *  :clojure.error/class - cause exception class symbol
 *  :clojure.error/cause - cause exception message
 *  :clojure.error/spec - explain-data for spec error
 */
cljs.repl.ex_triage = (function cljs$repl$ex_triage(datafied_throwable){
var map__26611 = datafied_throwable;
var map__26611__$1 = cljs.core.__destructure_map(map__26611);
var via = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26611__$1,new cljs.core.Keyword(null,"via","via",-1904457336));
var trace = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26611__$1,new cljs.core.Keyword(null,"trace","trace",-1082747415));
var phase = cljs.core.get.cljs$core$IFn$_invoke$arity$3(map__26611__$1,new cljs.core.Keyword(null,"phase","phase",575722892),new cljs.core.Keyword(null,"execution","execution",253283524));
var map__26612 = cljs.core.last(via);
var map__26612__$1 = cljs.core.__destructure_map(map__26612);
var type = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26612__$1,new cljs.core.Keyword(null,"type","type",1174270348));
var message = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26612__$1,new cljs.core.Keyword(null,"message","message",-406056002));
var data = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26612__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var map__26615 = data;
var map__26615__$1 = cljs.core.__destructure_map(map__26615);
var problems = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26615__$1,new cljs.core.Keyword("cljs.spec.alpha","problems","cljs.spec.alpha/problems",447400814));
var fn = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26615__$1,new cljs.core.Keyword("cljs.spec.alpha","fn","cljs.spec.alpha/fn",408600443));
var caller = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26615__$1,new cljs.core.Keyword("cljs.spec.test.alpha","caller","cljs.spec.test.alpha/caller",-398302390));
var map__26616 = new cljs.core.Keyword(null,"data","data",-232669377).cljs$core$IFn$_invoke$arity$1(cljs.core.first(via));
var map__26616__$1 = cljs.core.__destructure_map(map__26616);
var top_data = map__26616__$1;
var source = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26616__$1,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397));
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3((function (){var G__26645 = phase;
var G__26645__$1 = (((G__26645 instanceof cljs.core.Keyword))?G__26645.fqn:null);
switch (G__26645__$1) {
case "read-source":
var map__26647 = data;
var map__26647__$1 = cljs.core.__destructure_map(map__26647);
var line = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26647__$1,new cljs.core.Keyword("clojure.error","line","clojure.error/line",-1816287471));
var column = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26647__$1,new cljs.core.Keyword("clojure.error","column","clojure.error/column",304721553));
var G__26650 = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"data","data",-232669377).cljs$core$IFn$_invoke$arity$1(cljs.core.second(via)),top_data], 0));
var G__26650__$1 = (cljs.core.truth_(source)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26650,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397),source):G__26650);
var G__26650__$2 = (cljs.core.truth_((function (){var fexpr__26652 = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["NO_SOURCE_PATH",null,"NO_SOURCE_FILE",null], null), null);
return (fexpr__26652.cljs$core$IFn$_invoke$arity$1 ? fexpr__26652.cljs$core$IFn$_invoke$arity$1(source) : fexpr__26652.call(null, source));
})())?cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(G__26650__$1,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397)):G__26650__$1);
if(cljs.core.truth_(message)){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26650__$2,new cljs.core.Keyword("clojure.error","cause","clojure.error/cause",-1879175742),message);
} else {
return G__26650__$2;
}

break;
case "compile-syntax-check":
case "compilation":
case "macro-syntax-check":
case "macroexpansion":
var G__26653 = top_data;
var G__26653__$1 = (cljs.core.truth_(source)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26653,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397),source):G__26653);
var G__26653__$2 = (cljs.core.truth_((function (){var fexpr__26655 = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["NO_SOURCE_PATH",null,"NO_SOURCE_FILE",null], null), null);
return (fexpr__26655.cljs$core$IFn$_invoke$arity$1 ? fexpr__26655.cljs$core$IFn$_invoke$arity$1(source) : fexpr__26655.call(null, source));
})())?cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(G__26653__$1,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397)):G__26653__$1);
var G__26653__$3 = (cljs.core.truth_(type)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26653__$2,new cljs.core.Keyword("clojure.error","class","clojure.error/class",278435890),type):G__26653__$2);
var G__26653__$4 = (cljs.core.truth_(message)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26653__$3,new cljs.core.Keyword("clojure.error","cause","clojure.error/cause",-1879175742),message):G__26653__$3);
if(cljs.core.truth_(problems)){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26653__$4,new cljs.core.Keyword("clojure.error","spec","clojure.error/spec",2055032595),data);
} else {
return G__26653__$4;
}

break;
case "read-eval-result":
case "print-eval-result":
var vec__26662 = cljs.core.first(trace);
var source__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26662,(0),null);
var method = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26662,(1),null);
var file = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26662,(2),null);
var line = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26662,(3),null);
var G__26670 = top_data;
var G__26670__$1 = (cljs.core.truth_(line)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26670,new cljs.core.Keyword("clojure.error","line","clojure.error/line",-1816287471),line):G__26670);
var G__26670__$2 = (cljs.core.truth_(file)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26670__$1,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397),file):G__26670__$1);
var G__26670__$3 = (cljs.core.truth_((function (){var and__5000__auto__ = source__$1;
if(cljs.core.truth_(and__5000__auto__)){
return method;
} else {
return and__5000__auto__;
}
})())?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26670__$2,new cljs.core.Keyword("clojure.error","symbol","clojure.error/symbol",1544821994),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[source__$1,method],null))):G__26670__$2);
var G__26670__$4 = (cljs.core.truth_(type)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26670__$3,new cljs.core.Keyword("clojure.error","class","clojure.error/class",278435890),type):G__26670__$3);
if(cljs.core.truth_(message)){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26670__$4,new cljs.core.Keyword("clojure.error","cause","clojure.error/cause",-1879175742),message);
} else {
return G__26670__$4;
}

break;
case "execution":
var vec__26685 = cljs.core.first(trace);
var source__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26685,(0),null);
var method = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26685,(1),null);
var file = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26685,(2),null);
var line = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__26685,(3),null);
var file__$1 = cljs.core.first(cljs.core.remove.cljs$core$IFn$_invoke$arity$2((function (p1__26605_SHARP_){
var or__5002__auto__ = (p1__26605_SHARP_ == null);
if(or__5002__auto__){
return or__5002__auto__;
} else {
var fexpr__26692 = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["NO_SOURCE_PATH",null,"NO_SOURCE_FILE",null], null), null);
return (fexpr__26692.cljs$core$IFn$_invoke$arity$1 ? fexpr__26692.cljs$core$IFn$_invoke$arity$1(p1__26605_SHARP_) : fexpr__26692.call(null, p1__26605_SHARP_));
}
}),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(caller),file], null)));
var err_line = (function (){var or__5002__auto__ = new cljs.core.Keyword(null,"line","line",212345235).cljs$core$IFn$_invoke$arity$1(caller);
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return line;
}
})();
var G__26693 = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("clojure.error","class","clojure.error/class",278435890),type], null);
var G__26693__$1 = (cljs.core.truth_(err_line)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26693,new cljs.core.Keyword("clojure.error","line","clojure.error/line",-1816287471),err_line):G__26693);
var G__26693__$2 = (cljs.core.truth_(message)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26693__$1,new cljs.core.Keyword("clojure.error","cause","clojure.error/cause",-1879175742),message):G__26693__$1);
var G__26693__$3 = (cljs.core.truth_((function (){var or__5002__auto__ = fn;
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
var and__5000__auto__ = source__$1;
if(cljs.core.truth_(and__5000__auto__)){
return method;
} else {
return and__5000__auto__;
}
}
})())?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26693__$2,new cljs.core.Keyword("clojure.error","symbol","clojure.error/symbol",1544821994),(function (){var or__5002__auto__ = fn;
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[source__$1,method],null));
}
})()):G__26693__$2);
var G__26693__$4 = (cljs.core.truth_(file__$1)?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26693__$3,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397),file__$1):G__26693__$3);
if(cljs.core.truth_(problems)){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(G__26693__$4,new cljs.core.Keyword("clojure.error","spec","clojure.error/spec",2055032595),data);
} else {
return G__26693__$4;
}

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__26645__$1)].join('')));

}
})(),new cljs.core.Keyword("clojure.error","phase","clojure.error/phase",275140358),phase);
});
/**
 * Returns a string from exception data, as produced by ex-triage.
 *   The first line summarizes the exception phase and location.
 *   The subsequent lines describe the cause.
 */
cljs.repl.ex_str = (function cljs$repl$ex_str(p__26704){
var map__26705 = p__26704;
var map__26705__$1 = cljs.core.__destructure_map(map__26705);
var triage_data = map__26705__$1;
var phase = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","phase","clojure.error/phase",275140358));
var source = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","source","clojure.error/source",-2011936397));
var line = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","line","clojure.error/line",-1816287471));
var column = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","column","clojure.error/column",304721553));
var symbol = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","symbol","clojure.error/symbol",1544821994));
var class$ = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","class","clojure.error/class",278435890));
var cause = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","cause","clojure.error/cause",-1879175742));
var spec = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__26705__$1,new cljs.core.Keyword("clojure.error","spec","clojure.error/spec",2055032595));
var loc = [cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var or__5002__auto__ = source;
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return "<cljs repl>";
}
})()),":",cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var or__5002__auto__ = line;
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return (1);
}
})()),(cljs.core.truth_(column)?[":",cljs.core.str.cljs$core$IFn$_invoke$arity$1(column)].join(''):"")].join('');
var class_name = cljs.core.name((function (){var or__5002__auto__ = class$;
if(cljs.core.truth_(or__5002__auto__)){
return or__5002__auto__;
} else {
return "";
}
})());
var simple_class = class_name;
var cause_type = ((cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["RuntimeException",null,"Exception",null], null), null),simple_class))?"":[" (",simple_class,")"].join(''));
var format = goog.string.format;
var G__26730 = phase;
var G__26730__$1 = (((G__26730 instanceof cljs.core.Keyword))?G__26730.fqn:null);
switch (G__26730__$1) {
case "read-source":
return (format.cljs$core$IFn$_invoke$arity$3 ? format.cljs$core$IFn$_invoke$arity$3("Syntax error reading source at (%s).\n%s\n",loc,cause) : format.call(null, "Syntax error reading source at (%s).\n%s\n",loc,cause));

break;
case "macro-syntax-check":
var G__26734 = "Syntax error macroexpanding %sat (%s).\n%s";
var G__26735 = (cljs.core.truth_(symbol)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(symbol)," "].join(''):"");
var G__26736 = loc;
var G__26737 = (cljs.core.truth_(spec)?(function (){var sb__5647__auto__ = (new goog.string.StringBuffer());
var _STAR_print_newline_STAR__orig_val__26741_26945 = cljs.core._STAR_print_newline_STAR_;
var _STAR_print_fn_STAR__orig_val__26742_26946 = cljs.core._STAR_print_fn_STAR_;
var _STAR_print_newline_STAR__temp_val__26743_26947 = true;
var _STAR_print_fn_STAR__temp_val__26744_26948 = (function (x__5648__auto__){
return sb__5647__auto__.append(x__5648__auto__);
});
(cljs.core._STAR_print_newline_STAR_ = _STAR_print_newline_STAR__temp_val__26743_26947);

(cljs.core._STAR_print_fn_STAR_ = _STAR_print_fn_STAR__temp_val__26744_26948);

try{cljs.spec.alpha.explain_out(cljs.core.update.cljs$core$IFn$_invoke$arity$3(spec,new cljs.core.Keyword("cljs.spec.alpha","problems","cljs.spec.alpha/problems",447400814),(function (probs){
return cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__26702_SHARP_){
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(p1__26702_SHARP_,new cljs.core.Keyword(null,"in","in",-1531184865));
}),probs);
}))
);
}finally {(cljs.core._STAR_print_fn_STAR_ = _STAR_print_fn_STAR__orig_val__26742_26946);

(cljs.core._STAR_print_newline_STAR_ = _STAR_print_newline_STAR__orig_val__26741_26945);
}
return cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb__5647__auto__);
})():(format.cljs$core$IFn$_invoke$arity$2 ? format.cljs$core$IFn$_invoke$arity$2("%s\n",cause) : format.call(null, "%s\n",cause)));
return (format.cljs$core$IFn$_invoke$arity$4 ? format.cljs$core$IFn$_invoke$arity$4(G__26734,G__26735,G__26736,G__26737) : format.call(null, G__26734,G__26735,G__26736,G__26737));

break;
case "macroexpansion":
var G__26757 = "Unexpected error%s macroexpanding %sat (%s).\n%s\n";
var G__26758 = cause_type;
var G__26759 = (cljs.core.truth_(symbol)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(symbol)," "].join(''):"");
var G__26760 = loc;
var G__26761 = cause;
return (format.cljs$core$IFn$_invoke$arity$5 ? format.cljs$core$IFn$_invoke$arity$5(G__26757,G__26758,G__26759,G__26760,G__26761) : format.call(null, G__26757,G__26758,G__26759,G__26760,G__26761));

break;
case "compile-syntax-check":
var G__26765 = "Syntax error%s compiling %sat (%s).\n%s\n";
var G__26766 = cause_type;
var G__26767 = (cljs.core.truth_(symbol)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(symbol)," "].join(''):"");
var G__26768 = loc;
var G__26769 = cause;
return (format.cljs$core$IFn$_invoke$arity$5 ? format.cljs$core$IFn$_invoke$arity$5(G__26765,G__26766,G__26767,G__26768,G__26769) : format.call(null, G__26765,G__26766,G__26767,G__26768,G__26769));

break;
case "compilation":
var G__26770 = "Unexpected error%s compiling %sat (%s).\n%s\n";
var G__26771 = cause_type;
var G__26772 = (cljs.core.truth_(symbol)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(symbol)," "].join(''):"");
var G__26773 = loc;
var G__26774 = cause;
return (format.cljs$core$IFn$_invoke$arity$5 ? format.cljs$core$IFn$_invoke$arity$5(G__26770,G__26771,G__26772,G__26773,G__26774) : format.call(null, G__26770,G__26771,G__26772,G__26773,G__26774));

break;
case "read-eval-result":
return (format.cljs$core$IFn$_invoke$arity$5 ? format.cljs$core$IFn$_invoke$arity$5("Error reading eval result%s at %s (%s).\n%s\n",cause_type,symbol,loc,cause) : format.call(null, "Error reading eval result%s at %s (%s).\n%s\n",cause_type,symbol,loc,cause));

break;
case "print-eval-result":
return (format.cljs$core$IFn$_invoke$arity$5 ? format.cljs$core$IFn$_invoke$arity$5("Error printing return value%s at %s (%s).\n%s\n",cause_type,symbol,loc,cause) : format.call(null, "Error printing return value%s at %s (%s).\n%s\n",cause_type,symbol,loc,cause));

break;
case "execution":
if(cljs.core.truth_(spec)){
var G__26778 = "Execution error - invalid arguments to %s at (%s).\n%s";
var G__26779 = symbol;
var G__26780 = loc;
var G__26781 = (function (){var sb__5647__auto__ = (new goog.string.StringBuffer());
var _STAR_print_newline_STAR__orig_val__26785_26969 = cljs.core._STAR_print_newline_STAR_;
var _STAR_print_fn_STAR__orig_val__26786_26970 = cljs.core._STAR_print_fn_STAR_;
var _STAR_print_newline_STAR__temp_val__26787_26971 = true;
var _STAR_print_fn_STAR__temp_val__26788_26972 = (function (x__5648__auto__){
return sb__5647__auto__.append(x__5648__auto__);
});
(cljs.core._STAR_print_newline_STAR_ = _STAR_print_newline_STAR__temp_val__26787_26971);

(cljs.core._STAR_print_fn_STAR_ = _STAR_print_fn_STAR__temp_val__26788_26972);

try{cljs.spec.alpha.explain_out(cljs.core.update.cljs$core$IFn$_invoke$arity$3(spec,new cljs.core.Keyword("cljs.spec.alpha","problems","cljs.spec.alpha/problems",447400814),(function (probs){
return cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__26703_SHARP_){
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(p1__26703_SHARP_,new cljs.core.Keyword(null,"in","in",-1531184865));
}),probs);
}))
);
}finally {(cljs.core._STAR_print_fn_STAR_ = _STAR_print_fn_STAR__orig_val__26786_26970);

(cljs.core._STAR_print_newline_STAR_ = _STAR_print_newline_STAR__orig_val__26785_26969);
}
return cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb__5647__auto__);
})();
return (format.cljs$core$IFn$_invoke$arity$4 ? format.cljs$core$IFn$_invoke$arity$4(G__26778,G__26779,G__26780,G__26781) : format.call(null, G__26778,G__26779,G__26780,G__26781));
} else {
var G__26795 = "Execution error%s at %s(%s).\n%s\n";
var G__26796 = cause_type;
var G__26797 = (cljs.core.truth_(symbol)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(symbol)," "].join(''):"");
var G__26798 = loc;
var G__26799 = cause;
return (format.cljs$core$IFn$_invoke$arity$5 ? format.cljs$core$IFn$_invoke$arity$5(G__26795,G__26796,G__26797,G__26798,G__26799) : format.call(null, G__26795,G__26796,G__26797,G__26798,G__26799));
}

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__26730__$1)].join('')));

}
});
cljs.repl.error__GT_str = (function cljs$repl$error__GT_str(error){
return cljs.repl.ex_str(cljs.repl.ex_triage(cljs.repl.Error__GT_map(error)));
});

//# sourceMappingURL=cljs.repl.js.map
