@@ -977,17 +977,53 @@ Elm.List = function() {
977 take:take,
977 take:take,
978 drop:drop};
978 drop:drop};
980−try{
980+var Elm = Elm || {};
981+Elm.Maybe = function() {
982+ function consMaybe(x) { return function(xs) {
983+ if (x[0] === "Just") return ["Cons", x[1], xs];
987+ function fromMaybe(b) { return function(m) {
988+ if (m[0] === "Just") return m[1];
992+ function mapCons(f) { return function(y) { return function(xs) {
994+ if (x[0] === "Just") return ["Cons", x[1], xs];
999+ function maybe(b) { return function(f) { return function(m) {
1000+ if (m[0] === "Just") return f(m[1]);
1006+ return {Just : function(x) { return ["Just",x]; },
1007+ Nothing : ["Nothing"],
1008+ catMaybes : Elm.List.foldr(consMaybe)(["Nil"]),
1009+ isJust : function(m) { return m[0] === "Just"; },
1010+ isNothing : function(m) { return m[0] === "Nothing"; },
1011+ fromMaybe : fromMaybe,
1012+ consMaybe : consMaybe,
1013+ mapMaybe : function(f) { return Elm.List.foldr(mapCons(f))(["Nil"]); },
982for(var i in Elm) { this[i] = Elm[i]; }
1020for(var i in Elm) { this[i] = Elm[i]; }
983if (Elm.Dict) throw "Module name collision, 'Dict' is already defined.";
1021if (Elm.Dict) throw "Module name collision, 'Dict' is already defined.";
984Elm.Dict=function(){
1022Elm.Dict=function(){
985− try{if (!(Elm.Prelude instanceof Object)) throw 'module not found'; } catch(e) {throw "Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.";}
986 var hiddenVars=[];
1023 var hiddenVars=[];
987 for(var i in Elm.Prelude){
1024 for(var i in Elm.Prelude){
988 if (hiddenVars.indexOf(i) >= 0) continue;
1025 if (hiddenVars.indexOf(i) >= 0) continue;
989 this[i]=Elm.Prelude[i];}
1026 this[i]=Elm.Prelude[i];}
990− try{if (!(Elm.Maybe instanceof Object)) throw 'module not found'; } catch(e) {throw "Module 'Maybe' is missing. Compile with --make flag or load missing module in a separate JavaScript file.";}
991 var isJust=Elm.Maybe.isJust;
1027 var isJust=Elm.Maybe.isJust;
992 var Red_0=["Red"];
1028 var Red_0=["Red"];
993 var Black_1=["Black"];
1029 var Black_1=["Black"];
@@ -1456,15 +1492,11 @@ Elm.Dict=function(){
1456 function fromList_42(assocs_235){
1492 function fromList_42(assocs_235){
1457 return List.foldl(uncurry(insert_20))(empty_4)(assocs_235);};
1493 return List.foldl(uncurry(insert_20))(empty_4)(assocs_235);};
1458 return {empty:empty_4,lookup:lookup_7,findWithDefault:findWithDefault_8,member:member_10,insert:insert_20,singleton:singleton_21,remove:remove_32,map:map_33,foldl:foldl_34,foldr:foldr_35,union:union_36,intersect:intersect_37,diff:diff_38,keys:keys_39,values:values_40,toList:toList_41,fromList:fromList_42};}();
1494 return {empty:empty_4,lookup:lookup_7,findWithDefault:findWithDefault_8,member:member_10,insert:insert_20,singleton:singleton_21,remove:remove_32,map:map_33,foldl:foldl_34,foldr:foldr_35,union:union_36,intersect:intersect_37,diff:diff_38,keys:keys_39,values:values_40,toList:toList_41,fromList:fromList_42};}();
1459−Elm.main=function(){
1495+}());
1460− return Elm.Dict.main;};
1496+(function() {
1461−} catch (e) {Elm.main=function() {var msg = ('<br/><h2>Your browser may not be supported. Are you using a modern browser?</h2>' + '<br/><span style="color:grey">Runtime Error in Dict module:<br/>' + e + '</span>');document.body.innerHTML = Text.monospace(msg);throw e;};}
1464for(var i in Elm) { this[i] = Elm[i]; }
1498for(var i in Elm) { this[i] = Elm[i]; }
1465−if (Elm.Set) throw "Module name collision, 'Set' is already defined.";
1466Elm.Set=function(){
1499Elm.Set=function(){
1467− try{if (!(Elm.Prelude instanceof Object)) throw 'module not found'; } catch(e) {throw "Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.";}
1468 var hiddenVars=[];
1500 var hiddenVars=[];
1469 for(var i in Elm.Prelude){
1501 for(var i in Elm.Prelude){
1470 if (hiddenVars.indexOf(i) >= 0) continue;
1502 if (hiddenVars.indexOf(i) >= 0) continue;
@@ -1498,9 +1530,7 @@ Elm.Set=function(){
1498 return function(x){
1530 return function(x){
1499 return fromList_9(List.map(f_25)(x));}(toList_8(t_26));};};
1531 return fromList_9(List.map(f_25)(x));}(toList_8(t_26));};};
1500 return {empty:empty_0,singleton:singleton_1,insert:insert_2,remove:remove_3,member:member_4,union:union_5,intersect:intersect_6,diff:diff_7,toList:toList_8,fromList:fromList_9,foldl:foldl_10,foldr:foldr_11,map:map_12};}();
1532 return {empty:empty_0,singleton:singleton_1,insert:insert_2,remove:remove_3,member:member_4,union:union_5,intersect:intersect_6,diff:diff_7,toList:toList_8,fromList:fromList_9,foldl:foldl_10,foldr:foldr_11,map:map_12};}();
1501−Elm.main=function(){
1533+}());
1502− return Elm.Set.main;};
1503−} catch (e) {Elm.main=function() {var msg = ('<br/><h2>Your browser may not be supported. Are you using a modern browser?</h2>' + '<br/><span style="color:grey">Runtime Error in Set module:<br/>' + e + '</span>');document.body.innerHTML = Text.monospace(msg);throw e;};}
1504var Elm = Elm || {};
1534var Elm = Elm || {};
1505Elm.Char = function() {
1535Elm.Char = function() {
1506 function isBetween(lo,hi) { return function(chr) {
1536 function isBetween(lo,hi) { return function(chr) {
@@ -1526,44 +1556,6 @@ Elm.Char = function() {
1529−var Elm = Elm || {};
1530−Elm.Maybe = function() {
1531− function consMaybe(x) { return function(xs) {
1532− if (x[0] === "Just") return ["Cons", x[1], xs];
1536− function fromMaybe(b) { return function(m) {
1537− if (m[0] === "Just") return m[1];
1541− function mapCons(f) { return function(y) { return function(xs) {
1543− if (x[0] === "Just") return ["Cons", x[1], xs];
1548− function maybe(b) { return function(f) { return function(m) {
1549− if (m[0] === "Just") return f(m[1]);
1555− return {Just : function(x) { return ["Just",x]; },
1556− Nothing : ["Nothing"],
1557− catMaybes : Elm.List.foldr(consMaybe)(["Nil"]),
1558− isJust : function(m) { return m[0] === "Just"; },
1559− isNothing : function(m) { return m[0] === "Nothing"; },
1560− fromMaybe : fromMaybe,
1561− consMaybe : consMaybe,
1562− mapMaybe : function(f) { return Elm.List.foldr(mapCons(f))(["Nil"]); },
1568var String = function() {
1560var String = function() {
@@ -1647,8 +1639,7 @@ var String = function() {
1648var String = {toText:Value.toText, properEscape:Value.properEscape};
1640var String = {toText:Value.toText, properEscape:Value.properEscape};
1649var Elm = Elm || {};
1641var Elm = Elm || {};
1650−Elm.Graphics = Elm.Graphics || {};
1651−Elm.Graphics.Color = function() {
1642+Elm.Color = function() {
1652 function Color_0(a1) {
1643 function Color_0(a1) {
1653 return function(a2) {
1644 return function(a2) {
1654 return function(a3) {
1645 return function(a3) {
@@ -1695,13 +1686,13 @@ function tracePoints(ctx,points) {
1696function solid(ctx,color,points) {
1687function solid(ctx,color,points) {
1697 tracePoints(ctx,points);
1688 tracePoints(ctx,points);
1698− ctx.strokeStyle = Elm.Graphics.Color.extract(color);
1689+ ctx.strokeStyle = Elm.Color.extract(color);
1699 ctx.stroke();
1690 ctx.stroke();
1702function filled(ctx,color,points) {
1693function filled(ctx,color,points) {
1703 tracePoints(ctx,points);
1694 tracePoints(ctx,points);
1704− ctx.fillStyle = Elm.Graphics.Color.extract(color);
1695+ ctx.fillStyle = Elm.Color.extract(color);
1705 ctx.fill();
1696 ctx.fill();
@@ -1718,7 +1709,7 @@ function textured(redo,ctx,src,points) {
1718function customLine(pattern,ctx,color,points) {
1709function customLine(pattern,ctx,color,points) {
1719 if (pattern.length === 0) { pattern = [8,4]; }
1710 if (pattern.length === 0) { pattern = [8,4]; }
1720 customLineHelp(ctx, pattern, points);
1711 customLineHelp(ctx, pattern, points);
1721− ctx.strokeStyle = Elm.Graphics.Color.extract(color);
1712+ ctx.strokeStyle = Elm.Color.extract(color);
1722 ctx.stroke();
1713 ctx.stroke();
@@ -1991,8 +1982,7 @@ function insideShape(point,theta,scale,pos,points) {
1991return {collage:collage, updateCollage:updateCollage, insideForm:insideForm};
1982return {collage:collage, updateCollage:updateCollage, insideForm:insideForm};
1993}();var Elm = Elm || {};
1984}();var Elm = Elm || {};
1994−Elm.Graphics = Elm.Graphics || {};
1985+Elm.Graphics = function() {
1995−Elm.Graphics.Element = function() {
1996 var JS = Elm.JavaScript;
1986 var JS = Elm.JavaScript;
1997 var DLeft_0 = ["DLeft"];
1987 var DLeft_0 = ["DLeft"];
1998 var DRight_1 = ["DRight"];
1988 var DRight_1 = ["DRight"];
@@ -2506,7 +2496,8 @@ Elm.Graphics.Element = function() {
2506 outlined:outlined_94, customOutline:customOutline_95, textured:textured, sprite:sprite_96, toForm:toForm_97, rotate:rotate_98, scale:scale_99, move:move_100,
2496 outlined:outlined_94, customOutline:customOutline_95, textured:textured, sprite:sprite_96, toForm:toForm_97, rotate:rotate_98, scale:scale_99, move:move_100,
2507 isWithin: Collage.insideForm}
2497 isWithin: Collage.insideForm}
2499+var Elm = Elm || {};
2509−var Text = function() {
2500+Elm.Text = function() {
2510 function fromString(s) { return Value.toText(s); }
2501 function fromString(s) { return Value.toText(s); }
2512 var addTag = function(tag) { return function(text) {
2503 var addTag = function(tag) { return function(text) {
@@ -2530,7 +2521,7 @@ var Text = function() {
2530 var italic = addStyle('font-style', 'italic');
2521 var italic = addStyle('font-style', 'italic');
2531 var bold = addTag('b');
2522 var bold = addTag('b');
2532 var color = function(c) {
2523 var color = function(c) {
2533− return addStyle('color', Elm.Graphics.Color.extract(c));
2524+ return addStyle('color', Elm.Color.extract(c));
2535 var underline = addStyle('text-decoration', 'underline');
2526 var underline = addStyle('text-decoration', 'underline');
2536 var overline = addStyle('text-decoration', 'overline');
2527 var overline = addStyle('text-decoration', 'overline');
@@ -2555,9 +2546,6 @@ var Text = function() {
2555 link : link };
2546 link : link };
2558−var Elm = Elm || {};
2559−Elm.Graphics.Text = Text;
2561var Render = function(){
2549var Render = function(){
2563function newElement(elementType) {
2551function newElement(elementType) {
@@ -2736,7 +2724,7 @@ function render(elem) {
2736 e.style.height = (~~elem[4]) + 'px';
2724 e.style.height = (~~elem[4]) + 'px';
2737 if (elem[5] !== 1) { e.style.opacity = elem[5]; }
2725 if (elem[5] !== 1) { e.style.opacity = elem[5]; }
2738 if (elem[6][0] === "Just") {
2726 if (elem[6][0] === "Just") {
2739− e.style.backgroundColor = Elm.Graphics.Color.extract(elem[6][1]);
2727+ e.style.backgroundColor = Elm.Color.extract(elem[6][1]);
2741 if (elem[7][0] === "Just") {
2729 if (elem[7][0] === "Just") {
2742 var a = newElement('a');
2730 var a = newElement('a');
@@ -2822,7 +2810,7 @@ function update(node,curr,next) {
2822 if (next[4] !== curr[4]) node.style.height = (~~next[4]) + 'px';
2810 if (next[4] !== curr[4]) node.style.height = (~~next[4]) + 'px';
2823 if (next[5] !== curr[5]) node.style.opacity = next[5];
2811 if (next[5] !== curr[5]) node.style.opacity = next[5];
2824 if (next[6].length === 2) {
2812 if (next[6].length === 2) {
2825− var clr = Elm.Graphics.Color.extract(next[6][1]);
2813+ var clr = Elm.Color.extract(next[6][1]);
2826 if (clr !== node.style.backgroundColor) node.style.backgroundColor = clr;
2814 if (clr !== node.style.backgroundColor) node.style.backgroundColor = clr;
2828 if (next[7].length === 2) {
2816 if (next[7].length === 2) {
@@ -3145,7 +3133,7 @@ Elm.Input = function() {
3145 var opts = [];
3133 var opts = [];
3146 while (options[0] === "Cons") {
3134 while (options[0] === "Cons") {
3147 var opt = newElement('option');
3135 var opt = newElement('option');
3148− var str = Text.toText(options[1][1]);
3136+ var str = Value.toText(options[1][1]);
3149 opt.value = str;
3137 opt.value = str;
3150 opt.innerHTML = str;
3138 opt.innerHTML = str;
3151 slct.appendChild(opt);
3139 slct.appendChild(opt);
@@ -3509,20 +3497,17 @@ Elm.Prelude = function() {
3509 Elm.Prelude[i] = library[i];
3497 Elm.Prelude[i] = library[i];
3512− include (Elm.Graphics.Color);
3500+ include (Elm.Color);
3513− include (Elm.Graphics.Text);
3501+ include (Elm.Text);
3514− include (Elm.Graphics.Element);
3502+ include (Elm.Graphics);
3516 show = Value.show;
3504 show = Value.show;
3522for(var i in Elm) { this[i] = Elm[i]; }
3509for(var i in Elm) { this[i] = Elm[i]; }
3523−if (Elm.Automaton) throw "Module name collision, 'Automaton' is already defined.";
3524Elm.Automaton=function(){
3510Elm.Automaton=function(){
3525− try{if (!(Elm.Prelude instanceof Object)) throw 'module not found'; } catch(e) {throw "Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.";}
3526 var hiddenVars=[];
3511 var hiddenVars=[];
3527 for(var i in Elm.Prelude){
3512 for(var i in Elm.Prelude){
3528 if (hiddenVars.indexOf(i) >= 0) continue;
3513 if (hiddenVars.indexOf(i) >= 0) continue;
@@ -3702,6 +3687,4 @@ Elm.Automaton=function(){
3702 function draggable_14(form_93){
3687 function draggable_14(form_93){
3703 return init__7(["Tuple2",Listen_9,form_93])(stepDrag_13);};
3688 return init__7(["Tuple2",Listen_9,form_93])(stepDrag_13);};
3704 return {Automaton:Automaton_0,run:run_1,step:step_2,composeAuto:composeAuto_3,combine:combine_4,pure:pure_5,init:init_6,init_:init__7,count:count_8,Listen:Listen_9,Ignore:Ignore_10,DragFrom:DragFrom_11,vecSub:vecSub_12,stepDrag:stepDrag_13,draggable:draggable_14};}();
3689 return {Automaton:Automaton_0,run:run_1,step:step_2,composeAuto:composeAuto_3,combine:combine_4,pure:pure_5,init:init_6,init_:init__7,count:count_8,Listen:Listen_9,Ignore:Ignore_10,DragFrom:DragFrom_11,vecSub:vecSub_12,stepDrag:stepDrag_13,draggable:draggable_14};}();
3705−Elm.main=function(){
3690+}());
3706− return Elm.Automaton.main;};
3707−} catch (e) {Elm.main=function() {var msg = ('<br/><h2>Your browser may not be supported. Are you using a modern browser?</h2>' + '<br/><span style="color:grey">Runtime Error in Automaton module:<br/>' + e + '</span>');document.body.innerHTML = Text.monospace(msg);throw e;};}