// Compiled by ClojureScript 1.9.562 {}
goog.provide('weathergen.ui.grids');
goog.require('cljs.core');
goog.require('garden.core');
goog.require('garden.selectors');
goog.require('hoplon.svg');
goog.require('taoensso.timbre');
goog.require('weathergen.help');
goog.require('weathergen.ui.buttons');
goog.require('weathergen.ui.common');
goog.require('javelin.core');
goog.require('hoplon.jquery');
goog.require('hoplon.core');
/**
 * Creates a master-detail grid view. TODO: explain options.
 * @param {...*} var_args
 */
weathergen.ui.grids.master_detail = (function() { 
var weathergen$ui$grids$master_detail__delegate = function (args__29774__auto__){
var vec__38709 = hoplon.core.parse_args.call(null,args__29774__auto__);
var attrs = cljs.core.nth.call(null,vec__38709,(0),null);
var _ = cljs.core.nth.call(null,vec__38709,(1),null);
var map__38712 = attrs;
var map__38712__$1 = ((((!((map__38712 == null)))?((((map__38712.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38712.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38712):map__38712);
var data = cljs.core.get.call(null,map__38712__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var detail = cljs.core.get.call(null,map__38712__$1,new cljs.core.Keyword(null,"detail","detail",-1545345025));
var columns = cljs.core.get.call(null,map__38712__$1,new cljs.core.Keyword(null,"columns","columns",1998437288));
var formatter = cljs.core.get.call(null,map__38712__$1,new cljs.core.Keyword(null,"formatter","formatter",-483008823));
var options = cljs.core.get.call(null,map__38712__$1,new cljs.core.Keyword(null,"options","options",99638489));
return hoplon.core.div.call(null,cljs.core.dissoc.call(null,attrs,new cljs.core.Keyword(null,"data","data",-232669377),new cljs.core.Keyword(null,"detail","detail",-1545345025),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"formatter","formatter",-483008823),new cljs.core.Keyword(null,"options","options",99638489)),(function (){var data_STAR_ = javelin.core.formula.call(null,((function (map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (G__38714){
return G__38714;
});})(map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
).call(null,data);
var columns_STAR_ = javelin.core.formula.call(null,((function (data_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (G__38715){
return G__38715;
});})(data_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
).call(null,columns);
var options_STAR_ = javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (G__38716){
return G__38716;
});})(data_STAR_,columns_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
).call(null,options);
var td_STAR_ = ((function (data_STAR_,columns_STAR_,options_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function() { 
var G__38805__delegate = function (args){
return cljs.core.apply.call(null,hoplon.core.td,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px #eee",new cljs.core.Keyword(null,"padding","padding",1660304693),"0 2px 0 2px"], null),args);
};
var G__38805 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__38806__i = 0, G__38806__a = new Array(arguments.length -  0);
while (G__38806__i < G__38806__a.length) {G__38806__a[G__38806__i] = arguments[G__38806__i + 0]; ++G__38806__i;}
  args = new cljs.core.IndexedSeq(G__38806__a,0,null);
} 
return G__38805__delegate.call(this,args);};
G__38805.cljs$lang$maxFixedArity = 0;
G__38805.cljs$lang$applyTo = (function (arglist__38807){
var args = cljs.core.seq(arglist__38807);
return G__38805__delegate(args);
});
G__38805.cljs$core$IFn$_invoke$arity$variadic = G__38805__delegate;
return G__38805;
})()
;})(data_STAR_,columns_STAR_,options_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return hoplon.core.table.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"background","background",-863952629),"white",new cljs.core.Keyword(null,"border-collapse","border-collapse",919100239),"collapse",new cljs.core.Keyword(null,"outline","outline",793464534),"solid 1px #ccc"], null),hoplon.core.thead.call(null,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(to bottom, white, white 33%, #eee 66%)"], null),javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (columns_STAR___$1){
var iter__24200__auto__ = ((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38717(s__38718){
return (new cljs.core.LazySeq(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38718__$1 = s__38718;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38718__$1);
if(temp__5278__auto__){
var s__38718__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38718__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38718__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38720 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38719 = (0);
while(true){
if((i__38719 < size__24199__auto__)){
var column = cljs.core._nth.call(null,c__24198__auto__,i__38719);
cljs.core.chunk_append.call(null,b__38720,hoplon.core.td.call(null,new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(column)));

var G__38808 = (i__38719 + (1));
i__38719 = G__38808;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38720),weathergen$ui$grids$master_detail_$_iter__38717.call(null,cljs.core.chunk_rest.call(null,s__38718__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38720),null);
}
} else {
var column = cljs.core.first.call(null,s__38718__$2);
return cljs.core.cons.call(null,hoplon.core.td.call(null,new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(column)),weathergen$ui$grids$master_detail_$_iter__38717.call(null,cljs.core.rest.call(null,s__38718__$2)));
}
} else {
return null;
}
break;
}
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,columns_STAR___$1);
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
).call(null,columns_STAR_))),javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (data_STAR___$1,columns_STAR___$1){
var iter__24200__auto__ = ((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721(s__38722){
return (new cljs.core.LazySeq(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38722__$1 = s__38722;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38722__$1);
if(temp__5278__auto__){
var s__38722__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38722__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38722__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38724 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38723 = (0);
while(true){
if((i__38723 < size__24199__auto__)){
var item = cljs.core._nth.call(null,c__24198__auto__,i__38723);
cljs.core.chunk_append.call(null,b__38724,(function (){var expanded_QMARK_ = javelin.core.cell.call(null,true);
var subitems = detail.call(null,item);
var spacer_width = "12px";
var spacer_margin = "3px";
var spacing = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),spacer_width,new cljs.core.Keyword(null,"margin-right","margin-right",809689658),spacer_margin,new cljs.core.Keyword(null,"display","display",242065432),"inline-block"], null);
var spacer = ((function (i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),spacing);
});})(i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [hoplon.core.tbody.call(null,hoplon.core.tr.call(null,td_STAR_.call(null,new cljs.core.Keyword(null,"colspan","colspan",-1512420934),cljs.core.count.call(null,columns_STAR___$1),(((cljs.core.count.call(null,subitems) === (0)))?spacer.call(null):hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"text-anchor","text-anchor",585613696),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"text-align","text-align",1786091845),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),new cljs.core.Keyword(null,"font-size","font-size",-1847940346),new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"border-color","border-color",-2059162761),new cljs.core.Keyword(null,"display","display",242065432),new cljs.core.Keyword(null,"margin-right","margin-right",809689658),new cljs.core.Keyword(null,"border-radius","border-radius",419594011),new cljs.core.Keyword(null,"height","height",1025178622)],["solid","6px","12px","center","middle","120%","bold",spacer_width,"1px","black","inline-block",spacer_margin,"50%","12px"]),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,expanded_QMARK_,cljs.core.not);
});})(i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return "-";
});})(i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (i__38723,con__29828__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return "+";
});})(i__38723,con__29828__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null));
var tpl__29830__auto__ = ((function (i__38723,con__29828__auto__,alt__29829__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38723,con__29828__auto__,alt__29829__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,expanded_QMARK_);
})())),formatter.call(null,item)))),hoplon.core.tbody.call(null,(function (){var iter__24200__auto__ = ((function (i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765(s__38766){
return (new cljs.core.LazySeq(null,((function (i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38766__$1 = s__38766;
while(true){
var temp__5278__auto____$1 = cljs.core.seq.call(null,s__38766__$1);
if(temp__5278__auto____$1){
var s__38766__$2 = temp__5278__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38766__$2)){
var c__24198__auto____$1 = cljs.core.chunk_first.call(null,s__38766__$2);
var size__24199__auto____$1 = cljs.core.count.call(null,c__24198__auto____$1);
var b__38768 = cljs.core.chunk_buffer.call(null,size__24199__auto____$1);
if((function (){var i__38767 = (0);
while(true){
if((i__38767 < size__24199__auto____$1)){
var subitem = cljs.core._nth.call(null,c__24198__auto____$1,i__38767);
cljs.core.chunk_append.call(null,b__38768,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24200__auto__ = ((function (i__38767,i__38723,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38768,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765_$_iter__38777(s__38778){
return (new cljs.core.LazySeq(null,((function (i__38767,i__38723,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38768,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38778__$1 = s__38778;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38778__$1);
if(temp__5278__auto____$2){
var s__38778__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38778__$2)){
var c__24198__auto____$2 = cljs.core.chunk_first.call(null,s__38778__$2);
var size__24199__auto____$2 = cljs.core.count.call(null,c__24198__auto____$2);
var b__38780 = cljs.core.chunk_buffer.call(null,size__24199__auto____$2);
if((function (){var i__38779 = (0);
while(true){
if((i__38779 < size__24199__auto____$2)){
var column = cljs.core._nth.call(null,c__24198__auto____$2,i__38779);
cljs.core.chunk_append.call(null,b__38780,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__38809 = (i__38779 + (1));
i__38779 = G__38809;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38780),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765_$_iter__38777.call(null,cljs.core.chunk_rest.call(null,s__38778__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38780),null);
}
} else {
var column = cljs.core.first.call(null,s__38778__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765_$_iter__38777.call(null,cljs.core.rest.call(null,s__38778__$2)));
}
} else {
return null;
}
break;
}
});})(i__38767,i__38723,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38768,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(i__38767,i__38723,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38768,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()));

var G__38810 = (i__38767 + (1));
i__38767 = G__38810;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38768),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765.call(null,cljs.core.chunk_rest.call(null,s__38766__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38768),null);
}
} else {
var subitem = cljs.core.first.call(null,s__38766__$2);
return cljs.core.cons.call(null,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24200__auto__ = ((function (i__38723,subitem,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765_$_iter__38781(s__38782){
return (new cljs.core.LazySeq(null,((function (i__38723,subitem,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38782__$1 = s__38782;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38782__$1);
if(temp__5278__auto____$2){
var s__38782__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38782__$2)){
var c__24198__auto____$1 = cljs.core.chunk_first.call(null,s__38782__$2);
var size__24199__auto____$1 = cljs.core.count.call(null,c__24198__auto____$1);
var b__38784 = cljs.core.chunk_buffer.call(null,size__24199__auto____$1);
if((function (){var i__38783 = (0);
while(true){
if((i__38783 < size__24199__auto____$1)){
var column = cljs.core._nth.call(null,c__24198__auto____$1,i__38783);
cljs.core.chunk_append.call(null,b__38784,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__38811 = (i__38783 + (1));
i__38783 = G__38811;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38784),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765_$_iter__38781.call(null,cljs.core.chunk_rest.call(null,s__38782__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38784),null);
}
} else {
var column = cljs.core.first.call(null,s__38782__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765_$_iter__38781.call(null,cljs.core.rest.call(null,s__38782__$2)));
}
} else {
return null;
}
break;
}
});})(i__38723,subitem,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(i__38723,subitem,s__38766__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38765.call(null,cljs.core.rest.call(null,s__38766__$2)));
}
} else {
return null;
}
break;
}
});})(i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(i__38723,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38724,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,subitems);
})())], null);
})());

var G__38812 = (i__38723 + (1));
i__38723 = G__38812;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38724),weathergen$ui$grids$master_detail_$_iter__38721.call(null,cljs.core.chunk_rest.call(null,s__38722__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38724),null);
}
} else {
var item = cljs.core.first.call(null,s__38722__$2);
return cljs.core.cons.call(null,(function (){var expanded_QMARK_ = javelin.core.cell.call(null,true);
var subitems = detail.call(null,item);
var spacer_width = "12px";
var spacer_margin = "3px";
var spacing = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),spacer_width,new cljs.core.Keyword(null,"margin-right","margin-right",809689658),spacer_margin,new cljs.core.Keyword(null,"display","display",242065432),"inline-block"], null);
var spacer = ((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),spacing);
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [hoplon.core.tbody.call(null,hoplon.core.tr.call(null,td_STAR_.call(null,new cljs.core.Keyword(null,"colspan","colspan",-1512420934),cljs.core.count.call(null,columns_STAR___$1),(((cljs.core.count.call(null,subitems) === (0)))?spacer.call(null):hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"text-anchor","text-anchor",585613696),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"text-align","text-align",1786091845),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),new cljs.core.Keyword(null,"font-size","font-size",-1847940346),new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"border-color","border-color",-2059162761),new cljs.core.Keyword(null,"display","display",242065432),new cljs.core.Keyword(null,"margin-right","margin-right",809689658),new cljs.core.Keyword(null,"border-radius","border-radius",419594011),new cljs.core.Keyword(null,"height","height",1025178622)],["solid","6px","12px","center","middle","120%","bold",spacer_width,"1px","black","inline-block",spacer_margin,"50%","12px"]),new cljs.core.Keyword(null,"click","click",1912301393),((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,expanded_QMARK_,cljs.core.not);
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return "-";
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
return "+";
});})(con__29828__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,expanded_QMARK_);
})())),formatter.call(null,item)))),hoplon.core.tbody.call(null,(function (){var iter__24200__auto__ = ((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785(s__38786){
return (new cljs.core.LazySeq(null,((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38786__$1 = s__38786;
while(true){
var temp__5278__auto____$1 = cljs.core.seq.call(null,s__38786__$1);
if(temp__5278__auto____$1){
var s__38786__$2 = temp__5278__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38786__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38786__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38788 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38787 = (0);
while(true){
if((i__38787 < size__24199__auto__)){
var subitem = cljs.core._nth.call(null,c__24198__auto__,i__38787);
cljs.core.chunk_append.call(null,b__38788,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24200__auto__ = ((function (i__38787,subitem,c__24198__auto__,size__24199__auto__,b__38788,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785_$_iter__38797(s__38798){
return (new cljs.core.LazySeq(null,((function (i__38787,subitem,c__24198__auto__,size__24199__auto__,b__38788,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38798__$1 = s__38798;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38798__$1);
if(temp__5278__auto____$2){
var s__38798__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38798__$2)){
var c__24198__auto____$1 = cljs.core.chunk_first.call(null,s__38798__$2);
var size__24199__auto____$1 = cljs.core.count.call(null,c__24198__auto____$1);
var b__38800 = cljs.core.chunk_buffer.call(null,size__24199__auto____$1);
if((function (){var i__38799 = (0);
while(true){
if((i__38799 < size__24199__auto____$1)){
var column = cljs.core._nth.call(null,c__24198__auto____$1,i__38799);
cljs.core.chunk_append.call(null,b__38800,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__38813 = (i__38799 + (1));
i__38799 = G__38813;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38800),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785_$_iter__38797.call(null,cljs.core.chunk_rest.call(null,s__38798__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38800),null);
}
} else {
var column = cljs.core.first.call(null,s__38798__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785_$_iter__38797.call(null,cljs.core.rest.call(null,s__38798__$2)));
}
} else {
return null;
}
break;
}
});})(i__38787,subitem,c__24198__auto__,size__24199__auto__,b__38788,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(i__38787,subitem,c__24198__auto__,size__24199__auto__,b__38788,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()));

var G__38814 = (i__38787 + (1));
i__38787 = G__38814;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38788),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785.call(null,cljs.core.chunk_rest.call(null,s__38786__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38788),null);
}
} else {
var subitem = cljs.core.first.call(null,s__38786__$2);
return cljs.core.cons.call(null,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24200__auto__ = ((function (subitem,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785_$_iter__38801(s__38802){
return (new cljs.core.LazySeq(null,((function (subitem,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_){
return (function (){
var s__38802__$1 = s__38802;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38802__$1);
if(temp__5278__auto____$2){
var s__38802__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38802__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38802__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38804 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38803 = (0);
while(true){
if((i__38803 < size__24199__auto__)){
var column = cljs.core._nth.call(null,c__24198__auto__,i__38803);
cljs.core.chunk_append.call(null,b__38804,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__38815 = (i__38803 + (1));
i__38803 = G__38815;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38804),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785_$_iter__38801.call(null,cljs.core.chunk_rest.call(null,s__38802__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38804),null);
}
} else {
var column = cljs.core.first.call(null,s__38802__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785_$_iter__38801.call(null,cljs.core.rest.call(null,s__38802__$2)));
}
} else {
return null;
}
break;
}
});})(subitem,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(subitem,s__38786__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()),weathergen$ui$grids$master_detail_$_iter__38721_$_iter__38785.call(null,cljs.core.rest.call(null,s__38786__$2)));
}
} else {
return null;
}
break;
}
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38722__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,subitems);
})())], null);
})(),weathergen$ui$grids$master_detail_$_iter__38721.call(null,cljs.core.rest.call(null,s__38722__$2)));
}
} else {
return null;
}
break;
}
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
,null,null));
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
;
return iter__24200__auto__.call(null,data_STAR___$1);
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38712,map__38712__$1,data,detail,columns,formatter,options,vec__38709,attrs,_))
).call(null,data_STAR_,columns_STAR_));
})());
};
var weathergen$ui$grids$master_detail = function (var_args){
var args__29774__auto__ = null;
if (arguments.length > 0) {
var G__38816__i = 0, G__38816__a = new Array(arguments.length -  0);
while (G__38816__i < G__38816__a.length) {G__38816__a[G__38816__i] = arguments[G__38816__i + 0]; ++G__38816__i;}
  args__29774__auto__ = new cljs.core.IndexedSeq(G__38816__a,0,null);
} 
return weathergen$ui$grids$master_detail__delegate.call(this,args__29774__auto__);};
weathergen$ui$grids$master_detail.cljs$lang$maxFixedArity = 0;
weathergen$ui$grids$master_detail.cljs$lang$applyTo = (function (arglist__38817){
var args__29774__auto__ = cljs.core.seq(arglist__38817);
return weathergen$ui$grids$master_detail__delegate(args__29774__auto__);
});
weathergen$ui$grids$master_detail.cljs$core$IFn$_invoke$arity$variadic = weathergen$ui$grids$master_detail__delegate;
return weathergen$ui$grids$master_detail;
})()
;
/**
 * Returns UI for the sort handles at the top of a column.
 *   `sort-state` is a tuple of column index and direction for the
 *   current sort. `column-id` is a cell the index of the column we're
 *   rendering.
 */
weathergen.ui.grids.sorters = (function weathergen$ui$grids$sorters(sort_criteria,column_id){
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),"sorters",hoplon.svg.svg.call(null,new cljs.core.Keyword(null,"width","width",-384071477),"20px",new cljs.core.Keyword(null,"viewBox","viewBox",-469489477),"-100 -100 200 200",weathergen.ui.common.triangle.call(null,new cljs.core.Keyword(null,"transform","transform",1381301764),"rotate(180) translate(0 -50)",new cljs.core.Keyword(null,"r","r",-471384190),(50),new cljs.core.Keyword(null,"stroke","stroke",1741823555),"black",new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),"2",new cljs.core.Keyword(null,"fill","fill",883462889),javelin.core.formula.call(null,(function (sort_criteria__$1,column_id__$1){
if(cljs.core._EQ_.call(null,sort_criteria__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [column_id__$1,new cljs.core.Keyword(null,"ascending","ascending",-988350486)], null))){
return "black";
} else {
return "none";
}
})).call(null,sort_criteria,column_id)),weathergen.ui.common.triangle.call(null,new cljs.core.Keyword(null,"transform","transform",1381301764),"translate(0 -50)",new cljs.core.Keyword(null,"r","r",-471384190),(50),new cljs.core.Keyword(null,"stroke","stroke",1741823555),"black",new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),"2",new cljs.core.Keyword(null,"fill","fill",883462889),javelin.core.formula.call(null,(function (sort_criteria__$1,column_id__$1){
if(cljs.core._EQ_.call(null,sort_criteria__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [column_id__$1,new cljs.core.Keyword(null,"descending","descending",-24766135)], null))){
return "black";
} else {
return "none";
}
})).call(null,sort_criteria,column_id))));
});
/**
 * Moves item `item` in `coll` by one position earlier or later,
 *   depending on the sign of `n`.
 * 
 *   E.g. `(reorder [:a :b :c] :b -1)` returns `[:b :a :c]`
 */
weathergen.ui.grids.nudge = (function weathergen$ui$grids$nudge(coll,item,n){
return cljs.core.mapv.call(null,cljs.core.second,cljs.core.sort_by.call(null,cljs.core.first,cljs.core.map_indexed.call(null,(function (i,v){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [((cljs.core._EQ_.call(null,v,item))?(((n > (0)))?(i + 1.5):(i - 1.5)):i),v], null);
}),coll)));
});
/**
 * Returns a table grid control. Attributes
 * 
 * :data - A cell containing a seq of maps
 * :row-attrs - A function from a cell containing a row to an Hoplon
 *           attrs map
 * :when-empty - UI to show when there are no rows in the data
 * :columns - A map from column IDs to column descriptions
 * :fixed-columns - A seq of IDs of unmovable columns
 * :movable-columns - [cell] A seq of IDs of movable columns
 * :hidden-columns - [cell] A set of IDs of hidden columns
 * 
 * Column description:
 * :title - Shows up in the header row
 * :sort-key - Function from a row value (not cell) to a sort value
 * :formatter - Function from a row cell and row number cell to UI
 * :css - Function from cell of row item and cell of row number to
 *       map of css values.
 * @param {...*} var_args
 */
weathergen.ui.grids.table_grid = (function() { 
var weathergen$ui$grids$table_grid__delegate = function (args__29774__auto__){
var vec__38910 = hoplon.core.parse_args.call(null,args__29774__auto__);
var attrs = cljs.core.nth.call(null,vec__38910,(0),null);
var _ = cljs.core.nth.call(null,vec__38910,(1),null);
weathergen.ui.common.register_styles_BANG_.call(null,new cljs.core.Keyword("weathergen.ui.grids","table-grid","weathergen.ui.grids/table-grid",-1079718067),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"table.table-grid","table.table-grid",1127379830),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"border-collapse","border-collapse",919100239),"collapse"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr.table-grid-row","tr.table-grid-row",-1812077054),garden.selectors._AMPERSAND_.call(null,garden.selectors.nth_child.call(null,new cljs.core.Keyword(null,"even","even",-275845692))),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"#eee"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr.table-grid-row","tr.table-grid-row",-1812077054),garden.selectors._AMPERSAND_.call(null,garden.selectors.nth_child.call(null,new cljs.core.Keyword(null,"odd","odd",-1213409872))),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"white"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"thead.table-grid-header","thead.table-grid-header",410909598),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.table-grid-cell","td.table-grid-cell",717270302),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"background","background",-863952629),"#ddd",new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px grey",new cljs.core.Keyword(null,"padding","padding",1660304693),"2px 4px 4px 4px",new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,".sorters",".sorters",2118548878),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",242065432),"inline-block"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"svg","svg",856789142),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"bottom"], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tbody.table-grid-body","tbody.table-grid-body",-611948556),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.table-grid-cell","td.table-grid-cell",717270302),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"padding","padding",1660304693),"2px 3px 2px 3px",new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px lightgray"], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.table-grid-cell.hidden-column","td.table-grid-cell.hidden-column",-561691712),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",242065432),"none"], null)], null)], null));

var map__38913 = attrs;
var map__38913__$1 = ((((!((map__38913 == null)))?((((map__38913.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38913.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38913):map__38913);
var movable_columns = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862));
var data = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var hidden_columns = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800));
var row_attrs = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863));
var columns = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"columns","columns",1998437288));
var when_empty = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890));
var fixed_columns = cljs.core.get.call(null,map__38913__$1,new cljs.core.Keyword(null,"fixed-columns","fixed-columns",-1793374858));
var attrs__$1 = cljs.core.dissoc.call(null,attrs,new cljs.core.Keyword(null,"data","data",-232669377),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863),new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890),new cljs.core.Keyword(null,"fixed-columns","fixed-columns",-1793374858),new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862),new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800));
var sort_criteria = javelin.core.cell.call(null,null);
var sorted_items = javelin.core.formula.call(null,((function (sort_criteria,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (data__$1,sort_criteria__$1){
if(cljs.core.not.call(null,sort_criteria__$1)){
return data__$1;
} else {
var vec__38915 = sort_criteria__$1;
var sort_column = cljs.core.nth.call(null,vec__38915,(0),null);
var sort_direction = cljs.core.nth.call(null,vec__38915,(1),null);
var map__38918 = cljs.core.get.call(null,columns,sort_column);
var map__38918__$1 = ((((!((map__38918 == null)))?((((map__38918.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38918.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38918):map__38918);
var sort_key = cljs.core.get.call(null,map__38918__$1,new cljs.core.Keyword(null,"sort-key","sort-key",1285844623));
return cljs.core.sort_by.call(null,sort_key,((cljs.core._EQ_.call(null,sort_direction,new cljs.core.Keyword(null,"ascending","ascending",-988350486)))?cljs.core.compare:((function (vec__38915,sort_column,sort_direction,map__38918,map__38918__$1,sort_key,sort_criteria,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (a,b){
return (- cljs.core.compare.call(null,a,b));
});})(vec__38915,sort_column,sort_direction,map__38918,map__38918__$1,sort_key,sort_criteria,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
),data__$1);
}
});})(sort_criteria,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,data,sort_criteria);
var num_columns = cljs.core.count.call(null,columns);
var column_order = javelin.core.formula.call(null,((function (sort_criteria,sorted_items,num_columns,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (fixed_columns__$1,movable_columns__$1){
return cljs.core.into.call(null,cljs.core.vec.call(null,fixed_columns__$1),cljs.core.vec.call(null,movable_columns__$1));
});})(sort_criteria,sorted_items,num_columns,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,fixed_columns,movable_columns);
var editing_columns_QMARK_ = javelin.core.cell.call(null,false);
var classify = ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (elem,class$){
return ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function() { 
var G__39002__delegate = function (args){
return cljs.core.apply.call(null,elem,new cljs.core.Keyword(null,"class","class",-2030961996),class$,args);
};
var G__39002 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__39003__i = 0, G__39003__a = new Array(arguments.length -  0);
while (G__39003__i < G__39003__a.length) {G__39003__a[G__39003__i] = arguments[G__39003__i + 0]; ++G__39003__i;}
  args = new cljs.core.IndexedSeq(G__39003__a,0,null);
} 
return G__39002__delegate.call(this,args);};
G__39002.cljs$lang$maxFixedArity = 0;
G__39002.cljs$lang$applyTo = (function (arglist__39004){
var args = cljs.core.seq(arglist__39004);
return G__39002__delegate(args);
});
G__39002.cljs$core$IFn$_invoke$arity$variadic = G__39002__delegate;
return G__39002;
})()
;
;})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
var table = classify.call(null,hoplon.core.table,"table-grid");
var thead = classify.call(null,hoplon.core.thead,"table-grid-header");
var tbody = classify.call(null,hoplon.core.tbody,"table-grid-body");
var tr = classify.call(null,hoplon.core.tr,"table-grid-row");
var td = classify.call(null,hoplon.core.td,"table-grid-cell");
return table.call(null,thead.call(null,tr.call(null,td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),"table-grid-cell",new cljs.core.Keyword(null,"colspan","colspan",-1512420934),num_columns,weathergen.ui.buttons.image_button.call(null,new cljs.core.Keyword(null,"src","src",-1651076051),"images/settings.svg",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(16)),new cljs.core.Keyword(null,"title","title",636505583),"Settings",new cljs.core.Keyword(null,"latched?","latched?",2124907793),editing_columns_QMARK_,new cljs.core.Keyword(null,"click","click",1912301393),((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,editing_columns_QMARK_,cljs.core.not);
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
),weathergen.help.help_icon.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"table-grid","table-grid",1980411698),new cljs.core.Keyword(null,"settings","settings",1556144875)], null)))),tr.call(null,(function (){var iter__24200__auto__ = ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function weathergen$ui$grids$table_grid_$_iter__38920(s__38921){
return (new cljs.core.LazySeq(null,((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
var s__38921__$1 = s__38921;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38921__$1);
if(temp__5278__auto__){
var s__38921__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38921__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38921__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38923 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38922 = (0);
while(true){
if((i__38922 < size__24199__auto__)){
var n = cljs.core._nth.call(null,c__24198__auto__,i__38922);
cljs.core.chunk_append.call(null,b__38923,(function (){var column_id = javelin.core.formula.call(null,((function (i__38922,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(i__38922,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (i__38922,column_id,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(i__38922,column_id,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,hidden_columns,column_id);
var disable_sort = javelin.core.formula.call(null,((function (i__38922,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"disable-sort","disable-sort",-579071276).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(i__38922,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id);
return td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
if(cljs.core.truth_(cljs.core.deref.call(null,disable_sort))){
return null;
} else {
cljs.core.swap_BANG_.call(null,sort_criteria,((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__38950){
var vec__38951 = p__38950;
var old_index = cljs.core.nth.call(null,vec__38951,(0),null);
var direction = cljs.core.nth.call(null,vec__38951,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.deref.call(null,column_id),((cljs.core.not_EQ_.call(null,old_index,cljs.core.deref.call(null,column_id)))?new cljs.core.Keyword(null,"ascending","ascending",-988350486):((cljs.core._EQ_.call(null,direction,new cljs.core.Keyword(null,"ascending","ascending",-988350486)))?new cljs.core.Keyword(null,"descending","descending",-24766135):new cljs.core.Keyword(null,"ascending","ascending",-988350486)
))], null);
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
);

return true;
}
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column left",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(-1));

return false;
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,"<");
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return null;
});})(i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,javelin.core.formula.call(null,((function (i__38922,con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (G__38957,G__38956,G__38954,G__38955){
var and__23326__auto__ = (G__38954.call(null,G__38955) < G__38956);
if(cljs.core.truth_(and__23326__auto__)){
return G__38957;
} else {
return and__23326__auto__;
}
});})(i__38922,con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,n,cljs.core.count,fixed_columns));
})(),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (hidden_QMARK___$1){
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"color","color",1011675173),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"background","background",-863952629),new cljs.core.Keyword(null,"cursor","cursor",1011937484),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"padding","padding",1660304693),new cljs.core.Keyword(null,"border-radius","border-radius",419594011)],["inset","90%",(cljs.core.truth_(hidden_QMARK___$1)?"red":"green"),weathergen.ui.common.px.call(null,(10)),"white","pointer",weathergen.ui.common.px.call(null,(2)),weathergen.ui.common.px.call(null,(1)),weathergen.ui.common.px.call(null,(3))]);
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (___$1){
cljs.core.swap_BANG_.call(null,hidden_columns,(cljs.core.truth_(cljs.core.deref.call(null,hidden_QMARK_))?cljs.core.disj:cljs.core.conj),cljs.core.deref.call(null,column_id));

return false;
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return "\u2717";
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return "\u2713";
});})(i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,hidden_QMARK_);
})());
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return null;
});})(i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,editing_columns_QMARK_);
})(),javelin.core.formula.call(null,((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"title","title",636505583).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return cljs.core.PersistentVector.EMPTY;
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.grids.sorters.call(null,sort_criteria,column_id);
});})(i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,disable_sort);
})(),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column right",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(1));

return false;
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,">");
});})(i__38922,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return null;
});})(i__38922,con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38922,con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,javelin.core.formula.call(null,((function (i__38922,con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (G__38962,G__38961,G__38960,G__38958,G__38959){
var and__23326__auto__ = (G__38958.call(null,G__38959) <= G__38960);
if(cljs.core.truth_(and__23326__auto__)){
var and__23326__auto____$1 = (G__38960 < (G__38961 - (1)));
if(cljs.core.truth_(and__23326__auto____$1)){
return G__38962;
} else {
return and__23326__auto____$1;
}
} else {
return and__23326__auto__;
}
});})(i__38922,con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38923,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,num_columns,n,cljs.core.count,fixed_columns));
})());
})());

var G__39005 = (i__38922 + (1));
i__38922 = G__39005;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38923),weathergen$ui$grids$table_grid_$_iter__38920.call(null,cljs.core.chunk_rest.call(null,s__38921__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38923),null);
}
} else {
var n = cljs.core.first.call(null,s__38921__$2);
return cljs.core.cons.call(null,(function (){var column_id = javelin.core.formula.call(null,((function (n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (column_id,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(column_id,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,hidden_columns,column_id);
var disable_sort = javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"disable-sort","disable-sort",-579071276).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(column_id,hidden_QMARK_,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id);
return td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
if(cljs.core.truth_(cljs.core.deref.call(null,disable_sort))){
return null;
} else {
cljs.core.swap_BANG_.call(null,sort_criteria,((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__38963){
var vec__38964 = p__38963;
var old_index = cljs.core.nth.call(null,vec__38964,(0),null);
var direction = cljs.core.nth.call(null,vec__38964,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.deref.call(null,column_id),((cljs.core.not_EQ_.call(null,old_index,cljs.core.deref.call(null,column_id)))?new cljs.core.Keyword(null,"ascending","ascending",-988350486):((cljs.core._EQ_.call(null,direction,new cljs.core.Keyword(null,"ascending","ascending",-988350486)))?new cljs.core.Keyword(null,"descending","descending",-24766135):new cljs.core.Keyword(null,"ascending","ascending",-988350486)
))], null);
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
);

return true;
}
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column left",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(-1));

return false;
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,"<");
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return null;
});})(con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,javelin.core.formula.call(null,((function (con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (G__38970,G__38969,G__38967,G__38968){
var and__23326__auto__ = (G__38967.call(null,G__38968) < G__38969);
if(cljs.core.truth_(and__23326__auto__)){
return G__38970;
} else {
return and__23326__auto__;
}
});})(con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,n,cljs.core.count,fixed_columns));
})(),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (hidden_QMARK___$1){
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"color","color",1011675173),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"background","background",-863952629),new cljs.core.Keyword(null,"cursor","cursor",1011937484),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"padding","padding",1660304693),new cljs.core.Keyword(null,"border-radius","border-radius",419594011)],["inset","90%",(cljs.core.truth_(hidden_QMARK___$1)?"red":"green"),weathergen.ui.common.px.call(null,(10)),"white","pointer",weathergen.ui.common.px.call(null,(2)),weathergen.ui.common.px.call(null,(1)),weathergen.ui.common.px.call(null,(3))]);
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (___$1){
cljs.core.swap_BANG_.call(null,hidden_columns,(cljs.core.truth_(cljs.core.deref.call(null,hidden_QMARK_))?cljs.core.disj:cljs.core.conj),cljs.core.deref.call(null,column_id));

return false;
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return "\u2717";
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return "\u2713";
});})(con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,hidden_QMARK_);
})());
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return null;
});})(con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,editing_columns_QMARK_);
})(),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"title","title",636505583).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return cljs.core.PersistentVector.EMPTY;
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.grids.sorters.call(null,sort_criteria,column_id);
});})(con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,disable_sort);
})(),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column right",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(1));

return false;
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,">");
});})(column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return null;
});})(con__29828__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,javelin.core.formula.call(null,((function (con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (G__38975,G__38974,G__38973,G__38971,G__38972){
var and__23326__auto__ = (G__38971.call(null,G__38972) <= G__38973);
if(cljs.core.truth_(and__23326__auto__)){
var and__23326__auto____$1 = (G__38973 < (G__38974 - (1)));
if(cljs.core.truth_(and__23326__auto____$1)){
return G__38975;
} else {
return and__23326__auto____$1;
}
} else {
return and__23326__auto__;
}
});})(con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38921__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,num_columns,n,cljs.core.count,fixed_columns));
})());
})(),weathergen$ui$grids$table_grid_$_iter__38920.call(null,cljs.core.rest.call(null,s__38921__$2)));
}
} else {
return null;
}
break;
}
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null,null));
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.range.call(null,num_columns));
})())),(function (){var con__29828__auto__ = (new cljs.core.Delay(((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return tbody.call(null,tr.call(null,td.call(null,new cljs.core.Keyword(null,"colspan","colspan",-1512420934),num_columns,when_empty)));
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var alt__29829__auto__ = (new cljs.core.Delay(((function (con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
return tbody.call(null,hoplon.core.loop_tpl_STAR_.call(null,javelin.core.formula.call(null,((function (con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (G__38976,G__38977,G__38978){
return G__38976.call(null,G__38977,G__38978);
});})(con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,cljs.core.map_indexed,cljs.core.vector,sorted_items),((function (con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (item__29818__auto__){
var vec__38979 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (indexed){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [indexed], null);
});})(con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,item__29818__auto__));
var indexed = cljs.core.nth.call(null,vec__38979,(0),null);
var vec__38988 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__38991){
var vec__38992 = p__38991;
var rownum = cljs.core.nth.call(null,vec__38992,(0),null);
var item = cljs.core.nth.call(null,vec__38992,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [rownum,item], null);
});})(vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,indexed));
var rownum = cljs.core.nth.call(null,vec__38988,(0),null);
var item = cljs.core.nth.call(null,vec__38988,(1),null);
return tr.call(null,row_attrs.call(null,item,rownum),(function (){var formatteds = cljs.core.apply.call(null,javelin.core.formula.call(null,((function (vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function() { 
var G__39006__delegate = function (formatteds){
return cljs.core.zipmap.call(null,cljs.core.map.call(null,cljs.core.key,columns),formatteds);
};
var G__39006 = function (var_args){
var formatteds = null;
if (arguments.length > 0) {
var G__39007__i = 0, G__39007__a = new Array(arguments.length -  0);
while (G__39007__i < G__39007__a.length) {G__39007__a[G__39007__i] = arguments[G__39007__i + 0]; ++G__39007__i;}
  formatteds = new cljs.core.IndexedSeq(G__39007__a,0,null);
} 
return G__39006__delegate.call(this,formatteds);};
G__39006.cljs$lang$maxFixedArity = 0;
G__39006.cljs$lang$applyTo = (function (arglist__39008){
var formatteds = cljs.core.seq(arglist__39008);
return G__39006__delegate(formatteds);
});
G__39006.cljs$core$IFn$_invoke$arity$variadic = G__39006__delegate;
return G__39006;
})()
;})(vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
),cljs.core.map.call(null,((function (vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (formatter){
return formatter.call(null,item);
});})(vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,cljs.core.map.call(null,new cljs.core.Keyword(null,"formatter","formatter",-483008823),cljs.core.vals.call(null,columns))));
var csses = cljs.core.apply.call(null,javelin.core.formula.call(null,((function (formatteds,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function() { 
var G__39009__delegate = function (csses){
return cljs.core.zipmap.call(null,cljs.core.map.call(null,cljs.core.key,columns),csses);
};
var G__39009 = function (var_args){
var csses = null;
if (arguments.length > 0) {
var G__39010__i = 0, G__39010__a = new Array(arguments.length -  0);
while (G__39010__i < G__39010__a.length) {G__39010__a[G__39010__i] = arguments[G__39010__i + 0]; ++G__39010__i;}
  csses = new cljs.core.IndexedSeq(G__39010__a,0,null);
} 
return G__39009__delegate.call(this,csses);};
G__39009.cljs$lang$maxFixedArity = 0;
G__39009.cljs$lang$applyTo = (function (arglist__39011){
var csses = cljs.core.seq(arglist__39011);
return G__39009__delegate(csses);
});
G__39009.cljs$core$IFn$_invoke$arity$variadic = G__39009__delegate;
return G__39009;
})()
;})(formatteds,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
),cljs.core.map.call(null,((function (formatteds,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (css){
if(cljs.core.truth_(css)){
return css.call(null,item,rownum);
} else {
return null;
}
});})(formatteds,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,cljs.core.map.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.vals.call(null,columns))));
var iter__24200__auto__ = ((function (formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function weathergen$ui$grids$table_grid_$_iter__38995(s__38996){
return (new cljs.core.LazySeq(null,((function (formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (){
var s__38996__$1 = s__38996;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38996__$1);
if(temp__5278__auto__){
var s__38996__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38996__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38996__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38998 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38997 = (0);
while(true){
if((i__38997 < size__24199__auto__)){
var n = cljs.core._nth.call(null,c__24198__auto__,i__38997);
cljs.core.chunk_append.call(null,b__38998,(function (){var column_id = javelin.core.formula.call(null,((function (i__38997,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(i__38997,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (i__38997,column_id,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(i__38997,column_id,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,hidden_columns,column_id);
var c = td.call(null);
c.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (i__38997,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(i__38997,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (i__38997,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1,csses__$1){
var or__23338__auto___39012 = cljs.core.get.call(null,csses__$1,column_id__$1);
if(cljs.core.truth_(or__23338__auto___39012)){
} else {
c.removeAttribute("style");

}

return cljs.core.get.call(null,csses__$1,column_id__$1);
});})(i__38997,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id,csses),javelin.core.formula.call(null,((function (i__38997,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1,formatteds__$1){
return cljs.core.get.call(null,formatteds__$1,column_id__$1);
});})(i__38997,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38998,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id,formatteds));

return c;
})());

var G__39013 = (i__38997 + (1));
i__38997 = G__39013;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38998),weathergen$ui$grids$table_grid_$_iter__38995.call(null,cljs.core.chunk_rest.call(null,s__38996__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38998),null);
}
} else {
var n = cljs.core.first.call(null,s__38996__$2);
return cljs.core.cons.call(null,(function (){var column_id = javelin.core.formula.call(null,((function (n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (column_id,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(column_id,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,hidden_columns,column_id);
var c = td.call(null);
c.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(c,column_id,hidden_QMARK_,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1,csses__$1){
var or__23338__auto___39014 = cljs.core.get.call(null,csses__$1,column_id__$1);
if(cljs.core.truth_(or__23338__auto___39014)){
} else {
c.removeAttribute("style");

}

return cljs.core.get.call(null,csses__$1,column_id__$1);
});})(c,column_id,hidden_QMARK_,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id,csses),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (column_id__$1,formatteds__$1){
return cljs.core.get.call(null,formatteds__$1,column_id__$1);
});})(c,column_id,hidden_QMARK_,n,s__38996__$2,temp__5278__auto__,formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,column_id,formatteds));

return c;
})(),weathergen$ui$grids$table_grid_$_iter__38995.call(null,cljs.core.rest.call(null,s__38996__$2)));
}
} else {
return null;
}
break;
}
});})(formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null,null));
});})(formatteds,csses,vec__38988,rownum,item,vec__38979,indexed,con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.range.call(null,num_columns));
})());
});})(con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
));
});})(con__29828__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
,null));
var tpl__29830__auto__ = ((function (con__29828__auto__,alt__29829__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (p__29831__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29831__auto__)?con__29828__auto__:alt__29829__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29828__auto__,alt__29829__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
;
return javelin.core.formula.call(null,tpl__29830__auto__).call(null,javelin.core.formula.call(null,((function (con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_){
return (function (G__39001,G__39000,G__38999){
var and__23326__auto__ = (G__38999.call(null,G__39000) === (0));
if(cljs.core.truth_(and__23326__auto__)){
return G__39001;
} else {
return and__23326__auto__;
}
});})(con__29828__auto__,alt__29829__auto__,tpl__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38913,map__38913__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38910,attrs,_))
).call(null,when_empty,sorted_items,cljs.core.count));
})());
};
var weathergen$ui$grids$table_grid = function (var_args){
var args__29774__auto__ = null;
if (arguments.length > 0) {
var G__39015__i = 0, G__39015__a = new Array(arguments.length -  0);
while (G__39015__i < G__39015__a.length) {G__39015__a[G__39015__i] = arguments[G__39015__i + 0]; ++G__39015__i;}
  args__29774__auto__ = new cljs.core.IndexedSeq(G__39015__a,0,null);
} 
return weathergen$ui$grids$table_grid__delegate.call(this,args__29774__auto__);};
weathergen$ui$grids$table_grid.cljs$lang$maxFixedArity = 0;
weathergen$ui$grids$table_grid.cljs$lang$applyTo = (function (arglist__39016){
var args__29774__auto__ = cljs.core.seq(arglist__39016);
return weathergen$ui$grids$table_grid__delegate(args__29774__auto__);
});
weathergen$ui$grids$table_grid.cljs$core$IFn$_invoke$arity$variadic = weathergen$ui$grids$table_grid__delegate;
return weathergen$ui$grids$table_grid;
})()
;
