diff --git a/docs/index.html b/docs/index.html index 432cc2c..a107af9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,7 @@ - + @@ -35,10 +35,10 @@ @@ -69,7 +69,7 @@

- Try online + Try online
@@ -126,7 +126,7 @@

Features

-
+ @@ -166,14 +166,14 @@

Try online now! (Seriously, just write anything below)

- - + + - - - - - - + + + + + + - \ No newline at end of file + diff --git a/docs/stable/elm.js b/docs/stable/elm.js index e920aa3..6bf9836 100644 --- a/docs/stable/elm.js +++ b/docs/stable/elm.js @@ -5322,6 +5322,16 @@ var _elm_community$parser_combinators$Combine_Char$hexDigit = A2( _elm_community$parser_combinators$Combine_Char$satisfy(_elm_lang$core$Char$isHexDigit), 'expected a hexadecimal digit'); +var _Bogdanp$elm_ast$Ast_Helpers$logContent = F2( + function (label, xsParser) { + return A2( + _elm_community$parser_combinators$Combine_ops['>>='], + xsParser, + function (_p0) { + return _elm_community$parser_combinators$Combine$succeed( + A2(_elm_lang$core$Debug$log, label, _p0)); + }); + }); var _Bogdanp$elm_ast$Ast_Helpers$emptyTuple = _elm_community$parser_combinators$Combine$string('()'); var _Bogdanp$elm_ast$Ast_Helpers$name = function (p) { return A2( @@ -5330,6 +5340,16 @@ var _Bogdanp$elm_ast$Ast_Helpers$name = function (p) { _elm_community$parser_combinators$Combine$regex('[a-zA-Z0-9-_]*')); }; var _Bogdanp$elm_ast$Ast_Helpers$upName = _Bogdanp$elm_ast$Ast_Helpers$name(_elm_community$parser_combinators$Combine_Char$upper); +var _Bogdanp$elm_ast$Ast_Helpers$exactIndentation = function ($int) { + return _elm_community$parser_combinators$Combine$regex( + A2( + _elm_lang$core$Basics_ops['++'], + '\n*[ \\t]{', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString($int), + '}\n*'))); +}; var _Bogdanp$elm_ast$Ast_Helpers$spaces_ = _elm_community$parser_combinators$Combine$regex('[ \\t]+'); var _Bogdanp$elm_ast$Ast_Helpers$initialSymbol = function (k) { return A2( @@ -5405,8 +5425,8 @@ var _Bogdanp$elm_ast$Ast_Helpers$reservedOperators = { } }; var _Bogdanp$elm_ast$Ast_Helpers$operator = _elm_community$parser_combinators$Combine$lazy( - function (_p0) { - var _p1 = _p0; + function (_p1) { + var _p2 = _p1; return A2( _elm_community$parser_combinators$Combine_ops['>>='], _elm_community$parser_combinators$Combine$regex('[+\\-\\/*=.$<>:&|^?%#@~!]+|Šs\b'), @@ -7333,13 +7353,35 @@ var _Bogdanp$elm_ast$Ast_Expression$operatorOrAsBetween = _elm_community$parser_ _Bogdanp$elm_ast$Ast_Helpers$operator, _Bogdanp$elm_ast$Ast_Helpers$symbol_('as'))); }); -var _Bogdanp$elm_ast$Ast_Expression$negate = function (x) { - var _p8 = x; - if (_p8.ctor === 'Just') { - return _elm_community$parser_combinators$Combine$fail(''); - } else { - return _elm_community$parser_combinators$Combine$succeed(''); - } +var _Bogdanp$elm_ast$Ast_Expression$countIndent = A2( + _elm_community$parser_combinators$Combine_ops['>>='], + _elm_community$parser_combinators$Combine$whitespace, + function (_p8) { + return _elm_community$parser_combinators$Combine$succeed( + _elm_lang$core$String$length( + A2( + _elm_lang$core$String$filter, + function ($char) { + return _elm_lang$core$Native_Utils.eq( + $char, + _elm_lang$core$Native_Utils.chr(' ')); + }, + _p8))); + }); +var _Bogdanp$elm_ast$Ast_Expression$spacesOrIndentedNewline = function (indentation) { + return _elm_community$parser_combinators$Combine$lazy( + function (_p9) { + var _p10 = _p9; + return A2( + _elm_community$parser_combinators$Combine$or, + _Bogdanp$elm_ast$Ast_Helpers$spaces_, + A2( + _elm_community$parser_combinators$Combine_ops['>>='], + _Bogdanp$elm_ast$Ast_Expression$countIndent, + function (column) { + return (_elm_lang$core$Native_Utils.cmp(column, indentation) < 0) ? _elm_community$parser_combinators$Combine$fail('Arguments have to be at least the same indentation as the function') : _elm_community$parser_combinators$Combine$whitespace; + })); + }); }; var _Bogdanp$elm_ast$Ast_Expression$Stop = function (a) { return {ctor: 'Stop', _0: a}; @@ -7445,8 +7487,8 @@ var _Bogdanp$elm_ast$Ast_Expression$access = A2( _elm_community$parser_combinators$Combine$string('.'), _Bogdanp$elm_ast$Ast_Helpers$loName))); var _Bogdanp$elm_ast$Ast_Expression$simplifiedRecord = _elm_community$parser_combinators$Combine$lazy( - function (_p9) { - var _p10 = _p9; + function (_p11) { + var _p12 = _p11; return A2( _elm_community$parser_combinators$Combine_ops['<$>'], _Bogdanp$elm_ast$Ast_Expression$Record, @@ -7472,18 +7514,18 @@ var _Bogdanp$elm_ast$Ast_Expression$joinL = F2( function (es, ops) { joinL: while (true) { - var _p11 = {ctor: '_Tuple2', _0: es, _1: ops}; + var _p13 = {ctor: '_Tuple2', _0: es, _1: ops}; _v6_2: do { - if ((_p11.ctor === '_Tuple2') && (_p11._0.ctor === '::')) { - if (_p11._0._1.ctor === '[]') { - if (_p11._1.ctor === '[]') { - return _elm_community$parser_combinators$Combine$succeed(_p11._0._0); + if ((_p13.ctor === '_Tuple2') && (_p13._0.ctor === '::')) { + if (_p13._0._1.ctor === '[]') { + if (_p13._1.ctor === '[]') { + return _elm_community$parser_combinators$Combine$succeed(_p13._0._0); } else { break _v6_2; } } else { - if (_p11._1.ctor === '::') { + if (_p13._1.ctor === '::') { var _v7 = { ctor: '::', _0: A3( @@ -7491,14 +7533,14 @@ var _Bogdanp$elm_ast$Ast_Expression$joinL = F2( _Bogdanp$elm_ast$Ast_Expression$Variable( { ctor: '::', - _0: _p11._1._0, + _0: _p13._1._0, _1: {ctor: '[]'} }), - _p11._0._0, - _p11._0._1._0), - _1: _p11._0._1._1 + _p13._0._0, + _p13._0._1._0), + _1: _p13._0._1._1 }, - _v8 = _p11._1._1; + _v8 = _p13._1._1; es = _v7; ops = _v8; continue joinL; @@ -7515,18 +7557,18 @@ var _Bogdanp$elm_ast$Ast_Expression$joinL = F2( }); var _Bogdanp$elm_ast$Ast_Expression$joinR = F2( function (es, ops) { - var _p12 = {ctor: '_Tuple2', _0: es, _1: ops}; + var _p14 = {ctor: '_Tuple2', _0: es, _1: ops}; _v9_2: do { - if ((_p12.ctor === '_Tuple2') && (_p12._0.ctor === '::')) { - if (_p12._0._1.ctor === '[]') { - if (_p12._1.ctor === '[]') { - return _elm_community$parser_combinators$Combine$succeed(_p12._0._0); + if ((_p14.ctor === '_Tuple2') && (_p14._0.ctor === '::')) { + if (_p14._0._1.ctor === '[]') { + if (_p14._1.ctor === '[]') { + return _elm_community$parser_combinators$Combine$succeed(_p14._0._0); } else { break _v9_2; } } else { - if (_p12._1.ctor === '::') { + if (_p14._1.ctor === '::') { return A2( _elm_community$parser_combinators$Combine$andThen, function (e) { @@ -7536,16 +7578,16 @@ var _Bogdanp$elm_ast$Ast_Expression$joinR = F2( _Bogdanp$elm_ast$Ast_Expression$Variable( { ctor: '::', - _0: _p12._1._0, + _0: _p14._1._0, _1: {ctor: '[]'} }), - _p12._0._0, + _p14._0._0, e)); }, A2( _Bogdanp$elm_ast$Ast_Expression$joinR, - {ctor: '::', _0: _p12._0._1._0, _1: _p12._0._1._1}, - _p12._1._1)); + {ctor: '::', _0: _p14._0._1._0, _1: _p14._0._1._1}, + _p14._1._1)); } else { break _v9_2; } @@ -7558,8 +7600,8 @@ var _Bogdanp$elm_ast$Ast_Expression$joinR = F2( }); var _Bogdanp$elm_ast$Ast_Expression$split = F4( function (ops, l, e, eops) { - var _p13 = eops; - if (_p13.ctor === '[]') { + var _p15 = eops; + if (_p15.ctor === '[]') { return _elm_community$parser_combinators$Combine$succeed(e); } else { return A2( @@ -7578,8 +7620,8 @@ var _Bogdanp$elm_ast$Ast_Expression$split = F4( _elm_lang$core$Tuple$first(x)) : _elm_lang$core$Maybe$Nothing; }, eops); - var _p14 = assoc; - if (_p14.ctor === 'R') { + var _p16 = assoc; + if (_p16.ctor === 'R') { return A2(_Bogdanp$elm_ast$Ast_Expression$joinR, es, ops_); } else { return A2(_Bogdanp$elm_ast$Ast_Expression$joinL, es, ops_); @@ -7590,20 +7632,20 @@ var _Bogdanp$elm_ast$Ast_Expression$split = F4( }); var _Bogdanp$elm_ast$Ast_Expression$splitLevel = F4( function (ops, l, e, eops) { - var _p15 = A2( + var _p17 = A2( _elm_community$list_extra$List_Extra$break, A2(_Bogdanp$elm_ast$Ast_Expression$hasLevel, ops, l), eops); - if (_p15._1.ctor === '::') { + if (_p17._1.ctor === '::') { return { ctor: '::', - _0: A4(_Bogdanp$elm_ast$Ast_Expression$split, ops, l + 1, e, _p15._0), - _1: A4(_Bogdanp$elm_ast$Ast_Expression$splitLevel, ops, l, _p15._1._0._1, _p15._1._1) + _0: A4(_Bogdanp$elm_ast$Ast_Expression$split, ops, l + 1, e, _p17._0), + _1: A4(_Bogdanp$elm_ast$Ast_Expression$splitLevel, ops, l, _p17._1._0._1, _p17._1._1) }; } else { return { ctor: '::', - _0: A4(_Bogdanp$elm_ast$Ast_Expression$split, ops, l + 1, e, _p15._0), + _0: A4(_Bogdanp$elm_ast$Ast_Expression$split, ops, l + 1, e, _p17._0), _1: {ctor: '[]'} }; } @@ -7622,9 +7664,9 @@ var _Bogdanp$elm_ast$Ast_Expression$String = function (a) { var _Bogdanp$elm_ast$Ast_Expression$string = function () { var multiString = A2( _elm_community$parser_combinators$Combine_ops['<$>'], - function (_p16) { + function (_p18) { return _Bogdanp$elm_ast$Ast_Expression$String( - _elm_lang$core$String$concat(_p16)); + _elm_lang$core$String$concat(_p18)); }, A2( _elm_community$parser_combinators$Combine_ops['<*'], @@ -7664,42 +7706,42 @@ var _Bogdanp$elm_ast$Ast_Expression$character = A2( _elm_community$parser_combinators$Combine$string('\\'), _elm_community$parser_combinators$Combine$regex('(n|t|r|\\\\|x..)')), function (a) { - var _p17 = _elm_lang$core$String$uncons(a); + var _p19 = _elm_lang$core$String$uncons(a); _v13_6: do { - if (_p17.ctor === 'Just') { - if (_p17._0.ctor === '_Tuple2') { - switch (_p17._0._0.valueOf()) { + if (_p19.ctor === 'Just') { + if (_p19._0.ctor === '_Tuple2') { + switch (_p19._0._0.valueOf()) { case 'n': - if (_p17._0._1 === '') { + if (_p19._0._1 === '') { return _elm_community$parser_combinators$Combine$succeed( _elm_lang$core$Native_Utils.chr('\n')); } else { break _v13_6; } case 't': - if (_p17._0._1 === '') { + if (_p19._0._1 === '') { return _elm_community$parser_combinators$Combine$succeed( _elm_lang$core$Native_Utils.chr('\t')); } else { break _v13_6; } case 'r': - if (_p17._0._1 === '') { + if (_p19._0._1 === '') { return _elm_community$parser_combinators$Combine$succeed( _elm_lang$core$Native_Utils.chr('\r')); } else { break _v13_6; } case '\\': - if (_p17._0._1 === '') { + if (_p19._0._1 === '') { return _elm_community$parser_combinators$Combine$succeed( _elm_lang$core$Native_Utils.chr('\\')); } else { break _v13_6; } case '0': - if (_p17._0._1 === '') { + if (_p19._0._1 === '') { return _elm_community$parser_combinators$Combine$succeed( _elm_lang$core$Native_Utils.chr('')); } else { @@ -7716,7 +7758,7 @@ var _Bogdanp$elm_ast$Ast_Expression$character = A2( _elm_lang$core$Result$map, _elm_lang$core$Char$fromCode, _rtfeldman$hex$Hex$fromString( - _elm_lang$core$String$toLower(_p17._0._1))))); + _elm_lang$core$String$toLower(_p19._0._1))))); default: break _v13_6; } @@ -7731,13 +7773,13 @@ var _Bogdanp$elm_ast$Ast_Expression$character = A2( A2( _elm_lang$core$Basics_ops['++'], 'No such character as \\', - _elm_lang$core$Basics$toString(_p17._0))); + _elm_lang$core$Basics$toString(_p19._0))); }), _elm_community$parser_combinators$Combine_Char$anyChar))); var _Bogdanp$elm_ast$Ast_Expression$term = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p18) { - var _p19 = _p18; + function (_p20) { + var _p21 = _p20; return _elm_community$parser_combinators$Combine$choice( { ctor: '::', @@ -7800,8 +7842,8 @@ var _Bogdanp$elm_ast$Ast_Expression$term = function (ops) { }; var _Bogdanp$elm_ast$Ast_Expression$expression = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p20) { - var _p21 = _p20; + function (_p22) { + var _p23 = _p22; return _elm_community$parser_combinators$Combine$choice( { ctor: '::', @@ -7828,15 +7870,15 @@ var _Bogdanp$elm_ast$Ast_Expression$expression = function (ops) { }; var _Bogdanp$elm_ast$Ast_Expression$binary = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p22) { - var _p23 = _p22; + function (_p24) { + var _p25 = _p24; var next = A2( _elm_community$parser_combinators$Combine_ops['>>='], _Bogdanp$elm_ast$Ast_Expression$operatorOrAsBetween, function (op) { return _elm_community$parser_combinators$Combine$lazy( - function (_p24) { - var _p25 = _p24; + function (_p26) { + var _p27 = _p26; return A2( _elm_community$parser_combinators$Combine_ops['>>='], A2( @@ -7850,21 +7892,21 @@ var _Bogdanp$elm_ast$Ast_Expression$binary = function (ops) { _Bogdanp$elm_ast$Ast_Expression$Stop, _Bogdanp$elm_ast$Ast_Expression$expression(ops))), function (e) { - var _p26 = e; - if (_p26.ctor === 'Cont') { + var _p28 = e; + if (_p28.ctor === 'Cont') { return A2( _elm_community$parser_combinators$Combine_ops['<$>'], F2( function (x, y) { return {ctor: '::', _0: x, _1: y}; })( - {ctor: '_Tuple2', _0: op, _1: _p26._0}), + {ctor: '_Tuple2', _0: op, _1: _p28._0}), _Bogdanp$elm_ast$Ast_Expression$successOrEmptyList(next)); } else { return _elm_community$parser_combinators$Combine$succeed( { ctor: '::', - _0: {ctor: '_Tuple2', _0: op, _1: _p26._0}, + _0: {ctor: '_Tuple2', _0: op, _1: _p28._0}, _1: {ctor: '[]'} }); } @@ -7885,102 +7927,47 @@ var _Bogdanp$elm_ast$Ast_Expression$binary = function (ops) { }); }; var _Bogdanp$elm_ast$Ast_Expression$application = function (ops) { - return _elm_community$parser_combinators$Combine$lazy( - function (_p27) { - var _p28 = _p27; - return A2( - _elm_community$parser_combinators$Combine$chainl, - A2( - _elm_community$parser_combinators$Combine_ops['<$'], - _Bogdanp$elm_ast$Ast_Expression$Application, - _Bogdanp$elm_ast$Ast_Expression$spacesOrIndentedNewline(ops)), - _Bogdanp$elm_ast$Ast_Expression$term(ops)); - }); -}; -var _Bogdanp$elm_ast$Ast_Expression$spacesOrIndentedNewline = function (ops) { return _elm_community$parser_combinators$Combine$lazy( function (_p29) { var _p30 = _p29; - return A2( - _elm_community$parser_combinators$Combine_ops['<|>'], - A2( - _elm_community$parser_combinators$Combine_ops['*>'], - _elm_community$parser_combinators$Combine$regex('[ \\t]*\n[ \\t]+'), - _Bogdanp$elm_ast$Ast_Expression$maybeBindingAhead(ops)), - _Bogdanp$elm_ast$Ast_Helpers$spaces_); - }); -}; -var _Bogdanp$elm_ast$Ast_Expression$maybeBindingAhead = function (ops) { - return _elm_community$parser_combinators$Combine$lazy( - function (_p31) { - var _p32 = _p31; - return _elm_community$parser_combinators$Combine$lookAhead( - A2( - _elm_community$parser_combinators$Combine_ops['>>='], - function (_p33) { - return _elm_community$parser_combinators$Combine$maybe( - _elm_community$parser_combinators$Combine$choice(_p33)); - }( - { - ctor: '::', - _0: _Bogdanp$elm_ast$Ast_Expression$letBinding(ops), - _1: { - ctor: '::', - _0: _Bogdanp$elm_ast$Ast_Expression$caseBinding(ops), - _1: {ctor: '[]'} - } - }), - _Bogdanp$elm_ast$Ast_Expression$negate)); + return _elm_community$parser_combinators$Combine$withColumn( + function (l) { + return A2( + _elm_community$parser_combinators$Combine$chainl, + A2( + _elm_community$parser_combinators$Combine_ops['<$'], + _Bogdanp$elm_ast$Ast_Expression$Application, + _Bogdanp$elm_ast$Ast_Expression$spacesOrIndentedNewline(l)), + _Bogdanp$elm_ast$Ast_Expression$term(ops)); + }); }); }; -var _Bogdanp$elm_ast$Ast_Expression$caseBinding = function (ops) { - return _elm_community$parser_combinators$Combine$lazy( - function (_p34) { - var _p35 = _p34; - return A2( - _elm_community$parser_combinators$Combine_ops['<*>'], - A2( - _elm_community$parser_combinators$Combine_ops['<$>'], - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }), +var _Bogdanp$elm_ast$Ast_Expression$caseExpression = function (ops) { + var binding = function (indent) { + return _elm_community$parser_combinators$Combine$lazy( + function (_p31) { + var _p32 = _p31; + return A2( + _elm_community$parser_combinators$Combine_ops['<*>'], A2( - _elm_community$parser_combinators$Combine_ops['*>'], - _elm_community$parser_combinators$Combine$whitespace, - _Bogdanp$elm_ast$Ast_Expression$expression(ops))), - A2( - _elm_community$parser_combinators$Combine_ops['*>'], - _Bogdanp$elm_ast$Ast_Helpers$symbol('->'), - _Bogdanp$elm_ast$Ast_Expression$expression(ops))); - }); -}; -var _Bogdanp$elm_ast$Ast_Expression$letBinding = function (ops) { - return _elm_community$parser_combinators$Combine$lazy( - function (_p36) { - var _p37 = _p36; - return A2( - _elm_community$parser_combinators$Combine_ops['<*>'], - A2( - _elm_community$parser_combinators$Combine_ops['<$>'], - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }), + _elm_community$parser_combinators$Combine_ops['<$>'], + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2( + _elm_community$parser_combinators$Combine_ops['*>'], + _Bogdanp$elm_ast$Ast_Helpers$exactIndentation(indent), + _Bogdanp$elm_ast$Ast_Expression$expression(ops))), A2( - _Bogdanp$elm_ast$Ast_Helpers$between_, - _elm_community$parser_combinators$Combine$whitespace, - _Bogdanp$elm_ast$Ast_Expression$expression(ops))), - A2( - _elm_community$parser_combinators$Combine_ops['*>'], - _Bogdanp$elm_ast$Ast_Helpers$symbol('='), - _Bogdanp$elm_ast$Ast_Expression$expression(ops))); - }); -}; -var _Bogdanp$elm_ast$Ast_Expression$caseExpression = function (ops) { + _elm_community$parser_combinators$Combine_ops['*>'], + _Bogdanp$elm_ast$Ast_Helpers$symbol('->'), + _Bogdanp$elm_ast$Ast_Expression$expression(ops))); + }); + }; return _elm_community$parser_combinators$Combine$lazy( - function (_p38) { - var _p39 = _p38; + function (_p33) { + var _p34 = _p33; return A2( _elm_community$parser_combinators$Combine_ops['<*>'], A2( @@ -7991,16 +7978,24 @@ var _Bogdanp$elm_ast$Ast_Expression$caseExpression = function (ops) { _Bogdanp$elm_ast$Ast_Helpers$symbol('case'), _Bogdanp$elm_ast$Ast_Expression$expression(ops))), A2( - _elm_community$parser_combinators$Combine_ops['*>'], - _Bogdanp$elm_ast$Ast_Helpers$symbol('of'), - _elm_community$parser_combinators$Combine$many1( - _Bogdanp$elm_ast$Ast_Expression$caseBinding(ops)))); + _elm_community$parser_combinators$Combine_ops['>>='], + A2( + _elm_community$parser_combinators$Combine_ops['*>'], + A2( + _elm_community$parser_combinators$Combine_ops['*>'], + _elm_community$parser_combinators$Combine$whitespace, + _elm_community$parser_combinators$Combine$string('of')), + _elm_community$parser_combinators$Combine$lookAhead(_Bogdanp$elm_ast$Ast_Expression$countIndent)), + function (indent) { + return _elm_community$parser_combinators$Combine$many1( + binding(indent)); + })); }); }; var _Bogdanp$elm_ast$Ast_Expression$ifExpression = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p40) { - var _p41 = _p40; + function (_p35) { + var _p36 = _p35; return A2( _elm_community$parser_combinators$Combine_ops['<*>'], A2( @@ -8024,8 +8019,8 @@ var _Bogdanp$elm_ast$Ast_Expression$ifExpression = function (ops) { }; var _Bogdanp$elm_ast$Ast_Expression$lambda = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p42) { - var _p43 = _p42; + function (_p37) { + var _p38 = _p37; return A2( _elm_community$parser_combinators$Combine_ops['<*>'], A2( @@ -8047,8 +8042,8 @@ var _Bogdanp$elm_ast$Ast_Expression$lambda = function (ops) { }; var _Bogdanp$elm_ast$Ast_Expression$letExpression = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p44) { - var _p45 = _p44; + function (_p39) { + var _p40 = _p39; return A2( _elm_community$parser_combinators$Combine_ops['<*>'], A2( @@ -8065,10 +8060,32 @@ var _Bogdanp$elm_ast$Ast_Expression$letExpression = function (ops) { _Bogdanp$elm_ast$Ast_Expression$expression(ops))); }); }; +var _Bogdanp$elm_ast$Ast_Expression$letBinding = function (ops) { + return _elm_community$parser_combinators$Combine$lazy( + function (_p41) { + var _p42 = _p41; + return A2( + _elm_community$parser_combinators$Combine_ops['<*>'], + A2( + _elm_community$parser_combinators$Combine_ops['<$>'], + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2( + _Bogdanp$elm_ast$Ast_Helpers$between_, + _elm_community$parser_combinators$Combine$whitespace, + _Bogdanp$elm_ast$Ast_Expression$expression(ops))), + A2( + _elm_community$parser_combinators$Combine_ops['*>'], + _Bogdanp$elm_ast$Ast_Helpers$symbol('='), + _Bogdanp$elm_ast$Ast_Expression$expression(ops))); + }); +}; var _Bogdanp$elm_ast$Ast_Expression$list = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p46) { - var _p47 = _p46; + function (_p43) { + var _p44 = _p43; return A2( _elm_community$parser_combinators$Combine_ops['<$>'], _Bogdanp$elm_ast$Ast_Expression$List, @@ -8079,8 +8096,8 @@ var _Bogdanp$elm_ast$Ast_Expression$list = function (ops) { }; var _Bogdanp$elm_ast$Ast_Expression$record = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p48) { - var _p49 = _p48; + function (_p45) { + var _p46 = _p45; return A2( _elm_community$parser_combinators$Combine_ops['<$>'], _Bogdanp$elm_ast$Ast_Expression$Record, @@ -8103,8 +8120,8 @@ var _Bogdanp$elm_ast$Ast_Expression$record = function (ops) { }; var _Bogdanp$elm_ast$Ast_Expression$recordUpdate = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p50) { - var _p51 = _p50; + function (_p47) { + var _p48 = _p47; return A2( _elm_community$parser_combinators$Combine_ops['<*>'], A2( @@ -8133,13 +8150,13 @@ var _Bogdanp$elm_ast$Ast_Expression$recordUpdate = function (ops) { _elm_community$parser_combinators$Combine_ops['*>'], _Bogdanp$elm_ast$Ast_Helpers$symbol('='), _Bogdanp$elm_ast$Ast_Expression$expression(ops))))), - _Bogdanp$elm_ast$Ast_Helpers$symbol('}'))); + _elm_community$parser_combinators$Combine$string('}'))); }); }; var _Bogdanp$elm_ast$Ast_Expression$tuple = function (ops) { return _elm_community$parser_combinators$Combine$lazy( - function (_p52) { - var _p53 = _p52; + function (_p49) { + var _p50 = _p49; return A2( _elm_community$parser_combinators$Combine_ops['<$>'], _Bogdanp$elm_ast$Ast_Expression$Tuple, @@ -8149,11 +8166,11 @@ var _Bogdanp$elm_ast$Ast_Expression$tuple = function (ops) { _Bogdanp$elm_ast$Ast_Helpers$commaSeparated_( _Bogdanp$elm_ast$Ast_Expression$expression(ops))), function (a) { - var _p54 = a; - if ((_p54.ctor === '::') && (_p54._1.ctor === '[]')) { + var _p51 = a; + if ((_p51.ctor === '::') && (_p51._1.ctor === '[]')) { return _elm_community$parser_combinators$Combine$fail('No single tuples'); } else { - return _elm_community$parser_combinators$Combine$succeed(_p54); + return _elm_community$parser_combinators$Combine$succeed(_p51); } })); }); @@ -12729,93 +12746,366 @@ var _evancz$elm_markdown$Markdown$Options = F4( return {githubFlavored: a, defaultHighlighting: b, sanitize: c, smartypants: d}; }); -var _user$project$Helpers$findInList = function (f) { - return A3( - _elm_lang$core$Basics$flip, - _elm_lang$core$List$foldl, - _elm_lang$core$Maybe$Nothing, - F2( - function (a, acc) { - return f(a) ? _elm_lang$core$Maybe$Just(a) : acc; - })); -}; -var _user$project$Helpers$filterMaybe = F2( - function (f, m) { - return A3( - _elm_lang$core$Basics$flip, - _elm_lang$core$Maybe$andThen, - m, - function (a) { - return f(a) ? _elm_lang$core$Maybe$Just(a) : _elm_lang$core$Maybe$Nothing; - }); - }); -var _user$project$Helpers$maybeOr = F2( - function (m1, m2) { - var _p0 = m1; - if (_p0.ctor === 'Just') { - return m1; - } else { - return m2; - } - }); -var _user$project$Helpers_ops = _user$project$Helpers_ops || {}; -_user$project$Helpers_ops['=>'] = F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }); -var _user$project$Helpers$constructApplication = function (list) { - var _p1 = list; - if (_p1.ctor === '[]') { - return _elm_lang$core$Native_Utils.crashCase( - 'Helpers', - { - start: {line: 494, column: 5}, - end: {line: 502, column: 97} - }, - _p1)('Wrong application'); - } else { - if (_p1._1.ctor === '[]') { - return { - ctor: '::', - _0: _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: _p1._0, - _1: {ctor: '[]'} - }), - _1: {ctor: '[]'} - }; - } else { - return { - ctor: '::', - _0: A3( - _elm_lang$core$List$foldl, - F2( - function (a, acc) { - return A2( - _Bogdanp$elm_ast$Ast_Expression$Application, +var _user$project$ExAst$foldExpression = F3( + function (f, acc, t) { + var rec = _elm_lang$core$Basics$flip( + _user$project$ExAst$foldExpression(f)); + return A2( + f, + t, + function () { + var _p0 = t; + switch (_p0.ctor) { + case 'Variable': + return acc; + case 'Character': + return acc; + case 'String': + return acc; + case 'Integer': + return acc; + case 'Float': + return acc; + case 'List': + return A3(_elm_lang$core$List$foldl, rec, acc, _p0._0); + case 'Tuple': + return A3(_elm_lang$core$List$foldl, rec, acc, _p0._0); + case 'Access': + return A2(rec, _p0._0, acc); + case 'AccessFunction': + return acc; + case 'Record': + return A3( + _elm_lang$core$List$foldl, + function (_p1) { + return rec( + _elm_lang$core$Tuple$second(_p1)); + }, + acc, + _p0._0); + case 'RecordUpdate': + return A3( + _elm_lang$core$List$foldl, + function (_p2) { + return rec( + _elm_lang$core$Tuple$second(_p2)); + }, + acc, + _p0._1); + case 'If': + return A2( + rec, + _p0._2, + A2( + rec, + _p0._1, + A2(rec, _p0._0, acc))); + case 'Let': + return A2( + rec, + _p0._1, + A3( + _elm_lang$core$List$foldl, + F2( + function (_p3, lAcc) { + var _p4 = _p3; + return A2( + rec, + _p4._1, + A2(rec, _p4._0, lAcc)); + }), acc, - _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: a, - _1: {ctor: '[]'} - })); - }), - _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: _p1._0, - _1: {ctor: '[]'} - }), - _p1._1), - _1: {ctor: '[]'} - }; - } - } -}; -var _user$project$Helpers$typeApplicationToList = function (application) { - var _p3 = application; + _p0._0)); + case 'Case': + return function (nAcc) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p5, lAcc) { + var _p6 = _p5; + return A2( + rec, + _p6._1, + A2(rec, _p6._0, lAcc)); + }), + nAcc, + _p0._1); + }( + A2(rec, _p0._0, acc)); + case 'Lambda': + return A2( + rec, + _p0._1, + A3(_elm_lang$core$List$foldl, rec, acc, _p0._0)); + case 'Application': + return A2( + rec, + _p0._1, + A2(rec, _p0._0, acc)); + default: + return A2( + rec, + _p0._2, + A2( + rec, + _p0._1, + A2(rec, _p0._0, acc))); + } + }()); + }); +var _user$project$ExAst$walkExpression = F2( + function (f, t) { + var _p7 = f(t); + switch (_p7.ctor) { + case 'Variable': + return _p7; + case 'Character': + return _p7; + case 'String': + return _p7; + case 'Integer': + return _p7; + case 'Float': + return _p7; + case 'List': + return _Bogdanp$elm_ast$Ast_Expression$List( + A2( + _elm_lang$core$List$map, + _user$project$ExAst$walkExpression(f), + _p7._0)); + case 'Tuple': + return _Bogdanp$elm_ast$Ast_Expression$Tuple( + A2( + _elm_lang$core$List$map, + _user$project$ExAst$walkExpression(f), + _p7._0)); + case 'Access': + return A2( + _Bogdanp$elm_ast$Ast_Expression$Access, + A2(_user$project$ExAst$walkExpression, f, _p7._0), + _p7._1); + case 'AccessFunction': + return _p7; + case 'Record': + return _Bogdanp$elm_ast$Ast_Expression$Record( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond( + _user$project$ExAst$walkExpression(f)), + _p7._0)); + case 'RecordUpdate': + return A2( + _Bogdanp$elm_ast$Ast_Expression$RecordUpdate, + _p7._0, + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond( + _user$project$ExAst$walkExpression(f)), + _p7._1)); + case 'If': + return A3( + _Bogdanp$elm_ast$Ast_Expression$If, + A2(_user$project$ExAst$walkExpression, f, _p7._0), + A2(_user$project$ExAst$walkExpression, f, _p7._1), + A2(_user$project$ExAst$walkExpression, f, _p7._2)); + case 'Let': + return A2( + _Bogdanp$elm_ast$Ast_Expression$Let, + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond( + _user$project$ExAst$walkExpression(f)), + _p7._0), + A2(_user$project$ExAst$walkExpression, f, _p7._1)); + case 'Case': + return A2( + _Bogdanp$elm_ast$Ast_Expression$Case, + A2(_user$project$ExAst$walkExpression, f, _p7._0), + A2( + _elm_lang$core$List$map, + function (_p8) { + var _p9 = _p8; + return { + ctor: '_Tuple2', + _0: A2(_user$project$ExAst$walkExpression, f, _p9._0), + _1: A2(_user$project$ExAst$walkExpression, f, _p9._1) + }; + }, + _p7._1)); + case 'Lambda': + return A2( + _Bogdanp$elm_ast$Ast_Expression$Lambda, + A2( + _elm_lang$core$List$map, + _user$project$ExAst$walkExpression(f), + _p7._0), + A2(_user$project$ExAst$walkExpression, f, _p7._1)); + case 'Application': + return A2( + _Bogdanp$elm_ast$Ast_Expression$Application, + A2(_user$project$ExAst$walkExpression, f, _p7._0), + A2(_user$project$ExAst$walkExpression, f, _p7._1)); + default: + return A3( + _Bogdanp$elm_ast$Ast_Expression$BinOp, + A2(_user$project$ExAst$walkExpression, f, _p7._0), + A2(_user$project$ExAst$walkExpression, f, _p7._1), + A2(_user$project$ExAst$walkExpression, f, _p7._2)); + } + }); +var _user$project$ExAst$walkExpressionInwards = F2( + function (f, t) { + return A2( + _user$project$ExAst$walkExpression, + _user$project$ExAst$walkExpressionInwards(f), + f(t)); + }); +var _user$project$ExAst$walkExpressionOutwards = F2( + function (f, t) { + return f( + A2( + _user$project$ExAst$walkExpression, + _user$project$ExAst$walkExpressionOutwards(f), + t)); + }); +var _user$project$ExAst$walkType = F2( + function (walkFunction, t) { + var _p10 = t; + switch (_p10.ctor) { + case 'TypeVariable': + return _p10; + case 'TypeConstructor': + return A2( + _Bogdanp$elm_ast$Ast_Statement$TypeConstructor, + _p10._0, + A2(_elm_lang$core$List$map, walkFunction, _p10._1)); + case 'TypeRecordConstructor': + return A2( + _Bogdanp$elm_ast$Ast_Statement$TypeRecordConstructor, + walkFunction(_p10._0), + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond(walkFunction), + _p10._1)); + case 'TypeTuple': + return _Bogdanp$elm_ast$Ast_Statement$TypeTuple( + A2(_elm_lang$core$List$map, walkFunction, _p10._0)); + case 'TypeRecord': + return _Bogdanp$elm_ast$Ast_Statement$TypeRecord( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond(walkFunction), + _p10._0)); + default: + return A2( + _Bogdanp$elm_ast$Ast_Statement$TypeApplication, + walkFunction(_p10._0), + walkFunction(_p10._1)); + } + }); +var _user$project$ExAst$walkTypeInwards = F2( + function (f, t) { + return A2( + _user$project$ExAst$walkType, + _user$project$ExAst$walkTypeInwards(f), + f(t)); + }); +var _user$project$ExAst$walkTypeOutwards = F2( + function (f, t) { + return f( + A2( + _user$project$ExAst$walkType, + _user$project$ExAst$walkTypeOutwards(f), + t)); + }); + +var _user$project$Helpers$findInList = function (f) { + return A3( + _elm_lang$core$Basics$flip, + _elm_lang$core$List$foldl, + _elm_lang$core$Maybe$Nothing, + F2( + function (a, acc) { + return f(a) ? _elm_lang$core$Maybe$Just(a) : acc; + })); +}; +var _user$project$Helpers$filterMaybe = F2( + function (f, m) { + return A3( + _elm_lang$core$Basics$flip, + _elm_lang$core$Maybe$andThen, + m, + function (a) { + return f(a) ? _elm_lang$core$Maybe$Just(a) : _elm_lang$core$Maybe$Nothing; + }); + }); +var _user$project$Helpers$maybeOr = F2( + function (m1, m2) { + var _p0 = m1; + if (_p0.ctor === 'Just') { + return m1; + } else { + return m2; + } + }); +var _user$project$Helpers_ops = _user$project$Helpers_ops || {}; +_user$project$Helpers_ops['=>'] = F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }); +var _user$project$Helpers$constructApplication = function (list) { + var _p1 = list; + if (_p1.ctor === '[]') { + return _elm_lang$core$Native_Utils.crashCase( + 'Helpers', + { + start: {line: 483, column: 5}, + end: {line: 491, column: 97} + }, + _p1)('Wrong application'); + } else { + if (_p1._1.ctor === '[]') { + return { + ctor: '::', + _0: _Bogdanp$elm_ast$Ast_Expression$Variable( + { + ctor: '::', + _0: _p1._0, + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + }; + } else { + return { + ctor: '::', + _0: A3( + _elm_lang$core$List$foldl, + F2( + function (a, acc) { + return A2( + _Bogdanp$elm_ast$Ast_Expression$Application, + acc, + _Bogdanp$elm_ast$Ast_Expression$Variable( + { + ctor: '::', + _0: a, + _1: {ctor: '[]'} + })); + }), + _Bogdanp$elm_ast$Ast_Expression$Variable( + { + ctor: '::', + _0: _p1._0, + _1: {ctor: '[]'} + }), + _p1._1), + _1: {ctor: '[]'} + }; + } + } +}; +var _user$project$Helpers$typeApplicationToList = function (application) { + var _p3 = application; if (_p3.ctor === 'TypeApplication') { return { ctor: '::', @@ -12836,8 +13126,8 @@ var _user$project$Helpers$listToApplication = function (list) { return _elm_lang$core$Native_Utils.crashCase( 'Helpers', { - start: {line: 467, column: 5}, - end: {line: 475, column: 54} + start: {line: 456, column: 5}, + end: {line: 464, column: 54} }, _p4)('Empty list to expression conversion'); } else { @@ -13206,7 +13496,11 @@ var _user$project$Helpers$reservedBasicFunctions = { _1: { ctor: '::', _0: 'tuple5', - _1: {ctor: '[]'} + _1: { + ctor: '::', + _0: 'rec', + _1: {ctor: '[]'} + } } } } @@ -13269,7 +13563,11 @@ var _user$project$Helpers$reservedWords = { _1: { ctor: '::', _0: 'module', - _1: {ctor: '[]'} + _1: { + ctor: '::', + _0: 'use', + _1: {ctor: '[]'} + } } } } @@ -13449,8 +13747,8 @@ var _user$project$Helpers$replaceOp_ = function (op) { return _elm_lang$core$Native_Utils.crashCase( 'Helpers', { - start: {line: 433, column: 5}, - end: {line: 440, column: 37} + start: {line: 422, column: 5}, + end: {line: 429, column: 37} }, _p9)('Illegal op'); } @@ -13621,8 +13919,8 @@ var _user$project$Helpers$translateOperator = function (op) { return _elm_lang$core$Native_Utils.crashCase( 'Helpers', { - start: {line: 219, column: 5}, - end: {line: 229, column: 25} + start: {line: 206, column: 5}, + end: {line: 216, column: 25} }, _p11)( A2(_elm_lang$core$Basics_ops['++'], op, ' is not a valid or not implemented yet operator')); @@ -13792,28 +14090,6 @@ var _user$project$Helpers$modulePath = function (list) { '.', A2(_elm_lang$core$List$map, snakeIfLower, list))); }; -var _user$project$Helpers$notImplemented = F2( - function (feature, value) { - return _elm_lang$core$Native_Utils.crash( - 'Helpers', - { - start: {line: 25, column: 12}, - end: {line: 25, column: 23} - })( - A2( - _elm_lang$core$Basics_ops['++'], - ' ## ERROR: No ', - A2( - _elm_lang$core$Basics_ops['++'], - feature, - A2( - _elm_lang$core$Basics_ops['++'], - ' implementation for ', - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(value), - A2(_elm_lang$core$Basics_ops['++'], ' yet', '\n')))))); - }); var _user$project$Helpers$Lower = function (a) { return {ctor: 'Lower', _0: a}; }; @@ -13860,6 +14136,44 @@ var _user$project$Helpers$isCustomOperator = function (op) { _user$project$Helpers$Custom); }; +var _user$project$ExContext$notImplemented = F3( + function (c, feature, value) { + return _elm_lang$core$Native_Utils.crash( + 'ExContext', + { + start: {line: 537, column: 12}, + end: {line: 537, column: 23} + })( + A2( + _elm_lang$core$Basics_ops['++'], + ' ## ERROR: No ', + A2( + _elm_lang$core$Basics_ops['++'], + feature, + A2( + _elm_lang$core$Basics_ops['++'], + ' implementation for ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(value), + A2(_elm_lang$core$Basics_ops['++'], ' yet', '\n')))))); + }); +var _user$project$ExContext$crash = F2( + function (c, prompt) { + return _elm_lang$core$Native_Utils.crash( + 'ExContext', + { + start: {line: 520, column: 5}, + end: {line: 520, column: 16} + })( + A2( + _elm_lang$core$Basics_ops['++'], + 'Compilation error:\n\n\t', + A2( + _elm_lang$core$Basics_ops['++'], + prompt, + A2(_elm_lang$core$Basics_ops['++'], '\n\nin module: ', c.mod)))); + }); var _user$project$ExContext$listOfImports = function (shadowed) { var importTuple = function (_p0) { var _p1 = _p0; @@ -13976,13 +14290,7 @@ var _user$project$ExContext$isPrivate = F2( case 'AllExport': return false; default: - return _elm_lang$core$Native_Utils.crashCase( - 'ExContext', - { - start: {line: 359, column: 5}, - end: {line: 370, column: 41} - }, - _p4)('No such export'); + return A2(_user$project$ExContext$crash, context, 'No such export'); } }); var _user$project$ExContext$inArgs = function (c) { @@ -14008,14 +14316,14 @@ var _user$project$ExContext$getAllFlags = F2( _elm_lang$core$Tuple$second, A2( _elm_lang$core$List$filter, - function (_p6) { + function (_p5) { return A2( F2( function (x, y) { return _elm_lang$core$Native_Utils.eq(x, y); }), key, - _elm_lang$core$Tuple$first(_p6)); + _elm_lang$core$Tuple$first(_p5)); }, c.flags)); }); @@ -14050,7 +14358,11 @@ var _user$project$ExContext$changeCurrentModule = F2( var _user$project$ExContext$emptyCommons = {modules: _elm_lang$core$Dict$empty}; var _user$project$ExContext$getArity = F3( function (ctx, m, fn) { - return A2( + var imported = A2( + _elm_lang$core$Maybe$map, + _elm_lang$core$Tuple$second, + A2(_elm_lang$core$Dict$get, fn, ctx.importedFunctions)); + var local = A2( _elm_lang$core$Maybe$map, function (_) { return _.arity; @@ -14064,6 +14376,7 @@ var _user$project$ExContext$getArity = F3( return _.definitions; }, A2(_elm_lang$core$Dict$get, m, ctx.commons.modules)))); + return A2(_user$project$Helpers$maybeOr, local, imported); }); var _user$project$ExContext$areMatchingArity = F4( function (c, mod, fn, args) { @@ -14100,14 +14413,11 @@ var _user$project$ExContext$getType = _user$project$ExContext$getFromContext( function (_) { return _.types; }); -var _user$project$ExContext$wrongArityAlias = F3( - function (arity, list, name) { - return _elm_lang$core$Native_Utils.crash( - 'ExContext', - { - start: {line: 140, column: 5}, - end: {line: 140, column: 16} - })( +var _user$project$ExContext$wrongArityAlias = F4( + function (c, arity, list, name) { + return A2( + _user$project$ExContext$crash, + c, A2( _elm_lang$core$Basics_ops['++'], 'Expected ', @@ -14160,7 +14470,6 @@ var _user$project$ExContext$empty = F2( A4(_user$project$ExContext$Module, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty, exports)) }, inTypeDefiniton: false, - inCaseOf: false, importedTypes: _elm_lang$core$Dict$fromList( { ctor: '::', @@ -14170,7 +14479,10 @@ var _user$project$ExContext$empty = F2( _0: {ctor: '_Tuple2', _0: 'Result', _1: 'Elchemy.XResult'}, _1: {ctor: '[]'} } - }) + }), + importedFunctions: _elm_lang$core$Dict$empty, + meta: _elm_lang$core$Maybe$Nothing, + inMeta: false }; }); var _user$project$ExContext$emptyModule = A4(_user$project$ExContext$Module, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty, _Bogdanp$elm_ast$Ast_Statement$AllExport); @@ -14281,7 +14593,7 @@ var _user$project$ExContext$mergeTypes = F3( return A2( _elm_lang$core$Dict$filter, F2( - function (k, _p7) { + function (k, _p6) { return _elm_lang$core$Native_Utils.eq(k, aliasName); }), A2( @@ -14296,9 +14608,9 @@ var _user$project$ExContext$mergeTypes = F3( return A2( _elm_lang$core$Dict$filter, F2( - function (k, _p8) { - var _p9 = _p8; - return _elm_lang$core$Native_Utils.eq(_p9.parentAlias, aliasName); + function (k, _p7) { + var _p8 = _p7; + return _elm_lang$core$Native_Utils.eq(_p8.parentAlias, aliasName); }), A2( getAll, @@ -14309,10 +14621,10 @@ var _user$project$ExContext$mergeTypes = F3( }); var importOne = F2( function ($export, c) { - var _p10 = $export; - switch (_p10.ctor) { + var _p9 = $export; + switch (_p9.ctor) { case 'TypeExport': - var _p11 = _p10._0; + var _p10 = _p9._0; return A4( putAllLocal, function (_) { @@ -14324,7 +14636,7 @@ var _user$project$ExContext$mergeTypes = F3( m, {types: x}); }), - A2(getTypes, _p11, _p10._1), + A2(getTypes, _p10, _p9._1), A4( putAllLocal, function (_) { @@ -14336,22 +14648,16 @@ var _user$project$ExContext$mergeTypes = F3( m, {aliases: x}); }), - getAlias(_p11), + getAlias(_p10), c)); case 'FunctionExport': return c; default: - return _elm_lang$core$Native_Utils.crashCase( - 'ExContext', - { - start: {line: 474, column: 13}, - end: {line: 484, column: 69} - }, - _p10)('You can\'t import subset of subsets'); + return A2(_user$project$ExContext$crash, c, 'You can\'t import subset of subsets'); } }); - var _p13 = set; - switch (_p13.ctor) { + var _p11 = set; + switch (_p11.ctor) { case 'AllExport': return A4( putAllLocal, @@ -14389,15 +14695,9 @@ var _user$project$ExContext$mergeTypes = F3( mod), c)); case 'SubsetExport': - return A3(_elm_lang$core$List$foldl, importOne, c, _p13._0); + return A3(_elm_lang$core$List$foldl, importOne, c, _p11._0); default: - return _elm_lang$core$Native_Utils.crashCase( - 'ExContext', - { - start: {line: 486, column: 9}, - end: {line: 496, column: 77} - }, - _p13)('You can\'t import something that\'s not a subset'); + return A2(_user$project$ExContext$crash, c, 'You can\'t import something that\'s not a subset'); } }); var _user$project$ExContext$Commons = function (a) { @@ -14415,7 +14715,11 @@ var _user$project$ExContext$Context = function (a) { return function (j) { return function (k) { return function (l) { - return {mod: a, commons: b, exports: c, indent: d, flags: e, variables: f, inArgs: g, hasModuleDoc: h, lastDoc: i, inTypeDefiniton: j, inCaseOf: k, importedTypes: l}; + return function (m) { + return function (n) { + return {mod: a, commons: b, exports: c, indent: d, flags: e, variables: f, inArgs: g, hasModuleDoc: h, lastDoc: i, inTypeDefiniton: j, importedTypes: k, importedFunctions: l, meta: m, inMeta: n}; + }; + }; }; }; }; @@ -14438,114 +14742,20 @@ var _user$project$ExContext$SimpleType = function (a) { var _user$project$ExContext$TypeAlias = {ctor: 'TypeAlias'}; var _user$project$ExContext$Type = {ctor: 'Type'}; -var _user$project$ExAst$walkTypeInwards = F2( - function (f, t) { - var _p0 = f(t); - switch (_p0.ctor) { - case 'TypeVariable': - return _p0; - case 'TypeConstructor': - return A2( - _Bogdanp$elm_ast$Ast_Statement$TypeConstructor, - _p0._0, - A2( - _elm_lang$core$List$map, - _user$project$ExAst$walkTypeInwards(f), - _p0._1)); - case 'TypeRecordConstructor': - return A2( - _Bogdanp$elm_ast$Ast_Statement$TypeRecordConstructor, - A2(_user$project$ExAst$walkTypeInwards, f, _p0._0), - A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapSecond( - _user$project$ExAst$walkTypeInwards(f)), - _p0._1)); - case 'TypeTuple': - return _Bogdanp$elm_ast$Ast_Statement$TypeTuple( - A2( - _elm_lang$core$List$map, - _user$project$ExAst$walkTypeInwards(f), - _p0._0)); - case 'TypeRecord': - return _Bogdanp$elm_ast$Ast_Statement$TypeRecord( - A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapSecond( - _user$project$ExAst$walkTypeInwards(f)), - _p0._0)); - default: - return A2( - _Bogdanp$elm_ast$Ast_Statement$TypeApplication, - A2(_user$project$ExAst$walkTypeInwards, f, _p0._0), - A2(_user$project$ExAst$walkTypeInwards, f, _p0._1)); - } - }); -var _user$project$ExAst$walkTypeOutwards = F2( - function (f, t) { - return f( - function () { - var _p1 = t; - switch (_p1.ctor) { - case 'TypeVariable': - return _p1; - case 'TypeConstructor': - return A2( - _Bogdanp$elm_ast$Ast_Statement$TypeConstructor, - _p1._0, - A2( - _elm_lang$core$List$map, - _user$project$ExAst$walkTypeOutwards(f), - _p1._1)); - case 'TypeTuple': - return _Bogdanp$elm_ast$Ast_Statement$TypeTuple( - A2( - _elm_lang$core$List$map, - _user$project$ExAst$walkTypeOutwards(f), - _p1._0)); - case 'TypeRecord': - return _Bogdanp$elm_ast$Ast_Statement$TypeRecord( - A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapSecond( - _user$project$ExAst$walkTypeOutwards(f)), - _p1._0)); - case 'TypeRecordConstructor': - return A2( - _Bogdanp$elm_ast$Ast_Statement$TypeRecordConstructor, - A2(_user$project$ExAst$walkTypeOutwards, f, _p1._0), - A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapSecond( - _user$project$ExAst$walkTypeOutwards(f)), - _p1._1)); - default: - return A2( - _Bogdanp$elm_ast$Ast_Statement$TypeApplication, - A2(_user$project$ExAst$walkTypeOutwards, f, _p1._0), - A2(_user$project$ExAst$walkTypeOutwards, f, _p1._1)); - } - }()); - }); - var _user$project$ExAlias$localAlias = F2( function (name, context) { return A3(_user$project$ExContext$getAlias, context.mod, name, context); }); -var _user$project$ExAlias$resolveTypes = F3( - function (expected, given, $return) { +var _user$project$ExAlias$resolveTypes = F4( + function (c, expected, given, $return) { var expectedName = function (n) { var _p0 = n; if (_p0.ctor === 'TypeVariable') { return _p0._0; } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExAlias', - { - start: {line: 169, column: 13}, - end: {line: 177, column: 46} - }, - _p0)( + return A2( + _user$project$ExContext$crash, + c, A2( _elm_lang$core$Basics_ops['++'], 'type can only take variables. ', @@ -14568,14 +14778,14 @@ var _user$project$ExAlias$resolveTypes = F3( A2(_elm_lang$core$List$map, expectedName, expected), given)); var replace = function (t) { - var _p2 = t; - if (_p2.ctor === 'TypeVariable') { + var _p1 = t; + if (_p1.ctor === 'TypeVariable') { return A2( _elm_lang$core$Maybe$withDefault, - _p2, - A2(_elm_lang$core$Dict$get, _p2._0, paramsWithResolution)); + _p1, + A2(_elm_lang$core$Dict$get, _p1._0, paramsWithResolution)); } else { - return _p2; + return _p1; } }; return A2(_user$project$ExAst$walkTypeOutwards, replace, $return); @@ -14583,29 +14793,23 @@ var _user$project$ExAlias$resolveTypes = F3( var _user$project$ExAlias$registerTypes = F3( function (types, parentAlias, c) { var addType = F2( - function (t, _p3) { - var _p4 = _p3; - var _p5 = t; - if (((_p5.ctor === 'TypeConstructor') && (_p5._0.ctor === '::')) && (_p5._0._1.ctor === '[]')) { - var _p6 = _p5._0._0; + function (t, _p2) { + var _p3 = _p2; + var _p4 = t; + if (((_p4.ctor === 'TypeConstructor') && (_p4._0.ctor === '::')) && (_p4._0._1.ctor === '[]')) { + var _p5 = _p4._0._0; return A2( _user$project$Helpers_ops['=>'], - {ctor: '::', _0: _p6, _1: _p4._0}, + {ctor: '::', _0: _p5, _1: _p3._0}, A5( _user$project$ExContext$addType, c.mod, parentAlias, - _p6, - _elm_lang$core$List$length(_p5._1), - _p4._1)); + _p5, + _elm_lang$core$List$length(_p4._1), + _p3._1)); } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExAlias', - { - start: {line: 116, column: 13}, - end: {line: 122, column: 65} - }, - _p5)('Type can only start with a tag'); + return A2(_user$project$ExContext$crash, c, 'Type can only start with a tag'); } }); return A3( @@ -14620,15 +14824,15 @@ var _user$project$ExAlias$registerTypes = F3( }); var _user$project$ExAlias$registerUnionType = F3( function (c, tc, types) { - var _p8 = tc; - if (((_p8.ctor === 'TypeConstructor') && (_p8._0.ctor === '::')) && (_p8._0._1.ctor === '[]')) { - var _p10 = _p8._0._0; - var _p9 = A3(_user$project$ExAlias$registerTypes, types, _p10, c); - var names = _p9._0; - var newC = _p9._1; - var arity = _elm_lang$core$List$length(_p8._1); + var _p6 = tc; + if (((_p6.ctor === 'TypeConstructor') && (_p6._0.ctor === '::')) && (_p6._0._1.ctor === '[]')) { + var _p8 = _p6._0._0; + var _p7 = A3(_user$project$ExAlias$registerTypes, types, _p8, c); + var names = _p7._0; + var newC = _p7._1; + var arity = _elm_lang$core$List$length(_p6._1); var typeVar = _Bogdanp$elm_ast$Ast_Statement$TypeVariable( - A2(_elm_lang$core$Basics_ops['++'], '@', _p10)); + A2(_elm_lang$core$Basics_ops['++'], '@', _p8)); var ali = A6( _user$project$ExContext$Alias, c.mod, @@ -14637,29 +14841,25 @@ var _user$project$ExAlias$registerUnionType = F3( typeVar, _user$project$ExContext$SimpleType(typeVar), names); - return A4(_user$project$ExContext$addAlias, c.mod, _p10, ali, newC); + return A4(_user$project$ExContext$addAlias, c.mod, _p8, ali, newC); } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExAlias', - { - start: {line: 80, column: 5}, - end: {line: 98, column: 68} - }, - _p8)( + return A2( + _user$project$ExContext$crash, + c, A2( _elm_lang$core$Basics_ops['++'], 'Wrong type declaration ', - _elm_lang$core$Basics$toString(_p8))); + _elm_lang$core$Basics$toString(_p6))); } }); var _user$project$ExAlias$registerTypeAlias = F3( function (c, tc, t) { - var _p12 = tc; - if (((_p12.ctor === 'TypeConstructor') && (_p12._0.ctor === '::')) && (_p12._0._1.ctor === '[]')) { - var _p14 = _p12._0._0; - var _p13 = _p12._1; - var typeBody = A3(_user$project$ExContext$ArgumentedType, _p14, _p13, t); - var arity = _elm_lang$core$List$length(_p13); + var _p9 = tc; + if (((_p9.ctor === 'TypeConstructor') && (_p9._0.ctor === '::')) && (_p9._0._1.ctor === '[]')) { + var _p11 = _p9._0._0; + var _p10 = _p9._1; + var typeBody = A3(_user$project$ExContext$ArgumentedType, _p11, _p10, t); + var arity = _elm_lang$core$List$length(_p10); var ali = A6( _user$project$ExContext$Alias, c.mod, @@ -14668,31 +14868,27 @@ var _user$project$ExAlias$registerTypeAlias = F3( t, typeBody, {ctor: '[]'}); - return A4(_user$project$ExContext$addAlias, c.mod, _p14, ali, c); + return A4(_user$project$ExContext$addAlias, c.mod, _p11, ali, c); } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExAlias', - { - start: {line: 60, column: 5}, - end: {line: 75, column: 74} - }, - _p12)( + return A2( + _user$project$ExContext$crash, + c, A2( _elm_lang$core$Basics_ops['++'], 'Wrong type alias declaration ', - _elm_lang$core$Basics$toString(_p12))); + _elm_lang$core$Basics$toString(_p9))); } }); -var _user$project$ExAlias$resolveTypeBody = F2( - function (typeBody, givenArgs) { - var _p16 = typeBody; - if (_p16.ctor === 'SimpleType') { - return _p16._0; +var _user$project$ExAlias$resolveTypeBody = F3( + function (c, typeBody, givenArgs) { + var _p12 = typeBody; + if (_p12.ctor === 'SimpleType') { + return _p12._0; } else { - var _p17 = _p16._1; - var expected = _elm_lang$core$List$length(_p17); + var _p13 = _p12._1; + var expected = _elm_lang$core$List$length(_p13); var arity = _elm_lang$core$List$length(givenArgs); - return _elm_lang$core$Native_Utils.eq(arity, expected) ? A3(_user$project$ExAlias$resolveTypes, _p17, givenArgs, _p16._2) : A3(_user$project$ExContext$wrongArityAlias, expected, givenArgs, _p16._0); + return _elm_lang$core$Native_Utils.eq(arity, expected) ? A4(_user$project$ExAlias$resolveTypes, c, _p13, givenArgs, _p12._2) : A4(_user$project$ExContext$wrongArityAlias, c, expected, givenArgs, _p12._0); } }); var _user$project$ExAlias$replaceTypeAliases = F2( @@ -14705,8 +14901,8 @@ var _user$project$ExAlias$replaceTypeAliases = F2( A2( _elm_lang$core$Maybe$andThen, function (body) { - var _p18 = body; - switch (_p18.ctor) { + var _p14 = body; + switch (_p14.ctor) { case 'TypeRecordConstructor': return _elm_lang$core$Maybe$Just(body); case 'TypeApplication': @@ -14717,13 +14913,13 @@ var _user$project$ExAlias$replaceTypeAliases = F2( }, A2( _elm_lang$core$Maybe$map, - function (_p19) { - var _p20 = _p19; - return A2(_user$project$ExAlias$resolveTypeBody, _p20.typeBody, args); + function (_p15) { + var _p16 = _p15; + return A3(_user$project$ExAlias$resolveTypeBody, c, _p16.typeBody, args); }, A2( _user$project$Helpers$filterMaybe, - function (_p21) { + function (_p17) { return A2( F2( function (x, y) { @@ -14732,24 +14928,24 @@ var _user$project$ExAlias$replaceTypeAliases = F2( _user$project$ExContext$TypeAlias, function (_) { return _.aliasType; - }(_p21)); + }(_p17)); }, A3(_user$project$ExContext$getAlias, mod, typeName, c))))); }); var typeConstructorReplace = F3( function ($default, fullType, args) { - return function (_p22) { - var _p23 = _p22; - return A4(mapOrFunUpdate, _p23._0, $default, _p23._1, args); + return function (_p18) { + var _p19 = _p18; + return A4(mapOrFunUpdate, _p19._0, $default, _p19._1, args); }( A2(_user$project$Helpers$moduleAccess, c.mod, fullType)); }); var replaceAlias = function (t) { - var _p24 = t; - if (_p24.ctor === 'TypeConstructor') { - return A3(typeConstructorReplace, t, _p24._0, _p24._1); + var _p20 = t; + if (_p20.ctor === 'TypeConstructor') { + return A3(typeConstructorReplace, t, _p20._0, _p20._1); } else { - return _p24; + return _p20; } }; return A2(_user$project$ExAst$walkTypeOutwards, replaceAlias, t); @@ -14767,14 +14963,14 @@ var _user$project$ExAlias$registerFunctionDefinition = F3( }); var _user$project$ExAlias$registerAlias = F2( function (s, c) { - var _p25 = s; - switch (_p25.ctor) { + var _p21 = s; + switch (_p21.ctor) { case 'TypeAliasDeclaration': - return A3(_user$project$ExAlias$registerTypeAlias, c, _p25._0, _p25._1); + return A3(_user$project$ExAlias$registerTypeAlias, c, _p21._0, _p21._1); case 'TypeDeclaration': - return A3(_user$project$ExAlias$registerUnionType, c, _p25._0, _p25._1); + return A3(_user$project$ExAlias$registerUnionType, c, _p21._0, _p21._1); case 'FunctionTypeDeclaration': - return A3(_user$project$ExAlias$registerFunctionDefinition, c, _p25._0, _p25._1); + return A3(_user$project$ExAlias$registerFunctionDefinition, c, _p21._0, _p21._1); default: return c; } @@ -14784,3836 +14980,4095 @@ var _user$project$ExAlias$getAliases = F2( return A3(_elm_lang$core$List$foldl, _user$project$ExAlias$registerAlias, c, list); }); -var _user$project$ExVariable$bubbleSelect = F2( - function (f, list) { - var findNext = F3( - function (discarded, list, acc) { - findNext: - while (true) { - var _p0 = list; - if (_p0.ctor === '[]') { - return _elm_lang$core$Native_Utils.eq( - discarded, - {ctor: '[]'}) ? _elm_lang$core$Result$Ok( - _elm_lang$core$List$reverse(acc)) : _elm_lang$core$Result$Err(discarded); - } else { - var _p2 = _p0._1; - var _p1 = _p0._0; - var newlist = A2(_elm_lang$core$Basics_ops['++'], discarded, _p2); - if (A2( - _elm_lang$core$List$all, - A2(_elm_lang$core$Basics$flip, f, _p1), - newlist)) { - var _v1 = {ctor: '[]'}, - _v2 = newlist, - _v3 = {ctor: '::', _0: _p1, _1: acc}; - discarded = _v1; - list = _v2; - acc = _v3; - continue findNext; - } else { - var _v4 = {ctor: '::', _0: _p1, _1: discarded}, - _v5 = _p2, - _v6 = acc; - discarded = _v4; - list = _v5; - acc = _v6; - continue findNext; +var _user$project$ExType$hasReturnedType = F2( + function (returned, t) { + var _p0 = _elm_lang$core$List$reverse( + _user$project$Helpers$typeApplicationToList(t)); + if (_p0.ctor === '[]') { + return false; + } else { + return _elm_lang$core$Native_Utils.eq(_p0._0, returned); + } + }); +var _user$project$ExType$typeAliasConstructor = F2( + function (args, _p1) { + typeAliasConstructor: + while (true) { + var _p2 = _p1; + var _p3 = {ctor: '_Tuple2', _0: _p2.aliasType, _1: _p2.body}; + _v2_6: + do { + _v2_0: + do { + if (_p3.ctor === '_Tuple2') { + switch (_p3._1.ctor) { + case 'TypeConstructor': + if (_p3._0.ctor === 'Type') { + break _v2_0; + } else { + if ((_p3._1._0.ctor === '::') && (_p3._1._0._1.ctor === '[]')) { + return _elm_lang$core$Maybe$Nothing; + } else { + break _v2_6; + } + } + case 'TypeRecord': + if (_p3._0.ctor === 'Type') { + break _v2_0; + } else { + var _p6 = _p3._1._0; + var params = A2( + _elm_lang$core$List$map, + function (_p4) { + return _Bogdanp$elm_ast$Ast_Expression$Variable( + _elm_lang$core$List$singleton(_p4)); + }, + A2( + _elm_lang$core$List$map, + function (_p5) { + return A2( + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + 'arg', + _elm_lang$core$Basics$toString(_p5)); + }, + A2( + _elm_lang$core$List$range, + 1, + A2( + F2( + function (x, y) { + return x + y; + }), + 0 - _elm_lang$core$List$length(args), + _elm_lang$core$List$length(_p6))))); + var varargs = A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapFirst(_elm_lang$core$Tuple$first), + A3( + _elm_lang$core$List$map2, + _elm_lang$core$Basics$flip( + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + })), + A2(_elm_lang$core$Basics_ops['++'], args, params), + _p6)); + return _elm_lang$core$Maybe$Just( + A2( + _Bogdanp$elm_ast$Ast_Expression$Lambda, + params, + _Bogdanp$elm_ast$Ast_Expression$Record(varargs))); + } + case 'TypeTuple': + if (_p3._0.ctor === 'Type') { + break _v2_0; + } else { + if ((_p3._1._0.ctor === '::') && (_p3._1._0._1.ctor === '[]')) { + var _v3 = args, + _v4 = _elm_lang$core$Native_Utils.update( + _p2, + { + typeBody: _user$project$ExContext$SimpleType(_p3._1._0._0) + }); + args = _v3; + _p1 = _v4; + continue typeAliasConstructor; + } else { + var args = A2( + _elm_lang$core$List$map, + function (_p7) { + return _Bogdanp$elm_ast$Ast_Expression$Variable( + _elm_lang$core$List$singleton(_p7)); + }, + A2( + _elm_lang$core$List$map, + function (_p8) { + return A2( + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + 'arg', + _elm_lang$core$Basics$toString(_p8)); + }, + A2( + _elm_lang$core$List$range, + 1, + _elm_lang$core$List$length(_p3._1._0)))); + return _elm_lang$core$Maybe$Just( + A2( + _Bogdanp$elm_ast$Ast_Expression$Lambda, + args, + _Bogdanp$elm_ast$Ast_Expression$Tuple(args))); + } + } + case 'TypeVariable': + if (_p3._0.ctor === 'Type') { + break _v2_0; + } else { + return _elm_lang$core$Maybe$Just( + _Bogdanp$elm_ast$Ast_Expression$Variable( + { + ctor: '::', + _0: _p3._1._0, + _1: {ctor: '[]'} + })); + } + default: + if (_p3._0.ctor === 'Type') { + break _v2_0; + } else { + break _v2_6; + } } + } else { + break _v2_6; } - } - }); - var findIndex = F2( - function (discarded, list) { - return A2( - _elm_community$list_extra$List_Extra$break, - function (a) { - return A2( - _elm_lang$core$List$all, - f(a), - discarded); - }, - list); - }); - return A3( - findNext, - {ctor: '[]'}, - list, - {ctor: '[]'}); - }); -var _user$project$ExVariable$withoutVars = F2( - function (vars, right) { - return A2( - _elm_lang$core$List$filter, - function (_p3) { - return !A3(_elm_lang$core$Basics$flip, _elm_lang$core$List$member, vars, _p3); - }, - right); - }); -var _user$project$ExVariable$extractName = function (expression) { - var _p4 = _user$project$Helpers$applicationToList(expression); - if ((_p4.ctor === '::') && (_p4._1.ctor === '[]')) { - if (((_p4._0.ctor === 'Variable') && (_p4._0._0.ctor === '::')) && (_p4._0._0._1.ctor === '[]')) { - return _p4._0._0._0; - } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExVariable', - { - start: {line: 133, column: 5}, - end: {line: 143, column: 40} - }, - _p4)( - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(_p4._0), - ' is not a variable')); + } while(false); + return _elm_lang$core$Maybe$Nothing; + } while(false); + return _elm_lang$core$Maybe$Nothing; } - } else { + }); +var _user$project$ExType$fullImportedType = F2( + function (c, name) { return A2( _elm_lang$core$Maybe$withDefault, - '', + name, A2( _elm_lang$core$Maybe$map, - _user$project$ExVariable$extractName, - _elm_lang$core$List$head(_p4))); - } -}; -var _user$project$ExVariable$extractVariablesUsed = function (exp) { - var none = {ctor: '[]'}; - var one = function ($var) { - return { - ctor: '::', - _0: $var, - _1: {ctor: '[]'} - }; - }; - var many = function (vars) { - return A3( - _elm_lang$core$List$foldr, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - {ctor: '[]'}, - A2(_elm_lang$core$List$map, _user$project$ExVariable$extractVariablesUsed, vars)); - }; - var _p6 = exp; - _v8_12: - do { - _v8_8: - do { - switch (_p6.ctor) { - case 'Record': - return many( - A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$second, _p6._0)); - case 'Tuple': - return many(_p6._0); - case 'Variable': - if ((_p6._0.ctor === '::') && (_p6._0._1.ctor === '[]')) { - return one(_p6._0._0); + function (a) { + return A2( + _elm_lang$core$Basics_ops['++'], + a, + A2(_elm_lang$core$Basics_ops['++'], '.', name)); + }, + A2(_elm_lang$core$Dict$get, 'name', c.importedTypes))); + }); +var _user$project$ExType$getExportedTypeNames = F3( + function (c, mod, subset) { + var _p9 = subset; + switch (_p9.ctor) { + case 'SubsetExport': + return A2( + _elm_lang$core$List$concatMap, + A2(_user$project$ExType$getExportedTypeNames, c, mod), + _p9._0); + case 'TypeExport': + return { + ctor: '::', + _0: _p9._0, + _1: {ctor: '[]'} + }; + case 'AllExport': + return A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, + function (mod) { + return A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Dict$keys(mod.aliases), + _elm_lang$core$Dict$keys(mod.types)); + }, + A2(_elm_lang$core$Dict$get, mod, c.commons.modules))); + default: + return {ctor: '[]'}; + } + }); +var _user$project$ExType$elixirT = F3( + function (flatten, c, t) { + elixirT: + while (true) { + var _p10 = t; + switch (_p10.ctor) { + case 'TypeTuple': + if (_p10._0.ctor === '[]') { + return 'no_return'; } else { - break _v8_12; - } - case 'List': - return many(_p6._0); - case 'Application': - return many( - { - ctor: '::', - _0: _p6._0, - _1: { - ctor: '::', - _0: _p6._1, - _1: {ctor: '[]'} - } - }); - case 'BinOp': - if (((_p6._0.ctor === 'Variable') && (_p6._0._0.ctor === '::')) && (_p6._0._0._1.ctor === '[]')) { - switch (_p6._0._0._0) { - case '::': - return many( - { - ctor: '::', - _0: _p6._1, - _1: { - ctor: '::', - _0: _p6._2, - _1: {ctor: '[]'} - } - }); - case 'as': - if (_p6._2.ctor === 'Variable') { - if (_p6._1.ctor === 'Variable') { - return many( - { - ctor: '::', - _0: _p6._1, - _1: { - ctor: '::', - _0: _p6._2, - _1: {ctor: '[]'} - } - }); - } else { - if ((_p6._2._0.ctor === '::') && (_p6._2._0._1.ctor === '[]')) { - return many( - { - ctor: '::', - _0: _p6._1, - _1: { - ctor: '::', - _0: _p6._2, - _1: {ctor: '[]'} - } - }); - } else { - break _v8_8; - } - } - } else { - break _v8_8; - } - default: - break _v8_8; + if (_p10._0._1.ctor === '[]') { + var _v7 = flatten, + _v8 = c, + _v9 = _p10._0._0; + flatten = _v7; + c = _v8; + t = _v9; + continue elixirT; + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + '{', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + A2(_user$project$ExType$elixirT, flatten, c), + _p10._0)), + '}')); } + } + case 'TypeVariable': + if (_p10._0 === 'number') { + return 'number'; } else { - break _v8_8; + var _p12 = _p10._0; + var _p11 = _elm_lang$core$String$uncons(_p12); + if (((_p11.ctor === 'Just') && (_p11._0.ctor === '_Tuple2')) && (_p11._0._0.valueOf() === '@')) { + return A2(_user$project$Helpers$toSnakeCase, true, _p11._0._1); + } else { + return c.inTypeDefiniton ? _p12 : 'any'; + } } - case 'Case': - return A2( - _user$project$ExVariable$withoutVars, - _user$project$ExVariable$extractVariablesUsed(_p6._0), + case 'TypeConstructor': + var _p13 = A2(_user$project$Helpers$moduleAccess, c.mod, _p10._0); + var mod = _p13._0; + var last = _p13._1; + var modulePath = _elm_lang$core$Native_Utils.eq(mod, c.mod) ? A2( + _elm_lang$core$Maybe$withDefault, + '', A2( - _elm_lang$core$List$concatMap, - _elm_lang$core$Basics$uncurry(_user$project$ExVariable$rightWithoutLeft), - _p6._1)); - case 'Let': + _elm_lang$core$Maybe$map, + function (a) { + return A2(_elm_lang$core$Basics_ops['++'], a, '.'); + }, + A2(_elm_lang$core$Dict$get, last, c.importedTypes))) : A2(_elm_lang$core$Basics_ops['++'], mod, '.'); return A2( - _elm_lang$core$List$concatMap, - _elm_lang$core$Basics$uncurry(_user$project$ExVariable$rightWithoutLeft), - _p6._0); - case 'Lambda': + _elm_lang$core$Basics_ops['++'], + modulePath, + A4(_user$project$ExType$elixirType, flatten, c, last, _p10._1)); + case 'TypeRecord': return A2( - _user$project$ExVariable$withoutVars, - A2(_elm_lang$core$List$concatMap, _user$project$ExVariable$extractVariablesUsed, _p6._0), - _user$project$ExVariable$extractVariablesUsed(_p6._1)); + _elm_lang$core$Basics_ops['++'], + '%{', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 1), + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + A2( + _elm_lang$core$Basics_ops['++'], + ',', + _user$project$Helpers$ind(c.indent + 1)), + A2( + _elm_lang$core$List$map, + function (_p14) { + var _p15 = _p14; + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, false, _p15._0), + A2( + _elm_lang$core$Basics_ops['++'], + ': ', + A3( + _user$project$ExType$elixirT, + flatten, + _user$project$ExContext$indent(c), + _p15._1))); + }, + _p10._0)), + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + '}')))); + case 'TypeRecordConstructor': + return A2( + _elm_lang$core$Basics_ops['++'], + '%{', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 1), + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + _user$project$Helpers$ind(c.indent + 1)), + A3( + _user$project$ExType$typeRecordFields, + _user$project$ExContext$indent(c), + flatten, + _p10)), + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + '}')))); default: - break _v8_12; + var _p19 = _p10._1; + var _p18 = _p10._0; + return flatten ? function (_p16) { + var _p17 = _p16; + return A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + A2( + _user$project$ExType$elixirT, + flatten, + _user$project$ExContext$indent(c)), + {ctor: '::', _0: _p18, _1: _p17._1})), + A2( + _elm_lang$core$Basics_ops['++'], + ' -> ', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$Maybe$withDefault, + '', + A2( + _elm_lang$core$Maybe$map, + A2(_user$project$ExType$elixirT, flatten, c), + _p17._0)), + ')')))); + }( + _user$project$Helpers$lastAndRest( + _user$project$Helpers$typeApplicationToList(_p19))) : A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A3(_user$project$ExType$elixirT, flatten, c, _p18), + A2( + _elm_lang$core$Basics_ops['++'], + ' -> ', + A2( + _elm_lang$core$Basics_ops['++'], + A3(_user$project$ExType$elixirT, flatten, c, _p19), + ')')))); } - } while(false); - return many( - { - ctor: '::', - _0: _p6._1, - _1: { - ctor: '::', - _0: _p6._2, - _1: {ctor: '[]'} - } - }); - } while(false); - return none; -}; -var _user$project$ExVariable$rightWithoutLeft = F2( - function (left, right) { - return A2( - _user$project$ExVariable$withoutVars, - _user$project$ExVariable$extractVariablesUsed(left), - _user$project$ExVariable$extractVariablesUsed(right)); - }); -var _user$project$ExVariable$extractNamesAssigned = function (expression) { - var _p7 = _user$project$Helpers$applicationToList(expression); - if ((_p7.ctor === '::') && (_p7._1.ctor === '[]')) { - if (((_p7._0.ctor === 'Variable') && (_p7._0._0.ctor === '::')) && (_p7._0._0._1.ctor === '[]')) { - return { - ctor: '::', - _0: _p7._0._0._0, - _1: {ctor: '[]'} - }; - } else { - return _user$project$ExVariable$extractVariablesUsed(_p7._0); } - } else { - return A2( - _elm_lang$core$Maybe$withDefault, - {ctor: '[]'}, - A2( - _elm_lang$core$Maybe$map, - _user$project$ExVariable$extractNamesAssigned, - _elm_lang$core$List$head(_p7))); - } -}; -var _user$project$ExVariable$extractArguments = function (expression) { - var _p8 = _user$project$Helpers$applicationToList(expression); - if ((_p8.ctor === '::') && (_p8._1.ctor === '[]')) { - return {ctor: '[]'}; - } else { - return A2( - _elm_lang$core$Maybe$withDefault, - {ctor: '[]'}, - A2( - _elm_lang$core$Maybe$map, - _elm_lang$core$List$concatMap(_user$project$ExVariable$extractNamesAssigned), - _elm_lang$core$List$tail(_p8))); - } -}; -var _user$project$ExVariable$isIn = F2( - function (_p10, _p9) { - var _p11 = _p10; - var _p12 = _p9; - var anyMembers = F2( - function (members, list) { - return A2( - _elm_lang$core$List$any, - A2(_elm_lang$core$Basics$flip, _elm_lang$core$List$member, list), - members); - }); - return A2( - anyMembers, - _user$project$ExVariable$extractNamesAssigned(_p11._0), - A2( - _user$project$ExVariable$withoutVars, - _user$project$ExVariable$extractArguments(_p12._0), - _user$project$ExVariable$extractVariablesUsed(_p12._1))); - }); -var _user$project$ExVariable$organizeLetInVariablesOrder = function (expressionList) { - var _p13 = A2( - _user$project$ExVariable$bubbleSelect, - F2( - function (a, b) { - return !A2(_user$project$ExVariable$isIn, a, b); - }), - expressionList); - if (_p13.ctor === 'Ok') { - return _p13._0; - } else { - var _p14 = _elm_lang$core$Native_Utils.crash( - 'ExVariable', - { - start: {line: 122, column: 21}, - end: {line: 122, column: 32} - })( - A2( - _elm_lang$core$Basics_ops['++'], - 'Couldn\'t find a solution to ', - _elm_lang$core$Basics$toString( - A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$first, _p13._0)))); - return {ctor: '[]'}; - } -}; -var _user$project$ExVariable$groupByCrossDependency = function (expressionsList) { - return A2( - _elm_community$list_extra$List_Extra$groupWhile, - F2( - function (l, r) { - return A2(_user$project$ExVariable$isIn, l, r) && A2(_user$project$ExVariable$isIn, r, l); - }), - expressionsList); -}; -var _user$project$ExVariable$varOrNah = F2( - function (c, $var) { - return (A2(_elm_lang$core$Set$member, $var, c.variables) || c.inArgs) ? $var : A2(_elm_lang$core$Basics_ops['++'], $var, '()'); - }); -var _user$project$ExVariable$rememberVariables = F2( - function (list, c) { - var addToContext = F2( - function ($var, context) { - return _elm_lang$core$Native_Utils.update( - context, - { - variables: A2( - _elm_lang$core$Set$insert, - A2(_user$project$Helpers$toSnakeCase, true, $var), - context.variables) - }); - }); - return A3( - _elm_lang$core$List$foldl, - addToContext, - c, - A3( - _elm_lang$core$List$foldr, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - {ctor: '[]'}, - A2(_elm_lang$core$List$map, _user$project$ExVariable$extractVariablesUsed, list))); - }); - -var _user$project$ExFunction$getLambdaArgumentIndexes = function (t) { - return A2( - _elm_lang$core$List$filter, - function (_p0) { - var _p1 = _p0; - return _elm_lang$core$Native_Utils.cmp(_p1._1, 1) > 0; - }, - A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapSecond( - function (_p2) { - return A2( - F2( - function (x, y) { - return x + y; - }), - -1, - _elm_lang$core$List$length(_p2)); - }), - A2( - _elm_lang$core$List$indexedMap, - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }), - A2( - _elm_lang$core$List$map, - _user$project$Helpers$typeApplicationToList, - A2( - _elm_lang$core$Maybe$withDefault, - {ctor: '[]'}, - A2(_elm_lang$core$Maybe$map, _user$project$Helpers$typeApplicationToList, t)))))); -}; -var _user$project$ExFunction$privateOrPublic = F2( - function (context, name) { - return A2(_user$project$ExContext$isPrivate, context, name) ? 'p' : ''; }); -var _user$project$ExFunction$functionCurry = F5( - function (c, elixirE, name, arity, lambdasAt) { - var _p3 = { - ctor: '_Tuple2', - _0: arity, - _1: A3(_user$project$ExContext$hasFlag, 'nocurry', name, c) - }; - _v1_0: +var _user$project$ExType$elixirType = F4( + function (flatten, c, name, args) { + var _p20 = {ctor: '_Tuple2', _0: name, _1: args}; + _v13_13: do { - if (_p3._1 === true) { - if (_p3._0 === 0) { - break _v1_0; - } else { - return ''; - } - } else { - if (_p3._0 === 0) { - break _v1_0; - } else { - var _p6 = _p3._0; - var lambdas = A2( - _elm_lang$core$List$map, - function (_p4) { - var _p5 = _p4; + if (_p20._1.ctor === '::') { + if (_p20._1._1.ctor === '[]') { + switch (_p20._0) { + case 'List': + return A2( + _elm_lang$core$Basics_ops['++'], + 'list(', + A2( + _elm_lang$core$Basics_ops['++'], + A3(_user$project$ExType$elixirT, flatten, c, _p20._1._0), + ')')); + case 'Maybe': return A2( _elm_lang$core$Basics_ops['++'], '{', A2( _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(_p5._0), - A2( - _elm_lang$core$Basics_ops['++'], - ', ', - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(_p5._1), - '}')))); - }, - lambdasAt); - var p = A2(_user$project$ExFunction$privateOrPublic, c, name); - var resolvedName = _user$project$Helpers$isCustomOperator(name) ? _user$project$Helpers$translateOperator(name) : A2(_user$project$Helpers$toSnakeCase, true, name); - return (_elm_lang$core$Native_Utils.eq( - lambdas, - {ctor: '[]'}) || _elm_lang$core$Native_Utils.eq(p, 'p')) ? A2( + A3(_user$project$ExType$elixirT, flatten, c, _p20._1._0), + '} | nil')); + case 'Just': + return A3(_user$project$ExType$elixirT, flatten, c, _p20._1._0); + case 'Err': + return A2( + _elm_lang$core$Basics_ops['++'], + '{:error, ', + A2( + _elm_lang$core$Basics_ops['++'], + A3(_user$project$ExType$elixirT, flatten, c, _p20._1._0), + '}')); + case 'Ok': + var _p21 = _p20._1._0; + return _elm_lang$core$Native_Utils.eq( + _p21, + _Bogdanp$elm_ast$Ast_Statement$TypeTuple( + {ctor: '[]'})) ? 'ok' : A2( + _elm_lang$core$Basics_ops['++'], + '{:ok,', + A2( + _elm_lang$core$Basics_ops['++'], + A3(_user$project$ExType$elixirT, flatten, c, _p21), + '}')); + default: + break _v13_13; + } + } else { + break _v13_13; + } + } else { + switch (_p20._0) { + case 'String': + return 'String.t'; + case 'Char': + return 'integer'; + case 'Bool': + return 'boolean'; + case 'Int': + return 'integer'; + case 'Pid': + return 'pid'; + case 'Float': + return 'float'; + case 'Nothing': + return 'nil'; + default: + return A2(_user$project$Helpers$toSnakeCase, true, _p20._0); + } + } + } while(false); + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, _p20._0), + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( _elm_lang$core$String$join, - '', - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'curry', - _1: { - ctor: '::', - _0: ' ', - _1: { - ctor: '::', - _0: resolvedName, - _1: { - ctor: '::', - _0: '/', - _1: { + ', ', + A2( + _elm_lang$core$List$map, + A2(_user$project$ExType$elixirT, flatten, c), + _p20._1)), + ')'))); + }); +var _user$project$ExType$typeRecordFields = F3( + function (c, flatten, t) { + typeRecordFields: + while (true) { + var keyValuePair = function (_p22) { + var _p23 = _p22; + return A2( + _elm_lang$core$Basics_ops['++'], + _p23._0, + A2( + _elm_lang$core$Basics_ops['++'], + ': ', + A3(_user$project$ExType$elixirT, flatten, c, _p23._1))); + }; + var _p24 = t; + _v15_6: + do { + switch (_p24.ctor) { + case 'TypeRecordConstructor': + switch (_p24._0.ctor) { + case 'TypeConstructor': + if ((_p24._0._0.ctor === '::') && (_p24._0._0._1.ctor === '[]')) { + var inherited = A2( + _elm_lang$core$Maybe$map, + A2(_user$project$ExType$typeRecordFields, c, flatten), + A2( + _elm_lang$core$Maybe$map, + function (_p25) { + var _p26 = _p25; + return A3(_user$project$ExAlias$resolveTypeBody, c, _p26.typeBody, _p24._0._1); + }, + A3(_user$project$ExContext$getAlias, c.mod, _p24._0._0._0, c))); + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$List$map, keyValuePair, _p24._1), + A2( + _elm_lang$core$Maybe$withDefault, + { ctor: '::', - _0: _elm_lang$core$Basics$toString(_p6), + _0: '', _1: {ctor: '[]'} - } - } - } + }, + inherited)); + } else { + break _v15_6; } - } - }) : A2( - _elm_lang$core$String$join, - '', - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'curry', - _1: { - ctor: '::', - _0: ' ', - _1: { - ctor: '::', - _0: resolvedName, - _1: { - ctor: '::', - _0: '/', - _1: { - ctor: '::', - _0: _elm_lang$core$Basics$toString(_p6), - _1: { - ctor: '::', - _0: ', lambdas: [', - _1: { - ctor: '::', - _0: A2(_elm_lang$core$String$join, ', ', lambdas), - _1: { - ctor: '::', - _0: ']', - _1: {ctor: '[]'} - } - } - } - } - } - } + case 'TypeRecord': + return A2( + _elm_lang$core$List$map, + keyValuePair, + A2(_elm_lang$core$Basics_ops['++'], _p24._1, _p24._0._0)); + case 'TypeVariable': + return A2(_elm_lang$core$List$map, keyValuePair, _p24._1); + case 'TypeTuple': + if ((_p24._0._0.ctor === '::') && (_p24._0._0._1.ctor === '[]')) { + var _v17 = c, + _v18 = flatten, + _v19 = A2(_Bogdanp$elm_ast$Ast_Statement$TypeRecordConstructor, _p24._0._0._0, _p24._1); + c = _v17; + flatten = _v18; + t = _v19; + continue typeRecordFields; + } else { + break _v15_6; } - } - }); + case 'TypeRecordConstructor': + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$List$map, keyValuePair, _p24._1), + A3(_user$project$ExType$typeRecordFields, c, flatten, _p24._0)); + default: + break _v15_6; + } + case 'TypeRecord': + return A2(_elm_lang$core$List$map, keyValuePair, _p24._0); + default: + break _v15_6; } + } while(false); + return A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'Wrong type record constructor ', + _elm_lang$core$Basics$toString(_p24))); + } + }); +var _user$project$ExType$elixirTFlat = _user$project$ExType$elixirT(true); +var _user$project$ExType$elixirTNoFlat = _user$project$ExType$elixirT(false); +var _user$project$ExType$typespec0 = F2( + function (c, t) { + return A2( + _elm_lang$core$Basics_ops['++'], + '() :: ', + A2(_user$project$ExType$elixirTNoFlat, c, t)); + }); +var _user$project$ExType$typespec = F2( + function (c, t) { + var _p27 = _user$project$Helpers$lastAndRest( + _user$project$Helpers$typeApplicationToList(t)); + if (_p27._0.ctor === 'Just') { + return A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + _user$project$ExType$elixirTNoFlat(c), + _p27._1)), + A2( + _elm_lang$core$Basics_ops['++'], + ') :: ', + A2(_user$project$ExType$elixirTNoFlat, c, _p27._0._0)))); + } else { + return A2(_user$project$ExContext$crash, c, 'impossible'); + } + }); +var _user$project$ExType$uniontype = F2( + function (c, t) { + var _p28 = t; + if (((_p28.ctor === 'TypeConstructor') && (_p28._0.ctor === '::')) && (_p28._0._1.ctor === '[]')) { + if (_p28._1.ctor === '[]') { + return _user$project$Helpers$atomize(_p28._0._0); + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + '{', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$atomize(_p28._0._0), + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + _user$project$ExType$elixirTNoFlat(c), + _p28._1)), + '}')))); } - } while(false); - return ''; + } else { + return A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'I am looking for union type constructor. But got ', + _elm_lang$core$Basics$toString(_p28))); + } }); -var _user$project$ExFunction$genElixirFunc = F6( - function (c, elixirE, name, args, missingArgs, body) { - var _p7 = { - ctor: '_Tuple2', - _0: _user$project$Helpers$operatorType(name), - _1: args +var _user$project$ExType$aliasOr = F4( + function (c, name, args, $default) { + return A2( + _elm_lang$core$Maybe$withDefault, + $default, + _elm_lang$core$Maybe$map( + function (_p29) { + var _p30 = _p29; + var _p33 = _p30.typeBody; + var _p32 = _p30.parentModule; + if (_elm_lang$core$Native_Utils.eq(_p32, c.mod)) { + return A2( + _user$project$ExType$elixirTNoFlat, + c, + A3(_user$project$ExAlias$resolveTypeBody, c, _p33, args)); + } else { + var _p31 = _p30.aliasType; + if (_p31.ctor === 'Type') { + return A2( + _elm_lang$core$Basics_ops['++'], + _p32, + A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _user$project$ExType$elixirTNoFlat, + c, + A3(_user$project$ExAlias$resolveTypeBody, c, _p33, args)))); + } else { + return A2( + _user$project$ExType$elixirTNoFlat, + _elm_lang$core$Native_Utils.update( + c, + {mod: _p32}), + A3(_user$project$ExAlias$resolveTypeBody, c, _p33, args)); + } + } + })( + A3(_user$project$ExContext$getAlias, c.mod, name, c))); + }); + +var _user$project$ExOperator$flattenPipes = function (e) { + var _p0 = e; + if (((((_p0.ctor === 'BinOp') && (_p0._0.ctor === 'Variable')) && (_p0._0._0.ctor === '::')) && (_p0._0._0._0 === '|>')) && (_p0._0._0._1.ctor === '[]')) { + if (((((_p0._2.ctor === 'BinOp') && (_p0._2._0.ctor === 'Variable')) && (_p0._2._0._0.ctor === '::')) && (_p0._2._0._0._0 === '|>')) && (_p0._2._0._0._1.ctor === '[]')) { + return A2( + _elm_lang$core$Basics_ops['++'], + { + ctor: '::', + _0: _p0._1, + _1: {ctor: '[]'} + }, + _user$project$ExOperator$flattenPipes(_p0._2)); + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + { + ctor: '::', + _0: _p0._1, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _p0._2, + _1: {ctor: '[]'} + }); + } + } else { + return { + ctor: '::', + _0: _p0, + _1: {ctor: '[]'} }; - switch (_p7._0.ctor) { - case 'Custom': - return A2( - _elm_lang$core$String$join, - '', - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'def', - _1: { - ctor: '::', - _0: A2(_user$project$ExFunction$privateOrPublic, c, name), - _1: { - ctor: '::', - _0: ' ', - _1: { - ctor: '::', - _0: _user$project$Helpers$translateOperator(name), - _1: { - ctor: '::', - _0: '(', - _1: { - ctor: '::', - _0: A2( - _elm_lang$core$String$join, - ', ', - A3( - _elm_lang$core$Basics$flip, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - _user$project$Helpers$generateArguments(missingArgs), - A2( - _elm_lang$core$List$map, - elixirE( - A2(_user$project$ExVariable$rememberVariables, args, c)), - args))), - _1: { - ctor: '::', - _0: ') do', - _1: { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent + 1), - _1: { - ctor: '::', - _0: A2( - elixirE, - A2( - _user$project$ExVariable$rememberVariables, - args, - _user$project$ExContext$indent(c)), - body), - _1: { - ctor: '::', - _0: A2( - _elm_lang$core$String$join, - '', - A2( - _elm_lang$core$List$map, - function (a) { - return A2( - _elm_lang$core$Basics_ops['++'], - '.(', - A2(_elm_lang$core$Basics_ops['++'], a, ')')); - }, - _user$project$Helpers$generateArguments(missingArgs))), - _1: { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'end', - _1: {ctor: '[]'} - } - } - } - } - } - } - } - } - } - } - } - } - }); - case 'Builtin': - if (((_p7._1.ctor === '::') && (_p7._1._1.ctor === '::')) && (_p7._1._1._1.ctor === '[]')) { - var _p9 = _p7._1._1._0; - var _p8 = _p7._1._0; + } +}; +var _user$project$ExOperator$elixirBinop = F5( + function (c, elixirE, op, l, r) { + elixirBinop: + while (true) { + var _p1 = op; + switch (_p1) { + case '//': return A2( - _elm_lang$core$String$join, - '', - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { + _elm_lang$core$Basics_ops['++'], + 'div(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, r), + ')')))); + case '%': + return A2( + _elm_lang$core$Basics_ops['++'], + 'rem(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, r), + ')')))); + case '^': + return A2( + _elm_lang$core$Basics_ops['++'], + ':math.pow(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, r), + ')')))); + case '::': + return A2( + _elm_lang$core$Basics_ops['++'], + '[', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + ' | ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, r), + ']')))); + case '<<': + var _v2 = c, + _v3 = elixirE, + _v4 = '>>', + _v5 = r, + _v6 = l; + c = _v2; + elixirE = _v3; + op = _v4; + l = _v5; + r = _v6; + continue elixirBinop; + case '<|': + if (_elm_lang$core$Native_Utils.eq( + l, + _Bogdanp$elm_ast$Ast_Expression$Variable( + { ctor: '::', - _0: 'def', - _1: { + _0: 'Do', + _1: {ctor: '[]'} + }))) { + return A2( + _elm_lang$core$Basics_ops['++'], + 'quote do ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, r), + ' end')); + } else { + var _v7 = c, + _v8 = elixirE, + _v9 = '|>', + _v10 = r, + _v11 = l; + c = _v7; + elixirE = _v8; + op = _v9; + l = _v10; + r = _v11; + continue elixirBinop; + } + case '|>': + return A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + '', + A2( + _elm_lang$core$List$map, + A2( + _elm_lang$core$Basics$flip, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + ').()'), + A2( + _elm_lang$core$List$map, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + })( + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + '|> (')), + A2( + _elm_lang$core$List$map, + elixirE(c), + _user$project$ExOperator$flattenPipes(r))))), + ')'))); + case 'as': + return A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + ' = ', + A2(elixirE, c, r))); + default: + var _p3 = _p1; + var _p2 = _user$project$Helpers$operatorType(_p3); + switch (_p2.ctor) { + case 'Builtin': + return A2( + _elm_lang$core$String$join, + '', + { ctor: '::', - _0: A2(_user$project$ExFunction$privateOrPublic, c, name), + _0: '(', _1: { ctor: '::', - _0: ' ', + _0: A2(elixirE, c, l), _1: { ctor: '::', - _0: A2( - elixirE, - A2( - _user$project$ExVariable$rememberVariables, - { - ctor: '::', - _0: _p8, - _1: {ctor: '[]'} - }, - c), - _p8), + _0: ' ', _1: { ctor: '::', - _0: ' ', + _0: _user$project$Helpers$translateOperator(_p3), _1: { ctor: '::', - _0: _user$project$Helpers$translateOperator(name), + _0: ' ', _1: { ctor: '::', - _0: ' ', + _0: A2(elixirE, c, r), _1: { ctor: '::', - _0: A2( - elixirE, - A2( - _user$project$ExVariable$rememberVariables, - { - ctor: '::', - _0: _p9, - _1: {ctor: '[]'} - }, - c), - _p9), - _1: { - ctor: '::', - _0: ' do', - _1: { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent + 1), - _1: { - ctor: '::', - _0: A2( - elixirE, - A2( - _user$project$ExVariable$rememberVariables, - args, - _user$project$ExContext$indent(c)), - body), - _1: { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'end', - _1: {ctor: '[]'} - } - } - } - } - } + _0: ')', + _1: {ctor: '[]'} } } } } } } - } - } - }); - } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExFunction', - { - start: {line: 113, column: 5}, - end: {line: 195, column: 38} - }, - _p7)( - A2( - _elm_lang$core$Basics_ops['++'], - 'operator ', - A2( + }); + case 'Custom': + return A2( _elm_lang$core$Basics_ops['++'], - name, + _user$project$Helpers$translateOperator(_p3), A2( _elm_lang$core$Basics_ops['++'], - ' has to have 2 arguments but has ', - _elm_lang$core$Basics$toString(args))))); + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, l), + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, r), + ')'))))); + default: + return A2( + _user$project$ExContext$crash, + c, + A2(_elm_lang$core$Basics_ops['++'], 'Illegal operator ', _p3)); + } + } + } + }); + +var _user$project$ExVariable$bubbleSelect = F2( + function (f, list) { + var findNext = F3( + function (discarded, list, acc) { + findNext: + while (true) { + var _p0 = list; + if (_p0.ctor === '[]') { + return _elm_lang$core$Native_Utils.eq( + discarded, + {ctor: '[]'}) ? _elm_lang$core$Result$Ok( + _elm_lang$core$List$reverse(acc)) : _elm_lang$core$Result$Err(discarded); + } else { + var _p2 = _p0._1; + var _p1 = _p0._0; + var newlist = A2(_elm_lang$core$Basics_ops['++'], discarded, _p2); + if (A2( + _elm_lang$core$List$all, + A2(_elm_lang$core$Basics$flip, f, _p1), + newlist)) { + var _v1 = {ctor: '[]'}, + _v2 = newlist, + _v3 = {ctor: '::', _0: _p1, _1: acc}; + discarded = _v1; + list = _v2; + acc = _v3; + continue findNext; + } else { + var _v4 = {ctor: '::', _0: _p1, _1: discarded}, + _v5 = _p2, + _v6 = acc; + discarded = _v4; + list = _v5; + acc = _v6; + continue findNext; + } + } } - default: - var missing = _user$project$Helpers$generateArguments(missingArgs); - var wrapIfMiss = function (s) { - return (_elm_lang$core$Native_Utils.cmp( - _elm_lang$core$List$length(missing), - 0) > 0) ? s : ''; - }; - var missingVarargs = A2( - _elm_lang$core$List$map, - function (_p11) { - return _Bogdanp$elm_ast$Ast_Expression$Variable( - _elm_lang$core$List$singleton(_p11)); + }); + var findIndex = F2( + function (discarded, list) { + return A2( + _elm_community$list_extra$List_Extra$break, + function (a) { + return A2( + _elm_lang$core$List$all, + f(a), + discarded); }, - missing); + list); + }); + return A3( + findNext, + {ctor: '[]'}, + list, + {ctor: '[]'}); + }); +var _user$project$ExVariable$withoutVars = F2( + function (vars, right) { + return A2( + _elm_lang$core$List$filter, + function (_p3) { + return !A3(_elm_lang$core$Basics$flip, _elm_lang$core$List$member, vars, _p3); + }, + right); + }); +var _user$project$ExVariable$extractName = F2( + function (c, expression) { + var _p4 = _user$project$Helpers$applicationToList(expression); + if ((_p4.ctor === '::') && (_p4._1.ctor === '[]')) { + if (((_p4._0.ctor === 'Variable') && (_p4._0._0.ctor === '::')) && (_p4._0._0._1.ctor === '[]')) { + return _p4._0._0._0; + } else { return A2( - _elm_lang$core$String$join, - '', - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'def', - _1: { - ctor: '::', - _0: A2(_user$project$ExFunction$privateOrPublic, c, name), - _1: { - ctor: '::', - _0: ' ', - _1: { - ctor: '::', - _0: A2(_user$project$Helpers$toSnakeCase, true, name), - _1: { - ctor: '::', - _0: '(', - _1: { - ctor: '::', - _0: A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - elixirE( - _user$project$ExContext$inArgs(c)), - A2(_elm_lang$core$Basics_ops['++'], args, missingVarargs))), - _1: { - ctor: '::', - _0: ') do', - _1: { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent + 1), - _1: { - ctor: '::', - _0: wrapIfMiss('('), - _1: { - ctor: '::', - _0: A2( - elixirE, - A2( - _user$project$ExVariable$rememberVariables, - A2(_elm_lang$core$Basics_ops['++'], args, missingVarargs), - _user$project$ExContext$indent(c)), - body), - _1: { - ctor: '::', - _0: wrapIfMiss(')'), - _1: { - ctor: '::', - _0: A2( - _elm_lang$core$String$join, - '', - A2( - _elm_lang$core$List$map, - function (a) { - return A2( - _elm_lang$core$Basics_ops['++'], - '.(', - A2(_elm_lang$core$Basics_ops['++'], a, ')')); - }, - missing)), - _1: { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'end', - _1: {ctor: '[]'} - } - } - } - } - } - } - } - } - } - } - } - } - } - } - }); + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p4._0), + ' is not a variable')); + } + } else { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + A2( + _elm_lang$core$Maybe$map, + _user$project$ExVariable$extractName(c), + _elm_lang$core$List$head(_p4))); } }); -var _user$project$ExFunction$genOverloadedFunctionDefinition = F6( - function (c, elixirE, name, args, body, expressions) { - var pairAsArgs = function (asArgs) { - return A3( - _elm_lang$core$List$map2, - _elm_lang$core$Basics$flip( - _Bogdanp$elm_ast$Ast_Expression$BinOp( - _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: 'as', - _1: {ctor: '[]'} - }))), - args, - asArgs); +var _user$project$ExVariable$extractVariablesUsed = function (exp) { + var none = {ctor: '[]'}; + var one = function ($var) { + return { + ctor: '::', + _0: $var, + _1: {ctor: '[]'} }; - var typeDef = A2( - _elm_lang$core$Maybe$andThen, - function (_p12) { - return A2( - _elm_lang$core$Dict$get, - name, - function (_) { - return _.definitions; - }(_p12)); - }, - A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)); - var arity = A2( - _elm_lang$core$Maybe$withDefault, - 0, - A2( - _elm_lang$core$Maybe$map, - function (_) { - return _.arity; - }, - typeDef)); - var caseBranch = function (_p13) { - var _p14 = _p13; - var _p18 = _p14._1; - var _p17 = _p14._0; - var _p15 = _p17; - if (_p15.ctor === 'Tuple') { - var _p16 = _p15._0; - return A6( - _user$project$ExFunction$genElixirFunc, - c, - elixirE, - name, - pairAsArgs(_p16), - arity - _elm_lang$core$List$length( - pairAsArgs(_p16)), - _p18); - } else { - return A6( - _user$project$ExFunction$genElixirFunc, - c, - elixirE, - name, - { - ctor: '::', - _0: _p17, - _1: {ctor: '[]'} - }, - arity - 1, - _p18); - } - }; - var lambdasAt = _user$project$ExFunction$getLambdaArgumentIndexes( - A2( - _elm_lang$core$Maybe$map, - function (_) { - return _.def; - }, - typeDef)); - return A3(_user$project$ExContext$hasFlag, 'nodef', name, c) ? A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt) : A2( - _elm_lang$core$Basics_ops['++'], - A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt), - A3( - _elm_lang$core$Basics$flip, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - '\n', - A3( - _elm_lang$core$List$foldr, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - '', - A2(_elm_lang$core$List$map, caseBranch, expressions)))); - }); -var _user$project$ExFunction$genFunctionDefinition = F5( - function (c, elixirE, name, args, body) { - var typeDef = A2( - _elm_lang$core$Maybe$andThen, - function (_p19) { - return A2( - _elm_lang$core$Dict$get, - name, - function (_) { - return _.definitions; - }(_p19)); - }, - A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)); - var arity = A2( - _elm_lang$core$Maybe$withDefault, - 0, - A2( - _elm_lang$core$Maybe$map, - function (_) { - return _.arity; - }, - typeDef)); - var lambdasAt = _user$project$ExFunction$getLambdaArgumentIndexes( - A2( - _elm_lang$core$Maybe$map, - function (_) { - return _.def; - }, - typeDef)); - return A3(_user$project$ExContext$hasFlag, 'nodef', name, c) ? A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt) : A2( - _elm_lang$core$Basics_ops['++'], - A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt), - A2( - _elm_lang$core$Basics_ops['++'], - A6( - _user$project$ExFunction$genElixirFunc, - c, - elixirE, - name, - args, - arity - _elm_lang$core$List$length(args), - body), - '\n')); - }); - -var _user$project$ExFfi$resolveFfi = F3( - function (c, elixirE, ffi) { - var combineComas = function (args) { - return A2( - _elm_lang$core$String$join, - ',', - A2( - _elm_lang$core$List$map, - elixirE(c), - args)); - }; - var _p0 = ffi; - _v0_7: + }; + var many = function (vars) { + return A3( + _elm_lang$core$List$foldr, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + {ctor: '[]'}, + A2(_elm_lang$core$List$map, _user$project$ExVariable$extractVariablesUsed, vars)); + }; + var _p5 = exp; + _v8_12: + do { + _v8_8: do { - switch (_p0.ctor) { - case 'TryFfi': - if ((_p0._0.ctor === 'String') && (_p0._1.ctor === 'String')) { - if (_p0._2.ctor === 'Tuple') { - return A2( - _elm_lang$core$Basics_ops['++'], - 'try_catch fn _ -> ', - A2( - _elm_lang$core$Basics_ops['++'], - _p0._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p0._1._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - combineComas(_p0._2._0), - A2(_elm_lang$core$Basics_ops['++'], ')', ' end'))))))); - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - 'try_catch fn _ -> ', - A2( - _elm_lang$core$Basics_ops['++'], - _p0._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p0._1._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, _p0._2), - A2(_elm_lang$core$Basics_ops['++'], ')', ' end'))))))); - } - } else { - break _v0_7; - } - case 'Ffi': - if ((_p0._0.ctor === 'String') && (_p0._1.ctor === 'String')) { - if (_p0._2.ctor === 'Tuple') { - return A2( - _elm_lang$core$Basics_ops['++'], - _p0._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p0._1._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - combineComas(_p0._2._0), - ')'))))); - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - _p0._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p0._1._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, _p0._2), - ')'))))); - } - } else { - break _v0_7; - } - case 'Lffi': - if (_p0._0.ctor === 'String') { - if (_p0._1.ctor === 'Tuple') { - return A2( - _elm_lang$core$Basics_ops['++'], - _p0._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - combineComas(_p0._1._0), - ')'))); - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - _p0._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, _p0._1), - ')'))); - } + switch (_p5.ctor) { + case 'Record': + return many( + A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$second, _p5._0)); + case 'Tuple': + return many(_p5._0); + case 'Variable': + if ((_p5._0.ctor === '::') && (_p5._0._1.ctor === '[]')) { + return one(_p5._0._0); } else { - break _v0_7; + break _v8_12; } - default: - var args = _user$project$Helpers$generateArguments(_p0._0); - return A2( - _elm_lang$core$Basics_ops['++'], - 'fn (', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_elm_lang$core$String$join, ',', args), - A2( - _elm_lang$core$Basics_ops['++'], - ') -> ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, _p0._1), - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - '', - A2( - _elm_lang$core$List$map, - function (a) { - return A2( - _elm_lang$core$Basics_ops['++'], - '.(', - A2(_elm_lang$core$Basics_ops['++'], a, ')')); - }, - args)), - ' end'))))); - } - } while(false); - return _elm_lang$core$Native_Utils.crashCase( - 'ExFfi', - { - start: {line: 161, column: 9}, - end: {line: 214, column: 45} - }, - _p0)('Wrong ffi call'); - }); -var _user$project$ExFfi$Flambda = F2( - function (a, b) { - return {ctor: 'Flambda', _0: a, _1: b}; - }); -var _user$project$ExFfi$uncurrify = F3( - function (c, elixirE, argTypes) { - var arity = _elm_lang$core$List$length(argTypes) - 1; - var indexes = A2(_elm_lang$core$List$range, 1, arity); - return A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - function (_p2) { - var _p3 = _p2; - var _p6 = _p3._0; - var _p4 = _p3._1; - if (_p4.ctor === '[]') { - return _elm_lang$core$Native_Utils.crashCase( - 'ExFfi', - { - start: {line: 126, column: 21}, - end: {line: 141, column: 71} - }, - _p4)('Impossible'); - } else { - if (_p4._1.ctor === '[]') { - return A2( - _elm_lang$core$Basics_ops['++'], - 'a', - _elm_lang$core$Basics$toString(_p6)); - } else { - var makeFlambda = _user$project$ExFfi$Flambda( - _elm_lang$core$List$length(_p4) - 1); - var $var = _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: A2( - _elm_lang$core$Basics_ops['++'], - 'a', - _elm_lang$core$Basics$toString(_p6)), - _1: {ctor: '[]'} - }); - return A3( - _user$project$ExFfi$resolveFfi, - c, - elixirE, - makeFlambda($var)); - } - } - }, - A3( - _elm_lang$core$List$map2, - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }), - indexes, - argTypes))); - }); -var _user$project$ExFfi$generateFfi = F5( - function (c, elixirE, name, argTypes, e) { - var wrapAllInVar = _elm_lang$core$List$map( - function (_p7) { - return _Bogdanp$elm_ast$Ast_Expression$Variable( - _elm_lang$core$List$singleton(_p7)); - }); - var uncurryArguments = function (c) { - return A3(_user$project$ExFfi$uncurrify, c, elixirE, argTypes); - }; - var appList = _user$project$Helpers$applicationToList(e); - var typeDef = A2( - _elm_lang$core$Maybe$andThen, - function (_p8) { - return A2( - _elm_lang$core$Dict$get, - name, - function (_) { - return _.definitions; - }(_p8)); - }, - A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)); - var _p9 = { - ctor: '_Tuple2', - _0: typeDef, - _1: _user$project$Helpers$applicationToList(e) - }; - _v3_3: - do { - if (_p9.ctor === '_Tuple2') { - if (_p9._0.ctor === 'Nothing') { - return _elm_lang$core$Native_Utils.crashCase( - 'ExFfi', + case 'List': + return many(_p5._0); + case 'Application': + return many( { - start: {line: 44, column: 9}, - end: {line: 109, column: 51} - }, - _p9)('Ffi requires type definition'); - } else { - if (((((((((_p9._1.ctor === '::') && (_p9._1._0.ctor === 'Variable')) && (_p9._1._0._0.ctor === '::')) && (_p9._1._0._0._1.ctor === '[]')) && (_p9._1._1.ctor === '::')) && (_p9._1._1._0.ctor === 'String')) && (_p9._1._1._1.ctor === '::')) && (_p9._1._1._1._0.ctor === 'String')) && (_p9._1._1._1._1.ctor === '[]')) { - switch (_p9._1._0._0._0) { - case 'ffi': - var _p13 = _p9._1._1._0._0; - var _p12 = _p9._1._1._1._0._0; - var _p11 = _p9._0._0; - var $arguments = A2(_user$project$Helpers$generateArguments_, 'a', _p11.arity); - return A2( - _elm_lang$core$Basics_ops['++'], - A5( - _user$project$ExFunction$functionCurry, - c, - elixirE, - name, - _p11.arity, - {ctor: '[]'}), - A2( - _elm_lang$core$Basics_ops['++'], - A4( - _user$project$ExContext$onlyWithoutFlag, - c, - 'noverify', - name, - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - A2( - _elm_lang$core$Basics_ops['++'], - 'verify as: ', - A2( - _elm_lang$core$Basics_ops['++'], - _p13, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p12, - A2( - _elm_lang$core$Basics_ops['++'], - '/', - _elm_lang$core$Basics$toString(_p11.arity)))))))), - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - A2( - _elm_lang$core$Basics_ops['++'], - 'def', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExFunction$privateOrPublic, c, name), - A2( - _elm_lang$core$Basics_ops['++'], - ' ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, name), - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_elm_lang$core$String$join, ', ', $arguments), - A2( - _elm_lang$core$Basics_ops['++'], - ')', - A2( - _elm_lang$core$Basics_ops['++'], - ', do: ', - A2( - _elm_lang$core$Basics_ops['++'], - _p13, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p12, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - uncurryArguments( - A2( - _user$project$ExVariable$rememberVariables, - wrapAllInVar($arguments), - c)), - ')')))))))))))))))); - case 'tryFfi': - var _p14 = _p9._0._0; - var $arguments = A2(_user$project$Helpers$generateArguments_, 'a', _p14.arity); - return A2( - _elm_lang$core$Basics_ops['++'], - A5( - _user$project$ExFunction$functionCurry, - c, - elixirE, - name, - _p14.arity, - {ctor: '[]'}), - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - A2( - _elm_lang$core$Basics_ops['++'], - 'def', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExFunction$privateOrPublic, c, name), - A2( - _elm_lang$core$Basics_ops['++'], - ' ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, name), - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2(_user$project$Helpers$generateArguments_, 'a', _p14.arity)), - A2( - _elm_lang$core$Basics_ops['++'], - ')', - A2( - _elm_lang$core$Basics_ops['++'], - ' do ', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), - A2( - _elm_lang$core$Basics_ops['++'], - 'try_catch fn -> ', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 2), - A2( - _elm_lang$core$Basics_ops['++'], - _p9._1._1._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _elm_lang$core$Basics_ops['++'], - _p9._1._1._1._0._0, - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - uncurryArguments( - A2( - _user$project$ExVariable$rememberVariables, - wrapAllInVar($arguments), - c)), - A2( - _elm_lang$core$Basics_ops['++'], - ')', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), - A2( - _elm_lang$core$Basics_ops['++'], - 'end', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - 'end')))))))))))))))))))))); - default: - break _v3_3; - } - } else { - break _v3_3; - } - } - } else { - break _v3_3; - } - } while(false); - return _elm_lang$core$Native_Utils.crashCase( - 'ExFfi', - { - start: {line: 44, column: 9}, - end: {line: 109, column: 51} - }, - _p9)('Wrong ffi definition'); - }); -var _user$project$ExFfi$TryFfi = F3( - function (a, b, c) { - return {ctor: 'TryFfi', _0: a, _1: b, _2: c}; - }); -var _user$project$ExFfi$Ffi = F3( - function (a, b, c) { - return {ctor: 'Ffi', _0: a, _1: b, _2: c}; - }); -var _user$project$ExFfi$Lffi = F2( - function (a, b) { - return {ctor: 'Lffi', _0: a, _1: b}; - }); - -var _user$project$ExType$typeAliasConstructor = F2( - function (args, _p0) { - typeAliasConstructor: - while (true) { - var _p1 = _p0; - var _p2 = {ctor: '_Tuple2', _0: _p1.aliasType, _1: _p1.body}; - _v1_6: - do { - _v1_0: - do { - if (_p2.ctor === '_Tuple2') { - switch (_p2._1.ctor) { - case 'TypeConstructor': - if (_p2._0.ctor === 'Type') { - break _v1_0; - } else { - if ((_p2._1._0.ctor === '::') && (_p2._1._0._1.ctor === '[]')) { - return _elm_lang$core$Maybe$Nothing; - } else { - break _v1_6; - } - } - case 'TypeRecord': - if (_p2._0.ctor === 'Type') { - break _v1_0; - } else { - var _p5 = _p2._1._0; - var params = A2( - _elm_lang$core$List$map, - function (_p3) { - return _Bogdanp$elm_ast$Ast_Expression$Variable( - _elm_lang$core$List$singleton(_p3)); - }, - A2( - _elm_lang$core$List$map, - function (_p4) { - return A2( - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - 'arg', - _elm_lang$core$Basics$toString(_p4)); - }, - A2( - _elm_lang$core$List$range, - 1, - A2( - F2( - function (x, y) { - return x + y; - }), - 0 - _elm_lang$core$List$length(args), - _elm_lang$core$List$length(_p5))))); - var varargs = A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapFirst(_elm_lang$core$Tuple$first), - A3( - _elm_lang$core$List$map2, - _elm_lang$core$Basics$flip( - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - })), - A2(_elm_lang$core$Basics_ops['++'], args, params), - _p5)); - return _elm_lang$core$Maybe$Just( - A2( - _Bogdanp$elm_ast$Ast_Expression$Lambda, - params, - _Bogdanp$elm_ast$Ast_Expression$Record(varargs))); - } - case 'TypeTuple': - if (_p2._0.ctor === 'Type') { - break _v1_0; - } else { - if ((_p2._1._0.ctor === '::') && (_p2._1._0._1.ctor === '[]')) { - var _v2 = args, - _v3 = _elm_lang$core$Native_Utils.update( - _p1, - { - typeBody: _user$project$ExContext$SimpleType(_p2._1._0._0) - }); - args = _v2; - _p0 = _v3; - continue typeAliasConstructor; - } else { - var args = A2( - _elm_lang$core$List$map, - function (_p6) { - return _Bogdanp$elm_ast$Ast_Expression$Variable( - _elm_lang$core$List$singleton(_p6)); - }, - A2( - _elm_lang$core$List$map, - function (_p7) { - return A2( - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - 'arg', - _elm_lang$core$Basics$toString(_p7)); - }, - A2( - _elm_lang$core$List$range, - 1, - _elm_lang$core$List$length(_p2._1._0)))); - return _elm_lang$core$Maybe$Just( - A2( - _Bogdanp$elm_ast$Ast_Expression$Lambda, - args, - _Bogdanp$elm_ast$Ast_Expression$Tuple(args))); - } - } - case 'TypeVariable': - if (_p2._0.ctor === 'Type') { - break _v1_0; - } else { - return _elm_lang$core$Maybe$Just( - _Bogdanp$elm_ast$Ast_Expression$Variable( + ctor: '::', + _0: _p5._0, + _1: { + ctor: '::', + _0: _p5._1, + _1: {ctor: '[]'} + } + }); + case 'BinOp': + if (((_p5._0.ctor === 'Variable') && (_p5._0._0.ctor === '::')) && (_p5._0._0._1.ctor === '[]')) { + switch (_p5._0._0._0) { + case '::': + return many( + { + ctor: '::', + _0: _p5._1, + _1: { + ctor: '::', + _0: _p5._2, + _1: {ctor: '[]'} + } + }); + case 'as': + if (_p5._2.ctor === 'Variable') { + if (_p5._1.ctor === 'Variable') { + return many( { ctor: '::', - _0: _p2._1._0, - _1: {ctor: '[]'} - })); - } - default: - if (_p2._0.ctor === 'Type') { - break _v1_0; + _0: _p5._1, + _1: { + ctor: '::', + _0: _p5._2, + _1: {ctor: '[]'} + } + }); + } else { + if ((_p5._2._0.ctor === '::') && (_p5._2._0._1.ctor === '[]')) { + return many( + { + ctor: '::', + _0: _p5._1, + _1: { + ctor: '::', + _0: _p5._2, + _1: {ctor: '[]'} + } + }); + } else { + break _v8_8; + } + } } else { - break _v1_6; + break _v8_8; } + default: + break _v8_8; } } else { - break _v1_6; + break _v8_8; } - } while(false); - return _elm_lang$core$Maybe$Nothing; - } while(false); - return _elm_lang$core$Maybe$Nothing; - } + case 'Case': + return A2( + _user$project$ExVariable$withoutVars, + _user$project$ExVariable$extractVariablesUsed(_p5._0), + A2( + _elm_lang$core$List$concatMap, + _elm_lang$core$Basics$uncurry(_user$project$ExVariable$rightWithoutLeft), + _p5._1)); + case 'Let': + return A2( + _elm_lang$core$List$concatMap, + _elm_lang$core$Basics$uncurry(_user$project$ExVariable$rightWithoutLeft), + _p5._0); + case 'Lambda': + return A2( + _user$project$ExVariable$withoutVars, + A2(_elm_lang$core$List$concatMap, _user$project$ExVariable$extractVariablesUsed, _p5._0), + _user$project$ExVariable$extractVariablesUsed(_p5._1)); + default: + break _v8_12; + } + } while(false); + return many( + { + ctor: '::', + _0: _p5._1, + _1: { + ctor: '::', + _0: _p5._2, + _1: {ctor: '[]'} + } + }); + } while(false); + return none; +}; +var _user$project$ExVariable$rightWithoutLeft = F2( + function (left, right) { + return A2( + _user$project$ExVariable$withoutVars, + _user$project$ExVariable$extractVariablesUsed(left), + _user$project$ExVariable$extractVariablesUsed(right)); }); -var _user$project$ExType$fullImportedType = F2( - function (c, name) { +var _user$project$ExVariable$extractNamesAssigned = function (expression) { + var _p6 = _user$project$Helpers$applicationToList(expression); + if ((_p6.ctor === '::') && (_p6._1.ctor === '[]')) { + if (((_p6._0.ctor === 'Variable') && (_p6._0._0.ctor === '::')) && (_p6._0._0._1.ctor === '[]')) { + return { + ctor: '::', + _0: _p6._0._0._0, + _1: {ctor: '[]'} + }; + } else { + return _user$project$ExVariable$extractVariablesUsed(_p6._0); + } + } else { return A2( _elm_lang$core$Maybe$withDefault, - name, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, + _user$project$ExVariable$extractNamesAssigned, + _elm_lang$core$List$head(_p6))); + } +}; +var _user$project$ExVariable$extractArguments = function (expression) { + var _p7 = _user$project$Helpers$applicationToList(expression); + if ((_p7.ctor === '::') && (_p7._1.ctor === '[]')) { + return {ctor: '[]'}; + } else { + return A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, + _elm_lang$core$List$concatMap(_user$project$ExVariable$extractNamesAssigned), + _elm_lang$core$List$tail(_p7))); + } +}; +var _user$project$ExVariable$isIn = F2( + function (_p9, _p8) { + var _p10 = _p9; + var _p11 = _p8; + var anyMembers = F2( + function (members, list) { + return A2( + _elm_lang$core$List$any, + A2(_elm_lang$core$Basics$flip, _elm_lang$core$List$member, list), + members); + }); + return A2( + anyMembers, + _user$project$ExVariable$extractNamesAssigned(_p10._0), + A2( + _user$project$ExVariable$withoutVars, + _user$project$ExVariable$extractArguments(_p11._0), + _user$project$ExVariable$extractVariablesUsed(_p11._1))); + }); +var _user$project$ExVariable$organizeLetInVariablesOrder = F2( + function (c, expressionList) { + var _p12 = A2( + _user$project$ExVariable$bubbleSelect, + F2( + function (a, b) { + return !A2(_user$project$ExVariable$isIn, a, b); + }), + expressionList); + if (_p12.ctor === 'Ok') { + return _p12._0; + } else { + var _p13 = A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'Couldn\'t find a solution to ', + _elm_lang$core$Basics$toString( + A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$first, _p12._0)))); + return {ctor: '[]'}; + } + }); +var _user$project$ExVariable$groupByCrossDependency = function (expressionsList) { + return A2( + _elm_community$list_extra$List_Extra$groupWhile, + F2( + function (l, r) { + return A2(_user$project$ExVariable$isIn, l, r) && A2(_user$project$ExVariable$isIn, r, l); + }), + expressionsList); +}; +var _user$project$ExVariable$varOrNah = F2( + function (c, $var) { + return (A2(_elm_lang$core$Set$member, $var, c.variables) || c.inArgs) ? $var : (c.inMeta ? A2( + _elm_lang$core$Basics_ops['++'], + c.mod, A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2(_elm_lang$core$Basics_ops['++'], $var, '()'))) : A2(_elm_lang$core$Basics_ops['++'], $var, '()')); + }); +var _user$project$ExVariable$rememberVariables = F2( + function (list, c) { + var addToContext = F2( + function ($var, context) { + return _elm_lang$core$Native_Utils.update( + context, + { + variables: A2( + _elm_lang$core$Set$insert, + A2(_user$project$Helpers$toSnakeCase, true, $var), + context.variables) + }); + }); + return A3( + _elm_lang$core$List$foldl, + addToContext, + c, + A3( + _elm_lang$core$List$foldr, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + {ctor: '[]'}, + A2(_elm_lang$core$List$map, _user$project$ExVariable$extractVariablesUsed, list))); + }); + +var _user$project$ExSelector$Access = function (a) { + return {ctor: 'Access', _0: a}; +}; +var _user$project$ExSelector$getSelector = F2( + function (c, expression) { + var _p0 = expression; + if (_p0.ctor === 'AccessFunction') { + return _user$project$ExSelector$Access( + A2(_user$project$Helpers$toSnakeCase, true, _p0._0)); + } else { + return A2(_user$project$ExContext$crash, c, 'The only allowed selectors are: .field'); + } + }); +var _user$project$ExSelector$Update = {ctor: 'Update'}; +var _user$project$ExSelector$Put = {ctor: 'Put'}; +var _user$project$ExSelector$Get = {ctor: 'Get'}; +var _user$project$ExSelector$accessMacroType = function (string) { + var getType = function (x) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p1, acc) { + var _p2 = _p1; + var _p3 = acc; + if (_p3.ctor === 'Nothing') { + return A2( + _elm_lang$core$Regex$contains, + _elm_lang$core$Regex$regex(_p2._0), + x) ? _elm_lang$core$Maybe$Just(_p2._1) : _elm_lang$core$Maybe$Nothing; + } else { + return _p3; + } + }), + _elm_lang$core$Maybe$Nothing, + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'updateIn\\d?', _1: _user$project$ExSelector$Update}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'putIn\\d?', _1: _user$project$ExSelector$Put}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'getIn\\d?', _1: _user$project$ExSelector$Get}, + _1: {ctor: '[]'} + } + } + }); + }; + var getArity = function (_p4) { + return A2( + _elm_lang$core$Result$withDefault, + 1, + _elm_lang$core$String$toInt( + A2(_elm_lang$core$String$filter, _elm_lang$core$Char$isDigit, _p4))); + }; + return A2( + _elm_lang$core$Maybe$map, + function (t) { + return { + ctor: '_Tuple2', + _0: t, + _1: getArity(string) + }; + }, + getType(string)); +}; +var _user$project$ExSelector$AccessMacro = F3( + function (a, b, c) { + return {ctor: 'AccessMacro', _0: a, _1: b, _2: c}; + }); +var _user$project$ExSelector$maybeAccessMacro = F3( + function (c, call, args) { + var accessMacroArgs = F2( + function (arity, args) { + var _p5 = A2( + _elm_lang$core$Basics$compare, + _elm_lang$core$List$length(args), + arity); + switch (_p5.ctor) { + case 'LT': + return A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'Access macros [updateIn/getIn/putIn] cannot be partially applied. Expecting ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(arity), + ' selector arguments.'))); + case 'EQ': + return { + ctor: '_Tuple2', + _0: A2( + _elm_lang$core$List$map, + _user$project$ExSelector$getSelector(c), + args), + _1: {ctor: '[]'} + }; + default: + return A2( + _elm_lang$core$Tuple$mapFirst, + _elm_lang$core$List$map( + _user$project$ExSelector$getSelector(c)), + A2(_elm_community$list_extra$List_Extra$splitAt, arity, args)); + } + }); + var _p6 = {ctor: '_Tuple2', _0: call, _1: args}; + if ((((_p6.ctor === '_Tuple2') && (_p6._0.ctor === 'Variable')) && (_p6._0._0.ctor === '::')) && (_p6._0._0._1.ctor === '[]')) { + return A2( _elm_lang$core$Maybe$map, - function (a) { - return A2( - _elm_lang$core$Basics_ops['++'], - a, - A2(_elm_lang$core$Basics_ops['++'], '.', name)); + function (_p7) { + var _p8 = _p7; + var _p10 = _p8._1; + var _p9 = A2(accessMacroArgs, _p10, _p6._1); + var selectors = _p9._0; + var rest = _p9._1; + return { + ctor: '_Tuple2', + _0: A3(_user$project$ExSelector$AccessMacro, _p8._0, _p10, selectors), + _1: rest + }; }, - A2(_elm_lang$core$Dict$get, 'name', c.importedTypes))); - }); -var _user$project$ExType$getExportedTypeNames = F3( - function (c, mod, subset) { - var _p8 = subset; - switch (_p8.ctor) { - case 'SubsetExport': - return A2( - _elm_lang$core$List$concatMap, - A2(_user$project$ExType$getExportedTypeNames, c, mod), - _p8._0); - case 'TypeExport': - return { - ctor: '::', - _0: _p8._0, - _1: {ctor: '[]'} - }; - case 'AllExport': - return A2( - _elm_lang$core$Maybe$withDefault, - {ctor: '[]'}, - A2( - _elm_lang$core$Maybe$map, - function (mod) { - return A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Dict$keys(mod.aliases), - _elm_lang$core$Dict$keys(mod.types)); - }, - A2(_elm_lang$core$Dict$get, mod, c.commons.modules))); - default: - return {ctor: '[]'}; + _user$project$ExSelector$accessMacroType(_p6._0._0._0)); + } else { + return _elm_lang$core$Maybe$Nothing; } }); -var _user$project$ExType$elixirT = F3( - function (flatten, c, t) { - elixirT: - while (true) { - var _p9 = t; - switch (_p9.ctor) { - case 'TypeTuple': - if (_p9._0.ctor === '[]') { - return 'no_return'; + +var _user$project$ExExpression$isTuple = function (a) { + isTuple: + while (true) { + var _p0 = a; + switch (_p0.ctor) { + case 'Application': + var _v1 = _p0._0; + a = _v1; + continue isTuple; + case 'Variable': + if ((_p0._0.ctor === '::') && (_p0._0._1.ctor === '[]')) { + if (_p0._0._0 === '()') { + return true; } else { - if (_p9._0._1.ctor === '[]') { - var _v6 = flatten, - _v7 = c, - _v8 = _p9._0._0; - flatten = _v6; - c = _v7; - t = _v8; - continue elixirT; - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - '{', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - A2(_user$project$ExType$elixirT, flatten, c), - _p9._0)), - '}')); - } + return _user$project$Helpers$isCapitilzed(_p0._0._0); } - case 'TypeVariable': - if (_p9._0 === 'number') { - return 'number'; + } else { + return function (_p1) { + var _p2 = _p1; + return _user$project$ExExpression$isTuple( + _Bogdanp$elm_ast$Ast_Expression$Variable( + { + ctor: '::', + _0: _p2._1, + _1: {ctor: '[]'} + })); + }( + A2(_user$project$Helpers$moduleAccess, '', _p0._0)); + } + default: + return false; + } + } +}; +var _user$project$ExExpression$filterTypeAlias = function (_p3) { + var _p4 = _p3; + var _p5 = _p4.aliasType; + if (_p5.ctor === 'TypeAlias') { + return _elm_lang$core$Maybe$Just(_p4); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _user$project$ExExpression$isMacro = function (e) { + isMacro: + while (true) { + var _p6 = e; + _v5_2: + do { + switch (_p6.ctor) { + case 'Application': + var _v6 = _p6._0; + e = _v6; + continue isMacro; + case 'Variable': + if ((_p6._0.ctor === '::') && (_p6._0._1.ctor === '[]')) { + return A2( + _elm_lang$core$List$member, + _p6._0._0, + { + ctor: '::', + _0: 'tryFfi', + _1: { + ctor: '::', + _0: 'ffi', + _1: { + ctor: '::', + _0: 'lffi', + _1: { + ctor: '::', + _0: 'macro', + _1: { + ctor: '::', + _0: 'flambda', + _1: { + ctor: '::', + _0: 'updateIn', + _1: { + ctor: '::', + _0: 'updateIn2', + _1: { + ctor: '::', + _0: 'updateIn3', + _1: { + ctor: '::', + _0: 'updateIn4', + _1: { + ctor: '::', + _0: 'updateIn5', + _1: { + ctor: '::', + _0: 'putIn', + _1: { + ctor: '::', + _0: 'putIn', + _1: { + ctor: '::', + _0: 'putIn2', + _1: { + ctor: '::', + _0: 'putIn3', + _1: { + ctor: '::', + _0: 'putIn4', + _1: { + ctor: '::', + _0: 'putIn5', + _1: { + ctor: '::', + _0: 'getIn', + _1: { + ctor: '::', + _0: 'getIn2', + _1: { + ctor: '::', + _0: 'getIn3', + _1: { + ctor: '::', + _0: 'getIn4', + _1: { + ctor: '::', + _0: 'getIn5', + _1: {ctor: '[]'} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }); } else { - var _p11 = _p9._0; - var _p10 = _elm_lang$core$String$uncons(_p11); - if (((_p10.ctor === 'Just') && (_p10._0.ctor === '_Tuple2')) && (_p10._0._0.valueOf() === '@')) { - return A2(_user$project$Helpers$toSnakeCase, true, _p10._0._1); - } else { - return c.inTypeDefiniton ? _p11 : 'any'; - } + break _v5_2; } - case 'TypeConstructor': - var _p12 = A2(_user$project$Helpers$moduleAccess, c.mod, _p9._0); - var mod = _p12._0; - var last = _p12._1; - var modulePath = _elm_lang$core$Native_Utils.eq(mod, c.mod) ? A2( - _elm_lang$core$Maybe$withDefault, - '', - A2( - _elm_lang$core$Maybe$map, - function (a) { - return A2(_elm_lang$core$Basics_ops['++'], a, '.'); - }, - A2(_elm_lang$core$Dict$get, last, c.importedTypes))) : A2(_elm_lang$core$Basics_ops['++'], mod, '.'); - return A2( - _elm_lang$core$Basics_ops['++'], - modulePath, - A4(_user$project$ExType$elixirType, flatten, c, last, _p9._1)); - case 'TypeRecord': - return A2( - _elm_lang$core$Basics_ops['++'], - '%{', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - A2( - _elm_lang$core$Basics_ops['++'], - ',', - _user$project$Helpers$ind(c.indent + 1)), - A2( - _elm_lang$core$List$map, - function (_p13) { - var _p14 = _p13; - return A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, false, _p14._0), - A2( - _elm_lang$core$Basics_ops['++'], - ': ', - A3( - _user$project$ExType$elixirT, - flatten, - _user$project$ExContext$indent(c), - _p14._1))); - }, - _p9._0)), - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - '}')))); - case 'TypeRecordConstructor': + default: + break _v5_2; + } + } while(false); + return false; + } +}; +var _user$project$ExExpression$flattenTypeApplication = function (application) { + var _p7 = application; + if (_p7.ctor === 'Application') { + return (_user$project$ExExpression$isMacro(application) || _user$project$ExExpression$isTuple(application)) ? A2( + _elm_lang$core$Basics_ops['++'], + _user$project$ExExpression$flattenTypeApplication(_p7._0), + { + ctor: '::', + _0: _p7._1, + _1: {ctor: '[]'} + }) : { + ctor: '::', + _0: application, + _1: {ctor: '[]'} + }; + } else { + return { + ctor: '::', + _0: _p7, + _1: {ctor: '[]'} + }; + } +}; +var _user$project$ExExpression$elixirE = F2( + function (c, e) { + var _p8 = e; + _v8_7: + do { + switch (_p8.ctor) { + case 'Variable': + return A2(_user$project$ExExpression$elixirVariable, c, _p8._0); + case 'Application': + return A2(_user$project$ExExpression$tupleOrFunction, c, _p8); + case 'RecordUpdate': return A2( _elm_lang$core$Basics_ops['++'], '%{', A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), + A2(_user$project$Helpers$toSnakeCase, true, _p8._0), A2( _elm_lang$core$Basics_ops['++'], + ' | ', A2( - _elm_lang$core$String$join, + _elm_lang$core$Basics_ops['++'], A2( - _elm_lang$core$Basics_ops['++'], + _elm_lang$core$String$join, ', ', - _user$project$Helpers$ind(c.indent + 1)), - A3( - _user$project$ExType$typeRecordFields, - _user$project$ExContext$indent(c), - flatten, - _p9)), - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), + A2( + _elm_lang$core$List$map, + function (_p9) { + var _p10 = _p9; + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, _p10._0), + A2( + _elm_lang$core$Basics_ops['++'], + ': ', + A2(_user$project$ExExpression$elixirE, c, _p10._1))); + }, + _p8._1)), '}')))); - default: - var _p18 = _p9._1; - var _p17 = _p9._0; - return flatten ? function (_p15) { - var _p16 = _p15; + case 'Access': + if (_p8._0.ctor === 'Variable') { return A2( _elm_lang$core$Basics_ops['++'], - '(', + _user$project$Helpers$modulePath(_p8._0._0), A2( _elm_lang$core$Basics_ops['++'], + '.', A2( _elm_lang$core$String$join, - ', ', + '.', A2( _elm_lang$core$List$map, - A2( - _user$project$ExType$elixirT, - flatten, - _user$project$ExContext$indent(c)), - {ctor: '::', _0: _p17, _1: _p16._1})), - A2( - _elm_lang$core$Basics_ops['++'], - ' -> ', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$Maybe$withDefault, - '', - A2( - _elm_lang$core$Maybe$map, - A2(_user$project$ExType$elixirT, flatten, c), - _p16._0)), - ')')))); - }( - _user$project$Helpers$lastAndRest( - _user$project$Helpers$typeApplicationToList(_p18))) : A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( + _user$project$Helpers$toSnakeCase(true), + _p8._1)))); + } else { + return A2( _elm_lang$core$Basics_ops['++'], - A3(_user$project$ExType$elixirT, flatten, c, _p17), + A2(_user$project$ExExpression$elixirE, c, _p8._0), A2( _elm_lang$core$Basics_ops['++'], - ' -> ', - A2( - _elm_lang$core$Basics_ops['++'], - A3(_user$project$ExType$elixirT, flatten, c, _p18), - ')')))); - } - } - }); -var _user$project$ExType$elixirType = F4( - function (flatten, c, name, args) { - var _p19 = {ctor: '_Tuple2', _0: name, _1: args}; - _v12_13: - do { - if (_p19._1.ctor === '::') { - if (_p19._1._1.ctor === '[]') { - switch (_p19._0) { - case 'List': - return A2( - _elm_lang$core$Basics_ops['++'], - 'list(', - A2( - _elm_lang$core$Basics_ops['++'], - A3(_user$project$ExType$elixirT, flatten, c, _p19._1._0), - ')')); - case 'Maybe': - return A2( - _elm_lang$core$Basics_ops['++'], - '{', - A2( - _elm_lang$core$Basics_ops['++'], - A3(_user$project$ExType$elixirT, flatten, c, _p19._1._0), - '} | nil')); - case 'Just': - return A3(_user$project$ExType$elixirT, flatten, c, _p19._1._0); - case 'Err': - return A2( - _elm_lang$core$Basics_ops['++'], - '{:error, ', - A2( - _elm_lang$core$Basics_ops['++'], - A3(_user$project$ExType$elixirT, flatten, c, _p19._1._0), - '}')); - case 'Ok': - var _p20 = _p19._1._0; - return _elm_lang$core$Native_Utils.eq( - _p20, - _Bogdanp$elm_ast$Ast_Statement$TypeTuple( - {ctor: '[]'})) ? 'ok' : A2( - _elm_lang$core$Basics_ops['++'], - '{:ok,', - A2( - _elm_lang$core$Basics_ops['++'], - A3(_user$project$ExType$elixirT, flatten, c, _p20), - '}')); - default: - break _v12_13; + '.', + A2(_elm_lang$core$String$join, '.', _p8._1))); } - } else { - break _v12_13; - } - } else { - switch (_p19._0) { - case 'String': - return 'String.t'; - case 'Char': - return 'integer'; - case 'Bool': - return 'boolean'; - case 'Int': - return 'integer'; - case 'Pid': - return 'pid'; - case 'Float': - return 'float'; - case 'Nothing': - return 'nil'; - default: - return A2(_user$project$Helpers$toSnakeCase, true, _p19._0); - } + case 'AccessFunction': + return A2( + _elm_lang$core$Basics_ops['++'], + '(fn a -> a.', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, _p8._0), + ' end)')); + case 'BinOp': + if (((_p8._0.ctor === 'Variable') && (_p8._0._0.ctor === '::')) && (_p8._0._0._1.ctor === '[]')) { + return A5(_user$project$ExOperator$elixirBinop, c, _user$project$ExExpression$elixirE, _p8._0._0._0, _p8._1, _p8._2); + } else { + break _v8_7; + } + default: + break _v8_7; } } while(false); - return A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p19._0), - A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - A2( + return A2(_user$project$ExExpression$elixirControlFlow, c, _p8); + }); +var _user$project$ExExpression$elixirControlFlow = F2( + function (c, e) { + var _p11 = e; + switch (_p11.ctor) { + case 'Case': + return A3(_user$project$ExExpression$caseE, c, _p11._0, _p11._1); + case 'Lambda': + return A3(_user$project$ExExpression$lambda, c, _p11._0, _p11._1); + case 'If': + if (_p11._2.ctor === 'If') { + return A2( _elm_lang$core$String$join, - ', ', + '', A2( - _elm_lang$core$List$map, - A2(_user$project$ExType$elixirT, flatten, c), - _p19._1)), - ')'))); - }); -var _user$project$ExType$typeRecordFields = F3( - function (c, flatten, t) { - typeRecordFields: - while (true) { - var keyValuePair = function (_p21) { - var _p22 = _p21; - return A2( - _elm_lang$core$Basics_ops['++'], - _p22._0, - A2( - _elm_lang$core$Basics_ops['++'], - ': ', - A3(_user$project$ExType$elixirT, flatten, c, _p22._1))); - }; - var _p23 = t; - _v14_6: - do { - switch (_p23.ctor) { - case 'TypeRecordConstructor': - switch (_p23._0.ctor) { - case 'TypeConstructor': - if ((_p23._0._0.ctor === '::') && (_p23._0._0._1.ctor === '[]')) { - var inherited = A2( - _elm_lang$core$Maybe$map, - A2(_user$project$ExType$typeRecordFields, c, flatten), - A2( - _elm_lang$core$Maybe$map, - function (_p24) { - var _p25 = _p24; - return A2(_user$project$ExAlias$resolveTypeBody, _p25.typeBody, _p23._0._1); - }, - A3(_user$project$ExContext$getAlias, c.mod, _p23._0._0._0, c))); - return A2( - _elm_lang$core$Basics_ops['++'], - A2(_elm_lang$core$List$map, keyValuePair, _p23._1), - A2( - _elm_lang$core$Maybe$withDefault, - { - ctor: '::', - _0: '', - _1: {ctor: '[]'} - }, - inherited)); - } else { - break _v14_6; - } - case 'TypeRecord': - return A2( - _elm_lang$core$List$map, - keyValuePair, - A2(_elm_lang$core$Basics_ops['++'], _p23._1, _p23._0._0)); - case 'TypeVariable': - return A2(_elm_lang$core$List$map, keyValuePair, _p23._1); - case 'TypeTuple': - if ((_p23._0._0.ctor === '::') && (_p23._0._0._1.ctor === '[]')) { - var _v16 = c, - _v17 = flatten, - _v18 = A2(_Bogdanp$elm_ast$Ast_Statement$TypeRecordConstructor, _p23._0._0._0, _p23._1); - c = _v16; - flatten = _v17; - t = _v18; - continue typeRecordFields; - } else { - break _v14_6; - } - case 'TypeRecordConstructor': - return A2( + _elm_lang$core$Basics_ops['++'], + { + ctor: '::', + _0: 'cond do', + _1: {ctor: '[]'} + }, + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _user$project$ExExpression$handleIfExp, + _user$project$ExContext$indent(c), + _p11), + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'end', + _1: {ctor: '[]'} + } + }))); + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + 'if ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, _p11._0), + A2( + _elm_lang$core$Basics_ops['++'], + ' do ', + A2( _elm_lang$core$Basics_ops['++'], - A2(_elm_lang$core$List$map, keyValuePair, _p23._1), - A3(_user$project$ExType$typeRecordFields, c, flatten, _p23._0)); - default: - break _v14_6; - } - case 'TypeRecord': - return A2(_elm_lang$core$List$map, keyValuePair, _p23._0); - default: - break _v14_6; + A2(_user$project$ExExpression$elixirE, c, _p11._1), + A2( + _elm_lang$core$Basics_ops['++'], + ' else ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, _p11._2), + ' end')))))); } - } while(false); - return _elm_lang$core$Native_Utils.crashCase( - 'ExType', - { - start: {line: 130, column: 9}, - end: {line: 158, column: 79} - }, - _p23)( - A2( - _elm_lang$core$Basics_ops['++'], - 'Wrong type record constructor ', - _elm_lang$core$Basics$toString(_p23))); + case 'Let': + return function (_p12) { + var _p13 = _p12; + return A2( + _elm_lang$core$Basics_ops['++'], + _p13._1, + A2(_user$project$ExExpression$elixirE, _p13._0, _p11._1)); + }( + A3( + _elm_lang$core$Basics$flip, + _elm_lang$core$List$foldl, + {ctor: '_Tuple2', _0: c, _1: ''}, + F2( + function (varGroup, _p14) { + var _p15 = _p14; + var _p20 = _p15._0; + return function (_p16) { + var _p17 = _p16; + var _p18 = _p17._0; + return A2( + _user$project$Helpers_ops['=>'], + A2(_user$project$ExContext$mergeVariables, _p18, _p20), + A2( + _elm_lang$core$Basics_ops['++'], + _p15._1, + A2( + _elm_lang$core$Basics_ops['++'], + _p17._1, + _user$project$Helpers$ind(_p18.indent)))); + }( + function () { + var _p19 = varGroup; + if (_p19.ctor === '[]') { + return A2(_user$project$Helpers_ops['=>'], _p20, ''); + } else { + if ((_p19._0.ctor === '_Tuple2') && (_p19._1.ctor === '[]')) { + return A2( + _user$project$ExExpression$elixirLetInBranch, + _p20, + {ctor: '_Tuple2', _0: _p19._0._0, _1: _p19._0._1}); + } else { + return A2(_user$project$ExExpression$elixirLetInMutualFunctions, _p20, _p19); + } + } + }()); + }))( + _user$project$ExVariable$groupByCrossDependency( + A2(_user$project$ExVariable$organizeLetInVariablesOrder, c, _p11._0)))); + default: + return A2(_user$project$ExExpression$elixirPrimitve, c, e); } }); -var _user$project$ExType$elixirTFlat = _user$project$ExType$elixirT(true); -var _user$project$ExType$elixirTNoFlat = _user$project$ExType$elixirT(false); -var _user$project$ExType$typespec0 = F2( - function (c, t) { +var _user$project$ExExpression$caseE = F3( + function (c, $var, body) { return A2( _elm_lang$core$Basics_ops['++'], - '() :: ', - A2(_user$project$ExType$elixirTNoFlat, c, t)); - }); -var _user$project$ExType$typespec = F2( - function (c, t) { - var _p27 = _user$project$Helpers$lastAndRest( - _user$project$Helpers$typeApplicationToList(t)); - if (_p27._0.ctor === 'Just') { - return A2( + 'case ', + A2( _elm_lang$core$Basics_ops['++'], - '(', + A2(_user$project$ExExpression$elixirE, c, $var), A2( _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - _user$project$ExType$elixirTNoFlat(c), - _p27._1)), - A2( - _elm_lang$core$Basics_ops['++'], - ') :: ', - A2(_user$project$ExType$elixirTNoFlat, c, _p27._0._0)))); - } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExType', - { - start: {line: 266, column: 5}, - end: {line: 276, column: 37} - }, - _p27)('impossible'); - } - }); -var _user$project$ExType$uniontype = F2( - function (c, t) { - var _p29 = t; - if (((_p29.ctor === 'TypeConstructor') && (_p29._0.ctor === '::')) && (_p29._0._1.ctor === '[]')) { - if (_p29._1.ctor === '[]') { - return _user$project$Helpers$atomize(_p29._0._0); - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - '{', + ' do', A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$atomize(_p29._0._0), A2( - _elm_lang$core$Basics_ops['++'], - ', ', + _elm_lang$core$String$join, + '', A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', + _elm_lang$core$List$map, + _user$project$ExExpression$caseBranch( A2( - _elm_lang$core$List$map, - _user$project$ExType$elixirTNoFlat(c), - _p29._1)), - '}')))); - } - } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExType', - { - start: {line: 283, column: 5}, - end: {line: 295, column: 96} - }, - _p29)( - A2( - _elm_lang$core$Basics_ops['++'], - 'I am looking for union type constructor. But got ', - _elm_lang$core$Basics$toString(_p29))); - } + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: $var, + _1: {ctor: '[]'} + }, + c)), + body)), + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + 'end'))))); }); -var _user$project$ExType$aliasOr = F4( - function (c, name, args, $default) { +var _user$project$ExExpression$caseBranch = F2( + function (c, _p21) { + var _p22 = _p21; + var _p23 = _p22._0; return A2( - _elm_lang$core$Maybe$withDefault, - $default, - _elm_lang$core$Maybe$map( - function (_p31) { - var _p32 = _p31; - var _p35 = _p32.typeBody; - var _p34 = _p32.parentModule; - if (_elm_lang$core$Native_Utils.eq(_p34, c.mod)) { - return A2( - _user$project$ExType$elixirTNoFlat, - c, - A2(_user$project$ExAlias$resolveTypeBody, _p35, args)); - } else { - var _p33 = _p32.aliasType; - if (_p33.ctor === 'Type') { - return A2( - _elm_lang$core$Basics_ops['++'], - _p34, - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2( - _user$project$ExType$elixirTNoFlat, - c, - A2(_user$project$ExAlias$resolveTypeBody, _p35, args)))); - } else { - return A2( - _user$project$ExType$elixirTNoFlat, - _elm_lang$core$Native_Utils.update( - c, - {mod: _p34}), - A2(_user$project$ExAlias$resolveTypeBody, _p35, args)); - } - } - })( - A3(_user$project$ExContext$getAlias, c.mod, name, c))); - }); - -var _user$project$ExOperator$flattenPipes = function (e) { - var _p0 = e; - if (((((_p0.ctor === 'BinOp') && (_p0._0.ctor === 'Variable')) && (_p0._0._0.ctor === '::')) && (_p0._0._0._0 === '|>')) && (_p0._0._0._1.ctor === '[]')) { - if (((((_p0._2.ctor === 'BinOp') && (_p0._2._0.ctor === 'Variable')) && (_p0._2._0._0.ctor === '::')) && (_p0._2._0._0._0 === '|>')) && (_p0._2._0._0._1.ctor === '[]')) { - return A2( + _elm_lang$core$Basics_ops['++'], + A2( _elm_lang$core$Basics_ops['++'], - { - ctor: '::', - _0: _p0._1, - _1: {ctor: '[]'} - }, - _user$project$ExOperator$flattenPipes(_p0._2)); - } else { - return A2( + _user$project$Helpers$ind(c.indent + 1), + A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$inArgs(c), + _p23)), + A2( _elm_lang$core$Basics_ops['++'], - { - ctor: '::', - _0: _p0._1, - _1: {ctor: '[]'} - }, - { - ctor: '::', - _0: _p0._2, - _1: {ctor: '[]'} - }); - } - } else { - return { - ctor: '::', - _0: _p0, - _1: {ctor: '[]'} - }; - } -}; -var _user$project$ExOperator$elixirBinop = F5( - function (c, elixirE, op, l, r) { - elixirBinop: - while (true) { - var _p1 = op; - switch (_p1) { - case '//': + ' ->', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 2), + A2( + _user$project$ExExpression$elixirE, + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p23, + _1: {ctor: '[]'} + }, + _user$project$ExContext$indent( + _user$project$ExContext$indent(c))), + _p22._1)))); + }); +var _user$project$ExExpression$elixirLetInBranch = F2( + function (c, _p24) { + var _p25 = _p24; + var _p34 = _p25._0; + var _p33 = _p25._1; + var wrapElixirE = F2( + function (c, exp) { + var _p26 = exp; + if (_p26.ctor === 'Let') { return A2( _elm_lang$core$Basics_ops['++'], - 'div(', + '(', A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), + _user$project$Helpers$ind(c.indent + 1), A2( _elm_lang$core$Basics_ops['++'], - ', ', + A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$indent(c), + exp), A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, r), + _user$project$Helpers$ind(c.indent), ')')))); - case '%': - return A2( - _elm_lang$core$Basics_ops['++'], - 'rem(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), + } else { + return A2(_user$project$ExExpression$elixirE, c, exp); + } + }); + var _p27 = _user$project$Helpers$applicationToList(_p34); + _v18_3: + do { + if (_p27.ctor === '::') { + if (((_p27._0.ctor === 'Variable') && (_p27._0._0.ctor === '::')) && (_p27._0._0._1.ctor === '[]')) { + if (_p27._1.ctor === '[]') { + var _p28 = _p27._0; + return A2( + _user$project$Helpers_ops['=>'], + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p28, + _1: {ctor: '[]'} + }, + c), A2( _elm_lang$core$Basics_ops['++'], - ', ', + A2(_user$project$Helpers$toSnakeCase, true, _p27._0._0._0), A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, r), - ')')))); - case '^': - return A2( - _elm_lang$core$Basics_ops['++'], - ':math.pow(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), + ' = ', + A2( + wrapElixirE, + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p28, + _1: {ctor: '[]'} + }, + c), + _p33)))); + } else { + var _p31 = _p27._0; + var _p30 = _p27._0._0._0; + var _p29 = _p27._1; + return _user$project$Helpers$isCapitilzed(_p30) ? A2( + _user$project$Helpers_ops['=>'], + A2(_user$project$ExVariable$rememberVariables, _p29, c), A2( _elm_lang$core$Basics_ops['++'], - ', ', + A2( + _user$project$ExExpression$tupleOrFunction, + A2(_user$project$ExVariable$rememberVariables, _p29, c), + _p34), A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, r), - ')')))); - case '::': - return A2( - _elm_lang$core$Basics_ops['++'], - '[', - A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), + ' = ', + A2(wrapElixirE, c, _p33)))) : A2( + _user$project$Helpers_ops['=>'], + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p31, + _1: {ctor: '[]'} + }, + c), A2( _elm_lang$core$Basics_ops['++'], - ' | ', + A2(_user$project$Helpers$toSnakeCase, true, _p30), A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, r), - ']')))); - case '<<': - var _v2 = c, - _v3 = elixirE, - _v4 = '>>', - _v5 = r, - _v6 = l; - c = _v2; - elixirE = _v3; - op = _v4; - l = _v5; - r = _v6; - continue elixirBinop; - case '<|': - var _v7 = c, - _v8 = elixirE, - _v9 = '|>', - _v10 = r, - _v11 = l; - c = _v7; - elixirE = _v8; - op = _v9; - l = _v10; - r = _v11; - continue elixirBinop; - case '|>': + ' = rec ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, _p30), + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A3( + _user$project$ExExpression$lambda, + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p31, + _1: {ctor: '[]'} + }, + c), + _p29, + _p33)))))); + } + } else { + if (_p27._1.ctor === '[]') { + var _p32 = _p27._0; + return A2( + _user$project$Helpers_ops['=>'], + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p32, + _1: {ctor: '[]'} + }, + c), + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$inArgs(c), + _p32), + A2( + _elm_lang$core$Basics_ops['++'], + ' = ', + A2( + wrapElixirE, + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p32, + _1: {ctor: '[]'} + }, + c), + _p33)))); + } else { + break _v18_3; + } + } + } else { + break _v18_3; + } + } while(false); + return A2(_user$project$Helpers_ops['=>'], c, ''); + }); +var _user$project$ExExpression$lambda = F3( + function (c, args, body) { + var _p35 = args; + if (_p35.ctor === '::') { + var _p36 = _p35._0; + return A2( + _elm_lang$core$Basics_ops['++'], + 'fn ', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$inArgs(c), + _p36), + A2( + _elm_lang$core$Basics_ops['++'], + ' -> ', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _user$project$ExExpression$lambda, + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p36, + _1: {ctor: '[]'} + }, + c), + _p35._1, + body), + ' end')))); + } else { + return A2(_user$project$ExExpression$elixirE, c, body); + } + }); +var _user$project$ExExpression$tupleOrFunction = F2( + function (c, a) { + var _p37 = _user$project$ExExpression$flattenTypeApplication(a); + _v20_11: + do { + _v20_10: + do { + if (_p37.ctor === '::') { + switch (_p37._0.ctor) { + case 'Application': + if (_p37._1.ctor === '[]') { + return A3(_user$project$ExExpression$functionApplication, c, _p37._0._0, _p37._0._1); + } else { + break _v20_11; + } + case 'Variable': + if ((_p37._0._0.ctor === '::') && (_p37._0._0._1.ctor === '[]')) { + switch (_p37._0._0._0) { + case 'ffi': + return A2(_user$project$ExContext$crash, c, 'Ffi inside function body is deprecated since Elchemy 0.3'); + case 'macro': + return A2(_user$project$ExContext$crash, c, 'You can\'t use `macro` inside a function body'); + case 'tryFfi': + return A2(_user$project$ExContext$crash, c, 'tryFfi inside function body is deprecated since Elchemy 0.3'); + case 'lffi': + return A2(_user$project$ExContext$crash, c, 'Lffi inside function body is deprecated since Elchemy 0.3'); + case 'flambda': + return A2(_user$project$ExContext$crash, c, 'Flambda is deprecated since Elchemy 0.3'); + case 'Just': + if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { + return A2( + _elm_lang$core$Basics_ops['++'], + '{', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, _p37._1._0), + '}')); + } else { + break _v20_10; + } + case 'Ok': + if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { + return A2( + _elm_lang$core$Basics_ops['++'], + '{:ok, ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, _p37._1._0), + '}')); + } else { + break _v20_10; + } + case 'Err': + if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { + return A2( + _elm_lang$core$Basics_ops['++'], + '{:error, ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, _p37._1._0), + '}')); + } else { + break _v20_10; + } + case 'Do': + if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { + return A2( + _elm_lang$core$Basics_ops['++'], + 'quote do ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, _p37._1._0), + ' end')); + } else { + break _v20_10; + } + default: + break _v20_10; + } + } else { + break _v20_10; + } + default: + break _v20_11; + } + } else { + break _v20_11; + } + } while(false); + var _p41 = _p37._1; + return A2( + _elm_lang$core$Maybe$withDefault, + function (_p38) { + var _p39 = _p38; + var _p40 = _p39._1; return A2( - _elm_lang$core$Basics_ops['++'], - '(', + _elm_lang$core$Maybe$withDefault, A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), + '{', A2( _elm_lang$core$Basics_ops['++'], A2( - _elm_lang$core$String$join, - '', - A2( - _elm_lang$core$List$map, - A2( - _elm_lang$core$Basics$flip, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - ').()'), - A2( - _elm_lang$core$List$map, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - })( - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - '|> (')), - A2( - _elm_lang$core$List$map, - elixirE(c), - _user$project$ExOperator$flattenPipes(r))))), - ')'))); - case 'as': - return A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), - A2( - _elm_lang$core$Basics_ops['++'], - ' = ', - A2(elixirE, c, r))); - default: - var _p4 = _p1; - var _p2 = _user$project$Helpers$operatorType(_p4); - switch (_p2.ctor) { - case 'Builtin': - return A2( - _elm_lang$core$String$join, - '', - { - ctor: '::', - _0: '(', - _1: { - ctor: '::', - _0: A2(elixirE, c, l), - _1: { + _user$project$ExExpression$elixirE, + c, + _Bogdanp$elm_ast$Ast_Expression$Variable( + { ctor: '::', - _0: ' ', - _1: { - ctor: '::', - _0: _user$project$Helpers$translateOperator(_p4), - _1: { - ctor: '::', - _0: ' ', - _1: { - ctor: '::', - _0: A2(elixirE, c, r), - _1: { - ctor: '::', - _0: ')', - _1: {ctor: '[]'} - } - } - } - } - } - } - }); - case 'Custom': - return A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$translateOperator(_p4), + _0: _p40, + _1: {ctor: '[]'} + })), A2( _elm_lang$core$Basics_ops['++'], - '(', + ', ', A2( _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, l), A2( - _elm_lang$core$Basics_ops['++'], + _elm_lang$core$String$join, ', ', A2( - _elm_lang$core$Basics_ops['++'], - A2(elixirE, c, r), - ')'))))); - default: - return _elm_lang$core$Native_Utils.crashCase( - 'ExOperator', - { - start: {line: 52, column: 13}, - end: {line: 66, column: 60} - }, - _p2)( - A2(_elm_lang$core$Basics_ops['++'], 'Illegal operator ', _p4)); - } - } - } + _elm_lang$core$List$map, + _user$project$ExExpression$elixirE(c), + _p41)), + '}')))), + A3( + _user$project$ExExpression$aliasFor, + A2(_user$project$ExContext$changeCurrentModule, _p39._0, c), + _p40, + _p41)); + }( + A2(_user$project$Helpers$moduleAccess, c.mod, _p37._0._0)), + A2( + _elm_lang$core$Maybe$map, + _user$project$ExExpression$encodeAccessMacroAndRest(c), + A3(_user$project$ExSelector$maybeAccessMacro, c, _p37._0, _p41))); + } while(false); + return A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'Shouldn\'t ever work for', + _elm_lang$core$Basics$toString(_p37))); }); - -var _user$project$ExSelector$Access = function (a) { - return {ctor: 'Access', _0: a}; -}; -var _user$project$ExSelector$getSelector = function (expression) { - var _p0 = expression; - if (_p0.ctor === 'AccessFunction') { - return _user$project$ExSelector$Access( - A2(_user$project$Helpers$toSnakeCase, true, _p0._0)); - } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExSelector', - { - start: {line: 26, column: 5}, - end: {line: 31, column: 65} - }, - _p0)('The only allowed selectors are: .field'); - } -}; -var _user$project$ExSelector$Update = {ctor: 'Update'}; -var _user$project$ExSelector$Put = {ctor: 'Put'}; -var _user$project$ExSelector$Get = {ctor: 'Get'}; -var _user$project$ExSelector$accessMacroType = function (string) { - var getType = function (x) { - return A3( - _elm_lang$core$List$foldl, - F2( - function (_p2, acc) { - var _p3 = _p2; - var _p4 = acc; - if (_p4.ctor === 'Nothing') { - return A2( - _elm_lang$core$Regex$contains, - _elm_lang$core$Regex$regex(_p3._0), - x) ? _elm_lang$core$Maybe$Just(_p3._1) : _elm_lang$core$Maybe$Nothing; - } else { - return _p4; - } - }), - _elm_lang$core$Maybe$Nothing, - { - ctor: '::', - _0: {ctor: '_Tuple2', _0: 'updateIn\\d?', _1: _user$project$ExSelector$Update}, - _1: { - ctor: '::', - _0: {ctor: '_Tuple2', _0: 'putIn\\d?', _1: _user$project$ExSelector$Put}, - _1: { - ctor: '::', - _0: {ctor: '_Tuple2', _0: 'getIn\\d?', _1: _user$project$ExSelector$Get}, - _1: {ctor: '[]'} - } - } - }); - }; - var getArity = function (_p5) { +var _user$project$ExExpression$aliasFor = F3( + function (c, name, rest) { return A2( - _elm_lang$core$Result$withDefault, - 1, - _elm_lang$core$String$toInt( - A2(_elm_lang$core$String$filter, _elm_lang$core$Char$isDigit, _p5))); - }; - return A2( - _elm_lang$core$Maybe$map, - function (t) { - return { - ctor: '_Tuple2', - _0: t, - _1: getArity(string) - }; - }, - getType(string)); -}; -var _user$project$ExSelector$AccessMacro = F3( - function (a, b, c) { - return {ctor: 'AccessMacro', _0: a, _1: b, _2: c}; + _user$project$Helpers$maybeOr, + A3(_user$project$ExExpression$typeAliasApplication, c, name, rest), + A3(_user$project$ExExpression$typeApplication, c, name, rest)); }); -var _user$project$ExSelector$maybeAccessMacro = F2( - function (call, args) { - var accessMacroArgs = F2( - function (arity, args) { - var _p6 = A2( - _elm_lang$core$Basics$compare, - _elm_lang$core$List$length(args), - arity); - switch (_p6.ctor) { - case 'LT': - return _elm_lang$core$Native_Utils.crashCase( - 'ExSelector', - { - start: {line: 38, column: 13}, - end: {line: 50, column: 65} - }, - _p6)( +var _user$project$ExExpression$typeAliasApplication = F3( + function (c, name, args) { + return A2( + _elm_lang$core$Maybe$map, + _user$project$ExExpression$elixirE(c), + A2( + _elm_lang$core$Maybe$andThen, + _user$project$ExType$typeAliasConstructor(args), + A2( + _elm_lang$core$Maybe$andThen, + _user$project$ExExpression$filterTypeAlias, + A3(_user$project$ExContext$getAlias, c.mod, name, c)))); + }); +var _user$project$ExExpression$typeApplication = F3( + function (c, name, args) { + return _elm_lang$core$Maybe$map( + function (_p42) { + var _p43 = _p42; + var _p45 = _p43.arity; + var len = _elm_lang$core$List$length(args); + var dif = _p45 - len; + var $arguments = _user$project$Helpers$generateArguments(dif); + var varArgs = A2( + _elm_lang$core$List$map, + function (_p44) { + return _Bogdanp$elm_ast$Ast_Expression$Variable( + _elm_lang$core$List$singleton(_p44)); + }, + $arguments); + return _elm_lang$core$Native_Utils.eq(_p45, 0) ? _user$project$Helpers$atomize(name) : ((_elm_lang$core$Native_Utils.cmp(dif, 0) > -1) ? A3( + _elm_lang$core$Basics$flip, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + A2(_elm_lang$core$String$repeat, dif, ' end'), + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + '', + A2( + _elm_lang$core$List$map, + A2( + _elm_lang$core$Basics$flip, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + ' -> '), + A2( + _elm_lang$core$List$map, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + })('fn '), + $arguments))), + A2( + _elm_lang$core$Basics_ops['++'], + '{', A2( _elm_lang$core$Basics_ops['++'], - 'Access macros [updateIn/getIn/putIn] cannot be partially applied. Expecting ', + _user$project$Helpers$atomize(name), A2( _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(arity), - ' selector arguments.'))); - case 'EQ': - return { - ctor: '_Tuple2', - _0: A2(_elm_lang$core$List$map, _user$project$ExSelector$getSelector, args), - _1: {ctor: '[]'} - }; - default: - return A2( - _elm_lang$core$Tuple$mapFirst, - _elm_lang$core$List$map(_user$project$ExSelector$getSelector), - A2(_elm_community$list_extra$List_Extra$splitAt, arity, args)); - } - }); - var _p8 = {ctor: '_Tuple2', _0: call, _1: args}; - if ((((_p8.ctor === '_Tuple2') && (_p8._0.ctor === 'Variable')) && (_p8._0._0.ctor === '::')) && (_p8._0._0._1.ctor === '[]')) { - return A2( - _elm_lang$core$Maybe$map, - function (_p9) { - var _p10 = _p9; - var _p12 = _p10._1; - var _p11 = A2(accessMacroArgs, _p12, _p8._1); - var selectors = _p11._0; - var rest = _p11._1; - return { - ctor: '_Tuple2', - _0: A3(_user$project$ExSelector$AccessMacro, _p10._0, _p12, selectors), - _1: rest - }; - }, - _user$project$ExSelector$accessMacroType(_p8._0._0._0)); - } else { - return _elm_lang$core$Maybe$Nothing; - } + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + _user$project$ExExpression$elixirE( + A2(_user$project$ExVariable$rememberVariables, varArgs, c)), + A2(_elm_lang$core$Basics_ops['++'], args, varArgs))), + '}')))))) : A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'Expected ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p45), + A2( + _elm_lang$core$Basics_ops['++'], + ' arguments for \'', + A2( + _elm_lang$core$Basics_ops['++'], + name, + A2( + _elm_lang$core$Basics_ops['++'], + '\'. Got: ', + _elm_lang$core$Basics$toString( + _elm_lang$core$List$length(args))))))))); + })( + A3(_user$project$ExContext$getType, c.mod, name, c)); }); - -var _user$project$ExExpression$isTuple = function (a) { - isTuple: - while (true) { - var _p0 = a; - switch (_p0.ctor) { - case 'Application': - var _v1 = _p0._0; - a = _v1; - continue isTuple; - case 'Variable': - if ((_p0._0.ctor === '::') && (_p0._0._1.ctor === '[]')) { - if (_p0._0._0 === '()') { - return true; - } else { - return _user$project$Helpers$isCapitilzed(_p0._0._0); - } - } else { - return function (_p1) { - var _p2 = _p1; - return _user$project$ExExpression$isTuple( - _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: _p2._1, - _1: {ctor: '[]'} - })); - }( - A2(_user$project$Helpers$moduleAccess, '', _p0._0)); - } - default: - return false; - } - } -}; -var _user$project$ExExpression$filterTypeAlias = function (_p3) { - var _p4 = _p3; - var _p5 = _p4.aliasType; - if (_p5.ctor === 'TypeAlias') { - return _elm_lang$core$Maybe$Just(_p4); - } else { - return _elm_lang$core$Maybe$Nothing; - } -}; -var _user$project$ExExpression$isMacro = function (e) { - isMacro: - while (true) { - var _p6 = e; - _v5_2: - do { - switch (_p6.ctor) { - case 'Application': - var _v6 = _p6._0; - e = _v6; - continue isMacro; - case 'Variable': - if ((_p6._0.ctor === '::') && (_p6._0._1.ctor === '[]')) { - return A2( - _elm_lang$core$List$member, - _p6._0._0, - { - ctor: '::', - _0: 'tryFfi', - _1: { - ctor: '::', - _0: 'ffi', - _1: { - ctor: '::', - _0: 'lffi', - _1: { - ctor: '::', - _0: 'flambda', - _1: { - ctor: '::', - _0: 'updateIn', - _1: { - ctor: '::', - _0: 'updateIn2', - _1: { - ctor: '::', - _0: 'updateIn3', - _1: { - ctor: '::', - _0: 'updateIn4', - _1: { - ctor: '::', - _0: 'updateIn5', - _1: { - ctor: '::', - _0: 'putIn', - _1: { - ctor: '::', - _0: 'putIn', - _1: { - ctor: '::', - _0: 'putIn2', - _1: { - ctor: '::', - _0: 'putIn3', - _1: { - ctor: '::', - _0: 'putIn4', - _1: { - ctor: '::', - _0: 'putIn5', - _1: { - ctor: '::', - _0: 'getIn', - _1: { - ctor: '::', - _0: 'getIn2', - _1: { - ctor: '::', - _0: 'getIn3', - _1: { - ctor: '::', - _0: 'getIn4', - _1: { - ctor: '::', - _0: 'getIn5', - _1: {ctor: '[]'} - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - }); - } else { - break _v5_2; - } +var _user$project$ExExpression$encodeAccessMacroAndRest = F2( + function (c, _p46) { + var _p47 = _p46; + var _p52 = _p47._1; + var encodedRest = function () { + var _p48 = _p52; + if (_p48.ctor === '[]') { + return ''; + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + '.(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ').(', + A2( + _elm_lang$core$List$map, + _user$project$ExExpression$elixirE(c), + _p52)), + ')')); + } + }(); + var encodedType = function () { + var _p49 = _p47._0._0; + switch (_p49.ctor) { + case 'Update': + return 'update_in_'; + case 'Get': + return 'get_in_'; default: - break _v5_2; + return 'put_in_'; } - } while(false); - return false; - } -}; -var _user$project$ExExpression$flattenTypeApplication = function (application) { - var _p7 = application; - if (_p7.ctor === 'Application') { - return (_user$project$ExExpression$isMacro(application) || _user$project$ExExpression$isTuple(application)) ? A2( - _elm_lang$core$Basics_ops['++'], - _user$project$ExExpression$flattenTypeApplication(_p7._0), - { - ctor: '::', - _0: _p7._1, - _1: {ctor: '[]'} - }) : { - ctor: '::', - _0: application, - _1: {ctor: '[]'} - }; - } else { - return { - ctor: '::', - _0: _p7, - _1: {ctor: '[]'} + }(); + var encodeSelector = function (_p50) { + var _p51 = _p50; + return A2( + _elm_lang$core$Basics_ops['++'], + ':', + A2(_user$project$Helpers$toSnakeCase, true, _p51._0)); }; - } -}; -var _user$project$ExExpression$elixirE = F2( - function (c, e) { - var _p8 = e; - _v8_7: + var encodedSelectors = A2( + _elm_lang$core$String$join, + ', ', + A2(_elm_lang$core$List$map, encodeSelector, _p47._0._2)); + return A2( + _elm_lang$core$Basics_ops['++'], + encodedType, + A2( + _elm_lang$core$Basics_ops['++'], + '([', + A2( + _elm_lang$core$Basics_ops['++'], + encodedSelectors, + A2(_elm_lang$core$Basics_ops['++'], '])', encodedRest)))); + }); +var _user$project$ExExpression$functionApplication = F3( + function (c, left, right) { + var reduceArgs = F3( + function (c, args, separator) { + return A2( + _elm_lang$core$String$join, + separator, + A2( + _elm_lang$core$List$map, + _user$project$ExExpression$elixirE(c), + args)); + }); + var _p53 = _user$project$Helpers$applicationToList( + A2(_Bogdanp$elm_ast$Ast_Expression$Application, left, right)); + _v27_2: do { - switch (_p8.ctor) { - case 'Variable': - return A2(_user$project$ExExpression$elixirVariable, c, _p8._0); - case 'Application': - return A2(_user$project$ExExpression$tupleOrFunction, c, _p8); - case 'RecordUpdate': - return A2( - _elm_lang$core$Basics_ops['++'], - '%{', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p8._0), - A2( + if (_p53.ctor === '::') { + switch (_p53._0.ctor) { + case 'Variable': + if ((_p53._0._0.ctor === '::') && (_p53._0._0._1.ctor === '[]')) { + var _p55 = _p53._0._0._0; + var _p54 = _p53._1; + return A4(_user$project$ExContext$areMatchingArity, c, c.mod, _p55, _p54) ? A2( _elm_lang$core$Basics_ops['++'], - ' | ', + A2(_user$project$Helpers$toSnakeCase, true, _p55), A2( _elm_lang$core$Basics_ops['++'], + '(', A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - function (_p9) { - var _p10 = _p9; - return A2( - _elm_lang$core$Basics_ops['++'], - _p10._0, - A2( - _elm_lang$core$Basics_ops['++'], - ': ', - A2(_user$project$ExExpression$elixirE, c, _p10._1))); - }, - _p8._1)), - '}')))); - case 'Access': - if (_p8._0.ctor === 'Variable') { - return A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$modulePath(_p8._0._0), - A2( + _elm_lang$core$Basics_ops['++'], + A3(reduceArgs, c, _p54, ', '), + ')'))) : (c.inMeta ? A2(_user$project$ExContext$crash, c, 'You need to use full ') : A2( _elm_lang$core$Basics_ops['++'], - '.', + A2(_user$project$ExExpression$elixirE, c, left), A2( - _elm_lang$core$String$join, - '.', + _elm_lang$core$Basics_ops['++'], + '.(', A2( - _elm_lang$core$List$map, - _user$project$Helpers$toSnakeCase(true), - _p8._1)))); - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p8._0), - A2( - _elm_lang$core$Basics_ops['++'], - '.', - A2(_elm_lang$core$String$join, '.', _p8._1))); - } - case 'AccessFunction': - return A2( - _elm_lang$core$Basics_ops['++'], - '(fn a -> a.', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p8._0), - ' end)')); - case 'BinOp': - if (((_p8._0.ctor === 'Variable') && (_p8._0._0.ctor === '::')) && (_p8._0._0._1.ctor === '[]')) { - return A5(_user$project$ExOperator$elixirBinop, c, _user$project$ExExpression$elixirE, _p8._0._0._0, _p8._1, _p8._2); - } else { - break _v8_7; - } - default: - break _v8_7; - } - } while(false); - return A2(_user$project$ExExpression$elixirControlFlow, c, _p8); - }); -var _user$project$ExExpression$elixirControlFlow = F2( - function (c, e) { - var _p11 = e; - switch (_p11.ctor) { - case 'Case': - return A3(_user$project$ExExpression$caseE, c, _p11._0, _p11._1); - case 'Lambda': - return A3(_user$project$ExExpression$lambda, c, _p11._0, _p11._1); - case 'If': - if (_p11._2.ctor === 'If') { - return A2( - _elm_lang$core$String$join, - '', - A2( - _elm_lang$core$Basics_ops['++'], - { - ctor: '::', - _0: 'cond do', - _1: {ctor: '[]'} - }, - A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, right), + ')')))); + } else { + break _v27_2; + } + case 'Access': + if (((_p53._0._0.ctor === 'Variable') && (_p53._0._1.ctor === '::')) && (_p53._0._1._1.ctor === '[]')) { + var _p57 = _p53._0._1._0; + var _p56 = _p53._1; + var fnName = A2(_user$project$Helpers$toSnakeCase, true, _p57); + var mod = _user$project$Helpers$modulePath(_p53._0._0._0); + return A4(_user$project$ExContext$areMatchingArity, c, mod, _p57, _p56) ? A2( _elm_lang$core$Basics_ops['++'], + mod, A2( - _user$project$ExExpression$handleIfExp, - _user$project$ExContext$indent(c), - _p11), - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'end', - _1: {ctor: '[]'} - } - }))); - } else { - return A2( - _elm_lang$core$Basics_ops['++'], - 'if ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p11._0), - A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + fnName, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A3(reduceArgs, c, _p56, ', '), + ')'))))) : A2( _elm_lang$core$Basics_ops['++'], - ' do ', + mod, A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p11._1), + '.', A2( _elm_lang$core$Basics_ops['++'], - ' else ', + fnName, A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p11._2), - ' end')))))); + '().(', + A2( + _elm_lang$core$Basics_ops['++'], + A3(reduceArgs, c, _p56, ').('), + ')'))))); + } else { + break _v27_2; + } + default: + break _v27_2; } - case 'Let': - return function (_p12) { - var _p13 = _p12; - return A2( + } else { + break _v27_2; + } + } while(false); + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, left), + A2( + _elm_lang$core$Basics_ops['++'], + '.(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExExpression$elixirE, c, right), + ')'))); + }); +var _user$project$ExExpression$elixirLetInMutualFunctions = F2( + function (context, expressionsList) { + var letBranchToLambda = F2( + function (c, _p58) { + var _p59 = _p58; + var _p62 = _p59._0; + var _p61 = _p59._1; + var _p60 = _user$project$Helpers$applicationToList(_p62); + if (_p60.ctor === '[]') { + return ''; + } else { + if (_p60._1.ctor === '[]') { + return A2(_user$project$ExExpression$elixirE, c, _p61); + } else { + if (((_p60._0.ctor === 'Variable') && (_p60._0._0.ctor === '::')) && (_p60._0._0._1.ctor === '[]')) { + return A3(_user$project$ExExpression$lambda, c, _p60._1, _p61); + } else { + return A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p62), + ' is not a let in branch')); + } + } + } + }); + var vars = A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$first, expressionsList); + var c = A2(_user$project$ExVariable$rememberVariables, vars, context); + var names = A2( + _elm_lang$core$List$map, + function (_p63) { + return A2( + _user$project$Helpers$toSnakeCase, + true, + A2( + _user$project$ExVariable$extractName, + c, + _elm_lang$core$Tuple$first(_p63))); + }, + expressionsList); + return A2( + _user$project$Helpers_ops['=>'], + c, + A2( + _elm_lang$core$Basics_ops['++'], + '{', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$String$join, ', ', names), + A2( _elm_lang$core$Basics_ops['++'], - _p13._1, - A2(_user$project$ExExpression$elixirE, _p13._0, _p11._1)); - }( - A3( - _elm_lang$core$Basics$flip, - _elm_lang$core$List$foldl, - {ctor: '_Tuple2', _0: c, _1: ''}, - F2( - function (varGroup, _p14) { - var _p15 = _p14; - var _p20 = _p15._0; - return function (_p16) { - var _p17 = _p16; - var _p18 = _p17._0; - return A2( - _user$project$Helpers_ops['=>'], - A2(_user$project$ExContext$mergeVariables, _p18, _p20), - A2( + '} = let [', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ',', + A2( + _elm_lang$core$List$map, + function (_p64) { + var _p65 = _p64; + return A2( _elm_lang$core$Basics_ops['++'], - _p15._1, + _user$project$Helpers$ind(c.indent + 1), A2( _elm_lang$core$Basics_ops['++'], - _p17._1, - _user$project$Helpers$ind(_p18.indent)))); - }( - function () { - var _p19 = varGroup; - if (_p19.ctor === '[]') { - return A2(_user$project$Helpers_ops['=>'], _p20, ''); - } else { - if ((_p19._0.ctor === '_Tuple2') && (_p19._1.ctor === '[]')) { - return A2( - _user$project$ExExpression$elixirLetInBranch, - _p20, - {ctor: '_Tuple2', _0: _p19._0._0, _1: _p19._0._1}); - } else { - return A2(_user$project$ExExpression$elixirLetInMutualFunctions, _p20, _p19); - } - } - }()); - }))( - _user$project$ExVariable$groupByCrossDependency( - _user$project$ExVariable$organizeLetInVariablesOrder(_p11._0)))); - default: - return A2(_user$project$ExExpression$elixirPrimitve, c, e); - } + A2(_user$project$Helpers$toSnakeCase, true, _p65._0), + A2(_elm_lang$core$Basics_ops['++'], ': ', _p65._1))); + }, + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond( + letBranchToLambda( + _user$project$ExContext$indent(c))), + A2( + _elm_lang$core$List$map, + function (_p66) { + var _p67 = _p66; + return { + ctor: '_Tuple2', + _0: A2(_user$project$ExVariable$extractName, c, _p67._0), + _1: _p67 + }; + }, + expressionsList)))), + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + ']')))))); }); -var _user$project$ExExpression$caseE = F3( - function (c, $var, body) { - return c.inCaseOf ? _elm_lang$core$Native_Utils.crash( - 'ExExpression', - { - start: {line: 595, column: 9}, - end: {line: 595, column: 20} - })( - A2( - _elm_lang$core$Basics_ops['++'], - 'Module ', - A2(_elm_lang$core$Basics_ops['++'], c.mod, '\nBecause of a known bug in elm-ast parser, you can\'t reliably use nested case..of yet. Sorry'))) : A2( - _elm_lang$core$Basics_ops['++'], - 'case ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, $var), - A2( +var _user$project$ExExpression$elixirPrimitve = F2( + function (c, e) { + var _p68 = e; + switch (_p68.ctor) { + case 'Integer': + return _elm_lang$core$Basics$toString(_p68._0); + case 'Float': + var name = _elm_lang$core$Basics$toString(_p68._0); + return A2(_elm_lang$core$String$contains, '.', name) ? name : A2(_elm_lang$core$Basics_ops['++'], name, '.0'); + case 'Character': + var _p69 = _p68._0; + switch (_p69.valueOf()) { + case ' ': + return '?\\s'; + case '\n': + return '?\\n'; + case '\r': + return '?\\r'; + case '\t': + return '?\\t'; + case '\\': + return '?\\\\'; + case '': + return '?\\0'; + default: + return A2( + _elm_lang$core$Basics_ops['++'], + '?', + _elm_lang$core$String$fromChar(_p69)); + } + case 'String': + return A2( _elm_lang$core$Basics_ops['++'], - ' do', + '\"', + A2(_elm_lang$core$Basics_ops['++'], _p68._0, '\"')); + case 'List': + return A2( + _elm_lang$core$Basics_ops['++'], + '[', A2( _elm_lang$core$Basics_ops['++'], A2( _elm_lang$core$String$join, - '', + ', ', A2( _elm_lang$core$List$map, - _user$project$ExExpression$caseBranch( - A2( - _user$project$ExVariable$rememberVariables, - { - ctor: '::', - _0: $var, - _1: {ctor: '[]'} - }, - _elm_lang$core$Native_Utils.update( - c, - {inCaseOf: true}))), - body)), + _user$project$ExExpression$elixirE(c), + _p68._0)), + ']')); + case 'Tuple': + return A2( + _elm_lang$core$Basics_ops['++'], + '{', + A2( + _elm_lang$core$Basics_ops['++'], A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - 'end'))))); - }); -var _user$project$ExExpression$caseBranch = F2( - function (c, _p21) { - var _p22 = _p21; - var _p23 = _p22._0; - return A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), - A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$inArgs(c), - _p23)), - A2( - _elm_lang$core$Basics_ops['++'], - ' ->', - A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + _user$project$ExExpression$elixirE(c), + _p68._0)), + '}')); + case 'Record': + return A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 2), + '%{', A2( - _user$project$ExExpression$elixirE, + _elm_lang$core$Basics_ops['++'], A2( - _user$project$ExVariable$rememberVariables, - { + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + function (_p70) { + var _p71 = _p70; + return A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, _p71._0), + A2( + _elm_lang$core$Basics_ops['++'], + ': ', + A2(_user$project$ExExpression$elixirE, c, _p71._1))); + }, + _p68._0)), + '}')); + default: + return A3(_user$project$ExContext$notImplemented, c, 'expression', e); + } + }); +var _user$project$ExExpression$handleIfExp = F2( + function (c, e) { + var _p72 = e; + if (_p72.ctor === 'If') { + return A2( + _elm_lang$core$Basics_ops['++'], + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$indent(c), + _p72._0), + _1: { + ctor: '::', + _0: ' -> ', + _1: { ctor: '::', - _0: _p23, + _0: A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$indent(c), + _p72._1), _1: {ctor: '[]'} - }, - _user$project$ExContext$indent( - _user$project$ExContext$indent(c))), - _p22._1)))); + } + } + } + }, + A2(_user$project$ExExpression$handleIfExp, c, _p72._2)); + } else { + return { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'true -> ', + _1: { + ctor: '::', + _0: A2( + _user$project$ExExpression$elixirE, + _user$project$ExContext$indent(c), + e), + _1: {ctor: '[]'} + } + } + }; + } }); -var _user$project$ExExpression$elixirLetInBranch = F2( - function (c, _p24) { - var _p25 = _p24; - var _p34 = _p25._0; - var _p33 = _p25._1; - var wrapElixirE = F2( - function (c, exp) { - var _p26 = exp; - if (_p26.ctor === 'Let') { - return A2( - _elm_lang$core$Basics_ops['++'], - '(', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), - A2( +var _user$project$ExExpression$elixirVariable = F2( + function (c, $var) { + var _p73 = $var; + _v36_8: + do { + if (_p73.ctor === '[]') { + return ''; + } else { + if (_p73._1.ctor === '[]') { + switch (_p73._0) { + case '()': + return '{}'; + case 'Nothing': + return 'nil'; + case 'Just': + return 'fn x1 -> {x1} end'; + case 'Err': + return 'fn x1 -> {:error, x1} end'; + case 'Ok': + return 'fn x1 -> {:ok, x1} end'; + case 'curry': + return 'curried()'; + case 'uncurry': + return 'uncurried()'; + default: + break _v36_8; + } + } else { + break _v36_8; + } + } + } while(false); + return function (_p74) { + var _p75 = _p74; + var _p77 = _p75._1; + if (_user$project$Helpers$isCapitilzed(_p77)) { + return A2( + _elm_lang$core$Maybe$withDefault, + _user$project$Helpers$atomize(_p77), + A3( + _user$project$ExExpression$aliasFor, + A2(_user$project$ExContext$changeCurrentModule, _p75._0, c), + _p77, + {ctor: '[]'})); + } else { + if (A2(_elm_lang$core$String$startsWith, '@', _p77)) { + return _user$project$Helpers$atomize( + A2(_elm_lang$core$String$dropLeft, 1, _p77)); + } else { + var _p76 = _user$project$Helpers$operatorType(_p77); + switch (_p76.ctor) { + case 'Builtin': + return _elm_lang$core$Native_Utils.eq(_p77, '<|') ? 'flip().((&|>/0).())' : A2( _elm_lang$core$Basics_ops['++'], - A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$indent(c), - exp), + '(&XBasics.', A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - ')')))); - } else { - return A2(_user$project$ExExpression$elixirE, c, exp); + _user$project$Helpers$translateOperator(_p77), + '/0).()')); + case 'Custom': + return _user$project$Helpers$translateOperator(_p77); + default: + return A2( + _user$project$ExVariable$varOrNah, + c, + A2(_user$project$Helpers$toSnakeCase, true, _p77)); + } } - }); - var _p27 = _user$project$Helpers$applicationToList(_p34); - _v18_3: - do { - if (_p27.ctor === '::') { - if (((_p27._0.ctor === 'Variable') && (_p27._0._0.ctor === '::')) && (_p27._0._0._1.ctor === '[]')) { - if (_p27._1.ctor === '[]') { - var _p28 = _p27._0; - return A2( - _user$project$Helpers_ops['=>'], + } + }( + A2(_user$project$Helpers$moduleAccess, c.mod, _p73)); + }); + +var _user$project$ExMeta$Require = function (a) { + return {ctor: 'Require', _0: a}; +}; +var _user$project$ExMeta$Import = F3( + function (a, b, c) { + return {ctor: 'Import', _0: a, _1: b, _2: c}; + }); +var _user$project$ExMeta$metaDefinition = function (c) { + var insertRequirement = F2( + function (rOrI, dict) { + var _p0 = rOrI; + if (_p0.ctor === 'Require') { + return A3( + _elm_lang$core$Dict$update, + _p0._0, + function (_p1) { + return _elm_lang$core$Maybe$Just( A2( - _user$project$ExVariable$rememberVariables, + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + _p1)); + }, + dict); + } else { + var _p4 = _p0._1; + var _p3 = _p0._2; + return A3( + _elm_lang$core$Dict$update, + _p0._0, + function (_p2) { + return _elm_lang$core$Maybe$Just( + A2( + _elm_lang$core$Maybe$withDefault, { ctor: '::', - _0: _p28, + _0: {ctor: '_Tuple2', _0: _p4, _1: _p3}, _1: {ctor: '[]'} }, - c), - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p27._0._0._0), A2( - _elm_lang$core$Basics_ops['++'], - ' = ', + _elm_lang$core$Maybe$map, + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + })( + {ctor: '_Tuple2', _0: _p4, _1: _p3}), + _p2))); + }, + dict); + } + }); + var stringify = function (_p5) { + var _p6 = _p5; + return A2( + _elm_lang$core$Basics_ops['++'], + '{:', + A2( + _elm_lang$core$Basics_ops['++'], + _p6._0, + A2( + _elm_lang$core$Basics_ops['++'], + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p6._1), + '}')))); + }; + var addMacro = F2( + function (t, acc) { + var _p7 = t; + _v2_2: + do { + switch (_p7.ctor) { + case 'Variable': + if ((_p7._0.ctor === '::') && (_p7._0._1.ctor === '[]')) { + var _p10 = _p7._0._0; + return A2( + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + acc, + A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, A2( - wrapElixirE, - A2( - _user$project$ExVariable$rememberVariables, - { + _elm_lang$core$Maybe$map, + function (_p8) { + var _p9 = _p8; + return { ctor: '::', - _0: _p28, + _0: A3(_user$project$ExMeta$Import, _p9._0, _p10, _p9._1), _1: {ctor: '[]'} - }, - c), - _p33)))); - } else { - var _p31 = _p27._0; - var _p30 = _p27._0._0._0; - var _p29 = _p27._1; - return _user$project$Helpers$isCapitilzed(_p30) ? A2( - _user$project$Helpers_ops['=>'], - A2(_user$project$ExVariable$rememberVariables, _p29, c), + }; + }, + A2(_elm_lang$core$Dict$get, _p10, c.importedFunctions)))); + } else { + break _v2_2; + } + case 'Access': + if (_p7._0.ctor === 'Variable') { + return { + ctor: '::', + _0: _user$project$ExMeta$Require( + _user$project$Helpers$modulePath(_p7._0._0)), + _1: acc + }; + } else { + break _v2_2; + } + default: + break _v2_2; + } + } while(false); + return acc; + }); + var requiredImports = A2( + _elm_lang$core$String$join, + _user$project$Helpers$ind(c.indent), + A2( + _elm_lang$core$List$map, + function (_p11) { + var _p12 = _p11; + var _p14 = _p12._0; + var _p13 = _p12._1; + if (_p13.ctor === '[]') { + return A2(_elm_lang$core$Basics_ops['++'], 'require ', _p14); + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + 'import ', + A2( + _elm_lang$core$Basics_ops['++'], + _p14, A2( _elm_lang$core$Basics_ops['++'], - A2( - _user$project$ExExpression$tupleOrFunction, - A2(_user$project$ExVariable$rememberVariables, _p29, c), - _p34), + ', only: [', A2( _elm_lang$core$Basics_ops['++'], - ' = ', - A2(wrapElixirE, c, _p33)))) : A2( - _user$project$Helpers_ops['=>'], + A2( + _elm_lang$core$String$join, + ',', + A2(_elm_lang$core$List$map, stringify, _p13)), + ']')))); + } + }, + _elm_lang$core$Dict$toList( + A3( + _elm_lang$core$List$foldl, + insertRequirement, + _elm_lang$core$Dict$empty, + A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, A2( - _user$project$ExVariable$rememberVariables, - { - ctor: '::', - _0: _p31, - _1: {ctor: '[]'} - }, - c), + _user$project$ExAst$foldExpression, + addMacro, + {ctor: '[]'}), + c.meta)))))); + var getUsedFunctions = _user$project$ExAst$walkExpressionOutwards; + var defMeta = function (meta) { + return A2( + _elm_lang$core$Basics_ops['++'], + 'defmodule ', + A2( + _elm_lang$core$Basics_ops['++'], + c.mod, + A2( + _elm_lang$core$Basics_ops['++'], + '.Meta do', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + A2( + _elm_lang$core$Basics_ops['++'], + requiredImports, A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p30), + '\n', A2( _elm_lang$core$Basics_ops['++'], - ' = rec ', + _user$project$Helpers$ind(c.indent), A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p30), - A2( - _elm_lang$core$Basics_ops['++'], - ', ', - A3( - _user$project$ExExpression$lambda, - A2( - _user$project$ExVariable$rememberVariables, - { - ctor: '::', - _0: _p31, - _1: {ctor: '[]'} - }, - c), - _p29, - _p33)))))); - } + A2(_user$project$ExExpression$elixirE, c, meta), + '\nend')))))))); + }; + return A2( + _elm_lang$core$Maybe$withDefault, + '', + A2(_elm_lang$core$Maybe$map, defMeta, c.meta)); +}; + +var _user$project$ExFunction$getLambdaArgumentIndexes = function (t) { + return A2( + _elm_lang$core$List$filter, + function (_p0) { + var _p1 = _p0; + return _elm_lang$core$Native_Utils.cmp(_p1._1, 1) > 0; + }, + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$mapSecond( + function (_p2) { + return A2( + F2( + function (x, y) { + return x + y; + }), + -1, + _elm_lang$core$List$length(_p2)); + }), + A2( + _elm_lang$core$List$indexedMap, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2( + _elm_lang$core$List$map, + _user$project$Helpers$typeApplicationToList, + A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2(_elm_lang$core$Maybe$map, _user$project$Helpers$typeApplicationToList, t)))))); +}; +var _user$project$ExFunction$privateOrPublic = F2( + function (context, name) { + return A2(_user$project$ExContext$isPrivate, context, name) ? 'p' : ''; + }); +var _user$project$ExFunction$functionCurry = F5( + function (c, elixirE, name, arity, lambdasAt) { + var _p3 = { + ctor: '_Tuple2', + _0: arity, + _1: A3(_user$project$ExContext$hasFlag, 'nocurry', name, c) + }; + _v1_0: + do { + if (_p3._1 === true) { + if (_p3._0 === 0) { + break _v1_0; } else { - if (_p27._1.ctor === '[]') { - var _p32 = _p27._0; - return A2( - _user$project$Helpers_ops['=>'], - A2( - _user$project$ExVariable$rememberVariables, - { - ctor: '::', - _0: _p32, - _1: {ctor: '[]'} - }, - c), - A2( + return ''; + } + } else { + if (_p3._0 === 0) { + break _v1_0; + } else { + var _p6 = _p3._0; + var lambdas = A2( + _elm_lang$core$List$map, + function (_p4) { + var _p5 = _p4; + return A2( _elm_lang$core$Basics_ops['++'], - A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$inArgs(c), - _p32), + '{', A2( _elm_lang$core$Basics_ops['++'], - ' = ', + _elm_lang$core$Basics$toString(_p5._0), A2( - wrapElixirE, + _elm_lang$core$Basics_ops['++'], + ', ', A2( - _user$project$ExVariable$rememberVariables, - { + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p5._1), + '}')))); + }, + lambdasAt); + var p = A2(_user$project$ExFunction$privateOrPublic, c, name); + var resolvedName = _user$project$Helpers$isCustomOperator(name) ? _user$project$Helpers$translateOperator(name) : A2(_user$project$Helpers$toSnakeCase, true, name); + return (_elm_lang$core$Native_Utils.eq( + lambdas, + {ctor: '[]'}) || _elm_lang$core$Native_Utils.eq(p, 'p')) ? A2( + _elm_lang$core$String$join, + '', + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'curry', + _1: { + ctor: '::', + _0: ' ', + _1: { + ctor: '::', + _0: resolvedName, + _1: { + ctor: '::', + _0: '/', + _1: { ctor: '::', - _0: _p32, + _0: _elm_lang$core$Basics$toString(_p6), _1: {ctor: '[]'} - }, - c), - _p33)))); - } else { - break _v18_3; - } + } + } + } + } + } + }) : A2( + _elm_lang$core$String$join, + '', + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'curry', + _1: { + ctor: '::', + _0: ' ', + _1: { + ctor: '::', + _0: resolvedName, + _1: { + ctor: '::', + _0: '/', + _1: { + ctor: '::', + _0: _elm_lang$core$Basics$toString(_p6), + _1: { + ctor: '::', + _0: ', lambdas: [', + _1: { + ctor: '::', + _0: A2(_elm_lang$core$String$join, ', ', lambdas), + _1: { + ctor: '::', + _0: ']', + _1: {ctor: '[]'} + } + } + } + } + } + } + } + } + }); } - } else { - break _v18_3; } } while(false); - return A2(_user$project$Helpers_ops['=>'], c, ''); + return ''; }); -var _user$project$ExExpression$lambda = F3( - function (c, args, body) { - var newC = _elm_lang$core$Native_Utils.update( - c, - {inCaseOf: false}); - var _p35 = args; - if (_p35.ctor === '::') { - var _p36 = _p35._0; - return A2( - _elm_lang$core$Basics_ops['++'], - 'fn ', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$inArgs(c), - _p36), - A2( - _elm_lang$core$Basics_ops['++'], - ' -> ', - A2( - _elm_lang$core$Basics_ops['++'], - A3( - _user$project$ExExpression$lambda, - A2( - _user$project$ExVariable$rememberVariables, - { +var _user$project$ExFunction$genElixirFunc = F6( + function (c, elixirE, name, args, missingArgs, body) { + var _p7 = { + ctor: '_Tuple2', + _0: _user$project$Helpers$operatorType(name), + _1: args + }; + switch (_p7._0.ctor) { + case 'Custom': + return A2( + _elm_lang$core$String$join, + '', + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'def', + _1: { + ctor: '::', + _0: A2(_user$project$ExFunction$privateOrPublic, c, name), + _1: { + ctor: '::', + _0: ' ', + _1: { ctor: '::', - _0: _p36, - _1: {ctor: '[]'} - }, - newC), - _p35._1, - body), - ' end')))); - } else { - return A2(_user$project$ExExpression$elixirE, newC, body); - } - }); -var _user$project$ExExpression$tupleOrFunction = F2( - function (c, a) { - var _p37 = _user$project$ExExpression$flattenTypeApplication(a); - _v20_9: - do { - _v20_8: - do { - if (_p37.ctor === '::') { - switch (_p37._0.ctor) { - case 'Application': - if (_p37._1.ctor === '[]') { - return A3(_user$project$ExExpression$functionApplication, c, _p37._0._0, _p37._0._1); - } else { - break _v20_9; - } - case 'Variable': - if ((_p37._0._0.ctor === '::') && (_p37._0._0._1.ctor === '[]')) { - switch (_p37._0._0._0) { - case 'ffi': - return _elm_lang$core$Native_Utils.crashCase( - 'ExExpression', - { - start: {line: 443, column: 5}, - end: {line: 489, column: 70} - }, - _p37)('Ffi inside function body is deprecated since Elchemy 0.3'); - case 'tryFfi': - return _elm_lang$core$Native_Utils.crashCase( - 'ExExpression', - { - start: {line: 443, column: 5}, - end: {line: 489, column: 70} - }, - _p37)('tryFfi inside function body is deprecated since Elchemy 0.3'); - case 'lffi': - return _elm_lang$core$Native_Utils.crashCase( - 'ExExpression', - { - start: {line: 443, column: 5}, - end: {line: 489, column: 70} - }, - _p37)('Lffi inside function body is deprecated since Elchemy 0.3'); - case 'flambda': - return _elm_lang$core$Native_Utils.crashCase( - 'ExExpression', - { - start: {line: 443, column: 5}, - end: {line: 489, column: 70} - }, - _p37)('Flambda is deprecated since Elchemy 0.3'); - case 'Just': - if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { - return A2( - _elm_lang$core$Basics_ops['++'], - '{', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p37._1._0), - '}')); - } else { - break _v20_8; - } - case 'Ok': - if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { - return A2( - _elm_lang$core$Basics_ops['++'], - '{:ok, ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p37._1._0), - '}')); - } else { - break _v20_8; + _0: _user$project$Helpers$translateOperator(name), + _1: { + ctor: '::', + _0: '(', + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$String$join, + ', ', + A3( + _elm_lang$core$Basics$flip, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + _user$project$Helpers$generateArguments(missingArgs), + A2( + _elm_lang$core$List$map, + elixirE( + A2(_user$project$ExVariable$rememberVariables, args, c)), + args))), + _1: { + ctor: '::', + _0: ') do', + _1: { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent + 1), + _1: { + ctor: '::', + _0: A2( + elixirE, + A2( + _user$project$ExVariable$rememberVariables, + args, + _user$project$ExContext$indent(c)), + body), + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$String$join, + '', + A2( + _elm_lang$core$List$map, + function (a) { + return A2( + _elm_lang$core$Basics_ops['++'], + '.(', + A2(_elm_lang$core$Basics_ops['++'], a, ')')); + }, + _user$project$Helpers$generateArguments(missingArgs))), + _1: { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'end', + _1: {ctor: '[]'} + } + } + } + } + } + } + } } - case 'Err': - if ((_p37._1.ctor === '::') && (_p37._1._1.ctor === '[]')) { - return A2( - _elm_lang$core$Basics_ops['++'], - '{:error, ', + } + } + } + } + }); + case 'Builtin': + if (((_p7._1.ctor === '::') && (_p7._1._1.ctor === '::')) && (_p7._1._1._1.ctor === '[]')) { + var _p9 = _p7._1._1._0; + var _p8 = _p7._1._0; + return A2( + _elm_lang$core$String$join, + '', + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'def', + _1: { + ctor: '::', + _0: A2(_user$project$ExFunction$privateOrPublic, c, name), + _1: { + ctor: '::', + _0: ' ', + _1: { + ctor: '::', + _0: A2( + elixirE, A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, _p37._1._0), - '}')); - } else { - break _v20_8; + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p8, + _1: {ctor: '[]'} + }, + c), + _p8), + _1: { + ctor: '::', + _0: ' ', + _1: { + ctor: '::', + _0: _user$project$Helpers$translateOperator(name), + _1: { + ctor: '::', + _0: ' ', + _1: { + ctor: '::', + _0: A2( + elixirE, + A2( + _user$project$ExVariable$rememberVariables, + { + ctor: '::', + _0: _p9, + _1: {ctor: '[]'} + }, + c), + _p9), + _1: { + ctor: '::', + _0: ' do', + _1: { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent + 1), + _1: { + ctor: '::', + _0: A2( + elixirE, + A2( + _user$project$ExVariable$rememberVariables, + args, + _user$project$ExContext$indent(c)), + body), + _1: { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'end', + _1: {ctor: '[]'} + } + } + } + } + } + } + } + } + } } - default: - break _v20_8; + } } - } else { - break _v20_8; } - default: - break _v20_9; - } + }); } else { - break _v20_9; - } - } while(false); - var _p45 = _p37._1; - return A2( - _elm_lang$core$Maybe$withDefault, - function (_p42) { - var _p43 = _p42; - var _p44 = _p43._1; return A2( - _elm_lang$core$Maybe$withDefault, + _user$project$ExContext$crash, + c, A2( _elm_lang$core$Basics_ops['++'], - '{', + 'operator ', A2( _elm_lang$core$Basics_ops['++'], - A2( - _user$project$ExExpression$elixirE, - c, - _Bogdanp$elm_ast$Ast_Expression$Variable( - { - ctor: '::', - _0: _p44, - _1: {ctor: '[]'} - })), + name, A2( _elm_lang$core$Basics_ops['++'], - ', ', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - _user$project$ExExpression$elixirE(c), - _p45)), - '}')))), - A3( - _user$project$ExExpression$aliasFor, - A2(_user$project$ExContext$changeCurrentModule, _p43._0, c), - _p44, - _p45)); - }( - A2(_user$project$Helpers$moduleAccess, c.mod, _p37._0._0)), - A2( - _elm_lang$core$Maybe$map, - _user$project$ExExpression$encodeAccessMacroAndRest(c), - A2(_user$project$ExSelector$maybeAccessMacro, _p37._0, _p45))); - } while(false); - return _elm_lang$core$Native_Utils.crashCase( - 'ExExpression', - { - start: {line: 443, column: 5}, - end: {line: 489, column: 70} + ' has to have 2 arguments but has ', + _elm_lang$core$Basics$toString(args))))); + } + default: + var missing = _user$project$Helpers$generateArguments(missingArgs); + var wrapIfMiss = function (s) { + return (_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$length(missing), + 0) > 0) ? s : ''; + }; + var missingVarargs = A2( + _elm_lang$core$List$map, + function (_p10) { + return _Bogdanp$elm_ast$Ast_Expression$Variable( + _elm_lang$core$List$singleton(_p10)); + }, + missing); + return A2( + _elm_lang$core$String$join, + '', + { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'def', + _1: { + ctor: '::', + _0: A2(_user$project$ExFunction$privateOrPublic, c, name), + _1: { + ctor: '::', + _0: ' ', + _1: { + ctor: '::', + _0: A2(_user$project$Helpers$toSnakeCase, true, name), + _1: { + ctor: '::', + _0: '(', + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + elixirE( + _user$project$ExContext$inArgs(c)), + A2(_elm_lang$core$Basics_ops['++'], args, missingVarargs))), + _1: { + ctor: '::', + _0: ') do', + _1: { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent + 1), + _1: { + ctor: '::', + _0: wrapIfMiss('('), + _1: { + ctor: '::', + _0: A2( + elixirE, + A2( + _user$project$ExVariable$rememberVariables, + A2(_elm_lang$core$Basics_ops['++'], args, missingVarargs), + _user$project$ExContext$indent(c)), + body), + _1: { + ctor: '::', + _0: wrapIfMiss(')'), + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$String$join, + '', + A2( + _elm_lang$core$List$map, + function (a) { + return A2( + _elm_lang$core$Basics_ops['++'], + '.(', + A2(_elm_lang$core$Basics_ops['++'], a, ')')); + }, + missing)), + _1: { + ctor: '::', + _0: _user$project$Helpers$ind(c.indent), + _1: { + ctor: '::', + _0: 'end', + _1: {ctor: '[]'} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }); + } + }); +var _user$project$ExFunction$genOverloadedFunctionDefinition = F6( + function (c, elixirE, name, args, body, expressions) { + var pairAsArgs = function (asArgs) { + return A3( + _elm_lang$core$List$map2, + _elm_lang$core$Basics$flip( + _Bogdanp$elm_ast$Ast_Expression$BinOp( + _Bogdanp$elm_ast$Ast_Expression$Variable( + { + ctor: '::', + _0: 'as', + _1: {ctor: '[]'} + }))), + args, + asArgs); + }; + var typeDef = A2( + _elm_lang$core$Maybe$andThen, + function (_p11) { + return A2( + _elm_lang$core$Dict$get, + name, + function (_) { + return _.definitions; + }(_p11)); }, - _p37)( + A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)); + var arity = A2( + _elm_lang$core$Maybe$withDefault, + 0, A2( - _elm_lang$core$Basics_ops['++'], - 'Shouldn\'t ever work for', - _elm_lang$core$Basics$toString(_p37))); - }); -var _user$project$ExExpression$aliasFor = F3( - function (c, name, rest) { - return A2( - _user$project$Helpers$maybeOr, - A3(_user$project$ExExpression$typeAliasApplication, c, name, rest), - A3(_user$project$ExExpression$typeApplication, c, name, rest)); - }); -var _user$project$ExExpression$typeAliasApplication = F3( - function (c, name, args) { - return A2( - _elm_lang$core$Maybe$map, - _user$project$ExExpression$elixirE(c), + _elm_lang$core$Maybe$map, + function (_) { + return _.arity; + }, + typeDef)); + var caseBranch = function (_p12) { + var _p13 = _p12; + var _p17 = _p13._1; + var _p16 = _p13._0; + var _p14 = _p16; + if (_p14.ctor === 'Tuple') { + var _p15 = _p14._0; + return A6( + _user$project$ExFunction$genElixirFunc, + c, + elixirE, + name, + pairAsArgs(_p15), + arity - _elm_lang$core$List$length( + pairAsArgs(_p15)), + _p17); + } else { + return A6( + _user$project$ExFunction$genElixirFunc, + c, + elixirE, + name, + pairAsArgs( + { + ctor: '::', + _0: _p16, + _1: {ctor: '[]'} + }), + arity - 1, + _p17); + } + }; + var lambdasAt = _user$project$ExFunction$getLambdaArgumentIndexes( A2( - _elm_lang$core$Maybe$andThen, - _user$project$ExType$typeAliasConstructor(args), - A2( - _elm_lang$core$Maybe$andThen, - _user$project$ExExpression$filterTypeAlias, - A3(_user$project$ExContext$getAlias, c.mod, name, c)))); - }); -var _user$project$ExExpression$typeApplication = F3( - function (c, name, args) { - return _elm_lang$core$Maybe$map( - function (_p47) { - var _p48 = _p47; - var _p50 = _p48.arity; - var len = _elm_lang$core$List$length(args); - var dif = _p50 - len; - var $arguments = _user$project$Helpers$generateArguments(dif); - var varArgs = A2( - _elm_lang$core$List$map, - function (_p49) { - return _Bogdanp$elm_ast$Ast_Expression$Variable( - _elm_lang$core$List$singleton(_p49)); - }, - $arguments); - return _elm_lang$core$Native_Utils.eq(_p50, 0) ? _user$project$Helpers$atomize(name) : ((_elm_lang$core$Native_Utils.cmp(dif, 0) > -1) ? A3( - _elm_lang$core$Basics$flip, + _elm_lang$core$Maybe$map, + function (_) { + return _.def; + }, + typeDef)); + return A3(_user$project$ExContext$hasFlag, 'nodef', name, c) ? A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt) : A2( + _elm_lang$core$Basics_ops['++'], + A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt), + A3( + _elm_lang$core$Basics$flip, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + }), + '\n', + A3( + _elm_lang$core$List$foldr, F2( function (x, y) { return A2(_elm_lang$core$Basics_ops['++'], x, y); }), - A2(_elm_lang$core$String$repeat, dif, ' end'), - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - '', - A2( - _elm_lang$core$List$map, - A2( - _elm_lang$core$Basics$flip, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - ' -> '), - A2( - _elm_lang$core$List$map, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - })('fn '), - $arguments))), - A2( - _elm_lang$core$Basics_ops['++'], - '{', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$atomize(name), - A2( - _elm_lang$core$Basics_ops['++'], - ', ', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - _user$project$ExExpression$elixirE( - A2( - _user$project$ExVariable$rememberVariables, - A2(_elm_lang$core$Basics_ops['++'], args, varArgs), - c)), - A2(_elm_lang$core$Basics_ops['++'], args, varArgs))), - '}')))))) : _elm_lang$core$Native_Utils.crash( - 'ExExpression', - { - start: {line: 558, column: 29}, - end: {line: 558, column: 40} - })( - A2( - _elm_lang$core$Basics_ops['++'], - 'Expected ', - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(_p50), - A2( - _elm_lang$core$Basics_ops['++'], - ' arguments for \'', - A2( - _elm_lang$core$Basics_ops['++'], - name, - A2( - _elm_lang$core$Basics_ops['++'], - '\'. Got: ', - _elm_lang$core$Basics$toString( - _elm_lang$core$List$length(args))))))))); - })( - A3(_user$project$ExContext$getType, c.mod, name, c)); + '', + A2(_elm_lang$core$List$map, caseBranch, expressions)))); }); -var _user$project$ExExpression$encodeAccessMacroAndRest = F2( - function (c, _p51) { - var _p52 = _p51; - var _p57 = _p52._1; - var encodedRest = function () { - var _p53 = _p57; - if (_p53.ctor === '[]') { - return ''; - } else { +var _user$project$ExFunction$genFunctionDefinition = F5( + function (c, elixirE, name, args, body) { + var typeDef = A2( + _elm_lang$core$Maybe$andThen, + function (_p18) { return A2( - _elm_lang$core$Basics_ops['++'], - '.(', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ').(', - A2( - _elm_lang$core$List$map, - _user$project$ExExpression$elixirE(c), - _p57)), - ')')); - } - }(); - var encodedType = function () { - var _p54 = _p52._0._0; - switch (_p54.ctor) { - case 'Update': - return 'update_in_'; - case 'Get': - return 'get_in_'; - default: - return 'put_in_'; - } - }(); - var encodeSelector = function (_p55) { - var _p56 = _p55; - return A2( - _elm_lang$core$Basics_ops['++'], - ':', - A2(_user$project$Helpers$toSnakeCase, true, _p56._0)); - }; - var encodedSelectors = A2( - _elm_lang$core$String$join, - ', ', - A2(_elm_lang$core$List$map, encodeSelector, _p52._0._2)); - return A2( + _elm_lang$core$Dict$get, + name, + function (_) { + return _.definitions; + }(_p18)); + }, + A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)); + var arity = A2( + _elm_lang$core$Maybe$withDefault, + 0, + A2( + _elm_lang$core$Maybe$map, + function (_) { + return _.arity; + }, + typeDef)); + var lambdasAt = _user$project$ExFunction$getLambdaArgumentIndexes( + A2( + _elm_lang$core$Maybe$map, + function (_) { + return _.def; + }, + typeDef)); + return A3(_user$project$ExContext$hasFlag, 'nodef', name, c) ? A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt) : A2( _elm_lang$core$Basics_ops['++'], - encodedType, + A5(_user$project$ExFunction$functionCurry, c, elixirE, name, arity, lambdasAt), A2( _elm_lang$core$Basics_ops['++'], - '([', - A2( - _elm_lang$core$Basics_ops['++'], - encodedSelectors, - A2(_elm_lang$core$Basics_ops['++'], '])', encodedRest)))); - }); -var _user$project$ExExpression$functionApplication = F3( - function (c, left, right) { - var reduceArgs = F3( - function (c, args, separator) { - return A2( - _elm_lang$core$String$join, - separator, - A2( - _elm_lang$core$List$map, - _user$project$ExExpression$elixirE(c), - args)); - }); - var _p58 = _user$project$Helpers$applicationToList( - A2(_Bogdanp$elm_ast$Ast_Expression$Application, left, right)); - _v27_2: + A6( + _user$project$ExFunction$genElixirFunc, + c, + elixirE, + name, + args, + arity - _elm_lang$core$List$length(args), + body), + '\n')); + }); + +var _user$project$ExFfi$resolveFfi = F3( + function (c, elixirE, ffi) { + var combineComas = function (args) { + return A2( + _elm_lang$core$String$join, + ',', + A2( + _elm_lang$core$List$map, + elixirE(c), + args)); + }; + var _p0 = ffi; + _v0_9: do { - if (_p58.ctor === '::') { - switch (_p58._0.ctor) { - case 'Variable': - if ((_p58._0._0.ctor === '::') && (_p58._0._0._1.ctor === '[]')) { - var _p60 = _p58._0._0._0; - var _p59 = _p58._1; - return A4(_user$project$ExContext$areMatchingArity, c, c.mod, _p60, _p59) ? A2( + switch (_p0.ctor) { + case 'TryFfi': + if ((_p0._0.ctor === 'String') && (_p0._1.ctor === 'String')) { + if (_p0._2.ctor === 'Tuple') { + return A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p60), + 'try_catch fn _ -> ', A2( _elm_lang$core$Basics_ops['++'], - '(', + _p0._0._0, A2( _elm_lang$core$Basics_ops['++'], - A3(reduceArgs, c, _p59, ', '), - ')'))) : A2( + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p0._1._0, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + combineComas(_p0._2._0), + A2(_elm_lang$core$Basics_ops['++'], ')', ' end'))))))); + } else { + return A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, left), + 'try_catch fn _ -> ', A2( _elm_lang$core$Basics_ops['++'], - '.(', + _p0._0._0, A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, right), - ')'))); - } else { - break _v27_2; + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p0._1._0, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, _p0._2), + A2(_elm_lang$core$Basics_ops['++'], ')', ' end'))))))); } - case 'Access': - if (((_p58._0._0.ctor === 'Variable') && (_p58._0._1.ctor === '::')) && (_p58._0._1._1.ctor === '[]')) { - var _p62 = _p58._0._1._0; - var _p61 = _p58._1; - var fnName = A2(_user$project$Helpers$toSnakeCase, true, _p62); - var mod = _user$project$Helpers$modulePath(_p58._0._0._0); - return A4(_user$project$ExContext$areMatchingArity, c, mod, _p62, _p61) ? A2( + } else { + break _v0_9; + } + case 'Ffi': + if ((_p0._0.ctor === 'String') && (_p0._1.ctor === 'String')) { + if (_p0._2.ctor === 'Tuple') { + return A2( _elm_lang$core$Basics_ops['++'], - mod, + _p0._0._0, A2( _elm_lang$core$Basics_ops['++'], '.', A2( _elm_lang$core$Basics_ops['++'], - fnName, + _p0._1._0, A2( _elm_lang$core$Basics_ops['++'], '(', A2( _elm_lang$core$Basics_ops['++'], - A3(reduceArgs, c, _p61, ', '), - ')'))))) : A2( + combineComas(_p0._2._0), + ')'))))); + } else { + return A2( _elm_lang$core$Basics_ops['++'], - mod, + _p0._0._0, A2( _elm_lang$core$Basics_ops['++'], '.', A2( _elm_lang$core$Basics_ops['++'], - fnName, + _p0._1._0, A2( _elm_lang$core$Basics_ops['++'], - '().(', + '(', A2( _elm_lang$core$Basics_ops['++'], - A3(reduceArgs, c, _p61, ').('), + A2(elixirE, c, _p0._2), ')'))))); - } else { - break _v27_2; } - default: - break _v27_2; - } - } else { - break _v27_2; - } - } while(false); - return A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, left), - A2( - _elm_lang$core$Basics_ops['++'], - '.(', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$ExExpression$elixirE, c, right), - ')'))); - }); -var _user$project$ExExpression$elixirLetInMutualFunctions = F2( - function (context, expressionsList) { - var letBranchToLambda = F2( - function (c, _p63) { - var _p64 = _p63; - var _p68 = _p64._0; - var _p67 = _p64._1; - var _p65 = _user$project$Helpers$applicationToList(_p68); - if (_p65.ctor === '[]') { - return ''; - } else { - if (_p65._1.ctor === '[]') { - return A2(_user$project$ExExpression$elixirE, c, _p67); } else { - if (((_p65._0.ctor === 'Variable') && (_p65._0._0.ctor === '::')) && (_p65._0._0._1.ctor === '[]')) { - return A3(_user$project$ExExpression$lambda, c, _p65._1, _p67); - } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExExpression', - { - start: {line: 152, column: 13}, - end: {line: 163, column: 78} - }, - _p65)( - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(_p68), - ' is not a let in branch')); - } + break _v0_9; } - } - }); - var names = A2( - _elm_lang$core$List$map, - function (_p69) { - return A2( - _user$project$Helpers$toSnakeCase, - true, - _user$project$ExVariable$extractName( - _elm_lang$core$Tuple$first(_p69))); - }, - expressionsList); - var vars = A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$first, expressionsList); - var c = A2(_user$project$ExVariable$rememberVariables, vars, context); - return A2( - _user$project$Helpers_ops['=>'], - c, - A2( - _elm_lang$core$Basics_ops['++'], - '{', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_elm_lang$core$String$join, ', ', names), - A2( - _elm_lang$core$Basics_ops['++'], - '} = let [', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ',', + case 'Macro': + if ((_p0._0.ctor === 'String') && (_p0._1.ctor === 'String')) { + if (_p0._2.ctor === 'Tuple') { + return A2( + _elm_lang$core$Basics_ops['++'], + _p0._0._0, A2( - _elm_lang$core$List$map, - function (_p70) { - var _p71 = _p70; - return A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p0._1._0, + A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent + 1), + '(', A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p71._0), - A2(_elm_lang$core$Basics_ops['++'], ': ', _p71._1))); - }, + combineComas(_p0._2._0), + ')'))))); + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + _p0._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '.', A2( - _elm_lang$core$List$map, - _elm_lang$core$Tuple$mapSecond( - letBranchToLambda( - _user$project$ExContext$indent(c))), + _elm_lang$core$Basics_ops['++'], + _p0._1._0, A2( - _elm_lang$core$List$map, - function (_p72) { - var _p73 = _p72; - return { - ctor: '_Tuple2', - _0: _user$project$ExVariable$extractName(_p73._0), - _1: _p73 - }; - }, - expressionsList)))), - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - ']')))))); - }); -var _user$project$ExExpression$elixirPrimitve = F2( - function (c, e) { - var _p74 = e; - switch (_p74.ctor) { - case 'Integer': - return _elm_lang$core$Basics$toString(_p74._0); - case 'Float': - var name = _elm_lang$core$Basics$toString(_p74._0); - return A2(_elm_lang$core$String$contains, '.', name) ? name : A2(_elm_lang$core$Basics_ops['++'], name, '.0'); - case 'Character': - var _p75 = _p74._0; - switch (_p75.valueOf()) { - case ' ': - return '?\\s'; - case '\n': - return '?\\n'; - case '\r': - return '?\\r'; - case '\t': - return '?\\t'; - case '\\': - return '?\\\\'; - case '': - return '?\\0'; - default: - return A2( - _elm_lang$core$Basics_ops['++'], - '?', - _elm_lang$core$String$fromChar(_p75)); - } - case 'String': - return A2( - _elm_lang$core$Basics_ops['++'], - '\"', - A2(_elm_lang$core$Basics_ops['++'], _p74._0, '\"')); - case 'List': - return A2( - _elm_lang$core$Basics_ops['++'], - '[', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - _user$project$ExExpression$elixirE(c), - _p74._0)), - ']')); - case 'Tuple': - return A2( - _elm_lang$core$Basics_ops['++'], - '{', - A2( - _elm_lang$core$Basics_ops['++'], - A2( - _elm_lang$core$String$join, - ', ', - A2( - _elm_lang$core$List$map, - _user$project$ExExpression$elixirE(c), - _p74._0)), - '}')); - case 'Record': - return A2( - _elm_lang$core$Basics_ops['++'], - '%{', - A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, _p0._2), + ')'))))); + } + } else { + break _v0_9; + } + case 'Lffi': + if (_p0._0.ctor === 'String') { + if (_p0._1.ctor === 'Tuple') { + return A2( + _elm_lang$core$Basics_ops['++'], + _p0._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + combineComas(_p0._1._0), + ')'))); + } else { + return A2( + _elm_lang$core$Basics_ops['++'], + _p0._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, _p0._1), + ')'))); + } + } else { + break _v0_9; + } + default: + var args = _user$project$Helpers$generateArguments(_p0._0); + return A2( _elm_lang$core$Basics_ops['++'], + 'fn (', A2( - _elm_lang$core$String$join, - ', ', + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$String$join, ',', args), A2( - _elm_lang$core$List$map, - function (_p76) { - var _p77 = _p76; - return A2( + _elm_lang$core$Basics_ops['++'], + ') -> ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(elixirE, c, _p0._1), + A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p77._0), A2( - _elm_lang$core$Basics_ops['++'], - ': ', - A2(_user$project$ExExpression$elixirE, c, _p77._1))); - }, - _p74._0)), - '}')); - default: - return A2(_user$project$Helpers$notImplemented, 'expression', e); - } + _elm_lang$core$String$join, + '', + A2( + _elm_lang$core$List$map, + function (a) { + return A2( + _elm_lang$core$Basics_ops['++'], + '.(', + A2(_elm_lang$core$Basics_ops['++'], a, ')')); + }, + args)), + ' end'))))); + } + } while(false); + return A2(_user$project$ExContext$crash, c, 'Wrong ffi call'); }); -var _user$project$ExExpression$handleIfExp = F2( - function (c, e) { - var _p78 = e; - if (_p78.ctor === 'If') { - return A2( - _elm_lang$core$Basics_ops['++'], - { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$indent(c), - _p78._0), - _1: { - ctor: '::', - _0: ' -> ', - _1: { +var _user$project$ExFfi$Macro = F3( + function (a, b, c) { + return {ctor: 'Macro', _0: a, _1: b, _2: c}; + }); +var _user$project$ExFfi$Flambda = F2( + function (a, b) { + return {ctor: 'Flambda', _0: a, _1: b}; + }); +var _user$project$ExFfi$uncurrify = F3( + function (c, elixirE, argTypes) { + var arity = _elm_lang$core$List$length(argTypes) - 1; + var indexes = A2(_elm_lang$core$List$range, 1, arity); + return A2( + _elm_lang$core$List$map, + function (_p1) { + var _p2 = _p1; + var _p4 = _p2._0; + var _p3 = _p2._1; + if (_p3.ctor === '[]') { + return A2(_user$project$ExContext$crash, c, 'Impossible'); + } else { + if (_p3._1.ctor === '[]') { + return A2( + _elm_lang$core$Basics_ops['++'], + 'a', + _elm_lang$core$Basics$toString(_p4)); + } else { + var makeFlambda = _user$project$ExFfi$Flambda( + _elm_lang$core$List$length(_p3) - 1); + var $var = _Bogdanp$elm_ast$Ast_Expression$Variable( + { ctor: '::', _0: A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$indent(c), - _p78._1), + _elm_lang$core$Basics_ops['++'], + 'a', + _elm_lang$core$Basics$toString(_p4)), _1: {ctor: '[]'} - } + }); + return A3( + _user$project$ExFfi$resolveFfi, + c, + elixirE, + makeFlambda($var)); + } + } + }, + A3( + _elm_lang$core$List$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + indexes, + argTypes)); + }); +var _user$project$ExFfi$generateFfi = F5( + function (c, elixirE, name, argTypes, e) { + var wrapAllInVar = _elm_lang$core$List$map( + function (_p5) { + return _Bogdanp$elm_ast$Ast_Expression$Variable( + _elm_lang$core$List$singleton(_p5)); + }); + var uncurryArguments = function (c) { + return A3(_user$project$ExFfi$uncurrify, c, elixirE, argTypes); + }; + var appList = _user$project$Helpers$applicationToList(e); + var typeDef = A2( + _elm_lang$core$Maybe$andThen, + function (_p6) { + return A2( + _elm_lang$core$Dict$get, + name, + function (_) { + return _.definitions; + }(_p6)); + }, + A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)); + var _p7 = { + ctor: '_Tuple2', + _0: typeDef, + _1: _user$project$Helpers$applicationToList(e) + }; + _v3_5: + do { + if (_p7.ctor === '_Tuple2') { + if (_p7._0.ctor === 'Nothing') { + if ((((_p7._1.ctor === '::') && (_p7._1._0.ctor === 'Variable')) && (_p7._1._0._0.ctor === '::')) && (_p7._1._0._0._1.ctor === '[]')) { + switch (_p7._1._0._0._0) { + case 'ffi': + return A2(_user$project$ExContext$crash, c, 'Ffi requires type definition'); + case 'macro': + return A2(_user$project$ExContext$crash, c, 'Macro requires type definition'); + default: + break _v3_5; + } + } else { + break _v3_5; + } + } else { + if (((((((((_p7._1.ctor === '::') && (_p7._1._0.ctor === 'Variable')) && (_p7._1._0._0.ctor === '::')) && (_p7._1._0._0._1.ctor === '[]')) && (_p7._1._1.ctor === '::')) && (_p7._1._1._0.ctor === 'String')) && (_p7._1._1._1.ctor === '::')) && (_p7._1._1._1._0.ctor === 'String')) && (_p7._1._1._1._1.ctor === '[]')) { + switch (_p7._1._0._0._0) { + case 'ffi': + var _p10 = _p7._1._1._0._0; + var _p9 = _p7._1._1._1._0._0; + var _p8 = _p7._0._0; + var $arguments = A2(_user$project$Helpers$generateArguments_, 'a', _p8.arity); + return A2( + _elm_lang$core$Basics_ops['++'], + A5( + _user$project$ExFunction$functionCurry, + c, + elixirE, + name, + _p8.arity, + {ctor: '[]'}), + A2( + _elm_lang$core$Basics_ops['++'], + A4( + _user$project$ExContext$onlyWithoutFlag, + c, + 'noverify', + name, + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + A2( + _elm_lang$core$Basics_ops['++'], + 'verify as: ', + A2( + _elm_lang$core$Basics_ops['++'], + _p10, + A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p9, + A2( + _elm_lang$core$Basics_ops['++'], + '/', + _elm_lang$core$Basics$toString(_p8.arity)))))))), + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + A2( + _elm_lang$core$Basics_ops['++'], + 'def', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExFunction$privateOrPublic, c, name), + A2( + _elm_lang$core$Basics_ops['++'], + ' ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, name), + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$String$join, ', ', $arguments), + A2( + _elm_lang$core$Basics_ops['++'], + ')', + A2( + _elm_lang$core$Basics_ops['++'], + ', do: ', + A2( + _elm_lang$core$Basics_ops['++'], + _p10, + A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p9, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + uncurryArguments( + A2( + _user$project$ExVariable$rememberVariables, + wrapAllInVar($arguments), + c))), + ')')))))))))))))))); + case 'macro': + var _p11 = _p7._0._0; + var $arguments = A2(_user$project$Helpers$generateArguments_, 'a', _p11.arity); + var varArgs = wrapAllInVar($arguments); + return A2( + _user$project$ExType$hasReturnedType, + A2( + _Bogdanp$elm_ast$Ast_Statement$TypeConstructor, + { + ctor: '::', + _0: 'Macro', + _1: {ctor: '[]'} + }, + {ctor: '[]'}), + _p11.def) ? A2( + _elm_lang$core$Basics_ops['++'], + 'defmacro', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExFunction$privateOrPublic, c, name), + A2( + _elm_lang$core$Basics_ops['++'], + ' ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, name), + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$String$join, ', ', $arguments), + A2( + _elm_lang$core$Basics_ops['++'], + ')', + A2( + _elm_lang$core$Basics_ops['++'], + ', do: ', + A2( + _elm_lang$core$Basics_ops['++'], + _p7._1._1._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p7._1._1._1._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$List$map, + elixirE( + A2(_user$project$ExVariable$rememberVariables, varArgs, c)), + varArgs)), + ')'))))))))))))) : A2(_user$project$ExContext$crash, c, 'Macro calls have to return a Macro type'); + case 'tryFfi': + var _p12 = _p7._0._0; + var $arguments = A2(_user$project$Helpers$generateArguments_, 'a', _p12.arity); + return A2( + _elm_lang$core$Basics_ops['++'], + A5( + _user$project$ExFunction$functionCurry, + c, + elixirE, + name, + _p12.arity, + {ctor: '[]'}), + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + A2( + _elm_lang$core$Basics_ops['++'], + 'def', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$ExFunction$privateOrPublic, c, name), + A2( + _elm_lang$core$Basics_ops['++'], + ' ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, name), + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + A2(_user$project$Helpers$generateArguments_, 'a', _p12.arity)), + A2( + _elm_lang$core$Basics_ops['++'], + ')', + A2( + _elm_lang$core$Basics_ops['++'], + ' do ', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 1), + A2( + _elm_lang$core$Basics_ops['++'], + 'try_catch fn -> ', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 2), + A2( + _elm_lang$core$Basics_ops['++'], + _p7._1._1._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + _p7._1._1._1._0._0, + A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + ', ', + uncurryArguments( + A2( + _user$project$ExVariable$rememberVariables, + wrapAllInVar($arguments), + c))), + A2( + _elm_lang$core$Basics_ops['++'], + ')', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 1), + A2( + _elm_lang$core$Basics_ops['++'], + 'end', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent), + 'end')))))))))))))))))))))); + default: + break _v3_5; } - } - }, - A2(_user$project$ExExpression$handleIfExp, c, _p78._2)); - } else { - return { - ctor: '::', - _0: _user$project$Helpers$ind(c.indent), - _1: { - ctor: '::', - _0: 'true -> ', - _1: { - ctor: '::', - _0: A2( - _user$project$ExExpression$elixirE, - _user$project$ExContext$indent(c), - e), - _1: {ctor: '[]'} + } else { + break _v3_5; } } - }; - } - }); -var _user$project$ExExpression$elixirVariable = F2( - function (c, $var) { - var _p79 = $var; - _v36_8: - do { - if (_p79.ctor === '[]') { - return ''; } else { - if (_p79._1.ctor === '[]') { - switch (_p79._0) { - case '()': - return '{}'; - case 'Nothing': - return 'nil'; - case 'Just': - return 'fn x1 -> {x1} end'; - case 'Err': - return 'fn x1 -> {:error, x1} end'; - case 'Ok': - return 'fn x1 -> {:ok, x1} end'; - case 'curry': - return 'curried()'; - case 'uncurry': - return 'uncurried()'; - default: - break _v36_8; - } - } else { - break _v36_8; - } + break _v3_5; } } while(false); - return function (_p80) { - var _p81 = _p80; - var _p83 = _p81._1; - if (_user$project$Helpers$isCapitilzed(_p83)) { - return A2( - _elm_lang$core$Maybe$withDefault, - _user$project$Helpers$atomize(_p83), - A3( - _user$project$ExExpression$aliasFor, - A2(_user$project$ExContext$changeCurrentModule, _p81._0, c), - _p83, - {ctor: '[]'})); - } else { - if (A2(_elm_lang$core$String$startsWith, '@', _p83)) { - return _user$project$Helpers$atomize( - A2(_elm_lang$core$String$dropLeft, 1, _p83)); - } else { - var _p82 = _user$project$Helpers$operatorType(_p83); - switch (_p82.ctor) { - case 'Builtin': - return _elm_lang$core$Native_Utils.eq(_p83, '<|') ? 'flip().((&|>/0).())' : A2( - _elm_lang$core$Basics_ops['++'], - '(&XBasics.', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$translateOperator(_p83), - '/0).()')); - case 'Custom': - return _user$project$Helpers$translateOperator(_p83); - default: - return A2( - _user$project$ExVariable$varOrNah, - c, - A2(_user$project$Helpers$toSnakeCase, true, _p83)); - } - } - } - }( - A2(_user$project$Helpers$moduleAccess, c.mod, _p79)); + return A2(_user$project$ExContext$crash, c, 'Wrong ffi definition'); + }); +var _user$project$ExFfi$TryFfi = F3( + function (a, b, c) { + return {ctor: 'TryFfi', _0: a, _1: b, _2: c}; + }); +var _user$project$ExFfi$Ffi = F3( + function (a, b, c) { + return {ctor: 'Ffi', _0: a, _1: b, _2: c}; + }); +var _user$project$ExFfi$Lffi = F2( + function (a, b) { + return {ctor: 'Lffi', _0: a, _1: b}; }); var _user$project$ExStatement$maybeDoctest = F3( @@ -18797,57 +19252,98 @@ var _user$project$ExStatement$exportSetToList = function (exp) { _0: _p2._0, _1: {ctor: '[]'} }; + case 'AllExport': + return {ctor: '[]'}; default: - return _elm_lang$core$Native_Utils.crashCase( - 'ExStatement', - { - start: {line: 482, column: 5}, - end: {line: 490, column: 62} - }, - _p2)( - A2( - _elm_lang$core$Basics_ops['++'], - 'You can\'t export ', - _elm_lang$core$Basics$toString(exp))); + return {ctor: '[]'}; } }; -var _user$project$ExStatement$verifyFlag = function (flag) { - var _p4 = flag; - _v2_2: - do { - if (_p4.ctor === '::') { - if (_p4._1.ctor === '::') { - if (_p4._1._1.ctor === '[]') { - return _elm_lang$core$Maybe$Just( - {ctor: '_Tuple2', _0: _p4._0, _1: _p4._1._0}); +var _user$project$ExStatement$verifyFlag = F2( + function (c, flag) { + var _p3 = flag; + _v2_2: + do { + if (_p3.ctor === '::') { + if (_p3._1.ctor === '::') { + if (_p3._1._1.ctor === '[]') { + return _elm_lang$core$Maybe$Just( + {ctor: '_Tuple2', _0: _p3._0, _1: _p3._1._0}); + } else { + break _v2_2; + } } else { - break _v2_2; + if (_p3._0 === '') { + return _elm_lang$core$Maybe$Nothing; + } else { + break _v2_2; + } } } else { - if (_p4._0 === '') { - return _elm_lang$core$Maybe$Nothing; - } else { - break _v2_2; - } + break _v2_2; } - } else { - break _v2_2; - } - } while(false); - return _elm_lang$core$Native_Utils.crashCase( - 'ExStatement', - { - start: {line: 369, column: 5}, - end: {line: 377, column: 62} - }, - _p4)( - A2( - _elm_lang$core$Basics_ops['++'], - 'Wrong flag format ', - _elm_lang$core$Basics$toString(_p4))); -}; -var _user$project$ExStatement$insertImportedTypes = F3( + } while(false); + return A2( + _user$project$ExContext$crash, + c, + A2( + _elm_lang$core$Basics_ops['++'], + 'Wrong flag format ', + _elm_lang$core$Basics$toString(_p3))); + }); +var _user$project$ExStatement$insertImports = F3( function (mod, subset, c) { + var importedFunctions = function (subset) { + var _p4 = subset; + switch (_p4.ctor) { + case 'AllExport': + return A2( + _elm_lang$core$List$map, + function (_p5) { + var _p6 = _p5; + return {ctor: '_Tuple2', _0: _p6._0, _1: _p6._1.arity}; + }, + A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, + _elm_lang$core$Dict$toList, + A2( + _elm_lang$core$Maybe$map, + function (_) { + return _.definitions; + }, + A2(_elm_lang$core$Dict$get, mod, c.commons.modules))))); + case 'SubsetExport': + return A2(_elm_lang$core$List$concatMap, importedFunctions, _p4._0); + case 'FunctionExport': + var _p9 = _p4._0; + return A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, + function (_p7) { + var _p8 = _p7; + return { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _p9, _1: _p8.arity}, + _1: {ctor: '[]'} + }; + }, + A2( + _elm_lang$core$Maybe$andThen, + _elm_lang$core$Dict$get(_p9), + A2( + _elm_lang$core$Maybe$map, + function (_) { + return _.definitions; + }, + A2(_elm_lang$core$Dict$get, mod, c.commons.modules))))); + default: + return {ctor: '[]'}; + } + }; var exportNames = A3(_user$project$ExType$getExportedTypeNames, c, mod, subset); return _elm_lang$core$Native_Utils.update( c, @@ -18856,16 +19352,49 @@ var _user$project$ExStatement$insertImportedTypes = F3( _elm_lang$core$List$foldl, A2(_elm_lang$core$Basics$flip, _elm_lang$core$Dict$insert, mod), c.importedTypes, - exportNames) + exportNames), + importedFunctions: A3( + _elm_lang$core$List$foldl, + F2( + function (_p10, acc) { + var _p11 = _p10; + return A3( + _elm_lang$core$Dict$insert, + _p11._0, + {ctor: '_Tuple2', _0: mod, _1: _p11._1}, + acc); + }), + c.importedFunctions, + importedFunctions(subset)) }); }); +var _user$project$ExStatement$definitionExists = F2( + function (name, c) { + return A2( + F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + }), + _elm_lang$core$Maybe$Nothing, + A2( + _elm_lang$core$Maybe$andThen, + function (_p12) { + return A2( + _elm_lang$core$Dict$get, + name, + function (_) { + return _.definitions; + }(_p12)); + }, + A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules))); + }); var _user$project$ExStatement$moduleStatement = function (s) { - var _p6 = s; - if (_p6.ctor === 'ModuleDeclaration') { + var _p13 = s; + if (_p13.ctor === 'ModuleDeclaration') { return A2( _user$project$ExContext$empty, - _user$project$Helpers$modulePath(_p6._0), - _p6._1); + _user$project$Helpers$modulePath(_p13._0), + _p13._1); } else { return _elm_lang$core$Native_Utils.crashCase( 'ExStatement', @@ -18873,7 +19402,7 @@ var _user$project$ExStatement$moduleStatement = function (s) { start: {line: 51, column: 5}, end: {line: 56, column: 69} }, - _p6)('First statement must be module declaration'); + _p13)('First statement must be module declaration'); } }; var _user$project$ExStatement$Flag = function (a) { @@ -18891,18 +19420,18 @@ var _user$project$ExStatement$Doc = function (a) { var _user$project$ExStatement$getCommentType = function (comment) { var findCommentType = F3( function (regex, commentType, acc) { - var _p8 = acc; - if (_p8.ctor === 'Normal') { - var _p9 = _p8._0; - return A2(_elm_lang$core$Regex$contains, regex, _p9) ? commentType( + var _p15 = acc; + if (_p15.ctor === 'Normal') { + var _p16 = _p15._0; + return A2(_elm_lang$core$Regex$contains, regex, _p16) ? commentType( A4( _elm_lang$core$Regex$replace, _elm_lang$core$Regex$AtMost(1), regex, _elm_lang$core$Basics$always(''), - _p9)) : _user$project$ExStatement$Normal(_p9); + _p16)) : _user$project$ExStatement$Normal(_p16); } else { - return _p8; + return _p15; } }); return A3( @@ -18911,12 +19440,12 @@ var _user$project$ExStatement$getCommentType = function (comment) { _user$project$ExStatement$Normal(comment), A2( _elm_lang$core$List$map, - function (_p10) { - var _p11 = _p10; + function (_p17) { + var _p18 = _p17; return { ctor: '_Tuple2', - _0: _elm_lang$core$Regex$regex(_p11._0), - _1: _p11._1 + _0: _elm_lang$core$Regex$regex(_p18._0), + _1: _p18._1 }; }, { @@ -18987,7 +19516,7 @@ var _user$project$ExStatement$elixirDoc = F4( }); var _user$project$ExStatement$typeDefinition = F5( function (c, name, args, types, isUnion) { - var mapType = function (_p12) { + var mapType = function (_p19) { return (isUnion ? _user$project$ExType$uniontype( _elm_lang$core$Native_Utils.update( c, @@ -18997,20 +19526,16 @@ var _user$project$ExStatement$typeDefinition = F5( _elm_lang$core$Native_Utils.update( c, {inTypeDefiniton: true})))( - A2(_user$project$ExAlias$replaceTypeAliases, c, _p12)); + A2(_user$project$ExAlias$replaceTypeAliases, c, _p19)); }; var getVariableName = function (t) { - var _p13 = t; - if (_p13.ctor === 'TypeVariable') { - return _p13._0; + var _p20 = t; + if (_p20.ctor === 'TypeVariable') { + return _p20._0; } else { - return _elm_lang$core$Native_Utils.crashCase( - 'ExStatement', - { - start: {line: 68, column: 13}, - end: {line: 73, column: 74} - }, - _p13)( + return A2( + _user$project$ExContext$crash, + c, A2( _elm_lang$core$Basics_ops['++'], _elm_lang$core$Basics$toString(t), @@ -19029,15 +19554,15 @@ var _user$project$ExStatement$typeDefinition = F5( ', ', A2(_elm_lang$core$List$map, getVariableName, args)), ')')); - var _p15 = A2( + var _p21 = A2( _elm_lang$core$Maybe$withDefault, {ctor: '_Tuple2', _0: c, _1: ''}, A2( _elm_lang$core$Maybe$map, A3(_user$project$ExStatement$elixirDoc, c, _user$project$ExStatement$Typedoc, name), c.lastDoc)); - var newC = _p15._0; - var code = _p15._1; + var newC = _p21._0; + var code = _p21._1; return A2( F2( function (v0, v1) { @@ -19077,18 +19602,18 @@ var _user$project$ExStatement$typeDefinition = F5( }); var _user$project$ExStatement$elixirComment = F2( function (c, content) { - var _p16 = _user$project$ExStatement$getCommentType(content); - switch (_p16.ctor) { + var _p22 = _user$project$ExStatement$getCommentType(content); + switch (_p22.ctor) { case 'Doc': - var _p17 = _p16._0; + var _p23 = _p22._0; return c.hasModuleDoc ? A2( _user$project$Helpers_ops['=>'], _elm_lang$core$Native_Utils.update( c, { - lastDoc: _elm_lang$core$Maybe$Just(_p17) + lastDoc: _elm_lang$core$Maybe$Just(_p23) }), - '') : A4(_user$project$ExStatement$elixirDoc, c, _user$project$ExStatement$ModuleDoc, c.mod, _p17); + '') : A4(_user$project$ExStatement$elixirDoc, c, _user$project$ExStatement$ModuleDoc, c.mod, _p23); case 'Ex': return A2( F2( @@ -19104,8 +19629,12 @@ var _user$project$ExStatement$elixirComment = F2( '\n', A2( _elm_lang$core$List$map, - _elm_lang$core$String$trim, - A2(_elm_lang$core$String$split, '\n', _p16._0))))); + A3( + _elm_lang$core$Regex$replace, + _elm_lang$core$Regex$All, + _elm_lang$core$Regex$regex('^ '), + _elm_lang$core$Basics$always('')), + A2(_elm_lang$core$String$split, '\n', _p22._0))))); case 'Flag': return A3( _elm_lang$core$Basics$flip, @@ -19120,7 +19649,7 @@ var _user$project$ExStatement$elixirComment = F2( c, A2( _elm_lang$core$List$filterMap, - _user$project$ExStatement$verifyFlag, + _user$project$ExStatement$verifyFlag(c), A2( _elm_lang$core$List$map, _elm_lang$core$String$split(':+'), @@ -19128,7 +19657,7 @@ var _user$project$ExStatement$elixirComment = F2( _elm_lang$core$Regex$split, _elm_lang$core$Regex$All, _elm_lang$core$Regex$regex('\\s+'), - _p16._0))))); + _p22._0))))); default: return A2( F2( @@ -19139,314 +19668,255 @@ var _user$project$ExStatement$elixirComment = F2( A2( _user$project$Helpers$indAll, c.indent, - A2(_user$project$Helpers$prependAll, '# ', _p16._0))); + A2(_user$project$Helpers$prependAll, '# ', _p22._0))); } }); var _user$project$ExStatement$elixirS = F2( function (c, s) { - var _p18 = s; - _v8_12: + var _p24 = s; + _v12_13: do { - switch (_p18.ctor) { + switch (_p24.ctor) { case 'InfixDeclaration': return {ctor: '_Tuple2', _0: c, _1: ''}; case 'TypeDeclaration': - if (((_p18._0.ctor === 'TypeConstructor') && (_p18._0._0.ctor === '::')) && (_p18._0._0._1.ctor === '[]')) { - return A5(_user$project$ExStatement$typeDefinition, c, _p18._0._0._0, _p18._0._1, _p18._1, true); + if (((_p24._0.ctor === 'TypeConstructor') && (_p24._0._0.ctor === '::')) && (_p24._0._0._1.ctor === '[]')) { + return A5(_user$project$ExStatement$typeDefinition, c, _p24._0._0._0, _p24._0._1, _p24._1, true); } else { - break _v8_12; + break _v12_13; } case 'TypeAliasDeclaration': - if (((_p18._0.ctor === 'TypeConstructor') && (_p18._0._0.ctor === '::')) && (_p18._0._0._1.ctor === '[]')) { + if (((_p24._0.ctor === 'TypeConstructor') && (_p24._0._0.ctor === '::')) && (_p24._0._0._1.ctor === '[]')) { return A5( _user$project$ExStatement$typeDefinition, c, - _p18._0._0._0, - _p18._0._1, + _p24._0._0._0, + _p24._0._1, { ctor: '::', - _0: _p18._1, + _0: _p24._1, _1: {ctor: '[]'} }, false); } else { - break _v8_12; + break _v12_13; + } + case 'FunctionTypeDeclaration': + if (_p24._0 === 'meta') { + return _elm_lang$core$Native_Utils.eq( + _p24._1, + A2( + _Bogdanp$elm_ast$Ast_Statement$TypeConstructor, + { + ctor: '::', + _0: 'List', + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _Bogdanp$elm_ast$Ast_Statement$TypeConstructor, + { + ctor: '::', + _0: 'Macro', + _1: {ctor: '[]'} + }, + {ctor: '[]'}), + _1: {ctor: '[]'} + })) ? {ctor: '_Tuple2', _0: c, _1: ''} : A2(_user$project$ExContext$crash, c, 'Function `meta` is reserved and its type has to be of List Macro'); + } else { + return {ctor: '_Tuple2', _0: c, _1: ''}; } - case 'FunctionTypeDeclaration': - if (_p18._1.ctor === 'TypeApplication') { - var _p21 = _p18._0; - var resolved = A2(_user$project$ExAlias$replaceTypeAliases, c, _p18._1); - var _p19 = A2( + case 'FunctionDeclaration': + if ((_p24._0 === 'meta') && (_p24._1.ctor === '[]')) { + return (!A2(_user$project$ExStatement$definitionExists, 'meta', c)) ? A2(_user$project$ExContext$crash, c, 'Function `meta` requires type definition of List Macro') : { + ctor: '_Tuple2', + _0: _elm_lang$core$Native_Utils.update( + c, + { + meta: _elm_lang$core$Maybe$Just(_p24._2) + }), + _1: '' + }; + } else { + var _p33 = _p24._0; + var _p32 = _p24._2; + var isTuple = function (t) { + var _p25 = t; + if (_p25.ctor === 'Tuple') { + return true; + } else { + return false; + } + }; + var isPrivate = A2(_user$project$ExContext$isPrivate, c, _p33); + var genFfi = A4( + _user$project$ExFfi$generateFfi, + c, + _user$project$ExExpression$elixirE, + _p33, + A2( + _elm_lang$core$List$map, + _user$project$Helpers$typeApplicationToList, + A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2( + _elm_lang$core$Maybe$map, + function (_p26) { + return _user$project$Helpers$typeApplicationToList( + function (_) { + return _.def; + }(_p26)); + }, + A2( + _elm_lang$core$Maybe$andThen, + function (_p27) { + return A2( + _elm_lang$core$Dict$get, + _p33, + function (_) { + return _.definitions; + }(_p27)); + }, + A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)))))); + var _p28 = A2( _elm_lang$core$Maybe$withDefault, {ctor: '_Tuple2', _0: c, _1: ''}, A2( _elm_lang$core$Maybe$map, - A3(_user$project$ExStatement$elixirDoc, c, _user$project$ExStatement$Fundoc, _p21), + A3(_user$project$ExStatement$elixirDoc, c, _user$project$ExStatement$Fundoc, _p33), c.lastDoc)); - var newC = _p19._0; - var code = _p19._1; - return A2( - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }), - newC, + var newC = _p28._0; + var code = _p28._1; + var definition = A2( + _elm_lang$core$Maybe$map, + _user$project$ExAlias$replaceTypeAliases(c), A2( - _elm_lang$core$Basics_ops['++'], - A4(_user$project$ExContext$onlyWithoutFlag, newC, 'nodef', _p21, code), - function () { - var _p20 = _user$project$Helpers$operatorType(_p21); - switch (_p20.ctor) { - case 'Builtin': - return ''; - case 'Custom': - return A4( - _user$project$ExContext$onlyWithoutFlag, - newC, - 'nospec', - _p21, - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(newC.indent), - A2( - _elm_lang$core$Basics_ops['++'], - '@spec ', + _elm_lang$core$Maybe$andThen, + function (_p29) { + return A2( + _elm_lang$core$Maybe$map, + function (_) { + return _.def; + }, + A2( + _elm_lang$core$Dict$get, + _p33, + function (_) { + return _.definitions; + }(_p29))); + }, + A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules))); + var spec = A2( + _elm_lang$core$Basics_ops['++'], + A4(_user$project$ExContext$onlyWithoutFlag, newC, 'nodef', _p33, code), + function () { + var _p30 = _user$project$Helpers$operatorType(_p33); + switch (_p30.ctor) { + case 'Builtin': + return ''; + case 'Custom': + return A2( + _elm_lang$core$Maybe$withDefault, + '', + A2( + _elm_lang$core$Maybe$map, + function (def) { + return A4( + _user$project$ExContext$onlyWithoutFlag, + newC, + 'nospec', + _p33, A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$translateOperator(_p21), - A2(_user$project$ExType$typespec, newC, resolved))))); - default: - return A4( - _user$project$ExContext$onlyWithoutFlag, - newC, - 'nospec', - _p21, - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(newC.indent), - A2( - _elm_lang$core$Basics_ops['++'], - '@spec ', + _user$project$Helpers$ind(newC.indent), + A2( + _elm_lang$core$Basics_ops['++'], + '@spec ', + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$translateOperator(_p33), + A2(_user$project$ExType$typespec, newC, def))))); + }, + definition)); + default: + return A2( + _elm_lang$core$Maybe$withDefault, + '', + A2( + _elm_lang$core$Maybe$map, + function (def) { + return A4( + _user$project$ExContext$onlyWithoutFlag, + newC, + 'nospec', + _p33, A2( _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p21), - A2(_user$project$ExType$typespec, newC, resolved))))); - } - }())); - } else { - var _p25 = _p18._1; - var _p24 = _p18._0; - var _p22 = A2( - _elm_lang$core$Maybe$withDefault, - {ctor: '_Tuple2', _0: c, _1: ''}, - A2( - _elm_lang$core$Maybe$map, - A3(_user$project$ExStatement$elixirDoc, c, _user$project$ExStatement$Fundoc, _p24), - c.lastDoc)); - var newC = _p22._0; - var code = _p22._1; + _user$project$Helpers$ind(newC.indent), + A2( + _elm_lang$core$Basics_ops['++'], + '@spec ', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_user$project$Helpers$toSnakeCase, true, _p33), + A2(_user$project$ExType$typespec, newC, def))))); + }, + definition)); + } + }()); return A2( - F2( - function (v0, v1) { - return {ctor: '_Tuple2', _0: v0, _1: v1}; - }), + _user$project$Helpers_ops['=>'], newC, - A2( - _elm_lang$core$Basics_ops['++'], - code, - function () { - var _p23 = _user$project$Helpers$operatorType(_p24); - switch (_p23.ctor) { - case 'Builtin': - return ''; - case 'Custom': - return A4( - _user$project$ExContext$onlyWithoutFlag, - newC, - _p24, - 'nospec', - A2( + function () { + var _p31 = _p32; + _v15_3: + do { + if (((((_p31.ctor === 'Application') && (_p31._0.ctor === 'Application')) && (_p31._0._0.ctor === 'Variable')) && (_p31._0._0._0.ctor === '::')) && (_p31._0._0._0._1.ctor === '[]')) { + switch (_p31._0._0._0._0) { + case 'ffi': + return A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), + spec, A2( _elm_lang$core$Basics_ops['++'], - '@spec ', - A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$translateOperator(_p24), - A2(_user$project$ExType$typespec, newC, _p25))))); - default: - return A4( - _user$project$ExContext$onlyWithoutFlag, - newC, - _p24, - 'nospec', - A2( + _user$project$Helpers$ind(c.indent + 1), + genFfi(_p31))); + case 'tryFfi': + return A2( + _elm_lang$core$Basics_ops['++'], + spec, + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Helpers$ind(c.indent + 1), + genFfi(_p31))); + case 'macro': + return A2( _elm_lang$core$Basics_ops['++'], _user$project$Helpers$ind(c.indent), A2( _elm_lang$core$Basics_ops['++'], - '@spec ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p24), - A2(_user$project$ExType$typespec, newC, _p25))))); + genFfi(_p31), + '\n')); + default: + break _v15_3; + } + } else { + break _v15_3; } - }())); - } - case 'FunctionDeclaration': - var _p36 = _p18._0; - var _p35 = _p18._2; - var _p34 = _p18._1; - var definitionExists = A2( - F2( - function (x, y) { - return !_elm_lang$core$Native_Utils.eq(x, y); - }), - _elm_lang$core$Maybe$Nothing, - A2( - _elm_lang$core$Maybe$andThen, - function (_p26) { + } while(false); return A2( - _elm_lang$core$Dict$get, - _p36, - function (_) { - return _.definitions; - }(_p26)); - }, - A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules))); - var preCurry = ((!definitionExists) && (!_elm_lang$core$Native_Utils.eq( - _p34, - {ctor: '[]'}))) ? A2( - _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$ind(c.indent), - A2( - _elm_lang$core$Basics_ops['++'], - 'curryp ', - A2( - _elm_lang$core$Basics_ops['++'], - A2(_user$project$Helpers$toSnakeCase, true, _p36), - A2( - _elm_lang$core$Basics_ops['++'], - '/', - _elm_lang$core$Basics$toString( - _elm_lang$core$List$length(_p34)))))) : ''; - var isTuple = function (t) { - var _p27 = t; - if (_p27.ctor === 'Tuple') { - return true; - } else { - return false; - } - }; - var isPrivate = A2(_user$project$ExContext$isPrivate, c, _p36); - var genFfi = A4( - _user$project$ExFfi$generateFfi, - c, - _user$project$ExExpression$elixirE, - _p36, - A2( - _elm_lang$core$List$map, - _user$project$Helpers$typeApplicationToList, - A2( - _elm_lang$core$Maybe$withDefault, - {ctor: '[]'}, - A2( - _elm_lang$core$Maybe$map, - function (_p28) { - return _user$project$Helpers$typeApplicationToList( - function (_) { - return _.def; - }(_p28)); - }, - A2( - _elm_lang$core$Maybe$andThen, - function (_p29) { - return A2( - _elm_lang$core$Dict$get, - _p36, - function (_) { - return _.definitions; - }(_p29)); - }, - A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules)))))); - return A2( - _user$project$Helpers_ops['=>'], - c, - ((!definitionExists) && (!isPrivate)) ? _elm_lang$core$Native_Utils.crash( - 'ExStatement', - { - start: {line: 213, column: 25}, - end: {line: 213, column: 36} - })( - A2( - _elm_lang$core$Basics_ops['++'], - 'To be able to export it, you need to provide function type for `', - A2( _elm_lang$core$Basics_ops['++'], - _p36, - A2( - _elm_lang$core$Basics_ops['++'], - '` function in module ', - _elm_lang$core$Basics$toString(c.mod))))) : A2( - _elm_lang$core$Basics_ops['++'], - preCurry, - function () { - var _p30 = _p35; - _v12_4: - do { - switch (_p30.ctor) { - case 'Application': - if ((((_p30._0.ctor === 'Application') && (_p30._0._0.ctor === 'Variable')) && (_p30._0._0._0.ctor === '::')) && (_p30._0._0._0._1.ctor === '[]')) { - switch (_p30._0._0._0._0) { - case 'ffi': - return genFfi(_p30); - case 'tryFfi': - return genFfi(_p30); - default: - break _v12_4; - } - } else { - break _v12_4; - } - case 'Case': - switch (_p30._0.ctor) { - case 'Variable': - if ((_p30._0._0.ctor === '::') && (_p30._0._0._1.ctor === '[]')) { - var _p31 = _p30._0._0._0; - return _elm_lang$core$Native_Utils.eq( - { - ctor: '::', - _0: _p30._0, - _1: {ctor: '[]'} - }, - _p34) ? A6(_user$project$ExFunction$genOverloadedFunctionDefinition, c, _user$project$ExExpression$elixirE, _p31, _p34, _p35, _p30._1) : A5(_user$project$ExFunction$genFunctionDefinition, c, _user$project$ExExpression$elixirE, _p31, _p34, _p35); - } else { - break _v12_4; - } - case 'Tuple': - var _p33 = _p30._1; - return (_elm_lang$core$Native_Utils.eq(_p30._0._0, _p34) && A2( - _elm_lang$core$List$all, - function (_p32) { - return isTuple( - _elm_lang$core$Tuple$first(_p32)); - }, - _p33)) ? A6(_user$project$ExFunction$genOverloadedFunctionDefinition, c, _user$project$ExExpression$elixirE, _p36, _p34, _p35, _p33) : A5(_user$project$ExFunction$genFunctionDefinition, c, _user$project$ExExpression$elixirE, _p36, _p34, _p35); - default: - break _v12_4; - } - default: - break _v12_4; - } - } while(false); - return A5(_user$project$ExFunction$genFunctionDefinition, c, _user$project$ExExpression$elixirE, _p36, _p34, _p35); - }())); + spec, + A5(_user$project$ExFunction$genFunctionDefinition, c, _user$project$ExExpression$elixirE, _p33, _p24._1, _p32)); + }()); + } case 'Comment': - return A2(_user$project$ExStatement$elixirComment, c, _p18._0); + return A2(_user$project$ExStatement$elixirComment, c, _p24._0); case 'ImportStatement': - if (_p18._1.ctor === 'Just') { - if (_p18._2.ctor === 'Nothing') { + if (_p24._1.ctor === 'Just') { + if (_p24._2.ctor === 'Nothing') { return A2( _user$project$Helpers_ops['=>'], c, @@ -19458,13 +19928,13 @@ var _user$project$ExStatement$elixirS = F2( 'alias ', A2( _elm_lang$core$Basics_ops['++'], - _user$project$Helpers$modulePath(_p18._0), - A2(_elm_lang$core$Basics_ops['++'], ', as: ', _p18._1._0))))); + _user$project$Helpers$modulePath(_p24._0), + A2(_elm_lang$core$Basics_ops['++'], ', as: ', _p24._1._0))))); } else { - break _v8_12; + break _v12_13; } } else { - if (_p18._2.ctor === 'Nothing') { + if (_p24._2.ctor === 'Nothing') { return A2( _user$project$Helpers_ops['=>'], c, @@ -19474,12 +19944,12 @@ var _user$project$ExStatement$elixirS = F2( A2( _elm_lang$core$Basics_ops['++'], 'alias ', - _user$project$Helpers$modulePath(_p18._0)))); + _user$project$Helpers$modulePath(_p24._0)))); } else { - switch (_p18._2._0.ctor) { + switch (_p24._2._0.ctor) { case 'SubsetExport': - var _p39 = _p18._2._0; - var _p38 = _p18._0; + var _p36 = _p24._2._0; + var _p35 = _p24._0; var imports = A3( _elm_lang$core$List$foldr, F2( @@ -19487,20 +19957,20 @@ var _user$project$ExStatement$elixirS = F2( return A2(_elm_lang$core$Basics_ops['++'], x, y); }), {ctor: '[]'}, - A2(_elm_lang$core$List$map, _user$project$ExStatement$exportSetToList, _p18._2._0._0)); + A2(_elm_lang$core$List$map, _user$project$ExStatement$exportSetToList, _p24._2._0._0)); var excepts = A2( _elm_lang$core$Maybe$withDefault, {ctor: '[]'}, A2( _elm_lang$core$Maybe$map, - function (_p37) { + function (_p34) { return A2( _user$project$ExStatement$duplicates, imports, _elm_lang$core$Dict$keys( function (_) { return _.definitions; - }(_p37))); + }(_p34))); }, A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules))); var except = _elm_lang$core$Native_Utils.eq( @@ -19540,14 +20010,14 @@ var _user$project$ExStatement$elixirS = F2( {ctor: '[]'}) && _elm_lang$core$Native_Utils.eq( excepts, {ctor: '[]'})) ? 'alias ' : 'import '; - var moduleName = A2(_elm_lang$core$String$join, '.', _p38); + var moduleName = A2(_elm_lang$core$String$join, '.', _p35); return A2( _user$project$Helpers_ops['=>'], A3( _user$project$ExContext$mergeTypes, - _p39, - _user$project$Helpers$modulePath(_p38), - A3(_user$project$ExStatement$insertImportedTypes, moduleName, _p39, c)), + _p36, + _user$project$Helpers$modulePath(_p35), + A3(_user$project$ExStatement$insertImports, moduleName, _p36, c)), A2( _elm_lang$core$Basics_ops['++'], _user$project$Helpers$ind(c.indent), @@ -19568,7 +20038,7 @@ var _user$project$ExStatement$elixirS = F2( ctor: '::', _0: { ctor: '::', - _0: _user$project$Helpers$modulePath(_p38), + _0: _user$project$Helpers$modulePath(_p35), _1: {ctor: '[]'} }, _1: { @@ -19582,20 +20052,20 @@ var _user$project$ExStatement$elixirS = F2( } }))))); case 'AllExport': - if (((_p18._0.ctor === '::') && (_p18._0._0 === 'Elchemy')) && (_p18._0._1.ctor === '[]')) { + if (((_p24._0.ctor === '::') && (_p24._0._0 === 'Elchemy')) && (_p24._0._1.ctor === '[]')) { return {ctor: '_Tuple2', _0: c, _1: ''}; } else { - var mod = _user$project$Helpers$modulePath(_p18._0); + var mod = _user$project$Helpers$modulePath(_p24._0); var exports = A2( _elm_lang$core$Maybe$withDefault, {ctor: '[]'}, A2( _elm_lang$core$Maybe$map, - function (_p40) { + function (_p37) { return _elm_lang$core$Dict$keys( function (_) { return _.definitions; - }(_p40)); + }(_p37)); }, A2(_elm_lang$core$Dict$get, mod, c.commons.modules))); var excepts = A2( @@ -19603,14 +20073,14 @@ var _user$project$ExStatement$elixirS = F2( {ctor: '[]'}, A2( _elm_lang$core$Maybe$map, - function (_p41) { + function (_p38) { return A2( _user$project$ExStatement$duplicates, exports, _elm_lang$core$Dict$keys( function (_) { return _.definitions; - }(_p41))); + }(_p38))); }, A2(_elm_lang$core$Dict$get, c.mod, c.commons.modules))); var except = _elm_lang$core$Native_Utils.eq( @@ -19632,7 +20102,7 @@ var _user$project$ExStatement$elixirS = F2( return A2( _user$project$Helpers_ops['=>'], A3( - _user$project$ExStatement$insertImportedTypes, + _user$project$ExStatement$insertImports, mod, _Bogdanp$elm_ast$Ast_Statement$AllExport, A3(_user$project$ExContext$mergeTypes, _Bogdanp$elm_ast$Ast_Statement$AllExport, mod, c)), @@ -19667,12 +20137,12 @@ var _user$project$ExStatement$elixirS = F2( }))))); } default: - break _v8_12; + break _v12_13; } } } default: - break _v8_12; + break _v12_13; } } while(false); return A2( @@ -19681,7 +20151,7 @@ var _user$project$ExStatement$elixirS = F2( return {ctor: '_Tuple2', _0: v0, _1: v1}; }), c, - A2(_user$project$Helpers$notImplemented, 'statement', _p18)); + A3(_user$project$ExContext$notImplemented, c, 'statement', _p24)); }); var _user$project$Compiler$getLinePosition = F2( @@ -19699,29 +20169,6 @@ var _user$project$Compiler$getLinePosition = F2( _elm_lang$core$List$reverse(lines)))); return {ctor: '_Tuple2', _0: line, _1: column}; }); -var _user$project$Compiler$crunchSplitLines = A3( - _elm_lang$core$Regex$replace, - _elm_lang$core$Regex$All, - _elm_lang$core$Regex$regex('(?:({-(?:\\n|.)*?-})|([\\w\\])}\"][\\t ]*)\\n[\\t ]+((?!.*\\s->\\s)(?!.*=)(?!.*\\bin\\b)[\\w[({\"]))'), - function (m) { - return A2( - _elm_lang$core$String$join, - ' ', - A2( - _elm_lang$core$List$filterMap, - _elm_lang$core$Basics$identity, - A2( - _elm_lang$core$List$map, - _elm_lang$core$Maybe$map( - A2( - _elm_lang$core$Basics$flip, - F2( - function (x, y) { - return A2(_elm_lang$core$Basics_ops['++'], x, y); - }), - ' ')), - m.submatches))); - }); var _user$project$Compiler$removeComments = function (_p0) { return A4( _elm_lang$core$Regex$replace, @@ -19731,9 +20178,14 @@ var _user$project$Compiler$removeComments = function (_p0) { A4( _elm_lang$core$Regex$replace, _elm_lang$core$Regex$All, - _elm_lang$core$Regex$regex('\\s--.*\n'), + _elm_lang$core$Regex$regex('\\s--.*\\r?\\n'), _elm_lang$core$Basics$always(''), - _p0)); + A4( + _elm_lang$core$Regex$replace, + _elm_lang$core$Regex$All, + _elm_lang$core$Regex$regex(' +--.*\\r?\\n'), + _elm_lang$core$Basics$always(''), + _p0))); }; var _user$project$Compiler$prepare = function (codebase) { return _user$project$Compiler$removeComments(codebase); @@ -19758,12 +20210,12 @@ var _user$project$Compiler$parse = F2( return _elm_lang$core$Native_Utils.crash( 'Compiler', { - start: {line: 216, column: 17}, - end: {line: 216, column: 28} + start: {line: 220, column: 17}, + end: {line: 220, column: 28} })( A2( _elm_lang$core$Basics_ops['++'], - ']ERR> Compilation error in:\n ', + ']ERR> Parsing error in:\n ', A2( _elm_lang$core$Basics_ops['++'], fileName, @@ -19781,17 +20233,23 @@ var _user$project$Compiler$parse = F2( _elm_lang$core$Basics$toString(column), A2( _elm_lang$core$Basics_ops['++'], - '\nat:\n ', + '\n', A2( _elm_lang$core$Basics_ops['++'], + _p1._0._2._0, A2( - _elm_lang$core$String$join, - '\n', + _elm_lang$core$Basics_ops['++'], + '\nat:\n ', A2( - _elm_lang$core$List$take, - 30, - _elm_lang$core$String$lines(_p1._0._1.input))), - '\n'))))))))); + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$String$join, + '\n', + A2( + _elm_lang$core$List$take, + 30, + _elm_lang$core$String$lines(_p1._0._1.input))), + '\n'))))))))))); } else { break _v0_2; } @@ -19800,8 +20258,8 @@ var _user$project$Compiler$parse = F2( return _elm_lang$core$Native_Utils.crashCase( 'Compiler', { - start: {line: 207, column: 5}, - end: {line: 232, column: 39} + start: {line: 211, column: 5}, + end: {line: 238, column: 39} }, _p1)( _elm_lang$core$Basics$toString(_p1)); @@ -19845,7 +20303,7 @@ var _user$project$Compiler$getCommonImports = function (commons) { _elm_lang$core$Dict$insert, F3( function (k, v, v2) { - return A2(_elm_lang$core$Dict$insert, k, v); + return A2(_elm_lang$core$Dict$insert, k, v2); }), _elm_lang$core$Dict$insert, acc, @@ -19886,9 +20344,16 @@ var _user$project$Compiler$glueStart = A2( _elm_lang$core$Basics_ops['++'], _user$project$Helpers$ind(0), A2(_elm_lang$core$Basics_ops['++'], 'use Elchemy', '\n')); -var _user$project$Compiler$version = '0.6.3'; +var _user$project$Compiler$version = '0.7.1'; var _user$project$Compiler$getCode = F2( function (context, statements) { + var _p11 = A3( + _elm_lang$core$List$foldl, + _user$project$Compiler$aggregateStatements, + {ctor: '_Tuple2', _0: context, _1: ''}, + statements); + var newC = _p11._0; + var code = _p11._1; var shadowsBasics = _user$project$ExContext$importBasicsWithoutShadowed(context); return A2( _elm_lang$core$Basics_ops['++'], @@ -19913,13 +20378,17 @@ var _user$project$Compiler$getCode = F2( shadowsBasics, A2( _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Tuple$second( - A3( - _elm_lang$core$List$foldl, - _user$project$Compiler$aggregateStatements, - {ctor: '_Tuple2', _0: context, _1: ''}, - statements)), - _user$project$Compiler$glueEnd))))))); + code, + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$Compiler$glueEnd, + A2( + _elm_lang$core$Basics_ops['++'], + _user$project$ExMeta$metaDefinition( + _elm_lang$core$Native_Utils.update( + newC, + {inMeta: true})), + '\n\n'))))))))); }); var _user$project$Compiler$fullTree = F2( function (cachedCommons, m) { @@ -19929,11 +20398,10 @@ var _user$project$Compiler$fullTree = F2( m)) { return {ctor: '_Tuple2', _0: '', _1: cachedCommons}; } else { - var _p11 = A2( - _elm_lang$core$String$split, + if (!A2( + _elm_lang$core$String$contains, A2(_elm_lang$core$Basics_ops['++'], '>>', '>>'), - m); - if ((_p11.ctor === '::') && (_p11._1.ctor === '[]')) { + m)) { return function (_p12) { var _p13 = _p12; var _p14 = _p13._0; @@ -19941,8 +20409,8 @@ var _user$project$Compiler$fullTree = F2( return _elm_lang$core$Native_Utils.crashCase( 'Compiler', { - start: {line: 80, column: 29}, - end: {line: 85, column: 63} + start: {line: 79, column: 21}, + end: {line: 84, column: 55} }, _p14)('Failed getting context'); } else { @@ -19955,28 +20423,65 @@ var _user$project$Compiler$fullTree = F2( } }( _user$project$Compiler$getContext( - A2(_user$project$Compiler$parse, 'NoName.elm', _p11._0))); + A2(_user$project$Compiler$parse, 'NoName.elm', m))); } else { - var _p32 = _p11; + var multiple = A2( + _elm_lang$core$String$split, + A2(_elm_lang$core$Basics_ops['++'], '>>', '>>'), + m); var count = A2( _elm_lang$core$Debug$log, 'Number of files', - _elm_lang$core$List$length(_p32)); + _elm_lang$core$List$length(multiple)); + var compileWithIndex = function (_p17) { + var _p18 = _p17; + var _p20 = _p18._1._0; + var _p19 = A3( + _elm_lang$core$Basics$flip, + _elm_lang$core$Debug$log, + _p20, + A2( + _elm_lang$core$Basics_ops['++'], + 'Compiling ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(count - _p18._0), + A2( + _elm_lang$core$Basics_ops['++'], + '/', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(count), + ' # '))))); + return A2( + _elm_lang$core$Basics_ops['++'], + '>>', + A2( + _elm_lang$core$Basics_ops['++'], + '>>', + A2( + _elm_lang$core$Basics_ops['++'], + _p20, + A2( + _elm_lang$core$Basics_ops['++'], + '\n', + A2(_user$project$Compiler$getCode, _p18._1._1, _p18._1._2))))); + }; var files = A2( _elm_lang$core$List$map, - function (_p17) { - var _p18 = _p17; - var _p20 = _p18._1._0; - var _p19 = A3( + function (_p21) { + var _p22 = _p21; + var _p24 = _p22._1._0; + var _p23 = A3( _elm_lang$core$Basics$flip, _elm_lang$core$Debug$log, - _p20, + _p24, A2( _elm_lang$core$Basics_ops['++'], 'Parsing ', A2( _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(count - _p18._0), + _elm_lang$core$Basics$toString(count - _p22._0), A2( _elm_lang$core$Basics_ops['++'], '/', @@ -19986,8 +20491,8 @@ var _user$project$Compiler$fullTree = F2( ' # '))))); return { ctor: '_Tuple2', - _0: _p20, - _1: A2(_user$project$Compiler$parse, _p20, _p18._1._1) + _0: _p24, + _1: A2(_user$project$Compiler$parse, _p24, _p22._1._1) }; }, A2( @@ -19996,26 +20501,26 @@ var _user$project$Compiler$fullTree = F2( function (v0, v1) { return {ctor: '_Tuple2', _0: v0, _1: v1}; }), - A2(_elm_lang$core$List$map, _user$project$Compiler$getName, _p32))); + A2(_elm_lang$core$List$map, _user$project$Compiler$getName, multiple))); var wContexts = A2( _elm_lang$core$List$filterMap, function (a) { - var _p21 = a; - if (_p21._1._0.ctor === 'Nothing') { + var _p25 = a; + if (_p25._1._0.ctor === 'Nothing') { return _elm_lang$core$Maybe$Nothing; } else { return _elm_lang$core$Maybe$Just( - {ctor: '_Tuple3', _0: _p21._0, _1: _p21._1._0._0, _2: _p21._1._1}); + {ctor: '_Tuple3', _0: _p25._0, _1: _p25._1._0._0, _2: _p25._1._1}); } }, A2( _elm_lang$core$List$map, - function (_p22) { - var _p23 = _p22; + function (_p26) { + var _p27 = _p26; return { ctor: '_Tuple2', - _0: _p23._0, - _1: _user$project$Compiler$getContext(_p23._1) + _0: _p27._0, + _1: _user$project$Compiler$getContext(_p27._1) }; }, files)); @@ -20031,59 +20536,25 @@ var _user$project$Compiler$fullTree = F2( cachedCommons, A2( _elm_lang$core$List$map, - function (_p24) { - var _p25 = _p24; - return _p25._1.commons; + function (_p28) { + var _p29 = _p28; + return _p29._1.commons; }, wContexts)))); var wTrueContexts = A2( _elm_lang$core$List$map, - function (_p26) { - var _p27 = _p26; + function (_p30) { + var _p31 = _p30; return { ctor: '_Tuple3', - _0: _p27._0, + _0: _p31._0, _1: _elm_lang$core$Native_Utils.update( - _p27._1, + _p31._1, {commons: commons}), - _2: _p27._2 + _2: _p31._2 }; }, wContexts); - var compileWithIndex = function (_p28) { - var _p29 = _p28; - var _p31 = _p29._1._0; - var _p30 = A3( - _elm_lang$core$Basics$flip, - _elm_lang$core$Debug$log, - _p31, - A2( - _elm_lang$core$Basics_ops['++'], - 'Compiling ', - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(count - _p29._0), - A2( - _elm_lang$core$Basics_ops['++'], - '/', - A2( - _elm_lang$core$Basics_ops['++'], - _elm_lang$core$Basics$toString(count), - ' # '))))); - return A2( - _elm_lang$core$Basics_ops['++'], - '>>', - A2( - _elm_lang$core$Basics_ops['++'], - '>>', - A2( - _elm_lang$core$Basics_ops['++'], - _p31, - A2( - _elm_lang$core$Basics_ops['++'], - '\n', - A2(_user$project$Compiler$getCode, _p29._1._1, _p29._1._2))))); - }; return A3( _elm_lang$core$Basics$flip, F2( @@ -20110,9 +20581,9 @@ var _user$project$Compiler$fullTree = F2( var _user$project$Compiler$treeAndCommons = function (m) { return A2(_user$project$Compiler$fullTree, _user$project$ExContext$emptyCommons, m); }; -var _user$project$Compiler$tree = function (_p33) { +var _user$project$Compiler$tree = function (_p32) { return _elm_lang$core$Tuple$first( - _user$project$Compiler$treeAndCommons(_p33)); + _user$project$Compiler$treeAndCommons(_p32)); }; var _user$project$Main$update = F2( diff --git a/docs/static/css/main.e1c8fc29.css b/docs/static/css/main.e1c8fc29.css deleted file mode 100644 index e3be851..0000000 --- a/docs/static/css/main.e1c8fc29.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url(../../static/css/f4769f9bdb7466be65088239c12046d1.eot);src:url(../../static/css/f4769f9bdb7466be65088239c12046d1.eot?#iefix) format("embedded-opentype"),url(../../static/css/448c34a56d699c29117adc64c43affeb.woff2) format("woff2"),url(../../static/css/fa2772327f55d8198301fdb8bcfc8158.woff) format("woff"),url(../../static/css/e18bbf611f2a2e43afc071aa2f4e1512.ttf) format("truetype"),url(../../static/css/89889688147bd7575d6327160d64e760.svg#glyphicons_halflingsregular) format("svg")}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20AC"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270F"}.glyphicon-glass:before{content:"\E001"}.glyphicon-music:before{content:"\E002"}.glyphicon-search:before{content:"\E003"}.glyphicon-heart:before{content:"\E005"}.glyphicon-star:before{content:"\E006"}.glyphicon-star-empty:before{content:"\E007"}.glyphicon-user:before{content:"\E008"}.glyphicon-film:before{content:"\E009"}.glyphicon-th-large:before{content:"\E010"}.glyphicon-th:before{content:"\E011"}.glyphicon-th-list:before{content:"\E012"}.glyphicon-ok:before{content:"\E013"}.glyphicon-remove:before{content:"\E014"}.glyphicon-zoom-in:before{content:"\E015"}.glyphicon-zoom-out:before{content:"\E016"}.glyphicon-off:before{content:"\E017"}.glyphicon-signal:before{content:"\E018"}.glyphicon-cog:before{content:"\E019"}.glyphicon-trash:before{content:"\E020"}.glyphicon-home:before{content:"\E021"}.glyphicon-file:before{content:"\E022"}.glyphicon-time:before{content:"\E023"}.glyphicon-road:before{content:"\E024"}.glyphicon-download-alt:before{content:"\E025"}.glyphicon-download:before{content:"\E026"}.glyphicon-upload:before{content:"\E027"}.glyphicon-inbox:before{content:"\E028"}.glyphicon-play-circle:before{content:"\E029"}.glyphicon-repeat:before{content:"\E030"}.glyphicon-refresh:before{content:"\E031"}.glyphicon-list-alt:before{content:"\E032"}.glyphicon-lock:before{content:"\E033"}.glyphicon-flag:before{content:"\E034"}.glyphicon-headphones:before{content:"\E035"}.glyphicon-volume-off:before{content:"\E036"}.glyphicon-volume-down:before{content:"\E037"}.glyphicon-volume-up:before{content:"\E038"}.glyphicon-qrcode:before{content:"\E039"}.glyphicon-barcode:before{content:"\E040"}.glyphicon-tag:before{content:"\E041"}.glyphicon-tags:before{content:"\E042"}.glyphicon-book:before{content:"\E043"}.glyphicon-bookmark:before{content:"\E044"}.glyphicon-print:before{content:"\E045"}.glyphicon-camera:before{content:"\E046"}.glyphicon-font:before{content:"\E047"}.glyphicon-bold:before{content:"\E048"}.glyphicon-italic:before{content:"\E049"}.glyphicon-text-height:before{content:"\E050"}.glyphicon-text-width:before{content:"\E051"}.glyphicon-align-left:before{content:"\E052"}.glyphicon-align-center:before{content:"\E053"}.glyphicon-align-right:before{content:"\E054"}.glyphicon-align-justify:before{content:"\E055"}.glyphicon-list:before{content:"\E056"}.glyphicon-indent-left:before{content:"\E057"}.glyphicon-indent-right:before{content:"\E058"}.glyphicon-facetime-video:before{content:"\E059"}.glyphicon-picture:before{content:"\E060"}.glyphicon-map-marker:before{content:"\E062"}.glyphicon-adjust:before{content:"\E063"}.glyphicon-tint:before{content:"\E064"}.glyphicon-edit:before{content:"\E065"}.glyphicon-share:before{content:"\E066"}.glyphicon-check:before{content:"\E067"}.glyphicon-move:before{content:"\E068"}.glyphicon-step-backward:before{content:"\E069"}.glyphicon-fast-backward:before{content:"\E070"}.glyphicon-backward:before{content:"\E071"}.glyphicon-play:before{content:"\E072"}.glyphicon-pause:before{content:"\E073"}.glyphicon-stop:before{content:"\E074"}.glyphicon-forward:before{content:"\E075"}.glyphicon-fast-forward:before{content:"\E076"}.glyphicon-step-forward:before{content:"\E077"}.glyphicon-eject:before{content:"\E078"}.glyphicon-chevron-left:before{content:"\E079"}.glyphicon-chevron-right:before{content:"\E080"}.glyphicon-plus-sign:before{content:"\E081"}.glyphicon-minus-sign:before{content:"\E082"}.glyphicon-remove-sign:before{content:"\E083"}.glyphicon-ok-sign:before{content:"\E084"}.glyphicon-question-sign:before{content:"\E085"}.glyphicon-info-sign:before{content:"\E086"}.glyphicon-screenshot:before{content:"\E087"}.glyphicon-remove-circle:before{content:"\E088"}.glyphicon-ok-circle:before{content:"\E089"}.glyphicon-ban-circle:before{content:"\E090"}.glyphicon-arrow-left:before{content:"\E091"}.glyphicon-arrow-right:before{content:"\E092"}.glyphicon-arrow-up:before{content:"\E093"}.glyphicon-arrow-down:before{content:"\E094"}.glyphicon-share-alt:before{content:"\E095"}.glyphicon-resize-full:before{content:"\E096"}.glyphicon-resize-small:before{content:"\E097"}.glyphicon-exclamation-sign:before{content:"\E101"}.glyphicon-gift:before{content:"\E102"}.glyphicon-leaf:before{content:"\E103"}.glyphicon-fire:before{content:"\E104"}.glyphicon-eye-open:before{content:"\E105"}.glyphicon-eye-close:before{content:"\E106"}.glyphicon-warning-sign:before{content:"\E107"}.glyphicon-plane:before{content:"\E108"}.glyphicon-calendar:before{content:"\E109"}.glyphicon-random:before{content:"\E110"}.glyphicon-comment:before{content:"\E111"}.glyphicon-magnet:before{content:"\E112"}.glyphicon-chevron-up:before{content:"\E113"}.glyphicon-chevron-down:before{content:"\E114"}.glyphicon-retweet:before{content:"\E115"}.glyphicon-shopping-cart:before{content:"\E116"}.glyphicon-folder-close:before{content:"\E117"}.glyphicon-folder-open:before{content:"\E118"}.glyphicon-resize-vertical:before{content:"\E119"}.glyphicon-resize-horizontal:before{content:"\E120"}.glyphicon-hdd:before{content:"\E121"}.glyphicon-bullhorn:before{content:"\E122"}.glyphicon-bell:before{content:"\E123"}.glyphicon-certificate:before{content:"\E124"}.glyphicon-thumbs-up:before{content:"\E125"}.glyphicon-thumbs-down:before{content:"\E126"}.glyphicon-hand-right:before{content:"\E127"}.glyphicon-hand-left:before{content:"\E128"}.glyphicon-hand-up:before{content:"\E129"}.glyphicon-hand-down:before{content:"\E130"}.glyphicon-circle-arrow-right:before{content:"\E131"}.glyphicon-circle-arrow-left:before{content:"\E132"}.glyphicon-circle-arrow-up:before{content:"\E133"}.glyphicon-circle-arrow-down:before{content:"\E134"}.glyphicon-globe:before{content:"\E135"}.glyphicon-wrench:before{content:"\E136"}.glyphicon-tasks:before{content:"\E137"}.glyphicon-filter:before{content:"\E138"}.glyphicon-briefcase:before{content:"\E139"}.glyphicon-fullscreen:before{content:"\E140"}.glyphicon-dashboard:before{content:"\E141"}.glyphicon-paperclip:before{content:"\E142"}.glyphicon-heart-empty:before{content:"\E143"}.glyphicon-link:before{content:"\E144"}.glyphicon-phone:before{content:"\E145"}.glyphicon-pushpin:before{content:"\E146"}.glyphicon-usd:before{content:"\E148"}.glyphicon-gbp:before{content:"\E149"}.glyphicon-sort:before{content:"\E150"}.glyphicon-sort-by-alphabet:before{content:"\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\E152"}.glyphicon-sort-by-order:before{content:"\E153"}.glyphicon-sort-by-order-alt:before{content:"\E154"}.glyphicon-sort-by-attributes:before{content:"\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\E156"}.glyphicon-unchecked:before{content:"\E157"}.glyphicon-expand:before{content:"\E158"}.glyphicon-collapse-down:before{content:"\E159"}.glyphicon-collapse-up:before{content:"\E160"}.glyphicon-log-in:before{content:"\E161"}.glyphicon-flash:before{content:"\E162"}.glyphicon-log-out:before{content:"\E163"}.glyphicon-new-window:before{content:"\E164"}.glyphicon-record:before{content:"\E165"}.glyphicon-save:before{content:"\E166"}.glyphicon-open:before{content:"\E167"}.glyphicon-saved:before{content:"\E168"}.glyphicon-import:before{content:"\E169"}.glyphicon-export:before{content:"\E170"}.glyphicon-send:before{content:"\E171"}.glyphicon-floppy-disk:before{content:"\E172"}.glyphicon-floppy-saved:before{content:"\E173"}.glyphicon-floppy-remove:before{content:"\E174"}.glyphicon-floppy-save:before{content:"\E175"}.glyphicon-floppy-open:before{content:"\E176"}.glyphicon-credit-card:before{content:"\E177"}.glyphicon-transfer:before{content:"\E178"}.glyphicon-cutlery:before{content:"\E179"}.glyphicon-header:before{content:"\E180"}.glyphicon-compressed:before{content:"\E181"}.glyphicon-earphone:before{content:"\E182"}.glyphicon-phone-alt:before{content:"\E183"}.glyphicon-tower:before{content:"\E184"}.glyphicon-stats:before{content:"\E185"}.glyphicon-sd-video:before{content:"\E186"}.glyphicon-hd-video:before{content:"\E187"}.glyphicon-subtitles:before{content:"\E188"}.glyphicon-sound-stereo:before{content:"\E189"}.glyphicon-sound-dolby:before{content:"\E190"}.glyphicon-sound-5-1:before{content:"\E191"}.glyphicon-sound-6-1:before{content:"\E192"}.glyphicon-sound-7-1:before{content:"\E193"}.glyphicon-copyright-mark:before{content:"\E194"}.glyphicon-registration-mark:before{content:"\E195"}.glyphicon-cloud-download:before{content:"\E197"}.glyphicon-cloud-upload:before{content:"\E198"}.glyphicon-tree-conifer:before{content:"\E199"}.glyphicon-tree-deciduous:before{content:"\E200"}.glyphicon-cd:before{content:"\E201"}.glyphicon-save-file:before{content:"\E202"}.glyphicon-open-file:before{content:"\E203"}.glyphicon-level-up:before{content:"\E204"}.glyphicon-copy:before{content:"\E205"}.glyphicon-paste:before{content:"\E206"}.glyphicon-alert:before{content:"\E209"}.glyphicon-equalizer:before{content:"\E210"}.glyphicon-king:before{content:"\E211"}.glyphicon-queen:before{content:"\E212"}.glyphicon-pawn:before{content:"\E213"}.glyphicon-bishop:before{content:"\E214"}.glyphicon-knight:before{content:"\E215"}.glyphicon-baby-formula:before{content:"\E216"}.glyphicon-tent:before{content:"\26FA"}.glyphicon-blackboard:before{content:"\E218"}.glyphicon-bed:before{content:"\E219"}.glyphicon-apple:before{content:"\F8FF"}.glyphicon-erase:before{content:"\E221"}.glyphicon-hourglass:before{content:"\231B"}.glyphicon-lamp:before{content:"\E223"}.glyphicon-duplicate:before{content:"\E224"}.glyphicon-piggy-bank:before{content:"\E225"}.glyphicon-scissors:before{content:"\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20BD"}.glyphicon-scale:before{content:"\E230"}.glyphicon-ice-lolly:before{content:"\E231"}.glyphicon-ice-lolly-tasted:before{content:"\E232"}.glyphicon-education:before{content:"\E233"}.glyphicon-option-horizontal:before{content:"\E234"}.glyphicon-option-vertical:before{content:"\E235"}.glyphicon-menu-hamburger:before{content:"\E236"}.glyphicon-modal-window:before{content:"\E237"}.glyphicon-oil:before{content:"\E238"}.glyphicon-grain:before{content:"\E239"}.glyphicon-sunglasses:before{content:"\E240"}.glyphicon-text-size:before{content:"\E241"}.glyphicon-text-color:before{content:"\E242"}.glyphicon-text-background:before{content:"\E243"}.glyphicon-object-align-top:before{content:"\E244"}.glyphicon-object-align-bottom:before{content:"\E245"}.glyphicon-object-align-horizontal:before{content:"\E246"}.glyphicon-object-align-left:before{content:"\E247"}.glyphicon-object-align-vertical:before{content:"\E248"}.glyphicon-object-align-right:before{content:"\E249"}.glyphicon-triangle-right:before{content:"\E250"}.glyphicon-triangle-left:before{content:"\E251"}.glyphicon-triangle-bottom:before{content:"\E252"}.glyphicon-triangle-top:before{content:"\E253"}.glyphicon-console:before{content:"\E254"}.glyphicon-superscript:before{content:"\E255"}.glyphicon-subscript:before{content:"\E256"}.glyphicon-menu-left:before{content:"\E257"}.glyphicon-menu-right:before{content:"\E258"}.glyphicon-menu-down:before{content:"\E259"}.glyphicon-menu-up:before{content:"\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.initialism,.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857}dt{font-weight:700}dd{margin-left:0}.dl-horizontal dd:after,.dl-horizontal dd:before{content:" ";display:table}.dl-horizontal dd:after{clear:both}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:"\2014 \A0"}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:""}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:"\A0 \2014"}address{margin-bottom:20px;font-style:normal;line-height:1.42857}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.container:after,.container:before{content:" ";display:table}.container:after{clear:both}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.container-fluid:after,.container-fluid:before{content:" ";display:table}.container-fluid:after{clear:both}.row{margin-left:-15px;margin-right:-15px}.row:after,.row:before{content:" ";display:table}.row:after{clear:both}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-1{width:8.33333%}.col-xs-2{width:16.66667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333%}.col-xs-5{width:41.66667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333%}.col-xs-8{width:66.66667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333%}.col-xs-11{width:91.66667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333%}.col-xs-pull-2{right:16.66667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333%}.col-xs-pull-5{right:41.66667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333%}.col-xs-pull-8{right:66.66667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333%}.col-xs-pull-11{right:91.66667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333%}.col-xs-push-2{left:16.66667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333%}.col-xs-push-5{left:41.66667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333%}.col-xs-push-8{left:66.66667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333%}.col-xs-push-11{left:91.66667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-2{margin-left:16.66667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333%}.col-xs-offset-5{margin-left:41.66667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333%}.col-xs-offset-8{margin-left:66.66667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333%}.col-xs-offset-11{margin-left:91.66667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-1{width:8.33333%}.col-sm-2{width:16.66667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333%}.col-sm-5{width:41.66667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333%}.col-sm-8{width:66.66667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333%}.col-sm-11{width:91.66667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333%}.col-sm-pull-2{right:16.66667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333%}.col-sm-pull-5{right:41.66667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333%}.col-sm-pull-8{right:66.66667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333%}.col-sm-pull-11{right:91.66667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333%}.col-sm-push-2{left:16.66667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333%}.col-sm-push-5{left:41.66667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333%}.col-sm-push-8{left:66.66667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333%}.col-sm-push-11{left:91.66667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}.col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}.col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}.col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333%}.col-md-pull-2{right:16.66667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333%}.col-md-pull-5{right:41.66667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333%}.col-md-pull-8{right:66.66667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333%}.col-md-pull-11{right:91.66667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333%}.col-md-push-2{left:16.66667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333%}.col-md-push-5{left:41.66667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333%}.col-md-push-8{left:66.66667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333%}.col-md-push-11{left:91.66667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-2{margin-left:16.66667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333%}.col-md-offset-5{margin-left:41.66667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333%}.col-md-offset-8{margin-left:66.66667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333%}.col-md-offset-11{margin-left:91.66667%}.col-md-offset-12{margin-left:100%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-1{width:8.33333%}.col-lg-2{width:16.66667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333%}.col-lg-5{width:41.66667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333%}.col-lg-8{width:66.66667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333%}.col-lg-11{width:91.66667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333%}.col-lg-pull-2{right:16.66667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333%}.col-lg-pull-5{right:41.66667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333%}.col-lg-pull-8{right:66.66667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333%}.col-lg-pull-11{right:91.66667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333%}.col-lg-push-2{left:16.66667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333%}.col-lg-push-5{left:41.66667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333%}.col-lg-push-8{left:66.66667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333%}.col-lg-push-11{left:91.66667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-offset-12{margin-left:100%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{margin:0;min-width:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm>.input-group-btn>input[type=date].btn,.input-group-sm>.input-group-btn>input[type=datetime-local].btn,.input-group-sm>.input-group-btn>input[type=month].btn,.input-group-sm>.input-group-btn>input[type=time].btn,.input-group-sm>input[type=date].form-control,.input-group-sm>input[type=date].input-group-addon,.input-group-sm>input[type=datetime-local].form-control,.input-group-sm>input[type=datetime-local].input-group-addon,.input-group-sm>input[type=month].form-control,.input-group-sm>input[type=month].input-group-addon,.input-group-sm>input[type=time].form-control,.input-group-sm>input[type=time].input-group-addon,.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg>.input-group-btn>input[type=date].btn,.input-group-lg>.input-group-btn>input[type=datetime-local].btn,.input-group-lg>.input-group-btn>input[type=month].btn,.input-group-lg>.input-group-btn>input[type=time].btn,.input-group-lg>input[type=date].form-control,.input-group-lg>input[type=date].input-group-addon,.input-group-lg>input[type=datetime-local].form-control,.input-group-lg>input[type=datetime-local].input-group-addon,.input-group-lg>input[type=month].form-control,.input-group-lg>input[type=month].input-group-addon,.input-group-lg>input[type=time].form-control,.input-group-lg>input[type=time].input-group-addon,.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px\9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-btn>select.btn,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,select.input-sm{height:30px;line-height:30px}.input-group-sm>.input-group-btn>select[multiple].btn,.input-group-sm>.input-group-btn>textarea.btn,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.input-group-lg>.input-group-btn>select.btn,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,select.input-lg{height:46px;line-height:46px}.input-group-lg>.input-group-btn>select[multiple].btn,.input-group-lg>.input-group-btn>textarea.btn,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.33333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:after,.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{clear:both}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.btn-default.dropdown-toggle.focus,.open>.btn-default.dropdown-toggle:focus,.open>.btn-default.dropdown-toggle:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.btn-default.dropdown-toggle{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.btn-primary.dropdown-toggle.focus,.open>.btn-primary.dropdown-toggle:focus,.open>.btn-primary.dropdown-toggle:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.btn-success.dropdown-toggle.focus,.open>.btn-success.dropdown-toggle:focus,.open>.btn-success.dropdown-toggle:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.btn-info.dropdown-toggle.focus,.open>.btn-info.dropdown-toggle:focus,.open>.btn-info.dropdown-toggle:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.btn-info.dropdown-toggle{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.btn-warning.dropdown-toggle.focus,.open>.btn-warning.dropdown-toggle:focus,.open>.btn-warning.dropdown-toggle:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.btn-danger.dropdown-toggle.focus,.open>.btn-danger.dropdown-toggle:focus,.open>.btn-danger.dropdown-toggle:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;transition-property:height,visibility;transition-duration:.35s;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar:after,.btn-toolbar:before{content:" ";display:table}.btn-toolbar:after{clear:both}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group-lg.btn-group>.btn+.dropdown-toggle,.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-group-lg>.btn .caret,.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-group-lg>.btn .caret,.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before{content:" ";display:table}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav:after,.nav:before{content:" ";display:table}.nav:after{clear:both}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified,.nav-tabs.nav-justified{width:100%}.nav-justified>li,.nav-tabs.nav-justified>li{float:none}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li,.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified,.nav-tabs.nav-justified{border-bottom:0}.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:after,.navbar:before{content:" ";display:table}.navbar:after{clear:both}@media (min-width:768px){.navbar{border-radius:4px}}.navbar-header:after,.navbar-header:before{content:" ";display:table}.navbar-header:after{clear:both}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1);-webkit-overflow-scrolling:touch}.navbar-collapse:after,.navbar-collapse:before{content:" ";display:table}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin:8px -15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.btn-group-sm>.navbar-btn.btn,.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.btn-group-xs>.navbar-btn.btn,.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#090909}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#090909;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\A0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857;text-decoration:none;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager:after,.pager:before{content:" ";display:table}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label:empty{display:none}.btn .label{position:relative;top:-1px}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#333}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal,.modal-open{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translateY(-25%);transform:translateY(-25%);transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header:after,.modal-header:before{content:" ";display:table}.modal-header:after{clear:both}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:after,.modal-footer:before{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel,.carousel-inner{position:relative}.carousel-inner{overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;max-width:100%;height:auto;line-height:1}@media (-webkit-transform-3d),(transform-3d){.carousel-inner>.item{transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translateZ(0);transform:translateZ(0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent}.carousel-control.left{background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#80000000",endColorstr="#00000000",GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00000000",endColorstr="#80000000",GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:"\2039"}.carousel-control .icon-next:before{content:"\203A"}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000\9;background-color:transparent}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}.github-corner{display:block;position:absolute;top:0;right:0;width:8em;border:none!important;z-index:1}.github-corner svg{fill:#fff;color:#60b5cc;border:0;width:100%;height:auto}.github-corner:hover .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}@media (max-width:500px){.github-corner:hover .octo-arm{-webkit-animation:none;animation:none}.github-corner .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}}@-webkit-keyframes octocat-wave{0%,to{-webkit-transform:rotate(0);transform:rotate(0)}20%,60%{-webkit-transform:rotate(-25deg);transform:rotate(-25deg)}40%,80%{-webkit-transform:rotate(10deg);transform:rotate(10deg)}}@keyframes octocat-wave{0%,to{-webkit-transform:rotate(0);transform:rotate(0)}20%,60%{-webkit-transform:rotate(-25deg);transform:rotate(-25deg)}40%,80%{-webkit-transform:rotate(10deg);transform:rotate(10deg)}}body,html{font-family:Helvetica Neue,Montserrat,sans-serif;font-weight:400;margin:0;padding:0;width:100vw;overflow-x:hidden}.top-space{padding:50px}.elchemy-title{font-weight:200;font-size:1.9em;line-height:1.5em;padding:.8em;margin-bottom:0;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}#code-editor{border-radius:5px}#code-editor,.CodeMirror{position:relative;background-color:#282c34;line-height:1.42857;height:100%}.CodeMirror{padding:9.5px}#error-dialog{color:#e96443;padding-bottom:50px}.error-dialog{position:absolute;background-color:RGBA(255,255,255,.9);padding-left:50px}#error-dialog:empty{display:none}#root{box-sizing:border-box}pre{color:#abb2bf;background-color:#282c34;margin:0}.top-code pre{word-spacing:5px;line-height:6.5mm;background-color:transparent;color:#fff;border:none}.install-snippet-wrapper,.top-code pre{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.install-snippet{margin:40px auto}.install-snippet h4{margin-bottom:20px}.install-snippet pre{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 40px;text-align:left;border:none}/*! - * Start Bootstrap - Stylish Portfolio (http://startbootstrap.com/) - * Copyright 2013-2016 Start Bootstrap - * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) - */.text-vertical-center{display:table-cell;text-align:center;vertical-align:middle}.text-vertical-center h1{margin:0;padding:0;font-size:4.5em;font-weight:700}.btn{box-shadow:.01em .01em 1px rgba(78,81,83,.6);border-radius:5px;font-weight:300;font-size:1.8rem;padding-left:20px;padding-right:20px}.btn-dark{color:#fff;background-color:rgba(0,0,0,.4)}.btn-dark:active,.btn-dark:focus,.btn-dark:hover{color:#fff;background-color:rgba(0,0,0,.7)}.btn-light{color:#333;background-color:#fff}.btn-light:active,.btn-light:focus,.btn-light:hover{color:#333;background-color:hsla(0,0%,100%,.8)}hr.small{max-width:100px}#sidebar-wrapper{z-index:1000;position:fixed;right:0;width:250px;height:100%;-webkit-transform:translateX(250px);transform:translateX(250px);overflow-y:auto;background:#222;transition:all .4s ease 0s}.sidebar-nav{position:absolute;top:0;width:250px;margin:0;padding:0;list-style:none}.sidebar-nav li{text-indent:20px;line-height:40px}.sidebar-nav li a{display:block;text-decoration:none;color:#999}.sidebar-nav li a:hover{text-decoration:none;color:#fff;background:hsla(0,0%,100%,.2)}.sidebar-nav li a:active,.sidebar-nav li a:focus{text-decoration:none}.sidebar-nav>.sidebar-brand{height:55px;font-size:18px;line-height:55px}.sidebar-nav>.sidebar-brand a{color:#999}.sidebar-nav>.sidebar-brand a:hover{color:#fff;background:none}#menu-toggle{z-index:1;position:fixed;top:0;right:0}#sidebar-wrapper.active{right:250px;width:250px;transition:all .4s ease 0s}.toggle{margin:5px 5px 0 0}.header{display:table;position:relative;width:100vw;height:100%;background:#4e2a8e;background:linear-gradient(90deg,#4e2a8e,#60b5cc);background-size:cover;color:#fff}.header .buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .github-stars{margin-top:5px;margin-left:30px;display:inline-block}.header .navigation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute;top:10px;left:0;right:0}.header .navigation ul{margin:0;padding:0;list-style-type:none;text-align:center}.header .navigation ul li{display:inline-block;text-align:center;padding:10px 0;margin:0 30px}.header .navigation ul li a{color:#fff;font-size:20px;text-decoration:none}.header .navigation ul li a:hover{padding-bottom:4px;border-bottom:3px solid #fff}.about{text-align:center}.about img{width:90%;height:auto;margin:0 auto;box-shadow:0 2px 7px 0 rgba(11,45,90,.12);border-radius:5px}.about figcaption{color:#4e5153;display:block;font-size:1.6rem;line-height:3.5rem;text-align:center;margin:1.5rem 0 5rem}.head{text-align:center}.head h1{color:#5669aa;margin:25px auto 75px}.editor .row.full{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.editor .row.full>figure [class*=col-]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.editor figure{margin-bottom:25px}.editor figure>.card{height:100%;border-radius:5px!important}footer{padding:75px 0}.CodeMirror-gutters{background-color:#282c34;border-color:#282c34}.cm-s-one-dark .CodeMirror,.cm-s-one-dark .CodeMirror-scroll{font-family:"Inconsolata, Monaco, Consolas, ",Courier New,\, Courier;font-weight:300;font-size:13px;background-color:#282c34;color:#abb2bf}.cm-s-one-dark div.CodeMirror-selected{background:rgba(204,217,255,.05)}.cm-s-one-dark .CodeMirror-focused div.CodeMirror-selected{background:rgba(204,217,255,.09)}.cm-s-one-dark .CodeMirror-lines{padding:4px 0}.cm-s-one-dark .CodeMirror pre{padding:0 4px}.cm-s-one-dark .CodeMirror-gutter,.cm-s-one-dark .CodeMirror .CodeMirror-gutters{white-space:nowrap;border:none;background-color:transparent}.cm-s-one-dark .CodeMirror-linenumber{padding:0 15px 0 0;min-width:20px;text-align:right;white-space:nowrap;color:#5c6370}.cm-s-one-dark .CodeMirror-foldmarker{line-height:.3;cursor:pointer;color:#abb2bf;background:rgba(204,217,255,.05)}.cm-s-one-dark .CodeMirror-foldgutter{width:15px;border:none}.cm-s-one-dark .CodeMirror-foldgutter-folded,.cm-s-one-dark .CodeMirror-foldgutter-open{cursor:pointer}.cm-s-one-dark .CodeMirror-foldgutter-open:after{content:"\25BE";color:#393e46}.cm-s-one-dark .CodeMirror-activeline .CodeMirror-foldgutter-open:after,.cm-s-one-dark .CodeMirror.over-gutter{color:#5c6370}.cm-s-one-dark .CodeMirror-foldgutter-folded:after{content:"\25B8";color:#5c6370}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#ccc}.cm-s-one-dark .CodeMirror-cursor{border-left:2px solid #528bff!important}.cm-s-one-dark .CodeMirror-overwrite .CodeMirror-cursor{border-left:none!important;border-bottom:1px solid #fff}.cm-s-one-dark .CodeMirror-matchingbracket,.cm-s-one-dark .CodeMirror-matchingtag{background-color:rgba(204,217,255,.09);color:#abb2bf!important;border-bottom:1px solid #528bff}.cm-s-one-dark .cm-header{color:#e06c75}.cm-s-one-dark .cm-quote{color:#5c6370;font-style:italic}.cm-s-one-dark .cm-negative,.cm-s-one-dark .cm-positive{color:#e06c75}.cm-s-one-dark .cm-header .cm-strong,.cm-s-one-dark .cm-strong{color:#d19a66;font-weight:700}.cm-s-one-dark .cm-em,.cm-s-one-dark .cm-header .cm-em{color:#c678dd;font-style:italic}.cm-s-one-dark .cm-tag{color:#e06c75}.cm-s-one-dark .cm-attribute{color:#d19a66}.cm-s-one-dark .cm-link{color:#98c379;border-bottom:1px solid #98c379}.cm-s-one-dark .cm-builtin{color:#babbbf}.cm-s-one-dark .cm-keyword{color:#3bbcc3}.cm-s-one-dark .cm-def{color:#e5c07b}.cm-s-one-dark .cm-atom,.cm-s-one-dark .cm-number{color:#d19a66}.cm-s-one-dark .cm-property{color:#61afef}.cm-s-one-dark .cm-qualifier{color:#d19a66}.cm-s-one-dark .cm-variable{color:#babbbf}.cm-s-one-dark .cm-variable-2{color:#abb2bf}.cm-s-one-dark .cm-variable-3{color:#e5c07b}.cm-s-one-dark .cm-string{color:#fe8451}.cm-s-one-dark .cm-string-2{color:#98c379}.cm-s-one-dark .cm-bracket,.cm-s-one-dark .cm-meta,.cm-s-one-dark .cm-operator,.cm-s-one-dark .cm-punctuation{color:#abb2bf}.cm-s-one-dark .cm-comment{color:#5c6370;font-style:italic} \ No newline at end of file diff --git a/docs/static/js/main.e1c8fc29.js b/docs/static/js/main.e1c8fc29.js deleted file mode 100644 index 98b2708..0000000 --- a/docs/static/js/main.e1c8fc29.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n={};r.m=t,r.c=n,r.i=function(t){return t},r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=2)}([function(t,r){(function(){"use strict";function r(t){function r(r){return function(n){return t(r,n)}}return r.arity=2,r.func=t,r}function n(t){function r(r){return function(n){return function(e){return t(r,n,e)}}}return r.arity=3,r.func=t,r}function e(t){function r(r){return function(n){return function(e){return function(o){return t(r,n,e,o)}}}}return r.arity=4,r.func=t,r}function o(t){function r(r){return function(n){return function(e){return function(o){return function(c){return t(r,n,e,o,c)}}}}}return r.arity=5,r.func=t,r}function c(t){function r(r){return function(n){return function(e){return function(o){return function(c){return function(u){return t(r,n,e,o,c,u)}}}}}}return r.arity=6,r.func=t,r}function u(t){function r(r){return function(n){return function(e){return function(o){return function(c){return function(u){return function(i){return t(r,n,e,o,c,u,i)}}}}}}}return r.arity=7,r.func=t,r}function i(t){function r(r){return function(n){return function(e){return function(o){return function(c){return function(u){return function(i){return function(_){return t(r,n,e,o,c,u,i,_)}}}}}}}}return r.arity=8,r.func=t,r}function _(t){function r(r){return function(n){return function(e){return function(o){return function(c){return function(u){return function(i){return function(_){return function(a){return t(r,n,e,o,c,u,i,_,a)}}}}}}}}}return r.arity=9,r.func=t,r}function a(t,r,n){return 2===t.arity?t.func(r,n):t(r)(n)}function l(t,r,n,e){return 3===t.arity?t.func(r,n,e):t(r)(n)(e)}function f(t,r,n,e,o){return 4===t.arity?t.func(r,n,e,o):t(r)(n)(e)(o)}function s(t,r,n,e,o,c){return 5===t.arity?t.func(r,n,e,o,c):t(r)(n)(e)(o)(c)}function d(t,r,n,e,o,c,u){return 6===t.arity?t.func(r,n,e,o,c,u):t(r)(n)(e)(o)(c)(u)}var p=function(){function t(t){var r,n=!1;return function(e){return n||(r=t(e),n=!0),r}}return{memoize:t}}(),h=function(){function t(t,r){return t/r|0}function e(t,r){return t%r}function o(t,r){if(0===r)throw new Error("Cannot perform mod 0. Division by zero error.");var n=t%r,e=0===t?0:r>0?t>=0?n:n+r:-o(-t,-r);return e===r?0:e}function c(t,r){return Math.log(r)/Math.log(t)}function u(t){return-t}function i(t){return t<0?-t:t}function _(t,r){return v.cmp(t,r)<0?t:r}function a(t,r){return v.cmp(t,r)>0?t:r}function l(t,r,n){return v.cmp(n,t)<0?t:v.cmp(n,r)>0?r:n}function f(t,r){return{ctor:k[v.cmp(t,r)+1]}}function s(t,r){return t!==r}function d(t){return!t}function p(t){return t===1/0||t===-1/0}function h(t){return 0|t}function g(t){return t*Math.PI/180}function m(t){return 2*Math.PI*t}function b(t){var r=t._0,n=t._1;return v.Tuple2(r*Math.cos(n),r*Math.sin(n))}function y(t){var r=t._0,n=t._1;return v.Tuple2(Math.sqrt(r*r+n*n),Math.atan2(n,r))}var k=["LT","EQ","GT"];return{div:r(t),rem:r(e),mod:r(o),pi:Math.PI,e:Math.E,cos:Math.cos,sin:Math.sin,tan:Math.tan,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:r(Math.atan2),degrees:g,turns:m,fromPolar:b,toPolar:y,sqrt:Math.sqrt,logBase:r(c),negate:u,abs:i,min:r(_),max:r(a),clamp:n(l),compare:r(f),xor:r(s),not:d,truncate:h,ceiling:Math.ceil,floor:Math.floor,round:Math.round,toFloat:function(t){return t},isNaN:isNaN,isInfinite:p}}(),v=function(){function t(t,r){for(var e,o=[],c=n(t,r,0,o);c&&(e=o.pop());)c=n(e.x,e.y,0,o);return c}function n(t,r,e,o){if(e>100)return o.push({x:t,y:r}),!0;if(t===r)return!0;if("object"!=typeof t){if("function"==typeof t)throw new Error('Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense. Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#== which describes why it is this way and what the better version will look like.');return!1}if(null===t||null===r)return!1;if(t instanceof Date)return t.getTime()===r.getTime();if(!("ctor"in t)){for(var c in t)if(!n(t[c],r[c],e+1,o))return!1;return!0}if("RBNode_elm_builtin"!==t.ctor&&"RBEmpty_elm_builtin"!==t.ctor||(t=ln(t),r=ln(r)),"Set_elm_builtin"===t.ctor&&(t=Ie(t),r=Ie(r)),"::"===t.ctor){for(var u=t,i=r;"::"===u.ctor&&"::"===i.ctor;){if(!n(u._0,i._0,e+1,o))return!1;u=u._1,i=i._1}return u.ctor===i.ctor}if("_Array"===t.ctor){var _=Fu.toJSArray(t),a=Fu.toJSArray(r);if(_.length!==a.length)return!1;for(var l=0;l<_.length;l++)if(!n(_[l],a[l],e+1,o))return!1;return!0}if(!n(t.ctor,r.ctor,e+1,o))return!1;for(var c in t)if(!n(t[c],r[c],e+1,o))return!1;return!0}function e(t,r){if("object"!=typeof t)return t===r?v:t=1){if((c=e(t._0,r._0))!==v)return c;if(u>=2){if((c=e(t._1,r._1))!==v)return c;if(u>=3){if((c=e(t._2,r._2))!==v)return c;if(u>=4){if((c=e(t._3,r._3))!==v)return c;if(u>=5){if((c=e(t._4,r._4))!==v)return c;if(u>=6){if((c=e(t._5,r._5))!==v)return c;if(u>=7)throw new Error("Comparison error: cannot compare tuples with more than 6 elements.")}}}}}}return v}throw new Error("Comparison error: comparison is only defined on ints, floats, times, chars, strings, lists of comparable values, and tuples of comparable values.")}function o(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}function c(t){return new String(t)}function u(t){return b++}function i(t,r){var n={};for(var e in t)n[e]=t[e];for(var e in r)n[e]=r[e];return n}function _(t,r){return{ctor:"::",_0:t,_1:r}}function a(t,r){if("string"==typeof t)return t+r;if("[]"===t.ctor)return r;var n=_(t._0,y),e=n;for(t=t._1;"[]"!==t.ctor;)e._1=_(t._0,y),t=t._1,e=e._1;return e._1=r,n}function l(t,r){return function(n){throw new Error("Ran into a `Debug.crash` in module `"+t+"` "+s(r)+"\nThe message provided by the code author is:\n\n "+n)}}function f(t,r,n){return function(e){throw new Error("Ran into a `Debug.crash` in module `"+t+"`\n\nThis was caused by the `case` expression "+s(r)+".\nOne of the branches ended with a crash and the following value got through:\n\n "+d(n)+"\n\nThe message provided by the code author is:\n\n "+e)}}function s(t){return t.start.line==t.end.line?"on line "+t.start.line:"between lines "+t.start.line+" and "+t.end.line}function d(t){var r=typeof t;if("function"===r)return"";if("boolean"===r)return t?"True":"False";if("number"===r)return t+"";if(t instanceof String)return"'"+p(t,!0)+"'";if("string"===r)return'"'+p(t,!1)+'"';if(null===t)return"null";if("object"===r&&"ctor"in t){var n=t.ctor.substring(0,5);if("_Tupl"===n){var e=[];for(var o in t)"ctor"!==o&&e.push(d(t[o]));return"("+e.join(",")+")"}if("_Task"===n)return"";if("_Array"===t.ctor)return"Array.fromList "+d(Du(t));if(""===t.ctor)return"";if("_Process"===t.ctor)return"";if("::"===t.ctor){var e="["+d(t._0);for(t=t._1;"::"===t.ctor;)e+=","+d(t._0),t=t._1;return e+"]"}if("[]"===t.ctor)return"[]";if("Set_elm_builtin"===t.ctor)return"Set.fromList "+d(Ie(t));if("RBNode_elm_builtin"===t.ctor||"RBEmpty_elm_builtin"===t.ctor)return"Dict.fromList "+d(ln(t));var e="";for(var c in t)if("ctor"!==c){var u=d(t[c]),i=u[0],_="{"===i||"("===i||"<"===i||'"'===i||u.indexOf(" ")<0;e+=" "+(_?u:"("+u+")")}return t.ctor+e}if("object"===r){if(t instanceof Date)return"<"+t.toString()+">";if(t.elm_web_socket)return"";var e=[];for(var o in t)e.push(o+" = "+d(t[o]));return 0===e.length?"{}":"{ "+e.join(", ")+" }"}return""}function p(t,r){var n=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return r?n.replace(/\'/g,"\\'"):n.replace(/\"/g,'\\"')}var h=-1,v=0,g=1,m={ctor:"_Tuple0"},b=0,y={ctor:"[]"};return{eq:t,cmp:e,Tuple0:m,Tuple2:o,chr:c,update:i,guid:u,append:r(a),crash:l,crashCase:f,toString:d}}(),g=r(function(t,r){var n=r;return a(t,n._0,n._1)}),m=(n(function(t,r,n){return t({ctor:"_Tuple2",_0:r,_1:n})}),n(function(t,r,n){return a(t,n,r)})),b=r(function(t,r){return t}),y=function(t){return t},k=k||{};k["<|"]=r(function(t,r){return t(r)});var k=k||{};k["|>"]=r(function(t,r){return r(t)});var k=k||{};k[">>"]=n(function(t,r,n){return r(t(n))});var k=k||{};k["<<"]=n(function(t,r,n){return t(r(n))});var k=k||{};k["++"]=v.append;var T=v.toString,w=(h.isInfinite,h.isNaN,h.toFloat),k=(h.ceiling,h.floor,h.truncate,h.round,h.not,h.xor,k||{});k["||"]=h.or;var k=k||{};k["&&"]=h.and;var x=(h.max,h.min,h.compare),k=k||{};k[">="]=h.ge;var k=k||{};k["<="]=h.le;var k=k||{};k[">"]=h.gt;var k=k||{};k["<"]=h.lt;var k=k||{};k["/="]=h.neq;var k=k||{};k["=="]=h.eq;var E=(h.e,h.pi,h.clamp,h.logBase,h.abs,h.negate),k=(h.sqrt,h.atan2,h.atan,h.asin,h.acos,h.tan,h.sin,h.cos,k||{});k["^"]=h.exp;var k=k||{};k["%"]=h.mod;var k=(h.rem,k||{});k["//"]=h.div;var k=k||{};k["/"]=h.floatDiv;var k=k||{};k["*"]=h.mul;var k=k||{};k["-"]=h.sub;var k=k||{};k["+"]=h.add;var B=(h.toPolar,h.fromPolar,h.turns,h.degrees,function(){function t(t,r){var n=t+": "+v.toString(r),e=e||{};return e.stdout?e.stdout.write(n):console.log(n),r}function n(t){throw new Error(t)}return{crash:n,log:r(t)}}()),C=(B.crash,B.log),N=r(function(t,r){var n=r;return"Just"===n.ctor?n._0:t}),R={ctor:"Nothing"},A=r(function(t,r){var n=r;return"Just"===n.ctor?t(n._0):R}),S=function(t){return{ctor:"Just",_0:t}},$=r(function(t,r){var n=r;return"Just"===n.ctor?S(t(n._0)):R}),L=n(function(t,r,n){var e={ctor:"_Tuple2",_0:r,_1:n};return"_Tuple2"===e.ctor&&"Just"===e._0.ctor&&"Just"===e._1.ctor?S(a(t,e._0._0,e._1._0)):R}),O=(e(function(t,r,n,e){var o={ctor:"_Tuple3",_0:r,_1:n,_2:e};return"_Tuple3"===o.ctor&&"Just"===o._0.ctor&&"Just"===o._1.ctor&&"Just"===o._2.ctor?S(l(t,o._0._0,o._1._0,o._2._0)):R}),o(function(t,r,n,e,o){var c={ctor:"_Tuple4",_0:r,_1:n,_2:e,_3:o};return"_Tuple4"===c.ctor&&"Just"===c._0.ctor&&"Just"===c._1.ctor&&"Just"===c._2.ctor&&"Just"===c._3.ctor?S(f(t,c._0._0,c._1._0,c._2._0,c._3._0)):R}),c(function(t,r,n,e,o,c){var u={ctor:"_Tuple5",_0:r,_1:n,_2:e,_3:o,_4:c};return"_Tuple5"===u.ctor&&"Just"===u._0.ctor&&"Just"===u._1.ctor&&"Just"===u._2.ctor&&"Just"===u._3.ctor&&"Just"===u._4.ctor?S(s(t,u._0._0,u._1._0,u._2._0,u._3._0,u._4._0)):R}),function(){function t(t,r){return{ctor:"::",_0:t,_1:r}}function u(r){for(var n=y,e=r.length;e--;)n=t(r[e],n);return n}function i(t){for(var r=[];"[]"!==t.ctor;)r.push(t._0),t=t._1;return r}function _(t,r,n){for(var e=i(n),o=r,c=e.length;c--;)o=a(t,e[c],o);return o}function d(t,r,n){for(var e=[];"[]"!==r.ctor&&"[]"!==n.ctor;)e.push(a(t,r._0,n._0)),r=r._1,n=n._1;return u(e)}function p(t,r,n,e){for(var o=[];"[]"!==r.ctor&&"[]"!==n.ctor&&"[]"!==e.ctor;)o.push(l(t,r._0,n._0,e._0)),r=r._1,n=n._1,e=e._1;return u(o)}function h(t,r,n,e,o){for(var c=[];"[]"!==r.ctor&&"[]"!==n.ctor&&"[]"!==e.ctor&&"[]"!==o.ctor;)c.push(f(t,r._0,n._0,e._0,o._0)),r=r._1,n=n._1,e=e._1,o=o._1;return u(c)}function g(t,r,n,e,o,c){for(var i=[];"[]"!==r.ctor&&"[]"!==n.ctor&&"[]"!==e.ctor&&"[]"!==o.ctor&&"[]"!==c.ctor;)i.push(s(t,r._0,n._0,e._0,o._0,c._0)),r=r._1,n=n._1,e=e._1,o=o._1,c=c._1;return u(i)}function m(t,r){return u(i(r).sort(function(r,n){return v.cmp(t(r),t(n))}))}function b(t,r){return u(i(r).sort(function(r,n){var e=t(r)(n).ctor;return"EQ"===e?0:"LT"===e?-1:1}))}var y={ctor:"[]"};return{Nil:y,Cons:t,cons:r(t),toArray:i,fromArray:u,foldr:n(_),map2:n(d),map3:e(p),map4:o(h),map5:c(g),sortBy:r(m),sortWith:r(b)}}()),I=O.sortWith,z=(O.sortBy,function(t){return{ctor:"::",_0:t,_1:{ctor:"[]"}}}),q=r(function(t,r){for(;;){if(v.cmp(t,0)<1)return r;var n=r;if("[]"===n.ctor)return r;var e=t-1,o=n._1;t=e,r=o}}),M=O.map5,F=O.map4,D=O.map3,P=O.map2,J=r(function(t,r){for(;;){var n=r;if("[]"===n.ctor)return!1;if(t(n._0))return!0;var e=t,o=n._1;t=e,r=o}}),j=r(function(t,r){return!a(J,function(r){return!t(r)},r)}),V=O.foldr,U=n(function(t,r,n){for(;;){var e=n;if("[]"===e.ctor)return r;var o=t,c=a(t,e._0,r),u=e._1;t=o,r=c,n=u}}),W=function(t){return l(U,r(function(t,r){return r+1}),0,t)},H=r(function(t,r){return a(J,function(r){return v.eq(r,t)},r)}),Q=function(t){var r=t;return"::"===r.ctor?S(r._1):R},K=function(t){var r=t;return"::"===r.ctor?S(r._0):R},X=X||{};X["::"]=O.cons;var G=r(function(t,n){return l(V,r(function(r,n){return{ctor:"::",_0:t(r),_1:n}}),{ctor:"[]"},n)}),Y=r(function(t,n){var e=r(function(r,n){return t(r)?{ctor:"::",_0:r,_1:n}:n});return l(V,e,{ctor:"[]"},n)}),Z=n(function(t,r,n){var e=t(r);return"Just"===e.ctor?{ctor:"::",_0:e._0,_1:n}:n}),tt=r(function(t,r){return l(V,Z(t),{ctor:"[]"},r)}),rt=function(t){return l(U,r(function(t,r){return{ctor:"::",_0:t,_1:r}}),{ctor:"[]"},t)},nt=n(function(t,n,e){var o=r(function(r,n){var e=n;return"::"===e.ctor?{ctor:"::",_0:a(t,r,e._0),_1:n}:{ctor:"[]"}});return rt(l(U,o,{ctor:"::",_0:n,_1:{ctor:"[]"}},e))}),et=r(function(t,n){return"[]"===n.ctor?t:l(V,r(function(t,r){return{ctor:"::",_0:t,_1:r}}),n,t)}),ot=function(t){return l(V,et,{ctor:"[]"},t)},ct=r(function(t,r){return ot(a(G,t,r))}),ut=(r(function(t,n){var e=r(function(r,n){var e=n,o=e._0,c=e._1;return t(r)?{ctor:"_Tuple2",_0:{ctor:"::",_0:r,_1:o},_1:c}:{ctor:"_Tuple2",_0:o,_1:{ctor:"::",_0:r,_1:c}}});return l(V,e,{ctor:"_Tuple2",_0:{ctor:"[]"},_1:{ctor:"[]"}},n)}),r(function(t,n){var e=n;if("[]"===e.ctor)return{ctor:"[]"};var o=r(function(r,n){return{ctor:"::",_0:t,_1:{ctor:"::",_0:r,_1:n}}}),c=l(V,o,{ctor:"[]"},e._1);return{ctor:"::",_0:e._0,_1:c}}),n(function(t,r,n){for(;;){if(v.cmp(t,0)<1)return n;var e=r;if("[]"===e.ctor)return n;var o=t-1,c=e._1,u={ctor:"::",_0:e._0,_1:n};t=o,r=c,n=u}})),it=r(function(t,r){return rt(l(ut,t,r,{ctor:"[]"}))}),_t=n(function(t,r,n){if(v.cmp(r,0)<1)return{ctor:"[]"};var e={ctor:"_Tuple2",_0:r,_1:n};t:do{r:do{if("_Tuple2"!==e.ctor)break t;if("[]"===e._1.ctor)return n;if("::"!==e._1._1.ctor){if(1===e._0)break r;break t}switch(e._0){case 1:break r;case 2:return{ctor:"::",_0:e._1._0,_1:{ctor:"::",_0:e._1._1._0,_1:{ctor:"[]"}}};case 3:if("::"===e._1._1._1.ctor)return{ctor:"::",_0:e._1._0,_1:{ctor:"::",_0:e._1._1._0,_1:{ctor:"::",_0:e._1._1._1._0,_1:{ctor:"[]"}}}};break t;default:if("::"===e._1._1._1.ctor&&"::"===e._1._1._1._1.ctor){var o=e._1._1._1._0,c=e._1._1._0,u=e._1._0,i=e._1._1._1._1._0,_=e._1._1._1._1._1;return v.cmp(t,1e3)>0?{ctor:"::",_0:u,_1:{ctor:"::",_0:c,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:i,_1:a(it,r-4,_)}}}}:{ctor:"::",_0:u,_1:{ctor:"::",_0:c,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:i,_1:l(_t,t+1,r-4,_)}}}}}break t}}while(!1);return{ctor:"::",_0:e._1._0,_1:{ctor:"[]"}}}while(!1);return n}),at=r(function(t,r){return l(_t,0,t,r)}),lt=n(function(t,r,n){for(;;){if(v.cmp(r,0)<1)return t;var e={ctor:"::",_0:n,_1:t},o=r-1,c=n;t=e,r=o,n=c}}),ft=r(function(t,r){return l(lt,{ctor:"[]"},t,r)}),st=n(function(t,r,n){for(;;){if(!(v.cmp(t,r)<1))return n;var e=t,o=r-1,c={ctor:"::",_0:r,_1:n};t=e,r=o,n=c}}),dt=r(function(t,r){return l(st,t,r,{ctor:"[]"})}),pt=r(function(t,r){return l(P,t,a(dt,0,W(r)-1),r)}),ht=r(function(t,r){var n=r;return"Ok"===n.ctor?n._0:t}),vt=function(t){return{ctor:"Err",_0:t}},gt=(r(function(t,r){var n=r;return"Ok"===n.ctor?t(n._0):vt(n._0)}),function(t){return{ctor:"Ok",_0:t}}),mt=r(function(t,r){var n=r;return"Ok"===n.ctor?gt(t(n._0)):vt(n._0)}),bt=(n(function(t,r,n){var e={ctor:"_Tuple2",_0:r,_1:n};return"Ok"===e._0.ctor?"Ok"===e._1.ctor?gt(a(t,e._0._0,e._1._0)):vt(e._1._0):vt(e._0._0)}),e(function(t,r,n,e){var o={ctor:"_Tuple3",_0:r,_1:n,_2:e};return"Ok"===o._0.ctor?"Ok"===o._1.ctor?"Ok"===o._2.ctor?gt(l(t,o._0._0,o._1._0,o._2._0)):vt(o._2._0):vt(o._1._0):vt(o._0._0)}),o(function(t,r,n,e,o){var c={ctor:"_Tuple4",_0:r,_1:n,_2:e,_3:o};return"Ok"===c._0.ctor?"Ok"===c._1.ctor?"Ok"===c._2.ctor?"Ok"===c._3.ctor?gt(f(t,c._0._0,c._1._0,c._2._0,c._3._0)):vt(c._3._0):vt(c._2._0):vt(c._1._0):vt(c._0._0)}),c(function(t,r,n,e,o,c){var u={ctor:"_Tuple5",_0:r,_1:n,_2:e,_3:o,_4:c};return"Ok"===u._0.ctor?"Ok"===u._1.ctor?"Ok"===u._2.ctor?"Ok"===u._3.ctor?"Ok"===u._4.ctor?gt(s(t,u._0._0,u._1._0,u._2._0,u._3._0,u._4._0)):vt(u._4._0):vt(u._3._0):vt(u._2._0):vt(u._1._0):vt(u._0._0)}),r(function(t,r){var n=r;return"Ok"===n.ctor?gt(n._0):vt(t(n._0))})),yt=(r(function(t,r){var n=r;return"Just"===n.ctor?gt(n._0):vt(t)}),function(){function t(t){return 0===t.length}function e(t,r){return t+r}function o(t){var r=t[0];return r?S(v.Tuple2(v.chr(r),t.slice(1))):R}function c(t,r){return t+r}function u(t){return O.toArray(t).join("")}function i(t){return t.length}function _(t,r){for(var n=r.split(""),e=n.length;e--;)n[e]=t(v.chr(n[e]));return n.join("")}function l(t,r){return r.split("").map(v.chr).filter(t).join("")}function f(t){return t.split("").reverse().join("")}function s(t,r,n){for(var e=n.length,o=0;o0;)1&t&&(n+=r),t>>=1,r+=r;return n}function m(t,r,n){return n.slice(t,r)}function b(t,r){return t<1?"":r.slice(0,t)}function y(t,r){return t<1?"":r.slice(-t)}function k(t,r){return t<1?r:r.slice(t)}function T(t,r){return t<1?r:r.slice(0,-t)}function w(t,r,n){var e=(t-n.length)/2;return g(Math.ceil(e),r)+n+g(0|e,r)}function x(t,r,n){return n+g(t-n.length,r)}function E(t,r,n){return g(t-n.length,r)+n}function B(t){return t.trim()}function C(t){return t.replace(/^\s+/,"")}function N(t){return t.replace(/\s+$/,"")}function A(t){return O.fromArray(t.trim().split(/\s+/g))}function $(t){return O.fromArray(t.split(/\r\n|\r|\n/g))}function L(t){return t.toUpperCase()}function I(t){return t.toLowerCase()}function z(t,r){for(var n=r.length;n--;)if(t(v.chr(r[n])))return!0;return!1}function q(t,r){for(var n=r.length;n--;)if(!t(v.chr(r[n])))return!1;return!0}function M(t,r){return r.indexOf(t)>-1}function F(t,r){return 0===r.indexOf(t)}function D(t,r){return r.length>=t.length&&r.lastIndexOf(t)===r.length-t.length}function P(t,r){var n=t.length;if(n<1)return O.Nil;for(var e=0,o=[];(e=r.indexOf(t,e))>-1;)o.push(e),e+=n;return O.fromArray(o)}function J(t){var r=t.length;if(0===r)return j(t);var n=t[0];if("0"===n&&"x"===t[1]){for(var e=2;e"9"||n<"0"&&"-"!==n&&"+"!==n)return j(t);for(var e=1;e-1&&v.cmp(e,wt(r))<1})),Et=a(xt,v.chr("A"),v.chr("Z")),Bt=a(xt,v.chr("a"),v.chr("z")),Ct=a(xt,v.chr("0"),v.chr("9")),Nt=a(xt,v.chr("0"),v.chr("7")),Rt=function(t){return Ct(t)||l(xt,v.chr("a"),v.chr("f"),t)||l(xt,v.chr("A"),v.chr("F"),t)},At=yt.fromList,St=yt.toList,$t=yt.toFloat,Lt=yt.toInt,Ot=(yt.indexes,yt.indexes,yt.endsWith,yt.startsWith),It=yt.contains,zt=(yt.all,yt.any,yt.toLower),qt=yt.toUpper,Mt=yt.lines,Ft=(yt.words,yt.trimRight),Dt=(yt.trimLeft,yt.trim),Pt=(yt.padRight,yt.padLeft,yt.pad,yt.dropRight,yt.dropLeft),Jt=(yt.right,yt.left,yt.slice),jt=yt.repeat,Vt=yt.join,Ut=yt.split,Wt=(yt.foldr,yt.foldl,yt.reverse,yt.filter),Ht=(yt.map,yt.length),Qt=yt.concat,Kt=(yt.append,yt.uncons),Xt=yt.cons,Gt=function(t){return a(Xt,t,"")},Yt=yt.isEmpty,Zt=r(function(t,r){var n=r;return{ctor:"_Tuple2",_0:n._0,_1:t(n._1)}}),tr=r(function(t,r){var n=r;return{ctor:"_Tuple2",_0:t(n._0),_1:n._1}}),rr=function(t){return t._1},nr=function(t){return t._0},er=function(){function t(t){return function(r){return function(r,n){r.worker=function(r){if(void 0!==r)throw new Error("The `"+n+"` module does not need flags.\nCall "+n+".worker() with no arguments and you should be all set!");return u(t.init,t.update,t.subscriptions,o)}}}}function e(t){return function(r){return function(n,e){n.worker=function(n){if(void 0===r)throw new Error("Are you trying to sneak a Never value into Elm? Trickster!\nIt looks like "+e+".main is defined with `programWithFlags` but has type `Program Never`.\nUse `program` instead if you do not want flags.");var c=a(Ju.run,r,n);if("Err"===c.ctor)throw new Error(e+".worker(...) was called with an unexpected argument.\nI tried to convert it to an Elm value, but ran into this problem:\n\n"+c._0);return u(t.init(c._0),t.update,t.subscriptions,o)}}}}function o(t,r){return function(t){}}function c(t){var n=g(O.Nil),e=v.Tuple2(v.Tuple0,n);return Ku({init:e,view:function(t){return main},update:r(function(t,r){return e}),subscriptions:function(t){return n}})}function u(t,r,n,e){function o(t,e){return or.nativeBinding(function(o){var c=a(r,t,e);e=c._0,u(e);var i=c._1,l=n(e);b(_,i,l),o(or.succeed(e))})}function c(t){or.rawSend(f,t)}var u,_={},l=or.nativeBinding(function(r){var o=t._0;u=e(c,o);var i=t._1,a=n(o);b(_,i,a),r(or.succeed(o))}),f=p(l,o),s=i(_,c);return s?{ports:s}:{}}function i(t,r){var n;for(var e in N){var o=N[e];o.isForeign&&(n=n||{},n[e]="cmd"===o.tag?E(e):C(e,r)),t[e]=_(o,r)}return n}function _(t,r){function n(t,r){if("self"===t.ctor)return l(u,e,t._0,r);var n=t._0;switch(o){case"cmd":return l(c,e,n.cmds,r);case"sub":return l(c,e,n.subs,r);case"fx":return f(c,e,n.cmds,n.subs,r)}}var e={main:r,self:void 0},o=t.tag,c=t.onEffects,u=t.onSelfMsg,i=p(t.init,n);return e.self=i,i}function s(t,r){return or.nativeBinding(function(n){t.main(r),n(or.succeed(v.Tuple0))})}function d(t,r){return a(or.send,t.self,{ctor:"self",_0:r})}function p(t,r){function n(t){var o=or.receive(function(n){return r(n,t)});return a(e,n,o)}var e=or.andThen,o=a(e,n,t);return or.rawSpawn(o)}function h(t){return function(r){return{type:"leaf",home:t,value:r}}}function g(t){return{type:"node",branches:t}}function m(t,r){return{type:"map",tagger:t,tree:r}}function b(t,r,n){var e={};y(!0,r,e,null),y(!1,n,e,null);for(var o in t){var c=o in e?e[o]:{cmds:O.Nil,subs:O.Nil};or.rawSend(t[o],{ctor:"fx",_0:c})}}function y(t,r,n,e){switch(r.type){case"leaf":var o=r.home,c=k(t,o,e,r.value);return void(n[o]=T(t,c,n[o]));case"node":for(var u=r.branches;"[]"!==u.ctor;)y(t,u._0,n,e),u=u._1;return;case"map":return void y(t,r.tree,n,{tagger:r.tagger,rest:e})}}function k(t,r,n,e){function o(t){for(var r=n;r;)t=r.tagger(t),r=r.rest;return t}return a(t?N[r].cmdMap:N[r].subMap,o,e)}function T(t,r,n){return n=n||{cmds:O.Nil,subs:O.Nil},t?(n.cmds=O.Cons(r,n.cmds),n):(n.subs=O.Cons(r,n.subs),n)}function w(t){if(t in N)throw new Error("There can only be one port named `"+t+"`, but your program has multiple.")}function x(t,r){return w(t),N[t]={tag:"cmd",cmdMap:R,converter:r,isForeign:!0},h(t)}function E(t){function r(t,r,n){for(;"[]"!==r.ctor;){for(var e=c,o=u(r._0),_=0;_=0&&c.splice(r,1)}var c=[],u=N[t].converter,i=or.succeed(null);return N[t].init=i,N[t].onEffects=n(r),{subscribe:e,unsubscribe:o}}function B(t,r){return w(t),N[t]={tag:"sub",subMap:A,converter:r,isForeign:!0},h(t)}function C(t,r){function e(t,r,n){for(var e=o(t,r,n),c=0;c0;){var f=e[a];l[--a]=void 0===f?R:S(f)}o.push({match:e[0],submatches:O.fromArray(l),index:e.index,number:c}),_=r.lastIndex}return r.lastIndex=i,O.fromArray(o)}function _(t,r,n,e){function o(r){if(c++>=t)return r;for(var e=arguments.length-3,o=new Array(e);e>0;){var u=arguments[e];o[--e]=void 0===u?R:S(u)}return n({match:r,submatches:O.fromArray(o),index:arguments[arguments.length-2],number:c})}t="All"===t.ctor?1/0:t._0;var c=0;return e.replace(r,o)}function a(t,r,n){if((t="All"===t.ctor?1/0:t._0)===1/0)return O.fromArray(n.split(r));for(var e,o=n,c=[],u=r.lastIndex,i=r.lastIndex;t--&&(e=r.exec(o));)c.push(o.slice(u,e.index)),u=r.lastIndex;return c.push(o.slice(u)),r.lastIndex=i,O.fromArray(c)}return{regex:c,caseInsensitive:o,escape:t,contains:r(u),find:n(i),replace:e(_),split:n(a)}}()),pr=dr.split,hr=dr.replace,vr=dr.find,gr=dr.contains,mr=(dr.caseInsensitive,dr.regex),br=(dr.escape,e(function(t,r,n,e){return{match:t,submatches:r,index:n,number:e}}),function(t){return{ctor:"AtMost",_0:t}}),yr={ctor:"All"},kr=function(t){var r=t;return"Parser"===r.ctor?r._0:lr(r._0)},Tr=n(function(t,r,n){return{data:t,input:r,position:n}}),wr=function(t){return l(Tr,t,t,0)},xr=n(function(t,r,n){var e=l(kr,t,r,wr(n));return"Ok"===e._2.ctor?gt({ctor:"_Tuple3",_0:e._0,_1:e._1,_2:e._2._0}):vt({ctor:"_Tuple3",_0:e._0,_1:e._1,_2:e._2._0})}),Er=function(t){return a(xr,t,{ctor:"_Tuple0"})},Br=(n(function(t,r,n){return{source:t,line:r,column:n}}),function(t){return{ctor:"RecursiveParser",_0:t}}),Cr=function(t){return Br(sr(function(r){return kr(t({ctor:"_Tuple0"}))}))},Nr=function(t){return{ctor:"Parser",_0:t}},Rr=Nr,Ar=n(function(t,n,e){return Nr(r(function(r,o){var c=l(kr,e,r,o);return"Ok"===c._2.ctor?{ctor:"_Tuple3",_0:c._0,_1:c._1,_2:gt(t(c._2._0))}:{ctor:"_Tuple3",_0:c._0,_1:c._1,_2:vt(n(c._2._0))}}))}),Sr=r(function(t,r){return l(Ar,t,y,r)}),$r=$r||{};$r["<$>"]=Sr;var $r=$r||{};$r["<$"]=function(t){return Sr(b(t))};var $r=$r||{};$r["$>"]=m(r(function(t,r){return a($r["<$"],t,r)}));var Lr=Ar(y),$r=$r||{};$r[""]=r(function(t,r){return a(Lr,b({ctor:"::",_0:r,_1:{ctor:"[]"}}),t)});var Or=r(function(t,n){return Nr(r(function(r,e){var o=l(kr,n,r,e);return"Ok"===o._2.ctor?l(kr,t(o._2._0),o._0,o._1):{ctor:"_Tuple3",_0:o._0,_1:o._1,_2:vt(o._2._0)}}))}),$r=$r||{};$r[">>="]=m(Or);var Ir=r(function(t,r){return a($r[">>="],r,a(m,Sr,t))}),$r=$r||{};$r["<*>"]=m(Ir);var $r=$r||{};$r["<*"]=r(function(t,r){return a(Ir,r,a(Sr,b,t))});var $r=$r||{};$r["*>"]=r(function(t,r){return a(Ir,r,a(Sr,m(b),t))});var zr=n(function(t,r,n){return a($r["<*"],a($r["*>"],t,n),r)}),qr=function(t){var n=e(function(t,r,n,e){for(;;){var o=r;if("[]"===o.ctor)return{ctor:"_Tuple3",_0:n,_1:e,_2:gt(rt(t))};var c=l(kr,o._0,n,e);if("Ok"!==c._2.ctor)return{ctor:"_Tuple3",_0:c._0,_1:c._1,_2:vt(c._2._0)};var u={ctor:"::",_0:c._2._0,_1:t},i=o._1,_=c._0,a=c._1;t=u,r=i,n=_,e=a}});return Nr(r(function(r,e){return f(n,{ctor:"[]"},t,r,e)}))},Mr=function(t){return Nr(r(function(r,n){return{ctor:"_Tuple3",_0:r,_1:n,_2:vt({ctor:"::",_0:t,_1:{ctor:"[]"}})}}))},Fr=Nr(r(function(t,r){return{ctor:"_Tuple3",_0:t,_1:r,_2:vt({ctor:"[]"})}})),Dr=function(t){return Nr(r(function(r,n){return{ctor:"_Tuple3",_0:r,_1:n,_2:gt(t)}}))},Pr=(r(function(t,n){var e=r(function(t,r){return v.cmp(t,0)<1?Dr(rt(r)):a(Or,function(n){return a(e,t-1,{ctor:"::",_0:n,_1:r})},n)});return a(e,t,{ctor:"[]"})}),function(t){return Nr(r(function(r,n){if(a(Ot,t,n.input)){var e=Ht(t),o=a(Pt,e,n.input),c=n.position+e;return{ctor:"_Tuple3",_0:r,_1:v.update(n,{input:o,position:c}),_2:gt(t)}}return{ctor:"_Tuple3",_0:r,_1:n,_2:vt({ctor:"::",_0:a(k["++"],"expected ",T(t)),_1:{ctor:"[]"}})}}))}),Jr=a(zr,Pr("("),Pr(")")),jr=a(zr,Pr("{"),Pr("}")),Vr=a(zr,Pr("["),Pr("]")),Ur=function(t){var n=a(Ot,"^",t)?t:a(k["++"],"^",t);return Nr(r(function(t,r){var e=l(vr,br(1),mr(n),r.input);if("::"===e.ctor&&"[]"===e._1.ctor){var o=e._0,c=Ht(o.match),u=a(Pt,c,r.input),i=r.position+c;return{ctor:"_Tuple3",_0:t,_1:v.update(r,{input:u,position:i}),_2:gt(o.match)}}return{ctor:"_Tuple3",_0:t,_1:r,_2:vt({ctor:"::",_0:a(k["++"],"expected input matching Regexp /",a(k["++"],n,"/")),_1:{ctor:"[]"}})}}))},Wr=a($r[""],Ur("[ \t\r\n]*"),"whitespace"),Hr=(a($r[""],Ur("[ \t\r\n]+"),"whitespace"),Nr(r(function(t,r){return v.eq(r.input,"")?{ctor:"_Tuple3",_0:t,_1:r,_2:gt({ctor:"_Tuple0"})}:{ctor:"_Tuple3",_0:t,_1:r,_2:vt({ctor:"::",_0:"expected end of input",_1:{ctor:"[]"}})}}))),Qr=function(t){return Nr(r(function(r,n){var e=l(kr,t,r,n);return"_Tuple3"===e.ctor&&"Ok"===e._2.ctor?{ctor:"_Tuple3",_0:e._0,_1:n,_2:gt(e._2._0)}:e}))},Kr=r(function(t,n){return Nr(r(function(r,e){var o=l(kr,t,r,e);if("Ok"===o._2.ctor)return o;var c=l(kr,n,r,e);return"Ok"===c._2.ctor?c:{ctor:"_Tuple3",_0:r,_1:e,_2:vt(a(k["++"],o._2._0,c._2._0))}}))}),Xr=function(t){return l(V,Kr,Fr,t)},$r=$r||{};$r["<|>"]=Kr;var Gr=r(function(t,r){return a($r["<|>"],r,Dr(t))}),Yr=r(function(t,r){var n=function(e){return a($r["<|>"],a(Or,function(t){return a(Or,function(r){return n(a(t,e,r))},r)},t),Dr(e))};return a(Or,n,r)}),Zr=r(function(t,r){var n=function(e){return a($r["<|>"],a(Or,function(t){return a(Or,function(r){return Dr(a(t,e,r))},a(Or,n,r))},t),Dr(e))};return a(Or,n,r)}),tn=function(t){return Nr(r(function(r,n){var e=l(kr,t,r,n);return"_Tuple3"===e.ctor&&"Ok"===e._2.ctor?{ctor:"_Tuple3",_0:e._0,_1:e._1,_2:gt(S(e._2._0))}:{ctor:"_Tuple3",_0:r,_1:n,_2:gt(R)}}))},rn=function(t){var e=n(function(r,n,e){for(;;){var o=l(kr,t,n,e);if("_Tuple3"!==o.ctor||"Ok"!==o._2.ctor)return{ctor:"_Tuple3",_0:n,_1:e,_2:rt(r)};var c=o._1,u=o._0;if(v.eq(e,c))return{ctor:"_Tuple3",_0:u,_1:c,_2:rt(r)};var i={ctor:"::",_0:o._2._0,_1:r},_=u,a=c;r=i,n=_,e=a}});return Nr(r(function(t,r){var n=l(e,{ctor:"[]"},t,r),o=n._0,c=n._1,u=n._2;return{ctor:"_Tuple3",_0:o,_1:c,_2:gt(u)}}))},nn=function(t){return a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"::",_0:t,_1:r}}),t),rn(t))},en=r(function(t,n){return a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"::",_0:t,_1:r}}),n),rn(a($r["*>"],t,n)))}),on=r(function(t,r){return a($r["<|>"],a(en,t,r),Dr({ctor:"[]"}))}),cn=r(function(t,r){return a($r["<*"],a(en,t,r),tn(t))}),un=(r(function(t,r){return a($r["<|>"],a(cn,t,r),Dr({ctor:"[]"}))}),r(function(t,r){var e=n(function(n,e,o){for(;;){var c=l(kr,r,e,o);if("Ok"===c._2.ctor)return{ctor:"_Tuple3",_0:c._0,_1:c._1,_2:gt(rt(n))};var u=l(kr,t,e,o);if("_Tuple3"!==u.ctor||"Ok"!==u._2.ctor)return{ctor:"_Tuple3",_0:c._0,_1:c._1,_2:vt(c._2._0)};var i={ctor:"::",_0:u._2._0,_1:n},_=u._0,a=u._1;n=i,e=_,o=a}});return Nr(e({ctor:"[]"}))})),_n=n(function(t,r,n){for(;;){var e=n;if("RBEmpty_elm_builtin"===e.ctor)return r;var o=t,c=l(t,e._1,e._2,l(_n,t,r,e._4)),u=e._3;t=o,r=c,n=u}}),an=function(t){return l(_n,n(function(t,r,n){return{ctor:"::",_0:t,_1:n}}),{ctor:"[]"},t)},ln=function(t){return l(_n,n(function(t,r,n){return{ctor:"::",_0:{ctor:"_Tuple2",_0:t,_1:r},_1:n}}),{ctor:"[]"},t)},fn=n(function(t,r,n){for(;;){var e=n;if("RBEmpty_elm_builtin"===e.ctor)return r;var o=t,c=l(t,e._1,e._2,l(fn,t,r,e._3)),u=e._4;t=o,r=c,n=u}}),sn=c(function(t,e,o,c,u,i){var _=n(function(r,n,c){for(;;){var u=c,i=u._1,_=u._0,a=_;if("[]"===a.ctor)return{ctor:"_Tuple2",_0:_,_1:l(o,r,n,i)};var s=a._1,d=a._0._1,p=a._0._0;if(!(v.cmp(p,r)<0))return v.cmp(p,r)>0?{ctor:"_Tuple2",_0:_,_1:l(o,r,n,i)}:{ctor:"_Tuple2",_0:s,_1:f(e,p,d,n,i)};var h=r,g=n,m={ctor:"_Tuple2",_0:s,_1:l(t,p,d,i)};r=h,n=g,c=m}}),a=l(fn,_,{ctor:"_Tuple2",_0:ln(c),_1:i},u),s=a._0,d=a._1;return l(U,r(function(r,n){var e=r;return l(t,e._0,e._1,n)}),d,s)}),dn=e(function(t,r,n,e){return B.crash(Qt({ctor:"::",_0:"Internal red-black tree invariant violated, expected ",_1:{ctor:"::",_0:t,_1:{ctor:"::",_0:" and got ",_1:{ctor:"::",_0:T(r),_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:n,_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:e,_1:{ctor:"::",_0:"\nPlease report this bug to ",_1:{ctor:"[]"}}}}}}}}}}))}),pn=function(t){var r=t;t:do{if("RBNode_elm_builtin"===r.ctor){if("BBlack"===r._0.ctor)return!0;break t}if("LBBlack"===r._0.ctor)return!0;break t}while(!1);return!1},hn=r(function(t,r){for(;;){var n=r;if("RBEmpty_elm_builtin"===n.ctor)return t;var e=a(hn,t+1,n._4),o=n._3;t=e,r=o}}),vn=r(function(t,r){t:for(;;){var n=r;if("RBEmpty_elm_builtin"===n.ctor)return R;var e=a(x,t,n._1);switch(e.ctor){case"LT":var o=t,c=n._3;t=o,r=c;continue t;case"EQ":return S(n._2);default:var u=t,i=n._4;t=u,r=i;continue t}}}),gn=r(function(t,r){return"Just"===a(vn,t,r).ctor}),mn=n(function(t,r,n){for(;;){var e=n;if("RBEmpty_elm_builtin"===e.ctor)return{ctor:"_Tuple2",_0:t,_1:r};var o=e._1,c=e._2,u=e._4;t=o,r=c,n=u}}),bn={ctor:"NBlack"},yn={ctor:"BBlack"},kn={ctor:"Black"},Tn=function(t){var r=t;if("RBNode_elm_builtin"===r.ctor){var n=r._0;return v.eq(n,kn)||v.eq(n,yn)}return!0},wn={ctor:"Red"},xn=function(t){switch(t.ctor){case"Black":return yn;case"Red":return kn;case"NBlack":return wn;default:return B.crash("Can't make a double black node more black!")}},En=function(t){switch(t.ctor){case"BBlack":return kn;case"Black":return wn;case"Red":return bn;default:return B.crash("Can't make a negative black node less black!")}},Bn={ctor:"LBBlack"},Cn={ctor:"LBlack"},Nn=function(t){return{ctor:"RBEmpty_elm_builtin",_0:t}},Rn=Nn(Cn),An=o(function(t,r,n,e,o){return{ctor:"RBNode_elm_builtin",_0:t,_1:r,_2:n,_3:e,_4:o}}),Sn=function(t){var r=t;return"RBNode_elm_builtin"===r.ctor&&"Red"===r._0.ctor?s(An,kn,r._1,r._2,r._3,r._4):t},$n=function(t){var r=t;return"RBNode_elm_builtin"===r.ctor?s(An,En(r._0),r._1,r._2,r._3,r._4):Nn(Cn)},Ln=function(t){return function(r){return function(n){return function(e){return function(o){return function(c){return function(u){return function(i){return function(_){return function(a){return function(l){return s(An,En(t),e,o,s(An,kn,r,n,i,_),s(An,kn,c,u,a,l))}}}}}}}}}}},On=function(t){var r=t;return"RBEmpty_elm_builtin"===r.ctor?Nn(Cn):s(An,kn,r._1,r._2,r._3,r._4)},In=function(t){var r=t;return"RBEmpty_elm_builtin"===r.ctor?B.crash("can't make a Leaf red"):s(An,wn,r._1,r._2,r._3,r._4)},zn=function(t){var r=t;t:do{r:do{n:do{e:do{o:do{c:do{u:do{if("RBNode_elm_builtin"!==r.ctor)break t;if("RBNode_elm_builtin"===r._3.ctor)if("RBNode_elm_builtin"===r._4.ctor)switch(r._3._0.ctor){case"Red":switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break u;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break e;break t;case"NBlack":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break u;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break n;break t;default:if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break u;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;break t}case"NBlack":switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break e;if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t;case"NBlack":if("BBlack"===r._0.ctor){if("RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break n;if("RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t}break t;default:if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t}default:switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break e;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break n;break t;default:break t}}else switch(r._3._0.ctor){case"Red":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break u;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t;default:break t}else{if("RBNode_elm_builtin"!==r._4.ctor)break t;switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break e;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break n;break t;default:break t}}}while(!1);return Ln(r._0)(r._3._3._1)(r._3._3._2)(r._3._1)(r._3._2)(r._1)(r._2)(r._3._3._3)(r._3._3._4)(r._3._4)(r._4)}while(!1);return Ln(r._0)(r._3._1)(r._3._2)(r._3._4._1)(r._3._4._2)(r._1)(r._2)(r._3._3)(r._3._4._3)(r._3._4._4)(r._4)}while(!1);return Ln(r._0)(r._1)(r._2)(r._4._3._1)(r._4._3._2)(r._4._1)(r._4._2)(r._3)(r._4._3._3)(r._4._3._4)(r._4._4)}while(!1);return Ln(r._0)(r._1)(r._2)(r._4._1)(r._4._2)(r._4._4._1)(r._4._4._2)(r._3)(r._4._3)(r._4._4._3)(r._4._4._4)}while(!1);return s(An,kn,r._4._3._1,r._4._3._2,s(An,kn,r._1,r._2,r._3,r._4._3._3),s(qn,kn,r._4._1,r._4._2,r._4._3._4,In(r._4._4)))}while(!1);return s(An,kn,r._3._4._1,r._3._4._2,s(qn,kn,r._3._1,r._3._2,In(r._3._3),r._3._4._3),s(An,kn,r._1,r._2,r._3._4._4,r._4))}while(!1);return t},qn=o(function(t,r,n,e,o){var c=s(An,t,r,n,e,o);return Tn(c)?zn(c):c}),Mn=o(function(t,r,n,e,o){return pn(e)||pn(o)?s(qn,xn(t),r,n,$n(e),$n(o)):s(An,t,r,n,e,o)}),Fn=o(function(t,r,n,e,o){var c=o;return"RBEmpty_elm_builtin"===c.ctor?l(Dn,t,e,o):s(Mn,t,r,n,e,s(Fn,c._0,c._1,c._2,c._3,c._4))}),Dn=n(function(t,r,n){var e={ctor:"_Tuple2",_0:r,_1:n};if("RBEmpty_elm_builtin"!==e._0.ctor){if("RBEmpty_elm_builtin"===e._1.ctor){var o=e._1._0,c=e._0._0,u={ctor:"_Tuple3",_0:t,_1:c,_2:o};return"_Tuple3"===u.ctor&&"Black"===u._0.ctor&&"Red"===u._1.ctor&&"LBlack"===u._2.ctor?s(An,kn,e._0._1,e._0._2,e._0._3,e._0._4):f(dn,"Black/Red/LBlack",t,T(c),T(o))}var i=e._0._2,_=e._0._4,a=e._0._1,d=s(Fn,e._0._0,a,i,e._0._3,_),p=l(mn,a,i,_),h=p._0,v=p._1;return s(Mn,t,h,v,d,n)}if("RBEmpty_elm_builtin"!==e._1.ctor){var g=e._1._0,m=e._0._0,b={ctor:"_Tuple3",_0:t,_1:m,_2:g};return"_Tuple3"===b.ctor&&"Black"===b._0.ctor&&"LBlack"===b._1.ctor&&"Red"===b._2.ctor?s(An,kn,e._1._1,e._1._2,e._1._3,e._1._4):f(dn,"Black/LBlack/Red",t,T(m),T(g))}switch(t.ctor){case"Red":return Nn(Cn);case"Black":return Nn(Bn);default:return B.crash("cannot have bblack or nblack nodes at this point")}}),Pn=r(function(t,r){var n=r;if("RBEmpty_elm_builtin"===n.ctor)return Nn(Cn);var e=n._1;return s(An,n._0,e,a(t,e,n._2),a(Pn,t,n._3),a(Pn,t,n._4))}),Jn={ctor:"Same"},jn={ctor:"Remove"},Vn={ctor:"Insert"},Un=n(function(t,r,n){var e=function(n){var o=n;if("RBEmpty_elm_builtin"===o.ctor){var c=r(R);return"Nothing"===c.ctor?{ctor:"_Tuple2",_0:Jn,_1:Rn}:{ctor:"_Tuple2",_0:Vn,_1:s(An,wn,t,c._0,Rn,Rn)}}var u=o._2,i=o._4,_=o._3,f=o._1,d=o._0;switch(a(x,t,f).ctor){case"EQ":var p=r(S(u));return"Nothing"===p.ctor?{ctor:"_Tuple2",_0:jn,_1:l(Dn,d,_,i)}:{ctor:"_Tuple2",_0:Jn,_1:s(An,d,f,p._0,_,i)};case"LT":var h=e(_),v=h._0,g=h._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:Jn,_1:s(An,d,f,u,g,i)};case"Insert":return{ctor:"_Tuple2",_0:Vn,_1:s(qn,d,f,u,g,i)};default:return{ctor:"_Tuple2",_0:jn,_1:s(Mn,d,f,u,g,i)}}default:var m=e(i),v=m._0,b=m._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:Jn,_1:s(An,d,f,u,_,b)};case"Insert":return{ctor:"_Tuple2",_0:Vn,_1:s(qn,d,f,u,_,b)};default:return{ctor:"_Tuple2",_0:jn,_1:s(Mn,d,f,u,_,b)}}}},o=e(n),c=o._0,u=o._1;switch(c.ctor){case"Same":return u;case"Insert":return Sn(u);default:return On(u)}}),Wn=n(function(t,r,n){return l(Un,t,b(S(r)),n)}),Hn=r(function(t,r){return l(Wn,t,r,Rn)}),Qn=r(function(t,r){return l(fn,Wn,r,t)}),Kn=r(function(t,r){var e=n(function(r,n,e){return a(t,r,n)?l(Wn,r,n,e):e});return l(fn,e,Rn,r)}),Xn=r(function(t,n){return a(Kn,r(function(t,r){return a(gn,t,n)}),t)}),Gn=r(function(t,r){var e=n(function(r,n,e){var o=e,c=o._1,u=o._0;return a(t,r,n)?{ctor:"_Tuple2",_0:l(Wn,r,n,u),_1:c}:{ctor:"_Tuple2",_0:u,_1:l(Wn,r,n,c)}});return l(fn,e,{ctor:"_Tuple2",_0:Rn,_1:Rn},r)}),Yn=function(t){return l(U,r(function(t,r){var n=t;return l(Wn,n._0,n._1,r)}),Rn,t)},Zn=r(function(t,r){return l(Un,t,b(R),r)}),te=r(function(t,r){return l(fn,n(function(t,r,n){return a(Zn,t,n)}),t,r)}),re=a($r["<$"],v.chr("\n"),a($r[""],Ur("\r\n"),"expected crlf")),ne=function(t){return Rr(r(function(r,n){var e="could not satisfy predicate",o=Kt(n.input);if("Just"===o.ctor){var c=o._0._0;return t(c)?{ctor:"_Tuple3",_0:r,_1:v.update(n,{input:o._0._1,position:n.position+1}),_2:gt(c)}:{ctor:"_Tuple3",_0:r,_1:n,_2:vt({ctor:"::",_0:e,_1:{ctor:"[]"}})}}return{ctor:"_Tuple3",_0:r,_1:n,_2:vt({ctor:"::",_0:e,_1:{ctor:"[]"}})}}))},ee=a($r[""],ne(b(!0)),"expected any character"),oe=(a($r[""],ne(r(function(t,r){return v.eq(t,r)})(v.chr(" "))),"expected space"),a($r[""],ne(r(function(t,r){return v.eq(t,r)})(v.chr("\t"))),"expected tab"),a($r[""],ne(r(function(t,r){return v.eq(t,r)})(v.chr("\n"))),"expected newline")),ce=(a($r["<|>"],oe,re),a($r[""],ne(Bt),"expected a lowercase character")),ue=a($r[""],ne(Et),"expected an uppercase character"),ie=a($r[""],ne(Ct),"expected a digit"),_e=(a($r[""],ne(Nt),"expected an octal digit"),a($r[""],ne(Rt),"expected a hexadecimal digit"),Pr("()")),ae=function(t){return a($r["<*>"],a($r["<$>"],Xt,t),Ur("[a-zA-Z0-9-_]*"))},le=ae(ue),fe=Ur("[ \\t]+"),se=function(t){return a($r["<*"],Pr(t),fe)},de=Ur("[ \\t]*"),pe=function(t){return a(zr,t,t)},he=function(t){return a(pe,Wr,a($r["<*"],Pr(t),Ur("( |\\n)+")))},ve=function(t){return a(pe,Wr,Pr(t))},ge=function(t){return a(en,Pr(","),a(pe,Wr,t))},me=function(t){return a(on,Pr(","),a(pe,Wr,t))},be=a(pe,de,a(en,Pr("."),le)),ye={ctor:"::",_0:"=",_1:{ctor:"::",_0:".",_1:{ctor:"::",_0:"..",_1:{ctor:"::",_0:"->",_1:{ctor:"::",_0:"--",_1:{ctor:"::",_0:"|",_1:{ctor:"::",_0:":",_1:{ctor:"[]"}}}}}}}},ke=Cr(function(t){return a($r[">>="],Ur("[+\\-\\/*=.$<>:&|^?%#@~!]+|Šs\b"),function(t){return a(H,t,ye)?Mr(a(k["++"],"operator '",a(k["++"],t,"' is reserved"))):Dr(t)})}),Te={ctor:"::",_0:"module",_1:{ctor:"::",_0:"where",_1:{ctor:"::",_0:"import",_1:{ctor:"::",_0:"as",_1:{ctor:"::",_0:"exposing",_1:{ctor:"::",_0:"type",_1:{ctor:"::",_0:"alias",_1:{ctor:"::",_0:"port",_1:{ctor:"::",_0:"if",_1:{ctor:"::",_0:"then",_1:{ctor:"::",_0:"else",_1:{ctor:"::",_0:"let",_1:{ctor:"::",_0:"in",_1:{ctor:"::",_0:"case",_1:{ctor:"::",_0:"of",_1:{ctor:"[]"}}}}}}}}}}}}}}}},we=function(){var t=a($r[">>="],ae(ce),function(t){return a(H,t,Te)?Mr(a(k["++"],"name '",a(k["++"],t,"' is reserved"))):Dr(t)});return a($r["<|>"],Pr("_"),t)}(),xe=we,Ee={ctor:"R"},Be={ctor:"L"},Ce=l(Wn,"=",{ctor:"_Tuple2",_0:Ee,_1:0},l(Wn,"|>",{ctor:"_Tuple2",_0:Ee,_1:1},l(Wn,"<|",{ctor:"_Tuple2",_0:Ee,_1:1},l(Wn,">>",{ctor:"_Tuple2",_0:Be,_1:9},l(Wn,"<<",{ctor:"_Tuple2",_0:Be,_1:9},l(Wn,"^",{ctor:"_Tuple2",_0:Be,_1:8},l(Wn,"rem",{ctor:"_Tuple2",_0:Be,_1:7},l(Wn,"//",{ctor:"_Tuple2",_0:Be,_1:7},l(Wn,"%",{ctor:"_Tuple2",_0:Be,_1:7},l(Wn,"/",{ctor:"_Tuple2",_0:Be,_1:7},l(Wn,"*",{ctor:"_Tuple2",_0:Be,_1:7},l(Wn,"-",{ctor:"_Tuple2",_0:Be,_1:6},l(Wn,"+",{ctor:"_Tuple2",_0:Be,_1:6},l(Wn,"::",{ctor:"_Tuple2",_0:Ee,_1:5},l(Wn,"++",{ctor:"_Tuple2",_0:Ee,_1:5},l(Wn,"<=",{ctor:"_Tuple2",_0:Be,_1:4},l(Wn,">=",{ctor:"_Tuple2",_0:Be,_1:4},l(Wn,">",{ctor:"_Tuple2",_0:Be,_1:4},l(Wn,"<",{ctor:"_Tuple2",_0:Be,_1:4},l(Wn,"/=",{ctor:"_Tuple2",_0:Be,_1:4},l(Wn,"==",{ctor:"_Tuple2",_0:Be,_1:4},l(Wn,"&&",{ctor:"_Tuple2",_0:Be,_1:3},l(Wn,"||",{ctor:"_Tuple2",_0:Be,_1:2},Rn))))))))))))))))))))))),Ne={ctor:"N"},Re=(function(){var t=function(t){return wt(t)-wt(v.chr("0"))};a($r["<$>"],t,a($r[""],ie,"expected a digit"))}(),a(Gr,1,Xr({ctor:"::",_0:a($r["<$"],1,Pr("+")),_1:{ctor:"::",_0:a($r["<$"],-1,Pr("-")),_1:{ctor:"[]"}}}))),Ae=r(function(t,r){var n=t(r);return"Ok"===n.ctor?n._0:v.crashCase("Combine.Num",{start:{line:23,column:5},end:{line:28,column:83}},n)(a(k["++"],"impossible state in Combine.Num.unwrap: ",T(n._0)))}),Se=Ae(Lt),$e=a($r["<*>"],a($r["<$>"],r(function(t,r){return t*r}),Re),a($r[""],a($r["<$>"],Se,Ur("(0|[1-9][0-9]*)")),"expected an integer")),Le=Ae($t),Oe=a($r["<*>"],a($r["<$>"],function(t){return r(function(t,r){return t*r})(w(t))},Re),a($r[""],a($r["<$>"],Le,Ur("(0|[1-9][0-9]*)(\\.[0-9]+)")),"expected a float")),Ie=(n(function(t,r,e){var o=e;return l(_n,n(function(r,n,e){return a(t,r,e)}),r,o._0)}),n(function(t,r,e){var o=e;return l(fn,n(function(r,n,e){return a(t,r,e)}),r,o._0)}),function(t){return an(t._0)}),ze=r(function(t,r){return a(gn,t,r._0)}),qe=function(t){return{ctor:"Set_elm_builtin",_0:t}},Me=qe(Rn),Fe=r(function(t,r){return qe(l(Wn,t,{ctor:"_Tuple0"},r._0))}),De=function(t){return l(U,Fe,Me,t)},Pe=(r(function(t,r){return De(a(G,t,Ie(r)))}),r(function(t,r){return qe(a(Zn,t,r._0))}),r(function(t,r){var n=t,e=r;return qe(a(Qn,n._0,e._0))})),Je=(r(function(t,r){var n=t,e=r;return qe(a(Xn,n._0,e._0))}),r(function(t,r){var n=t,e=r;return qe(a(te,n._0,e._0))}),r(function(t,n){var e=n;return qe(a(Kn,r(function(r,n){return t(r)}),e._0))}),r(function(t,n){var e=n,o=a(Gn,r(function(r,n){return t(r)}),e._0),c=o._0,u=o._1;return{ctor:"_Tuple2",_0:qe(c),_1:qe(u)}}),n(function(t,r,n){var e=v.cmp(W(n),0)>0,o=v.cmp(t,0)>0&&v.cmp(r,0)>0,c=a(q,r,n),u=a(at,t,n);return o&&e?{ctor:"::",_0:u,_1:l(Je,t,r,c)}:{ctor:"[]"}})),je=(r(function(t,r){return l(Je,t,t,r)}),n(function(t,r,n){var e=v.cmp(t,0)>0&&v.cmp(r,0)>0,o=a(q,r,n),c=a(at,t,n),u=v.eq(t,W(c));return e&&u?{ctor:"::",_0:c,_1:l(je,t,r,o)}:{ctor:"[]"}})),Ve=(r(function(t,r){return l(je,t,t,r)}),M(o(function(t,r,n,e,o){return{ctor:"_Tuple5",_0:t,_1:r,_2:n,_3:e,_4:o}})),F(e(function(t,r,n,e){return{ctor:"_Tuple4",_0:t,_1:r,_2:n,_3:e}})),D(n(function(t,r,n){return{ctor:"_Tuple3",_0:t,_1:r,_2:n}})),P(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}})),r(function(t,r){var n={ctor:"_Tuple2",_0:t,_1:r};return"[]"===n._0.ctor||"[]"!==n._1.ctor&&v.eq(n._0._0,n._1._0)&&a(Ve,n._0._1,n._1._1)})),Ue=(r(function(t,r){return a(Ve,rt(t),rt(r))}),function(t){var r=t;if("[]"===r.ctor)return{ctor:"[]"};var n=r._1,e=r._0;return{ctor:"::",_0:{ctor:"_Tuple2",_0:e,_1:n},_1:a(G,function(t){var r=t;return{ctor:"_Tuple2",_0:r._0,_1:{ctor:"::",_0:e,_1:r._1}}},Ue(n))}}),We=r(function(t,r){var n=r;if("::"===n.ctor){var e=n._0;return{ctor:"::",_0:{ctor:"::",_0:t,_1:e},_1:{ctor:"::",_0:e,_1:n._1}}}return{ctor:"[]"}}),He=a(V,We,{ctor:"::",_0:{ctor:"[]"},_1:{ctor:"[]"}}),Qe=(r(function(t,r){return a(J,Ve(t),He(r))}),a(V,r(function(t,n){return{ctor:"::",_0:{ctor:"[]"},_1:a(G,r(function(t,r){return{ctor:"::",_0:t,_1:r}})(t),n)}}),{ctor:"::",_0:{ctor:"[]"},_1:{ctor:"[]"}}),r(function(t,r){var n=r;if("[]"===n.ctor)return{ctor:"[]"};if("[]"===n._1.ctor)return{ctor:"::",_0:{ctor:"::",_0:n._0,_1:{ctor:"[]"}},_1:{ctor:"[]"}};var e=n._0,o=a(Qe,t,n._1);return"::"===o.ctor?a(t,e,n._1._0)?{ctor:"::",_0:{ctor:"::",_0:e,_1:o._0},_1:o._1}:{ctor:"::",_0:{ctor:"::",_0:e,_1:{ctor:"[]"}},_1:o}:{ctor:"[]"}})),Ke=(r(function(t,n){var e=r(function(t,r){var n=r;return"Nothing"===n.ctor?R:"[]"===n._0.ctor?R:v.eq(t,n._0._0)?S(n._0._1):R});return l(U,e,S(n),t)}),r(function(t,r){return{ctor:"_Tuple2",_0:a(at,t,r),_1:a(q,t,r)}})),Xe=n(function(t,r,n){for(;;){var e={ctor:"_Tuple2",_0:t,_1:r};if("_Tuple2"!==e.ctor||"::"!==e._0.ctor||"::"!==e._1.ctor)return rt(n);var o=a(Ke,e._0._0,r),c=o._0,u=o._1,i=e._0._1,_=u,l={ctor:"::",_0:c,_1:n};t=i,r=_,n=l}}),Ge=(r(function(t,r){return l(Xe,t,r,{ctor:"[]"})}),r(function(t,r){var n=t(r);return"Nothing"===n.ctor?{ctor:"[]"}:{ctor:"::",_0:n._0._0,_1:a(Ge,t,n._0._1)}})),Ye=r(function(t,r){var n=r;if("[]"===n.ctor)return{ctor:"[]"};if("[]"===n._1.ctor)return{ctor:"::",_0:n._0,_1:{ctor:"[]"}};var e=a(Ye,t,n._1);return"::"===e.ctor?{ctor:"::",_0:a(t,n._0,e._0),_1:e}:{ctor:"[]"}}),Ze=n(function(t,r,n){var e=n;if("[]"===e.ctor)return{ctor:"::",_0:r,_1:{ctor:"[]"}};var o=l(Ze,t,r,e._1);return"::"===o.ctor?{ctor:"::",_0:a(t,e._0,o._0),_1:o}:{ctor:"[]"}}),to=(r(function(t,r){var n=r;return"[]"===n.ctor?{ctor:"[]"}:l(nt,t,n._0,n._1)}),n(function(t,n,e){var o=r(function(r,n){var e=n,o=e._0;return{ctor:"_Tuple2",_0:o-1,_1:l(t,o,r,e._1)}});return rr(l(V,o,{ctor:"_Tuple2",_0:W(e)-1,_1:n},e))}),n(function(t,n,e){var o=r(function(r,n){var e=n,o=e._0;return{ctor:"_Tuple2",_0:o+1,_1:l(t,o,r,e._1)}});return rr(l(U,o,{ctor:"_Tuple2",_0:0,_1:n},e))}),r(function(t,n){var e=r(function(r,n){return S(function(){var e=n;return"Nothing"===e.ctor?r:a(t,r,e._0)}())});return l(V,e,R,n)}),r(function(t,n){var e=r(function(r,n){return S(function(){var e=n;return"Nothing"===e.ctor?r:a(t,e._0,r)}())});return l(U,e,R,n)})),ro=n(function(t,r,n){t:for(;;){var e={ctor:"_Tuple2",_0:t,_1:r};r:do{if("::"===e._0.ctor){if("::"===e._1.ctor){var o=e._0._1,c=e._1._1,u=a(k["++"],n,{ctor:"::",_0:e._0._0,_1:{ctor:"::",_0:e._1._0,_1:{ctor:"[]"}}});t=o,r=c,n=u;continue t}break r}if("[]"===e._1.ctor)break r;return a(k["++"],n,e._1)}while(!1);return a(k["++"],n,e._0)}}),no=(r(function(t,r){return l(ro,t,r,{ctor:"[]"})}),function(t){var n=t;return"[]"===n.ctor?{ctor:"::",_0:{ctor:"[]"},_1:{ctor:"[]"}}:a(ct,function(t){var n=t;return a(G,r(function(t,r){return{ctor:"::",_0:t,_1:r}})(n._0),no(n._1))},Ue(n))}),eo=(r(function(t,r){return a(H,t,no(r))}),function(t){var n=t;if("[]"===n.ctor)return{ctor:"[]"};var e=n._0,o=r(function(t,r){return{ctor:"::",_0:t,_1:{ctor:"::",_0:{ctor:"::",_0:e,_1:t},_1:r}}});return{ctor:"::",_0:{ctor:"::",_0:e,_1:{ctor:"[]"}},_1:l(V,o,{ctor:"[]"},eo(n._1))}}),oo=function(t){return{ctor:"::",_0:{ctor:"[]"},_1:eo(t)}},co=(r(function(t,r){return a(H,t,oo(r))}),r(function(t,r){return a(Y,function(r){return!t(r)},r)}),r(function(t,r){if(v.cmp(t,0)<0)return r;var n=Q(a(q,t,r)),e=a(at,t,r),o=n;return"Nothing"===o.ctor?r:a(et,e,o._0)}),r(function(t,n){var e=r(function(r,n){var e=r,o=n,c=a(t,e._0,o._0);return"EQ"===c.ctor?a(x,e._1,o._1):c}),o=a(pt,r(function(t,r){return{ctor:"_Tuple2",_0:r,_1:t}}),n);return a(G,nr,a(I,e,o))}),n(function(t,r,n){if(v.cmp(t,0)<0)return R;var e=Q(a(q,t,n)),o=a(at,t,n),c=e;return"Nothing"===c.ctor?R:S(a(et,o,{ctor:"::",_0:r,_1:c._0}))}),r(function(t,r){var n=r;if("[]"===n.ctor)return{ctor:"[]"};var e=n._1,o=n._0;return v.eq(t,o)?e:{ctor:"::",_0:o,_1:a(co,t,e)}})),uo=n(function(t,n,e){return a(pt,r(function(r,e){return t(r)?n(e):e}),e)}),io=(n(function(t,n,e){return v.cmp(t,0)<0||v.cmp(t,W(e))>-1?R:S(l(uo,r(function(t,r){return v.eq(t,r)})(t),n,e))}),n(function(t,r,n){return a(G,function(n){return t(n)?r(n):n},n)})),_o=(n(function(t,r,n){return l(io,t,b(r),n)}),function(t){return function(n){return a(G,nr,a(Y,function(r){return t(r._1)},a(pt,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),n)))}}),ao=function(t){return function(r){return K(a(_o,t,r))}},lo=(r(function(t,r){return a($,function(t){return a(Ke,t,r)},a(ao,t,r))}),r(function(t,r){for(;;){var n=r;if("[]"===n.ctor)return R;var e=n._0;if(t(e))return S(e);var o=t,c=n._1;t=o,r=c}}),ct),fo=(n(function(t,r,n){return a(lo,function(r){return a(lo,function(n){return{ctor:"::",_0:a(t,r,n),_1:{ctor:"[]"}}},n)},r)}),e(function(t,r,n,e){return a(lo,function(r){return a(lo,function(n){return a(lo,function(e){return{ctor:"::",_0:l(t,r,n,e),_1:{ctor:"[]"}}},e)},n)},r)}),o(function(t,r,n,e,o){return a(lo,function(r){return a(lo,function(n){return a(lo,function(e){return a(lo,function(o){return{ctor:"::",_0:f(t,r,n,e,o),_1:{ctor:"[]"}}},o)},e)},n)},r)}),r(function(t,n){return l(P,r(function(t,r){return t(r)}),n,t)}),n(function(t,r,n){for(;;){var e=n;if("[]"===e.ctor)return{ctor:"[]"};var o=e._1,c=e._0,u=t(c);if(!a(ze,u,r))return{ctor:"::",_0:c,_1:l(fo,t,a(Fe,u,r),o)};var i=t,_=r,f=o;t=i,r=_,n=f}})),so=r(function(t,r){return l(fo,t,Me,r)}),po=(r(function(t,r){return v.eq(W(r),W(a(so,t,r)))}),r(function(t,r){for(;;){var n=r;if("[]"===n.ctor)return{ctor:"[]"};if(!t(n._0))return r;var e=t,o=n._1;t=e,r=o}})),ho=function(t){return r(function(r,n){for(;;){var e=n;if("[]"===e.ctor)return rt(r);var o=e._0;if(!t(o))return rt(r);var c={ctor:"::",_0:o,_1:r},u=e._1;r=c,n=u}})({ctor:"[]"})},vo=r(function(t,r){return{ctor:"_Tuple2",_0:a(ho,t,r),_1:a(po,t,r)}}),go=function(t){return vo(function(r){return!t(r)})},mo=r(function(t,r){var n=r;if("[]"===n.ctor)return{ctor:"[]"};var e=n._0,o=a(vo,t(e),n._1),c=o._0,u=o._1;return{ctor:"::",_0:{ctor:"::",_0:e,_1:c},_1:a(mo,t,u)}}),bo=(mo(r(function(t,r){return v.eq(t,r)})),r(function(t,n){var e=r(function(r,n){var e=n,o=e._1,c=t(r);return v.cmp(c,o)<0?{ctor:"_Tuple2",_0:r,_1:c}:{ctor:"_Tuple2",_0:e._0,_1:o}}),o=n;if("::"===o.ctor){if("[]"===o._1.ctor)return S(o._0);var c=o._0;return S(nr(l(U,e,{ctor:"_Tuple2",_0:c,_1:t(c)},o._1)))}return R}),r(function(t,n){var e=r(function(r,n){var e=n,o=e._1,c=t(r);return v.cmp(c,o)>0?{ctor:"_Tuple2",_0:r,_1:c}:{ctor:"_Tuple2",_0:e._0,_1:o}}),o=n;if("::"===o.ctor){if("[]"===o._1.ctor)return S(o._0);var c=o._0;return S(nr(l(U,e,{ctor:"_Tuple2",_0:c,_1:t(c)},o._1)))}return R}),function(t){var r=t;return"[]"===r.ctor?R:S({ctor:"_Tuple2",_0:r._0,_1:r._1})}),yo=(n(function(t,n,e){for(;;){if(v.eq(t,n))return S(e);if(!(v.cmp(t,n)>0)){if(v.cmp(t,0)<0)return R;var o=a(Ke,t,e),c=o._0,u=o._1,i=a(Ke,n-t,u),_=i._0,f=i._1;return l(L,r(function(t,r){var n=t,e=r;return ot({ctor:"::",_0:c,_1:{ctor:"::",_0:{ctor:"::",_0:e._0,_1:n._1},_1:{ctor:"::",_0:{ctor:"::",_0:n._0,_1:e._1},_1:{ctor:"[]"}}}})}),bo(_),bo(f))}var s=n,d=t,p=e;t=s,n=d,e=p}}),r(function(t,r){var n=t(r);return"Just"===n.ctor?{ctor:"::",_0:r,_1:a(yo,t,n._0)}:{ctor:"::",_0:r,_1:{ctor:"[]"}}})),ko=r(function(t,r){return v.cmp(t,0)<0?R:K(a(q,t,r))}),To=To||{};To["!!"]=m(ko);var wo,xo=(function(){var t=r(function(t,r){return function(n){return a(N,t,a($,r,n))}});a(V,function(n){return function(e){return S(l(t,{ctor:"[]"},r(function(t,r){return{ctor:"::",_0:t,_1:r}})(n),e))}},R)}(),to(m(b)),function(t){return At(v.cmp(t,0)<0?{ctor:"::",_0:v.chr("-"),_1:a(Eo,{ctor:"[]"},E(t))}:a(Eo,{ctor:"[]"},t))}),Eo=r(function(t,r){for(;;){if(v.cmp(r,16)<0)return{ctor:"::",_0:Bo(r),_1:t};var n={ctor:"::",_0:Bo(a(k["%"],r,16)),_1:t},e=r/16|0;t=n,r=e}}),Bo=function(t){var r=t;switch(r){case 0:return v.chr("0");case 1:return v.chr("1");case 2:return v.chr("2");case 3:return v.chr("3");case 4:return v.chr("4");case 5:return v.chr("5");case 6:return v.chr("6");case 7:return v.chr("7");case 8:return v.chr("8");case 9:return v.chr("9");case 10:return v.chr("a");case 11:return v.chr("b");case 12:return v.chr("c");case 13:return v.chr("d");case 14:return v.chr("e");case 15:return v.chr("f");default:return v.crashCase("Hex",{start:{line:138,column:5},end:{line:188,column:84}},r)(a(k["++"],"Tried to convert ",a(k["++"],xo(t)," to hexadecimal.")))}},Co=n(function(t,r,n){var e=r;if("[]"===e.ctor)return gt(n);var o=function(r){return l(Co,t-1,e._1,n+r*Math.pow(16,t))},c=e._0;switch(c.valueOf()){case"0":return o(0);case"1":return o(1);case"2":return o(2);case"3":return o(3);case"4":return o(4);case"5":return o(5);case"6":return o(6);case"7":return o(7);case"8":return o(8);case"9":return o(9);case"a":return o(10);case"b":return o(11);case"c":return o(12);case"d":return o(13);case"e":return o(14);case"f":return o(15);default:return vt(a(k["++"],T(c)," is not a valid hexadecimal character."))}}),No=function(t){if(Yt(t))return vt("Empty strings are not valid hexadecimal strings.");var r=function(r){return a(Vt," ",{ctor:"::",_0:T(t),_1:{ctor:"::",_0:"is not a valid hexadecimal string because",_1:{ctor:"::",_0:r,_1:{ctor:"[]"}}}})},n=function(){if(a(Ot,"-",t)){var r=a(N,{ctor:"[]"},Q(St(t)));return a(mt,E,l(Co,W(r)-1,r,0))}return l(Co,Ht(t)-1,St(t),0)}();return a(bt,r,n)},Ro=r(function(t,r){return a(N,{ctor:"_Tuple2",_0:Be,_1:9},a(vn,r,t))}),Ao=r(function(t,r){return nr(a(Ro,t,r))}),So=r(function(t,r){return rr(a(Ro,t,r))}),$o=n(function(t,r,n){var e=n;return v.eq(a(So,t,e._0),r)}),Lo=n(function(t,n,e){var o=a(Y,a($o,t,n),e),c=a(G,function(r){return a(Ao,t,nr(r))},o),u=function(t){var r=a(Vt," and ",a(G,nr,o));return a(k["++"],"conflicting ",a(k["++"],t,a(k["++"]," for operators ",r)))};if(a(j,r(function(t,r){return v.eq(t,r)})(Be),c))return Dr(Be);if(a(j,r(function(t,r){return v.eq(t,r)})(Ee),c))return Dr(Ee);if(a(j,r(function(t,r){return v.eq(t,r)})(Ne),c)){var i=c;return"::"===i.ctor&&"[]"===i._1.ctor?Dr(Ne):Mr(u("precedence"))}return Mr(u("associativity"))}),Oo=function(t){return Cr(function(r){return Xr({ctor:"::",_0:t,_1:{ctor:"::",_0:Dr({ctor:"[]"}),_1:{ctor:"[]"}}})})},Io=Cr(function(t){return a(pe,Wr,a($r["<|>"],ke,he("as")))}),zo=function(t){return"Just"===t.ctor?Mr(""):Dr("")},qo=function(t){return{ctor:"Stop",_0:t}},Mo=function(t){return{ctor:"Cont",_0:t}},Fo=n(function(t,r,n){return{ctor:"BinOp",_0:t,_1:r,_2:n}}),Do=r(function(t,r){return{ctor:"Application",_0:t,_1:r}}),Po=r(function(t,r){return{ctor:"Lambda",_0:t,_1:r}}),Jo=r(function(t,r){return{ctor:"Case",_0:t,_1:r}}),jo=r(function(t,r){return{ctor:"Let",_0:t,_1:r}}),Vo=n(function(t,r,n){return{ctor:"If",_0:t,_1:r,_2:n}}),Uo=r(function(t,r){return{ctor:"RecordUpdate",_0:t,_1:r}}),Wo=function(t){return{ctor:"Record",_0:t}},Ho=function(t){return{ctor:"AccessFunction",_0:t}},Qo=a($r["<$>"],Ho,a($r["*>"],Pr("."),we)),Ko=r(function(t,r){return{ctor:"Access",_0:t,_1:r}}),Xo=function(t){return{ctor:"Tuple",_0:t}},Go=function(t){return{ctor:"List",_0:t}},Yo=function(t){return{ctor:"Variable",_0:t}},Zo=a($r["<$>"],Yo,Xr({ctor:"::",_0:a($r["<$>"],z,we),_1:{ctor:"::",_0:a(en,Pr("."),le),_1:{ctor:"::",_0:a($r["<$>"],z,Jr(ke)),_1:{ctor:"::",_0:a($r["<$>"],z,Jr(Ur(",+"))),_1:{ctor:"::",_0:a($r["<$>"],z,_e),_1:{ctor:"[]"}}}}}})),tc=a($r["<*>"],a($r["<$>"],Ko,Zo),nn(a($r["*>"],Pr("."),we))),rc=Cr(function(t){return a($r["<$>"],Wo,jr(ge(a($r["<$>"],function(t){return{ctor:"_Tuple2",_0:t,_1:Yo({ctor:"::",_0:t,_1:{ctor:"[]"}})}},we))))}),nc=r(function(t,r){t:for(;;){var n={ctor:"_Tuple2",_0:t,_1:r};r:do{if("_Tuple2"===n.ctor&&"::"===n._0.ctor){if("[]"===n._0._1.ctor){if("[]"===n._1.ctor)return Dr(n._0._0);break r}if("::"===n._1.ctor){var e={ctor:"::",_0:l(Fo,Yo({ctor:"::",_0:n._1._0,_1:{ctor:"[]"}}),n._0._0,n._0._1._0),_1:n._0._1._1},o=n._1._1;t=e,r=o;continue t}break r}break r}while(!1);return Mr("")}}),ec=r(function(t,r){var n={ctor:"_Tuple2",_0:t,_1:r};t:do{if("_Tuple2"===n.ctor&&"::"===n._0.ctor){if("[]"===n._0._1.ctor){if("[]"===n._1.ctor)return Dr(n._0._0);break t}if("::"===n._1.ctor)return a(Or,function(t){return Dr(l(Fo,Yo({ctor:"::",_0:n._1._0,_1:{ctor:"[]"}}),n._0._0,t))},a(ec,{ctor:"::",_0:n._0._1._0,_1:n._0._1._1},n._1._1));break t}break t}while(!1);return Mr("")}),oc=e(function(t,r,n,e){return"[]"===e.ctor?Dr(n):a($r[">>="],l(Lo,t,r,e),function(o){return a($r[">>="],qr(f(cc,t,r,n,e)),function(n){var c=a(tt,function(n){return l($o,t,r,n)?S(nr(n)):R},e);return"R"===o.ctor?a(ec,n,c):a(nc,n,c)})})}),cc=e(function(t,r,n,e){var o=a(go,a($o,t,r),e);return"::"===o._1.ctor?{ctor:"::",_0:f(oc,t,r+1,n,o._0),_1:f(cc,t,r,o._1._0._1,o._1._1)}:{ctor:"::",_0:f(oc,t,r+1,n,o._0),_1:{ctor:"[]"}}}),uc=function(t){return{ctor:"Float",_0:t}},ic=a($r["<$>"],uc,Oe),_c=function(t){return{ctor:"Integer",_0:t}},ac=a($r["<$>"],_c,$e),lc=function(t){return{ctor:"String",_0:t}},fc=function(){var t=a($r["<$>"],function(t){return lc(Qt(t))},a($r["<*"],a($r["*>"],Pr('"""'),rn(Ur('[^"]*'))),Pr('"""'))),r=a($r["<$>"],lc,a($r["<*"],a($r["*>"],Pr('"'),Ur('(\\\\\\\\|\\\\"|[^"\n])*')),Pr('"')));return a($r["<|>"],t,r)}(),sc=function(t){return{ctor:"Character",_0:t}},dc=a($r["<$>"],sc,a(pe,Pr("'"),a($r["<|>"],a($r[">>="],a($r["*>"],Pr("\\"),Ur("(n|t|r|\\\\|x..)")),function(t){var r=Kt(t);t:do{if("Just"!==r.ctor)return Mr("No character");if("_Tuple2"!==r._0.ctor)break t;switch(r._0._0.valueOf()){case"n":if(""===r._0._1)return Dr(v.chr("\n"));break t;case"t":if(""===r._0._1)return Dr(v.chr("\t"));break t;case"r":if(""===r._0._1)return Dr(v.chr("\r"));break t;case"\\":if(""===r._0._1)return Dr(v.chr("\\"));break t;case"0":if(""===r._0._1)return Dr(v.chr("\0"));break t;case"x":return a(ht,Mr("Invalid charcode"),a(mt,Dr,a(mt,Tt,No(zt(r._0._1)))));default:break t}}while(!1);return Mr(a(k["++"],"No such character as \\",T(r._0)))}),ee))),pc=function(t){return Cr(function(r){return Xr({ctor:"::",_0:tc,_1:{ctor:"::",_0:Zo,_1:{ctor:"::",_0:Qo,_1:{ctor:"::",_0:fc,_1:{ctor:"::",_0:ic,_1:{ctor:"::",_0:ac,_1:{ctor:"::",_0:dc,_1:{ctor:"::",_0:Jr(a(pe,Wr,hc(t))),_1:{ctor:"::",_0:Bc(t),_1:{ctor:"::",_0:Rc(t),_1:{ctor:"::",_0:Nc(t),_1:{ctor:"::",_0:Cc(t),_1:{ctor:"::",_0:rc,_1:{ctor:"[]"}}}}}}}}}}}}}})})},hc=function(t){return Cr(function(r){return Xr({ctor:"::",_0:vc(t),_1:{ctor:"::",_0:Ec(t),_1:{ctor:"::",_0:Tc(t),_1:{ctor:"::",_0:wc(t),_1:{ctor:"::",_0:xc(t),_1:{ctor:"[]"}}}}}})})},vc=function(t){return Cr(function(n){var e=a($r[">>="],Io,function(n){return Cr(function(o){return a($r[">>="],a(Kr,a($r["<$>"],Mo,gc(t)),a($r["<$>"],qo,hc(t))),function(t){var o=t;return"Cont"===o.ctor?a($r["<$>"],r(function(t,r){return{ctor:"::",_0:t,_1:r}})({ctor:"_Tuple2",_0:n,_1:o._0}),Oo(e)):Dr({ctor:"::",_0:{ctor:"_Tuple2",_0:n,_1:o._0},_1:{ctor:"[]"}})})})});return a($r[">>="],gc(t),function(r){return a($r[">>="],Oo(e),function(n){return f(oc,t,0,r,n)})})})},gc=function(t){return Cr(function(r){return a(Yr,a($r["<$"],Do,mc(t)),pc(t))})},mc=function(t){return Cr(function(r){return a($r["<|>"],a($r["*>"],Ur("[ \\t]*\n[ \\t]+"),bc(t)),fe)})},bc=function(t){return Cr(function(r){return Qr(a($r[">>="],function(t){return tn(Xr(t))}({ctor:"::",_0:kc(t),_1:{ctor:"::",_0:yc(t),_1:{ctor:"[]"}}}),zo))})},yc=function(t){return Cr(function(n){return a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),a($r["*>"],Wr,hc(t))),a($r["*>"],ve("->"),hc(t)))})},kc=function(t){return Cr(function(n){return a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),a(pe,Wr,hc(t))),a($r["*>"],ve("="),hc(t)))})},Tc=function(t){return Cr(function(r){return a($r["<*>"],a($r["<$>"],Jo,a($r["*>"],ve("case"),hc(t))),a($r["*>"],ve("of"),nn(yc(t))))})},wc=function(t){return Cr(function(r){return a($r["<*>"],a($r["<*>"],a($r["<$>"],Vo,a($r["*>"],ve("if"),hc(t))),a($r["*>"],ve("then"),hc(t))),a($r["*>"],ve("else"),hc(t)))})},xc=function(t){return Cr(function(r){return a($r["<*>"],a($r["<$>"],Po,a($r["*>"],ve("\\"),rn(a(pe,de,pc(t))))),a($r["*>"],ve("->"),hc(t)))})},Ec=function(t){return Cr(function(r){return a($r["<*>"],a($r["<$>"],jo,a($r["*>"],he("let"),nn(kc(t)))),a($r["*>"],ve("in"),hc(t)))})},Bc=function(t){return Cr(function(r){return a($r["<$>"],Go,Vr(me(hc(t))))})},Cc=function(t){return Cr(function(n){return a($r["<$>"],Wo,jr(ge(a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),we),a($r["*>"],ve("="),hc(t))))))})},Nc=function(t){return Cr(function(n){return a($r["<*>"],a($r["<$>"],Uo,a($r["*>"],ve("{"),we)),a($r["<*"],a($r["*>"],ve("|"),ge(a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),we),a($r["*>"],ve("="),hc(t))))),ve("}")))})},Rc=function(t){return Cr(function(r){return a($r["<$>"],Xo,a($r[">>="],Jr(me(hc(t))),function(t){var r=t;return"::"===r.ctor&&"[]"===r._1.ctor?Mr("No single tuples"):Dr(r)}))})},Ac=r(function(t,r){return{ctor:"TypeExport",_0:t,_1:r}}),Sc=function(t){return{ctor:"FunctionExport",_0:t}},$c=a($r["<$>"],Sc,Xr({ctor:"::",_0:xe,_1:{ctor:"::",_0:Jr(ke),_1:{ctor:"[]"}}})),Lc=function(t){return{ctor:"SubsetExport",_0:t}},Oc=a($r["<$>"],Lc,ge(a($r["<$>"],Sc,le))),Ic={ctor:"AllExport"},zc=a($r["<$"],Ic,ve("..")),qc=tn(Jr(Xr({ctor:"::",_0:zc,_1:{ctor:"::",_0:Oc,_1:{ctor:"[]"}}}))),Mc=a($r["<*>"],a($r["<$>"],Ac,a($r["<*"],le,de)),qc),Fc=a($r["<$>"],Lc,ge(a(Kr,Mc,$c))),Dc=Jr(Xr({ctor:"::",_0:zc,_1:{ctor:"::",_0:Fc,_1:{ctor:"[]"}}})),Pc=r(function(t,r){return{ctor:"TypeApplication",_0:t,_1:r}}),Jc=a($r["<$"],Pc,ve("->")),jc=function(t){return{ctor:"TypeTuple",_0:t}},Vc=function(t){return{ctor:"TypeRecord",_0:t}},Uc=r(function(t,r){return{ctor:"TypeRecordConstructor",_0:t,_1:r}}),Wc=function(t){return{ctor:"TypeVariable",_0:t}},Hc=a($r["<$>"],Wc,Ur("[a-z]+(\\w|_)*")),Qc=r(function(t,r){return{ctor:"TypeConstructor",_0:t,_1:r}}),Kc=a($r["<*>"],a($r["<$>"],Qc,a(en,Pr("."),le)),Dr({ctor:"[]"})),Xc=Cr(function(t){return a($r["<*>"],a($r["<$>"],Qc,a(en,Pr("."),le)),rn(Gc))}),Gc=Cr(function(t){return a(pe,a(Kr,a($r["*>"],a($r["*>"],de,oe),fe),de),Xr({ctor:"::",_0:Hc,_1:{ctor:"::",_0:Kc,_1:{ctor:"::",_0:eu,_1:{ctor:"::",_0:tu,_1:{ctor:"::",_0:ou,_1:{ctor:"::",_0:Jr(Yc),_1:{ctor:"[]"}}}}}}}))}),Yc=Cr(function(t){return a(Zr,Jc,Zc)}),Zc=Cr(function(t){return a(pe,de,Xr({ctor:"::",_0:Xc,_1:{ctor:"::",_0:Hc,_1:{ctor:"::",_0:eu,_1:{ctor:"::",_0:tu,_1:{ctor:"::",_0:ou,_1:{ctor:"::",_0:Jr(Yc),_1:{ctor:"[]"}}}}}}}))}),tu=Cr(function(t){return jr(a($r["<$>"],Vc,ru))}),ru=Cr(function(t){return me(nu)}),nu=Cr(function(t){return a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),a($r["<*"],we,ve(":"))),Yc)}),eu=Cr(function(t){return jr(a($r["<*>"],a($r["<$>"],Uc,a(pe,de,Hc)),a($r["*>"],ve("|"),ru)))}),ou=Cr(function(t){return a($r["<$>"],jc,Jr(me(Zc)))}),cu=function(t){return{ctor:"Comment",_0:t}},uu=a($r["<$>"],cu,a($r["<*"],a($r["*>"],Pr("--"),Ur(".*")),Wr)),iu=a($r["<$>"],function(t){return cu(At(t))},a($r["*>"],Pr("{-"),a(un,ee,Pr("-}")))),_u=a($r["<|>"],uu,iu),au=n(function(t,r,n){return{ctor:"InfixDeclaration",_0:t,_1:r,_2:n}}),lu=a($r["<*>"],a($r["<*>"],a($r["<$>"],au,Xr({ctor:"::",_0:a($r["<$"],Be,se("infixl")),_1:{ctor:"::",_0:a($r["<$"],Ee,se("infixr")),_1:{ctor:"::",_0:a($r["<$"],Ne,se("infix")),_1:{ctor:"[]"}}}})),a($r["*>"],de,$e)),a($r["*>"],de,a($r["<|>"],we,ke))),fu=function(){var t=a($r["<*"],rn(a($r["<*"],Xr({ctor:"::",_0:a($r["<$>"],S,lu),_1:{ctor:"::",_0:a($r["<$"],R,Ur(".*")),_1:{ctor:"[]"}}}),Wr)),Hr);return a($r[">>="],t,function(t){return Dr(a(tt,y,t))})}(),su=function(t){var n=r(function(t,r){var n=t;return"InfixDeclaration"===n.ctor?l(Wn,n._2,{ctor:"_Tuple2",_0:n._0,_1:n._1},r):v.crashCase("Ast.Statement",{start:{line:414,column:13},end:{line:419,column:45}},n)("impossible")});return a($r[">>="],fu,function(r){return Dr(l(V,n,t,r))})},du=n(function(t,r,n){return{ctor:"FunctionDeclaration",_0:t,_1:r,_2:n}}),pu=function(t){return a($r["<*>"],a($r["<*>"],a($r["<$>"],du,Xr({ctor:"::",_0:we,_1:{ctor:"::",_0:Jr(ke),_1:{ctor:"[]"}}})),rn(a(pe,Wr,pc(t)))),a($r["*>"],a($r["*>"],ve("="),Wr),hc(t)))},hu=r(function(t,r){return{ctor:"FunctionTypeDeclaration",_0:t,_1:r}}),vu=a($r["<*>"],a($r["<$>"],hu,a($r["<*"],Xr({ctor:"::",_0:we,_1:{ctor:"::",_0:Jr(ke),_1:{ctor:"[]"}}}),ve(":"))),Yc),gu=n(function(t,r,n){return{ctor:"PortDeclaration",_0:t,_1:r,_2:n}}),mu=function(t){return a($r["<*>"],a($r["<*>"],a($r["<$>"],gu,a($r["*>"],se("port"),we)),rn(a(pe,de,we))),a($r["*>"],ve("="),hc(t)))},bu=r(function(t,r){return{ctor:"PortTypeDeclaration",_0:t,_1:r}}),yu=a($r["<*>"],a($r["<$>"],bu,a($r["*>"],se("port"),we)),a($r["*>"],ve(":"),Yc)),ku=r(function(t,r){return{ctor:"TypeDeclaration",_0:t,_1:r}}),Tu=a($r["<*>"],a($r["<$>"],ku,a($r["*>"],se("type"),Zc)),a($r["*>"],a($r["*>"],Wr,ve("=")),a(en,ve("|"),a(pe,Wr,Xc)))),wu=r(function(t,r){return{ctor:"TypeAliasDeclaration",_0:t,_1:r}}),xu=a($r["<*>"],a($r["<$>"],wu,a($r["*>"],a($r["*>"],se("type"),ve("alias")),Zc)),a($r["*>"],a($r["*>"],Wr,ve("=")),Yc)),Eu=n(function(t,r,n){return{ctor:"ImportStatement",_0:t,_1:r,_2:n}}),Bu=a($r["<*>"],a($r["<*>"],a($r["<$>"],Eu,a($r["*>"],se("import"),be)),tn(a($r["*>"],ve("as"),le))),tn(a($r["*>"],ve("exposing"),Dc))),Cu=n(function(t,r,n){return{ctor:"EffectModuleDeclaration",_0:t,_1:r,_2:n}}),Nu=a($r["<*>"],a($r["<*>"],a($r["<$>"],Cu,a($r["*>"],a($r["*>"],se("effect"),ve("module")),be)),a($r["*>"],ve("where"),jr(ge(a($r["<*>"],a($r["<$>"],r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),we),a($r["*>"],ve("="),le)))))),a($r["*>"],ve("exposing"),Dc)),Ru=r(function(t,r){return{ctor:"PortModuleDeclaration",_0:t,_1:r}}),Au=a($r["<*>"],a($r["<$>"],Ru,a($r["*>"],a($r["*>"],se("port"),ve("module")),be)),a($r["*>"],ve("exposing"),Dc)),Su=r(function(t,r){return{ctor:"ModuleDeclaration",_0:t,_1:r}}),$u=a($r["<*>"],a($r["<$>"],Su,a($r["*>"],se("module"),be)),a($r["*>"],ve("exposing"),Dc)),Lu=function(t){return Cr(function(r){return Xr({ctor:"::",_0:Au,_1:{ctor:"::",_0:Nu,_1:{ctor:"::",_0:$u,_1:{ctor:"::",_0:Bu,_1:{ctor:"::",_0:xu,_1:{ctor:"::",_0:Tu,_1:{ctor:"::",_0:yu,_1:{ctor:"::",_0:mu(t),_1:{ctor:"::",_0:vu,_1:{ctor:"::",_0:pu(t),_1:{ctor:"::",_0:lu,_1:{ctor:"::",_0:_u,_1:{ctor:"[]"}}}}}}}}}}}}})})},Ou=function(t){return a(un,a($r["<*"],a($r["*>"],Wr,Lu(t)),Wr),Hr)},Iu=function(t){return Er(Ou(t))},zu=function(t){return Er(su(t))},qu=function(t){var r=a(zu,Ce,t);return"Ok"===r.ctor?a(Iu,r._0._2,t):vt(r._0)},Mu=function(t){return Er(a($r["<*"],hc(t),Hr))},Fu=function(){function t(t,r){if(t<0||t>=q(r))throw new Error("Index "+t+" is out of range. Check the length of your array first or use getMaybe or getWithDefault.");return e(t,r)}function e(t,r){for(var n=r.height;n>0;n--){for(var e=t>>5*n;r.lengths[e]<=t;)e++;e>0&&(t-=r.lengths[e-1]),r=r.table[e]}return r.table[t]}function o(t,r,n){return t<0||q(n)<=t?n:c(t,r,n)}function c(t,r,n){if(n=z(n),0===n.height)n.table[t]=r;else{var e=M(t,n);e>0&&(t-=n.lengths[e-1]),n.table[e]=c(t,r,n.table[e])}return n}function u(t,r){return t<=0?Q:i(r,Math.floor(Math.log(t)/Math.log(W)),0,t)}function i(t,r,n,e){if(0===r){for(var o=new Array((e-n)%(W+1)),c=0;c0?_[c-1]:0);return{ctor:"_Array",height:r,table:o,lengths:_}}function _(t){if("[]"===t.ctor)return Q;for(var r=new Array(W),n=[],e=0;"[]"!==t.ctor;)if(r[e]=t._0,t=t._1,++e===W){var o={ctor:"_Array",height:0,table:r};l(o,n),r=new Array(W),e=0}if(e>0){var o={ctor:"_Array",height:0,table:r.splice(0,e)};l(o,n)}for(var c=0;c0&&l(n[c],n);var u=n[n.length-1];return u.height>0&&1===u.table.length?u.table[0]:u}function l(t,r){var n=t.height;if(r.length===n){var e={ctor:"_Array",height:n+1,table:[],lengths:[]};r.push(e)}r[n].table.push(t);var o=q(t);r[n].lengths.length>0&&(o+=r[n].lengths[r[n].lengths.length-1]),r[n].lengths.push(o),r[n].table.length===W&&(l(r[n],r),r[n]={ctor:"_Array",height:n+1,table:[],lengths:[]})}function f(t,r){var n=s(t,r);return null!==n?n:P(r,F(t,r.height))}function s(t,r){if(0===r.height){if(r.table.length=0;n--)t=0===r.height?O.Cons(r.table[n],t):p(t,r.table[n]);return t}function h(t,r){var n={ctor:"_Array",height:r.height,table:new Array(r.table.length)};r.height>0&&(n.lengths=r.lengths);for(var e=0;e0&&(e.lengths=r.lengths);for(var o=0;o0?r.lengths[e-1]:0),r.table[e]);if(0===e)return o;var n={ctor:"_Array",height:r.height,table:r.table.slice(0,e),lengths:r.lengths.slice(0,e)};return o.table.length>0&&(n.table[e]=o,n.lengths[e]=q(o)+(e>0?n.lengths[e-1]:0)),n}function T(t,r){if(0===t)return r;if(0===r.height){var n={ctor:"_Array",height:0};return n.table=r.table.slice(t,r.table.length+1),n}var e=M(t,r),o=T(t-(e>0?r.lengths[e-1]:0),r.table[e]);if(e===r.table.length-1)return o;var n={ctor:"_Array",height:r.height,table:r.table.slice(e,r.table.length+1),lengths:new Array(r.table.length-e)};n.table[0]=o;for(var c=0,u=0;u0){for(var e=q(n[0]),o=0;o0){var c=C(t,r);c>H&&(n=$(n[0],n[1],c))}return P(n[0],n[1])}function x(t,r){if(0===t.height&&0===r.height)return[t,r];if(1!==t.height||1!==r.height)if(t.height===r.height){t=z(t),r=z(r);var n=x(L(t),I(r));E(t,n[1]),B(r,n[0])}else if(t.height>r.height){t=z(t);var n=x(L(t),r);E(t,n[0]),r=D(n[1],n[1].height+1)}else{r=z(r);var n=x(t,I(r)),e=0===n[0].table.length?0:1,o=0===e?1:0;B(r,n[e]),t=D(n[o],n[o].height+1)}if(0===t.table.length||0===r.table.length)return[t,r];var c=C(t,r);return c<=H?[t,r]:$(t,r,c)}function E(t,r){var n=t.table.length-1;t.table[n]=r,t.lengths[n]=q(r),t.lengths[n]+=n>0?t.lengths[n-1]:0}function B(t,r){if(r.table.length>0){t.table[0]=r,t.lengths[0]=q(r);for(var n=q(t.table[0]),e=1;e0&&(n.lengths=new Array(r)),n}function $(t,r,n){for(var e=S(t.height,Math.min(W,t.table.length+r.table.length-n)),o=S(t.height,e.table.length-(t.table.length+r.table.length-n)),c=0;N(t.table,r.table,c).table.length%W==0;)R(e.table,o.table,c,N(t.table,r.table,c)),R(e.lengths,o.lengths,c,N(t.lengths,r.lengths,c)),c++;for(var u=c,i=new S(t.height-1,0),_=0;c-u-(i.table.length>0?1:0)0)for(var f=i.lengths.length,s=f;s0?i.lengths[s-1]:0;_+=l,a.table.length<=l&&(c++,_=0),i.table.length===W&&(A(e,o,u,i),i=S(t.height-1,0),u++)}for(i.table.length>0&&(A(e,o,u,i),u++);c0&&(r.lengths=t.lengths.slice()),r}function q(t){return 0===t.height?t.table.length:t.lengths[t.lengths.length-1]}function M(t,r){for(var n=t>>5*r.height;r.lengths[n]<=t;)n++;return n}function F(t,r){return 0===r?{ctor:"_Array",height:0,table:[t]}:{ctor:"_Array",height:r,table:[F(t,r-1)],lengths:[1]}}function D(t,r){return r===t.height?t:{ctor:"_Array",height:r,table:[D(t,r-1)],lengths:[q(t)]}}function P(t,r){return{ctor:"_Array",height:t.height+1,table:[t,r],lengths:[q(t),q(t)+q(r)]}}function J(t){var r=new Array(q(t));return j(r,0,t),r}function j(t,r,n){for(var e=0;e0?u[i-1]:0);return{ctor:"_Array",height:r,table:c,lengths:u}}var W=32,H=2,Q={ctor:"_Array",height:0,table:[]};return{empty:Q,fromList:_,toList:d,initialize:r(u),append:r(w),push:r(f),slice:n(y),get:r(t),set:n(o),map:r(h),indexedMap:r(v),foldl:n(m),foldr:n(b),length:q,toJSArray:J,fromJSArray:V}}(),Du=(Fu.append,Fu.length,Fu.slice,Fu.set,r(function(t,r){return v.cmp(0,t)<1&&v.cmp(t,Fu.length(r))<0?S(a(Fu.get,t,r)):R}),Fu.push,Fu.empty,r(function(t,n){var e=r(function(r,n){return t(r)?a(Fu.push,r,n):n});return l(Fu.foldl,e,Fu.empty,n)}),Fu.foldr,Fu.foldl,Fu.indexedMap,Fu.map,Fu.toList),Pu=(Fu.fromList,Fu.initialize),Ju=(r(function(t,r){return a(Pu,t,b(r))}),function(){function t(t){return{ctor:"",tag:"succeed",msg:t}}function a(t){return{ctor:"",tag:"fail",msg:t}}function l(t){return{ctor:"",tag:t}}function f(t,r){return{ctor:"",tag:t,decoder:r}}function s(t){return{ctor:"",tag:"null",value:t}}function d(t,r){return{ctor:"",tag:"field",field:t,decoder:r}}function p(t,r){return{ctor:"",tag:"index",index:t,decoder:r}}function h(t){return{ctor:"",tag:"key-value",decoder:t}}function g(t,r){return{ctor:"",tag:"map-many",func:t,decoders:r}}function m(t,r){return{ctor:"",tag:"andThen",decoder:r,callback:t}}function b(t){return{ctor:"",tag:"oneOf",decoders:t}}function y(t,r){return g(t,[r])}function k(t,r,n){return g(t,[r,n])}function T(t,r,n,e){return g(t,[r,n,e])}function w(t,r,n,e,o){return g(t,[r,n,e,o])}function x(t,r,n,e,o,c){return g(t,[r,n,e,o,c])}function E(t,r,n,e,o,c,u){return g(t,[r,n,e,o,c,u])}function B(t,r,n,e,o,c,u,i){return g(t,[r,n,e,o,c,u,i])}function C(t,r,n,e,o,c,u,i,_){return g(t,[r,n,e,o,c,u,i,_])}function N(t){return{tag:"ok",value:t}}function A(t,r){return{tag:"primitive",type:t,value:r}}function $(t,r){return{tag:"index",index:t,rest:r}}function L(t,r){return{tag:"field",field:t,rest:r}}function $(t,r){return{tag:"index",index:t,rest:r}}function I(t){return{tag:"oneOf",problems:t}}function z(t){return{tag:"fail",msg:t}}function q(t){for(var r="_";t;)switch(t.tag){case"primitive":return"Expecting "+t.type+("_"===r?"":" at "+r)+" but instead got: "+M(t.value);case"index":r+="["+t.index+"]",t=t.rest;break;case"field":r+="."+t.field,t=t.rest;break;case"oneOf":for(var n=t.problems,e=0;e=r.length)return A("a longer array. Need index "+_+" but there are only "+r.length+" entries",r);var o=P(t.decoder,r[_]);return"ok"===o.tag?o:$(_,o);case"key-value":if("object"!=typeof r||null===r||r instanceof Array)return A("an object",r);var a=O.Nil;for(var l in r){var o=P(t.decoder,r[l]);if("ok"!==o.tag)return L(l,o);var f=v.Tuple2(l,o.value);a=O.Cons(f,a)}return N(a);case"map-many":for(var s=t.func,d=t.decoders,e=0;e0&&n.push($("p-thunk",e,l)));case"tagger":for(var f=t.tagger,s=r.tagger,d=!1,p=t.node;"tagger"===p.type;)d=!0,"object"!=typeof f?f=[f,p.tagger]:f.push(p.tagger),p=p.node;for(var h=r.node;"tagger"===h.type;)d=!0,"object"!=typeof s?s=[s,h.tagger]:s.push(h.tagger),h=h.node;return d&&f.length!==s.length?void n.push($("p-redraw",e,r)):((d?O(f,s):f===s)||n.push($("p-tagger",e,s)),void L(p,h,n,e+1));case"text":if(t.text!==r.text)return void n.push($("p-text",e,r.text));return;case"node":if(t.tag!==r.tag||t.namespace!==r.namespace)return void n.push($("p-redraw",e,r));var v=I(t.facts,r.facts);return void 0!==v&&n.push($("p-facts",e,v)),void z(t,r,n,e);case"keyed-node":if(t.tag!==r.tag||t.namespace!==r.namespace)return void n.push($("p-redraw",e,r));var v=I(t.facts,r.facts);return void 0!==v&&n.push($("p-facts",e,v)),void q(t,r,n,e);case"custom":if(t.impl!==r.impl)return void n.push($("p-redraw",e,r));var v=I(t.facts,r.facts);void 0!==v&&n.push($("p-facts",e,v));var g=r.impl.diff(t,r);if(g)return void n.push($("p-custom",e,g));return}}}function O(t,r){for(var n=0;ni?n.push($("p-remove-last",e,u-i)):u0||u.length>0||void 0!==A)&&n.push($("p-reorder",e,{patches:o,inserts:u,endInserts:A}))}function M(t,r,n,e,o,c){var u=t[n];if(void 0===u)return u={tag:"insert",vnode:e,index:o,data:void 0},c.push({index:o,entry:u}),void(t[n]=u);if("remove"===u.tag){c.push({index:o,entry:u}),u.tag="move";var i=[];return L(u.vnode,e,i,u.index),u.index=o,void(u.data.data={patches:i,entry:u})}M(t,r,n+vt,e,o,c)}function F(t,r,n,e,o){var c=t[n];if(void 0===c){var u=$("p-remove",o,void 0);return r.push(u),void(t[n]={tag:"remove",vnode:e,index:o,data:u})}if("insert"===c.tag){c.tag="move";var i=[];L(e,c.vnode,i,o);var u=$("p-remove",o,{patches:i,entry:c});return void r.push(u)}F(t,r,n+vt,e,o)}function D(t,r,n,e){P(t,r,n,0,0,r.descendantsCount,e)}function P(t,r,n,e,o,c,u){for(var i=n[e],_=i.index;_===o;){var a=i.type;if("p-thunk"===a)D(t,r.node,i.data,u);else if("p-reorder"===a){i.domNode=t,i.eventNode=u;var l=i.data.patches;l.length>0&&P(t,r,l,0,o,c,u)}else if("p-remove"===a){i.domNode=t,i.eventNode=u;var f=i.data;if(void 0!==f){f.entry.data=t;var l=f.patches;l.length>0&&P(t,r,l,0,o,c,u)}}else i.domNode=t,i.eventNode=u;if(e++,!(i=n[e])||(_=i.index)>c)return e}switch(r.type){case"tagger":for(var s=r.node;"tagger"===s.type;)s=s.node;return P(t,s,n,e,o+1,c,t.elm_event_node_ref);case"node":for(var d=r.children,p=t.childNodes,h=0;hc))return e;o=g}return e;case"keyed-node":for(var d=r.children,p=t.childNodes,h=0;hc))return e;o=g}return e;case"text":case"thunk":throw new Error("should never traverse `text` or `thunk` nodes like this")}}function J(t,r,n,e){return 0===n.length?t:(D(t,r,n,e),j(t,n))}function j(t,r){for(var n=0;n
"),new Error(t)}function Z(t,r,n,e){r.embed=function(r,n){for(;r.lastChild;)r.removeChild(r.lastChild);return er.initialize(e(t.init,n,r),t.update,t.subscriptions,tt(r,t.view))},r.fullscreen=function(r){return er.initialize(e(t.init,r,document.body),t.update,t.subscriptions,tt(document.body,t.view))}}function tt(t,r){return function(n,e){var o={tagger:n,parent:void 0},c=r(e),u=x(c,o);return t.appendChild(u),rt(u,r,c,o)}}function rt(t,r,n,e){function o(){switch(u){case"NO_REQUEST":throw new Error("Unexpected draw callback.\nPlease report this to .");case"PENDING_REQUEST":bt(o),u="EXTRA_REQUEST";var n=r(c),_=S(i,n);return t=J(t,i,_,e),void(i=n);case"EXTRA_REQUEST":return void(u="NO_REQUEST")}}var c,u="NO_REQUEST",i=n;return function(t){"NO_REQUEST"===u&&bt(o),u="PENDING_REQUEST",c=t}}function nt(t,r,n,e){r.fullscreen=function(r){var o={doc:void 0};return er.initialize(e(t.init,r,document.body),t.update(et(o)),t.subscriptions,ot(n,document.body,o,t.view,t.viewIn,t.viewOut))},r.embed=function(r,o){var c={doc:void 0};return er.initialize(e(t.init,o,r),t.update(et(c)),t.subscriptions,ot(n,r,c,t.view,t.viewIn,t.viewOut))}}function et(t){return or.nativeBinding(function(r){var n=t.doc;if(n){var e=n.getElementsByClassName("debugger-sidebar-messages")[0];e&&(e.scrollTop=e.scrollHeight)}r(or.succeed(v.Tuple0))})}function ot(t,r,n,e,o,c){return function(u,i){var _={tagger:u,parent:void 0},a={tagger:u,parent:void 0},l=e(i),f=x(l,_);r.appendChild(f);var s=rt(f,e,l,_),d=o(i)._1,p=x(d,a);r.appendChild(p);var h=it(_,p,o),v=rt(p,h,d,a),g=ct(i,c,a,r,t,n);return function(t){s(t),v(t),g(t)}}}function ct(t,r,n,e,o,c){var u,i;return function(t){if(t.isDebuggerOpen){if(!c.doc)return u=r(t),void(i=ut(o,c,u,n));ht=c.doc;var e=r(t),_=S(u,e);i=J(i,u,_,n),u=e,ht=document}}}function ut(t,r,n,e){function o(){r.doc=void 0,i.close()}var c=screen.width-900,u=screen.height-360,i=window.open("","","width=900,height=360,left="+c+",top="+u);ht=i.document,r.doc=ht,ht.title="Debugger - "+t,ht.body.style.margin="0",ht.body.style.padding="0";var _=x(n,e);return ht.body.appendChild(_),ht.addEventListener("keydown",function(t){t.metaKey&&82===t.which&&window.location.reload(),38===t.which&&(e.tagger({ctor:"Up"}),t.preventDefault()),40===t.which&&(e.tagger({ctor:"Down"}),t.preventDefault())}),window.addEventListener("unload",o),i.addEventListener("unload",function(){r.doc=void 0,window.removeEventListener("unload",o),e.tagger({ctor:"Close"})}),ht=document,_}function it(t,r,n){var e,o=lt(r),c="Normal",u=t.tagger,i=function(){};return function(r){var _=n(r),a=_._0.ctor;return t.tagger="Normal"===a?u:i,c!==a&&(_t("removeEventListener",o,c),_t("addEventListener",o,a),"Normal"===c&&(e=document.body.style.overflow,document.body.style.overflow="hidden"),"Normal"===a&&(document.body.style.overflow=e),c=a),_._1}}function _t(t,r,n){switch(n){case"Normal":return;case"Pause":return at(t,r,yt);case"Message":return at(t,r,kt)}}function at(t,r,n){for(var e=0;e=0?hljs.highlight(n,r,!0).value:r}var n=t.githubFlavored;return"Just"===n.ctor?{highlight:r,gfm:!0,tables:n._0.tables,breaks:n._0.breaks,sanitize:t.sanitize,smartypants:t.smartypants}:{highlight:r,gfm:!1,tables:!1,breaks:!1,sanitize:t.sanitize,smartypants:t.smartypants}}var u={render:r,diff:e},i=function(){var t={},r=t.exports={};return function(){function n(t){this.tokens=[],this.tokens.links={},this.options=t||f.defaults,this.rules=s.normal,this.options.gfm&&(this.options.tables?this.rules=s.tables:this.rules=s.gfm)}function e(t,r){if(this.options=r||f.defaults,this.links=t,this.rules=d.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=d.breaks:this.rules=d.gfm:this.options.pedantic&&(this.rules=d.pedantic)}function o(t){this.options=t||{}}function c(t){this.tokens=[],this.token=null,this.options=t||f.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function u(t,r){return t.replace(r?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function i(t){return t.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(t,r){return r=r.toLowerCase(),"colon"===r?":":"#"===r.charAt(0)?"x"===r.charAt(1)?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""})}function _(t,r){return t=t.source,r=r||"",function n(e,o){return e?(o=o.source||o,o=o.replace(/(^|[^\[])\^/g,"$1"),t=t.replace(e,o),n):new RegExp(t,r)}}function a(){}function l(t){for(var r,n,e=1;eAn error occured:

"+u(t.message+"",!0)+"
";throw t}}var s={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:a,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:a,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:a,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};s.bullet=/(?:[*+-]|\d+\.)/,s.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,s.item=_(s.item,"gm")(/bull/g,s.bullet)(),s.list=_(s.list)(/bull/g,s.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+s.def.source+")")(),s.blockquote=_(s.blockquote)("def",s.def)(),s._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",s.html=_(s.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,s._tag)(),s.paragraph=_(s.paragraph)("hr",s.hr)("heading",s.heading)("lheading",s.lheading)("blockquote",s.blockquote)("tag","<"+s._tag)("def",s.def)(),s.normal=l({},s),s.gfm=l({},s.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),s.gfm.paragraph=_(s.paragraph)("(?!","(?!"+s.gfm.fences.source.replace("\\1","\\2")+"|"+s.list.source.replace("\\1","\\3")+"|")(),s.tables=l({},s.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),n.rules=s,n.lex=function(t,r){return new n(r).lex(t)},n.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},n.prototype.token=function(t,r,n){for(var e,o,c,u,i,_,a,l,f,t=t.replace(/^ +$/gm,"");t;)if((c=this.rules.newline.exec(t))&&(t=t.substring(c[0].length),c[0].length>1&&this.tokens.push({type:"space"})),c=this.rules.code.exec(t))t=t.substring(c[0].length),c=c[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?c:c.replace(/\n+$/,"")});else if(c=this.rules.fences.exec(t))t=t.substring(c[0].length),this.tokens.push({type:"code",lang:c[2],text:c[3]||""});else if(c=this.rules.heading.exec(t))t=t.substring(c[0].length),this.tokens.push({type:"heading",depth:c[1].length,text:c[2]});else if(r&&(c=this.rules.nptable.exec(t))){for(t=t.substring(c[0].length),_={type:"table",header:c[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3].replace(/\n$/,"").split("\n")},l=0;l<_.align.length;l++)/^ *-+: *$/.test(_.align[l])?_.align[l]="right":/^ *:-+: *$/.test(_.align[l])?_.align[l]="center":/^ *:-+ *$/.test(_.align[l])?_.align[l]="left":_.align[l]=null;for(l=0;l<_.cells.length;l++)_.cells[l]=_.cells[l].split(/ *\| */);this.tokens.push(_)}else if(c=this.rules.lheading.exec(t))t=t.substring(c[0].length),this.tokens.push({type:"heading",depth:"="===c[2]?1:2,text:c[1]});else if(c=this.rules.hr.exec(t))t=t.substring(c[0].length),this.tokens.push({type:"hr"});else if(c=this.rules.blockquote.exec(t))t=t.substring(c[0].length),this.tokens.push({type:"blockquote_start"}),c=c[0].replace(/^ *> ?/gm,""),this.token(c,r,!0),this.tokens.push({type:"blockquote_end"});else if(c=this.rules.list.exec(t)){for(t=t.substring(c[0].length),u=c[2],this.tokens.push({type:"list_start",ordered:u.length>1}),c=c[0].match(this.rules.item),e=!1,f=c.length,l=0;l1&&i.length>1||(t=c.slice(l+1).join("\n")+t,l=f-1)),o=e||/\n\n(?!\s*$)/.test(_),l!==f-1&&(e="\n"===_.charAt(_.length-1),o||(o=e)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(_,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(c=this.rules.html.exec(t))t=t.substring(c[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===c[1]||"script"===c[1]||"style"===c[1]),text:c[0]});else if(!n&&r&&(c=this.rules.def.exec(t)))t=t.substring(c[0].length),this.tokens.links[c[1].toLowerCase()]={href:c[2],title:c[3]};else if(r&&(c=this.rules.table.exec(t))){for(t=t.substring(c[0].length),_={type:"table",header:c[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3].replace(/(?: *\| *)?\n$/,"").split("\n")},l=0;l<_.align.length;l++)/^ *-+: *$/.test(_.align[l])?_.align[l]="right":/^ *:-+: *$/.test(_.align[l])?_.align[l]="center":/^ *:-+ *$/.test(_.align[l])?_.align[l]="left":_.align[l]=null;for(l=0;l<_.cells.length;l++)_.cells[l]=_.cells[l].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(_)}else if(r&&(c=this.rules.paragraph.exec(t)))t=t.substring(c[0].length),this.tokens.push({type:"paragraph",text:"\n"===c[1].charAt(c[1].length-1)?c[1].slice(0,-1):c[1]});else if(c=this.rules.text.exec(t))t=t.substring(c[0].length),this.tokens.push({type:"text",text:c[0]});else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0));return this.tokens};var d={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:a,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:a,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,d.link=_(d.link)("inside",d._inside)("href",d._href)(),d.reflink=_(d.reflink)("inside",d._inside)(),d.normal=l({},d),d.pedantic=l({},d.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),d.gfm=l({},d.normal,{escape:_(d.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:_(d.text)("]|","~]|")("|","|https?://|")()}),d.breaks=l({},d.gfm,{br:_(d.br)("{2,}","*")(),text:_(d.gfm.text)("{2,}","*")()}),e.rules=d,e.output=function(t,r,n){return new e(r,n).output(t)},e.prototype.output=function(t){for(var r,n,e,o,c="";t;)if(o=this.rules.escape.exec(t))t=t.substring(o[0].length),c+=o[1];else if(o=this.rules.autolink.exec(t))t=t.substring(o[0].length),"@"===o[2]?(n=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),e=this.mangle("mailto:")+n):(n=u(o[1]),e=n),c+=this.renderer.link(e,null,n);else if(this.inLink||!(o=this.rules.url.exec(t))){if(o=this.rules.tag.exec(t))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),t=t.substring(o[0].length),c+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):u(o[0]):o[0];else if(o=this.rules.link.exec(t))t=t.substring(o[0].length),this.inLink=!0,c+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(t))||(o=this.rules.nolink.exec(t))){if(t=t.substring(o[0].length),r=(o[2]||o[1]).replace(/\s+/g," "),!(r=this.links[r.toLowerCase()])||!r.href){c+=o[0].charAt(0),t=o[0].substring(1)+t;continue}this.inLink=!0,c+=this.outputLink(o,r),this.inLink=!1}else if(o=this.rules.strong.exec(t))t=t.substring(o[0].length),c+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(t))t=t.substring(o[0].length),c+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(t))t=t.substring(o[0].length),c+=this.renderer.codespan(u(o[2],!0));else if(o=this.rules.br.exec(t))t=t.substring(o[0].length),c+=this.renderer.br();else if(o=this.rules.del.exec(t))t=t.substring(o[0].length),c+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(t))t=t.substring(o[0].length),c+=this.renderer.text(u(this.smartypants(o[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(o[0].length),n=u(o[1]),e=n,c+=this.renderer.link(e,null,n);return c},e.prototype.outputLink=function(t,r){var n=u(r.href),e=r.title?u(r.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,e,this.output(t[1])):this.renderer.image(n,e,u(t[1]))},e.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},e.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var r,n="",e=t.length,o=0;o.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n},o.prototype.code=function(t,r,n){if(this.options.highlight){var e=this.options.highlight(t,r);null!=e&&e!==t&&(n=!0,t=e)}return r?'
'+(n?t:u(t,!0))+"\n
\n":"
"+(n?t:u(t,!0))+"\n
"},o.prototype.blockquote=function(t){return"
\n"+t+"
\n"},o.prototype.html=function(t){return t},o.prototype.heading=function(t,r,n){return"'+t+"\n"},o.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},o.prototype.list=function(t,r){var n=r?"ol":"ul";return"<"+n+">\n"+t+"\n"},o.prototype.listitem=function(t){return"
  • "+t+"
  • \n"},o.prototype.paragraph=function(t){return"

    "+t+"

    \n"},o.prototype.table=function(t,r){return"\n\n"+t+"\n\n"+r+"\n
    \n"},o.prototype.tablerow=function(t){return"\n"+t+"\n"},o.prototype.tablecell=function(t,r){var n=r.header?"th":"td";return(r.align?"<"+n+' style="text-align:'+r.align+'">':"<"+n+">")+t+"\n"},o.prototype.strong=function(t){return""+t+""},o.prototype.em=function(t){return""+t+""},o.prototype.codespan=function(t){return""+t+""},o.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},o.prototype.del=function(t){return""+t+""},o.prototype.link=function(t,r,n){if(this.options.sanitize){try{var e=decodeURIComponent(i(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return""}var o='
    "},o.prototype.image=function(t,r,n){var e=''+n+'":">"},o.prototype.text=function(t){return t},c.parse=function(t,r,n){return new c(r,n).parse(t)},c.prototype.parse=function(t){this.inline=new e(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var r="";this.next();)r+=this.tok();return r},c.prototype.next=function(){return this.token=this.tokens.pop()},c.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},c.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},c.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,r,n,e,o="",c="";for(n="",t=0;t"]=r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}});var ii=function(t){var r=t;return"TypeApplication"===r.ctor?{ctor:"::",_0:r._0,_1:ii(r._1)}:{ctor:"::",_0:r,_1:{ctor:"[]"}}},_i=function(t){var r=t;return"Application"===r.ctor?a(k["++"],_i(r._0),{ctor:"::",_0:r._1,_1:{ctor:"[]"}}):{ctor:"::",_0:r,_1:{ctor:"[]"}}},ai={ctor:"::",_0:"isTuple",_1:{ctor:"::",_0:"abs",_1:{ctor:"::",_0:"apply",_1:{ctor:"::",_0:"apply",_1:{ctor:"::",_0:"binary_part",_1:{ctor:"::",_0:"bit_size",_1:{ctor:"::",_0:"byte_size",_1:{ctor:"::",_0:"div",_1:{ctor:"::",_0:"elem",_1:{ctor:"::",_0:"exit",_1:{ctor:"::",_0:"function_exported?",_1:{ctor:"::",_0:"get_and_update_in",_1:{ctor:"::",_0:"get_in",_1:{ctor:"::",_0:"hd",_1:{ctor:"::",_0:"inspect",_1:{ctor:"::",_0:"inspect",_1:{ctor:"::",_0:"is_atom",_1:{ctor:"::",_0:"is_binary",_1:{ctor:"::",_0:"is_bitstring",_1:{ctor:"::",_0:"is_boolean",_1:{ctor:"::",_0:"is_float",_1:{ctor:"::",_0:"is_function",_1:{ctor:"::",_0:"is_function",_1:{ctor:"::",_0:"is_integer",_1:{ctor:"::",_0:"is_list",_1:{ctor:"::",_0:"is_map",_1:{ctor:"::",_0:"is_number",_1:{ctor:"::",_0:"is_pid",_1:{ctor:"::",_0:"is_port",_1:{ctor:"::",_0:"is_reference",_1:{ctor:"::",_0:"is_tuple",_1:{ctor:"::",_0:"length",_1:{ctor:"::",_0:"macro_exported?",_1:{ctor:"::",_0:"make_ref",_1:{ctor:"::",_0:"map_size",_1:{ctor:"::",_0:"max",_1:{ctor:"::",_0:"min",_1:{ctor:"::",_0:"node",_1:{ctor:"::",_0:"node",_1:{ctor:"::",_0:"not",_1:{ctor:"::",_0:"pop_in",_1:{ctor:"::",_0:"put_elem",_1:{ctor:"::",_0:"put_in",_1:{ctor:"::",_0:"rem",_1:{ctor:"::",_0:"round",_1:{ctor:"::",_0:"self",_1:{ctor:"::",_0:"send",_1:{ctor:"::",_0:"spawn",_1:{ctor:"::",_0:"spawn",_1:{ctor:"::",_0:"spawn_link",_1:{ctor:"::",_0:"spawn_link",_1:{ctor:"::",_0:"spawn_monitor",_1:{ctor:"::",_0:"spawn_monitor",_1:{ctor:"::",_0:"struct",_1:{ctor:"::",_0:"struct",_1:{ctor:"::",_0:"struct!",_1:{ctor:"::",_0:"struct!",_1:{ctor:"::",_0:"throw",_1:{ctor:"::",_0:"tl",_1:{ctor:"::",_0:"trunc",_1:{ctor:"::",_0:"tuple_size",_1:{ctor:"::",_0:"update_in",_1:{ctor:"[]"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},li={ctor:"::",_0:"cons",_1:{ctor:"::",_0:"compare",_1:{ctor:"::",_0:"xor",_1:{ctor:"::",_0:"negate",_1:{ctor:"::",_0:"sqrt",_1:{ctor:"::",_0:"clamp",_1:{ctor:"::",_0:"logBase",_1:{ctor:"::",_0:"e",_1:{ctor:"::",_0:"pi",_1:{ctor:"::",_0:"cos",_1:{ctor:"::",_0:"sin",_1:{ctor:"::",_0:"tan",_1:{ctor:"::",_0:"acos",_1:{ctor:"::",_0:"asin",_1:{ctor:"::",_0:"atan",_1:{ctor:"::",_0:"atan2",_1:{ctor:"::",_0:"round",_1:{ctor:"::",_0:"floor",_1:{ctor:"::",_0:"ceiling",_1:{ctor:"::",_0:"truncate",_1:{ctor:"::",_0:"toFloat",_1:{ctor:"::",_0:"toString",_1:{ctor:"::",_0:"identity",_1:{ctor:"::",_0:"always",_1:{ctor:"::",_0:"flip",_1:{ctor:"::",_0:"tuple2",_1:{ctor:"::",_0:"tuple3",_1:{ctor:"::",_0:"tuple4",_1:{ctor:"::",_0:"tuple5",_1:{ctor:"[]"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},fi={ctor:"::",_0:"fn",_1:{ctor:"::",_0:"do",_1:{ctor:"::",_0:"end",_1:{ctor:"::",_0:"cond",_1:{ctor:"::",_0:"receive",_1:{ctor:"::",_0:"or",_1:{ctor:"::",_0:"and",_1:{ctor:"::",_0:"quote",_1:{ctor:"::",_0:"unquote",_1:{ctor:"::",_0:"unquote_splicing",_1:{ctor:"::",_0:"module",_1:{ctor:"[]"}}}}}}}}}}}},si=function(t){return a(H,t,fi)?a(k["++"],t,"__"):t},di=function(t){return a(H,t,{ctor:"::",_0:"Basics",_1:{ctor:"::",_0:"Bitwise",_1:{ctor:"::",_0:"Char",_1:{ctor:"::",_0:"Date",_1:{ctor:"::",_0:"Debug",_1:{ctor:"::",_0:"Dict",_1:{ctor:"::",_0:"List",_1:{ctor:"::",_0:"String",_1:{ctor:"::",_0:"Maybe",_1:{ctor:"::",_0:"Regex",_1:{ctor:"::",_0:"Result",_1:{ctor:"::",_0:"Set",_1:{ctor:"::",_0:"String",_1:{ctor:"::",_0:"Tuple",_1:{ctor:"[]"}}}}}}}}}}}}}}})},pi=function(t){return di(t)?a(k["++"],"Elchemy.X",t):t},hi=a(pt,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),{ctor:"::",_0:v.chr("+"),_1:{ctor:"::",_0:v.chr("-"),_1:{ctor:"::",_0:v.chr("/"),_1:{ctor:"::",_0:v.chr("*"),_1:{ctor:"::",_0:v.chr("="),_1:{ctor:"::",_0:v.chr("."),_1:{ctor:"::",_0:v.chr("$"),_1:{ctor:"::",_0:v.chr("<"),_1:{ctor:"::",_0:v.chr(">"),_1:{ctor:"::",_0:v.chr(":"),_1:{ctor:"::",_0:v.chr("&"),_1:{ctor:"::",_0:v.chr("|"),_1:{ctor:"::",_0:v.chr("^"),_1:{ctor:"::",_0:v.chr("?"),_1:{ctor:"::",_0:v.chr("%"),_1:{ctor:"::",_0:v.chr("#"),_1:{ctor:"::",_0:v.chr("@"),_1:{ctor:"::",_0:v.chr("~"),_1:{ctor:"::",_0:v.chr("!"),_1:{ctor:"[]"}}}}}}}}}}}}}}}}}}}}),vi=function(t){var r=a(Y,function(r){var n=r;return v.eq(t,n._1)},hi);return"::"===r.ctor&&"_Tuple2"===r._0.ctor?a(k["++"],"op",T(r._0._0)):v.crashCase("Helpers",{start:{line:433,column:5},end:{line:440,column:37}},r)("Illegal op")},gi=function(t){return l(m,r(function(t,r){return a(k["++"],t,r)}),"__",a(Vt,"",a(G,vi,St(t))))},mi=function(t){return f(hr,yr,mr("\\\\"),b("\\\\"),t)},bi=r(function(t,n){return a(G,r(function(t,r){return a(k["++"],t,r)})(t),a(G,T,a(dt,1,n)))}),yi=bi("x"),ki=l(U,g(Wn),Rn,{ctor:"::",_0:{ctor:"_Tuple2",_0:"||",_1:"||"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"&&",_1:"&&"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"==",_1:"=="},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"/=",_1:"!="},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"<",_1:"<"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:">",_1:">"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:">=",_1:">="},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"<=",_1:"<="},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"++",_1:"++"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"+",_1:"+"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"-",_1:"-"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"*",_1:"*"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"/",_1:"/"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:">>",_1:">>>"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"<|",_1:""},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"<<",_1:""},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"|>",_1:"|>"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"%",_1:"rem"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"//",_1:"div"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"^",_1:""},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"::",_1:"cons"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"not",_1:"!"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:",",_1:"tuple2"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:",,",_1:"tuple3"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:",,,",_1:"tuple4"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:",,,,",_1:"tuple5"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"as",_1:"="},_1:{ctor:"[]"}}}}}}}}}}}}}}}}}}}}}}}}}}}}),Ti=function(t){var r=a(vn,t,ki);return"Just"===r.ctor?""===r._0?v.crashCase("Helpers",{start:{line:219,column:5},end:{line:229,column:25}},r)(a(k["++"],t," is not a valid or not implemented yet operator")):r._0:gi(t)},wi=(l(hr,yr,mr("(^\\{|\\}$)"),function(t){return""}),n(function(t,r,n){var e=n;return"[]"===e.ctor?r:t(e)})),xi=function(t){var r=t;return"::"===r.ctor?{ctor:"_Tuple2",_0:S(r._0),_1:r._1}:{ctor:"_Tuple2",_0:R,_1:{ctor:"[]"}}},Ei=function(t){return a(Zt,rt,xi(rt(t)))},Bi=r(function(t,r){return function(t){var r=t;return{ctor:"_Tuple2",_0:r._1,_1:r._0}}(a(tr,N(""),a(Zt,function(r){return l(wi,Vt("."),t,rt(r))},xi(rt(r)))))}),Ci=r(function(t,r){return a(Vt,"\n",a(G,function(r){return v.eq(Dt(r),"")?r:a(k["++"],t,r)},Mt(r)))}),Ni=function(t){return a(Vt,"",a(ft,2*(t+1)," "))},Ri=function(t){return a(k["++"],"\n",Ni(t))},Ai=r(function(t,r){return a(k["++"],"\n",a(Ci,a(Pt,1,Ri(t)),r))}),Si=function(t){return a(N,!1,a($,function(t){return Et(nr(t))},Kt(t)))},$i=r(function(t,r){return v.eq(qt(r),r)?zt(r):function(r){return t?si(r):r}(zt(a(Vt,"_",l(pr,yr,mr("(?=[A-Z])"),r))))}),Li=function(t){return a(k["++"],":",a($i,!1,t))},Oi=function(t){return pi(a(Vt,".",a(G,function(t){return Si(t)?t:a($i,!0,t)},t)))},Ii=r(function(t,r){return v.crash("Helpers",{start:{line:25,column:12},end:{line:25,column:23}})(a(k["++"]," ## ERROR: No ",a(k["++"],t,a(k["++"]," implementation for ",a(k["++"],T(r),a(k["++"]," yet","\n"))))))}),zi={ctor:"Custom"},qi={ctor:"Builtin"},Mi={ctor:"None"},Fi=function(t){var n=a(gr,mr("^[+\\-\\/*=.$<>:&|^?%#@~!]+$"),t),e=a(J,r(function(t,r){return v.eq(t,r)})(t),an(ki)),o={ctor:"_Tuple2",_0:e,_1:n};t:do{if("_Tuple2"===o.ctor){if(!0===o._0)return qi;if(!0===o._1)return zi;break t}break t}while(!1);return Mi},Di=function(t){return v.eq(Fi(t),zi)},Pi=function(t){return a(G,function(t){var r=t,n=r._0;return a(k["++"],a($i,!1,n),a(k["++"],": 0, ",a(k["++"],a($i,!1,n),a(k["++"],": ",T(r._1)))))},a(G,Zt(function(t){return t.arity}),t))},Ji=r(function(t,n){var e=a(N,Rn,a($,function(t){return t.definitions},a(vn,t.mod,t.commons.modules))),o=function(t){return a(N,{ctor:"[]"},a($,function(n){return z(a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),t,n))},a(vn,t,e)))};return v.eq(t.mod,"Elchemy.XBasics")?{ctor:"[]"}:a(ct,o,n)}),ji=function(t){var n=Pi(a(Ji,t,ai)),e=Pi(a(Ji,t,li)),o=r(function(t,n){return v.eq(n,{ctor:"[]"})?"":l(m,r(function(t,r){return a(k["++"],t,r)}),"]\n",a(r(function(t,r){return a(k["++"],t,r)}),a(k["++"],"import ",a(k["++"],t,", except: [")),a(Vt,", ",n)))});return a(k["++"],a(o,"Elchemy.XBasics",e),a(o,"Kernel",n))},Vi=r(function(t,r){return v.update(t,{variables:a(Pe,t.variables,r.variables)})}),Ui=r(function(t,n){var e=t.exports;switch(e.ctor){case"SubsetExport":return!a(J,r(function(t,r){return v.eq(t,r)})(Sc(n)),e._0);case"AllExport":return!1;default:return v.crashCase("ExContext",{start:{line:359,column:5},end:{line:370,column:41}},e)("No such export")}}),Wi=function(t){return v.update(t,{inArgs:!0})},Hi=n(function(t,n,e){return a(J,r(function(t,r){return v.eq(t,r)})({ctor:"_Tuple2",_0:t,_1:n}),e.flags)}),Qi=(r(function(t,n){return a(G,rr,a(Y,function(n){return a(r(function(t,r){return v.eq(t,r)}),t,nr(n))},n.flags))}),e(function(t,r,n,e){return l(Hi,r,n,t)?"":e})),Ki=r(function(t,r){return v.update(r,{flags:{ctor:"::",_0:t,_1:r.flags}})}),Xi=function(t){return v.update(t,{indent:t.indent+1})},Gi=r(function(t,r){return v.update(r,{mod:t})}),Yi={modules:Rn},Zi=n(function(t,r,n){return a($,function(t){return t.arity},a(A,vn(n),a($,function(t){return t.definitions},a(vn,r,t.commons.modules))))}),t_=e(function(t,r,n,e){return v.eq(W(e),a(N,-1,l(Zi,t,r,n)))}),r_=e(function(t,r,n,e){return a(A,vn(n),a($,t,a(vn,r,function(t){return t.modules}(function(t){return t.commons}(e)))))}),n_=r_(function(t){return t.aliases}),e_=r_(function(t){return t.types}),o_=n(function(t,r,n){return v.crash("ExContext",{start:{line:140,column:5},end:{line:140,column:16}})(a(k["++"],"Expected ",a(k["++"],T(t),a(k["++"]," arguments for ",a(k["++"],n,a(k["++"],". But got ",T(W(r))))))))}),c_=c(function(t,r,n,e,o,c){return{parentModule:t,arity:r,aliasType:n,body:e,typeBody:o,types:c}}),u_=(n(function(t,r,n){return{arity:t,parentModule:r,parentAlias:n}}),r(function(t,r){return{arity:t,def:r}})),i_=e(function(t,r,n,e){return{aliases:t,types:r,definitions:n,exports:e}}),__=r(function(t,r){return{mod:t,exports:r,indent:0,flags:{ctor:"[]"},variables:Me,inArgs:!1,hasModuleDoc:!1,lastDoc:R,commons:{modules:a(Hn,t,f(i_,Rn,Rn,Rn,r))},inTypeDefiniton:!1,inCaseOf:!1,importedTypes:Yn({ctor:"::",_0:{ctor:"_Tuple2",_0:"Order",_1:"Elchemy.XBasics"},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"Result",_1:"Elchemy.XResult"},_1:{ctor:"[]"}}})}}),a_=f(i_,Rn,Rn,Rn,Ic),l_=c(function(t,r,n,e,o,c){var u=c.commons,i=function(t){return S(a(e,a(N,a_,t),l(Un,r,b(S(o)),a(N,Rn,a($,n,t)))))};return v.update(c,{commons:v.update(u,{modules:l(Un,t,i,u.modules)})})}),f_=r(function(t,n){return f(l_,t,n,function(t){return t.aliases},r(function(t,r){return v.update(t,{aliases:r})}))}),s_=e(function(t,n,e,o){var c={arity:o,parentModule:t,parentAlias:n};return s(l_,t,e,function(t){return t.types},r(function(t,r){return v.update(t,{types:r})}),c)}),d_=n(function(t,n,e){return d(l_,t.mod,n,function(t){return t.definitions},r(function(t,r){return v.update(t,{definitions:r})}),e,t)}),p_=n(function(t,o,c){var u=e(function(t,r,e,o){return l(fn,n(function(n,e,c){return d(l_,o.mod,n,t,r,e,c)}),o,e)}),i=r(function(t,r){return a(N,Rn,a($,t,a(vn,r,c.commons.modules)))}),_=function(t){return a(Kn,r(function(r,n){return v.eq(r,t)}),a(i,function(t){return t.aliases},o))},s=r(function(t,n){return a(Kn,r(function(r,n){var e=n;return v.eq(e.parentAlias,t)}),a(i,function(t){return t.types},o))}),p=r(function(t,n){var e=t;switch(e.ctor){case"TypeExport":var o=e._0;return f(u,function(t){return t.types},r(function(t,r){return v.update(t,{types:r})}),a(s,o,e._1),f(u,function(t){return t.aliases},r(function(t,r){return v.update(t,{aliases:r})}),_(o),n));case"FunctionExport":return n;default:return v.crashCase("ExContext",{start:{line:474,column:13},end:{line:484,column:69}},e)("You can't import subset of subsets")}}),h=t;switch(h.ctor){case"AllExport":return f(u,function(t){return t.types},r(function(t,r){return v.update(t,{types:r})}),a(i,function(t){return t.types},o),f(u,function(t){return t.aliases},r(function(t,r){return v.update(t,{aliases:r})}),a(i,function(t){return t.aliases},o),c));case"SubsetExport":return l(U,p,c,h._0);default:return v.crashCase("ExContext",{start:{line:486,column:9},end:{line:496,column:77}},h)("You can't import something that's not a subset")}}),h_=n(function(t,r,n){return{ctor:"ArgumentedType",_0:t,_1:r,_2:n}}),v_=function(t){return{ctor:"SimpleType",_0:t}},g_={ctor:"TypeAlias"},m_={ctor:"Type"},b_=r(function(t,r){var n=t(r);switch(n.ctor){case"TypeVariable":return n;case"TypeConstructor":return a(Qc,n._0,a(G,b_(t),n._1));case"TypeRecordConstructor":return a(Uc,a(b_,t,n._0),a(G,Zt(b_(t)),n._1));case"TypeTuple":return jc(a(G,b_(t),n._0));case"TypeRecord":return Vc(a(G,Zt(b_(t)),n._0));default:return a(Pc,a(b_,t,n._0),a(b_,t,n._1))}}),y_=r(function(t,r){return t(function(){var n=r;switch(n.ctor){case"TypeVariable":return n;case"TypeConstructor":return a(Qc,n._0,a(G,y_(t),n._1));case"TypeTuple":return jc(a(G,y_(t),n._0));case"TypeRecord":return Vc(a(G,Zt(y_(t)),n._0));case"TypeRecordConstructor":return a(Uc,a(y_,t,n._0),a(G,Zt(y_(t)),n._1));default:return a(Pc,a(y_,t,n._0),a(y_,t,n._1))}}())}),k_=(r(function(t,r){return l(n_,r.mod,t,r)}),n(function(t,n,e){var o=function(t){var r=t;return"TypeVariable"===r.ctor?r._0:v.crashCase("ExAlias",{start:{line:169,column:13},end:{line:177,column:46}},r)(a(k["++"],"type can only take variables. ",a(k["++"],T(r),"is incorrect")))},c=l(U,g(Wn),Rn,l(P,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),a(G,o,t),n));return a(y_,function(t){var r=t;return"TypeVariable"===r.ctor?a(N,r,a(vn,r._0,c)):r},e)})),T_=n(function(t,n,e){var o=r(function(t,r){var o=r,c=t;if("TypeConstructor"===c.ctor&&"::"===c._0.ctor&&"[]"===c._0._1.ctor){var u=c._0._0;return a(ui["=>"],{ctor:"::",_0:u,_1:o._0},s(s_,e.mod,n,u,W(c._1),o._1))}return v.crashCase("ExAlias",{start:{line:116,column:13},end:{line:122,column:65}},c)("Type can only start with a tag")});return l(U,o,{ctor:"_Tuple2",_0:{ctor:"[]"},_1:e},t)}),w_=n(function(t,r,n){var e=r;if("TypeConstructor"===e.ctor&&"::"===e._0.ctor&&"[]"===e._0._1.ctor){var o=e._0._0,c=l(T_,n,o,t),u=c._0,i=c._1,_=W(e._1),s=Wc(a(k["++"],"@",o)),p=d(c_,t.mod,_,m_,s,v_(s),u);return f(f_,t.mod,o,p,i)}return v.crashCase("ExAlias",{start:{line:80,column:5},end:{line:98,column:68}},e)(a(k["++"],"Wrong type declaration ",T(e)))}),x_=n(function(t,r,n){var e=r;if("TypeConstructor"===e.ctor&&"::"===e._0.ctor&&"[]"===e._0._1.ctor){var o=e._0._0,c=e._1,u=l(h_,o,c,n),i=W(c),_=d(c_,t.mod,i,g_,n,u,{ctor:"[]"});return f(f_,t.mod,o,_,t)}return v.crashCase("ExAlias",{start:{line:60,column:5},end:{line:75,column:74}},e)(a(k["++"],"Wrong type alias declaration ",T(e)))}),E_=r(function(t,r){var n=t;if("SimpleType"===n.ctor)return n._0;var e=n._1,o=W(e),c=W(r);return v.eq(c,o)?l(k_,e,r,n._2):l(o_,o,r,n._0)}),B_=r(function(t,o){var c=e(function(n,e,o,c){return a(N,e,a(A,function(t){switch(t.ctor){case"TypeRecordConstructor":case"TypeApplication":return S(t);default:return R}},a($,function(t){return a(E_,t.typeBody,c)},a(oi,function(t){return a(r(function(t,r){return v.eq(t,r)}),g_,function(t){return t.aliasType}(t))},l(n_,n,o,t)))))}),u=n(function(r,n,e){return function(t){var n=t;return f(c,n._0,r,n._1,e)}(a(Bi,t.mod,n))});return a(y_,function(t){var r=t;return"TypeConstructor"===r.ctor?l(u,t,r._0,r._1):r},o)}),C_=n(function(t,r,n){var e=W(ii(a(B_,t,n)));return l(d_,t,r,a(u_,e-1,n))}),N_=r(function(t,r){var n=t;switch(n.ctor){case"TypeAliasDeclaration":return l(x_,r,n._0,n._1);case"TypeDeclaration":return l(w_,r,n._0,n._1);case"FunctionTypeDeclaration":return l(C_,r,n._0,n._1);default:return r}}),R_=r(function(t,r){return l(U,N_,t,r)}),A_=r(function(t,e){var o=n(function(r,n,e){for(;;){var o=n;if("[]"===o.ctor)return v.eq(r,{ctor:"[]"})?gt(rt(e)):vt(r);var c=o._1,u=o._0,i=a(k["++"],r,c);if(a(j,a(m,t,u),i)){var _={ctor:"[]"},l=i,f={ctor:"::",_0:u,_1:e};r=_,n=l,e=f}else{var s={ctor:"::",_0:u,_1:r},d=c,p=e;r=s,n=d,e=p}}});return r(function(r,n){return a(go,function(n){return a(j,t(n),r)},n)}),l(o,{ctor:"[]"},e,{ctor:"[]"})}),S_=r(function(t,r){return a(Y,function(r){return!l(m,H,t,r)},r)}),$_=function(t){var r=_i(t);return"::"===r.ctor&&"[]"===r._1.ctor?"Variable"===r._0.ctor&&"::"===r._0._0.ctor&&"[]"===r._0._0._1.ctor?r._0._0._0:v.crashCase("ExVariable",{start:{line:133,column:5},end:{line:143,column:40}},r)(a(k["++"],T(r._0)," is not a variable")):a(N,"",a($,$_,K(r)))},L_=function(t){var n={ctor:"[]"},e=function(t){return l(V,r(function(t,r){return a(k["++"],t,r)}),{ctor:"[]"},a(G,L_,t))},o=t;t:do{r:do{switch(o.ctor){case"Record":return e(a(G,rr,o._0));case"Tuple":return e(o._0);case"Variable":if("::"===o._0.ctor&&"[]"===o._0._1.ctor)return function(t){return{ctor:"::",_0:t,_1:{ctor:"[]"}}}(o._0._0);break t;case"List":return e(o._0);case"Application":return e({ctor:"::",_0:o._0,_1:{ctor:"::",_0:o._1,_1:{ctor:"[]"}}});case"BinOp":if("Variable"!==o._0.ctor||"::"!==o._0._0.ctor||"[]"!==o._0._0._1.ctor)break r;switch(o._0._0._0){case"::":return e({ctor:"::",_0:o._1,_1:{ctor:"::",_0:o._2,_1:{ctor:"[]"}}});case"as":if("Variable"===o._2.ctor){if("Variable"===o._1.ctor)return e({ctor:"::",_0:o._1,_1:{ctor:"::",_0:o._2,_1:{ctor:"[]"}}});if("::"===o._2._0.ctor&&"[]"===o._2._0._1.ctor)return e({ctor:"::",_0:o._1,_1:{ctor:"::",_0:o._2,_1:{ctor:"[]"}}});break r}break r;default:break r}case"Case":return a(S_,L_(o._0),a(ct,g(O_),o._1));case"Let":return a(ct,g(O_),o._0);case"Lambda":return a(S_,a(ct,L_,o._0),L_(o._1));default:break t}}while(!1);return e({ctor:"::",_0:o._1,_1:{ctor:"::",_0:o._2,_1:{ctor:"[]"}}})}while(!1);return n},O_=r(function(t,r){return a(S_,L_(t),L_(r))}),I_=function(t){var r=_i(t);return"::"===r.ctor&&"[]"===r._1.ctor?"Variable"===r._0.ctor&&"::"===r._0._0.ctor&&"[]"===r._0._0._1.ctor?{ctor:"::",_0:r._0._0._0,_1:{ctor:"[]"}}:L_(r._0):a(N,{ctor:"[]"},a($,I_,K(r)))},z_=function(t){var r=_i(t);return"::"===r.ctor&&"[]"===r._1.ctor?{ctor:"[]"}:a(N,{ctor:"[]"},a($,ct(I_),Q(r)))},q_=r(function(t,n){var e=t,o=n;return a(r(function(t,r){return a(J,a(m,H,r),t)}),I_(e._0),a(S_,z_(o._0),L_(o._1)))}),M_=function(t){var n=a(A_,r(function(t,r){return!a(q_,t,r)}),t);return"Ok"===n.ctor?n._0:(v.crash("ExVariable",{start:{line:122,column:21},end:{line:122,column:32}})(a(k["++"],"Couldn't find a solution to ",T(a(G,nr,n._0)))),{ctor:"[]"})},F_=function(t){return a(mo,r(function(t,r){return a(q_,t,r)&&a(q_,r,t)}),t)},D_=r(function(t,r){return a(ze,r,t.variables)||t.inArgs?r:a(k["++"],r,"()")}),P_=r(function(t,n){var e=r(function(t,r){return v.update(r,{variables:a(Fe,a($i,!0,t),r.variables)})});return l(U,e,n,l(V,r(function(t,r){return a(k["++"],t,r)}),{ctor:"[]"},a(G,L_,t)))}),J_=function(t){return a(Y,function(t){var r=t;return v.cmp(r._1,1)>0},a(G,Zt(function(t){return a(r(function(t,r){return t+r}),-1,W(t))}),a(pt,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),a(G,ii,a(N,{ctor:"[]"},a($,ii,t))))))},j_=r(function(t,r){return a(Ui,t,r)?"p":""}),V_=o(function(t,r,n,e,o){var c={ctor:"_Tuple2",_0:e,_1:l(Hi,"nocurry",n,t)};t:do{if(!0===c._1){if(0===c._0)break t;return""}if(0===c._0)break t;var u=c._0,i=a(G,function(t){var r=t;return a(k["++"],"{",a(k["++"],T(r._0),a(k["++"],", ",a(k["++"],T(r._1),"}"))))},o),_=a(j_,t,n),f=Di(n)?Ti(n):a($i,!0,n);return v.eq(i,{ctor:"[]"})||v.eq(_,"p")?a(Vt,"",{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"curry",_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:f,_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:T(u),_1:{ctor:"[]"}}}}}}}):a(Vt,"",{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"curry",_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:f,_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:T(u),_1:{ctor:"::",_0:", lambdas: [",_1:{ctor:"::",_0:a(Vt,", ",i),_1:{ctor:"::",_0:"]",_1:{ctor:"[]"}}}}}}}}}})}while(!1);return""}),U_=c(function(t,n,e,o,c,u){var i={ctor:"_Tuple2",_0:Fi(e),_1:o};switch(i._0.ctor){case"Custom":return a(Vt,"",{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"def",_1:{ctor:"::",_0:a(j_,t,e),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:Ti(e),_1:{ctor:"::",_0:"(",_1:{ctor:"::",_0:a(Vt,", ",l(m,r(function(t,r){return a(k["++"],t,r)}),yi(c),a(G,n(a(P_,o,t)),o))),_1:{ctor:"::",_0:") do",_1:{ctor:"::",_0:Ri(t.indent+1),_1:{ctor:"::",_0:a(n,a(P_,o,Xi(t)),u),_1:{ctor:"::",_0:a(Vt,"",a(G,function(t){return a(k["++"],".(",a(k["++"],t,")"))},yi(c))),_1:{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"end",_1:{ctor:"[]"}}}}}}}}}}}}}});case"Builtin":if("::"===i._1.ctor&&"::"===i._1._1.ctor&&"[]"===i._1._1._1.ctor){var _=i._1._1._0,f=i._1._0;return a(Vt,"",{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"def",_1:{ctor:"::",_0:a(j_,t,e),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:a(n,a(P_,{ctor:"::",_0:f,_1:{ctor:"[]"}},t),f),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:Ti(e),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:a(n,a(P_,{ctor:"::",_0:_,_1:{ctor:"[]"}},t),_),_1:{ctor:"::",_0:" do",_1:{ctor:"::",_0:Ri(t.indent+1),_1:{ctor:"::",_0:a(n,a(P_,o,Xi(t)),u),_1:{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"end",_1:{ctor:"[]"}}}}}}}}}}}}}}})}return v.crashCase("ExFunction",{start:{line:113,column:5},end:{line:195,column:38}},i)(a(k["++"],"operator ",a(k["++"],e,a(k["++"]," has to have 2 arguments but has ",T(o)))));default:var s=yi(c),d=function(t){return v.cmp(W(s),0)>0?t:""},p=a(G,function(t){return Yo(z(t))},s);return a(Vt,"",{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"def",_1:{ctor:"::",_0:a(j_,t,e),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:a($i,!0,e),_1:{ctor:"::",_0:"(",_1:{ctor:"::",_0:a(Vt,", ",a(G,n(Wi(t)),a(k["++"],o,p))),_1:{ctor:"::",_0:") do",_1:{ctor:"::",_0:Ri(t.indent+1),_1:{ctor:"::",_0:d("("),_1:{ctor:"::",_0:a(n,a(P_,a(k["++"],o,p),Xi(t)),u),_1:{ctor:"::",_0:d(")"),_1:{ctor:"::",_0:a(Vt,"",a(G,function(t){return a(k["++"],".(",a(k["++"],t,")"))},s)),_1:{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"end",_1:{ctor:"[]"}}}}}}}}}}}}}}}})}}),W_=c(function(t,n,e,o,c,u){var i=function(t){return l(P,m(Fo(Yo({ctor:"::",_0:"as",_1:{ctor:"[]"}}))),o,t)},_=a(A,function(t){return a(vn,e,function(t){return t.definitions}(t))},a(vn,t.mod,t.commons.modules)),f=a(N,0,a($,function(t){return t.arity},_)),p=function(r){var o=r,c=o._1,u=o._0,_=u;if("Tuple"===_.ctor){var a=_._0;return d(U_,t,n,e,i(a),f-W(i(a)),c)}return d(U_,t,n,e,{ctor:"::",_0:u,_1:{ctor:"[]"}},f-1,c)},h=J_(a($,function(t){return t.def},_));return l(Hi,"nodef",e,t)?s(V_,t,n,e,f,h):a(k["++"],s(V_,t,n,e,f,h),l(m,r(function(t,r){return a(k["++"],t,r)}),"\n",l(V,r(function(t,r){return a(k["++"],t,r)}),"",a(G,p,u))))}),H_=o(function(t,r,n,e,o){var c=a(A,function(t){return a(vn,n,function(t){return t.definitions}(t))},a(vn,t.mod,t.commons.modules)),u=a(N,0,a($,function(t){return t.arity},c)),i=J_(a($,function(t){return t.def},c));return l(Hi,"nodef",n,t)?s(V_,t,r,n,u,i):a(k["++"],s(V_,t,r,n,u,i),a(k["++"],d(U_,t,r,n,e,u-W(e),o),"\n"))}),Q_=n(function(t,r,n){var e=function(n){return a(Vt,",",a(G,r(t),n))},o=n;t:do{switch(o.ctor){case"TryFfi":if("String"===o._0.ctor&&"String"===o._1.ctor)return"Tuple"===o._2.ctor?a(k["++"],"try_catch fn _ -> ",a(k["++"],o._0._0,a(k["++"],".",a(k["++"],o._1._0,a(k["++"],"(",a(k["++"],e(o._2._0),a(k["++"],")"," end"))))))):a(k["++"],"try_catch fn _ -> ",a(k["++"],o._0._0,a(k["++"],".",a(k["++"],o._1._0,a(k["++"],"(",a(k["++"],a(r,t,o._2),a(k["++"],")"," end")))))));break t;case"Ffi":if("String"===o._0.ctor&&"String"===o._1.ctor)return"Tuple"===o._2.ctor?a(k["++"],o._0._0,a(k["++"],".",a(k["++"],o._1._0,a(k["++"],"(",a(k["++"],e(o._2._0),")"))))):a(k["++"],o._0._0,a(k["++"],".",a(k["++"],o._1._0,a(k["++"],"(",a(k["++"],a(r,t,o._2),")")))));break t;case"Lffi":if("String"===o._0.ctor)return"Tuple"===o._1.ctor?a(k["++"],o._0._0,a(k["++"],"(",a(k["++"],e(o._1._0),")"))):a(k["++"],o._0._0,a(k["++"],"(",a(k["++"],a(r,t,o._1),")")));break t;default:var c=yi(o._0);return a(k["++"],"fn (",a(k["++"],a(Vt,",",c),a(k["++"],") -> ",a(k["++"],a(r,t,o._1),a(k["++"],a(Vt,"",a(G,function(t){return a(k["++"],".(",a(k["++"],t,")"))},c))," end")))))}}while(!1);return v.crashCase("ExFfi",{start:{line:161,column:9},end:{line:214,column:45}},o)("Wrong ffi call")}),K_=r(function(t,r){return{ctor:"Flambda",_0:t,_1:r}}),X_=n(function(t,n,e){var o=W(e)-1,c=a(dt,1,o);return a(Vt,", ",a(G,function(r){var e=r,o=e._0,c=e._1;if("[]"===c.ctor)return v.crashCase("ExFfi",{start:{line:126,column:21},end:{line:141,column:71}},c)("Impossible");if("[]"===c._1.ctor)return a(k["++"],"a",T(o));var u=K_(W(c)-1),i=Yo({ctor:"::",_0:a(k["++"],"a",T(o)),_1:{ctor:"[]"}});return l(Q_,t,n,u(i))},l(P,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),c,e)))}),G_=o(function(t,r,n,e,o){var c=G(function(t){return Yo(z(t))}),u=function(t){return l(X_,t,r,e)},i=(_i(o),a(A,function(t){return a(vn,n,function(t){return t.definitions}(t))},a(vn,t.mod,t.commons.modules))),_={ctor:"_Tuple2",_0:i,_1:_i(o)};t:do{if("_Tuple2"!==_.ctor)break t;if("Nothing"===_._0.ctor)return v.crashCase("ExFfi",{start:{line:44,column:9},end:{line:109,column:51}},_)("Ffi requires type definition");if("::"!==_._1.ctor||"Variable"!==_._1._0.ctor||"::"!==_._1._0._0.ctor||"[]"!==_._1._0._0._1.ctor||"::"!==_._1._1.ctor||"String"!==_._1._1._0.ctor||"::"!==_._1._1._1.ctor||"String"!==_._1._1._1._0.ctor||"[]"!==_._1._1._1._1.ctor)break t;switch(_._1._0._0._0){case"ffi":var d=_._1._1._0._0,p=_._1._1._1._0._0,h=_._0._0,g=a(bi,"a",h.arity);return a(k["++"],s(V_,t,r,n,h.arity,{ctor:"[]"}),a(k["++"],f(Qi,t,"noverify",n,a(k["++"],Ri(t.indent),a(k["++"],"verify as: ",a(k["++"],d,a(k["++"],".",a(k["++"],p,a(k["++"],"/",T(h.arity)))))))),a(k["++"],Ri(t.indent),a(k["++"],"def",a(k["++"],a(j_,t,n),a(k["++"]," ",a(k["++"],a($i,!0,n),a(k["++"],"(",a(k["++"],a(Vt,", ",g),a(k["++"],")",a(k["++"],", do: ",a(k["++"],d,a(k["++"],".",a(k["++"],p,a(k["++"],"(",a(k["++"],u(a(P_,c(g),t)),")"))))))))))))))));case"tryFfi":var m=_._0._0,g=a(bi,"a",m.arity);return a(k["++"],s(V_,t,r,n,m.arity,{ctor:"[]"}),a(k["++"],Ri(t.indent),a(k["++"],"def",a(k["++"],a(j_,t,n),a(k["++"]," ",a(k["++"],a($i,!0,n),a(k["++"],"(",a(k["++"],a(Vt,", ",a(bi,"a",m.arity)),a(k["++"],")",a(k["++"]," do ",a(k["++"],Ri(t.indent+1),a(k["++"],"try_catch fn -> ",a(k["++"],Ri(t.indent+2),a(k["++"],_._1._1._0._0,a(k["++"],".",a(k["++"],_._1._1._1._0._0,a(k["++"],"(",a(k["++"],u(a(P_,c(g),t)),a(k["++"],")",a(k["++"],Ri(t.indent+1),a(k["++"],"end",a(k["++"],Ri(t.indent),"end"))))))))))))))))))))));default:break t}}while(!1);return v.crashCase("ExFfi",{start:{line:44,column:9},end:{line:109,column:51}},_)("Wrong ffi definition")}),Y_=(n(function(t,r,n){return{ctor:"TryFfi",_0:t,_1:r,_2:n}}),n(function(t,r,n){return{ctor:"Ffi",_0:t,_1:r,_2:n}}),r(function(t,r){return{ctor:"Lffi",_0:t,_1:r}}),r(function(t,n){t:for(;;){var e=n,o={ctor:"_Tuple2",_0:e.aliasType,_1:e.body};r:do{n:do{if("_Tuple2"!==o.ctor)break r;switch(o._1.ctor){case"TypeConstructor":if("Type"===o._0.ctor)break n;if("::"===o._1._0.ctor&&"[]"===o._1._0._1.ctor)return R;break r;case"TypeRecord":if("Type"===o._0.ctor)break n;var c=o._1._0,u=a(G,function(t){return Yo(z(t))},a(G,function(t){return a(r(function(t,r){return a(k["++"],t,r)}),"arg",T(t))},a(dt,1,a(r(function(t,r){return t+r}),0-W(t),W(c))))),i=a(G,tr(nr),l(P,m(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}})),a(k["++"],t,u),c));return S(a(Po,u,Wo(i)));case"TypeTuple":if("Type"===o._0.ctor)break n;if("::"===o._1._0.ctor&&"[]"===o._1._0._1.ctor){var _=t,f=v.update(e,{typeBody:v_(o._1._0._0)});t=_,n=f;continue t}var t=a(G,function(t){return Yo(z(t))},a(G,function(t){return a(r(function(t,r){return a(k["++"],t,r)}),"arg",T(t))},a(dt,1,W(o._1._0))));return S(a(Po,t,Xo(t)));case"TypeVariable":if("Type"===o._0.ctor)break n;return S(Yo({ctor:"::",_0:o._1._0,_1:{ctor:"[]"}}));default:if("Type"===o._0.ctor)break n;break r}}while(!1);return R}while(!1);return R}})),Z_=(r(function(t,r){return a(N,r,a($,function(t){return a(k["++"],t,a(k["++"],".",r))},a(vn,"name",t.importedTypes)))}),n(function(t,r,n){var e=n;switch(e.ctor){case"SubsetExport":return a(ct,a(Z_,t,r),e._0);case"TypeExport":return{ctor:"::",_0:e._0,_1:{ctor:"[]"}};case"AllExport":return a(N,{ctor:"[]"},a($,function(t){return a(k["++"],an(t.aliases),an(t.types))},a(vn,r,t.commons.modules)));default:return{ctor:"[]"}}})),ta=n(function(t,r,n){t:for(;;){var e=n;switch(e.ctor){case"TypeTuple":if("[]"===e._0.ctor)return"no_return";if("[]"===e._0._1.ctor){var o=t,c=r,u=e._0._0;t=o,r=c,n=u;continue t}return a(k["++"],"{",a(k["++"],a(Vt,", ",a(G,a(ta,t,r),e._0)),"}"));case"TypeVariable":if("number"===e._0)return"number";var i=e._0,_=Kt(i);return"Just"===_.ctor&&"_Tuple2"===_._0.ctor&&"@"===_._0._0.valueOf()?a($i,!0,_._0._1):r.inTypeDefiniton?i:"any";case"TypeConstructor":var s=a(Bi,r.mod,e._0),d=s._0,p=s._1,h=v.eq(d,r.mod)?a(N,"",a($,function(t){return a(k["++"],t,".")},a(vn,p,r.importedTypes))):a(k["++"],d,".");return a(k["++"],h,f(ra,t,r,p,e._1));case"TypeRecord":return a(k["++"],"%{",a(k["++"],Ri(r.indent+1),a(k["++"],a(Vt,a(k["++"],",",Ri(r.indent+1)),a(G,function(n){var e=n;return a(k["++"],a($i,!1,e._0),a(k["++"],": ",l(ta,t,Xi(r),e._1)))},e._0)),a(k["++"],Ri(r.indent),"}"))));case"TypeRecordConstructor":return a(k["++"],"%{",a(k["++"],Ri(r.indent+1),a(k["++"],a(Vt,a(k["++"],", ",Ri(r.indent+1)),l(na,Xi(r),t,e)),a(k["++"],Ri(r.indent),"}"))));default:var g=e._1,m=e._0;return t?function(n){var e=n;return a(k["++"],"(",a(k["++"],a(Vt,", ",a(G,a(ta,t,Xi(r)),{ctor:"::",_0:m,_1:e._1})),a(k["++"]," -> ",a(k["++"],a(N,"",a($,a(ta,t,r),e._0)),")"))))}(Ei(ii(g))):a(k["++"],"(",a(k["++"],l(ta,t,r,m),a(k["++"]," -> ",a(k["++"],l(ta,t,r,g),")"))))}}}),ra=e(function(t,r,n,e){var o={ctor:"_Tuple2",_0:n,_1:e};t:do{if("::"===o._1.ctor){if("[]"!==o._1._1.ctor)break t;switch(o._0){case"List":return a(k["++"],"list(",a(k["++"],l(ta,t,r,o._1._0),")"));case"Maybe":return a(k["++"],"{",a(k["++"],l(ta,t,r,o._1._0),"} | nil"));case"Just":return l(ta,t,r,o._1._0);case"Err":return a(k["++"],"{:error, ",a(k["++"],l(ta,t,r,o._1._0),"}"));case"Ok":var c=o._1._0;return v.eq(c,jc({ctor:"[]"}))?"ok":a(k["++"],"{:ok,",a(k["++"],l(ta,t,r,c),"}"));default:break t}}else switch(o._0){case"String":return"String.t";case"Char":return"integer";case"Bool":return"boolean";case"Int":return"integer";case"Pid":return"pid";case"Float":return"float";case"Nothing":return"nil";default:return a($i,!0,o._0)}}while(!1);return a(k["++"],a($i,!0,o._0),a(k["++"],"(",a(k["++"],a(Vt,", ",a(G,a(ta,t,r),o._1)),")")))}),na=n(function(t,r,n){t:for(;;){var e=function(n){var e=n;return a(k["++"],e._0,a(k["++"],": ",l(ta,r,t,e._1)))},o=n;r:do{switch(o.ctor){case"TypeRecordConstructor":switch(o._0.ctor){case"TypeConstructor":if("::"===o._0._0.ctor&&"[]"===o._0._0._1.ctor){var c=a($,a(na,t,r),a($,function(t){return a(E_,t.typeBody,o._0._1)},l(n_,t.mod,o._0._0._0,t)));return a(k["++"],a(G,e,o._1),a(N,{ctor:"::",_0:"",_1:{ctor:"[]"}},c))}break r;case"TypeRecord":return a(G,e,a(k["++"],o._1,o._0._0));case"TypeVariable":return a(G,e,o._1);case"TypeTuple":if("::"===o._0._0.ctor&&"[]"===o._0._0._1.ctor){var u=t,i=r,_=a(Uc,o._0._0._0,o._1);t=u,r=i,n=_;continue t}break r;case"TypeRecordConstructor":return a(k["++"],a(G,e,o._1),l(na,t,r,o._0));default:break r}case"TypeRecord":return a(G,e,o._0);default:break r}}while(!1);return v.crashCase("ExType",{start:{line:130,column:9},end:{line:158,column:79}},o)(a(k["++"],"Wrong type record constructor ",T(o)))}}),ea=(ta(!0),ta(!1)),oa=(r(function(t,r){return a(k["++"],"() :: ",a(ea,t,r))}),r(function(t,r){var n=Ei(ii(r));return"Just"===n._0.ctor?a(k["++"],"(",a(k["++"],a(Vt,", ",a(G,ea(t),n._1)),a(k["++"],") :: ",a(ea,t,n._0._0)))):v.crashCase("ExType",{start:{line:266,column:5},end:{line:276,column:37}},n)("impossible")})),ca=r(function(t,r){var n=r;return"TypeConstructor"===n.ctor&&"::"===n._0.ctor&&"[]"===n._0._1.ctor?"[]"===n._1.ctor?Li(n._0._0):a(k["++"],"{",a(k["++"],Li(n._0._0),a(k["++"],", ",a(k["++"],a(Vt,", ",a(G,ea(t),n._1)),"}")))):v.crashCase("ExType",{start:{line:283,column:5},end:{line:295,column:96}},n)(a(k["++"],"I am looking for union type constructor. But got ",T(n)))}),ua=(e(function(t,r,n,e){return a(N,e,$(function(r){var e=r,o=e.typeBody,c=e.parentModule;return v.eq(c,t.mod)?a(ea,t,a(E_,o,n)):"Type"===e.aliasType.ctor?a(k["++"],c,a(k["++"],".",a(ea,t,a(E_,o,n)))):a(ea,v.update(t,{mod:c}),a(E_,o,n))})(l(n_,t.mod,r,t)))}),function(t){var r=t;return"BinOp"===r.ctor&&"Variable"===r._0.ctor&&"::"===r._0._0.ctor&&"|>"===r._0._0._0&&"[]"===r._0._0._1.ctor?"BinOp"===r._2.ctor&&"Variable"===r._2._0.ctor&&"::"===r._2._0._0.ctor&&"|>"===r._2._0._0._0&&"[]"===r._2._0._0._1.ctor?a(k["++"],{ctor:"::",_0:r._1,_1:{ctor:"[]"}},ua(r._2)):a(k["++"],{ctor:"::",_0:r._1,_1:{ctor:"[]"}},{ctor:"::",_0:r._2,_1:{ctor:"[]"}}):{ctor:"::",_0:r,_1:{ctor:"[]"}}}),ia=o(function(t,n,e,o,c){t:for(;;){var u=e;switch(u){case"//":return a(k["++"],"div(",a(k["++"],a(n,t,o),a(k["++"],", ",a(k["++"],a(n,t,c),")"))));case"%":return a(k["++"],"rem(",a(k["++"],a(n,t,o),a(k["++"],", ",a(k["++"],a(n,t,c),")"))));case"^":return a(k["++"],":math.pow(",a(k["++"],a(n,t,o),a(k["++"],", ",a(k["++"],a(n,t,c),")"))));case"::":return a(k["++"],"[",a(k["++"],a(n,t,o),a(k["++"]," | ",a(k["++"],a(n,t,c),"]"))));case"<<":var i=t,_=n,l=c,f=o;t=i,n=_,e=">>",o=l,c=f;continue t;case"<|":var s=t,d=n,p=c,h=o;t=s,n=d,e="|>",o=p,c=h;continue t;case"|>":return a(k["++"],"(",a(k["++"],a(n,t,o),a(k["++"],a(Vt,"",a(G,a(m,r(function(t,r){return a(k["++"],t,r)}),").()"),a(G,r(function(t,r){return a(k["++"],t,r)})(a(k["++"],Ri(t.indent),"|> (")),a(G,n(t),ua(c))))),")")));case"as":return a(k["++"],a(n,t,o),a(k["++"]," = ",a(n,t,c)));default:var g=u,b=Fi(g);switch(b.ctor){case"Builtin":return a(Vt,"",{ctor:"::",_0:"(",_1:{ctor:"::",_0:a(n,t,o),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:Ti(g),_1:{ctor:"::",_0:" ",_1:{ctor:"::",_0:a(n,t,c),_1:{ctor:"::",_0:")",_1:{ctor:"[]"}}}}}}}});case"Custom":return a(k["++"],Ti(g),a(k["++"],"(",a(k["++"],a(n,t,o),a(k["++"],", ",a(k["++"],a(n,t,c),")")))));default:return v.crashCase("ExOperator",{start:{line:52,column:13},end:{line:66,column:60}},b)(a(k["++"],"Illegal operator ",g))}}}}),_a=function(t){return{ctor:"Access",_0:t}},aa=function(t){var r=t;return"AccessFunction"===r.ctor?_a(a($i,!0,r._0)):v.crashCase("ExSelector",{start:{line:26,column:5},end:{line:31,column:65}},r)("The only allowed selectors are: .field")},la={ctor:"Update"},fa={ctor:"Put"},sa={ctor:"Get"},da=function(t){var n=function(t){return a(ht,1,Lt(a(Wt,Ct,t)))};return a($,function(r){return{ctor:"_Tuple2",_0:r,_1:n(t)}},function(t){return l(U,r(function(r,n){var e=r,o=n;return"Nothing"===o.ctor?a(gr,mr(e._0),t)?S(e._1):R:o}),R,{ctor:"::",_0:{ctor:"_Tuple2",_0:"updateIn\\d?",_1:la},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"putIn\\d?",_1:fa},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"getIn\\d?",_1:sa},_1:{ctor:"[]"}}}})}(t))},pa=n(function(t,r,n){return{ctor:"AccessMacro",_0:t,_1:r,_2:n}}),ha=r(function(t,n){var e=r(function(t,r){var n=a(x,W(r),t);switch(n.ctor){case"LT":return v.crashCase("ExSelector",{start:{line:38,column:13},end:{line:50,column:65}},n)(a(k["++"],"Access macros [updateIn/getIn/putIn] cannot be partially applied. Expecting ",a(k["++"],T(t)," selector arguments.")));case"EQ":return{ctor:"_Tuple2",_0:a(G,aa,r),_1:{ctor:"[]"}};default:return a(tr,G(aa),a(Ke,t,r))}}),o={ctor:"_Tuple2",_0:t,_1:n};return"_Tuple2"===o.ctor&&"Variable"===o._0.ctor&&"::"===o._0._0.ctor&&"[]"===o._0._0._1.ctor?a($,function(t){var r=t,n=r._1,c=a(e,n,o._1),u=c._0,i=c._1;return{ctor:"_Tuple2",_0:l(pa,r._0,n,u),_1:i}},da(o._0._0._0)):R}),va=function(t){t:for(;;){var r=t;switch(r.ctor){case"Application":var n=r._0;t=n;continue t;case"Variable":return"::"===r._0.ctor&&"[]"===r._0._1.ctor?"()"===r._0._0||Si(r._0._0):function(t){return va(Yo({ctor:"::",_0:t._1,_1:{ctor:"[]"}}))}(a(Bi,"",r._0));default:return!1}}},ga=function(t){var r=t;return"TypeAlias"===r.aliasType.ctor?S(r):R},ma=function(t){t:for(;;){var r=t;r:do{switch(r.ctor){case"Application":var n=r._0;t=n;continue t;case"Variable":if("::"===r._0.ctor&&"[]"===r._0._1.ctor)return a(H,r._0._0,{ctor:"::",_0:"tryFfi",_1:{ctor:"::",_0:"ffi",_1:{ctor:"::",_0:"lffi",_1:{ctor:"::",_0:"flambda",_1:{ctor:"::",_0:"updateIn",_1:{ctor:"::",_0:"updateIn2",_1:{ctor:"::",_0:"updateIn3",_1:{ctor:"::",_0:"updateIn4",_1:{ctor:"::",_0:"updateIn5",_1:{ctor:"::",_0:"putIn",_1:{ctor:"::",_0:"putIn",_1:{ctor:"::",_0:"putIn2",_1:{ctor:"::",_0:"putIn3",_1:{ctor:"::",_0:"putIn4",_1:{ctor:"::",_0:"putIn5",_1:{ctor:"::",_0:"getIn",_1:{ctor:"::",_0:"getIn2",_1:{ctor:"::",_0:"getIn3",_1:{ctor:"::",_0:"getIn4",_1:{ctor:"::",_0:"getIn5",_1:{ctor:"[]"}}}}}}}}}}}}}}}}}}}}});break r;default:break r}}while(!1);return!1}},ba=function(t){var r=t;return"Application"===r.ctor?ma(t)||va(t)?a(k["++"],ba(r._0),{ctor:"::",_0:r._1,_1:{ctor:"[]"}}):{ctor:"::",_0:t,_1:{ctor:"[]"}}:{ctor:"::",_0:r,_1:{ctor:"[]"}}},ya=r(function(t,r){var n=r;t:do{switch(n.ctor){case"Variable":return a(Ia,t,n._0);case"Application":return a(Ba,t,n);case"RecordUpdate":return a(k["++"],"%{",a(k["++"],a($i,!0,n._0),a(k["++"]," | ",a(k["++"],a(Vt,", ",a(G,function(r){var n=r;return a(k["++"],n._0,a(k["++"],": ",a(ya,t,n._1)))},n._1)),"}"))));case"Access":return"Variable"===n._0.ctor?a(k["++"],Oi(n._0._0),a(k["++"],".",a(Vt,".",a(G,$i(!0),n._1)))):a(k["++"],a(ya,t,n._0),a(k["++"],".",a(Vt,".",n._1)));case"AccessFunction":return a(k["++"],"(fn a -> a.",a(k["++"],a($i,!0,n._0)," end)"));case"BinOp":if("Variable"===n._0.ctor&&"::"===n._0._0.ctor&&"[]"===n._0._0._1.ctor)return s(ia,t,ya,n._0._0._0,n._1,n._2);break t;default:break t}}while(!1);return a(ka,t,n)}),ka=r(function(t,n){var e=n;switch(e.ctor){case"Case":return l(Ta,t,e._0,e._1);case"Lambda":return l(Ea,t,e._0,e._1);case"If":return"If"===e._2.ctor?a(Vt,"",a(k["++"],{ctor:"::",_0:"cond do",_1:{ctor:"[]"}},a(k["++"],a(Oa,Xi(t),e),{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"end",_1:{ctor:"[]"}}}))):a(k["++"],"if ",a(k["++"],a(ya,t,e._0),a(k["++"]," do ",a(k["++"],a(ya,t,e._1),a(k["++"]," else ",a(k["++"],a(ya,t,e._2)," end"))))));case"Let":return function(t){var r=t;return a(k["++"],r._1,a(ya,r._0,e._1))}(l(m,U,{ctor:"_Tuple2",_0:t,_1:""},r(function(t,r){var n=r,e=n._0;return function(t){var r=t,o=r._0;return a(ui["=>"],a(Vi,o,e),a(k["++"],n._1,a(k["++"],r._1,Ri(o.indent))))}(function(){var r=t;return"[]"===r.ctor?a(ui["=>"],e,""):"_Tuple2"===r._0.ctor&&"[]"===r._1.ctor?a(xa,e,{ctor:"_Tuple2",_0:r._0._0,_1:r._0._1}):a($a,e,r)}())}))(F_(M_(e._0))));default:return a(La,t,n)}}),Ta=n(function(t,r,n){return t.inCaseOf?v.crash("ExExpression",{start:{line:595,column:9},end:{line:595,column:20}})(a(k["++"],"Module ",a(k["++"],t.mod,"\nBecause of a known bug in elm-ast parser, you can't reliably use nested case..of yet. Sorry"))):a(k["++"],"case ",a(k["++"],a(ya,t,r),a(k["++"]," do",a(k["++"],a(Vt,"",a(G,wa(a(P_,{ctor:"::",_0:r,_1:{ctor:"[]"}},v.update(t,{inCaseOf:!0}))),n)),a(k["++"],Ri(t.indent),"end")))))}),wa=r(function(t,r){var n=r,e=n._0;return a(k["++"],a(k["++"],Ri(t.indent+1),a(ya,Wi(t),e)),a(k["++"]," ->",a(k["++"],Ri(t.indent+2),a(ya,a(P_,{ctor:"::",_0:e,_1:{ctor:"[]"}},Xi(Xi(t))),n._1))))}),xa=r(function(t,n){var e=n,o=e._0,c=e._1,u=r(function(t,r){return"Let"===r.ctor?a(k["++"],"(",a(k["++"],Ri(t.indent+1),a(k["++"],a(ya,Xi(t),r),a(k["++"],Ri(t.indent),")")))):a(ya,t,r)}),i=_i(o);t:do{if("::"===i.ctor){if("Variable"===i._0.ctor&&"::"===i._0._0.ctor&&"[]"===i._0._0._1.ctor){if("[]"===i._1.ctor){var _=i._0;return a(ui["=>"],a(P_,{ctor:"::",_0:_,_1:{ctor:"[]"}},t),a(k["++"],a($i,!0,i._0._0._0),a(k["++"]," = ",a(u,a(P_,{ctor:"::",_0:_,_1:{ctor:"[]"}},t),c))))}var f=i._0,s=i._0._0._0,d=i._1;return Si(s)?a(ui["=>"],a(P_,d,t),a(k["++"],a(Ba,a(P_,d,t),o),a(k["++"]," = ",a(u,t,c)))):a(ui["=>"],a(P_,{ctor:"::",_0:f,_1:{ctor:"[]"}},t),a(k["++"],a($i,!0,s),a(k["++"]," = rec ",a(k["++"],a($i,!0,s),a(k["++"],", ",l(Ea,a(P_,{ctor:"::",_0:f,_1:{ctor:"[]"}},t),d,c))))))}if("[]"===i._1.ctor){var p=i._0;return a(ui["=>"],a(P_,{ctor:"::",_0:p,_1:{ctor:"[]"}},t),a(k["++"],a(ya,Wi(t),p),a(k["++"]," = ",a(u,a(P_,{ctor:"::",_0:p,_1:{ctor:"[]"}},t),c))))}break t}break t}while(!1);return a(ui["=>"],t,"")}),Ea=n(function(t,r,n){var e=v.update(t,{inCaseOf:!1}),o=r;if("::"===o.ctor){var c=o._0;return a(k["++"],"fn ",a(k["++"],a(ya,Wi(t),c),a(k["++"]," -> ",a(k["++"],l(Ea,a(P_,{ctor:"::",_0:c,_1:{ctor:"[]"}},e),o._1,n)," end"))))}return a(ya,e,n)}),Ba=r(function(t,r){var n=ba(r);t:do{r:do{if("::"!==n.ctor)break t;switch(n._0.ctor){case"Application":if("[]"===n._1.ctor)return l(Sa,t,n._0._0,n._0._1);break t;case"Variable":if("::"!==n._0._0.ctor||"[]"!==n._0._0._1.ctor)break r;switch(n._0._0._0){case"ffi":return v.crashCase("ExExpression",{start:{line:443,column:5},end:{line:489,column:70}},n)("Ffi inside function body is deprecated since Elchemy 0.3");case"tryFfi":return v.crashCase("ExExpression",{start:{line:443,column:5},end:{line:489,column:70}},n)("tryFfi inside function body is deprecated since Elchemy 0.3");case"lffi":return v.crashCase("ExExpression",{start:{line:443,column:5},end:{line:489,column:70}},n)("Lffi inside function body is deprecated since Elchemy 0.3");case"flambda":return v.crashCase("ExExpression",{start:{line:443,column:5},end:{line:489,column:70}},n)("Flambda is deprecated since Elchemy 0.3");case"Just":if("::"===n._1.ctor&&"[]"===n._1._1.ctor)return a(k["++"],"{",a(k["++"],a(ya,t,n._1._0),"}"));break r;case"Ok":if("::"===n._1.ctor&&"[]"===n._1._1.ctor)return a(k["++"],"{:ok, ",a(k["++"],a(ya,t,n._1._0),"}"));break r;case"Err":if("::"===n._1.ctor&&"[]"===n._1._1.ctor)return a(k["++"],"{:error, ",a(k["++"],a(ya,t,n._1._0),"}"));break r;default:break r}default:break t}}while(!1);var e=n._1;return a(N,function(r){var n=r,o=n._1;return a(N,a(k["++"],"{",a(k["++"],a(ya,t,Yo({ctor:"::",_0:o,_1:{ctor:"[]"}})),a(k["++"],", ",a(k["++"],a(Vt,", ",a(G,ya(t),e)),"}")))),l(Ca,a(Gi,n._0,t),o,e))}(a(Bi,t.mod,n._0._0)),a($,Aa(t),a(ha,n._0,e)))}while(!1);return v.crashCase("ExExpression",{start:{line:443,column:5},end:{line:489,column:70}},n)(a(k["++"],"Shouldn't ever work for",T(n)))}),Ca=n(function(t,r,n){return a(ci,l(Na,t,r,n),l(Ra,t,r,n))}),Na=n(function(t,r,n){return a($,ya(t),a(A,Y_(n),a(A,ga,l(n_,t.mod,r,t))))}),Ra=n(function(t,n,e){return $(function(o){var c=o,u=c.arity,i=W(e),_=u-i,f=yi(_),s=a(G,function(t){return Yo(z(t))},f);return v.eq(u,0)?Li(n):v.cmp(_,0)>-1?l(m,r(function(t,r){return a(k["++"],t,r)}),a(jt,_," end"),a(k["++"],a(Vt,"",a(G,a(m,r(function(t,r){return a(k["++"],t,r)})," -> "),a(G,r(function(t,r){return a(k["++"],t,r)})("fn "),f))),a(k["++"],"{",a(k["++"],Li(n),a(k["++"],", ",a(k["++"],a(Vt,", ",a(G,ya(a(P_,a(k["++"],e,s),t)),a(k["++"],e,s))),"}")))))):v.crash("ExExpression",{start:{line:558,column:29},end:{line:558,column:40}})(a(k["++"],"Expected ",a(k["++"],T(u),a(k["++"]," arguments for '",a(k["++"],n,a(k["++"],"'. Got: ",T(W(e))))))))})(l(e_,t.mod,n,t))}),Aa=r(function(t,r){var n=r,e=n._1,o=function(){return"[]"===e.ctor?"":a(k["++"],".(",a(k["++"],a(Vt,").(",a(G,ya(t),e)),")"))}(),c=function(){switch(n._0._0.ctor){case"Update":return"update_in_";case"Get":return"get_in_";default:return"put_in_"}}(),u=function(t){var r=t;return a(k["++"],":",a($i,!0,r._0))},i=a(Vt,", ",a(G,u,n._0._2));return a(k["++"],c,a(k["++"],"([",a(k["++"],i,a(k["++"],"])",o))))}),Sa=n(function(t,r,e){var o=n(function(t,r,n){return a(Vt,n,a(G,ya(t),r))}),c=_i(a(Do,r,e));t:do{if("::"!==c.ctor)break t;switch(c._0.ctor){case"Variable":if("::"===c._0._0.ctor&&"[]"===c._0._0._1.ctor){var u=c._0._0._0,i=c._1;return f(t_,t,t.mod,u,i)?a(k["++"],a($i,!0,u),a(k["++"],"(",a(k["++"],l(o,t,i,", "),")"))):a(k["++"],a(ya,t,r),a(k["++"],".(",a(k["++"],a(ya,t,e),")")))}break t;case"Access":if("Variable"===c._0._0.ctor&&"::"===c._0._1.ctor&&"[]"===c._0._1._1.ctor){var _=c._0._1._0,s=c._1,d=a($i,!0,_),p=Oi(c._0._0._0);return f(t_,t,p,_,s)?a(k["++"],p,a(k["++"],".",a(k["++"],d,a(k["++"],"(",a(k["++"],l(o,t,s,", "),")"))))):a(k["++"],p,a(k["++"],".",a(k["++"],d,a(k["++"],"().(",a(k["++"],l(o,t,s,").("),")")))))}break t;default:break t}}while(!1);return a(k["++"],a(ya,t,r),a(k["++"],".(",a(k["++"],a(ya,t,e),")")))}),$a=r(function(t,n){var e=r(function(t,r){var n=r,e=n._0,o=n._1,c=_i(e);return"[]"===c.ctor?"":"[]"===c._1.ctor?a(ya,t,o):"Variable"===c._0.ctor&&"::"===c._0._0.ctor&&"[]"===c._0._0._1.ctor?l(Ea,t,c._1,o):v.crashCase("ExExpression",{start:{line:152,column:13},end:{line:163,column:78}},c)(a(k["++"],T(e)," is not a let in branch"))}),o=a(G,function(t){return a($i,!0,$_(nr(t)))},n),c=a(G,nr,n),u=a(P_,c,t);return a(ui["=>"],u,a(k["++"],"{",a(k["++"],a(Vt,", ",o),a(k["++"],"} = let [",a(k["++"],a(Vt,",",a(G,function(t){var r=t;return a(k["++"],Ri(u.indent+1),a(k["++"],a($i,!0,r._0),a(k["++"],": ",r._1)))},a(G,Zt(e(Xi(u))),a(G,function(t){var r=t;return{ctor:"_Tuple2",_0:$_(r._0),_1:r}},n)))),a(k["++"],Ri(u.indent),"]"))))))}),La=r(function(t,r){var n=r;switch(n.ctor){case"Integer":return T(n._0);case"Float":var e=T(n._0);return a(It,".",e)?e:a(k["++"],e,".0");case"Character":var o=n._0;switch(o.valueOf()){case" ":return"?\\s";case"\n":return"?\\n";case"\r":return"?\\r";case"\t":return"?\\t";case"\\":return"?\\\\";case"\0":return"?\\0";default:return a(k["++"],"?",Gt(o))}case"String":return a(k["++"],'"',a(k["++"],n._0,'"'));case"List":return a(k["++"],"[",a(k["++"],a(Vt,", ",a(G,ya(t),n._0)),"]"));case"Tuple":return a(k["++"],"{",a(k["++"],a(Vt,", ",a(G,ya(t),n._0)),"}"));case"Record":return a(k["++"],"%{",a(k["++"],a(Vt,", ",a(G,function(r){var n=r;return a(k["++"],a($i,!0,n._0),a(k["++"],": ",a(ya,t,n._1)))},n._0)),"}"));default:return a(Ii,"expression",r)}}),Oa=r(function(t,r){var n=r;return"If"===n.ctor?a(k["++"],{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:a(ya,Xi(t),n._0),_1:{ctor:"::",_0:" -> ",_1:{ctor:"::",_0:a(ya,Xi(t),n._1),_1:{ctor:"[]"}}}}},a(Oa,t,n._2)):{ctor:"::",_0:Ri(t.indent),_1:{ctor:"::",_0:"true -> ",_1:{ctor:"::",_0:a(ya,Xi(t),r),_1:{ctor:"[]"}}}}}),Ia=r(function(t,r){var n=r;t:do{if("[]"===n.ctor)return"";if("[]"!==n._1.ctor)break t;switch(n._0){case"()":return"{}";case"Nothing":return"nil";case"Just":return"fn x1 -> {x1} end";case"Err":return"fn x1 -> {:error, x1} end";case"Ok":return"fn x1 -> {:ok, x1} end";case"curry":return"curried()";case"uncurry":return"uncurried()";default:break t}}while(!1);return function(r){var n=r,e=n._1;if(Si(e))return a(N,Li(e),l(Ca,a(Gi,n._0,t),e,{ctor:"[]"}));if(a(Ot,"@",e))return Li(a(Pt,1,e));switch(Fi(e).ctor){case"Builtin":return v.eq(e,"<|")?"flip().((&|>/0).())":a(k["++"],"(&XBasics.",a(k["++"],Ti(e),"/0).()"));case"Custom":return Ti(e);default:return a(D_,t,a($i,!0,e))}}(a(Bi,t.mod,n))}),za=n(function(t,n,e){if(a(Ot,Ri(t.indent+1),a(k["++"],"\n",e))){var o=a(Mu,Ce,Dt(e));if("Ok"===o.ctor&&"_Tuple3"===o._0.ctor&&"BinOp"===o._0._2.ctor&&"Variable"===o._0._2._0.ctor&&"::"===o._0._2._0._0.ctor&&"=="===o._0._2._0._0._0&&"[]"===o._0._2._0._0._1.ctor){var c=a(Y,function(t){return a(r(function(t,r){return v.eq(t,r)}),n,nr(t))},a(k["++"],a(Ji,t,li),a(Ji,t,ai))),u=v.eq(c,{ctor:"[]"})?"":l(m,r(function(t,r){return a(k["++"],t,r)}),Ri(0),a(r(function(t,r){return a(k["++"],t,r)}),a(k["++"],Ni(1),"iex> "),a(Vt,a(k["++"],Ri(t.indent+2),"iex> "),a(Ut,"\n",Ft(ji(t))))));return a(k["++"],u,a(k["++"],Ni(t.indent+1),a(k["++"],"iex> import ",a(k["++"],t.mod,a(k["++"],Ri(t.indent+2),a(k["++"],"iex> ",a(k["++"],a(ya,t,o._0._2._1),a(k["++"],Ri(t.indent+2),a(k["++"],a(ya,t,o._0._2._2),"\n")))))))))}return e}return e}),qa=r(function(t,r){return a(Y,a(m,H,r),t)}),Ma=r(function(t,n){var e=r(function(t,r){return a(k["++"],"{:'",a(k["++"],t,a(k["++"],"', ",a(k["++"],T(r),"}"))))});return a(G,function(n){return Di(n)?a(k["++"],a(e,Ti(n),0),a(k["++"],", ",a(e,Ti(n),2))):v.eq(n,"ffi")?"":a(k["++"],a(e,a($i,!0,n),0),a(N,"",a($,r(function(t,r){return a(k["++"],t,r)})(", "),a($,e(a($i,!0,n)),a(oi,r(function(t,r){return!v.eq(t,r)})(0),a($,function(t){return t.arity},a(A,vn(n),a($,function(t){return t.definitions},a(vn,t.mod,t.commons.modules)))))))))},n)}),Fa=function(t){var r=t;switch(r.ctor){case"TypeExport":return{ctor:"[]"};case"FunctionExport":return{ctor:"::",_0:r._0,_1:{ctor:"[]"}};default:return v.crashCase("ExStatement",{start:{line:482,column:5},end:{line:490,column:62}},r)(a(k["++"],"You can't export ",T(t)))}},Da=function(t){var r=t;t:do{if("::"===r.ctor){if("::"===r._1.ctor){if("[]"===r._1._1.ctor)return S({ctor:"_Tuple2",_0:r._0,_1:r._1._0});break t}if(""===r._0)return R;break t}break t}while(!1);return v.crashCase("ExStatement",{start:{line:369,column:5},end:{line:377,column:62}},r)(a(k["++"],"Wrong flag format ",T(r)))},Pa=n(function(t,r,n){var e=l(Z_,n,t,r);return v.update(n,{importedTypes:l(U,a(m,Wn,t),n.importedTypes,e)})}),Ja=function(t){var r=t;return"ModuleDeclaration"===r.ctor?a(__,Oi(r._0),r._1):v.crashCase("ExStatement",{start:{line:51,column:5},end:{line:56,column:69}},r)("First statement must be module declaration")},ja=function(t){return{ctor:"Flag",_0:t}},Va=function(t){return{ctor:"Normal",_0:t}},Ua=function(t){return{ctor:"Ex",_0:t}},Wa=function(t){return{ctor:"Doc",_0:t}},Ha=function(t){var r=n(function(t,r,n){var e=n;if("Normal"===e.ctor){var o=e._0;return a(gr,t,o)?r(f(hr,br(1),t,b(""),o)):Va(o)}return e});return l(U,g(r),Va(t),a(G,function(t){var r=t;return{ctor:"_Tuple2",_0:mr(r._0),_1:r._1}},{ctor:"::",_0:{ctor:"_Tuple2",_0:"^\\sex\\b",_1:Ua},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"^\\|",_1:Wa},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:"^\\sflag\\b",_1:ja},_1:{ctor:"[]"}}}}))},Qa={ctor:"ModuleDoc"},Ka={ctor:"Typedoc"},Xa={ctor:"Fundoc"},Ga=e(function(t,n,e,o){var c=t.hasModuleDoc?v.eq(n,Xa)?"@doc":"@typedoc":"@moduledoc";return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),v.update(t,{hasModuleDoc:!0,lastDoc:R}),a(k["++"],Ri(t.indent),a(k["++"],c,a(k["++"],' """\n ',a(k["++"],f(hr,yr,mr("\n(\n| ){3,}\n"),b("\n\n"),a(Vt,Ri(t.indent),a(G,l(hr,yr,mr('"""'),b('\\"\\"\\"')),a(G,mi,a(G,a(za,t,e),Mt(o)))))),a(k["++"],Ri(t.indent),'"""'))))))}),Ya=o(function(t,n,e,o,c){var u=function(r){return(c?ca(v.update(t,{inTypeDefiniton:!0})):a(ta,!1,v.update(t,{inTypeDefiniton:!0})))(a(B_,t,r))},i=function(t){var r=t;return"TypeVariable"===r.ctor?r._0:v.crashCase("ExStatement",{start:{line:68,column:13},end:{line:73,column:74}},r)(a(k["++"],T(t)," is not a type variable"))},_=v.eq(e,{ctor:"[]"})?"":a(k["++"],"(",a(k["++"],a(Vt,", ",a(G,i,e)),")")),s=a(N,{ctor:"_Tuple2",_0:t,_1:""},a($,l(Ga,t,Ka,n),t.lastDoc)),d=s._0,p=s._1;return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),d,f(Qi,t,"notype",n,a(k["++"],p,a(k["++"],Ri(t.indent),a(k["++"],"@type ",a(k["++"],a($i,!0,n),a(k["++"],_,a(k["++"]," :: ",a(k["++"],a(Vt," | ",a(G,u,o)),"\n")))))))))}),Za=r(function(t,n){var e=Ha(n);switch(e.ctor){case"Doc":var o=e._0;return t.hasModuleDoc?a(ui["=>"],v.update(t,{lastDoc:S(o)}),""):f(Ga,t,Qa,t.mod,o);case"Ex":return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),t,a(Ai,t.indent,a(Vt,"\n",a(G,Dt,a(Ut,"\n",e._0)))));case"Flag":return l(m,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),"",l(U,Ki,t,a(tt,Da,a(G,Ut(":+"),l(pr,yr,mr("\\s+"),e._0)))));default:return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),t,a(Ai,t.indent,a(Ci,"# ",e._0)))}}),tl=r(function(t,n){var e=n;t:do{switch(e.ctor){case"InfixDeclaration":return{ctor:"_Tuple2",_0:t,_1:""};case"TypeDeclaration":if("TypeConstructor"===e._0.ctor&&"::"===e._0._0.ctor&&"[]"===e._0._0._1.ctor)return s(Ya,t,e._0._0._0,e._0._1,e._1,!0);break t;case"TypeAliasDeclaration":if("TypeConstructor"===e._0.ctor&&"::"===e._0._0.ctor&&"[]"===e._0._0._1.ctor)return s(Ya,t,e._0._0._0,e._0._1,{ctor:"::",_0:e._1,_1:{ctor:"[]"}},!1);break t;case"FunctionTypeDeclaration":if("TypeApplication"===e._1.ctor){var o=e._0,c=a(B_,t,e._1),u=a(N,{ctor:"_Tuple2",_0:t,_1:""},a($,l(Ga,t,Xa,o),t.lastDoc)),i=u._0,_=u._1;return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),i,a(k["++"],f(Qi,i,"nodef",o,_),function(){switch(Fi(o).ctor){case"Builtin":return"";case"Custom":return f(Qi,i,"nospec",o,a(k["++"],Ri(i.indent),a(k["++"],"@spec ",a(k["++"],Ti(o),a(oa,i,c)))));default:return f(Qi,i,"nospec",o,a(k["++"],Ri(i.indent),a(k["++"],"@spec ",a(k["++"],a($i,!0,o),a(oa,i,c)))))}}()))}var p=e._1,h=e._0,g=a(N,{ctor:"_Tuple2",_0:t,_1:""},a($,l(Ga,t,Xa,h),t.lastDoc)),i=g._0,_=g._1;return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),i,a(k["++"],_,function(){switch(Fi(h).ctor){case"Builtin":return"";case"Custom":return f(Qi,i,h,"nospec",a(k["++"],Ri(t.indent),a(k["++"],"@spec ",a(k["++"],Ti(h),a(oa,i,p)))));default:return f(Qi,i,h,"nospec",a(k["++"],Ri(t.indent),a(k["++"],"@spec ",a(k["++"],a($i,!0,h),a(oa,i,p)))))}}()));case"FunctionDeclaration":var m=e._0,b=e._2,y=e._1,w=a(r(function(t,r){return!v.eq(t,r)}),R,a(A,function(t){return a(vn,m,function(t){return t.definitions}(t))},a(vn,t.mod,t.commons.modules))),x=w||v.eq(y,{ctor:"[]"})?"":a(k["++"],Ri(t.indent),a(k["++"],"curryp ",a(k["++"],a($i,!0,m),a(k["++"],"/",T(W(y)))))),E=function(t){return"Tuple"===t.ctor},B=a(Ui,t,m),C=f(G_,t,ya,m,a(G,ii,a(N,{ctor:"[]"},a($,function(t){return ii(function(t){return t.def}(t))},a(A,function(t){return a(vn,m,function(t){return t.definitions}(t))},a(vn,t.mod,t.commons.modules))))));return a(ui["=>"],t,w||B?a(k["++"],x,function(){var r=b;r:do{switch(r.ctor){case"Application":if("Application"!==r._0.ctor||"Variable"!==r._0._0.ctor||"::"!==r._0._0._0.ctor||"[]"!==r._0._0._0._1.ctor)break r;switch(r._0._0._0._0){case"ffi":case"tryFfi":return C(r);default:break r}case"Case":switch(r._0.ctor){case"Variable":if("::"===r._0._0.ctor&&"[]"===r._0._0._1.ctor){var n=r._0._0._0;return v.eq({ctor:"::",_0:r._0,_1:{ctor:"[]"}},y)?d(W_,t,ya,n,y,b,r._1):s(H_,t,ya,n,y,b)}break r;case"Tuple":var e=r._1;return v.eq(r._0._0,y)&&a(j,function(t){return E(nr(t))},e)?d(W_,t,ya,m,y,b,e):s(H_,t,ya,m,y,b);default:break r}default:break r}}while(!1);return s(H_,t,ya,m,y,b)}()):v.crash("ExStatement",{start:{line:213,column:25},end:{line:213,column:36}})(a(k["++"],"To be able to export it, you need to provide function type for `",a(k["++"],m,a(k["++"],"` function in module ",T(t.mod))))));case"Comment":return a(Za,t,e._0);case"ImportStatement":if("Just"===e._1.ctor){if("Nothing"===e._2.ctor)return a(ui["=>"],t,a(k["++"],Ri(t.indent),a(k["++"],"alias ",a(k["++"],Oi(e._0),a(k["++"],", as: ",e._1._0)))));break t}if("Nothing"===e._2.ctor)return a(ui["=>"],t,a(k["++"],Ri(t.indent),a(k["++"],"alias ",Oi(e._0))));switch(e._2._0.ctor){case"SubsetExport":var S=e._2._0,L=e._0,O=l(V,r(function(t,r){return a(k["++"],t,r)}),{ctor:"[]"},a(G,Fa,e._2._0._0)),I=a(N,{ctor:"[]"},a($,function(t){return a(qa,O,an(function(t){return t.definitions}(t)))},a(vn,t.mod,t.commons.modules))),z=v.eq(I,{ctor:"[]"})?{ctor:"[]"}:{ctor:"::",_0:a(k["++"],"except: [",a(k["++"],a(Vt,", ",a(Ma,t,I)),"]")),_1:{ctor:"[]"}},q=v.eq(O,{ctor:"[]"})?{ctor:"[]"}:{ctor:"::",_0:a(k["++"],"only: [",a(k["++"],a(Vt,", ",a(Ma,t,O)),"]")),_1:{ctor:"[]"}},M=v.eq(O,{ctor:"[]"})&&v.eq(I,{ctor:"[]"})?"alias ":"import ",F=a(Vt,".",L);return a(ui["=>"],l(p_,S,Oi(L),l(Pa,F,S,t)),a(k["++"],Ri(t.indent),a(k["++"],M,a(Vt,", ",l(V,r(function(t,r){return a(k["++"],t,r)}),{ctor:"[]"},{ctor:"::",_0:{ctor:"::",_0:Oi(L),_1:{ctor:"[]"}},_1:{ctor:"::",_0:q,_1:{ctor:"::",_0:z,_1:{ctor:"[]"}}}})))));case"AllExport":if("::"===e._0.ctor&&"Elchemy"===e._0._0&&"[]"===e._0._1.ctor)return{ctor:"_Tuple2",_0:t,_1:""};var D=Oi(e._0),P=a(N,{ctor:"[]"},a($,function(t){return an(function(t){return t.definitions}(t))},a(vn,D,t.commons.modules))),I=a(N,{ctor:"[]"},a($,function(t){return a(qa,P,an(function(t){return t.definitions}(t)))},a(vn,t.mod,t.commons.modules))),z=v.eq(I,{ctor:"[]"})?{ctor:"[]"}:{ctor:"::",_0:a(k["++"],"except: [",a(k["++"],a(Vt,", ",a(Ma,t,I)),"]")),_1:{ctor:"[]"}};return a(ui["=>"],l(Pa,D,Ic,l(p_,Ic,D,t)),a(k["++"],Ri(t.indent),a(k["++"],"import ",a(Vt,", ",l(V,r(function(t,r){return a(k["++"],t,r)}),{ctor:"[]"},{ctor:"::",_0:{ctor:"::",_0:D,_1:{ctor:"[]"}},_1:{ctor:"::",_0:z,_1:{ctor:"[]"}}})))));default:break t}default:break t}}while(!1);return a(r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),t,a(Ii,"statement",e))}),rl=r(function(t,r){var n=Mt(l(Jt,0,t,r));return{ctor:"_Tuple2",_0:W(n),_1:a(N,0,a($,Ht,K(rt(n))))}}),nl=(l(hr,yr,mr('(?:({-(?:\\n|.)*?-})|([\\w\\])}"][\\t ]*)\\n[\\t ]+((?!.*\\s->\\s)(?!.*=)(?!.*\\bin\\b)[\\w[({"]))'),function(t){return a(Vt," ",a(tt,y,a(G,$(a(m,r(function(t,r){return a(k["++"],t,r)})," ")),t.submatches)))}),function(t){return f(hr,yr,mr("\n +\\w+ : .*"),b(""),f(hr,yr,mr("\\s--.*\n"),b(""),t))}),el=function(t){return nl(t)},ol=r(function(t,r){var n=qu(el(r));t:do{if("Ok"===n.ctor){if("_Tuple3"===n._0.ctor)return n._0._2;break t}if("_Tuple3"===n._0.ctor&&"_Tuple0"===n._0._0.ctor&&"::"===n._0._2.ctor&&"[]"===n._0._2._1.ctor){var e=a(rl,n._0._1.position,r),o=e._0,c=e._1;return v.crash("Compiler",{start:{line:216,column:17},end:{line:216,column:28}})(a(k["++"],"]ERR> Compilation error in:\n ",a(k["++"],t,a(k["++"],":",a(k["++"],T(o),a(k["++"],":",a(k["++"],T(c),a(k["++"],"\nat:\n ",a(k["++"],a(Vt,"\n",a(at,30,Mt(n._0._1.input))),"\n")))))))))}break t}while(!1);return v.crashCase("Compiler",{start:{line:207,column:5},end:{line:232,column:39}},n)(T(n))}),cl=r(function(t,r){var n=r,e=a(tl,n._0,t),o=e._0,c=e._1;return{ctor:"_Tuple2",_0:o,_1:a(k["++"],n._1,c)}}),ul=function(t){var r=t;if("[]"===r.ctor)return{ctor:"_Tuple2",_0:R,_1:{ctor:"[]"}};var n=r._1,e=Ja(r._0);return{ctor:"_Tuple2",_0:S(a(R_,e,n)),_1:n}},il=function(t){var e=r(function(t,r){return d(sn,Wn,n(function(t,r,n){return a(Wn,t,r)}),Wn,r,t,Rn)});return l(U,function(t){return e(function(t){return t.modules}(t))},Rn,t)},_l=function(t){var r=a(Ut,"\n",t);return"::"===r.ctor?{ctor:"_Tuple2",_0:r._0,_1:a(Vt,"\n",r._1)}:{ctor:"_Tuple2",_0:"",_1:""}},al=a(k["++"],"\n",a(k["++"],Dt("\n end\n\n "),"\n")),ll=a(k["++"],Ri(0),a(k["++"],"use Elchemy","\n")),fl=r(function(t,r){var n=ji(t);return a(k["++"],a(k["++"],"# Compiled using Elchemy v","0.6.3"),a(k["++"],"\n",a(k["++"],a(k["++"],"defmodule ",a(k["++"],t.mod," do")),a(k["++"],ll,a(k["++"],Ri(t.indent),a(k["++"],n,a(k["++"],rr(l(U,cl,{ctor:"_Tuple2",_0:t,_1:""},r)),al)))))))}),sl=r(function(t,n){if(a(gr,mr("^\\s*$"),n))return{ctor:"_Tuple2",_0:"",_1:t};var e=a(Ut,a(k["++"],">>",">>"),n);if("::"===e.ctor&&"[]"===e._1.ctor)return function(t){var r=t,n=r._0;if("Nothing"===n.ctor)return v.crashCase("Compiler",{start:{line:80,column:29},end:{line:85,column:63}},n)("Failed getting context");var e=n._0;return{ctor:"_Tuple2",_0:a(fl,e,r._1),_1:e.commons}}(ul(a(ol,"NoName.elm",e._0)));var o=e,c=a(C,"Number of files",W(o)),u=a(G,function(t){var r=t,n=r._1._0;return l(m,C,n,a(k["++"],"Parsing ",a(k["++"],T(c-r._0),a(k["++"],"/",a(k["++"],T(c)," # "))))),{ctor:"_Tuple2",_0:n,_1:a(ol,n,r._1._1)}},a(pt,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),a(G,_l,o))),i=a(tt,function(t){var r=t;return"Nothing"===r._1._0.ctor?R:S({ctor:"_Tuple3",_0:r._0,_1:r._1._0._0,_2:r._1._1})},a(G,function(t){var r=t;return{ctor:"_Tuple2",_0:r._0,_1:ul(r._1)}},u)),_=function(t){return{modules:t}}(il(a(r(function(t,r){return{ctor:"::",_0:t,_1:r}}),t,a(G,function(t){return t._1.commons},i)))),f=a(G,function(t){var r=t;return{ctor:"_Tuple3",_0:r._0,_1:v.update(r._1,{commons:_}),_2:r._2}},i),s=function(t){var r=t,n=r._1._0;return l(m,C,n,a(k["++"],"Compiling ",a(k["++"],T(c-r._0),a(k["++"],"/",a(k["++"],T(c)," # "))))),a(k["++"],">>",a(k["++"],">>",a(k["++"],n,a(k["++"],"\n",a(fl,r._1._1,r._1._2)))))};return l(m,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),_,a(Vt,"\n",a(G,s,a(pt,r(function(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}),f))))}),dl=function(t){return a(sl,Yi,t)},pl=function(t){return nr(dl(t))},hl=r(function(t,r){var n=t;return"Replace"===n.ctor?{ctor:"_Tuple2",_0:n._0,_1:ur}:{ctor:"_Tuple2",_0:"",_1:ur}}),vl=function(t){return{ctor:"_Tuple2",_0:t,_1:ur}},gl=function(t){return a(ei,{ctor:"[]"},a(k["++"],"```elixir\n",a(k["++"],pl(t),"\n```")))},ml=er.incomingPort("updateInput",Wu),bl=function(t){return{ctor:"Replace",_0:t}},yl=Zu({init:vl,update:hl,view:gl,subscriptions:function(t){return _r({ctor:"::",_0:ml(bl),_1:{ctor:"[]"}})}})(Wu),kl={};if(kl.Main=kl.Main||{},void 0!==yl&&yl(kl.Main,"Main",void 0),"function"==typeof define&&define.amd)return void define([],function(){return kl});if("object"==typeof t)return void(t.exports=kl);var Tl=this.Elm;if(void 0===Tl)return void(this.Elm=kl);for(var wl in kl){if(wl in Tl)throw new Error("There are two Elm modules called `"+wl+"` on this page! Rename one of them.");Tl[wl]=kl[wl]}}).call(this)},function(t,r){},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e=n(1),o=(n.n(e),n(0)),c=n.n(o),u='module FizzBuzz exposing (fizzbuzz)\n\nimport List exposing (map, range)\n\n\n{-| Fizzes the buzzes, and buzzfizzes the fizz out of buzz\nfizzbuzz 1 7 == "1 2 Fizz 4 Buzz Fizz 7"\n-}\nfizzbuzz : Int -> Int -> String\nfizzbuzz from to =\n let\n fizzBuzz n =\n case ( n % 3, n % 5 ) of\n ( 0, 0 ) ->\n "FizzBuzz"\n\n ( 0, _ ) ->\n "Fizz"\n\n ( _, 0 ) ->\n "Buzz"\n\n _ ->\n toString n\n in\n List.range from to\n |> map (fizzBuzz >> toString)\n |> joinWords\n\n\njoinWords : List String -> String\njoinWords a =\n String.join " " a',i=c.a.Main.embed(document.getElementById("root"),u),_=CodeMirror(document.getElementById("code-editor"),{value:u,lineNumbers:!0,mode:"elm",theme:"one-dark"});_.setSize("100%","100%"),_.on("change",function(t,r){return i.ports.updateInput.send(t.getValue())}),window.onerror=function(t,r,n){return setTimeout(function(){var r=t.split("The message provided by the code author is:");2==r.length&&(document.getElementById("error-dialog").innerText=r[1])},30),!1},window.onkeydown=function(){document.getElementById("error-dialog").innerText=""}}]); \ No newline at end of file diff --git a/elchemy b/elchemy index 85fb1eb..58e025e 100755 --- a/elchemy +++ b/elchemy @@ -1,7 +1,7 @@ #!/bin/bash -version="0.7.0" +version="0.7.1" set -e VERBOSE=false diff --git a/elchemy-core b/elchemy-core index 9c2b45e..bb1ebdb 160000 --- a/elchemy-core +++ b/elchemy-core @@ -1 +1 @@ -Subproject commit 9c2b45e5dc43d0e7c8c5b7f93af60adeb9a4eddf +Subproject commit bb1ebdb4389aad9be3bfb0b09fbaa9d1d98b88cc diff --git a/mix.exs b/mix.exs index dfebfed..7e9ae77 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ defmodule Elchemy.Mixfile do [app: :elchemy, name: "Elchemy Compiler", description: "Mix compiler wrapper around Elchemy project", - version: "0.7.0", + version: "0.7.1", elixir: "~> 1.4", description: "", package: package(), @@ -35,11 +35,11 @@ defmodule Elchemy.Mixfile do # Dependencies can be Hex packages: # - # {:my_dep, "~> 0.7.0"} + # {:my_dep, "~> 0.7.1"} # # Or git/path repositories: # - # {:my_dep, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.7.0"} + # {:my_dep, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.7.1"} # # Type "mix help deps" for more examples and options defp deps do diff --git a/src/Compiler.elm b/src/Compiler.elm index 9e14c64..50e7d27 100644 --- a/src/Compiler.elm +++ b/src/Compiler.elm @@ -21,7 +21,7 @@ import Regex exposing (Regex, HowMany(..), regex) -} version : String version = - "0.7.0" + "0.7.1" glueStart : String