// Compiled by ClojureScript 1.10.520 {}
goog.provide('weathergen.ui.layers.flights');
goog.require('cljs.core');
goog.require('clojure.set');
goog.require('clojure.string');
goog.require('garden.stylesheet');
goog.require('goog.string');
goog.require('goog.string.format');
goog.require('hoplon.core');
goog.require('hoplon.svg');
goog.require('javelin.core');
goog.require('taoensso.timbre');
goog.require('weathergen.coordinates');
goog.require('weathergen.falcon.constants');
goog.require('weathergen.falcon.files.images');
goog.require('weathergen.falcon.files.mission');
goog.require('weathergen.help');
goog.require('weathergen.time');
goog.require('weathergen.ui.buttons');
goog.require('weathergen.ui.common');
goog.require('weathergen.ui.grids');
goog.require('weathergen.util');
weathergen.ui.layers.flights.mission_category_names = cljs.core.PersistentHashMap.fromArrays([weathergen.falcon.constants.ATO_STRIKE,weathergen.falcon.constants.ATO_OCA,weathergen.falcon.constants.ATO_OTHER,weathergen.falcon.constants.ATO_SEAD,weathergen.falcon.constants.ATO_SUPPORT,weathergen.falcon.constants.ATO_CCCI,weathergen.falcon.constants.ATO_CAS,weathergen.falcon.constants.ATO_MARITIME,weathergen.falcon.constants.ATO_INTERDICTION,weathergen.falcon.constants.ATO_DCA],["Strike","OCA","Other","SEAD","Support","C3I","CAS","Maritime","Interdiction","DCA"]);
weathergen.ui.layers.flights.default_mission_category_colors = cljs.core.PersistentHashMap.fromArrays([weathergen.falcon.constants.ATO_STRIKE,weathergen.falcon.constants.ATO_OCA,weathergen.falcon.constants.ATO_OTHER,weathergen.falcon.constants.ATO_SEAD,weathergen.falcon.constants.ATO_SUPPORT,weathergen.falcon.constants.ATO_CCCI,weathergen.falcon.constants.ATO_CAS,weathergen.falcon.constants.ATO_MARITIME,weathergen.falcon.constants.ATO_INTERDICTION,weathergen.falcon.constants.ATO_DCA],["#e00000",weathergen.ui.common.to_hex_str.call(null,"green"),weathergen.ui.common.to_hex_str.call(null,"black"),"#640082","#a8a8a8",weathergen.ui.common.to_hex_str.call(null,"white"),weathergen.ui.common.to_hex_str.call(null,"darkblue"),weathergen.ui.common.to_hex_str.call(null,"lightblue"),"#cc00cc","#ffa800"]);
weathergen.ui.layers.flights.mission_category_colors = weathergen.ui.common.versioned_local_storage.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","mission-category-colors","weathergen.ui.layers.flights/mission-category-colors",-704412508),weathergen.ui.layers.flights.default_mission_category_colors);
weathergen.ui.layers.flights.hidden_flights_columns = weathergen.ui.common.versioned_local_storage.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","hidden-flights-columns","weathergen.ui.layers.flights/hidden-flights-columns",345798875),cljs.core.PersistentHashSet.EMPTY);
weathergen.ui.layers.flights.movable_flights_columns = weathergen.ui.common.versioned_local_storage.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","movable-flights-columns","weathergen.ui.layers.flights/movable-flights-columns",1349199949),new cljs.core.PersistentVector(null, 10, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"combatant","combatant",2138865651),new cljs.core.Keyword(null,"callsign","callsign",1222385874),new cljs.core.Keyword(null,"airframe","airframe",643222926),new cljs.core.Keyword(null,"mission","mission",1740288522),new cljs.core.Keyword(null,"package","package",1189062786),new cljs.core.Keyword(null,"squadron","squadron",-1131671273),new cljs.core.Keyword(null,"airbase","airbase",-369690299),new cljs.core.Keyword(null,"takeoff","takeoff",719937767),new cljs.core.Keyword(null,"tot","tot",2086174646),new cljs.core.Keyword(null,"egress","egress",610445366)], null));
weathergen.ui.layers.flights.hidden_steerpoints_columns = weathergen.ui.common.versioned_local_storage.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","hidden-steerpoints-columns","weathergen.ui.layers.flights/hidden-steerpoints-columns",-122666770),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"depart","depart",-100007287),null,new cljs.core.Keyword(null,"speed-ias","speed-ias",-534091766),null,new cljs.core.Keyword(null,"speed-tas","speed-tas",228844362),null,new cljs.core.Keyword(null,"action","action",-811238024),null,new cljs.core.Keyword(null,"enroute","enroute",-1681821057),null], null), null));
weathergen.ui.layers.flights.movable_steerpoints_columns = weathergen.ui.common.versioned_local_storage.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","movable-steerpoints-columns","weathergen.ui.layers.flights/movable-steerpoints-columns",-1824262332),new cljs.core.PersistentVector(null, 15, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"description","description",-1428560544),new cljs.core.Keyword(null,"arrive","arrive",-284644322),new cljs.core.Keyword(null,"depart","depart",-100007287),new cljs.core.Keyword(null,"remain","remain",1399477086),new cljs.core.Keyword(null,"action","action",-811238024),new cljs.core.Keyword(null,"enroute","enroute",-1681821057),new cljs.core.Keyword(null,"distance","distance",-1671893894),new cljs.core.Keyword(null,"heading","heading",-1312171873),new cljs.core.Keyword(null,"speed-cas","speed-cas",-239308126),new cljs.core.Keyword(null,"speed-tas","speed-tas",228844362),new cljs.core.Keyword(null,"speed-gnd","speed-gnd",1356834908),new cljs.core.Keyword(null,"speed-mach","speed-mach",-1842148254),new cljs.core.Keyword(null,"speed-ias","speed-ias",-534091766),new cljs.core.Keyword(null,"altitude","altitude",463588637),new cljs.core.Keyword(null,"comments","comments",-293346423)], null));
weathergen.ui.layers.flights.row_primary_color = "white";
weathergen.ui.layers.flights.row_alternate_color = "#f0f0f0";
weathergen.ui.layers.flights.row_tertiary_color = "darkgrey";
/**
 * Returns a color for a table row based on its ordinal.
 */
weathergen.ui.layers.flights.row_color = (function weathergen$ui$layers$flights$row_color(rownum){
if(cljs.core.truth_(rownum)){
if(cljs.core.even_QMARK_.call(null,rownum)){
return weathergen.ui.layers.flights.row_alternate_color;
} else {
return weathergen.ui.layers.flights.row_primary_color;
}
} else {
return null;
}
});
/**
 * Returns the color for a flight mission
 */
weathergen.ui.layers.flights.flight_mission_color = (function weathergen$ui$layers$flights$flight_mission_color(mission,flight,colors){
return colors.call(null,new cljs.core.Keyword(null,"category","category",-593092832).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","mission","weathergen.falcon.files.mission/mission",43331456).cljs$core$IFn$_invoke$arity$1(flight)));
});
/**
 * Returns a string describing the compsition of the flight. E.g. `2 F-16`.
 */
weathergen.ui.layers.flights.flight_aircraft = (function weathergen$ui$layers$flights$flight_aircraft(flight){
var map__36480 = new cljs.core.Keyword("weathergen.falcon.files.mission","aircraft","weathergen.falcon.files.mission/aircraft",774567258).cljs$core$IFn$_invoke$arity$1(flight);
var map__36480__$1 = (((((!((map__36480 == null))))?(((((map__36480.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36480.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36480):map__36480);
var quantity = cljs.core.get.call(null,map__36480__$1,new cljs.core.Keyword(null,"quantity","quantity",-1929050694));
var airframe = cljs.core.get.call(null,map__36480__$1,new cljs.core.Keyword(null,"airframe","airframe",643222926));
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(quantity)," ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(airframe)].join('');
});
weathergen.ui.common.register_styles_BANG_.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","briefing-summary","weathergen.ui.layers.flights/briefing-summary",-1486998600),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [weathergen.ui.common.class_selector_for.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","briefing-summary","weathergen.ui.layers.flights/briefing-summary",-1486998600)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"initial"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr","tr",-1424774646),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"initial"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td","td",1479933353),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"border","border",1444987323),"none"], null)], null)], null)], null)], null));
/**
 * Returns UI for the info/details display of the flight given a cell for the flight.
 */
weathergen.ui.layers.flights.flight_details = (function weathergen$ui$layers$flights$flight_details(p__36493){
var map__36494 = p__36493;
var map__36494__$1 = (((((!((map__36494 == null))))?(((((map__36494.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36494.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36494):map__36494);
var mission = cljs.core.get.call(null,map__36494__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var flight = cljs.core.get.call(null,map__36494__$1,new cljs.core.Keyword(null,"flight","flight",-764860679));
var display = cljs.core.get.call(null,map__36494__$1,new cljs.core.Keyword(null,"display","display",242065432));
var tabbed_flights = cljs.core.get.call(null,map__36494__$1,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200));
var checked_flights = cljs.core.get.call(null,map__36494__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var col = ((function (map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function() {
var weathergen$ui$layers$flights$flight_details_$_col = null;
var weathergen$ui$layers$flights$flight_details_$_col__3 = (function (title,help_key,f){
return weathergen$ui$layers$flights$flight_details_$_col.call(null,title,help_key,cljs.core.PersistentArrayMap.EMPTY,f);
});
var weathergen$ui$layers$flights$flight_details_$_col__4 = (function (title,help_key,opts,f){
var map__36496 = opts;
var map__36496__$1 = (((((!((map__36496 == null))))?(((((map__36496.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36496.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36496):map__36496);
var align = cljs.core.get.call(null,map__36496__$1,new cljs.core.Keyword(null,"align","align",1964212802));
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"waypoint-columns","waypoint-columns",1546876163),help_key], null),title),new cljs.core.Keyword(null,"disable-sort","disable-sort",-579071276),true,new cljs.core.Keyword(null,"sort-key","sort-key",1285844623),f,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (map__36496,map__36496__$1,align,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (waypoint){
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap",new cljs.core.Keyword(null,"text-align","text-align",1786091845),((cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"right","right",-452581833),align))?"right":null),new cljs.core.Keyword(null,"padding","padding",1660304693),weathergen.ui.common.px.call(null,(0),(2))], null),javelin.core.formula.call(null,((function (map__36496,map__36496__$1,align,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (waypoint__$1){
return f.call(null,waypoint__$1);
});})(map__36496,map__36496__$1,align,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,waypoint));
});})(map__36496,map__36496__$1,align,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
], null);
});
weathergen$ui$layers$flights$flight_details_$_col = function(title,help_key,opts,f){
switch(arguments.length){
case 3:
return weathergen$ui$layers$flights$flight_details_$_col__3.call(this,title,help_key,opts);
case 4:
return weathergen$ui$layers$flights$flight_details_$_col__4.call(this,title,help_key,opts,f);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
weathergen$ui$layers$flights$flight_details_$_col.cljs$core$IFn$_invoke$arity$3 = weathergen$ui$layers$flights$flight_details_$_col__3;
weathergen$ui$layers$flights$flight_details_$_col.cljs$core$IFn$_invoke$arity$4 = weathergen$ui$layers$flights$flight_details_$_col__4;
return weathergen$ui$layers$flights$flight_details_$_col;
})()
;})(map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
;
var bold = ((function (col,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function() { 
var G__36547__delegate = function (contents){
return cljs.core.apply.call(null,hoplon.core.div,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold"], null),contents);
};
var G__36547 = function (var_args){
var contents = null;
if (arguments.length > 0) {
var G__36548__i = 0, G__36548__a = new Array(arguments.length -  0);
while (G__36548__i < G__36548__a.length) {G__36548__a[G__36548__i] = arguments[G__36548__i + 0]; ++G__36548__i;}
  contents = new cljs.core.IndexedSeq(G__36548__a,0,null);
} 
return G__36547__delegate.call(this,contents);};
G__36547.cljs$lang$maxFixedArity = 0;
G__36547.cljs$lang$applyTo = (function (arglist__36549){
var contents = cljs.core.seq(arglist__36549);
return G__36547__delegate(contents);
});
G__36547.cljs$core$IFn$_invoke$arity$variadic = G__36547__delegate;
return G__36547;
})()
;})(col,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
;
var has_tab_QMARK_ = javelin.core.formula.call(null,((function (col,bold,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (tabbed_flights__$1,flight__$1){
return tabbed_flights__$1.call(null,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(flight__$1));
});})(col,bold,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,tabbed_flights,flight);
return hoplon.core.div.call(null,hoplon.core.div.call(null,hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"display","display",242065432),"inline-block",new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"font-size","font-size",-1847940346),"120%"], null),javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (G__36498){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__36498);
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight)),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (has_tab_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"display","display",242065432),(cljs.core.truth_(has_tab_QMARK___$1)?"none":null),new cljs.core.Keyword(null,"float","float",-1732389368),"right",new cljs.core.Keyword(null,"text-decoration","text-decoration",1836813207),"underline",new cljs.core.Keyword(null,"color","color",1011675173),"blue",new cljs.core.Keyword(null,"cursor","cursor",1011937484),"pointer",new cljs.core.Keyword(null,"user-select","user-select",-346451650),"none"], null);
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,has_tab_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (_){
return cljs.core.swap_BANG_.call(null,tabbed_flights,cljs.core.assoc,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,flight)),cljs.core.deref.call(null,flight));
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
,"Open flight in tab")),hoplon.core.table.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),weathergen.ui.common.class_for.call(null,new cljs.core.Keyword("weathergen.ui.layers.flights","briefing-summary","weathergen.ui.layers.flights/briefing-summary",-1486998600)),hoplon.core.tr.call(null,hoplon.core.td.call(null,bold.call(null,"Mission")),hoplon.core.td.call(null,javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (flight__$1){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","mission","weathergen.falcon.files.mission/mission",43331456).cljs$core$IFn$_invoke$arity$1(flight__$1));
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight))),hoplon.core.tr.call(null,hoplon.core.td.call(null,bold.call(null,"Package")),hoplon.core.td.call(null,javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (flight__$1){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","package","weathergen.falcon.files.mission/package",-1415630340).cljs$core$IFn$_invoke$arity$1(flight__$1));
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight))),hoplon.core.tr.call(null,hoplon.core.td.call(null,bold.call(null,"Aircraft")),hoplon.core.td.call(null,javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (flight__$1){
return weathergen.ui.layers.flights.flight_aircraft.call(null,flight__$1);
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight)))),hoplon.core.hr.call(null),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"font-size","font-size",-1847940346),"110%"], null),"Steerpoints"),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-bottom","margin-bottom",388334941),weathergen.ui.common.px.call(null,(3))], null),weathergen.ui.common.checkbox.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (checked_flights__$1,flight__$1){
return checked_flights__$1.call(null,flight__$1);
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,checked_flights,flight),new cljs.core.Keyword(null,"change","change",-1163046502),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (e){
console.log("checkbox change",(cljs.core.truth_(cljs.core.deref.call(null,checked_flights).call(null,cljs.core.deref.call(null,flight)))?"true":"false"));

return cljs.core.swap_BANG_.call(null,checked_flights,weathergen.util.toggle_set_membership,cljs.core.deref.call(null,flight));
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flight-paths","flight-paths",159519268),new cljs.core.Keyword(null,"show?","show?",1543842127)], null),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),weathergen.ui.common.px.call(null,(3))], null),"Show flight path on map?"))),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-bottom","margin-bottom",388334941),weathergen.ui.common.px.call(null,(3))], null),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flight-paths","flight-paths",159519268),new cljs.core.Keyword(null,"color","color",1011675173)], null),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-right","margin-right",809689658),weathergen.ui.common.px.call(null,(3))], null),"Color:")),weathergen.ui.common.color_picker2.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (mission__$1,flight__$1,display__$1,mission_category_colors){
var map__36499 = flight__$1;
var map__36499__$1 = (((((!((map__36499 == null))))?(((((map__36499.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36499.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36499):map__36499);
var camp_id = cljs.core.get.call(null,map__36499__$1,new cljs.core.Keyword(null,"camp-id","camp-id",618705690));
var temp__5718__auto__ = cljs.core.get_in.call(null,display__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [camp_id,new cljs.core.Keyword(null,"color","color",1011675173)], null));
if(cljs.core.truth_(temp__5718__auto__)){
var c = temp__5718__auto__;
return c;
} else {
return weathergen.ui.layers.flights.flight_mission_color.call(null,mission__$1,flight__$1,mission_category_colors);
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,mission,flight,display,weathergen.ui.layers.flights.mission_category_colors),new cljs.core.Keyword(null,"change","change",-1163046502),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36482_SHARP_){
return cljs.core.swap_BANG_.call(null,display,cljs.core.assoc_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"camp-id","camp-id",618705690).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,flight)),new cljs.core.Keyword(null,"color","color",1011675173)], null),p1__36482_SHARP_);
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
)),weathergen.ui.grids.table_grid.call(null,new cljs.core.Keyword(null,"data","data",-232669377),javelin.core.formula.call(null,((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (G__36501){
return new cljs.core.Keyword("weathergen.falcon.files.mission","waypoints","weathergen.falcon.files.mission/waypoints",712228162).cljs$core$IFn$_invoke$arity$1(G__36501);
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight),new cljs.core.Keyword(null,"key-fn","key-fn",-636154479),new cljs.core.Keyword("weathergen.falcon.files.mission","number","weathergen.falcon.files.mission/number",-1176793792),new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863),cljs.core.constantly.call(null,cljs.core.PersistentArrayMap.EMPTY),new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890),"Flight has no waypoints",new cljs.core.Keyword(null,"fixed-columns","fixed-columns",-1793374858),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"number","number",1570378438)], null),new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862),weathergen.ui.layers.flights.movable_steerpoints_columns,new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800),weathergen.ui.layers.flights.hidden_steerpoints_columns,new cljs.core.Keyword(null,"columns","columns",1998437288),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"description","description",-1428560544),new cljs.core.Keyword(null,"speed-mach","speed-mach",-1842148254),new cljs.core.Keyword(null,"speed-cas","speed-cas",-239308126),new cljs.core.Keyword(null,"number","number",1570378438),new cljs.core.Keyword(null,"depart","depart",-100007287),new cljs.core.Keyword(null,"comments","comments",-293346423),new cljs.core.Keyword(null,"speed-ias","speed-ias",-534091766),new cljs.core.Keyword(null,"speed-tas","speed-tas",228844362),new cljs.core.Keyword(null,"action","action",-811238024),new cljs.core.Keyword(null,"distance","distance",-1671893894),new cljs.core.Keyword(null,"speed-gnd","speed-gnd",1356834908),new cljs.core.Keyword(null,"altitude","altitude",463588637),new cljs.core.Keyword(null,"arrive","arrive",-284644322),new cljs.core.Keyword(null,"remain","remain",1399477086),new cljs.core.Keyword(null,"heading","heading",-1312171873),new cljs.core.Keyword(null,"enroute","enroute",-1681821057)],[col.call(null,"Desc",new cljs.core.Keyword(null,"description","description",-1428560544),new cljs.core.Keyword("weathergen.falcon.files.mission","description","weathergen.falcon.files.mission/description",-1977659382)),col.call(null,"Mach",new cljs.core.Keyword(null,"speed-mach","speed-mach",-1842148254),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36492_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_mach.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","speed-mach","weathergen.falcon.files.mission/speed-mach",-185245472).cljs$core$IFn$_invoke$arity$1(p1__36492_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"CAS",new cljs.core.Keyword(null,"speed-cas","speed-cas",-239308126),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36488_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_speed.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","speed-cas","weathergen.falcon.files.mission/speed-cas",-588060328).cljs$core$IFn$_invoke$arity$1(p1__36488_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"#",new cljs.core.Keyword(null,"number","number",1570378438),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),new cljs.core.Keyword("weathergen.falcon.files.mission","number","weathergen.falcon.files.mission/number",-1176793792)),col.call(null,"Depart",new cljs.core.Keyword(null,"depart","depart",-100007287),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36484_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"depart","depart",-100007287).cljs$core$IFn$_invoke$arity$1(p1__36484_SHARP_),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"seconds?","seconds?",-1600404958),true], null));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Comments",new cljs.core.Keyword(null,"comments","comments",-293346423),new cljs.core.Keyword("weathergen.falcon.files.mission","comments","weathergen.falcon.files.mission/comments",-1789953753)),col.call(null,"IAS",new cljs.core.Keyword(null,"speed-ias","speed-ias",-534091766),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36489_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_speed.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","speed-ias","weathergen.falcon.files.mission/speed-ias",-2064912472).cljs$core$IFn$_invoke$arity$1(p1__36489_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"TAS",new cljs.core.Keyword(null,"speed-tas","speed-tas",228844362),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36490_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_speed.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","speed-tas","weathergen.falcon.files.mission/speed-tas",568219840).cljs$core$IFn$_invoke$arity$1(p1__36490_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Action",new cljs.core.Keyword(null,"action","action",-811238024),new cljs.core.Keyword("weathergen.falcon.files.mission","action-name","weathergen.falcon.files.mission/action-name",-1230729595)),col.call(null,"Dist",new cljs.core.Keyword(null,"distance","distance",-1671893894),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36486_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_distance.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","distance","weathergen.falcon.files.mission/distance",18637316).cljs$core$IFn$_invoke$arity$1(p1__36486_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Gnd Spd",new cljs.core.Keyword(null,"speed-gnd","speed-gnd",1356834908),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36491_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_speed.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","speed-gnd","weathergen.falcon.files.mission/speed-gnd",-39445006).cljs$core$IFn$_invoke$arity$1(p1__36491_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Alt",new cljs.core.Keyword(null,"altitude","altitude",463588637),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"aligh","aligh",1960130388),new cljs.core.Keyword(null,"right","right",-452581833)], null),new cljs.core.Keyword("weathergen.falcon.files.mission","altitude","weathergen.falcon.files.mission/altitude",543643555)),col.call(null,"Time",new cljs.core.Keyword(null,"arrive","arrive",-284644322),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36483_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"arrive","arrive",-284644322).cljs$core$IFn$_invoke$arity$1(p1__36483_SHARP_),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"seconds?","seconds?",-1600404958),true], null));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Remain",new cljs.core.Keyword(null,"remain","remain",1399477086),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36485_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_time.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","remain","weathergen.falcon.files.mission/remain",1849736680).cljs$core$IFn$_invoke$arity$1(p1__36485_SHARP_),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"omit-day?","omit-day?",1622751707),true,new cljs.core.Keyword(null,"seconds?","seconds?",-1600404958),true], null));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Hdg",new cljs.core.Keyword(null,"heading","heading",-1312171873),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"align","align",1964212802),new cljs.core.Keyword(null,"right","right",-452581833)], null),((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p1__36487_SHARP_){
var or__4131__auto__ = weathergen.ui.common.format_heading.call(null,new cljs.core.Keyword("weathergen.falcon.files.mission","heading","weathergen.falcon.files.mission/heading",361734949).cljs$core$IFn$_invoke$arity$1(p1__36487_SHARP_));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return "--";
}
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
),col.call(null,"Enroute",new cljs.core.Keyword(null,"enroute","enroute",-1681821057),new cljs.core.Keyword("weathergen.falcon.files.mission","enroute-action-name","weathergen.falcon.files.mission/enroute-action-name",-95379962))])),hoplon.core.hr.call(null),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"font-size","font-size",-1847940346),"120%"], null),"Ordnance"),(function (){var con__30287__auto__ = (new cljs.core.Delay(((function (col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (){
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),weathergen.ui.common.px.call(null,(10)),new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(7)),new cljs.core.Keyword(null,"margin-bottom","margin-bottom",388334941),weathergen.ui.common.px.call(null,(5))], null),"No weapons carried");
});})(col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
,null));
var alt__30288__auto__ = (new cljs.core.Delay(((function (con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (){
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"display","display",242065432),"flex",new cljs.core.Keyword(null,"flex-direction","flex-direction",364609438),"row",new cljs.core.Keyword(null,"flex-wrap","flex-wrap",455413707),"wrap"], null),hoplon.core.loop_tpl_STAR_.call(null,javelin.core.formula.call(null,((function (con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (flight__$1){
return cljs.core.map_indexed.call(null,cljs.core.vector,new cljs.core.Keyword("weathergen.falcon.files.mission","loadouts","weathergen.falcon.files.mission/loadouts",142269567).cljs$core$IFn$_invoke$arity$1(flight__$1));
});})(con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight),((function (con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (item__30277__auto__){
var vec__36502 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (indexed){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [indexed], null);
});})(con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,item__30277__auto__));
var indexed = cljs.core.nth.call(null,vec__36502,(0),null);
var vec__36511 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p__36514){
var vec__36515 = p__36514;
var index = cljs.core.nth.call(null,vec__36515,(0),null);
var loadout = cljs.core.nth.call(null,vec__36515,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [index,loadout], null);
});})(vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,indexed));
var index = cljs.core.nth.call(null,vec__36511,(0),null);
var loadout = cljs.core.nth.call(null,vec__36511,(1),null);
var vec__36520 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p__36523){
var map__36524 = p__36523;
var map__36524__$1 = (((((!((map__36524 == null))))?(((((map__36524.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36524.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36524):map__36524);
var quantity = cljs.core.get.call(null,map__36524__$1,new cljs.core.Keyword(null,"quantity","quantity",-1929050694));
var name = cljs.core.get.call(null,map__36524__$1,new cljs.core.Keyword(null,"name","name",1843675177));
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [quantity,name], null);
});})(vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,loadout));
var quantity = cljs.core.nth.call(null,vec__36520,(0),null);
var name = cljs.core.nth.call(null,vec__36520,(1),null);
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.pct.call(null,(35)),new cljs.core.Keyword(null,"min-width","min-width",1926193728),weathergen.ui.common.pct.call(null,(35)),new cljs.core.Keyword(null,"max-width","max-width",-1939924051),weathergen.ui.common.pct.call(null,(45)),new cljs.core.Keyword(null,"padding","padding",1660304693),weathergen.ui.common.px.call(null,(10))], null),hoplon.core.div.call(null,hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold"], null),javelin.core.formula.call(null,((function (vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (G__36526,G__36527){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__36526)),"-",cljs.core.str.cljs$core$IFn$_invoke$arity$1((G__36527 + (1)))].join('');
});})(vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight,index)),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"font-size","font-size",-1847940346),"90%",new cljs.core.Keyword(null,"font-style","font-style",-773672352),"italic"], null),javelin.core.formula.call(null,((function (vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (flight__$1,index__$1){
var stats = cljs.core.nth.call(null,new cljs.core.Keyword(null,"plane-stats","plane-stats",-4010361).cljs$core$IFn$_invoke$arity$1(flight__$1),index__$1);
var pred__36528 = cljs.core._EQ_;
var expr__36529 = stats;
if(cljs.core.truth_(pred__36528.call(null,weathergen.falcon.constants.AIRCRAFT_MISSING,expr__36529))){
return " (missing)";
} else {
if(cljs.core.truth_(pred__36528.call(null,weathergen.falcon.constants.AIRCRAFT_DEAD,expr__36529))){
return " (destroyed)";
} else {
return "";
}
}
});})(vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight,index))),hoplon.core.ul.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(5))], null),hoplon.core.loop_tpl_STAR_.call(null,loadout,((function (vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (item__30277__auto____$1){
var vec__36531 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (weapon){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [weapon], null);
});})(vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,item__30277__auto____$1));
var weapon = cljs.core.nth.call(null,vec__36531,(0),null);
var vec__36536 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36531,weapon,vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p__36539){
var map__36540 = p__36539;
var map__36540__$1 = (((((!((map__36540 == null))))?(((((map__36540.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36540.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36540):map__36540);
var name__$1 = cljs.core.get.call(null,map__36540__$1,new cljs.core.Keyword(null,"name","name",1843675177));
var quantity__$1 = cljs.core.get.call(null,map__36540__$1,new cljs.core.Keyword(null,"quantity","quantity",-1929050694));
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [quantity__$1,name__$1], null);
});})(vec__36531,weapon,vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,weapon));
var quantity__$1 = cljs.core.nth.call(null,vec__36536,(0),null);
var name__$1 = cljs.core.nth.call(null,vec__36536,(1),null);
return hoplon.core.li.call(null,javelin.core.formula.call(null,((function (vec__36536,quantity__$1,name__$1,vec__36531,weapon,vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (G__36542,G__36543){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__36542)," x ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__36543)].join('');
});})(vec__36536,quantity__$1,name__$1,vec__36531,weapon,vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,quantity__$1,name__$1));
});})(vec__36520,quantity,name,vec__36511,index,loadout,vec__36502,indexed,con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
)));
});})(con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
));
});})(con__30287__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
,null));
var tpl__30289__auto__ = ((function (con__30287__auto__,alt__30288__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (p__30290__auto__){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(p__30290__auto__)?con__30287__auto__:alt__30288__auto__);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(con__30287__auto__,alt__30288__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
;
return javelin.core.formula.call(null,tpl__30289__auto__).call(null,javelin.core.formula.call(null,((function (con__30287__auto__,alt__30288__auto__,tpl__30289__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights){
return (function (G__36546,G__36544,G__36545){
return G__36544.call(null,G__36545,new cljs.core.Keyword("weathergen.falcon.files.mission","loadouts","weathergen.falcon.files.mission/loadouts",142269567).cljs$core$IFn$_invoke$arity$1(G__36546));
});})(con__30287__auto__,alt__30288__auto__,tpl__30289__auto__,col,bold,has_tab_QMARK_,map__36494,map__36494__$1,mission,flight,display,tabbed_flights,checked_flights))
).call(null,flight,cljs.core.every_QMARK_,cljs.core.empty_QMARK_));
})());
});
/**
 * Returns a formatter for the info cell of the flight table.
 */
weathergen.ui.layers.flights.flight_info_formatter = (function weathergen$ui$layers$flights$flight_info_formatter(p__36550){
var map__36551 = p__36550;
var map__36551__$1 = (((((!((map__36551 == null))))?(((((map__36551.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36551.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36551):map__36551);
var mission = cljs.core.get.call(null,map__36551__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var display = cljs.core.get.call(null,map__36551__$1,new cljs.core.Keyword(null,"display","display",242065432));
var detailed_flight = cljs.core.get.call(null,map__36551__$1,new cljs.core.Keyword(null,"detailed-flight","detailed-flight",216212956));
var scroll_container = cljs.core.get.call(null,map__36551__$1,new cljs.core.Keyword(null,"scroll-container","scroll-container",-1938238550));
var tabbed_flights = cljs.core.get.call(null,map__36551__$1,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200));
var checked_flights = cljs.core.get.call(null,map__36551__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
return ((function (map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (flight){
var vec__36555 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (p__36558){
var map__36559 = p__36558;
var map__36559__$1 = (((((!((map__36559 == null))))?(((((map__36559.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36559.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36559):map__36559);
var camp_id = cljs.core.get.call(null,map__36559__$1,new cljs.core.Keyword(null,"camp-id","camp-id",618705690));
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [camp_id], null);
});})(map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
).call(null,flight));
var camp_id = cljs.core.nth.call(null,vec__36555,(0),null);
var visible_QMARK_ = javelin.core.formula.call(null,((function (vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (G__36562,G__36563,G__36561){
return G__36561.call(null,G__36562,G__36563);
});})(vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
).call(null,camp_id,detailed_flight,cljs.core._EQ_);
var doc_click = ((function (visible_QMARK_,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function weathergen$ui$layers$flights$flight_info_formatter_$_click_fn(e){
document.removeEventListener("click",weathergen$ui$layers$flights$flight_info_formatter_$_click_fn);

return cljs.core.reset_BANG_.call(null,detailed_flight,null);
});})(visible_QMARK_,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
;
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"click","click",1912301393),cljs.core.constantly.call(null,false),new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"position","position",-2011731912),"relative",new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap"], null),weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"latched?","latched?",2124907793),visible_QMARK_,new cljs.core.Keyword(null,"click","click",1912301393),((function (visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (){
cljs.core.swap_BANG_.call(null,detailed_flight,((function (visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (current){
if(cljs.core.not_EQ_.call(null,current,cljs.core.deref.call(null,camp_id))){
document.addEventListener("click",doc_click);

return cljs.core.deref.call(null,camp_id);
} else {
return null;
}
});})(visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
);

return false;
});})(visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 8, [new cljs.core.Keyword(null,"border-radius","border-radius",419594011),"50%",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(12)),new cljs.core.Keyword(null,"height","height",1025178622),weathergen.ui.common.px.call(null,(12)),new cljs.core.Keyword(null,"text-align","text-align",1786091845),"center",new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"font-family","font-family",-667419874),"serif",new cljs.core.Keyword(null,"font-size","font-size",-1847940346),"110%",new cljs.core.Keyword(null,"line-height","line-height",1870784992),weathergen.ui.common.px.call(null,(12))], null),new cljs.core.Keyword(null,"title","title",636505583),"More options...","i"),weathergen.ui.buttons.image_button.call(null,new cljs.core.Keyword(null,"latched?","latched?",2124907793),javelin.core.formula.call(null,((function (visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (G__36566,G__36564,G__36565){
return G__36564.call(null,G__36565,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(G__36566));
});})(visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
).call(null,flight,cljs.core.contains_QMARK_,tabbed_flights),new cljs.core.Keyword(null,"click","click",1912301393),((function (visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (_){
if(cljs.core.contains_QMARK_.call(null,cljs.core.deref.call(null,tabbed_flights),new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,flight)))){
return cljs.core.swap_BANG_.call(null,tabbed_flights,cljs.core.dissoc,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,flight)));
} else {
return cljs.core.swap_BANG_.call(null,tabbed_flights,cljs.core.assoc,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,flight)),cljs.core.deref.call(null,flight));
}
});})(visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
,new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(16)),new cljs.core.Keyword(null,"title","title",636505583),"Show flight in separate tab",new cljs.core.Keyword(null,"src","src",-1651076051),"images/open-external.svg"),(function (){var con__30287__auto__ = (new cljs.core.Delay(((function (visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (){
var d = 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,"top","top",-1856271961),new cljs.core.Keyword(null,"background","background",-863952629),new cljs.core.Keyword(null,"z-index","z-index",1892827090),new cljs.core.Keyword(null,"padding","padding",1660304693),new cljs.core.Keyword(null,"border-color","border-color",-2059162761),new cljs.core.Keyword(null,"position","position",-2011731912),new cljs.core.Keyword(null,"margin-bottom","margin-bottom",388334941),new cljs.core.Keyword(null,"left","left",-399115937)],["double",weathergen.ui.common.px.call(null,(25)),"#FDFFD9",(1),weathergen.ui.common.px.call(null,(5)),"black","absolute",weathergen.ui.common.px.call(null,(5)),weathergen.ui.common.px.call(null,(25))]),weathergen.ui.layers.flights.flight_details.call(null,new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"mission","mission",1740288522),mission,new cljs.core.Keyword(null,"flight","flight",-764860679),flight,new cljs.core.Keyword(null,"display","display",242065432),display,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200),tabbed_flights,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695),checked_flights], null)));
hoplon.core.do_watch.call(null,visible_QMARK_,((function (d,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (old,new$){
if(cljs.core.truth_((function (){var and__4120__auto__ = cljs.core.not.call(null,old);
if(and__4120__auto__){
return new$;
} else {
return and__4120__auto__;
}
})())){
return setTimeout(((function (d,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (){
var container = jQuery(scroll_container);
var offset = container.offset().top;
var vis_top = container.scrollTop();
var vis_height = (jQuery(window).height() - offset);
var vis_bottom = (vis_top + vis_height);
var elem = jQuery(d);
var elem_height = elem.height();
var elem_top = ((elem.offset().top - offset) + vis_top);
var elem_bottom = (elem_top + elem_height);
var top_diff = ((elem_top - vis_top) - (25));
var bottom_diff = (vis_bottom - elem_bottom);
cljs.core.prn.call(null,new cljs.core.Keyword(null,"vis-top","vis-top",-1877899818),vis_top,new cljs.core.Keyword(null,"vis-height","vis-height",-621249871),vis_height,new cljs.core.Keyword(null,"vis-bottom","vis-bottom",1773347385),vis_bottom,new cljs.core.Keyword(null,"elem-height","elem-height",-1672618154),elem_height,new cljs.core.Keyword(null,"elem-top","elem-top",1545964974),elem_top,new cljs.core.Keyword(null,"elem-bototm","elem-bototm",280962377),elem_bottom);

if((top_diff < (0))){
return jQuery("body").animate(({"scrollTop": (elem_top + (25))}),(300));
} else {
if((bottom_diff < (0))){
return jQuery(scroll_container).animate(({"scrollTop": (((elem_height < vis_height))?((25) + (vis_top - bottom_diff)):(elem_top - (25)))}),(300));
} else {
return null;
}
}
});})(d,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
,(0));
} else {
return null;
}
});})(d,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
);

return d;
});})(visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
,null));
var alt__30288__auto__ = (new cljs.core.Delay(((function (con__30287__auto__,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (){
return null;
});})(con__30287__auto__,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
,null));
var tpl__30289__auto__ = ((function (con__30287__auto__,alt__30288__auto__,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights){
return (function (p__30290__auto__){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(p__30290__auto__)?con__30287__auto__:alt__30288__auto__);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(con__30287__auto__,alt__30288__auto__,visible_QMARK_,doc_click,vec__36555,camp_id,map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
;
return javelin.core.formula.call(null,tpl__30289__auto__).call(null,visible_QMARK_);
})());
});
;})(map__36551,map__36551__$1,mission,display,detailed_flight,scroll_container,tabbed_flights,checked_flights))
});
/**
 * Returns a control section for affecting the way flight-paths
 *   render on the map.
 */
weathergen.ui.layers.flights.flight_path_display_controls = (function weathergen$ui$layers$flights$flight_path_display_controls(title,state){
return weathergen.ui.common.control_section.call(null,new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"display-options","display-options",1066052168),new cljs.core.Keyword(null,"overview","overview",-435037267)], null),title),(function (){var map__36568 = state;
var map__36568__$1 = (((((!((map__36568 == null))))?(((((map__36568.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36568.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36568):map__36568);
var map_flight_path_size = cljs.core.get.call(null,map__36568__$1,new cljs.core.Keyword(null,"map-flight-path-size","map-flight-path-size",-1349075868));
var map__36569 = new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"label","label",1718410804),"Flight path size:",new cljs.core.Keyword(null,"key","key",-1516042587),new cljs.core.Keyword(null,"map-flight-path-size","map-flight-path-size",-1349075868),new cljs.core.Keyword(null,"init","init",-1875481434),(0),new cljs.core.Keyword(null,"min","min",444991522),-1.0,new cljs.core.Keyword(null,"max","max",61366548),1.0], null);
var map__36569__$1 = (((((!((map__36569 == null))))?(((((map__36569.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36569.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36569):map__36569);
var label = cljs.core.get.call(null,map__36569__$1,new cljs.core.Keyword(null,"label","label",1718410804));
var key = cljs.core.get.call(null,map__36569__$1,new cljs.core.Keyword(null,"key","key",-1516042587));
var init = cljs.core.get.call(null,map__36569__$1,new cljs.core.Keyword(null,"init","init",-1875481434));
var min = cljs.core.get.call(null,map__36569__$1,new cljs.core.Keyword(null,"min","min",444991522));
var max = cljs.core.get.call(null,map__36569__$1,new cljs.core.Keyword(null,"max","max",61366548));
return hoplon.core.div.call(null,weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"display-options","display-options",1066052168),key], null),label),(function (){var id = cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.gensym.call(null));
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle",new cljs.core.Keyword(null,"margin","margin",-995903681),weathergen.ui.common.px.call(null,(0),(5))], null),hoplon.core.datalist.call(null,new cljs.core.Keyword(null,"id","id",-1388402092),id,(function (){var iter__4523__auto__ = ((function (id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max){
return (function weathergen$ui$layers$flights$flight_path_display_controls_$_iter__36572(s__36573){
return (new cljs.core.LazySeq(null,((function (id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max){
return (function (){
var s__36573__$1 = s__36573;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36573__$1);
if(temp__5720__auto__){
var s__36573__$2 = temp__5720__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36573__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36573__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36575 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36574 = (0);
while(true){
if((i__36574 < size__4522__auto__)){
var val = cljs.core._nth.call(null,c__4521__auto__,i__36574);
cljs.core.chunk_append.call(null,b__36575,hoplon.core.option.call(null,new cljs.core.Keyword(null,"value","value",305978217),val));

var G__36577 = (i__36574 + (1));
i__36574 = G__36577;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36575),weathergen$ui$layers$flights$flight_path_display_controls_$_iter__36572.call(null,cljs.core.chunk_rest.call(null,s__36573__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36575),null);
}
} else {
var val = cljs.core.first.call(null,s__36573__$2);
return cljs.core.cons.call(null,hoplon.core.option.call(null,new cljs.core.Keyword(null,"value","value",305978217),val),weathergen$ui$layers$flights$flight_path_display_controls_$_iter__36572.call(null,cljs.core.rest.call(null,s__36573__$2)));
}
} else {
return null;
}
break;
}
});})(id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max))
,null,null));
});})(id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max))
;
return iter__4523__auto__.call(null,cljs.core.range.call(null,((100) * min),((100) * (max + (1))),((max - min) * (25))));
})()),hoplon.core.input.call(null,new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"type","type",1174270348),"range",new cljs.core.Keyword(null,"list","list",765357683),id,new cljs.core.Keyword(null,"min","min",444991522),cljs.core.long$.call(null,(min * (100))),new cljs.core.Keyword(null,"max","max",61366548),cljs.core.long$.call(null,(max * (100))),new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max){
return (function (G__36576){
return (G__36576 * (100));
});})(id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max))
).call(null,map_flight_path_size),new cljs.core.Keyword(null,"input","input",556931961),((function (id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max){
return (function (p1__36567_SHARP_){
return cljs.core.reset_BANG_.call(null,map_flight_path_size,(cljs.core.deref.call(null,p1__36567_SHARP_) / 100.0));
});})(id,map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max))
], null)));
})(),weathergen.ui.common.inl.call(null,weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"click","click",1912301393),((function (map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max){
return (function (){
return cljs.core.reset_BANG_.call(null,map_flight_path_size,init);
});})(map__36568,map__36568__$1,map_flight_path_size,map__36569,map__36569__$1,label,key,init,min,max))
,"Reset"),weathergen.help.help_icon.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"display-options","display-options",1066052168),cljs.core.keyword.call(null,["reset-",cljs.core.name.call(null,key)].join(''))], null))));
})());
});
weathergen.ui.layers.flights.controls = (function weathergen$ui$layers$flights$controls(p__36586){
var map__36587 = p__36586;
var map__36587__$1 = (((((!((map__36587 == null))))?(((((map__36587.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36587.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36587):map__36587);
var state = map__36587__$1;
var checked_flights = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var mission = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var scroll_container = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"scroll-container","scroll-container",-1938238550));
var tabbed_flights = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200));
var highlighted_flight = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813));
var selected_teams = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671));
var display = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"display","display",242065432));
var visible_teams = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"visible-teams","visible-teams",-110455752));
var all_flights = cljs.core.get.call(null,map__36587__$1,new cljs.core.Keyword(null,"all-flights","all-flights",253678712));
var G__36592 = (new cljs.core.Delay(((function (map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return "No mission loaded";
});})(map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,null));
var G__36593 = (new cljs.core.Delay(((function (G__36592,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return "No flights present in the mission";
});})(G__36592,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,null));
var G__36594 = (new cljs.core.Delay(((function (G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return hoplon.core.div.call(null,weathergen.ui.common.control_section.call(null,new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"mission-key","mission-key",-2054000190)], null),"Mission Key"),new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-bottom","margin-bottom",388334941),weathergen.ui.common.px.call(null,(3))], null),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"display","display",242065432),"flex",new cljs.core.Keyword(null,"flex-wrap","flex-wrap",455413707),"wrap",new cljs.core.Keyword(null,"max-width","max-width",-1939924051),weathergen.ui.common.px.call(null,(400))], null),(function (){var iter__4523__auto__ = ((function (G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function weathergen$ui$layers$flights$controls_$_iter__36595(s__36596){
return (new cljs.core.LazySeq(null,((function (G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
var s__36596__$1 = s__36596;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36596__$1);
if(temp__5720__auto__){
var s__36596__$2 = temp__5720__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36596__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36596__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36598 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36597 = (0);
while(true){
if((i__36597 < size__4522__auto__)){
var vec__36599 = cljs.core._nth.call(null,c__4521__auto__,i__36597);
var id = cljs.core.nth.call(null,vec__36599,(0),null);
var name = cljs.core.nth.call(null,vec__36599,(1),null);
cljs.core.chunk_append.call(null,b__36598,hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap"], null),weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-right","margin-right",809689658),weathergen.ui.common.px.call(null,(3))], null),new cljs.core.Keyword(null,"click","click",1912301393),cljs.core.constantly.call(null,false),weathergen.ui.common.color_picker2.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (i__36597,vec__36599,id,name,c__4521__auto__,size__4522__auto__,b__36598,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission_category_colors){
return mission_category_colors.call(null,id);
});})(i__36597,vec__36599,id,name,c__4521__auto__,size__4522__auto__,b__36598,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,weathergen.ui.layers.flights.mission_category_colors),new cljs.core.Keyword(null,"change","change",-1163046502),((function (i__36597,vec__36599,id,name,c__4521__auto__,size__4522__auto__,b__36598,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36578_SHARP_){
return cljs.core.swap_BANG_.call(null,weathergen.ui.layers.flights.mission_category_colors,cljs.core.assoc,id,p1__36578_SHARP_);
});})(i__36597,vec__36599,id,name,c__4521__auto__,size__4522__auto__,b__36598,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
)),weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(70)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle"], null),name)));

var G__36630 = (i__36597 + (1));
i__36597 = G__36630;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36598),weathergen$ui$layers$flights$controls_$_iter__36595.call(null,cljs.core.chunk_rest.call(null,s__36596__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36598),null);
}
} else {
var vec__36602 = cljs.core.first.call(null,s__36596__$2);
var id = cljs.core.nth.call(null,vec__36602,(0),null);
var name = cljs.core.nth.call(null,vec__36602,(1),null);
return cljs.core.cons.call(null,hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap"], null),weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-right","margin-right",809689658),weathergen.ui.common.px.call(null,(3))], null),new cljs.core.Keyword(null,"click","click",1912301393),cljs.core.constantly.call(null,false),weathergen.ui.common.color_picker2.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (vec__36602,id,name,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission_category_colors){
return mission_category_colors.call(null,id);
});})(vec__36602,id,name,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,weathergen.ui.layers.flights.mission_category_colors),new cljs.core.Keyword(null,"change","change",-1163046502),((function (vec__36602,id,name,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36578_SHARP_){
return cljs.core.swap_BANG_.call(null,weathergen.ui.layers.flights.mission_category_colors,cljs.core.assoc,id,p1__36578_SHARP_);
});})(vec__36602,id,name,s__36596__$2,temp__5720__auto__,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
)),weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(70)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle"], null),name)),weathergen$ui$layers$flights$controls_$_iter__36595.call(null,cljs.core.rest.call(null,s__36596__$2)));
}
} else {
return null;
}
break;
}
});})(G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,null,null));
});})(G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
;
return iter__4523__auto__.call(null,weathergen.ui.layers.flights.mission_category_names);
})()),weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"click","click",1912301393),((function (G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return cljs.core.reset_BANG_.call(null,weathergen.ui.layers.flights.mission_category_colors,weathergen.ui.layers.flights.default_mission_category_colors);
});})(G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,"Reset to defaults"),weathergen.help.help_icon.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"mission-key-reset","mission-key-reset",-2081456284)], null))),weathergen.ui.layers.flights.flight_path_display_controls.call(null,"Display Options",state),weathergen.ui.common.control_section.call(null,new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"team-visibility","team-visibility",-2011507771)], null),"Team Visibility"),weathergen.ui.common.team_selector.call(null,new cljs.core.Keyword(null,"mission","mission",1740288522),mission,new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671),selected_teams,new cljs.core.Keyword(null,"selectable-teams","selectable-teams",1104557919),visible_teams)),weathergen.ui.common.control_section.call(null,new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"flight-info","flight-info",-1755465938)], null),"Flight Info"),(function (){var detailed_flight = javelin.core.cell.call(null,null);
return weathergen.ui.grids.table_grid.call(null,new cljs.core.Keyword(null,"data","data",-232669377),javelin.core.formula.call(null,((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,all_flights__$1,selected_teams__$1){
return cljs.core.filter.call(null,((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36580_SHARP_){
return cljs.core.contains_QMARK_.call(null,selected_teams__$1,new cljs.core.Keyword(null,"owner","owner",-392611939).cljs$core$IFn$_invoke$arity$1(p1__36580_SHARP_));
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,all_flights__$1);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,mission,all_flights,selected_teams),new cljs.core.Keyword(null,"key-fn","key-fn",-636154479),new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890),document.createTextNode("No flights to show"),new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863),((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight,rownum){
if(cljs.core.truth_((function (){var and__4120__auto__ = flight;
if(cljs.core.truth_(and__4120__auto__)){
return rownum;
} else {
return and__4120__auto__;
}
})())){
return new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (rownum__$1,flight__$1,highlighted_flight__$1){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),((cljs.core._EQ_.call(null,highlighted_flight__$1,flight__$1))?"lightgoldenrodyellow":weathergen.ui.layers.flights.row_color.call(null,rownum__$1))], null);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,rownum,flight,highlighted_flight),new cljs.core.Keyword(null,"mouseenter","mouseenter",-1792413560),((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return cljs.core.reset_BANG_.call(null,highlighted_flight,cljs.core.deref.call(null,flight));
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"mouseleave","mouseleave",531566580),((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return cljs.core.reset_BANG_.call(null,highlighted_flight,null);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"click","click",1912301393),((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
return javelin.core.dosync_STAR_.call(null,((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (){
cljs.core.swap_BANG_.call(null,checked_flights,weathergen.util.toggle_set_membership,cljs.core.deref.call(null,flight));

return cljs.core.reset_BANG_.call(null,highlighted_flight,cljs.core.deref.call(null,checked_flights).call(null,cljs.core.deref.call(null,flight)));
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36607,G__36605,G__36606){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"highlighted","highlighted",1723498733),G__36605.call(null,G__36606,G__36607)], null);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,flight,cljs.core._EQ_,highlighted_flight)], null);
} else {
return null;
}
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800),weathergen.ui.layers.flights.hidden_flights_columns,new cljs.core.Keyword(null,"fixed-columns","fixed-columns",-1793374858),javelin.core.cell.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"show?","show?",1543842127),new cljs.core.Keyword(null,"info","info",-317069002)], null)),new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862),weathergen.ui.layers.flights.movable_flights_columns,new cljs.core.Keyword(null,"columns","columns",1998437288),(function (){var col = ((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (title,help_key,f){
return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"columns","columns",1998437288),help_key], null),title),new cljs.core.Keyword(null,"sort-key","sort-key",1285844623),((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36581_SHARP_){
return f.call(null,cljs.core.deref.call(null,mission),p1__36581_SHARP_);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight){
return javelin.core.formula.call(null,((function (detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,flight__$1){
return f.call(null,mission__$1,flight__$1);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,mission,flight);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
], null);
});})(detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
;
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"package","package",1189062786),new cljs.core.Keyword(null,"airbase","airbase",-369690299),new cljs.core.Keyword(null,"takeoff","takeoff",719937767),new cljs.core.Keyword(null,"mission","mission",1740288522),new cljs.core.Keyword(null,"airframe","airframe",643222926),new cljs.core.Keyword(null,"show?","show?",1543842127),new cljs.core.Keyword(null,"callsign","callsign",1222385874),new cljs.core.Keyword(null,"combatant","combatant",2138865651),new cljs.core.Keyword(null,"egress","egress",610445366),new cljs.core.Keyword(null,"info","info",-317069002),new cljs.core.Keyword(null,"tot","tot",2086174646),new cljs.core.Keyword(null,"squadron","squadron",-1131671273)],[col.call(null,"Package",new cljs.core.Keyword(null,"package","package",1189062786),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,flight){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","package","weathergen.falcon.files.mission/package",-1415630340).cljs$core$IFn$_invoke$arity$1(flight));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
),col.call(null,"Airbase",new cljs.core.Keyword(null,"airbase","airbase",-369690299),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,flight){
var G__36608 = flight;
var G__36608__$1 = (((G__36608 == null))?null:new cljs.core.Keyword("weathergen.falcon.files.mission","airbase","weathergen.falcon.files.mission/airbase",-1926407441).cljs$core$IFn$_invoke$arity$1(G__36608));
if((G__36608__$1 == null)){
return null;
} else {
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__36608__$1);
}
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
),col.call(null,"T/O",new cljs.core.Keyword(null,"takeoff","takeoff",719937767),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (_,flight){
return weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"depart","depart",-100007287).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,new cljs.core.Keyword(null,"waypoints","waypoints",-844253224).cljs$core$IFn$_invoke$arity$1(flight))));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"mission","mission",1740288522)], null),"Mission"),new cljs.core.Keyword(null,"sort-key","sort-key",1285844623),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","mission","weathergen.falcon.files.mission/mission",43331456).cljs$core$IFn$_invoke$arity$1(flight));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight){
return javelin.core.formula.call(null,((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight__$1){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","mission","weathergen.falcon.files.mission/mission",43331456).cljs$core$IFn$_invoke$arity$1(flight__$1));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,flight);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"css","css",1135045163),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight,rownum){
return javelin.core.formula.call(null,((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,flight__$1,mission_category_colors,rownum__$1){
var color = weathergen.ui.layers.flights.flight_mission_color.call(null,mission__$1,flight__$1,mission_category_colors);
var contrast = weathergen.ui.common.contrasting.call(null,color,weathergen.ui.layers.flights.row_tertiary_color,weathergen.ui.layers.flights.row_color.call(null,rownum__$1));
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"background","background",-863952629),contrast,new cljs.core.Keyword(null,"color","color",1011675173),color], null);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,mission,flight,weathergen.ui.layers.flights.mission_category_colors,rownum);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Aircraft",new cljs.core.Keyword(null,"sort-key","sort-key",1285844623),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36585_SHARP_){
return weathergen.ui.layers.flights.flight_aircraft.call(null,p1__36585_SHARP_);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight){
return hoplon.core.div.call(null,hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"display","display",242065432),"inline-block",new cljs.core.Keyword(null,"float","float",-1732389368),"left",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(19)),new cljs.core.Keyword(null,"text-align","text-align",1786091845),"center"], null),weathergen.ui.common.centered_image.call(null,mission,javelin.core.formula.call(null,((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36609){
return new cljs.core.Keyword("weathergen.falcon.files.mission","squadron-image","weathergen.falcon.files.mission/squadron-image",-423118152).cljs$core$IFn$_invoke$arity$1(G__36609);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,flight),(19))),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),weathergen.ui.common.px.call(null,(3))], null),javelin.core.formula.call(null,((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36611,G__36610){
return G__36610.call(null,G__36611);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,flight,weathergen.ui.layers.flights.flight_aircraft)));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"show?","show?",1543842127)], null),"Show?"),new cljs.core.Keyword(null,"sort-key","sort-key",1285844623),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight){
return cljs.core.not.call(null,cljs.core.deref.call(null,checked_flights).call(null,flight));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (flight){
var vec__36614 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p__36617){
var map__36618 = p__36617;
var map__36618__$1 = (((((!((map__36618 == null))))?(((((map__36618.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36618.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36618):map__36618);
var camp_id = cljs.core.get.call(null,map__36618__$1,new cljs.core.Keyword(null,"camp-id","camp-id",618705690));
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [camp_id], null);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,flight));
var camp_id = cljs.core.nth.call(null,vec__36614,(0),null);
var visible_QMARK_ = javelin.core.formula.call(null,((function (vec__36614,camp_id,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (checked_flights__$1,flight__$1){
return checked_flights__$1.call(null,flight__$1);
});})(vec__36614,camp_id,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,checked_flights,flight);
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap"], null),hoplon.core.input.call(null,new cljs.core.Keyword(null,"camp-id","camp-id",618705690),camp_id,new cljs.core.Keyword(null,"type","type",1174270348),"checkbox",new cljs.core.Keyword(null,"value","value",305978217),visible_QMARK_),weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"margin-right","margin-right",809689658),"2px",new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle"], null),new cljs.core.Keyword(null,"click","click",1912301393),cljs.core.constantly.call(null,false),weathergen.ui.common.color_picker2.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (visible_QMARK_,vec__36614,camp_id,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,flight__$1,camp_id__$1,display__$1,mission_category_colors){
var temp__5718__auto__ = cljs.core.get_in.call(null,display__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [camp_id__$1,new cljs.core.Keyword(null,"color","color",1011675173)], null));
if(cljs.core.truth_(temp__5718__auto__)){
var c = temp__5718__auto__;
return c;
} else {
return weathergen.ui.layers.flights.flight_mission_color.call(null,mission__$1,flight__$1,mission_category_colors);
}
});})(visible_QMARK_,vec__36614,camp_id,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,mission,flight,camp_id,display,weathergen.ui.layers.flights.mission_category_colors),new cljs.core.Keyword(null,"change","change",-1163046502),((function (visible_QMARK_,vec__36614,camp_id,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36582_SHARP_){
return cljs.core.swap_BANG_.call(null,display,cljs.core.assoc_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.deref.call(null,camp_id),new cljs.core.Keyword(null,"color","color",1011675173)], null),p1__36582_SHARP_);
});})(visible_QMARK_,vec__36614,camp_id,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
)));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
], null),col.call(null,"Callsign",new cljs.core.Keyword(null,"callsign","callsign",1222385874),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (_,flight){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(flight);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"combatant","combatant",2138865651)], null),"Who"),new cljs.core.Keyword(null,"sort-key","sort-key",1285844623),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36583_SHARP_){
return weathergen.falcon.files.mission.team_name.call(null,cljs.core.deref.call(null,mission),new cljs.core.Keyword(null,"owner","owner",-392611939).cljs$core$IFn$_invoke$arity$1(p1__36583_SHARP_));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (p1__36584_SHARP_){
var team = javelin.core.formula.call(null,((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36620){
return new cljs.core.Keyword(null,"owner","owner",-392611939).cljs$core$IFn$_invoke$arity$1(G__36620);
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,p1__36584_SHARP_);
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (team,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36622,G__36621){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"color","color",1011675173),G__36621.call(null,G__36622,new cljs.core.Keyword(null,"dark-text","dark-text",814777253))], null);
});})(team,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,team,weathergen.ui.common.team_color),javelin.core.formula.call(null,((function (team,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36623,G__36624,G__36625){
return G__36623.call(null,G__36624,G__36625);
});})(team,col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,weathergen.falcon.files.mission.team_name,mission,team));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
], null),col.call(null,"Egress",new cljs.core.Keyword(null,"egress","egress",610445366),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (_,flight){
return weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"mission-over-time","mission-over-time",949947865).cljs$core$IFn$_invoke$arity$1(flight));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),weathergen.help.with_help.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"info","info",-317069002)], null),"Info"),new cljs.core.Keyword(null,"disable-sort","disable-sort",-579071276),true,new cljs.core.Keyword(null,"formatter","formatter",-483008823),weathergen.ui.layers.flights.flight_info_formatter.call(null,new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"mission","mission",1740288522),mission,new cljs.core.Keyword(null,"display","display",242065432),display,new cljs.core.Keyword(null,"detailed-flight","detailed-flight",216212956),detailed_flight,new cljs.core.Keyword(null,"scroll-container","scroll-container",-1938238550),scroll_container,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200),tabbed_flights,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695),checked_flights], null))], null),col.call(null,"TOT",new cljs.core.Keyword(null,"tot","tot",2086174646),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (_,flight){
return weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"time-on-target","time-on-target",-857850216).cljs$core$IFn$_invoke$arity$1(flight));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
),col.call(null,"Squadron",new cljs.core.Keyword(null,"squadron","squadron",-1131671273),((function (col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (mission__$1,flight){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.falcon.files.mission","squadron","weathergen.falcon.files.mission/squadron",463902337).cljs$core$IFn$_invoke$arity$1(flight));
});})(col,detailed_flight,G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
)]);
})());
})()));
});})(G__36592,G__36593,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
,null));
var tpl__30305__auto__ = ((function (G__36592,G__36593,G__36594,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36589,G__36590,G__36591){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(G__36589)?G__36592:(cljs.core.truth_(G__36590)?G__36593:(cljs.core.truth_(G__36591)?G__36594:null)));
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(G__36592,G__36593,G__36594,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
;
return javelin.core.formula.call(null,tpl__30305__auto__).call(null,javelin.core.formula.call(null,((function (G__36592,G__36593,G__36594,tpl__30305__auto__,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36627,G__36626){
return G__36626.call(null,G__36627);
});})(G__36592,G__36593,G__36594,tpl__30305__auto__,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,mission,cljs.core.not),javelin.core.formula.call(null,((function (G__36592,G__36593,G__36594,tpl__30305__auto__,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights){
return (function (G__36628,G__36629){
return (G__36628.call(null,G__36629) === (0));
});})(G__36592,G__36593,G__36594,tpl__30305__auto__,map__36587,map__36587__$1,state,checked_flights,mission,scroll_container,tabbed_flights,highlighted_flight,selected_teams,display,visible_teams,all_flights))
).call(null,cljs.core.count,all_flights),new cljs.core.Keyword(null,"else","else",-1508377146));
});
/**
 * Given a BMS waypoint, return an x/y map of its weatherspace coordinates.
 */
weathergen.ui.layers.flights.waypoint_grid_coords = (function weathergen$ui$layers$flights$waypoint_grid_coords(mission,waypoint){
return weathergen.coordinates.fgrid__GT_weather.call(null,mission,new cljs.core.Keyword(null,"grid-x","grid-x",1935903622).cljs$core$IFn$_invoke$arity$1(waypoint),new cljs.core.Keyword(null,"grid-y","grid-y",1140315474).cljs$core$IFn$_invoke$arity$1(waypoint));
});
/**
 * Given a sequence of BMS waypoints, return an SVG path that follows them.
 */
weathergen.ui.layers.flights.waypoints__GT_path = (function weathergen$ui$layers$flights$waypoints__GT_path(mission,waypoints){
var G__36634 = waypoints;
var G__36634__$1 = (((G__36634 == null))?null:weathergen.util.take_until.call(null,((function (G__36634){
return (function (p1__36631_SHARP_){
return weathergen.util.has_flag_QMARK_.call(null,new cljs.core.Keyword(null,"flags","flags",1775418075).cljs$core$IFn$_invoke$arity$1(p1__36631_SHARP_),weathergen.falcon.constants.WPF_LAND);
});})(G__36634))
,G__36634));
var G__36634__$2 = (((G__36634__$1 == null))?null:cljs.core.mapv.call(null,((function (G__36634,G__36634__$1){
return (function (p1__36632_SHARP_){
return weathergen.ui.layers.flights.waypoint_grid_coords.call(null,mission,p1__36632_SHARP_);
});})(G__36634,G__36634__$1))
,G__36634__$1));
var G__36634__$3 = (((G__36634__$2 == null))?null:cljs.core.mapv.call(null,((function (G__36634,G__36634__$1,G__36634__$2){
return (function (p1__36633_SHARP_){
return goog.string.format("%f,%f",new cljs.core.Keyword(null,"x","x",2099068185).cljs$core$IFn$_invoke$arity$1(p1__36633_SHARP_),new cljs.core.Keyword(null,"y","y",-1757859776).cljs$core$IFn$_invoke$arity$1(p1__36633_SHARP_));
});})(G__36634,G__36634__$1,G__36634__$2))
,G__36634__$2));
var G__36634__$4 = (((G__36634__$3 == null))?null:cljs.core.interpose.call(null," L",G__36634__$3));
if((G__36634__$4 == null)){
return null;
} else {
return cljs.core.apply.call(null,cljs.core.str,"M",G__36634__$4);
}
});
weathergen.ui.layers.flights.flight_path_overlay = (function weathergen$ui$layers$flights$flight_path_overlay(flight,p__36635){
var map__36636 = p__36635;
var map__36636__$1 = (((((!((map__36636 == null))))?(((((map__36636.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36636.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36636):map__36636);
var checked_flights = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var display = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"display","display",242065432));
var highlighted_flight = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813));
var mission = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var map_zoom = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"map-zoom","map-zoom",1543291337));
var map_text_scale = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"map-text-scale","map-text-scale",1420206123));
var map_flight_path_scale = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"map-flight-path-scale","map-flight-path-scale",866693625));
var map_show_text_background_QMARK_ = cljs.core.get.call(null,map__36636__$1,new cljs.core.Keyword(null,"map-show-text-background?","map-show-text-background?",409410295));
var camp_id = javelin.core.formula.call(null,((function (map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36638){
return new cljs.core.Keyword(null,"camp-id","camp-id",618705690).cljs$core$IFn$_invoke$arity$1(G__36638);
});})(map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,flight);
var highlighted_QMARK_ = javelin.core.formula.call(null,((function (camp_id,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (flight__$1,highlighted_flight__$1){
return cljs.core._EQ_.call(null,flight__$1,highlighted_flight__$1);
});})(camp_id,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,flight,highlighted_flight);
var color = javelin.core.formula.call(null,((function (camp_id,highlighted_QMARK_,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (mission__$1,flight__$1,camp_id__$1,display__$1,highlighted_QMARK___$1,mission_category_colors){
return cljs.core.get_in.call(null,display__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [camp_id__$1,new cljs.core.Keyword(null,"color","color",1011675173)], null),weathergen.ui.layers.flights.flight_mission_color.call(null,mission__$1,flight__$1,mission_category_colors));
});})(camp_id,highlighted_QMARK_,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,mission,flight,camp_id,display,highlighted_QMARK_,weathergen.ui.layers.flights.mission_category_colors);
var opacity = (1);
var label_stroke_width = 0.01;
var narrow_stroke_width = 0.1;
var lines_stroke_dasharray_on = 0.1;
var lines_stroke_dasharray_off = 0.1;
var wide_stroke_width = 0.15;
var font_size = (4);
var font_weight = (400);
var marker_size = 0.4;
var background_opacity = 0.4;
var compute_strokes = ((function (camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (color__$1){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"width","width",-384071477),wide_stroke_width,new cljs.core.Keyword(null,"color","color",1011675173),weathergen.ui.common.contrasting.call(null,color__$1)], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"width","width",-384071477),narrow_stroke_width,new cljs.core.Keyword(null,"color","color",1011675173),color__$1], null)], null);
});})(camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
var magnify = ((function (camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (scale){
return ((1) + (1.5 * scale));
});})(camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"flight","flight",-764860679),javelin.core.formula.call(null,((function (camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36639){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__36639);
});})(camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,flight),(function (){var vec__36642 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__36645){
var map__36646 = p__36645;
var map__36646__$1 = (((((!((map__36646 == null))))?(((((map__36646.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36646.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36646):map__36646);
var waypoints = cljs.core.get.call(null,map__36646__$1,new cljs.core.Keyword(null,"waypoints","waypoints",-844253224));
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [waypoints], null);
});})(camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,flight));
var waypoints = cljs.core.nth.call(null,vec__36642,(0),null);
var magnification = javelin.core.formula.call(null,((function (vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36648,G__36649){
return (G__36648 * (cljs.core.truth_(G__36649)?1.4:1.2));
});})(vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,map_flight_path_scale,highlighted_QMARK_);
var strokes = javelin.core.formula.call(null,((function (magnification,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36651,G__36650){
return G__36650.call(null,G__36651);
});})(magnification,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,color,compute_strokes);
var anticolor = javelin.core.formula.call(null,((function (magnification,strokes,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36653,G__36652){
return G__36652.call(null,G__36653);
});})(magnification,strokes,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,color,weathergen.ui.common.contrasting);
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint markers and lines",new cljs.core.Keyword("svg","class","svg/class",-2030780416),javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (highlighted_QMARK___$1){
if(cljs.core.truth_(highlighted_QMARK___$1)){
return weathergen.ui.common.pulse_class;
} else {
return null;
}
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,highlighted_QMARK_),hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint lines",hoplon.core.loop_tpl_STAR_.call(null,strokes,((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (item__30277__auto__){
var vec__36654 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (stroke){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [stroke], null);
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,item__30277__auto__));
var stroke = cljs.core.nth.call(null,vec__36654,(0),null);
var vec__36659 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36654,stroke,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__36662){
var map__36663 = p__36662;
var map__36663__$1 = (((((!((map__36663 == null))))?(((((map__36663.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36663.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36663):map__36663);
var width = cljs.core.get.call(null,map__36663__$1,new cljs.core.Keyword(null,"width","width",-384071477));
var color__$1 = cljs.core.get.call(null,map__36663__$1,new cljs.core.Keyword(null,"color","color",1011675173));
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [color__$1,width], null);
});})(vec__36654,stroke,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,stroke));
var color__$1 = cljs.core.nth.call(null,vec__36659,(0),null);
var width = cljs.core.nth.call(null,vec__36659,(1),null);
return hoplon.svg.path.call(null,new cljs.core.Keyword(null,"stroke","stroke",1741823555),color__$1,new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),javelin.core.formula.call(null,((function (vec__36659,color__$1,width,vec__36654,stroke,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36667,G__36665,G__36666){
return ((G__36665 * G__36666) / G__36667);
});})(vec__36659,color__$1,width,vec__36654,stroke,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,map_zoom,width,magnification),new cljs.core.Keyword(null,"fill","fill",883462889),"none",new cljs.core.Keyword(null,"pointer-events","pointer-events",-1053858853),"none",new cljs.core.Keyword(null,"opacity","opacity",397153780),opacity,new cljs.core.Keyword(null,"d","d",1972142424),javelin.core.formula.call(null,((function (vec__36659,color__$1,width,vec__36654,stroke,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (mission__$1,waypoints__$1){
return weathergen.ui.layers.flights.waypoints__GT_path.call(null,mission__$1,waypoints__$1);
});})(vec__36659,color__$1,width,vec__36654,stroke,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,mission,waypoints));
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
)),hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint markers",new cljs.core.Keyword(null,"transform","transform",1381301764),javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (map_zoom__$1){
return weathergen.ui.common.svg_scale.call(null,(1.0 / map_zoom__$1),(1.0 / map_zoom__$1));
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,map_zoom),hoplon.core.loop_tpl_STAR_.call(null,javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36668,G__36669,G__36670){
return G__36668.call(null,G__36669,G__36670);
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,cljs.core.map_indexed,cljs.core.vector,waypoints),((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (item__30277__auto__){
var vec__36671 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (indexed){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [indexed], null);
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,item__30277__auto__));
var indexed = cljs.core.nth.call(null,vec__36671,(0),null);
var vec__36680 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__36683){
var vec__36684 = p__36683;
var ordinal = cljs.core.nth.call(null,vec__36684,(0),null);
var waypoint = cljs.core.nth.call(null,vec__36684,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [ordinal,waypoint], null);
});})(vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,indexed));
var ordinal = cljs.core.nth.call(null,vec__36680,(0),null);
var waypoint = cljs.core.nth.call(null,vec__36680,(1),null);
var vec__36689 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__36692){
var map__36693 = p__36692;
var map__36693__$1 = (((((!((map__36693 == null))))?(((((map__36693.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36693.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36693):map__36693);
var action = cljs.core.get.call(null,map__36693__$1,new cljs.core.Keyword(null,"action","action",-811238024));
var grid_x = cljs.core.get.call(null,map__36693__$1,new cljs.core.Keyword(null,"grid-x","grid-x",1935903622));
var grid_y = cljs.core.get.call(null,map__36693__$1,new cljs.core.Keyword(null,"grid-y","grid-y",1140315474));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [grid_x,grid_y,action], null);
});})(vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,waypoint));
var grid_x = cljs.core.nth.call(null,vec__36689,(0),null);
var grid_y = cljs.core.nth.call(null,vec__36689,(1),null);
var action = cljs.core.nth.call(null,vec__36689,(2),null);
var vec__36697 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__36700){
var map__36701 = p__36700;
var map__36701__$1 = (((((!((map__36701 == null))))?(((((map__36701.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36701.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36701):map__36701);
var x = cljs.core.get.call(null,map__36701__$1,new cljs.core.Keyword(null,"x","x",2099068185));
var y = cljs.core.get.call(null,map__36701__$1,new cljs.core.Keyword(null,"y","y",-1757859776));
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null);
});})(vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,javelin.core.formula.call(null,((function (vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36705,G__36703,G__36704,G__36706){
return G__36703.call(null,G__36704,G__36705,G__36706);
});})(vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,grid_x,weathergen.coordinates.fgrid__GT_weather,mission,grid_y)));
var x = cljs.core.nth.call(null,vec__36697,(0),null);
var y = cljs.core.nth.call(null,vec__36697,(1),null);
var style = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"pointer-events","pointer-events",-1053858853),"none",new cljs.core.Keyword(null,"fill","fill",883462889),"none",new cljs.core.Keyword(null,"opacity","opacity",397153780),opacity], null);
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint markers",new cljs.core.Keyword(null,"transform","transform",1381301764),javelin.core.formula.call(null,((function (style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (x__$1,y__$1,map_zoom__$1){
return weathergen.ui.common.svg_translate.call(null,(x__$1 * map_zoom__$1),(y__$1 * map_zoom__$1));
});})(style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,x,y,map_zoom),hoplon.core.loop_tpl_STAR_.call(null,strokes,((function (style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (item__30277__auto____$1){
var vec__36707 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (stroke){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [stroke], null);
});})(style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,item__30277__auto____$1));
var stroke = cljs.core.nth.call(null,vec__36707,(0),null);
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint marker",(function (){var vec__36712 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__36715){
var map__36716 = p__36715;
var map__36716__$1 = (((((!((map__36716 == null))))?(((((map__36716.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36716.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36716):map__36716);
var width = cljs.core.get.call(null,map__36716__$1,new cljs.core.Keyword(null,"width","width",-384071477));
var color__$1 = cljs.core.get.call(null,map__36716__$1,new cljs.core.Keyword(null,"color","color",1011675173));
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [color__$1,width], null);
});})(vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,stroke));
var color__$1 = cljs.core.nth.call(null,vec__36712,(0),null);
var width = cljs.core.nth.call(null,vec__36712,(1),null);
var r = javelin.core.formula.call(null,((function (vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (magnification__$1){
return ((marker_size * magnification__$1) / (2));
});})(vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,magnification);
var style_STAR_ = cljs.core.assoc.call(null,style,new cljs.core.Keyword(null,"opacity","opacity",397153780),opacity,new cljs.core.Keyword(null,"stroke","stroke",1741823555),color__$1,new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),javelin.core.formula.call(null,((function (r,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36718,G__36719){
return ((0.6 * G__36718) * G__36719);
});})(r,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,width,magnification));
var circle_QMARK_ = javelin.core.formula.call(null,((function (r,style_STAR_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (waypoint__$1){
return (!(weathergen.util.has_flag_QMARK_.call(null,new cljs.core.Keyword(null,"flags","flags",1775418075).cljs$core$IFn$_invoke$arity$1(waypoint__$1),weathergen.falcon.constants.WPF_TARGET)));
});})(r,style_STAR_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,waypoint);
var con__30287__auto__ = (new cljs.core.Delay(((function (r,style_STAR_,circle_QMARK_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return hoplon.svg.circle.call(null,style_STAR_,new cljs.core.Keyword(null,"cx","cx",1272694324),(0),new cljs.core.Keyword(null,"cy","cy",755331060),(0),new cljs.core.Keyword(null,"r","r",-471384190),r);
});})(r,style_STAR_,circle_QMARK_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var alt__30288__auto__ = (new cljs.core.Delay(((function (con__30287__auto__,r,style_STAR_,circle_QMARK_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return weathergen.ui.common.triangle.call(null,style_STAR_,new cljs.core.Keyword(null,"r","r",-471384190),r);
});})(con__30287__auto__,r,style_STAR_,circle_QMARK_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var tpl__30289__auto__ = ((function (con__30287__auto__,alt__30288__auto__,r,style_STAR_,circle_QMARK_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__30290__auto__){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(p__30290__auto__)?con__30287__auto__:alt__30288__auto__);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(con__30287__auto__,alt__30288__auto__,r,style_STAR_,circle_QMARK_,vec__36712,color__$1,width,vec__36707,stroke,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
return javelin.core.formula.call(null,tpl__30289__auto__).call(null,circle_QMARK_);
})());
});})(style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
),(function (){var show_labels_QMARK_ = javelin.core.cell.call(null,true);
var show_numbers_QMARK_ = javelin.core.cell.call(null,true);
var txt = javelin.core.formula.call(null,((function (show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (waypoint__$1,action__$1,show_labels_QMARK___$1,show_numbers_QMARK___$1,ordinal__$1){
if(cljs.core.truth_((function (){var and__4120__auto__ = show_labels_QMARK___$1;
if(cljs.core.truth_(and__4120__auto__)){
return weathergen.util.has_flag_QMARK_.call(null,new cljs.core.Keyword(null,"flags","flags",1775418075).cljs$core$IFn$_invoke$arity$1(waypoint__$1),weathergen.falcon.constants.WPF_ALTERNATE);
} else {
return and__4120__auto__;
}
})())){
return "Alternate Field";
} else {
if(cljs.core.truth_((function (){var and__4120__auto__ = show_labels_QMARK___$1;
if(cljs.core.truth_(and__4120__auto__)){
return cljs.core._EQ_.call(null,action__$1,weathergen.falcon.constants.WP_REFUEL);
} else {
return and__4120__auto__;
}
})())){
if(cljs.core.truth_(show_labels_QMARK___$1)){
return "Tanker";
} else {
return null;
}
} else {
if(cljs.core.truth_(show_numbers_QMARK___$1)){
return (ordinal__$1 + (1));
} else {
return null;
}

}
}
});})(show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,waypoint,action,show_labels_QMARK_,show_numbers_QMARK_,ordinal);
var bbox_trigger = javelin.core.formula.call(null,((function (txt,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (txt__$1,magnification__$1){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [txt__$1,magnification__$1], null);
});})(txt,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,txt,magnification);
var tx = javelin.core.cell.call(null,(0));
var ty = javelin.core.cell.call(null,(0));
var tw = javelin.core.cell.call(null,(0));
var th = javelin.core.cell.call(null,(0));
var t = hoplon.svg.text.call(null,new cljs.core.Keyword(null,"stroke","stroke",1741823555),color,new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),javelin.core.formula.call(null,((function (tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36720,G__36721){
return (G__36720 * G__36721);
});})(tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,label_stroke_width,magnification),new cljs.core.Keyword(null,"fill","fill",883462889),color,new cljs.core.Keyword(null,"font-size","font-size",-1847940346),javelin.core.formula.call(null,((function (tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36722,G__36723){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1((G__36722 * G__36723)),"%"].join('');
});})(tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,font_size,magnification),new cljs.core.Keyword(null,"text-anchor","text-anchor",585613696),"middle",new cljs.core.Keyword(null,"opacity","opacity",397153780),opacity,new cljs.core.Keyword(null,"x","x",2099068185),(0),new cljs.core.Keyword(null,"y","y",-1757859776),javelin.core.formula.call(null,((function (tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36724,G__36725){
return (- (G__36724 * G__36725));
});})(tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,marker_size,magnification),txt);
var update_bbox__15859__auto__ = ((function (tx,ty,tw,th,t,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return javelin.core.dosync_STAR_.call(null,((function (tx,ty,tw,th,t,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
var bb__15860__auto__ = t.getBBox();
if(cljs.core.truth_(bb__15860__auto__.x)){
cljs.core.reset_BANG_.call(null,tx,bb__15860__auto__.x);

cljs.core.reset_BANG_.call(null,ty,bb__15860__auto__.y);

cljs.core.reset_BANG_.call(null,tw,bb__15860__auto__.width);

return cljs.core.reset_BANG_.call(null,th,bb__15860__auto__.height);
} else {
return null;
}
});})(tx,ty,tw,th,t,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
);
});})(tx,ty,tw,th,t,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
setTimeout(((function (tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return update_bbox__15859__auto__.call(null);
});})(tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,(0));

var temp__5720__auto___36730 = bbox_trigger;
if(cljs.core.truth_(temp__5720__auto___36730)){
var w__15861__auto___36731 = temp__5720__auto___36730;
cljs.core.add_watch.call(null,w__15861__auto___36731,cljs.core.keyword.call(null,cljs.core.gensym.call(null)),((function (w__15861__auto___36731,temp__5720__auto___36730,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (_,___$1,___$2,___$3){
return setTimeout(((function (w__15861__auto___36731,temp__5720__auto___36730,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return update_bbox__15859__auto__.call(null);
});})(w__15861__auto___36731,temp__5720__auto___36730,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,(0));
});})(w__15861__auto___36731,temp__5720__auto___36730,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
);
} else {
}

var con__30287__auto__ = (new cljs.core.Delay(((function (tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint label",new cljs.core.Keyword(null,"transform","transform",1381301764),javelin.core.formula.call(null,((function (tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36728,G__36726,G__36727){
return G__36726.call(null,(G__36727 / G__36728));
});})(tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,map_flight_path_scale,weathergen.ui.common.svg_scale,map_text_scale),(function (){var con__30287__auto__ = (new cljs.core.Delay(((function (tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return hoplon.svg.rect.call(null,new cljs.core.Keyword(null,"x","x",2099068185),tx,new cljs.core.Keyword(null,"y","y",-1757859776),ty,new cljs.core.Keyword(null,"width","width",-384071477),tw,new cljs.core.Keyword(null,"height","height",1025178622),th,new cljs.core.Keyword(null,"fill","fill",883462889),anticolor,new cljs.core.Keyword(null,"opacity","opacity",397153780),background_opacity);
});})(tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var alt__30288__auto__ = (new cljs.core.Delay(((function (con__30287__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return null;
});})(con__30287__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var tpl__30289__auto__ = ((function (con__30287__auto__,alt__30288__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__30290__auto__){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(p__30290__auto__)?con__30287__auto__:alt__30288__auto__);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(con__30287__auto__,alt__30288__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
return javelin.core.formula.call(null,tpl__30289__auto__).call(null,map_show_text_background_QMARK_);
})(),t);
});})(tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var alt__30288__auto__ = (new cljs.core.Delay(((function (con__30287__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (){
return null;
});})(con__30287__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var tpl__30289__auto__ = ((function (con__30287__auto__,alt__30288__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__30290__auto__){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(p__30290__auto__)?con__30287__auto__:alt__30288__auto__);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(con__30287__auto__,alt__30288__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
return javelin.core.formula.call(null,tpl__30289__auto__).call(null,javelin.core.formula.call(null,((function (con__30287__auto__,alt__30288__auto__,tpl__30289__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__36729){
return cljs.core.not.call(null,(G__36729 == null));
});})(con__30287__auto__,alt__30288__auto__,tpl__30289__auto__,tx,ty,tw,th,t,update_bbox__15859__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__36697,x,y,vec__36689,grid_x,grid_y,action,vec__36680,ordinal,waypoint,vec__36671,indexed,magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,txt));
})());
});})(magnification,strokes,anticolor,vec__36642,waypoints,camp_id,highlighted_QMARK_,color,opacity,label_stroke_width,narrow_stroke_width,lines_stroke_dasharray_on,lines_stroke_dasharray_off,wide_stroke_width,font_size,font_weight,marker_size,background_opacity,compute_strokes,magnify,map__36636,map__36636__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
)));
})());
});
weathergen.ui.layers.flights.overlay = (function weathergen$ui$layers$flights$overlay(p__36733){
var map__36734 = p__36733;
var map__36734__$1 = (((((!((map__36734 == null))))?(((((map__36734.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36734.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36734):map__36734);
var state = map__36734__$1;
var checked_flights = cljs.core.get.call(null,map__36734__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var highlighted_flight = cljs.core.get.call(null,map__36734__$1,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813));
var mission = cljs.core.get.call(null,map__36734__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var selected_teams = cljs.core.get.call(null,map__36734__$1,new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671));
var displayed_flights = javelin.core.formula.call(null,((function (map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (checked_flights__$1,highlighted_flight__$1,mission__$1,selected_teams__$1){
return cljs.core.set.call(null,cljs.core.filter.call(null,((function (map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (p1__36732_SHARP_){
return selected_teams__$1.call(null,new cljs.core.Keyword(null,"owner","owner",-392611939).cljs$core$IFn$_invoke$arity$1(p1__36732_SHARP_));
});})(map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
,checked_flights__$1));
});})(map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
).call(null,checked_flights,highlighted_flight,mission,selected_teams);
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"section","section",-300141526),"flights-overlay",hoplon.svg.g.call(null,new cljs.core.Keyword(null,"section","section",-300141526),"checked-flight-paths",hoplon.core.loop_tpl_STAR_.call(null,javelin.core.formula.call(null,((function (displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (G__36736,G__36737,G__36738){
return G__36736.call(null,G__36737,G__36738);
});})(displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
).call(null,cljs.core.disj,displayed_flights,highlighted_flight),((function (displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (item__30277__auto__){
var vec__36739 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (flight){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [flight], null);
});})(displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
).call(null,item__30277__auto__));
var flight = cljs.core.nth.call(null,vec__36739,(0),null);
return weathergen.ui.layers.flights.flight_path_overlay.call(null,flight,state);
});})(displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
),(function (){var con__30287__auto__ = (new cljs.core.Delay(((function (displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (){
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"section","section",-300141526),"highlighted-flight-path",weathergen.ui.layers.flights.flight_path_overlay.call(null,highlighted_flight,state));
});})(displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
,null));
var alt__30288__auto__ = (new cljs.core.Delay(((function (con__30287__auto__,displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (){
return null;
});})(con__30287__auto__,displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
,null));
var tpl__30289__auto__ = ((function (con__30287__auto__,alt__30288__auto__,displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (p__30290__auto__){
return cljs.core.deref.call(null,(function (){var or__4131__auto__ = (cljs.core.truth_(p__30290__auto__)?con__30287__auto__:alt__30288__auto__);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return cljs.core.atom.call(null,null);
}
})());
});})(con__30287__auto__,alt__30288__auto__,displayed_flights,map__36734,map__36734__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
;
return javelin.core.formula.call(null,tpl__30289__auto__).call(null,highlighted_flight);
})()));
});
weathergen.ui.layers.flights.create = (function weathergen$ui$layers$flights$create(mission,p__36743){
var map__36744 = p__36743;
var map__36744__$1 = (((((!((map__36744 == null))))?(((((map__36744.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36744.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36744):map__36744);
var opts = map__36744__$1;
var map_zoom = cljs.core.get.call(null,map__36744__$1,new cljs.core.Keyword(null,"map-zoom","map-zoom",1543291337));
var map_text_scale = cljs.core.get.call(null,map__36744__$1,new cljs.core.Keyword(null,"map-text-scale","map-text-scale",1420206123));
var visible_teams = cljs.core.get.call(null,map__36744__$1,new cljs.core.Keyword(null,"visible-teams","visible-teams",-110455752));
var map_flight_path_size = javelin.core.cell.call(null,(0));
var map_flight_path_scale = javelin.core.formula.call(null,((function (map_flight_path_size,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__36747,G__36746){
return G__36746.call(null,4.0,G__36747);
});})(map_flight_path_size,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,map_flight_path_size,Math.pow);
var tabbed_flights = javelin.core.cell.call(null,cljs.core.PersistentArrayMap.EMPTY);
var checked_flights = javelin.core.cell.call(null,cljs.core.PersistentHashSet.EMPTY);
var highlighted_flight = javelin.core.cell.call(null,null);
var display = javelin.core.cell.call(null,cljs.core.PersistentArrayMap.EMPTY);
var state = cljs.core.merge.call(null,opts,cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"map-flight-path-size","map-flight-path-size",-1349075868),new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695),new cljs.core.Keyword(null,"mission","mission",1740288522),new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200),new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813),new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671),new cljs.core.Keyword(null,"display","display",242065432),new cljs.core.Keyword(null,"all-flights","all-flights",253678712),new cljs.core.Keyword(null,"map-flight-path-scale","map-flight-path-scale",866693625)],[map_flight_path_size,checked_flights,mission,tabbed_flights,highlighted_flight,javelin.core.cell.call(null,cljs.core.PersistentHashSet.EMPTY),display,javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__36748){
return new cljs.core.Keyword("weathergen.falcon.files.mission","flights","weathergen.falcon.files.mission/flights",-1943609790).cljs$core$IFn$_invoke$arity$1(G__36748);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,mission),map_flight_path_scale]));
var watchable = javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (mission__$1,visible_teams__$1){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [mission__$1,visible_teams__$1], null);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,mission,visible_teams);
hoplon.core.do_watch.call(null,watchable,new cljs.core.Keyword("weathergen.ui.layers.flights","reset-on-mission-change","weathergen.ui.layers.flights/reset-on-mission-change",496588105),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (_,p__36749){
var vec__36750 = p__36749;
var mission__$1 = cljs.core.nth.call(null,vec__36750,(0),null);
var visible_teams__$1 = cljs.core.nth.call(null,vec__36750,(1),null);
var timer_name__15816__auto__ = "updating flights section";
var ignore__15817__auto__ = console.time(timer_name__15816__auto__);
var result__15818__auto__ = javelin.core.dosync_STAR_.call(null,((function (timer_name__15816__auto__,ignore__15817__auto__,vec__36750,mission__$1,visible_teams__$1,map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (){
cljs.core.reset_BANG_.call(null,new cljs.core.Keyword(null,"display","display",242065432).cljs$core$IFn$_invoke$arity$1(state),cljs.core.PersistentArrayMap.EMPTY);

cljs.core.reset_BANG_.call(null,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813).cljs$core$IFn$_invoke$arity$1(state),null);

cljs.core.reset_BANG_.call(null,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695).cljs$core$IFn$_invoke$arity$1(state),cljs.core.PersistentHashSet.EMPTY);

return cljs.core.reset_BANG_.call(null,new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671).cljs$core$IFn$_invoke$arity$1(state),(function (){var last_allied = cljs.core.set.call(null,weathergen.falcon.files.mission.teams_for_side.call(null,mission__$1,weathergen.falcon.files.mission.side.call(null,mission__$1,weathergen.falcon.files.mission.last_player_team.call(null,mission__$1))));
if(cljs.core.empty_QMARK_.call(null,clojure.set.intersection.call(null,last_allied,visible_teams__$1))){
return visible_teams__$1;
} else {
return last_allied;
}
})());
});})(timer_name__15816__auto__,ignore__15817__auto__,vec__36750,mission__$1,visible_teams__$1,map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
);
console.timeEnd(timer_name__15816__auto__);

return result__15818__auto__;
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
);

return cljs.core.assoc.call(null,state,new cljs.core.Keyword(null,"controls-fn","controls-fn",-807620277),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (scroll_container){
return weathergen.ui.layers.flights.controls.call(null,cljs.core.assoc.call(null,state,new cljs.core.Keyword(null,"scroll-container","scroll-container",-1938238550),scroll_container));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"map-display-controls-fn","map-display-controls-fn",1472969543),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (p1__36742_SHARP_){
return weathergen.ui.layers.flights.flight_path_display_controls.call(null,p1__36742_SHARP_,state);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"overlay-fn","overlay-fn",1005125217),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (){
return weathergen.ui.layers.flights.overlay.call(null,state);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"tab-body-fn","tab-body-fn",-2145852517),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (data){
return weathergen.ui.layers.flights.flight_details.call(null,new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"mission","mission",1740288522),mission,new cljs.core.Keyword(null,"flight","flight",-764860679),javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__36753){
return new cljs.core.Keyword("weathergen.ui.layers.flights","flight","weathergen.ui.layers.flights/flight",-2019099686).cljs$core$IFn$_invoke$arity$1(G__36753);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,data),new cljs.core.Keyword(null,"display","display",242065432),display,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200),tabbed_flights,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695),checked_flights], null));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"tab-title-fn","tab-title-fn",-242851006),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (data,selected_QMARK_){
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"mouseenter","mouseenter",-1792413560),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (){
return cljs.core.reset_BANG_.call(null,highlighted_flight,new cljs.core.Keyword("weathergen.ui.layers.flights","flight","weathergen.ui.layers.flights/flight",-2019099686).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,data)));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"mouseleave","mouseleave",531566580),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (){
return cljs.core.reset_BANG_.call(null,highlighted_flight,null);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,weathergen.ui.common.centered_image.call(null,mission,javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__36754){
return new cljs.core.Keyword("weathergen.falcon.files.mission","squadron-image","weathergen.falcon.files.mission/squadron-image",-423118152).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword("weathergen.ui.layers.flights","flight","weathergen.ui.layers.flights/flight",-2019099686).cljs$core$IFn$_invoke$arity$1(G__36754));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,data),(19)),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (mission__$1,data__$1,mission_category_colors,display__$1,selected_QMARK___$1){
var flight = new cljs.core.Keyword("weathergen.ui.layers.flights","flight","weathergen.ui.layers.flights/flight",-2019099686).cljs$core$IFn$_invoke$arity$1(data__$1);
var color = (function (){var temp__5718__auto__ = cljs.core.get_in.call(null,display__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"camp-id","camp-id",618705690).cljs$core$IFn$_invoke$arity$1(flight),new cljs.core.Keyword(null,"color","color",1011675173)], null));
if(cljs.core.truth_(temp__5718__auto__)){
var c = temp__5718__auto__;
return c;
} else {
return weathergen.ui.layers.flights.flight_mission_color.call(null,mission__$1,flight,mission_category_colors);
}
})();
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"background","background",-863952629),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,"height","height",1025178622)],["solid","middle",weathergen.ui.common.px.call(null,(5)),weathergen.ui.common.px.call(null,(13)),color,weathergen.ui.common.px.call(null,(1)),(cljs.core.truth_(selected_QMARK___$1)?"white":"black"),"inline-block",weathergen.ui.common.px.call(null,(14))]);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,mission,data,weathergen.ui.layers.flights.mission_category_colors,display,selected_QMARK_)," "),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle",new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),weathergen.ui.common.px.call(null,(5))], null),javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__36755){
return new cljs.core.Keyword(null,"title","title",636505583).cljs$core$IFn$_invoke$arity$1(G__36755);
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,data)),hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"color","color",1011675173),"red",new cljs.core.Keyword(null,"float","float",-1732389368),"right",new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),"5px",new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"font-size","font-size",-1847940346),weathergen.ui.common.pct.call(null,(90))], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (_){
cljs.core.reset_BANG_.call(null,highlighted_flight,null);

return cljs.core.swap_BANG_.call(null,tabbed_flights,cljs.core.dissoc,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,data)));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,"X"));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"tabs","tabs",-779855354),javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (tabbed_flights__$1){
return cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"title","title",636505583),(function (){var iter__4523__auto__ = ((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function weathergen$ui$layers$flights$create_$_iter__36756(s__36757){
return (new cljs.core.LazySeq(null,((function (map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (){
var s__36757__$1 = s__36757;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36757__$1);
if(temp__5720__auto__){
var s__36757__$2 = temp__5720__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36757__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36757__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36759 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36758 = (0);
while(true){
if((i__36758 < size__4522__auto__)){
var vec__36760 = cljs.core._nth.call(null,c__4521__auto__,i__36758);
var id = cljs.core.nth.call(null,vec__36760,(0),null);
var flight = cljs.core.nth.call(null,vec__36760,(1),null);
cljs.core.chunk_append.call(null,b__36759,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",-1388402092),id,new cljs.core.Keyword(null,"title","title",636505583),new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(flight),new cljs.core.Keyword("weathergen.ui.layers.flights","flight","weathergen.ui.layers.flights/flight",-2019099686),flight], null));

var G__36766 = (i__36758 + (1));
i__36758 = G__36766;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36759),weathergen$ui$layers$flights$create_$_iter__36756.call(null,cljs.core.chunk_rest.call(null,s__36757__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36759),null);
}
} else {
var vec__36763 = cljs.core.first.call(null,s__36757__$2);
var id = cljs.core.nth.call(null,vec__36763,(0),null);
var flight = cljs.core.nth.call(null,vec__36763,(1),null);
return cljs.core.cons.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",-1388402092),id,new cljs.core.Keyword(null,"title","title",636505583),new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(flight),new cljs.core.Keyword("weathergen.ui.layers.flights","flight","weathergen.ui.layers.flights/flight",-2019099686),flight], null),weathergen$ui$layers$flights$create_$_iter__36756.call(null,cljs.core.rest.call(null,s__36757__$2)));
}
} else {
return null;
}
break;
}
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
,null,null));
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
;
return iter__4523__auto__.call(null,tabbed_flights__$1);
})());
});})(map_flight_path_size,map_flight_path_scale,tabbed_flights,checked_flights,highlighted_flight,display,state,watchable,map__36744,map__36744__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,tabbed_flights));
});
/**
 * Returns data for saving in a briefing file.
 */
weathergen.ui.layers.flights.briefing_data = (function weathergen$ui$layers$flights$briefing_data(layer){
var map__36767 = layer;
var map__36767__$1 = (((((!((map__36767 == null))))?(((((map__36767.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36767.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36767):map__36767);
var display = cljs.core.get.call(null,map__36767__$1,new cljs.core.Keyword(null,"display","display",242065432));
var tabbed_flights = cljs.core.get.call(null,map__36767__$1,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200));
var checked_flights = cljs.core.get.call(null,map__36767__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"display","display",242065432),cljs.core.deref.call(null,display),new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200),cljs.core.set.call(null,cljs.core.keys.call(null,cljs.core.deref.call(null,tabbed_flights))),new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695),cljs.core.set.call(null,cljs.core.map.call(null,new cljs.core.Keyword(null,"id","id",-1388402092),cljs.core.deref.call(null,checked_flights)))], null);
});
/**
 * Given briefing data, update the layer with the state from it.
 */
weathergen.ui.layers.flights.load_briefing_data = (function weathergen$ui$layers$flights$load_briefing_data(layer,data){
var map__36771 = layer;
var map__36771__$1 = (((((!((map__36771 == null))))?(((((map__36771.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36771.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36771):map__36771);
var display = cljs.core.get.call(null,map__36771__$1,new cljs.core.Keyword(null,"display","display",242065432));
var tabbed_flights = cljs.core.get.call(null,map__36771__$1,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200));
var checked_flights = cljs.core.get.call(null,map__36771__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var mission = cljs.core.get.call(null,map__36771__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
return javelin.core.dosync_STAR_.call(null,((function (map__36771,map__36771__$1,display,tabbed_flights,checked_flights,mission){
return (function (){
console.log("Using data",cljs.core.pr_str.call(null,cljs.core.select_keys.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"display","display",242065432),new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200),new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695)], null))));

cljs.core.reset_BANG_.call(null,display,new cljs.core.Keyword(null,"display","display",242065432).cljs$core$IFn$_invoke$arity$1(data));

cljs.core.reset_BANG_.call(null,tabbed_flights,(function (){var flights = cljs.core.filter.call(null,((function (map__36771,map__36771__$1,display,tabbed_flights,checked_flights,mission){
return (function (p1__36769_SHARP_){
return cljs.core.contains_QMARK_.call(null,new cljs.core.Keyword(null,"tabbed-flights","tabbed-flights",432685200).cljs$core$IFn$_invoke$arity$1(data),new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(p1__36769_SHARP_));
});})(map__36771,map__36771__$1,display,tabbed_flights,checked_flights,mission))
,new cljs.core.Keyword("weathergen.falcon.files.mission","flights","weathergen.falcon.files.mission/flights",-1943609790).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,mission)));
return cljs.core.zipmap.call(null,cljs.core.map.call(null,new cljs.core.Keyword(null,"id","id",-1388402092),flights),flights);
})());

return cljs.core.reset_BANG_.call(null,checked_flights,cljs.core.set.call(null,cljs.core.filter.call(null,((function (map__36771,map__36771__$1,display,tabbed_flights,checked_flights,mission){
return (function (p1__36770_SHARP_){
return cljs.core.contains_QMARK_.call(null,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695).cljs$core$IFn$_invoke$arity$1(data),new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(p1__36770_SHARP_));
});})(map__36771,map__36771__$1,display,tabbed_flights,checked_flights,mission))
,new cljs.core.Keyword("weathergen.falcon.files.mission","flights","weathergen.falcon.files.mission/flights",-1943609790).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,mission)))));
});})(map__36771,map__36771__$1,display,tabbed_flights,checked_flights,mission))
);
});
