// Compiled by ClojureScript 1.9.562 {}
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.svg');
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');
goog.require('javelin.core');
goog.require('hoplon.jquery');
goog.require('hoplon.core');
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__38921 = new cljs.core.Keyword("weathergen.falcon.files.mission","aircraft","weathergen.falcon.files.mission/aircraft",774567258).cljs$core$IFn$_invoke$arity$1(flight);
var map__38921__$1 = ((((!((map__38921 == null)))?((((map__38921.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38921.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38921):map__38921);
var quantity = cljs.core.get.call(null,map__38921__$1,new cljs.core.Keyword(null,"quantity","quantity",-1929050694));
var airframe = cljs.core.get.call(null,map__38921__$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(" "),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(flight){
var col = (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__38986 = opts;
var map__38986__$1 = ((((!((map__38986 == null)))?((((map__38986.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38986.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38986):map__38986);
var align = cljs.core.get.call(null,map__38986__$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__38986,map__38986__$1,align){
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__38986,map__38986__$1,align){
return (function (waypoint__$1){
return f.call(null,waypoint__$1);
});})(map__38986,map__38986__$1,align))
).call(null,waypoint));
});})(map__38986,map__38986__$1,align))
], 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 - 1)));
};
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;
})()
;
var bold = ((function (col){
return (function() { 
var G__39035__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__39035 = function (var_args){
var contents = null;
if (arguments.length > 0) {
var G__39036__i = 0, G__39036__a = new Array(arguments.length -  0);
while (G__39036__i < G__39036__a.length) {G__39036__a[G__39036__i] = arguments[G__39036__i + 0]; ++G__39036__i;}
  contents = new cljs.core.IndexedSeq(G__39036__a,0,null);
} 
return G__39035__delegate.call(this,contents);};
G__39035.cljs$lang$maxFixedArity = 0;
G__39035.cljs$lang$applyTo = (function (arglist__39037){
var contents = cljs.core.seq(arglist__39037);
return G__39035__delegate(contents);
});
G__39035.cljs$core$IFn$_invoke$arity$variadic = G__39035__delegate;
return G__39035;
})()
;})(col))
;
return hoplon.core.div.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),javelin.core.formula.call(null,((function (col,bold){
return (function (G__38988){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__38988);
});})(col,bold))
).call(null,flight)),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){
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))
).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){
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))
).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){
return (function (flight__$1){
return weathergen.ui.layers.flights.flight_aircraft.call(null,flight__$1);
});})(col,bold))
).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"),weathergen.ui.grids.table_grid.call(null,new cljs.core.Keyword(null,"data","data",-232669377),javelin.core.formula.call(null,((function (col,bold){
return (function (G__38989){
return new cljs.core.Keyword("weathergen.falcon.files.mission","waypoints","weathergen.falcon.files.mission/waypoints",712228162).cljs$core$IFn$_invoke$arity$1(G__38989);
});})(col,bold))
).call(null,flight),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){
return (function (p1__38932_SHARP_){
var or__23338__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__38932_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38928_SHARP_){
var or__23338__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__38928_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38924_SHARP_){
var or__23338__auto__ = weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"depart","depart",-100007287).cljs$core$IFn$_invoke$arity$1(p1__38924_SHARP_),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"seconds?","seconds?",-1600404958),true], null));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38929_SHARP_){
var or__23338__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__38929_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38930_SHARP_){
var or__23338__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__38930_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38926_SHARP_){
var or__23338__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__38926_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38931_SHARP_){
var or__23338__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__38931_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38923_SHARP_){
var or__23338__auto__ = weathergen.ui.common.format_time.call(null,new cljs.core.Keyword(null,"arrive","arrive",-284644322).cljs$core$IFn$_invoke$arity$1(p1__38923_SHARP_),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"seconds?","seconds?",-1600404958),true], null));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),col.call(null,"Remain",new cljs.core.Keyword(null,"remain","remain",1399477086),((function (col,bold){
return (function (p1__38925_SHARP_){
var or__23338__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__38925_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__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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){
return (function (p1__38927_SHARP_){
var or__23338__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__38927_SHARP_));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return "--";
}
});})(col,bold))
),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__29830__auto__ = (new cljs.core.Delay(((function (col,bold){
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))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,col,bold){
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__29830__auto__,col,bold){
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__29830__auto__,col,bold))
).call(null,flight),((function (con__29830__auto__,col,bold){
return (function (item__29820__auto__){
var vec__38990 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (con__29830__auto__,col,bold){
return (function (indexed){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [indexed], null);
});})(con__29830__auto__,col,bold))
).call(null,item__29820__auto__));
var indexed = cljs.core.nth.call(null,vec__38990,(0),null);
var vec__38999 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__38990,indexed,con__29830__auto__,col,bold){
return (function (p__39002){
var vec__39003 = p__39002;
var index = cljs.core.nth.call(null,vec__39003,(0),null);
var loadout = cljs.core.nth.call(null,vec__39003,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [index,loadout], null);
});})(vec__38990,indexed,con__29830__auto__,col,bold))
).call(null,indexed));
var index = cljs.core.nth.call(null,vec__38999,(0),null);
var loadout = cljs.core.nth.call(null,vec__38999,(1),null);
var vec__39008 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
return (function (p__39011){
var map__39012 = p__39011;
var map__39012__$1 = ((((!((map__39012 == null)))?((((map__39012.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39012.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39012):map__39012);
var quantity = cljs.core.get.call(null,map__39012__$1,new cljs.core.Keyword(null,"quantity","quantity",-1929050694));
var name = cljs.core.get.call(null,map__39012__$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__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
).call(null,loadout));
var quantity = cljs.core.nth.call(null,vec__39008,(0),null);
var name = cljs.core.nth.call(null,vec__39008,(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__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
return (function (G__39014,G__39015){
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__39014)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1((G__39015 + (1)))].join('');
});})(vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
).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__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
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__39016 = cljs.core._EQ_;
var expr__39017 = stats;
if(cljs.core.truth_(pred__39016.call(null,weathergen.falcon.constants.AIRCRAFT_MISSING,expr__39017))){
return " (missing)";
} else {
if(cljs.core.truth_(pred__39016.call(null,weathergen.falcon.constants.AIRCRAFT_DEAD,expr__39017))){
return " (destroyed)";
} else {
return "";
}
}
});})(vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
).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__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
return (function (item__29820__auto____$1){
var vec__39019 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
return (function (weapon){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [weapon], null);
});})(vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
).call(null,item__29820__auto____$1));
var weapon = cljs.core.nth.call(null,vec__39019,(0),null);
var vec__39024 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39019,weapon,vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
return (function (p__39027){
var map__39028 = p__39027;
var map__39028__$1 = ((((!((map__39028 == null)))?((((map__39028.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39028.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39028):map__39028);
var name__$1 = cljs.core.get.call(null,map__39028__$1,new cljs.core.Keyword(null,"name","name",1843675177));
var quantity__$1 = cljs.core.get.call(null,map__39028__$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__39019,weapon,vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
).call(null,weapon));
var quantity__$1 = cljs.core.nth.call(null,vec__39024,(0),null);
var name__$1 = cljs.core.nth.call(null,vec__39024,(1),null);
return hoplon.core.li.call(null,javelin.core.formula.call(null,((function (vec__39024,quantity__$1,name__$1,vec__39019,weapon,vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold){
return (function (G__39030,G__39031){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__39030),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" x "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__39031)].join('');
});})(vec__39024,quantity__$1,name__$1,vec__39019,weapon,vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
).call(null,quantity__$1,name__$1));
});})(vec__39008,quantity,name,vec__38999,index,loadout,vec__38990,indexed,con__29830__auto__,col,bold))
)));
});})(con__29830__auto__,col,bold))
));
});})(con__29830__auto__,col,bold))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,col,bold){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,col,bold))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,javelin.core.formula.call(null,((function (con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,col,bold){
return (function (G__39034,G__39032,G__39033){
return G__39032.call(null,G__39033,new cljs.core.Keyword("weathergen.falcon.files.mission","loadouts","weathergen.falcon.files.mission/loadouts",142269567).cljs$core$IFn$_invoke$arity$1(G__39034));
});})(con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,col,bold))
).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(detailed_flight,scroll_container){
return (function (flight){
var vec__39051 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,(function (p__39054){
var map__39055 = p__39054;
var map__39055__$1 = ((((!((map__39055 == null)))?((((map__39055.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39055.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39055):map__39055);
var camp_id = cljs.core.get.call(null,map__39055__$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);
})).call(null,flight));
var camp_id = cljs.core.nth.call(null,vec__39051,(0),null);
var visible_QMARK_ = javelin.core.formula.call(null,((function (vec__39051,camp_id){
return (function (G__39058,G__39059,G__39057){
return G__39057.call(null,G__39058,G__39059);
});})(vec__39051,camp_id))
).call(null,camp_id,detailed_flight,cljs.core._EQ_);
var doc_click = ((function (visible_QMARK_,vec__39051,camp_id){
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__39051,camp_id))
;
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, 1, [new cljs.core.Keyword(null,"position","position",-2011731912),"relative"], 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__39051,camp_id){
return (function (){
cljs.core.swap_BANG_.call(null,detailed_flight,((function (visible_QMARK_,doc_click,vec__39051,camp_id){
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__39051,camp_id))
);

return false;
});})(visible_QMARK_,doc_click,vec__39051,camp_id))
,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"),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (visible_QMARK_,doc_click,vec__39051,camp_id){
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,flight));
hoplon.core.do_watch.call(null,visible_QMARK_,((function (d,visible_QMARK_,doc_click,vec__39051,camp_id){
return (function (old,new$){
if(cljs.core.truth_((function (){var and__23326__auto__ = cljs.core.not.call(null,old);
if(and__23326__auto__){
return new$;
} else {
return and__23326__auto__;
}
})())){
return setTimeout(((function (d,visible_QMARK_,doc_click,vec__39051,camp_id){
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__39051,camp_id))
,(0));
} else {
return null;
}
});})(d,visible_QMARK_,doc_click,vec__39051,camp_id))
);

return d;
});})(visible_QMARK_,doc_click,vec__39051,camp_id))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,visible_QMARK_,doc_click,vec__39051,camp_id){
return (function (){
return null;
});})(con__29830__auto__,visible_QMARK_,doc_click,vec__39051,camp_id))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,visible_QMARK_,doc_click,vec__39051,camp_id){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,visible_QMARK_,doc_click,vec__39051,camp_id))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,visible_QMARK_);
})());
});
});
/**
 * 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__39070 = state;
var map__39070__$1 = ((((!((map__39070 == null)))?((((map__39070.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39070.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39070):map__39070);
var map_flight_path_size = cljs.core.get.call(null,map__39070__$1,new cljs.core.Keyword(null,"map-flight-path-size","map-flight-path-size",-1349075868));
var map__39071 = 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__39071__$1 = ((((!((map__39071 == null)))?((((map__39071.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39071.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39071):map__39071);
var label = cljs.core.get.call(null,map__39071__$1,new cljs.core.Keyword(null,"label","label",1718410804));
var key = cljs.core.get.call(null,map__39071__$1,new cljs.core.Keyword(null,"key","key",-1516042587));
var init = cljs.core.get.call(null,map__39071__$1,new cljs.core.Keyword(null,"init","init",-1875481434));
var min = cljs.core.get.call(null,map__39071__$1,new cljs.core.Keyword(null,"min","min",444991522));
var max = cljs.core.get.call(null,map__39071__$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))].join('');
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__24200__auto__ = ((function (id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max){
return (function weathergen$ui$layers$flights$flight_path_display_controls_$_iter__39074(s__39075){
return (new cljs.core.LazySeq(null,((function (id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max){
return (function (){
var s__39075__$1 = s__39075;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__39075__$1);
if(temp__5278__auto__){
var s__39075__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__39075__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__39075__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__39077 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__39076 = (0);
while(true){
if((i__39076 < size__24199__auto__)){
var val = cljs.core._nth.call(null,c__24198__auto__,i__39076);
cljs.core.chunk_append.call(null,b__39077,hoplon.core.option.call(null,new cljs.core.Keyword(null,"value","value",305978217),val));

var G__39079 = (i__39076 + (1));
i__39076 = G__39079;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__39077),weathergen$ui$layers$flights$flight_path_display_controls_$_iter__39074.call(null,cljs.core.chunk_rest.call(null,s__39075__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__39077),null);
}
} else {
var val = cljs.core.first.call(null,s__39075__$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__39074.call(null,cljs.core.rest.call(null,s__39075__$2)));
}
} else {
return null;
}
break;
}
});})(id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max))
,null,null));
});})(id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max))
;
return iter__24200__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__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max){
return (function (G__39078){
return (G__39078 * (100));
});})(id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max))
).call(null,map_flight_path_size),new cljs.core.Keyword(null,"input","input",556931961),((function (id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max){
return (function (p1__39060_SHARP_){
return cljs.core.reset_BANG_.call(null,map_flight_path_size,(cljs.core.deref.call(null,p1__39060_SHARP_) / 100.0));
});})(id,map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$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__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$1,label,key,init,min,max){
return (function (){
return cljs.core.reset_BANG_.call(null,map_flight_path_size,init);
});})(map__39070,map__39070__$1,map_flight_path_size,map__39071,map__39071__$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,[cljs.core.str.cljs$core$IFn$_invoke$arity$1("reset-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.name.call(null,key))].join(''))], null))));
})());
});
weathergen.ui.layers.flights.controls = (function weathergen$ui$layers$flights$controls(p__39086){
var map__39133 = p__39086;
var map__39133__$1 = ((((!((map__39133 == null)))?((((map__39133.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39133.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39133):map__39133);
var state = map__39133__$1;
var all_flights = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"all-flights","all-flights",253678712));
var checked_flights = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var display = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"display","display",242065432));
var highlighted_flight = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813));
var mission = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var selected_teams = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671));
var visible_teams = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"visible-teams","visible-teams",-110455752));
var scroll_container = cljs.core.get.call(null,map__39133__$1,new cljs.core.Keyword(null,"scroll-container","scroll-container",-1938238550));
var G__39138 = (new cljs.core.Delay(((function (map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (){
return "No mission loaded";
});})(map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,null));
var G__39139 = (new cljs.core.Delay(((function (G__39138,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (){
return "No flights present in the mission";
});})(G__39138,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,null));
var G__39140 = (new cljs.core.Delay(((function (G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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),"3px"], 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),"400px"], null),(function (){var iter__24200__auto__ = ((function (G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function weathergen$ui$layers$flights$controls_$_iter__39141(s__39142){
return (new cljs.core.LazySeq(null,((function (G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (){
var s__39142__$1 = s__39142;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__39142__$1);
if(temp__5278__auto__){
var s__39142__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__39142__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__39142__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__39144 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__39143 = (0);
while(true){
if((i__39143 < size__24199__auto__)){
var vec__39151 = cljs.core._nth.call(null,c__24198__auto__,i__39143);
var id = cljs.core.nth.call(null,vec__39151,(0),null);
var name = cljs.core.nth.call(null,vec__39151,(1),null);
cljs.core.chunk_append.call(null,b__39144,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),"3px"], null),new cljs.core.Keyword(null,"click","click",1912301393),cljs.core.constantly.call(null,false),weathergen.ui.common.color_picker.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (i__39143,vec__39151,id,name,c__24198__auto__,size__24199__auto__,b__39144,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission_category_colors){
return mission_category_colors.call(null,id);
});})(i__39143,vec__39151,id,name,c__24198__auto__,size__24199__auto__,b__39144,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,weathergen.ui.layers.flights.mission_category_colors),new cljs.core.Keyword(null,"change","change",-1163046502),((function (i__39143,vec__39151,id,name,c__24198__auto__,size__24199__auto__,b__39144,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39080_SHARP_){
return cljs.core.swap_BANG_.call(null,weathergen.ui.layers.flights.mission_category_colors,cljs.core.assoc,id,cljs.core.deref.call(null,p1__39080_SHARP_));
});})(i__39143,vec__39151,id,name,c__24198__auto__,size__24199__auto__,b__39144,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
)),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,"width","width",-384071477),"70px"], null),name)));

var G__39179 = (i__39143 + (1));
i__39143 = G__39179;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__39144),weathergen$ui$layers$flights$controls_$_iter__39141.call(null,cljs.core.chunk_rest.call(null,s__39142__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__39144),null);
}
} else {
var vec__39154 = cljs.core.first.call(null,s__39142__$2);
var id = cljs.core.nth.call(null,vec__39154,(0),null);
var name = cljs.core.nth.call(null,vec__39154,(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),"3px"], null),new cljs.core.Keyword(null,"click","click",1912301393),cljs.core.constantly.call(null,false),weathergen.ui.common.color_picker.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (vec__39154,id,name,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission_category_colors){
return mission_category_colors.call(null,id);
});})(vec__39154,id,name,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,weathergen.ui.layers.flights.mission_category_colors),new cljs.core.Keyword(null,"change","change",-1163046502),((function (vec__39154,id,name,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39080_SHARP_){
return cljs.core.swap_BANG_.call(null,weathergen.ui.layers.flights.mission_category_colors,cljs.core.assoc,id,cljs.core.deref.call(null,p1__39080_SHARP_));
});})(vec__39154,id,name,s__39142__$2,temp__5278__auto__,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
)),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,"width","width",-384071477),"70px"], null),name)),weathergen$ui$layers$flights$controls_$_iter__39141.call(null,cljs.core.rest.call(null,s__39142__$2)));
}
} else {
return null;
}
break;
}
});})(G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,null,null));
});})(G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
;
return iter__24200__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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,"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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission__$1,all_flights__$1,selected_teams__$1){
return cljs.core.filter.call(null,((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39081_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__39081_SHARP_));
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,all_flights__$1);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,mission,all_flights,selected_teams),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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (flight,rownum){
if(cljs.core.truth_((function (){var and__23326__auto__ = flight;
if(cljs.core.truth_(and__23326__auto__)){
return rownum;
} else {
return and__23326__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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,rownum,flight,highlighted_flight),new cljs.core.Keyword(null,"mouseenter","mouseenter",-1792413560),((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (){
return cljs.core.reset_BANG_.call(null,highlighted_flight,cljs.core.deref.call(null,flight));
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"mouseleave","mouseleave",531566580),((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (){
return cljs.core.reset_BANG_.call(null,highlighted_flight,null);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"click","click",1912301393),((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (){
return javelin.core.dosync_STAR_.call(null,((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39159,G__39157,G__39158){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"highlighted","highlighted",1723498733),G__39157.call(null,G__39158,G__39159)], null);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,flight,cljs.core._EQ_,highlighted_flight)], null);
} else {
return null;
}
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39082_SHARP_){
return f.call(null,cljs.core.deref.call(null,mission),p1__39082_SHARP_);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (flight){
return javelin.core.formula.call(null,((function (detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission__$1,flight__$1){
return f.call(null,mission__$1,flight__$1);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,mission,flight);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
], null);
});})(detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
;
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),col.call(null,"Airbase",new cljs.core.Keyword(null,"airbase","airbase",-369690299),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission__$1,flight){
var G__39160 = flight;
var G__39160__$1 = (((G__39160 == null))?null:new cljs.core.Keyword("weathergen.falcon.files.mission","airbase","weathergen.falcon.files.mission/airbase",-1926407441).cljs$core$IFn$_invoke$arity$1(G__39160));
if((G__39160__$1 == null)){
return null;
} else {
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__39160__$1);
}
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),col.call(null,"T/O",new cljs.core.Keyword(null,"takeoff","takeoff",719937767),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (flight){
return javelin.core.formula.call(null,((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,flight);
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"css","css",1135045163),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (flight,rownum){
return javelin.core.formula.call(null,((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,mission,flight,weathergen.ui.layers.flights.mission_category_colors,rownum);
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
], null),col.call(null,"Aircraft",new cljs.core.Keyword(null,"airframe","airframe",643222926),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission__$1,flight){
return weathergen.ui.layers.flights.flight_aircraft.call(null,flight);
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (flight){
return cljs.core.not.call(null,cljs.core.deref.call(null,checked_flights).call(null,flight));
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (flight){
var vec__39163 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p__39166){
var map__39167 = p__39166;
var map__39167__$1 = ((((!((map__39167 == null)))?((((map__39167.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39167.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39167):map__39167);
var camp_id = cljs.core.get.call(null,map__39167__$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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,flight));
var camp_id = cljs.core.nth.call(null,vec__39163,(0),null);
var visible_QMARK_ = javelin.core.formula.call(null,((function (vec__39163,camp_id,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (checked_flights__$1,flight__$1){
return checked_flights__$1.call(null,flight__$1);
});})(vec__39163,camp_id,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,checked_flights,flight);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [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_picker.call(null,new cljs.core.Keyword(null,"value","value",305978217),javelin.core.formula.call(null,((function (visible_QMARK_,vec__39163,camp_id,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (mission__$1,flight__$1,camp_id__$1,display__$1,mission_category_colors){
var temp__5276__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__5276__auto__)){
var c = temp__5276__auto__;
return c;
} else {
return weathergen.ui.layers.flights.flight_mission_color.call(null,mission__$1,flight__$1,mission_category_colors);
}
});})(visible_QMARK_,vec__39163,camp_id,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).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__39163,camp_id,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39083_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),cljs.core.deref.call(null,p1__39083_SHARP_));
});})(visible_QMARK_,vec__39163,camp_id,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
))], null);
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
], null),col.call(null,"Callsign",new cljs.core.Keyword(null,"callsign","callsign",1222385874),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (_,flight){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(flight);
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39084_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__39084_SHARP_));
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,new cljs.core.Keyword(null,"formatter","formatter",-483008823),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (p1__39085_SHARP_){
var team = javelin.core.formula.call(null,((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39169){
return new cljs.core.Keyword(null,"owner","owner",-392611939).cljs$core$IFn$_invoke$arity$1(G__39169);
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,p1__39085_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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39171,G__39170){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"color","color",1011675173),G__39170.call(null,G__39171,new cljs.core.Keyword(null,"dark-text","dark-text",814777253))], null);
});})(team,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,team,weathergen.ui.common.team_color),javelin.core.formula.call(null,((function (team,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39172,G__39173,G__39174){
return G__39172.call(null,G__39173,G__39174);
});})(team,col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,weathergen.falcon.files.mission.team_name,mission,team));
});})(col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
], null),col.call(null,"Egress",new cljs.core.Keyword(null,"egress","egress",610445366),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),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,detailed_flight,scroll_container)], null),col.call(null,"TOT",new cljs.core.Keyword(null,"tot","tot",2086174646),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
),col.call(null,"Squadron",new cljs.core.Keyword(null,"squadron","squadron",-1131671273),((function (col,detailed_flight,G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
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__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
)]);
})());
})()));
});})(G__39138,G__39139,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
,null));
var tpl__29848__auto__ = ((function (G__39138,G__39139,G__39140,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39135,G__39136,G__39137){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(G__39135)?G__39138:(cljs.core.truth_(G__39136)?G__39139:(cljs.core.truth_(G__39137)?G__39140:null)));
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(G__39138,G__39139,G__39140,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
;
return javelin.core.formula.call(null,tpl__29848__auto__).call(null,javelin.core.formula.call(null,((function (G__39138,G__39139,G__39140,tpl__29848__auto__,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39176,G__39175){
return G__39175.call(null,G__39176);
});})(G__39138,G__39139,G__39140,tpl__29848__auto__,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).call(null,mission,cljs.core.not),javelin.core.formula.call(null,((function (G__39138,G__39139,G__39140,tpl__29848__auto__,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container){
return (function (G__39177,G__39178){
return (G__39177.call(null,G__39178) === (0));
});})(G__39138,G__39139,G__39140,tpl__29848__auto__,map__39133,map__39133__$1,state,all_flights,checked_flights,display,highlighted_flight,mission,selected_teams,visible_teams,scroll_container))
).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__39184 = waypoints;
var G__39184__$1 = (((G__39184 == null))?null:weathergen.util.take_until.call(null,((function (G__39184){
return (function (p1__39180_SHARP_){
return weathergen.util.has_flag_QMARK_.call(null,new cljs.core.Keyword(null,"flags","flags",1775418075).cljs$core$IFn$_invoke$arity$1(p1__39180_SHARP_),weathergen.falcon.constants.WPF_LAND);
});})(G__39184))
,G__39184));
var G__39184__$2 = (((G__39184__$1 == null))?null:cljs.core.mapv.call(null,((function (G__39184,G__39184__$1){
return (function (p1__39181_SHARP_){
return weathergen.ui.layers.flights.waypoint_grid_coords.call(null,mission,p1__39181_SHARP_);
});})(G__39184,G__39184__$1))
,G__39184__$1));
var G__39184__$3 = (((G__39184__$2 == null))?null:cljs.core.mapv.call(null,((function (G__39184,G__39184__$1,G__39184__$2){
return (function (p1__39182_SHARP_){
return goog.string.format("%f,%f",new cljs.core.Keyword(null,"x","x",2099068185).cljs$core$IFn$_invoke$arity$1(p1__39182_SHARP_),new cljs.core.Keyword(null,"y","y",-1757859776).cljs$core$IFn$_invoke$arity$1(p1__39182_SHARP_));
});})(G__39184,G__39184__$1,G__39184__$2))
,G__39184__$2));
var G__39184__$4 = (((G__39184__$3 == null))?null:cljs.core.interpose.call(null," L",G__39184__$3));
if((G__39184__$4 == null)){
return null;
} else {
return cljs.core.apply.call(null,cljs.core.str,"M",G__39184__$4);
}
});
weathergen.ui.layers.flights.flight_path_overlay = (function weathergen$ui$layers$flights$flight_path_overlay(flight,p__39185){
var map__39280 = p__39185;
var map__39280__$1 = ((((!((map__39280 == null)))?((((map__39280.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39280.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39280):map__39280);
var checked_flights = cljs.core.get.call(null,map__39280__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var display = cljs.core.get.call(null,map__39280__$1,new cljs.core.Keyword(null,"display","display",242065432));
var highlighted_flight = cljs.core.get.call(null,map__39280__$1,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813));
var mission = cljs.core.get.call(null,map__39280__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var map_zoom = cljs.core.get.call(null,map__39280__$1,new cljs.core.Keyword(null,"map-zoom","map-zoom",1543291337));
var map_text_scale = cljs.core.get.call(null,map__39280__$1,new cljs.core.Keyword(null,"map-text-scale","map-text-scale",1420206123));
var map_flight_path_scale = cljs.core.get.call(null,map__39280__$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__39280__$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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39282){
return new cljs.core.Keyword(null,"camp-id","camp-id",618705690).cljs$core$IFn$_invoke$arity$1(G__39282);
});})(map__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39283){
return new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(G__39283);
});})(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__39280,map__39280__$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__39286 = 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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__39289){
var map__39290 = p__39289;
var map__39290__$1 = ((((!((map__39290 == null)))?((((map__39290.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39290.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39290):map__39290);
var waypoints = cljs.core.get.call(null,map__39290__$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__39280,map__39280__$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__39286,(0),null);
var magnification = javelin.core.formula.call(null,((function (vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39292,G__39293){
return (G__39292 * (cljs.core.truth_(G__39293)?1.4:1.2));
});})(vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39295,G__39294){
return G__39294.call(null,G__39295);
});})(magnification,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39297,G__39296){
return G__39296.call(null,G__39297);
});})(magnification,strokes,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (item__29820__auto__){
var vec__39298 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,item__29820__auto__));
var stroke = cljs.core.nth.call(null,vec__39298,(0),null);
var vec__39303 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39298,stroke,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__39306){
var map__39307 = p__39306;
var map__39307__$1 = ((((!((map__39307 == null)))?((((map__39307.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39307.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39307):map__39307);
var width = cljs.core.get.call(null,map__39307__$1,new cljs.core.Keyword(null,"width","width",-384071477));
var color__$1 = cljs.core.get.call(null,map__39307__$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__39298,stroke,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39303,(0),null);
var width = cljs.core.nth.call(null,vec__39303,(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__39303,color__$1,width,vec__39298,stroke,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39311,G__39309,G__39310){
return ((G__39309 * G__39310) / G__39311);
});})(vec__39303,color__$1,width,vec__39298,stroke,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39303,color__$1,width,vec__39298,stroke,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39303,color__$1,width,vec__39298,stroke,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39312,G__39313,G__39314){
return G__39312.call(null,G__39313,G__39314);
});})(magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (item__29820__auto__){
var vec__39315 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,item__29820__auto__));
var indexed = cljs.core.nth.call(null,vec__39315,(0),null);
var vec__39324 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__39327){
var vec__39328 = p__39327;
var ordinal = cljs.core.nth.call(null,vec__39328,(0),null);
var waypoint = cljs.core.nth.call(null,vec__39328,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [ordinal,waypoint], null);
});})(vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39324,(0),null);
var waypoint = cljs.core.nth.call(null,vec__39324,(1),null);
var vec__39333 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__39336){
var map__39337 = p__39336;
var map__39337__$1 = ((((!((map__39337 == null)))?((((map__39337.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39337.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39337):map__39337);
var action = cljs.core.get.call(null,map__39337__$1,new cljs.core.Keyword(null,"action","action",-811238024));
var grid_x = cljs.core.get.call(null,map__39337__$1,new cljs.core.Keyword(null,"grid-x","grid-x",1935903622));
var grid_y = cljs.core.get.call(null,map__39337__$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__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39333,(0),null);
var grid_y = cljs.core.nth.call(null,vec__39333,(1),null);
var action = cljs.core.nth.call(null,vec__39333,(2),null);
var vec__39341 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__39344){
var map__39345 = p__39344;
var map__39345__$1 = ((((!((map__39345 == null)))?((((map__39345.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39345.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39345):map__39345);
var x = cljs.core.get.call(null,map__39345__$1,new cljs.core.Keyword(null,"x","x",2099068185));
var y = cljs.core.get.call(null,map__39345__$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__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39349,G__39347,G__39348,G__39350){
return G__39347.call(null,G__39348,G__39349,G__39350);
});})(vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,(0),null);
var y = cljs.core.nth.call(null,vec__39341,(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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (item__29820__auto____$1){
var vec__39351 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
).call(null,item__29820__auto____$1));
var stroke = cljs.core.nth.call(null,vec__39351,(0),null);
return hoplon.svg.g.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"waypoint marker",(function (){var vec__39356 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__39359){
var map__39360 = p__39359;
var map__39360__$1 = ((((!((map__39360 == null)))?((((map__39360.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39360.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39360):map__39360);
var width = cljs.core.get.call(null,map__39360__$1,new cljs.core.Keyword(null,"width","width",-384071477));
var color__$1 = cljs.core.get.call(null,map__39360__$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__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39356,(0),null);
var width = cljs.core.nth.call(null,vec__39356,(1),null);
var r = javelin.core.formula.call(null,((function (vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39362,G__39363){
return ((0.6 * G__39362) * G__39363);
});})(r,vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29830__auto__ = (new cljs.core.Delay(((function (r,style_STAR_,circle_QMARK_,vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,r,style_STAR_,circle_QMARK_,vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29830__auto__,r,style_STAR_,circle_QMARK_,vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,r,style_STAR_,circle_QMARK_,vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,r,style_STAR_,circle_QMARK_,vec__39356,color__$1,width,vec__39351,stroke,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29832__auto__).call(null,circle_QMARK_);
})());
});})(style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__23326__auto__ = show_labels_QMARK___$1;
if(cljs.core.truth_(and__23326__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__23326__auto__;
}
})())){
return "Alternate Field";
} else {
if(cljs.core.truth_((function (){var and__23326__auto__ = show_labels_QMARK___$1;
if(cljs.core.truth_(and__23326__auto__)){
return cljs.core._EQ_.call(null,action__$1,weathergen.falcon.constants.WP_REFUEL);
} else {
return and__23326__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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39364,G__39365){
return (G__39364 * G__39365);
});})(tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39366,G__39367){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1((G__39366 * G__39367)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("%")].join('');
});})(tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39368,G__39369){
return (- (G__39368 * G__39369));
});})(tx,ty,tw,th,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__15569__auto__ = ((function (tx,ty,tw,th,t,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__15570__auto__ = t.getBBox();
if(cljs.core.truth_(bb__15570__auto__.x)){
cljs.core.reset_BANG_.call(null,tx,bb__15570__auto__.x);

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

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

return cljs.core.reset_BANG_.call(null,th,bb__15570__auto__.height);
} else {
return null;
}
});})(tx,ty,tw,th,t,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
;
hoplon.core.when_dom.call(null,t,update_bbox__15569__auto__);

var temp__5278__auto___39374 = bbox_trigger;
if(cljs.core.truth_(temp__5278__auto___39374)){
var w__15571__auto___39375 = temp__5278__auto___39374;
cljs.core.add_watch.call(null,w__15571__auto___39375,cljs.core.keyword.call(null,cljs.core.gensym.call(null)),((function (w__15571__auto___39375,temp__5278__auto___39374,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__15571__auto___39375,temp__5278__auto___39374,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__15569__auto__.call(null);
});})(w__15571__auto___39375,temp__5278__auto___39374,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,(0));
});})(w__15571__auto___39375,temp__5278__auto___39374,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
);
} else {
}

var con__29830__auto__ = (new cljs.core.Delay(((function (tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39372,G__39370,G__39371){
return G__39370.call(null,(G__39371 / G__39372));
});})(tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29830__auto__ = (new cljs.core.Delay(((function (tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29830__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29832__auto__).call(null,map_show_text_background_QMARK_);
})(),t);
});})(tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29830__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__29832__auto__).call(null,javelin.core.formula.call(null,((function (con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$1,checked_flights,display,highlighted_flight,mission,map_zoom,map_text_scale,map_flight_path_scale,map_show_text_background_QMARK_){
return (function (G__39373){
return cljs.core.not.call(null,(G__39373 == null));
});})(con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,tx,ty,tw,th,t,update_bbox__15569__auto__,txt,bbox_trigger,show_labels_QMARK_,show_numbers_QMARK_,style,vec__39341,x,y,vec__39333,grid_x,grid_y,action,vec__39324,ordinal,waypoint,vec__39315,indexed,magnification,strokes,anticolor,vec__39286,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__39280,map__39280__$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__39286,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__39280,map__39280__$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__39377){
var map__39386 = p__39377;
var map__39386__$1 = ((((!((map__39386 == null)))?((((map__39386.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39386.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39386):map__39386);
var state = map__39386__$1;
var checked_flights = cljs.core.get.call(null,map__39386__$1,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695));
var highlighted_flight = cljs.core.get.call(null,map__39386__$1,new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813));
var mission = cljs.core.get.call(null,map__39386__$1,new cljs.core.Keyword(null,"mission","mission",1740288522));
var selected_teams = cljs.core.get.call(null,map__39386__$1,new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671));
var displayed_flights = javelin.core.formula.call(null,((function (map__39386,map__39386__$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__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (p1__39376_SHARP_){
return selected_teams__$1.call(null,new cljs.core.Keyword(null,"owner","owner",-392611939).cljs$core$IFn$_invoke$arity$1(p1__39376_SHARP_));
});})(map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
,checked_flights__$1));
});})(map__39386,map__39386__$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__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (G__39388,G__39389,G__39390){
return G__39388.call(null,G__39389,G__39390);
});})(displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
).call(null,cljs.core.disj,displayed_flights,highlighted_flight),((function (displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (item__29820__auto__){
var vec__39391 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (displayed_flights,map__39386,map__39386__$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__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
).call(null,item__29820__auto__));
var flight = cljs.core.nth.call(null,vec__39391,(0),null);
return weathergen.ui.layers.flights.flight_path_overlay.call(null,flight,state);
});})(displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (displayed_flights,map__39386,map__39386__$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__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (){
return null;
});})(con__29830__auto__,displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,displayed_flights,map__39386,map__39386__$1,state,checked_flights,highlighted_flight,mission,selected_teams))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,highlighted_flight);
})()));
});
weathergen.ui.layers.flights.create = (function weathergen$ui$layers$flights$create(mission,p__39395){
var map__39407 = p__39395;
var map__39407__$1 = ((((!((map__39407 == null)))?((((map__39407.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__39407.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__39407):map__39407);
var opts = map__39407__$1;
var map_zoom = cljs.core.get.call(null,map__39407__$1,new cljs.core.Keyword(null,"map-zoom","map-zoom",1543291337));
var map_text_scale = cljs.core.get.call(null,map__39407__$1,new cljs.core.Keyword(null,"map-text-scale","map-text-scale",1420206123));
var visible_teams = cljs.core.get.call(null,map__39407__$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__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__39410,G__39409){
return G__39409.call(null,4.0,G__39410);
});})(map_flight_path_size,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,map_flight_path_size,Math.pow);
var state = cljs.core.merge.call(null,opts,new cljs.core.PersistentArrayMap(null, 8, [new cljs.core.Keyword(null,"mission","mission",1740288522),mission,new cljs.core.Keyword(null,"checked-flights","checked-flights",1669126695),javelin.core.cell.call(null,cljs.core.PersistentHashSet.EMPTY),new cljs.core.Keyword(null,"highlighted-flight","highlighted-flight",-2117068813),javelin.core.cell.call(null,null),new cljs.core.Keyword(null,"display","display",242065432),javelin.core.cell.call(null,cljs.core.PersistentArrayMap.EMPTY),new cljs.core.Keyword(null,"all-flights","all-flights",253678712),javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (G__39413,G__39412){
var G__39411 = G__39412;
if(cljs.core.truth_((G__39411 == null))){
return null;
} else {
return G__39413.call(null,G__39411);
}
});})(map_flight_path_size,map_flight_path_scale,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams))
).call(null,weathergen.falcon.files.mission.flights,mission),new cljs.core.Keyword(null,"selected-teams","selected-teams",317107671),javelin.core.cell.call(null,cljs.core.PersistentHashSet.EMPTY),new cljs.core.Keyword(null,"map-flight-path-size","map-flight-path-size",-1349075868),map_flight_path_size,new cljs.core.Keyword(null,"map-flight-path-scale","map-flight-path-scale",866693625),map_flight_path_scale], null));
var watchable = javelin.core.formula.call(null,((function (map_flight_path_size,map_flight_path_scale,state,map__39407,map__39407__$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,state,map__39407,map__39407__$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,state,watchable,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (_,p__39414){
var vec__39415 = p__39414;
var mission__$1 = cljs.core.nth.call(null,vec__39415,(0),null);
var visible_teams__$1 = cljs.core.nth.call(null,vec__39415,(1),null);
var timer_name__15521__auto__ = "updating flights section";
var ignore__15522__auto__ = console.time(timer_name__15521__auto__);
var result__15523__auto__ = javelin.core.dosync_STAR_.call(null,((function (timer_name__15521__auto__,ignore__15522__auto__,vec__39415,mission__$1,visible_teams__$1,map_flight_path_size,map_flight_path_scale,state,watchable,map__39407,map__39407__$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__15521__auto__,ignore__15522__auto__,vec__39415,mission__$1,visible_teams__$1,map_flight_path_size,map_flight_path_scale,state,watchable,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams))
);
console.timeEnd(timer_name__15521__auto__);

return result__15523__auto__;
});})(map_flight_path_size,map_flight_path_scale,state,watchable,map__39407,map__39407__$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,state,watchable,map__39407,map__39407__$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,state,watchable,map__39407,map__39407__$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,state,watchable,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams){
return (function (p1__39394_SHARP_){
return weathergen.ui.layers.flights.flight_path_display_controls.call(null,p1__39394_SHARP_,state);
});})(map_flight_path_size,map_flight_path_scale,state,watchable,map__39407,map__39407__$1,opts,map_zoom,map_text_scale,visible_teams))
,new cljs.core.Keyword(null,"overlay","overlay",-139131598),weathergen.ui.layers.flights.overlay.call(null,state));
});
