text: // Generated by BUCKLESCRIPT VERSION 5.0.6, PLEASE EDIT WITH CARE
  'use strict';
  
  var Curry = require("bs-platform/lib/js/curry.js");
  var React = require("react");
  var Rebase = require("@glennsl/rebase/lib/js/src/Rebase.bs.js");
  var Js_dict = require("bs-platform/lib/js/js_dict.js");
  var Pervasives = require("bs-platform/lib/js/pervasives.js");
  var Caml_option = require("bs-platform/lib/js/caml_option.js");
  var Caml_splice_call = require("bs-platform/lib/js/caml_splice_call.js");
  var CompareVersions = require("compare-versions");
  var Caml_chrome_debugger = require("bs-platform/lib/js/caml_chrome_debugger.js");
  
  function manyIn(elem) {
    var partial_arg = { };
    return (function (param) {
        return Caml_splice_call.spliceApply(React.createElement, [
                    elem,
                    partial_arg !== undefined ? Caml_option.valFromOption(partial_arg) : undefined,
                    param
                  ]);
      });
  }
  
  function sepBy(sep, item) {
    if (item) {
      var xs = item[1];
      var x = item[0];
      if (xs) {
        return manyIn("span")(Rebase.$$Array[/* fromList */13](/* :: */Caml_chrome_debugger.simpleVariant("::", [
                          x,
                          Rebase.List[/* map */0]((function (i) {
                                  return React.createElement(React.Fragment, undefined, sep, i);
                                }), xs)
                        ])));
      } else {
        return x;
      }
    } else {
      return React.createElement(React.Fragment, undefined);
    }
  }
  
  function enclosedBy(front, back, item) {
    return React.createElement(React.Fragment, undefined, front, " ", item, " ", back);
  }
  
  var React$1 = /* module */Caml_chrome_debugger.localModule([
      "manyIn",
      "sepBy",
      "enclosedBy"
    ], [
      manyIn,
      sepBy,
      enclosedBy
    ]);
  
  function add(x, self) {
    return /* :: */Caml_chrome_debugger.simpleVariant("::", [
              x,
              self
            ]);
  }
  
  function addWhen(x, p, self) {
    if (p) {
      return /* :: */Caml_chrome_debugger.simpleVariant("::", [
                x,
                self
              ]);
    } else {
      return self;
    }
  }
  
  var partial_arg = Rebase.$$String[/* joinWith */11];
  
  function serialize(param) {
    return partial_arg(" ", param);
  }
  
  var ClassName = /* module */Caml_chrome_debugger.localModule([
      "add",
      "addWhen",
      "serialize"
    ], [
      add,
      addWhen,
      serialize
    ]);
  
  function every(xs) {
    return Rebase.$$Array[/* reduce */3]((function (acc, x) {
                  var exit = 0;
                  if (acc.tag) {
                    exit = 1;
                  } else {
                    var xs = acc[0];
                    if (x.tag) {
                      exit = 1;
                    } else {
                      xs.push(x[0]);
                      return /* Ok */Caml_chrome_debugger.variant("Ok", 0, [xs]);
                    }
                  }
                  if (exit === 1) {
                    if (x.tag) {
                      return /* Error */Caml_chrome_debugger.variant("Error", 1, [x[0]]);
                    } else {
                      return /* Error */Caml_chrome_debugger.variant("Error", 1, [acc[0]]);
                    }
                  }
                  
                }), /* Ok */Caml_chrome_debugger.variant("Ok", 0, [/* array */[]]), xs);
  }
  
  var Result = /* module */Caml_chrome_debugger.localModule(["every"], [every]);
  
  function partite(p, xs) {
    var indices = Rebase.$$Array[/* map */0]((function (prim) {
            return prim[1];
          }), Rebase.$$Array[/* filter */10]((function (param) {
                return Curry._1(p, param[0]);
              }), Rebase.$$Array[/* mapi */27]((function (x, i) {
                    return /* tuple */[
                            x,
                            i
                          ];
                  }), xs)));
    var match = Rebase.$$Array[/* get */17](indices, 0);
    var indicesWF;
    if (match !== undefined) {
      var match$1 = match === 0;
      indicesWF = match$1 ? indices : Rebase.$$Array[/* concat */11](indices, /* array */[0]);
    } else {
      var match$2 = Rebase.$$Array[/* length */16](indices) === 0;
      indicesWF = match$2 ? /* array */[0] : indices;
    }
    var intervals = Rebase.$$Array[/* mapi */27]((function (index, n) {
            var match = Rebase.$$Array[/* get */17](indicesWF, n + 1 | 0);
            if (match !== undefined) {
              return /* tuple */[
                      index,
                      match
                    ];
            } else {
              return /* tuple */[
                      index,
                      Rebase.$$Array[/* length */16](xs)
                    ];
            }
          }), indicesWF);
    return Rebase.$$Array[/* map */0]((function (param) {
                  return Rebase.$$Array[/* slice */25](param[0], param[1], xs);
                }), intervals);
  }
  
  function mergeWithNext(p) {
    var partial_arg = /* array */[];
    var partial_arg$1 = Rebase.$$Array[/* reduce */3];
    return (function (param) {
        return partial_arg$1((function (acc, x) {
                      var last = Rebase.$$Array[/* get */17](acc, Rebase.$$Array[/* length */16](acc) - 1 | 0);
                      if (last !== undefined) {
                        var l = last;
                        if (Curry._1(p, l)) {
                          Rebase.$$Array[/* set */18](acc, Rebase.$$Array[/* length */16](acc) - 1 | 0, Rebase.$$Array[/* concat */11](x, l));
                          return acc;
                        } else {
                          return Rebase.$$Array[/* concat */11](/* array */[x], acc);
                        }
                      } else {
                        return /* array */[x];
                      }
                    }), partial_arg, param);
      });
  }
  
  var Array_ = /* module */Caml_chrome_debugger.localModule([
      "partite",
      "mergeWithNext"
    ], [
      partite,
      mergeWithNext
    ]);
  
  function partite$1(tagEntry, xs) {
    var keys = Rebase.$$Array[/* filterMap */23]((function (param) {
            var i = param[1];
            return Rebase.$$Option[/* map */0]((function (key) {
                          return /* tuple */[
                                  key,
                                  i
                                ];
                        }), Curry._1(tagEntry, /* tuple */[
                            param[0],
                            i
                          ]));
          }), Rebase.$$Array[/* mapi */27]((function (x, i) {
                return /* tuple */[
                        x,
                        i
                      ];
              }), xs));
    var intervals = Rebase.$$Array[/* mapi */27]((function (param, n) {
            var index = param[1];
            var key = param[0];
            var match = Rebase.$$Array[/* get */17](keys, n + 1 | 0);
            if (match !== undefined) {
              return /* tuple */[
                      key,
                      index,
                      match[1]
                    ];
            } else {
              return /* tuple */[
                      key,
                      index,
                      Rebase.$$Array[/* length */16](xs)
                    ];
            }
          }), keys);
    return Js_dict.fromArray(Rebase.$$Array[/* map */0]((function (param) {
                      return /* tuple */[
                              param[0],
                              Rebase.$$Array[/* slice */25](param[1], param[2], xs)
                            ];
                    }), intervals));
  }
  
  function split(key, splitter, dict) {
    var match = Js_dict.get(dict, key);
    if (match !== undefined) {
      Rebase.$$Array[/* forEach */8]((function (param) {
              dict[param[0]] = param[1];
              return /* () */0;
            }), Js_dict.entries(Curry._1(splitter, match)));
      return dict;
    } else {
      return dict;
    }
  }
  
  function update(key, f, dict) {
    var match = Js_dict.get(dict, key);
    if (match !== undefined) {
      dict[key] = Curry._1(f, Caml_option.valFromOption(match));
      return dict;
    } else {
      return dict;
    }
  }
  
  var Dict = /* module */Caml_chrome_debugger.localModule([
      "partite",
      "split",
      "update"
    ], [
      partite$1,
      split,
      update
    ]);
  
  function sepBy$1(sep, item) {
    if (item) {
      return /* :: */Caml_chrome_debugger.simpleVariant("::", [
                item[0],
                Rebase.List[/* flatMap */5]((function (i) {
                        return /* :: */Caml_chrome_debugger.simpleVariant("::", [
                                  sep,
                                  /* :: */Caml_chrome_debugger.simpleVariant("::", [
                                      i,
                                      /* [] */0
                                    ])
                                ]);
                      }), item[1])
              ]);
    } else {
      return /* [] */0;
    }
  }
  
  function init(xs) {
    if (xs) {
      var xs$1 = xs[1];
      if (xs$1) {
        return /* :: */Caml_chrome_debugger.simpleVariant("::", [
                  xs[0],
                  init(xs$1)
                ]);
      } else {
        return /* [] */0;
      }
    } else {
      return Pervasives.failwith("init on empty list");
    }
  }
  
  function last(_xs) {
    while(true) {
      var xs = _xs;
      if (xs) {
        var xs$1 = xs[1];
        if (xs$1) {
          _xs = xs$1;
          continue ;
        } else {
          return xs[0];
        }
      } else {
        return Pervasives.failwith("last on empty list");
      }
    };
  }
  
  function span(p, xs) {
    if (xs) {
      var xs$1 = xs[1];
      var x = xs[0];
      if (Curry._1(p, x)) {
        var match = span(p, xs$1);
        return /* tuple */[
                /* :: */Caml_chrome_debugger.simpleVariant("::", [
                    x,
                    match[0]
                  ]),
                match[1]
              ];
      } else {
        return /* tuple */[
                /* [] */0,
                xs$1
              ];
      }
    } else {
      return /* tuple */[
              /* [] */0,
              /* [] */0
            ];
    }
  }
  
  function dropWhile(p, _xs) {
    while(true) {
      var xs = _xs;
      if (xs) {
        var xs$1 = xs[1];
        var x = xs[0];
        if (Curry._1(p, x)) {
          _xs = xs$1;
          continue ;
        } else {
          return /* :: */Caml_chrome_debugger.simpleVariant("::", [
                    x,
                    xs$1
                  ]);
        }
      } else {
        return /* [] */0;
      }
    };
  }
  
  var List_ = /* module */Caml_chrome_debugger.localModule([
      "sepBy",
      "init",
      "last",
      "span",
      "dropWhile"
    ], [
      sepBy$1,
      init,
      last,
      span,
      dropWhile
    ]);
  
  function toCharArray(input) {
    return input.split("");
  }
  
  function indexOf(needle, haystack) {
    var n = haystack.indexOf(needle);
    if (n !== -1) {
      return n;
    }
    
  }
  
  function lastIndexOf(needle, haystack) {
    var n = haystack.lastIndexOf(needle);
    if (n !== -1) {
      return n;
    }
    
  }
  
  function indentedBy(s) {
    var n = 0;
    for(var i = 0 ,i_finish = s.length - 1 | 0; i <= i_finish; ++i){
      var match = s.charAt(i);
      var exit = 0;
      switch (match) {
        case "\t" : 
        case "\n" : 
        case "\f" : 
        case "\r" : 
        case " " : 
            exit = 1;
            break;
        default:
          
      }
      if (exit === 1) {
        if (i === n) {
          n = n + 1 | 0;
        }
        
      }
      
    }
    return n;
  }
  
  var $$String = /* module */Caml_chrome_debugger.localModule([
      "toCharArray",
      "indexOf",
      "lastIndexOf",
      "indentedBy"
    ], [
      toCharArray,
      indexOf,
      lastIndexOf,
      indentedBy
    ]);
  
  function toString(_e) {
    return (_e.toString());
  }
  
  var JsError = /* module */Caml_chrome_debugger.localModule(["toString"], [toString]);
  
  function compare(a, b) {
    var match = CompareVersions(a, b);
    if (match !== -1) {
      if (match !== 0) {
        return /* GT */2;
      } else {
        return /* EQ */1;
      }
    } else {
      return /* LT */0;
    }
  }
  
  function gte(a, b) {
    var match = compare(a, b);
    return match !== 0;
  }
  
  var Version = /* module */Caml_chrome_debugger.localModule([
      "compare",
      "gte"
    ], [
      compare,
      gte
    ]);
  
  function list(xs) {
    var xs_ = Rebase.$$String[/* joinWith */11](", ", xs);
    return "[" + (xs_ + "]");
  }
  
  function array(xs) {
    return list(Rebase.List[/* fromArray */12](xs));
  }
  
  var Pretty = /* module */Caml_chrome_debugger.localModule([
      "list",
      "array"
    ], [
      list,
      array
    ]);
  
  exports.React = React$1;
  exports.ClassName = ClassName;
  exports.Result = Result;
  exports.Array_ = Array_;
  exports.Dict = Dict;
  exports.List_ = List_;
  exports.$$String = $$String;
  exports.JsError = JsError;
  exports.Version = Version;
  exports.Pretty = Pretty;
  /* react Not a pure module */
  