@@ -1,221 +1,221 @@
2−(function() {
2+(function() {
5−var $op={};
5+var $op={};
6−for(this['i'] in Elm){eval('var '+this['i']+'=Elm[this.i];');}
6+for(this['i'] in Elm){eval('var '+this['i']+'=Elm[this.i];');}
7−if (Elm.Automaton) throw "Module name collision, 'Automaton' is already defined.";
7+if (Elm.Automaton) throw new Error("Module name collision, 'Automaton' is already defined.");
8−Elm.Automaton=function(){
8+Elm.Automaton=function(){
10− if (!(Elm.Prelude instanceof Object)) throw 'module not found';
10+ if (!(Elm.Prelude instanceof Object)) throw 'module not found';
11− } catch(e) {
11+ } catch(e) {
12− throw ("Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.");
12+ throw ("Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.");
14− var hiddenVars={};
14+ var hiddenVars={};
15− for (this['i'] in Elm.Prelude) {
15+ for (this['i'] in Elm.Prelude) {
16− if (hiddenVars[this['i']]) continue;
16+ if (hiddenVars[this['i']]) continue;
17− eval('var ' + this['i'] + ' = Elm.Prelude[this.i];');}
17+ eval('var ' + this['i'] + ' = Elm.Prelude[this.i];');}
18− function Automaton_0(a1){
18+ function Automaton_0(a1){
19− return ["Automaton",a1];}
19+ return ["Automaton",a1];}
20− var Listen_8=["Listen"];
20+ var Listen_8=["Listen"];
21− var Ignore_9=["Ignore"];
21+ var Ignore_9=["Ignore"];
22− function DragFrom_10(a1){
22+ function DragFrom_10(a1){
23− return ["DragFrom",a1];}
23+ return ["DragFrom",a1];}
24− $op['>>>'] = function(a1_24){
24+ $op['>>>'] = function(a1_24){
25− return function(a2_25){
25+ return function(a2_25){
26− return function(){
26+ return function(){
27− var Automaton$m1_26=a1_24;
27+ var Automaton$m1_26=a1_24;
28− var m1_27=function(){
28+ var m1_27=function(){
29− switch(Automaton$m1_26[0]){
29+ switch(Automaton$m1_26[0]){
30− case "Automaton":
30+ case "Automaton":
31− return Automaton$m1_26[1];
31+ return Automaton$m1_26[1];
33− throw "Non-exhaustive pattern match in case";}();
33+ throw new Error("Non-exhaustive pattern match in case");}();
34− var Automaton$m2_28=a2_25;
34+ var Automaton$m2_28=a2_25;
35− var m2_29=function(){
35+ var m2_29=function(){
36− switch(Automaton$m2_28[0]){
36+ switch(Automaton$m2_28[0]){
37− case "Automaton":
37+ case "Automaton":
38− return Automaton$m2_28[1];
38+ return Automaton$m2_28[1];
40− throw "Non-exhaustive pattern match in case";}();
40+ throw new Error("Non-exhaustive pattern match in case");}();
41− return Automaton_0(function(a_32){
41+ return Automaton_0(function(a_32){
42− return function(){
42+ return function(){
43− var Tuple2$bm1__33=m1_27(a_32);
43+ var Tuple2$bm1__33=m1_27(a_32);
44− var b_34=function(){
44+ var b_34=function(){
45− switch(Tuple2$bm1__33[0]){
45+ switch(Tuple2$bm1__33[0]){
46− case "Tuple2":
46+ case "Tuple2":
47− return Tuple2$bm1__33[1];
47+ return Tuple2$bm1__33[1];
49− throw "Non-exhaustive pattern match in case";}();
49+ throw new Error("Non-exhaustive pattern match in case");}();
50− var m1__35=function(){
50+ var m1__35=function(){
51− switch(Tuple2$bm1__33[0]){
51+ switch(Tuple2$bm1__33[0]){
52− case "Tuple2":
52+ case "Tuple2":
53− return Tuple2$bm1__33[2];
53+ return Tuple2$bm1__33[2];
55− throw "Non-exhaustive pattern match in case";}();
55+ throw new Error("Non-exhaustive pattern match in case");}();
56− return function(){
56+ return function(){
57− var Tuple2$cm2__40=m2_29(b_34);
57+ var Tuple2$cm2__40=m2_29(b_34);
58− var c_41=function(){
58+ var c_41=function(){
59− switch(Tuple2$cm2__40[0]){
59+ switch(Tuple2$cm2__40[0]){
60− case "Tuple2":
60+ case "Tuple2":
61− return Tuple2$cm2__40[1];
61+ return Tuple2$cm2__40[1];
63− throw "Non-exhaustive pattern match in case";}();
63+ throw new Error("Non-exhaustive pattern match in case");}();
64− var m2__42=function(){
64+ var m2__42=function(){
65− switch(Tuple2$cm2__40[0]){
65+ switch(Tuple2$cm2__40[0]){
66− case "Tuple2":
66+ case "Tuple2":
67− return Tuple2$cm2__40[2];
67+ return Tuple2$cm2__40[2];
69− throw "Non-exhaustive pattern match in case";}();
69+ throw new Error("Non-exhaustive pattern match in case");}();
70− return ["Tuple2",c_41,$op['>>>'](m1__35)(m2__42)];}();}();});}();};};
70+ return ["Tuple2",c_41,$op['>>>'](m1__35)(m2__42)];}();}();});}();};};
71− $op['<<<'] = function(a2_47){
71+ $op['<<<'] = function(a2_47){
72− return function(a1_48){
72+ return function(a1_48){
73− return $op['>>>'](a1_48)(a2_47);};};
73+ return $op['>>>'](a1_48)(a2_47);};};
74− $op['^>>'] = function(f_49){
74+ $op['^>>'] = function(f_49){
75− return function(a_50){
75+ return function(a_50){
76− return $op['>>>'](pure_4(f_49))(a_50);};};
76+ return $op['>>>'](pure_4(f_49))(a_50);};};
77− $op['>>^'] = function(a_51){
77+ $op['>>^'] = function(a_51){
78− return function(f_52){
78+ return function(f_52){
79− return $op['>>>'](a_51)(pure_4(f_52));};};
79+ return $op['>>>'](a_51)(pure_4(f_52));};};
80− $op['^<<'] = function(f_53){
80+ $op['^<<'] = function(f_53){
81− return function(a_54){
81+ return function(a_54){
82− return $op['>>>'](a_54)(pure_4(f_53));};};
82+ return $op['>>>'](a_54)(pure_4(f_53));};};
83− $op['<<^'] = function(a_55){
83+ $op['<<^'] = function(a_55){
84− return function(f_56){
84+ return function(f_56){
85− return $op['>>>'](pure_4(f_56))(a_55);};};
85+ return $op['>>>'](pure_4(f_56))(a_55);};};
86− var count_7=init_5(0)(function(__84){
86+ var count_7=init_5(0)(function(__84){
87− return function(c_85){
87+ return function(c_85){
88− return (1+c_85);};});
88+ return (1+c_85);};});
89− function run_1(Automaton$m0_14){
89+ function run_1(Automaton$m0_14){
90− return function(input_15){
90+ return function(input_15){
91− return function(){
91+ return function(){
92− switch(Automaton$m0_14[0]){
92+ switch(Automaton$m0_14[0]){
93− case "Automaton":
93+ case "Automaton":
94− return lift(fst)(foldp$(function(a_17){
94+ return lift(fst)(foldp$(function(a_17){
95− return function(Tuple2$bAutomaton$m_18){
95+ return function(Tuple2$bAutomaton$m_18){
96− return function(){
96+ return function(){
97− switch(Tuple2$bAutomaton$m_18[0]){
97+ switch(Tuple2$bAutomaton$m_18[0]){
98− case "Tuple2":
98+ case "Tuple2":
99− switch(Tuple2$bAutomaton$m_18[2][0]){
99+ switch(Tuple2$bAutomaton$m_18[2][0]){
100− case "Automaton":
100+ case "Automaton":
101− return Tuple2$bAutomaton$m_18[2][1](a_17);
101+ return Tuple2$bAutomaton$m_18[2][1](a_17);
104− throw "Non-exhaustive pattern match in case";}();};})(Automaton$m0_14[1])(input_15));
104+ throw new Error("Non-exhaustive pattern match in case");}();};})(Automaton$m0_14[1])(input_15));
106− throw "Non-exhaustive pattern match in case";}();};}
106+ throw new Error("Non-exhaustive pattern match in case");}();};}
107− function step_2(Automaton$m_21){
107+ function step_2(Automaton$m_21){
108− return function(a_22){
108+ return function(a_22){
109− return function(){
109+ return function(){
110− switch(Automaton$m_21[0]){
110+ switch(Automaton$m_21[0]){
111− case "Automaton":
111+ case "Automaton":
112− return Automaton$m_21[1](a_22);
112+ return Automaton$m_21[1](a_22);
114− throw "Non-exhaustive pattern match in case";}();};}
114+ throw new Error("Non-exhaustive pattern match in case");}();};}
115− function combine_3(autos_57){
115+ function combine_3(autos_57){
116− return Automaton_0(function(a_58){
116+ return Automaton_0(function(a_58){
117− return function(){
117+ return function(){
118− var Tuple2$bsautos__59=unzip(map(function(Automaton$m_62){
118+ var Tuple2$bsautos__59=unzip(map(function(Automaton$m_62){
119− return function(){
119+ return function(){
120− switch(Automaton$m_62[0]){
120+ switch(Automaton$m_62[0]){
121− case "Automaton":
121+ case "Automaton":
122− return Automaton$m_62[1](a_58);
122+ return Automaton$m_62[1](a_58);
124− throw "Non-exhaustive pattern match in case";}();})(autos_57));
124+ throw new Error("Non-exhaustive pattern match in case");}();})(autos_57));
125− var bs_60=function(){
125+ var bs_60=function(){
126− switch(Tuple2$bsautos__59[0]){
126+ switch(Tuple2$bsautos__59[0]){
127− case "Tuple2":
127+ case "Tuple2":
128− return Tuple2$bsautos__59[1];
128+ return Tuple2$bsautos__59[1];
130− throw "Non-exhaustive pattern match in case";}();
130+ throw new Error("Non-exhaustive pattern match in case");}();
131− var autos__61=function(){
131+ var autos__61=function(){
132− switch(Tuple2$bsautos__59[0]){
132+ switch(Tuple2$bsautos__59[0]){
133− case "Tuple2":
133+ case "Tuple2":
134− return Tuple2$bsautos__59[2];
134+ return Tuple2$bsautos__59[2];
136− throw "Non-exhaustive pattern match in case";}();
136+ throw new Error("Non-exhaustive pattern match in case");}();
137− return ["Tuple2",bs_60,combine_3(autos__61)];}();});}
137+ return ["Tuple2",bs_60,combine_3(autos__61)];}();});}
138− function pure_4(f_68){
138+ function pure_4(f_68){
139− return Automaton_0(function(x_69){
139+ return Automaton_0(function(x_69){
140− return ["Tuple2",f_68(x_69),pure_4(f_68)];});}
140+ return ["Tuple2",f_68(x_69),pure_4(f_68)];});}
141− function init_5(s_70){
141+ function init_5(s_70){
142− return function(step_71){
142+ return function(step_71){
143− return Automaton_0(function(a_72){
143+ return Automaton_0(function(a_72){
144− return function(){
144+ return function(){
145− var s__73=step_71(a_72)(s_70);
145+ var s__73=step_71(a_72)(s_70);
146− return ["Tuple2",s__73,init_5(s__73)(step_71)];}();});};}
146+ return ["Tuple2",s__73,init_5(s__73)(step_71)];}();});};}
147− function init__6(s_74){
147+ function init__6(s_74){
148− return function(step_75){
148+ return function(step_75){
149− return Automaton_0(function(a_76){
149+ return Automaton_0(function(a_76){
150− return function(){
150+ return function(){
151− var Tuple2$bs__77=step_75(a_76)(s_74);
151+ var Tuple2$bs__77=step_75(a_76)(s_74);
152− var b_78=function(){
152+ var b_78=function(){
153− switch(Tuple2$bs__77[0]){
153+ switch(Tuple2$bs__77[0]){
154− case "Tuple2":
154+ case "Tuple2":
155− return Tuple2$bs__77[1];
155+ return Tuple2$bs__77[1];
157− throw "Non-exhaustive pattern match in case";}();
157+ throw new Error("Non-exhaustive pattern match in case");}();
158− var s__79=function(){
158+ var s__79=function(){
159− switch(Tuple2$bs__77[0]){
159+ switch(Tuple2$bs__77[0]){
160− case "Tuple2":
160+ case "Tuple2":
161− return Tuple2$bs__77[2];
161+ return Tuple2$bs__77[2];
163− throw "Non-exhaustive pattern match in case";}();
163+ throw new Error("Non-exhaustive pattern match in case");}();
164− return ["Tuple2",b_78,init__6(s__79)(step_75)];}();});};}
164+ return ["Tuple2",b_78,init__6(s__79)(step_75)];}();});};}
165− function vecSub_11(Tuple2$x1y1_86){
165+ function vecSub_11(Tuple2$x1y1_86){
166− return function(Tuple2$x2y2_87){
166+ return function(Tuple2$x2y2_87){
167− return function(){
167+ return function(){
168− switch(Tuple2$x1y1_86[0]){
168+ switch(Tuple2$x1y1_86[0]){
169− case "Tuple2":
169+ case "Tuple2":
170− return function(){
170+ return function(){
171− switch(Tuple2$x2y2_87[0]){
171+ switch(Tuple2$x2y2_87[0]){
172− case "Tuple2":
172+ case "Tuple2":
173− return ["Tuple2",(Tuple2$x1y1_86[1]-Tuple2$x2y2_87[1]),(Tuple2$x1y1_86[2]-Tuple2$x2y2_87[2])];
173+ return ["Tuple2",(Tuple2$x1y1_86[1]-Tuple2$x2y2_87[1]),(Tuple2$x1y1_86[2]-Tuple2$x2y2_87[2])];
175− throw "Non-exhaustive pattern match in case";}();
175+ throw new Error("Non-exhaustive pattern match in case");}();
177− throw "Non-exhaustive pattern match in case";}();};}
177+ throw new Error("Non-exhaustive pattern match in case");}();};}
178− function stepDrag_12(Tuple2$presspos_92){
178+ function stepDrag_12(Tuple2$presspos_92){
179− return function(Tuple2$dsform_93){
179+ return function(Tuple2$dsform_93){
180− return function(){
180+ return function(){
181− switch(Tuple2$presspos_92[0]){
181+ switch(Tuple2$presspos_92[0]){
182− case "Tuple2":
182+ case "Tuple2":
183− return function(){
183+ return function(){
184− switch(Tuple2$dsform_93[0]){
184+ switch(Tuple2$dsform_93[0]){
185− case "Tuple2":
185+ case "Tuple2":
186− return function(){
186+ return function(){
187− function wrap_98(ds__99){
187+ function wrap_98(ds__99){
188− return ["Tuple2",Tuple2$dsform_93[2],["Tuple2",ds__99,Tuple2$dsform_93[2]]];}
188+ return ["Tuple2",Tuple2$dsform_93[2],["Tuple2",ds__99,Tuple2$dsform_93[2]]];}
189− return function(){
189+ return function(){
190− switch(Tuple2$dsform_93[1][0]){
190+ switch(Tuple2$dsform_93[1][0]){
191− case "DragFrom":
191+ case "DragFrom":
192− return (Tuple2$presspos_92[1]?["Tuple2",uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]),["Tuple2",DragFrom_10(Tuple2$dsform_93[1][1]),Tuple2$dsform_93[2]]]:function(){
192+ return (Tuple2$presspos_92[1]?["Tuple2",uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]),["Tuple2",DragFrom_10(Tuple2$dsform_93[1][1]),Tuple2$dsform_93[2]]]:function(){
193− var form__101=uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]);
193+ var form__101=uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]);
194− return ["Tuple2",form__101,["Tuple2",Listen_8,form__101]];}());
194+ return ["Tuple2",form__101,["Tuple2",Listen_8,form__101]];}());
195− case "Ignore":
195+ case "Ignore":
196− return wrap_98((Tuple2$presspos_92[1]?Ignore_9:Listen_8));
196+ return wrap_98((Tuple2$presspos_92[1]?Ignore_9:Listen_8));
197− case "Listen":
197+ case "Listen":
198− return wrap_98((not(Tuple2$presspos_92[1])?Listen_8:(isWithin(Tuple2$presspos_92[2])(Tuple2$dsform_93[2])?DragFrom_10(Tuple2$presspos_92[2]):Ignore_9)));
198+ return wrap_98((not(Tuple2$presspos_92[1])?Listen_8:(isWithin(Tuple2$presspos_92[2])(Tuple2$dsform_93[2])?DragFrom_10(Tuple2$presspos_92[2]):Ignore_9)));
200− throw "Non-exhaustive pattern match in case";}();}();
200+ throw new Error("Non-exhaustive pattern match in case");}();}();
202− throw "Non-exhaustive pattern match in case";}();
202+ throw new Error("Non-exhaustive pattern match in case");}();
204− throw "Non-exhaustive pattern match in case";}();};}
204+ throw new Error("Non-exhaustive pattern match in case");}();};}
205− function draggable_13(form_102){
205+ function draggable_13(form_102){
206− return init__6(["Tuple2",Listen_8,form_102])(stepDrag_12);}
206+ return init__6(["Tuple2",Listen_8,form_102])(stepDrag_12);}
207− return {$op : {'>>>' : $op['>>>'], '<<<' : $op['<<<'], '^>>' : $op['^>>'], '>>^' : $op['>>^'], '^<<' : $op['^<<'], '<<^' : $op['<<^']},
207+ return {$op : {'>>>' : $op['>>>'], '<<<' : $op['<<<'], '^>>' : $op['^>>'], '>>^' : $op['>>^'], '^<<' : $op['^<<'], '<<^' : $op['<<^']},
208− run:run_1,
208+ run:run_1,
209− step:step_2,
209+ step:step_2,
210− combine:combine_3,
210+ combine:combine_3,
211− pure:pure_4,
211+ pure:pure_4,
212− init:init_5,
212+ init:init_5,
213− init$:init__6,
213+ init$:init__6,
214− count:count_7,
214+ count:count_7,
215− draggable:draggable_13};}();
215+ draggable:draggable_13};}();
216−Elm.main=function(){
216+Elm.main=function(){
217− return Elm.Automaton.main;};
217+ return Elm.Automaton.main;};
218−} catch (e) {
218+} catch (e) {
219−Elm.main=function() {
219+Elm.main=function() {
220−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>');
220+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>');
221document.body.innerHTML = Elm.Text.monospace(msg);throw e;};}}());
221document.body.innerHTML = Elm.Text.monospace(msg);throw e;};}}());