diff options
Diffstat (limited to 'public/client.js')
-rw-r--r-- | public/client.js | 338 |
1 files changed, 177 insertions, 161 deletions
diff --git a/public/client.js b/public/client.js index d49655b..20e57c8 100644 --- a/public/client.js +++ b/public/client.js @@ -9320,12 +9320,32 @@ var _mgold$elm_random_pcg$Random_Pcg$step = F2( var _p7 = _p6; return _p7._0(seed); }); +var _mgold$elm_random_pcg$Random_Pcg$retry = F3( + function (generator, predicate, seed) { + retry: + while (true) { + var _p8 = A2(_mgold$elm_random_pcg$Random_Pcg$step, generator, seed); + var candidate = _p8._0; + var newSeed = _p8._1; + if (predicate(candidate)) { + return {ctor: '_Tuple2', _0: candidate, _1: newSeed}; + } else { + var _v8 = generator, + _v9 = predicate, + _v10 = newSeed; + generator = _v8; + predicate = _v9; + seed = _v10; + continue retry; + } + } + }); var _mgold$elm_random_pcg$Random_Pcg$Generator = function (a) { return {ctor: 'Generator', _0: a}; }; var _mgold$elm_random_pcg$Random_Pcg$list = F2( - function (n, _p8) { - var _p9 = _p8; + function (n, _p9) { + var _p10 = _p9; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed) { return A4( @@ -9333,7 +9353,7 @@ var _mgold$elm_random_pcg$Random_Pcg$list = F2( _elm_lang$core$Native_List.fromArray( []), n, - _p9._0, + _p10._0, seed); }); }); @@ -9344,13 +9364,13 @@ var _mgold$elm_random_pcg$Random_Pcg$constant = function (value) { }); }; var _mgold$elm_random_pcg$Random_Pcg$map = F2( - function (func, _p10) { - var _p11 = _p10; + function (func, _p11) { + var _p12 = _p11; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { - var _p12 = _p11._0(seed0); - var a = _p12._0; - var seed1 = _p12._1; + var _p13 = _p12._0(seed0); + var a = _p13._0; + var seed1 = _p13._1; return { ctor: '_Tuple2', _0: func(a), @@ -9359,17 +9379,17 @@ var _mgold$elm_random_pcg$Random_Pcg$map = F2( }); }); var _mgold$elm_random_pcg$Random_Pcg$map2 = F3( - function (func, _p14, _p13) { - var _p15 = _p14; - var _p16 = _p13; + function (func, _p15, _p14) { + var _p16 = _p15; + var _p17 = _p14; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { - var _p17 = _p15._0(seed0); - var a = _p17._0; - var seed1 = _p17._1; - var _p18 = _p16._0(seed1); - var b = _p18._0; - var seed2 = _p18._1; + var _p18 = _p16._0(seed0); + var a = _p18._0; + var seed1 = _p18._1; + var _p19 = _p17._0(seed1); + var b = _p19._0; + var seed2 = _p19._1; return { ctor: '_Tuple2', _0: A2(func, a, b), @@ -9394,21 +9414,21 @@ var _mgold$elm_random_pcg$Random_Pcg$andMap = _mgold$elm_random_pcg$Random_Pcg$m return x(y); })); var _mgold$elm_random_pcg$Random_Pcg$map3 = F4( - function (func, _p21, _p20, _p19) { - var _p22 = _p21; - var _p23 = _p20; - var _p24 = _p19; + function (func, _p22, _p21, _p20) { + var _p23 = _p22; + var _p24 = _p21; + var _p25 = _p20; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { - var _p25 = _p22._0(seed0); - var a = _p25._0; - var seed1 = _p25._1; - var _p26 = _p23._0(seed1); - var b = _p26._0; - var seed2 = _p26._1; - var _p27 = _p24._0(seed2); - var c = _p27._0; - var seed3 = _p27._1; + var _p26 = _p23._0(seed0); + var a = _p26._0; + var seed1 = _p26._1; + var _p27 = _p24._0(seed1); + var b = _p27._0; + var seed2 = _p27._1; + var _p28 = _p25._0(seed2); + var c = _p28._0; + var seed3 = _p28._1; return { ctor: '_Tuple2', _0: A3(func, a, b, c), @@ -9417,25 +9437,25 @@ var _mgold$elm_random_pcg$Random_Pcg$map3 = F4( }); }); var _mgold$elm_random_pcg$Random_Pcg$map4 = F5( - function (func, _p31, _p30, _p29, _p28) { - var _p32 = _p31; - var _p33 = _p30; - var _p34 = _p29; - var _p35 = _p28; + function (func, _p32, _p31, _p30, _p29) { + var _p33 = _p32; + var _p34 = _p31; + var _p35 = _p30; + var _p36 = _p29; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { - var _p36 = _p32._0(seed0); - var a = _p36._0; - var seed1 = _p36._1; - var _p37 = _p33._0(seed1); - var b = _p37._0; - var seed2 = _p37._1; - var _p38 = _p34._0(seed2); - var c = _p38._0; - var seed3 = _p38._1; - var _p39 = _p35._0(seed3); - var d = _p39._0; - var seed4 = _p39._1; + var _p37 = _p33._0(seed0); + var a = _p37._0; + var seed1 = _p37._1; + var _p38 = _p34._0(seed1); + var b = _p38._0; + var seed2 = _p38._1; + var _p39 = _p35._0(seed2); + var c = _p39._0; + var seed3 = _p39._1; + var _p40 = _p36._0(seed3); + var d = _p40._0; + var seed4 = _p40._1; return { ctor: '_Tuple2', _0: A4(func, a, b, c, d), @@ -9444,29 +9464,29 @@ var _mgold$elm_random_pcg$Random_Pcg$map4 = F5( }); }); var _mgold$elm_random_pcg$Random_Pcg$map5 = F6( - function (func, _p44, _p43, _p42, _p41, _p40) { - var _p45 = _p44; - var _p46 = _p43; - var _p47 = _p42; - var _p48 = _p41; - var _p49 = _p40; + function (func, _p45, _p44, _p43, _p42, _p41) { + var _p46 = _p45; + var _p47 = _p44; + var _p48 = _p43; + var _p49 = _p42; + var _p50 = _p41; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { - var _p50 = _p45._0(seed0); - var a = _p50._0; - var seed1 = _p50._1; - var _p51 = _p46._0(seed1); - var b = _p51._0; - var seed2 = _p51._1; - var _p52 = _p47._0(seed2); - var c = _p52._0; - var seed3 = _p52._1; - var _p53 = _p48._0(seed3); - var d = _p53._0; - var seed4 = _p53._1; - var _p54 = _p49._0(seed4); - var e = _p54._0; - var seed5 = _p54._1; + var _p51 = _p46._0(seed0); + var a = _p51._0; + var seed1 = _p51._1; + var _p52 = _p47._0(seed1); + var b = _p52._0; + var seed2 = _p52._1; + var _p53 = _p48._0(seed2); + var c = _p53._0; + var seed3 = _p53._1; + var _p54 = _p49._0(seed3); + var d = _p54._0; + var seed4 = _p54._1; + var _p55 = _p50._0(seed4); + var e = _p55._0; + var seed5 = _p55._1; return { ctor: '_Tuple2', _0: A5(func, a, b, c, d, e), @@ -9475,27 +9495,18 @@ var _mgold$elm_random_pcg$Random_Pcg$map5 = F6( }); }); var _mgold$elm_random_pcg$Random_Pcg$andThen = F2( - function (_p55, callback) { - var _p56 = _p55; + function (_p56, callback) { + var _p57 = _p56; return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed) { - var _p57 = _p56._0(seed); - var result = _p57._0; - var newSeed = _p57._1; - var _p58 = callback(result); - var generateB = _p58._0; + var _p58 = _p57._0(seed); + var result = _p58._0; + var newSeed = _p58._1; + var _p59 = callback(result); + var generateB = _p59._0; return generateB(newSeed); }); }); -var _mgold$elm_random_pcg$Random_Pcg$filter = F2( - function (predicate, generator) { - return A2( - _mgold$elm_random_pcg$Random_Pcg$andThen, - generator, - function (a) { - return predicate(a) ? _mgold$elm_random_pcg$Random_Pcg$constant(a) : A2(_mgold$elm_random_pcg$Random_Pcg$filter, predicate, generator); - }); - }); var _mgold$elm_random_pcg$Random_Pcg$maybe = F2( function (genBool, genA) { return A2( @@ -9505,23 +9516,28 @@ var _mgold$elm_random_pcg$Random_Pcg$maybe = F2( return b ? A2(_mgold$elm_random_pcg$Random_Pcg$map, _elm_lang$core$Maybe$Just, genA) : _mgold$elm_random_pcg$Random_Pcg$constant(_elm_lang$core$Maybe$Nothing); }); }); +var _mgold$elm_random_pcg$Random_Pcg$filter = F2( + function (predicate, generator) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + A2(_mgold$elm_random_pcg$Random_Pcg$retry, generator, predicate)); + }); var _mgold$elm_random_pcg$Random_Pcg$Seed = F2( function (a, b) { return {ctor: 'Seed', _0: a, _1: b}; }); -var _mgold$elm_random_pcg$Random_Pcg$next = function (_p59) { - var _p60 = _p59; - var _p61 = _p60._1; +var _mgold$elm_random_pcg$Random_Pcg$next = function (_p60) { + var _p61 = _p60; + var _p62 = _p61._1; return A2( _mgold$elm_random_pcg$Random_Pcg$Seed, - A2(_elm_lang$core$Bitwise$shiftRightLogical, (_p60._0 * 1664525) + _p61, 0), - _p61); + A2(_elm_lang$core$Bitwise$shiftRightLogical, (_p61._0 * 1664525) + _p62, 0), + _p62); }; var _mgold$elm_random_pcg$Random_Pcg$initialSeed = function (x) { - var _p62 = _mgold$elm_random_pcg$Random_Pcg$next( + var _p63 = _mgold$elm_random_pcg$Random_Pcg$next( A2(_mgold$elm_random_pcg$Random_Pcg$Seed, 0, 1013904223)); - var state1 = _p62._0; - var incr = _p62._1; + var state1 = _p63._0; + var incr = _p63._1; var state2 = A2(_elm_lang$core$Bitwise$shiftRightLogical, state1 + x, 0); return _mgold$elm_random_pcg$Random_Pcg$next( A2(_mgold$elm_random_pcg$Random_Pcg$Seed, state2, incr)); @@ -9534,13 +9550,13 @@ var _mgold$elm_random_pcg$Random_Pcg$generate = F2( toMsg, A2( _elm_lang$core$Task$map, - function (_p63) { + function (_p64) { return _elm_lang$core$Basics$fst( A2( _mgold$elm_random_pcg$Random_Pcg$step, generator, _mgold$elm_random_pcg$Random_Pcg$initialSeed( - _elm_lang$core$Basics$round(_p63)))); + _elm_lang$core$Basics$round(_p64)))); }, _elm_lang$core$Time$now)); }); @@ -9548,9 +9564,9 @@ var _mgold$elm_random_pcg$Random_Pcg$int = F2( function (a, b) { return _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { - var _p64 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; - var lo = _p64._0; - var hi = _p64._1; + var _p65 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p65._0; + var hi = _p65._1; var range = (hi - lo) + 1; if (_elm_lang$core$Native_Utils.eq( A2(_elm_lang$core$Bitwise$and, range, range - 1), @@ -9580,8 +9596,8 @@ var _mgold$elm_random_pcg$Random_Pcg$int = F2( var seedN = _mgold$elm_random_pcg$Random_Pcg$next(seed); var x = _mgold$elm_random_pcg$Random_Pcg$peel(seed); if (_elm_lang$core$Native_Utils.cmp(x, threshhold) < 0) { - var _v26 = seedN; - seed = _v26; + var _v29 = seedN; + seed = _v29; continue accountForBias; } else { return { @@ -9626,17 +9642,17 @@ var _mgold$elm_random_pcg$Random_Pcg$sample = function () { function (k, ys) { find: while (true) { - var _p65 = ys; - if (_p65.ctor === '[]') { + var _p66 = ys; + if (_p66.ctor === '[]') { return _elm_lang$core$Maybe$Nothing; } else { if (_elm_lang$core$Native_Utils.eq(k, 0)) { - return _elm_lang$core$Maybe$Just(_p65._0); + return _elm_lang$core$Maybe$Just(_p66._0); } else { - var _v28 = k - 1, - _v29 = _p65._1; - k = _v28; - ys = _v29; + var _v31 = k - 1, + _v32 = _p66._1; + k = _v31; + ys = _v32; continue find; } } @@ -9680,35 +9696,35 @@ var _mgold$elm_random_pcg$Random_Pcg$frequency = function (pairs) { function (choices, n) { pick: while (true) { - var _p66 = choices; - if ((_p66.ctor === '::') && (_p66._0.ctor === '_Tuple2')) { - var _p67 = _p66._0._0; - if (_elm_lang$core$Native_Utils.cmp(n, _p67) < 1) { - return _p66._0._1; + var _p67 = choices; + if ((_p67.ctor === '::') && (_p67._0.ctor === '_Tuple2')) { + var _p68 = _p67._0._0; + if (_elm_lang$core$Native_Utils.cmp(n, _p68) < 1) { + return _p67._0._1; } else { - var _v31 = _p66._1, - _v32 = n - _p67; - choices = _v31; - n = _v32; + var _v34 = _p67._1, + _v35 = n - _p68; + choices = _v34; + n = _v35; continue pick; } } else { return _elm_lang$core$Native_Utils.crashCase( 'Random.Pcg', { - start: {line: 683, column: 13}, - end: {line: 691, column: 77} + start: {line: 688, column: 13}, + end: {line: 696, column: 77} }, - _p66)('Empty list passed to Random.Pcg.frequency!'); + _p67)('Empty list passed to Random.Pcg.frequency!'); } } }); var total = _elm_lang$core$List$sum( A2( _elm_lang$core$List$map, - function (_p69) { + function (_p70) { return _elm_lang$core$Basics$abs( - _elm_lang$core$Basics$fst(_p69)); + _elm_lang$core$Basics$fst(_p70)); }, pairs)); return A2( @@ -9728,7 +9744,7 @@ var _mgold$elm_random_pcg$Random_Pcg$choices = function (gens) { var _mgold$elm_random_pcg$Random_Pcg$independentSeed = _mgold$elm_random_pcg$Random_Pcg$Generator( function (seed0) { var gen = A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, 4294967295); - var _p70 = A2( + var _p71 = A2( _mgold$elm_random_pcg$Random_Pcg$step, A4( _mgold$elm_random_pcg$Random_Pcg$map3, @@ -9740,12 +9756,12 @@ var _mgold$elm_random_pcg$Random_Pcg$independentSeed = _mgold$elm_random_pcg$Ran gen, gen), seed0); - var state = _p70._0._0; - var b = _p70._0._1; - var c = _p70._0._2; - var seed1 = _p70._1; + var state = _p71._0._0; + var b = _p71._0._1; + var c = _p71._0._2; + var seed1 = _p71._1; var incr = A2( - _elm_lang$core$Bitwise$and, + _elm_lang$core$Bitwise$or, A2(_elm_lang$core$Bitwise$xor, b, c), 1); return { @@ -9756,9 +9772,9 @@ var _mgold$elm_random_pcg$Random_Pcg$independentSeed = _mgold$elm_random_pcg$Ran }; }); var _mgold$elm_random_pcg$Random_Pcg$fastForward = F2( - function (delta0, _p71) { - var _p72 = _p71; - var _p75 = _p72._1; + function (delta0, _p72) { + var _p73 = _p72; + var _p76 = _p73._1; var helper = F6( function (accMult, accPlus, curMult, curPlus, delta, repeat) { helper: @@ -9766,7 +9782,7 @@ var _mgold$elm_random_pcg$Random_Pcg$fastForward = F2( var newDelta = A2(_elm_lang$core$Bitwise$shiftRightLogical, delta, 1); var curMult$ = A2(_mgold$elm_random_pcg$Random_Pcg$mul32, curMult, curMult); var curPlus$ = A2(_mgold$elm_random_pcg$Random_Pcg$mul32, curMult + 1, curPlus); - var _p73 = _elm_lang$core$Native_Utils.eq( + var _p74 = _elm_lang$core$Native_Utils.eq( A2(_elm_lang$core$Bitwise$and, delta, 1), 1) ? { ctor: '_Tuple2', @@ -9776,53 +9792,53 @@ var _mgold$elm_random_pcg$Random_Pcg$fastForward = F2( A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accPlus, curMult) + curPlus, 0) } : {ctor: '_Tuple2', _0: accMult, _1: accPlus}; - var accMult$ = _p73._0; - var accPlus$ = _p73._1; + var accMult$ = _p74._0; + var accPlus$ = _p74._1; if (_elm_lang$core$Native_Utils.eq(newDelta, 0)) { if ((_elm_lang$core$Native_Utils.cmp(delta0, 0) < 0) && repeat) { - var _v34 = accMult$, - _v35 = accPlus$, - _v36 = curMult$, - _v37 = curPlus$, - _v38 = -1, - _v39 = false; - accMult = _v34; - accPlus = _v35; - curMult = _v36; - curPlus = _v37; - delta = _v38; - repeat = _v39; + var _v37 = accMult$, + _v38 = accPlus$, + _v39 = curMult$, + _v40 = curPlus$, + _v41 = -1, + _v42 = false; + accMult = _v37; + accPlus = _v38; + curMult = _v39; + curPlus = _v40; + delta = _v41; + repeat = _v42; continue helper; } else { return {ctor: '_Tuple2', _0: accMult$, _1: accPlus$}; } } else { - var _v40 = accMult$, - _v41 = accPlus$, - _v42 = curMult$, - _v43 = curPlus$, - _v44 = newDelta, - _v45 = repeat; - accMult = _v40; - accPlus = _v41; - curMult = _v42; - curPlus = _v43; - delta = _v44; - repeat = _v45; + var _v43 = accMult$, + _v44 = accPlus$, + _v45 = curMult$, + _v46 = curPlus$, + _v47 = newDelta, + _v48 = repeat; + accMult = _v43; + accPlus = _v44; + curMult = _v45; + curPlus = _v46; + delta = _v47; + repeat = _v48; continue helper; } } }); - var _p74 = A6(helper, 1, 0, 1664525, _p75, delta0, true); - var accMultFinal = _p74._0; - var accPlusFinal = _p74._1; + var _p75 = A6(helper, 1, 0, 1664525, _p76, delta0, true); + var accMultFinal = _p75._0; + var accPlusFinal = _p75._1; return A2( _mgold$elm_random_pcg$Random_Pcg$Seed, A2( _elm_lang$core$Bitwise$shiftRightLogical, - A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accMultFinal, _p72._0) + accPlusFinal, + A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accMultFinal, _p73._0) + accPlusFinal, 0), - _p75); + _p76); }); var _mgold$elm_random_pcg$Random_Pcg$fromJson = _elm_lang$core$Json_Decode$oneOf( _elm_lang$core$Native_List.fromArray( |