goog.provide('re_frame.fx');
re_frame.fx.kind = new cljs.core.Keyword(null,"fx","fx",-1237829572);
if(cljs.core.truth_((re_frame.registrar.kinds.cljs$core$IFn$_invoke$arity$1 ? re_frame.registrar.kinds.cljs$core$IFn$_invoke$arity$1(re_frame.fx.kind) : re_frame.registrar.kinds.call(null,re_frame.fx.kind)))){
} else {
throw (new Error("Assert failed: (re-frame.registrar/kinds kind)"));
}
re_frame.fx.reg_fx = (function re_frame$fx$reg_fx(id,handler){
return re_frame.registrar.register_handler(re_frame.fx.kind,id,handler);
});
/**
 * An interceptor whose `:after` actions the contents of `:effects`. As a result,
 *   this interceptor is Domino 3.
 * 
 *   This interceptor is silently added (by reg-event-db etc) to the front of
 *   interceptor chains for all events.
 * 
 *   For each key in `:effects` (a map), it calls the registered `effects handler`
 *   (see `reg-fx` for registration of effect handlers).
 * 
 *   So, if `:effects` was:
 *    {:dispatch  [:hello 42]
 *     :db        {...}
 *     :undo      "set flag"}
 * 
 *   it will call the registered effect handlers for each of the map's keys:
 *   `:dispatch`, `:undo` and `:db`. When calling each handler, provides the map
 *   value for that key - so in the example above the effect handler for :dispatch
 *   will be given one arg `[:hello 42]`.
 * 
 *   You cannot rely on the ordering in which effects are executed, other than that
 *   `:db` is guaranteed to be executed first.
 */
re_frame.fx.do_fx = re_frame.interceptor.__GT_interceptor.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"do-fx","do-fx",1194163050),new cljs.core.Keyword(null,"after","after",594996914),(function re_frame$fx$do_fx_after(context){
if(re_frame.trace.is_trace_enabled_QMARK_()){
var _STAR_current_trace_STAR__orig_val__53081 = re_frame.trace._STAR_current_trace_STAR_;
var _STAR_current_trace_STAR__temp_val__53082 = re_frame.trace.start_trace(new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"op-type","op-type",-1636141668),new cljs.core.Keyword("event","do-fx","event/do-fx",1357330452)], null));
(re_frame.trace._STAR_current_trace_STAR_ = _STAR_current_trace_STAR__temp_val__53082);

try{try{var effects = new cljs.core.Keyword(null,"effects","effects",-282369292).cljs$core$IFn$_invoke$arity$1(context);
var effects_without_db = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(effects,new cljs.core.Keyword(null,"db","db",993250759));
var temp__5804__auto___53193 = new cljs.core.Keyword(null,"db","db",993250759).cljs$core$IFn$_invoke$arity$1(effects);
if(cljs.core.truth_(temp__5804__auto___53193)){
var new_db_53194 = temp__5804__auto___53193;
var fexpr__53086_53195 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,new cljs.core.Keyword(null,"db","db",993250759),false);
(fexpr__53086_53195.cljs$core$IFn$_invoke$arity$1 ? fexpr__53086_53195.cljs$core$IFn$_invoke$arity$1(new_db_53194) : fexpr__53086_53195.call(null,new_db_53194));
} else {
}

var seq__53087 = cljs.core.seq(effects_without_db);
var chunk__53088 = null;
var count__53089 = (0);
var i__53090 = (0);
while(true){
if((i__53090 < count__53089)){
var vec__53099 = chunk__53088.cljs$core$IIndexed$_nth$arity$2(null,i__53090);
var effect_key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53099,(0),null);
var effect_value = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53099,(1),null);
var temp__5802__auto___53197 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,effect_key,false);
if(cljs.core.truth_(temp__5802__auto___53197)){
var effect_fn_53198 = temp__5802__auto___53197;
(effect_fn_53198.cljs$core$IFn$_invoke$arity$1 ? effect_fn_53198.cljs$core$IFn$_invoke$arity$1(effect_value) : effect_fn_53198.call(null,effect_value));
} else {
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: no handler registered for effect:",effect_key,". Ignoring."], 0));
}


var G__53199 = seq__53087;
var G__53200 = chunk__53088;
var G__53201 = count__53089;
var G__53202 = (i__53090 + (1));
seq__53087 = G__53199;
chunk__53088 = G__53200;
count__53089 = G__53201;
i__53090 = G__53202;
continue;
} else {
var temp__5804__auto__ = cljs.core.seq(seq__53087);
if(temp__5804__auto__){
var seq__53087__$1 = temp__5804__auto__;
if(cljs.core.chunked_seq_QMARK_(seq__53087__$1)){
var c__5548__auto__ = cljs.core.chunk_first(seq__53087__$1);
var G__53204 = cljs.core.chunk_rest(seq__53087__$1);
var G__53205 = c__5548__auto__;
var G__53206 = cljs.core.count(c__5548__auto__);
var G__53207 = (0);
seq__53087 = G__53204;
chunk__53088 = G__53205;
count__53089 = G__53206;
i__53090 = G__53207;
continue;
} else {
var vec__53103 = cljs.core.first(seq__53087__$1);
var effect_key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53103,(0),null);
var effect_value = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53103,(1),null);
var temp__5802__auto___53208 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,effect_key,false);
if(cljs.core.truth_(temp__5802__auto___53208)){
var effect_fn_53209 = temp__5802__auto___53208;
(effect_fn_53209.cljs$core$IFn$_invoke$arity$1 ? effect_fn_53209.cljs$core$IFn$_invoke$arity$1(effect_value) : effect_fn_53209.call(null,effect_value));
} else {
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: no handler registered for effect:",effect_key,". Ignoring."], 0));
}


var G__53211 = cljs.core.next(seq__53087__$1);
var G__53212 = null;
var G__53213 = (0);
var G__53214 = (0);
seq__53087 = G__53211;
chunk__53088 = G__53212;
count__53089 = G__53213;
i__53090 = G__53214;
continue;
}
} else {
return null;
}
}
break;
}
}finally {if(re_frame.trace.is_trace_enabled_QMARK_()){
var end__52721__auto___53215 = re_frame.interop.now();
var duration__52722__auto___53216 = (end__52721__auto___53215 - new cljs.core.Keyword(null,"start","start",-355208981).cljs$core$IFn$_invoke$arity$1(re_frame.trace._STAR_current_trace_STAR_));
cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(re_frame.trace.traces,cljs.core.conj,cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(re_frame.trace._STAR_current_trace_STAR_,new cljs.core.Keyword(null,"duration","duration",1444101068),duration__52722__auto___53216,cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"end","end",-268185958),re_frame.interop.now()], 0)));

re_frame.trace.run_tracing_callbacks_BANG_(end__52721__auto___53215);
} else {
}
}}finally {(re_frame.trace._STAR_current_trace_STAR_ = _STAR_current_trace_STAR__orig_val__53081);
}} else {
var effects = new cljs.core.Keyword(null,"effects","effects",-282369292).cljs$core$IFn$_invoke$arity$1(context);
var effects_without_db = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(effects,new cljs.core.Keyword(null,"db","db",993250759));
var temp__5804__auto___53218 = new cljs.core.Keyword(null,"db","db",993250759).cljs$core$IFn$_invoke$arity$1(effects);
if(cljs.core.truth_(temp__5804__auto___53218)){
var new_db_53219 = temp__5804__auto___53218;
var fexpr__53110_53220 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,new cljs.core.Keyword(null,"db","db",993250759),false);
(fexpr__53110_53220.cljs$core$IFn$_invoke$arity$1 ? fexpr__53110_53220.cljs$core$IFn$_invoke$arity$1(new_db_53219) : fexpr__53110_53220.call(null,new_db_53219));
} else {
}

var seq__53111 = cljs.core.seq(effects_without_db);
var chunk__53112 = null;
var count__53113 = (0);
var i__53114 = (0);
while(true){
if((i__53114 < count__53113)){
var vec__53122 = chunk__53112.cljs$core$IIndexed$_nth$arity$2(null,i__53114);
var effect_key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53122,(0),null);
var effect_value = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53122,(1),null);
var temp__5802__auto___53221 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,effect_key,false);
if(cljs.core.truth_(temp__5802__auto___53221)){
var effect_fn_53223 = temp__5802__auto___53221;
(effect_fn_53223.cljs$core$IFn$_invoke$arity$1 ? effect_fn_53223.cljs$core$IFn$_invoke$arity$1(effect_value) : effect_fn_53223.call(null,effect_value));
} else {
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: no handler registered for effect:",effect_key,". Ignoring."], 0));
}


var G__53224 = seq__53111;
var G__53225 = chunk__53112;
var G__53226 = count__53113;
var G__53227 = (i__53114 + (1));
seq__53111 = G__53224;
chunk__53112 = G__53225;
count__53113 = G__53226;
i__53114 = G__53227;
continue;
} else {
var temp__5804__auto__ = cljs.core.seq(seq__53111);
if(temp__5804__auto__){
var seq__53111__$1 = temp__5804__auto__;
if(cljs.core.chunked_seq_QMARK_(seq__53111__$1)){
var c__5548__auto__ = cljs.core.chunk_first(seq__53111__$1);
var G__53228 = cljs.core.chunk_rest(seq__53111__$1);
var G__53229 = c__5548__auto__;
var G__53230 = cljs.core.count(c__5548__auto__);
var G__53231 = (0);
seq__53111 = G__53228;
chunk__53112 = G__53229;
count__53113 = G__53230;
i__53114 = G__53231;
continue;
} else {
var vec__53137 = cljs.core.first(seq__53111__$1);
var effect_key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53137,(0),null);
var effect_value = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53137,(1),null);
var temp__5802__auto___53233 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,effect_key,false);
if(cljs.core.truth_(temp__5802__auto___53233)){
var effect_fn_53234 = temp__5802__auto___53233;
(effect_fn_53234.cljs$core$IFn$_invoke$arity$1 ? effect_fn_53234.cljs$core$IFn$_invoke$arity$1(effect_value) : effect_fn_53234.call(null,effect_value));
} else {
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: no handler registered for effect:",effect_key,". Ignoring."], 0));
}


var G__53235 = cljs.core.next(seq__53111__$1);
var G__53236 = null;
var G__53237 = (0);
var G__53238 = (0);
seq__53111 = G__53235;
chunk__53112 = G__53236;
count__53113 = G__53237;
i__53114 = G__53238;
continue;
}
} else {
return null;
}
}
break;
}
}
})], 0));
re_frame.fx.dispatch_later = (function re_frame$fx$dispatch_later(p__53140){
var map__53141 = p__53140;
var map__53141__$1 = cljs.core.__destructure_map(map__53141);
var effect = map__53141__$1;
var ms = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__53141__$1,new cljs.core.Keyword(null,"ms","ms",-1152709733));
var dispatch = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__53141__$1,new cljs.core.Keyword(null,"dispatch","dispatch",1319337009));
if(((cljs.core.empty_QMARK_(dispatch)) || ((!(typeof ms === 'number'))))){
return re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"error","error",-978969032),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: ignoring bad :dispatch-later value:",effect], 0));
} else {
return re_frame.interop.set_timeout_BANG_((function (){
return re_frame.router.dispatch(dispatch);
}),ms);
}
});
re_frame.fx.reg_fx(new cljs.core.Keyword(null,"dispatch-later","dispatch-later",291951390),(function (value){
if(cljs.core.map_QMARK_(value)){
return re_frame.fx.dispatch_later(value);
} else {
var seq__53142 = cljs.core.seq(cljs.core.remove.cljs$core$IFn$_invoke$arity$2(cljs.core.nil_QMARK_,value));
var chunk__53143 = null;
var count__53144 = (0);
var i__53145 = (0);
while(true){
if((i__53145 < count__53144)){
var effect = chunk__53143.cljs$core$IIndexed$_nth$arity$2(null,i__53145);
re_frame.fx.dispatch_later(effect);


var G__53242 = seq__53142;
var G__53243 = chunk__53143;
var G__53244 = count__53144;
var G__53245 = (i__53145 + (1));
seq__53142 = G__53242;
chunk__53143 = G__53243;
count__53144 = G__53244;
i__53145 = G__53245;
continue;
} else {
var temp__5804__auto__ = cljs.core.seq(seq__53142);
if(temp__5804__auto__){
var seq__53142__$1 = temp__5804__auto__;
if(cljs.core.chunked_seq_QMARK_(seq__53142__$1)){
var c__5548__auto__ = cljs.core.chunk_first(seq__53142__$1);
var G__53246 = cljs.core.chunk_rest(seq__53142__$1);
var G__53247 = c__5548__auto__;
var G__53248 = cljs.core.count(c__5548__auto__);
var G__53249 = (0);
seq__53142 = G__53246;
chunk__53143 = G__53247;
count__53144 = G__53248;
i__53145 = G__53249;
continue;
} else {
var effect = cljs.core.first(seq__53142__$1);
re_frame.fx.dispatch_later(effect);


var G__53250 = cljs.core.next(seq__53142__$1);
var G__53251 = null;
var G__53252 = (0);
var G__53253 = (0);
seq__53142 = G__53250;
chunk__53143 = G__53251;
count__53144 = G__53252;
i__53145 = G__53253;
continue;
}
} else {
return null;
}
}
break;
}
}
}));
re_frame.fx.reg_fx(new cljs.core.Keyword(null,"fx","fx",-1237829572),(function (seq_of_effects){
if((!(cljs.core.sequential_QMARK_(seq_of_effects)))){
return re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: \":fx\" effect expects a seq, but was given ",cljs.core.type(seq_of_effects)], 0));
} else {
var seq__53146 = cljs.core.seq(cljs.core.remove.cljs$core$IFn$_invoke$arity$2(cljs.core.nil_QMARK_,seq_of_effects));
var chunk__53147 = null;
var count__53148 = (0);
var i__53149 = (0);
while(true){
if((i__53149 < count__53148)){
var vec__53156 = chunk__53147.cljs$core$IIndexed$_nth$arity$2(null,i__53149);
var effect_key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53156,(0),null);
var effect_value = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53156,(1),null);
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"db","db",993250759),effect_key)){
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: \":fx\" effect should not contain a :db effect"], 0));
} else {
}

var temp__5802__auto___53256 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,effect_key,false);
if(cljs.core.truth_(temp__5802__auto___53256)){
var effect_fn_53257 = temp__5802__auto___53256;
(effect_fn_53257.cljs$core$IFn$_invoke$arity$1 ? effect_fn_53257.cljs$core$IFn$_invoke$arity$1(effect_value) : effect_fn_53257.call(null,effect_value));
} else {
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: in \":fx\" effect found ",effect_key," which has no associated handler. Ignoring."], 0));
}


var G__53258 = seq__53146;
var G__53259 = chunk__53147;
var G__53260 = count__53148;
var G__53261 = (i__53149 + (1));
seq__53146 = G__53258;
chunk__53147 = G__53259;
count__53148 = G__53260;
i__53149 = G__53261;
continue;
} else {
var temp__5804__auto__ = cljs.core.seq(seq__53146);
if(temp__5804__auto__){
var seq__53146__$1 = temp__5804__auto__;
if(cljs.core.chunked_seq_QMARK_(seq__53146__$1)){
var c__5548__auto__ = cljs.core.chunk_first(seq__53146__$1);
var G__53263 = cljs.core.chunk_rest(seq__53146__$1);
var G__53264 = c__5548__auto__;
var G__53265 = cljs.core.count(c__5548__auto__);
var G__53266 = (0);
seq__53146 = G__53263;
chunk__53147 = G__53264;
count__53148 = G__53265;
i__53149 = G__53266;
continue;
} else {
var vec__53159 = cljs.core.first(seq__53146__$1);
var effect_key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53159,(0),null);
var effect_value = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__53159,(1),null);
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"db","db",993250759),effect_key)){
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: \":fx\" effect should not contain a :db effect"], 0));
} else {
}

var temp__5802__auto___53268 = re_frame.registrar.get_handler.cljs$core$IFn$_invoke$arity$3(re_frame.fx.kind,effect_key,false);
if(cljs.core.truth_(temp__5802__auto___53268)){
var effect_fn_53269 = temp__5802__auto___53268;
(effect_fn_53269.cljs$core$IFn$_invoke$arity$1 ? effect_fn_53269.cljs$core$IFn$_invoke$arity$1(effect_value) : effect_fn_53269.call(null,effect_value));
} else {
re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"warn","warn",-436710552),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: in \":fx\" effect found ",effect_key," which has no associated handler. Ignoring."], 0));
}


var G__53270 = cljs.core.next(seq__53146__$1);
var G__53271 = null;
var G__53272 = (0);
var G__53273 = (0);
seq__53146 = G__53270;
chunk__53147 = G__53271;
count__53148 = G__53272;
i__53149 = G__53273;
continue;
}
} else {
return null;
}
}
break;
}
}
}));
re_frame.fx.reg_fx(new cljs.core.Keyword(null,"dispatch","dispatch",1319337009),(function (value){
if((!(cljs.core.vector_QMARK_(value)))){
return re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"error","error",-978969032),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: ignoring bad :dispatch value. Expected a vector, but got:",value], 0));
} else {
return re_frame.router.dispatch(value);
}
}));
re_frame.fx.reg_fx(new cljs.core.Keyword(null,"dispatch-n","dispatch-n",-504469236),(function (value){
if((!(cljs.core.sequential_QMARK_(value)))){
return re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"error","error",-978969032),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["re-frame: ignoring bad :dispatch-n value. Expected a collection, but got:",value], 0));
} else {
var seq__53164 = cljs.core.seq(cljs.core.remove.cljs$core$IFn$_invoke$arity$2(cljs.core.nil_QMARK_,value));
var chunk__53165 = null;
var count__53166 = (0);
var i__53167 = (0);
while(true){
if((i__53167 < count__53166)){
var event = chunk__53165.cljs$core$IIndexed$_nth$arity$2(null,i__53167);
re_frame.router.dispatch(event);


var G__53275 = seq__53164;
var G__53276 = chunk__53165;
var G__53278 = count__53166;
var G__53279 = (i__53167 + (1));
seq__53164 = G__53275;
chunk__53165 = G__53276;
count__53166 = G__53278;
i__53167 = G__53279;
continue;
} else {
var temp__5804__auto__ = cljs.core.seq(seq__53164);
if(temp__5804__auto__){
var seq__53164__$1 = temp__5804__auto__;
if(cljs.core.chunked_seq_QMARK_(seq__53164__$1)){
var c__5548__auto__ = cljs.core.chunk_first(seq__53164__$1);
var G__53281 = cljs.core.chunk_rest(seq__53164__$1);
var G__53282 = c__5548__auto__;
var G__53283 = cljs.core.count(c__5548__auto__);
var G__53284 = (0);
seq__53164 = G__53281;
chunk__53165 = G__53282;
count__53166 = G__53283;
i__53167 = G__53284;
continue;
} else {
var event = cljs.core.first(seq__53164__$1);
re_frame.router.dispatch(event);


var G__53285 = cljs.core.next(seq__53164__$1);
var G__53286 = null;
var G__53287 = (0);
var G__53288 = (0);
seq__53164 = G__53285;
chunk__53165 = G__53286;
count__53166 = G__53287;
i__53167 = G__53288;
continue;
}
} else {
return null;
}
}
break;
}
}
}));
re_frame.fx.reg_fx(new cljs.core.Keyword(null,"deregister-event-handler","deregister-event-handler",-1096518994),(function (value){
var clear_event = cljs.core.partial.cljs$core$IFn$_invoke$arity$2(re_frame.registrar.clear_handlers,re_frame.events.kind);
if(cljs.core.sequential_QMARK_(value)){
var seq__53175 = cljs.core.seq(value);
var chunk__53176 = null;
var count__53177 = (0);
var i__53178 = (0);
while(true){
if((i__53178 < count__53177)){
var event = chunk__53176.cljs$core$IIndexed$_nth$arity$2(null,i__53178);
clear_event(event);


var G__53291 = seq__53175;
var G__53292 = chunk__53176;
var G__53293 = count__53177;
var G__53294 = (i__53178 + (1));
seq__53175 = G__53291;
chunk__53176 = G__53292;
count__53177 = G__53293;
i__53178 = G__53294;
continue;
} else {
var temp__5804__auto__ = cljs.core.seq(seq__53175);
if(temp__5804__auto__){
var seq__53175__$1 = temp__5804__auto__;
if(cljs.core.chunked_seq_QMARK_(seq__53175__$1)){
var c__5548__auto__ = cljs.core.chunk_first(seq__53175__$1);
var G__53296 = cljs.core.chunk_rest(seq__53175__$1);
var G__53297 = c__5548__auto__;
var G__53298 = cljs.core.count(c__5548__auto__);
var G__53299 = (0);
seq__53175 = G__53296;
chunk__53176 = G__53297;
count__53177 = G__53298;
i__53178 = G__53299;
continue;
} else {
var event = cljs.core.first(seq__53175__$1);
clear_event(event);


var G__53300 = cljs.core.next(seq__53175__$1);
var G__53301 = null;
var G__53302 = (0);
var G__53303 = (0);
seq__53175 = G__53300;
chunk__53176 = G__53301;
count__53177 = G__53302;
i__53178 = G__53303;
continue;
}
} else {
return null;
}
}
break;
}
} else {
return clear_event(value);
}
}));
re_frame.fx.reg_fx(new cljs.core.Keyword(null,"db","db",993250759),(function (value){
if((!((cljs.core.deref(re_frame.db.app_db) === value)))){
return cljs.core.reset_BANG_(re_frame.db.app_db,value);
} else {
return null;
}
}));

//# sourceMappingURL=re_frame.fx.js.map
